Where is the set default launch configuration option for a project in Eclipse? - eclipse

I'm running Eclipse 3.5 (Galileo) and I want to have the "Run" command always launch the same configuration, but instead I always get a dialog box that asks me to choose which way to run my project. How can I set a default?
Shouldn't matter, but this is for some Android development, so it's an Android project.

Do the following;
From the drop down menu select Window -> Preferences
Then from the Categories on the right side; Run/Debug -> Launching
Find a group box called "Launch Operation" at the bottom. If you change this to "Always launch the previously launched application" the F11/Ctrl+F11 shortcuts will debug/run whatever you debugged/ran before.
I don't understand why they changed the default behaviour for Eclipse 3.5, it is certainly one of the options I always change.

Related

Is it possible to set which file to run by default in eclipse?

I'm writing a python project in Eclipse with the PyDev plug-in, which contains multiple files.
However I'm used to using visual studio, where it'll automatically find the main function of a project and run the program from there.
Eclipse will always run the file I am currently editing (which usually is a file containing function that are called from the main function).
Is it possible to set which file should be run then clicking run? I've looked at the launch options under Project->Properties->PyDev, but didn't find what I was looking for.
When you press the Debug or Run button (Debug on the left) Eclipse tries to intelligently determine what to launch based on your current editor.
You can change the behaviour by editing Window -> Preferences -> Run/Debug -> Launching -> Launch Operation as pictured below.
The default of launching the current editor works well for some languages, but not as well for Python when every single file is itself a valid program to run. In your case I recommend changing to Always launch the previously launched application.
You can create a custom run configuration.
Right click on your project > run as > run configurations
From here is just a matter of choosing your project type on the left hand side and filling in the required information. You can click 'Run' to use your new configuration.
To get to this configuration again, you can click the 'Run' drop down button in the eclipse tool bar and see all of your run configurations.
Hope this helps!

Is there any difference between "Run Configurations..." and "Debug Configurations..."

In Eclipse (Mars, probably older versions too), the Run menu has Run Configurations... and Debug Configurations..., both of which open the same dialog window. The only functional difference I've found so far is that one has a "Run" button, and the other has a "Debug" button.
It looks like both dialog windows can be used to edit Launch Configurations, but it's not clear if there are two separate configurations for Run vs Debug, or if they are the same.
Is there any substantial difference between the two dialog windows, other than the button next to the "Close" button?
Bonus question: Is there another way to view and edit Launch Configurations besides the two menu options I mentioned (and their equivalents in various toolbars)?
There is only one configuration which is shown in both the Run and Debug Configuration dialogs.
The configuration is actually stored in the workspace .metadata in the .plugins/org.eclipse.debug.core/.launches folder. There is one xxx.launch file for each configuration.

Clearing Eclipse's 'application cache' when performing launch (Run/Debug) for Eclipse Application

I have an RCP project in Eclipse which I launch as an 'Eclipse Application'. After launching and playing with the application, I close it, make some more code modifications and launch again. When I launch the second time, the same changes in the application (tabs opened, fields highlighted...) remain the same as my previous launch. How can I get the Eclipse Application launcher to completely forget my previous run. I am already performing Project > Clean, and running Eclipse with -clean. I would like my 'eclipse application cache' to be cleaned for every run of the code.
On the Run/Debug Configurations dialog, choose the configuration you want to change, go to Main tab, check the Clear checkbox inside Workspace Data group and select the workspace radio button. Uncheck Ask for confirmation before clearing if you wish.

Make Eclipse debug a default project instead of current

I'm currently working with a multi-platform project, where you have a main common library and several different platform setups (-android, -windows, -mac).
When I click debug while editing a library class, Eclipse asks me for a main class to launch, when it really cannot execute anything. I would like to change the behavior so when I start debugging while in a library class, any of the other projects will be the one launched by default.
As far as I have seen, Eclipse allows multilaunch, command parameters and favorites, but never default to other projects.
Not sure if this is exactly what you want, but you can set Eclipse to always launch the previous launch by default. Go to Preferences -> Run/Debug -> Launching and select "Always launch the previous application".

How to change the order of options in "run as" menu in eclipse?

I mainly develop for Android in Eclipse. I used to run my app in with shortcut "CTRL+F11" which was the same as clicking "run as android application" in menu.
Then i installed some eclipse plugins for webservices and now when i press "CTRL+F11", it calls "run on server" because this is the first option in "run as" menu.
How can i change this so the default option for run as would be "run as android application"?
If you set the Preferences → Run/Debug → Launching to Always launch the previously launched application, CTRL+F11 should launch what you last launched.
Simply relaunch your app manually, then check that CTRL+F11 works like you want.
CTRL+F11 always launches your last launched configuration if the Preferences → Run/Debug → Launching to Always launch the previously launched application preference is set.
You can try to add a new shortcut for running android apps by customizing the key-shortcut preferences:
The answer is:
"Organize Favorites" Just below the run as menu.