Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 42340 - run would be useful in the context menu of classes (if it has a static main)
Summary: run would be useful in the context menu of classes (if it has a static main)
Status: RESOLVED DUPLICATE of bug 18338
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.0   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 42339 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-09-01 09:44 EDT by Robert Varga CLA
Modified: 2003-09-27 15:07 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Varga CLA 2003-09-01 09:44:57 EDT
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).
Comment 1 Dirk Baeumer CLA 2003-09-01 10:44:46 EDT
*** Bug 42339 has been marked as a duplicate of this bug. ***
Comment 2 Darin Wright CLA 2003-09-02 09:18:00 EDT
Is this a duplicate of 18338 (I'm not sure I quite understand the request)?
Comment 3 Robert Varga CLA 2003-09-02 09:46:36 EDT
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.




Comment 4 Darin Wright CLA 2003-09-02 09:51:51 EDT
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.
Comment 5 Robert Varga CLA 2003-09-02 10:06:41 EDT
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.
Comment 6 Jared Burns CLA 2003-09-27 15:07:48 EDT
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 ***