Please help me use Eclipse effectively

  • How to launch the last explicitly launched launch configuration? Eclipse always tries to run the file in the current editor, which is annoying when it is a class that has a main method or it is some non-Java file for which Eclipse then tries to configure the ant task instead of just running my program. I know that I can click on the top of an element in Run Pulldown, but I would rather have a keyboard shortcut that does this for me.

  • Is it possible to quickly write and run a little script to automate some tedious editing tasks? I know that I can write extensions in Java, but often I just want to automate what I need only once, and it won’t take longer than maybe 3 lines of javascript code.

  • Is it possible to disable / activate extensions without multiple eclipse installations? Some extensions (i.e. Android) eat a lot of resources and slow things down a bit when they are installed even for projects where they are not used. Is there any way to be lazy to initialize such extensions or load them explicitly or is it even better to associate loading extensions with projects? I suppose deleting them will make me lose all my preferences for them too?

I am using Eclipse 3.5 Galileo.

+6
java eclipse
source share
6 answers

This seems to help solve some of your problems:

http://eclipseone.wordpress.com/

In particular, this refers to the "Run Last" problem you described.

To disable plugins, you should be able to configure multiple Eclipse workspaces with different plug-in profiles. To enable / disable plugins, go to Settings> General> Startup and Shutdown and uncheck any plug-in that you don't need.

On Windows, you can even create separate Eclipse shortcut icons for each workspace by specifying the location of the workspace using the -data command-line -data :

 eclipse.exe -data <workspace path> 
+6
source share

you can use f11 to run / debug last

and for more shorcuts u can link to this http://www.allapplabs.com/eclipse/eclipse_shortcuts.htm

+3
source share

Go to the settings ( Menu Window - Prefereces ) Run/Debug - Launching ; There, in Launch Operation select Always launch the previolsly launched application .

+3
source share

Launch configurations

Typically, eclipse uses the last used launch configuration if you click on the Run action (toolbar) or press ALT + R - T - 1 . Using the context menu will start something based on the actual selection (which may be a java class).

Scenarios

You can refactor the script. Choose Refactoring> Create Script. I have never used it, so I do not know if it meets your actual needs.

Disable / Enable

Eclipse, because it is based on OSGi, will only run the packages that are really needed. Therefore, when you start an eclipse session and don’t need any Android classes, then the IDE plug-ins for Android will not start and will not use ressources resources (provided that they are implemented correctly ...). But you need to make sure that your android projects are closed, otherwise the builder will start and start loading classes;)

Eclipse introduced a new feature (new ... I think starting from 3.4, maybe even 3.3), where you can share plugins between different installations. Thus, you can install 2 versions of eclipse that use the same basic plugins, and only one has additional plugins for Android. I'm not sure, but I think this is a sign of support for providing p2.

+2
source share
  • To launch the last running application, the default key combination is Ctrl + F11. You can view / modify / create keyboard shortcuts by going to Settings> Keys.

  • Unfortunately, Eclipse does not have full built-in macro support. The closest replacement is code templates that are customizable and install template code for you. If you go to "Settings" and search for a template, you will get an idea of ​​what is available there.

    If you google for the Eclipse macro , you will see that there are some plugins with a conceptual concept, but nothing is completely focused out of it seems. If you feel very adventurous, you can write a plugin to do what you want, but I assume that this is not what you had in mind.

  • Versions of Eclipse prior to 3.5 have allowed you to disable plugins without removing them. Oddly enough, I can not find this option in 3.5. I wonder if he retired for some reason.

+1
source share

These are the shortcuts that I use most often:

  Shift + Strg + O : Organize imports Shift + Alt + R : Delete current element. Ctrl + D : Delete current/marked line. Ctrl + Space : Content assist. Ctrl + 1 : Context-sensitive proposals. Ctrl + 7 : (Un)comment current/marked line. Ctrl + M : Max./minimize current tab. Ctrl + J : Incrementel search. F3 : Jump to the declaration of the current element. * Define own shortcuts - Window/Preferences/General/Keys Alt + C : SVN Commit. Alt + U : SVN Update. Shift + Ctrl + N : "New Class" Dialog. * Templates - Window/Preferences/Java/Editor/Templates syso + Ctrl + Space : System.out.println(); main + Ctrl + Space : public static void main(String[] args) { } 
+1
source share

All Articles