Speeding up PDE edit-compile-debug cycle - eclipse

Are there any low-hanging fruit regarding some more efficient way to run and test Eclipse-plugins (within the PDE)? Besides slimming down the Eclipse-configuration, which has already been done.

I usually minimize my launch configuration itself (not sure if that is what you are doing). Here's how I do it:
Create a new launch configuration
Go to the "Plug-ins" tab
Select "Launch With:" -> "Plug-ins selected below only"
Click on "Deselect All"
Select only the plug-ins you are debugging from your workspace
Optional: You can uncheck "Include optional dependencies..."
Click on "Add Required Plug-ins"
Save the configuration and launch
Now, this might not work in the first shot. This probably means you have an issue with the defined dependencies. This is also a good test for that as well. Fix it, relaunch, and it should run much smoother.

I use Launch As: Eclipse Application and I don't find it to be too bad. I've found that changing the plugin.xml (or fragment.xml) always requires you to quit and respawn to pick up the changes, but changing Java doesn't always as the changes can often be hot-swapped in. (PDE is good at warning you when it can't.)

I'd like it if Eclipse could dynamically insert my plug-ins into the running environment -- it can do this with regular plug-ins. As for speeding up the edit-compile-debug cycle, I normally prototype my work in small SWT / Swing applications before integrating them into the full product, but this might not work in a lot of cases.

Related

How do I prevent superDevMode from appearing in my arguments?

I'm using Eclipse (Kepler) for a GWT application and for some reason, superDevMode keeps appearing in my arguments. We are stuck with GWT 2.4 which does not know what superDevMode is. I remove the argument, hit Apply and Debug to start the app, but when I look at the arguments again, -superDevMode is in there again. I am assuming there is some property that belongs to 2.6 (the version that was installed with the Eclipse plugin), but I can't seem to find it.
Update: Below, Adam recommended that I go to the GWT tab and take it out of superdevmode. Here is a screenshot of that tab:
There isn't a way to do that. The large area at the top of the tab (above the Super Dev Mode group) suggested that something was supposed to be there, so I set the project's GWT to 2.6. Sure enough, there was a Super/Classic dev mode selection. I set it to classic, saved the settings, and then put the project back to 2.4. The GWT tab looked exactly as it does above and the arguments now has "-nosuperDevMode" in it, which is also not recognized by 2.4.
Any help would be appreciated.
Thanks,
CC
I found a temporary workaround that comes with a caveat: I made the Eclipse Run Configuration file read-only.
Example path:
<YOUR_WORKSPACE>\.metadata\.plugins\org.eclipse.debug.core\.launches\<YOUR_RUN_CONFIG_NAME>.launch
Then whenever you bring up the Dev Mode Run Configuration in Eclipse it still shows the -superDevMode flag, but when you click the Close button it now asks you if you want to save and you can press No.
The big caveat: if you actually do want to change the Run Configuration Eclipse will ask if you want to save, you press Yes, the dialog closes, but it didn't actually save.
Easiest fix is to shutdown Eclipse, manually edit the .launch file to remove -superDevMode, make the file read-only, then start Eclipse again.
Here's the bug report.
Go to GWT tab (3rd from left) and switch from Super Development Mode to Classic Development Mode

See Eclipse Run Configurations in a View

I have a lot of Eclipse run configurations that I frequently access during my daily work (things like doing a maven clean build for various projects, running a test gui, deploying apps etc etc). The Run Configurations Window (accessed via Run->Run Configurations) is reasonably good and supplies me with most of my needs, but:
I hate having to manually open it up every time I need to run something.
The window is modal and that I can't easily access other Eclipse features while editing a configuration.
It loses any filters that I have applied previously.
Is there a way to have this window fixed in a view that I can access at any time, and that it maintains my context? It really seems to me that this feature was designed with little regard for the "Eclipse way of doing things".
I know about setting configurations up as "favourites", but I have probably close to a hundred of these configurations, and the favourites menu is simply not designed for that amount.

Running a specific project when I hit Run in eclipse

