Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a new button to Eclipse IDE

Tags:

eclipse

We are using Eclipse IDE for Embedded C development.

I would like to add a new button to the Eclipse IDE, on click of which another EXE has to be called. Kindly let me know the feasibility!

like image 509
Arun Avatar asked Jan 22 '10 06:01

Arun


2 Answers

You can write a eclipse plugin written in java and place this into your eclipse-plugin directory. In the plugin MANIFEST you can implement an extension point for view actions.

After this, you will see a button in any view you want.

Short overview:

  • Create a plug-in project
  • Open MANIFEST.MF
  • Add dependencie to org.eclipse.ui
  • Add extension point "org.eclipse.ui.viewActions"
  • Add view Contribution (The view ID where the aci0on is shown)
  • Add Action class

In the Action class you can open a Runtime command window and execute your *.exe file

Than you can export the plug-in project. Select it and call Export, than deployable plug-ins and fragments.

The exported plugin you have to place in your eclipse-plugin directory.

Restart eclipse and you will see the action in your eclipse view, you have specified.

like image 92
Markus Lausberg Avatar answered Oct 28 '22 14:10

Markus Lausberg


You can add an external tool: next to the run button it is a button called external tools, where you can define commands (e.g. exe files) to launch with the selected parameters.

like image 24
Zoltán Ujhelyi Avatar answered Oct 28 '22 12:10

Zoltán Ujhelyi