Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 343751

Summary: 'Run on Server' launch shortcut shows up everywhere
Product: [WebTools] WTP ServerTools Reporter: Michael Rennie <Michael_Rennie>
Component: wst.serverAssignee: Angel Vera <arvera>
Status: NEW --- QA Contact: Angel Vera <arvera>
Severity: normal    
Priority: P2 CC: eclipse.dserodio, kaloyan, psrna, shr31223, silviya, stephan.herrmann, wst.server-inbox
Version: unspecified   
Target Milestone: Future   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 338576    
Bug Blocks:    
Attachments:
Description Flags
proposed fix
none
update
none
v2.0 none

Description Michael Rennie CLA 2011-04-25 13:09:00 EDT
Created attachment 194002 [details]
proposed fix

Steps:

1. install latest JSDT feature.
2. start new workspace (or an existing one)
3. open a Java class or Ant build file
4. Right-click > Run As >
5. notice the 'Run on Server' launch shortcut is there even though it does not apply.

The cause is because the server tools bundles are not loaded and the launch shortcut enablment code defaults to 'true' in this case - showing the launch shortcut.

You should probably start using the newly available variables to prevent the launch shortcut from showing up when the bundle is not loaded. See bug 338576 for more information.
Comment 1 Michael Rennie CLA 2011-04-25 13:11:09 EDT
Created attachment 194003 [details]
update

or...you could consider the patch that does *not* have a copy/paste error in it
Comment 2 Michael Rennie CLA 2011-04-25 14:19:06 EDT
erm, I meant to reference bug 343751.
Comment 3 Angel Vera CLA 2011-05-18 14:10:40 EDT
The fix seems a little pessimistic. After the patch I can't see the Run On Server in some of the typical places, like:
- Top level of WebProject
- Selecting Servlet inside a WebProject (from any perspective)
Comment 4 Angel Vera CLA 2011-05-18 14:13:25 EDT
is there a better suggestion?
Comment 5 Angel Vera CLA 2011-05-18 14:35:42 EDT
Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. 
If we don't do this changes the 'Run On Server' action will show for a lot of invalid cases

Is there a work-around? If so, why do you believe the work-around is insufficient? 
No

How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? 
Manual testing using java projects, and Web projects.

Give a brief technical overview. Who has reviewed this fix? 
Elson

What is the risk associated with this fix? 
Low
Comment 6 Angel Vera CLA 2011-05-18 15:48:52 EDT
Created attachment 196044 [details]
v2.0

We could do a force activation, but thinking about it might be better for us to understand what is the better behaviour here. 

A- If loading the plugins .ui and all of its extensions through the property tester loading the modules(which requires modules factories), OR

B- showing the RoS and then defaulting to unavailable for the the resource.

I rather give it a little more thinking and hold on to next week, since if this was broken from 324, and no one has complaint so far.
Comment 7 Angel Vera CLA 2011-06-08 10:20:33 EDT
Moving out of 3.3 as we are almost done with it. Marking for future until we
have a more accurate time when we can work on this.
Comment 8 Daniel Serodio CLA 2012-09-21 10:40:38 EDT
Dupe of bug 337703 ?
Comment 9 Kaloyan Raev CLA 2015-01-20 13:29:13 EST
(In reply to Angel Vera from comment #6)
> I rather give it a little more thinking and hold on to next week, since if
> this was broken from 324, and no one has complaint so far.

Just for the record - one more complain about this. It is really annoying and confusing to user to see this action in places it is not expected.
Comment 10 Gorkem Ercan CLA 2015-02-09 11:41:18 EST
*** Bug 457124 has been marked as a duplicate of this bug. ***
Comment 11 Sylvia Tancheva CLA 2016-03-12 07:44:18 EST
This is here forever, any news on this bug?
It might not be critical, but still seeing it for 5 years is somewhat annoying.
Comment 12 Stephan Herrmann CLA 2016-12-11 07:10:09 EST
Another aspect of showing up too much: unlike other launch configuration types, "Run on Server" cannot be disabled in the preferences at 
  Run/Debug > Launching > Launch Configurations 
    > Filter checked launch configuration types

In terms of good Eclipse citizenship, *every* launch configuration type should support filtering.

I ran into this when I installed some WTP components only for their editing support, I never intend to run any servers inside the IDE. I had to deinstall Eclipse Web Developer Tools in order to get rid of the undesired option under "Run as...", but there should be a less drastic way to achieve this.

Cc:ing the project inbox, because I see the assignee Angel Vera under "Historical Committers".