Skip to main content


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 WirpiFriend
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 pasha is currently offline Sabir pashaFriend
Messages: 70
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 WirpiFriend
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 pasha is currently offline Sabir pashaFriend
Messages: 70
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 messageGo to next message
Olli Wirpi is currently offline Olli WirpiFriend
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 392 times)

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

Report message to a moderator

Re: Invoking the "run" button command in plugin [message #1847822 is a reply to message #793637] Tue, 09 November 2021 11:27 Go to previous message
Gokilavani sivanantham is currently offline Gokilavani sivananthamFriend
Messages: 1
Registered: November 2021
Junior Member
Hi Olli and team,

I'm new to eclipse and text-based programming. I'm trying to achieve the similar behavior which you have implemented. I want to invoke the run button in my eclipse plugin and in my case it's fine if it works only for java applications.

Based on your post (So far, I've been running only Java applications automatically), I understand that you know how to invoke the run button in the eclipse plugin to run a java application. Could you please help me by sharing your knowledge with a sample code?

Your help will save a lot of time for me. Thanks in advance.

Thanks,
Vani
Previous Topic:Maven Dependency classes are not resolved in runtime eclipse during plugin development
Next Topic:Creating a plugin for Eclipse 4
Goto Forum:
  


Current Time: Wed Apr 24 22:17:36 GMT 2024

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

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

Back to the top