See Eclipse Run Configurations in a View - eclipse

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.

Related

Eclipse: How to backup and restore session (windows, views)?

Occasionally, my fingers are faster then my brain and accidentally close views or windows of my development environment (which is Eclipse Kepler). I usually have two windows of Eclipse running side by side with individual views configured in both of them. Unfortunately, as soon as I (unintentionally) close a view/window, I have to set it up again. E.g. the build files in my Ant view get lost, I have to reopen files and so on...
Generally speaking, are there any plug-ins or options you can recommend that can help me backup and restore sessions? I'm aware of the "Save perspective" feature, but it barely meets my needs.
To be more precise:
Is there any feature to make Eclipse request my confirmation, before a (top-level Eclipse) window is closed? - I rarely do uncontrolled clicks twice :-)
Is there any plugin to save and restore my current views (incl. build files in Ant view)?
Is there any plugin to save a set of open files I'm currently working on? Would be neat, if I could open several files on a single click and get working right away. I'm thinking of a session management, where I can switch between several sets of open files.
Just in case none of the above is available and I messed up again, are there any files I can copy from one workspace to another to restore my Eclipse setup (windows/views)?
Any hints are welcome.

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.)

Is there auto-syncing in netbeans for external changes

I know netbeans syncs the original files once I save, but if there is a file changed externally is there a way for netbeans to recognize this and either tell me to re-sync it or automatically resync it with the new changes?
Here's what makes this behavior possible:
NetBeans 6.9 contains a feature that automatically looks for external changes to keep informations about files up-to-date. We have some reports that it can slow down NetBeans mainly, when an open project has many folders. When NetBeans find out that files were externally changed, it re-scans the files to keep data up-to-date that are used with features like code completion, navigation etc. Unfortunately the notification and following re-scanning can take some time and during this time many mentioned features are waiting for the finishing of scanning. There is option Enable auto-scanning of sources that can switch off this behavior. The option you can find it in Options dialog, Miscellaneous category and Files tab.
The default behavior is that NetBeans also looks for external changes when the main window gets focus. This is can be during developing a web application very often when user switches between browser and IDE. The mentioned option also switch this off.
When you switch off option Enable auto-scanning of sources you can still keep the information up-to-date, just invoke Scan for External Changes action from Sources menu manually.
(Here's the original article by Petr Pisl)
I find it counterproductive to leave this setting on, as sometimes auto-loading external changes to a file opened in the UI without asking for permission first can ruin your day when you're forced to make small local changes that you don't want replicated in your repository. I'm sure other people can think of more reasons to advocate for "warn before loading external changes" behavior to be implemented in NB. That is one of the reasons why I like Eclipse better sometimes.

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.

Speeding up PDE edit-compile-debug cycle

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.