Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to disable JDT's RunAs launch shortcut?
How to disable JDT's RunAs launch shortcut? [message #676758] Mon, 06 June 2011 12:39 Go to next message
Sven  is currently offline Sven Friend
Messages: 11
Registered: July 2009
Junior Member
I'm developing an eclipse plugin for LeJOS (Java for the Lego NXT brick). Currently, a leJOS project has both a leJOS nature and a JDT nature, where the leJOS nature is the first (primary) nature. I also implemented my own launch shortcut. However, when clicking the green play button, Eclipse makes me chose between "Run as Java Application" and "Run as LeJOS NXT Program" (the latter is my own launch shortcut). This is quite annoying for a user.

So is there any way to disable the JDT launch shortcut?

Note, that it doesn't make any sense to run Java code written for the Lego NXT with let's say Sun's JVM. Actually, there nothing comparable to a full fledged JVM. That's why we have our own launch shortcut, launch configuration delegate, etc. and it would make sense to disable JDT's launch shortcut.
(no subject) [message #676775 is a reply to message #676758] Mon, 06 June 2011 13:41 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3801
Registered: July 2009
Senior Member
On 06.06.2011 14:39, Sven wrote:
> I'm developing an eclipse plugin for LeJOS (Java for the Lego NXT
> brick). Currently, a leJOS project has both a leJOS nature and a JDT
> nature, where the leJOS nature is the first (primary) nature. I also
> implemented my own launch shortcut. However, when clicking the green
> play button, Eclipse makes me chose between "Run as Java Application"
> and "Run as LeJOS NXT Program" (the latter is my own launch shortcut).
> This is quite annoying for a user.
>
> So is there any way to disable the JDT launch shortcut?
>
> Note, that it doesn't make any sense to run Java code written for the
> Lego NXT with let's say Sun's JVM. Actually, there nothing comparable
> to a full fledged JVM. That's why we have our own launch shortcut,
> launch configuration delegate, etc. and it would make sense to disable
> JDT's launch shortcut.
Did you try to specify your launcher on the Run/Debug > Launching >
Default Launchers preference page?

Dani
Re: (no subject) [message #676785 is a reply to message #676775] Mon, 06 June 2011 14:20 Go to previous messageGo to next message
Sven  is currently offline Sven Friend
Messages: 11
Registered: July 2009
Junior Member
Dani Megert wrote on Mon, 06 June 2011 09:41
Did you try to specify your launcher on the Run/Debug > Launching >
Default Launchers preference page?


On the preferences page, Eclipse shows neither the JDT Java Application launcher nor my own leJOS launcher. It shows a bunch of JUnit launchers, which enabled me to chose between the Android JUnit launchers and Eclipse JUnit launchers. So it seems to be possible

Looking at the plugin.xml of the Android plugin leaves me clueless. I also took a look at the list of available extension points. Still clueless Sad

Can you give me hint, on how to make my launcher appear in that list (along with the ones by the JDT)?

(I can't expect you to look at it, but just in case you want to look at my current plugin.xml, click here)

[Updated on: Mon, 06 June 2011 14:25]

Report message to a moderator

Re: (no subject) [message #676805 is a reply to message #676785] Mon, 06 June 2011 15:13 Go to previous messageGo to next message
Sven  is currently offline Sven Friend
Messages: 11
Registered: July 2009
Junior Member
Update: meanwhile, I created a org.eclipse.debug.core.launchDelegates extension points with type org.eclipse.jdt.launching.localJavaApplication. Then, my launcher shows up, and Eclipse let me set the default launcher.

However, suddenly I can start normal Java application with the leJOS launcher, new launch configurations that are created appear under the "Java Application" launch configuration type, and are not using my own configuration type anymore. I don't see any possibility, to override the launch configuration type in the launch configuration delegate. The shortcut does create launch configuration with the correct type. I'm not sure, what is going on.
Re: (no subject) [message #676811 is a reply to message #676805] Mon, 06 June 2011 15:31 Go to previous message
Sven  is currently offline Sven Friend
Messages: 11
Registered: July 2009
Junior Member
Update 2: my original complaint, that the green play buttons shows the menu every time has gone. Eclipse let's me chose once, and then reuses the created launch configurations. That's a good thing. I'm not sure anymore, what caused the trouble in the first place.

But I'm still trying to find out, how to make "Run as LeJOS Program" the default choice over "Run as Java Application".
Previous Topic:Debug doesn't hit breakpoint
Next Topic:Exporting java runnable jar file problem
Goto Forum:
  


Current Time: Mon Dec 22 06:19:42 GMT 2014

Powered by FUDForum. Page generated in 0.02127 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software