In Netbeans I have the option of setting a "Main Project" which basically means if you hit "run", it will automatically execute the main class for that project.
This is convenient for various reasons, for example if you have one project depending on another project and you want to quickly test your changes in your main project.
Does a similar concept exist in eclipse?
Currently, I click on the desired project and then ctrl+F11 to run that project, but it would be convenient if I could just hit F11 or something without the extra action.
I had that same problem. My workaround is to make eclipse always launch the previously launched application. You can do that in settings, Run/Debug | Launching, in the Launch Operation section, select:
[x] Always launch the previously launched application
When you want to launch something different, launch it explicitly, and after that you can relaunch easily with Control F11.
This is very useful for me in practice, as most of the time I work on one thing and relaunch it several times, and rarely need to switch between launchers. (As an aside: in IntelliJ it's nice that I can easily switch between launchers using a simple drop-down list, without manually navigating to the other project/thing I want to switch to.)

Why does eclipse start building after a crash?

Why does eclipse start building after a crash?
The big problem is that I'm working with ClearCase UCM plugin and building takes up to two hours.
What's the problem? Is there a way to solve this?
Note that the build will take much more time in a dynamic view (network access) than in a snapshot one (local disk access).
See "What are the differences between a snapshot view and a dynamic view?".
Before disabling the "Build automatically" eclipse option, check if the issue persists in a snapshot view.
Anyway, an automatic build is generally active only in a continuous integration environment (as shown in this article).
The OP reports the following solution:
Disable the build-before-launch:
Select "Window->Preferences".
In the tree view pane, expand the "Run/Debug" node, and select "Launching".
Disable (uncheck) the "Build (if required) before launching" option in the "General Options" section, and then click "OK".
The Launching Preferences for Juno do mention that this option is "on" by default.
Your auto build is taking long time may be you have a large workspace so If auto-build is taking too long and is interfering with ongoing development, it can be turned off. Uncheck your Build Automatically option in Project-> Build Automatically.
As shown in below image
You can check the purpose of build automatically here. If you need any further help you can go here.

How I can organize run configuration in Eclipse?

In Eclipse, I have organize my favorite "run configurations" but I have a lot of favorite.
So I would like to know if a plugin exists that permit to create folders or sub-lists to have a better view and organization of my run configurations.
I would like this because when I click on the "arrow" near "Run" button on the top of the Eclipse toolbar I have a very long list and it's diffuclt to find quickly the "run configuration" that I want.
I hope somebody have an idea and can help me.
Thanks.
Sincerely,
Arnaud
There are some ways to help a little bit:
If you are more interested in the last started run configurations, these get a number. Number 1 is the last, number 2 the previous before and so on.
Press ALT-SHIFT-X followed by the type of run configuration (j for Java), and you get a list of run configurations. Type in the filter box, and select by cursor keys.
Under Run > Organize Favorites ... you have the option to mark some of them as the ones you want to use often. These will listed at the top of the selection list then.
Run configurations... > Filtering Preferences... will open the preferences where you are able to define which filter should be used for the run configurations. If you use Working Sets in your programming, this could be helpful, so by switching Working Set, the run configurations come with it.
I think the keyboard shortcut is the fastest one if you want to use the run configurations all. If there is a special order, the first tip by be sufficient. If your context changes, and the run configurations should change as well, use the working sets.
I'm a bit late, however it might help future readers.
Well, if you want to manage your Run Configurations I would recommend you Eclipse Runner plugin.
I hope that helps.
I don't know of any plugin that does that, but in Eclipse the chosen run configuration if you hit the run button is the last one ran. Which is what you'll need most of the time, typically. Otherwise you can just go inside the menu, where all configurations are grouped by type and choose from there, that might take a couple more seconds but maybe is not so confusing.
One way to do it is to save the run configurations as "Stored Files" in various project directories. This doesn't require saving or loading manually, you just select "Shared file" in the "Common" tab and set it to a project directory.
When you open or close one of these "Projects" (even if that project contains nothing but run configurations) it will show/hide those configurations.
I'm currently considering creating some "Fake" projects just to hold launcher groups.