Community
Participate
Working Groups
I don't really know, whether this is still unimplemented, or already is, but as I saw in 2.1.1, there is no menu item in the context menu coming up with right click on a Java class to 'Run as Java application'. It would be quite useful, in my opinion. If it does not have a Run configuration assigned to it, it should give the possibilities to choose from an existing one (cloning one for it, with the right-clicked class, as main class), or run with no additional options, or create a new one from scratch (like as Run ... / New button).
*** Bug 42339 has been marked as a duplicate of this bug. ***
Is this a duplicate of 18338 (I'm not sure I quite understand the request)?
No, this has nothing to do with 18838. I try to explain it in more detail. When I right click on a Java class in the Package Explorer, or the Types pane of the Java Browsing perspective, a context menu comes up. Let's assume I clicked a class, which has a static void main(String[] args) method. In this case, the context menu should contain the following menu items: If a Run configuration already exists for the class: - Run : This runs the class with the existing Run configuration. - Run...: This brings up the Run configuration dialog, with the existing Run configuration selected. If a Run configuration does not exist for the class: - Run : This runs the class without any command line parameters or VM parameters. - Run...: This brings up the Run configuration dialog, with a newly created Run configuration for the class. - Run like> : A submenu containing existing Run configurations, the selected one gets cloned for this class, and the Run configuration dialog comes up with it selected. This is a feature request which would enhance the experience using Eclipse. The above described menu items are the intuitive way of carrying out the functionality described below: The current fastest way for running without any parameters is: left click on class, press the downward arrow on Running men icon, press Run as> , press Java application. This creates a Run configuration as well, although this is mostly not really useful except for that the Run history keeps track of Run configurations. This would be replaced with right click on class, and selecting Run. The current fastest way for creating a new Run configuration without actually running is: left click on class, press the downward arrow on Running men icon, press 'Run...', and press New button in the upcoming dialog. This would be replaced by right-click on the class, and selecting 'Run...'. The current fastest way for duplicating an existing Runtime configuration for the actually selected class is: press the downward arrow on Running men icon, press Run..., right click on the to-be-duplicated Run configuration and press select the Duplicate menu item, and change the main class name. This would be replaced by right-click on the class, select 'Run like >', and select the to-be- duplicated Run configuration.
I believe this feature request overlaps with bug 18338 - which requests a "run" action in the context menu. The two need to be considered together. To be considered with 18338.
I agree, it really has some common things. Also the additional comments also contain yet another good feature request, that the context menu coming up in the editor after right-click should also contain these menu items. I am also for this extension as well.
Added Robert's suggestions to Bug 18338, with a slant toward putting this support in the debug platform instead of only JDT. *** This bug has been marked as a duplicate of 18338 ***