Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Invoking the "run" button command in plugin
Invoking the "run" button command in plugin [message #793637] Wed, 08 February 2012 11:28 Go to next message
Olli Wirpi is currently offline Olli Wirpi
Messages: 3
Registered: October 2011
Junior Member
Is there any way to invoke the "Run" button command in Eclipse plugin? I want to run automatically the selected project in my plugin. The basic idea is to run the selected project if it has saved run configuration, or open the "Run as" dialog if no configuration exist.

So far, I've been running only Java applications automatically, but now I want to extend the plugin to launch also different types of applications in Eclipse.
Re: Invoking the "run" button command in plugin [message #800536 is a reply to message #793637] Fri, 17 February 2012 07:35 Go to previous messageGo to next message
Sabir Mising name is currently offline Sabir Mising name
Messages: 68
Registered: February 2010
Member
You can use extension in eclipse called LaunchConfiguration through which u can implement a LaunchConfiguration delegate which can have your own configured properties for the properties , this launch configuration delegate called be instantiated by adding it in the cool bar of eclipse IDE or even you can call the LaunchConfiguration delegate object programatically
Let me know if I am not clear
Re: Invoking the "run" button command in plugin [message #802773 is a reply to message #800536] Mon, 20 February 2012 12:26 Go to previous messageGo to next message
Olli Wirpi is currently offline Olli Wirpi
Messages: 3
Registered: October 2011
Junior Member
Thank you for the answer.

So I can't just implement the same functionality that the Eclipse default toolbar provides? For me, it seems that the green "run" button is able to suggest to the user a launch configuration according to the Eclipse project information (eg. project nature) and run the project/class with that configuration.
Re: Invoking the "run" button command in plugin [message #825824 is a reply to message #802773] Wed, 21 March 2012 09:57 Go to previous messageGo to next message
Sabir Mising name is currently offline Sabir Mising name
Messages: 68
Registered: February 2010
Member
Hi Olli
sorry for a very late reply ,
Eclipse can actually provide specified launch configuration under RUN , but did you by any chance mean that it should automatically understand which type of project it is and launch ?? But anyways i thing is confirmed and is easy to do ie., to create your own launch configuration
Re: Invoking the "run" button command in plugin [message #841372 is a reply to message #825824] Wed, 11 April 2012 08:11 Go to previous message
Olli Wirpi is currently offline Olli Wirpi
Messages: 3
Registered: October 2011
Junior Member
I'm sorry for the late reply also.

I mean a situation where, for instance, I have imported an Android project to Eclipse and click Run button in toolbar. Because (I guess so), the project is new in the workspace, Eclipse does not know its launch configuration. However, Eclipse can suggest me to launch it as "Android application" or "Java application". The same happens with Java applications and applets, MIDP application etc.

I don't know what this feature is called, but I'd like to have it also in my plugin, which imports projects with different natures to workspace and tries to run them. Instead of creating launch configurations for each project is there way to provide launch configuration suggestions automatically to the user when launching an application?

Please see the picture attached to see what I mean
  • Attachment: example.png
    (Size: 19.43KB, Downloaded 121 times)

[Updated on: Wed, 11 April 2012 08:12]

Report message to a moderator

Previous Topic:Taking into account a new version of a plugin
Next Topic:Target definition import fails
Goto Forum:
  


Current Time: Tue Oct 21 13:36:35 GMT 2014

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

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