Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Overriding standard commands (eclipse plugin which overrides buildproject command)
Overriding standard commands [message #1736467] Wed, 29 June 2016 14:51 Go to next message
Karthika Nair is currently offline Karthika NairFriend
Messages: 3
Registered: June 2016
Junior Member
Hello there.

I'm writing a plugin for eclipse wherein I would like to override the existing Build Project command and replace it with my own handler. To increase the priority of my handler over the default handler for the run command, I've used the activewhen restriction like so:

               <with variable="activePartId">
         <equals value="%%myActiveViewId"/>

I've used Alt+Shift+F1,( the spy) to verify that my view is active while using the command.

This is where the command has been declared:

            name="Build Project">

I've also extended org.eclipse.ui.startup to write a startup class to keep lazy loading at bay.
However, on execution, the default handler is still the one that is being executed. What am I doing wrong?
I've been trying to override the run command too,using the same template. However, that attempt also has been futile.(probably due to the same mistake I've made there).

Can this source be trusted? Is that still the case?
Re: Overriding standard commands [message #1741015 is a reply to message #1736467] Mon, 22 August 2016 11:32 Go to previous message
Mickael Istria - away until August 14th is currently offline Mickael Istria - away until August 14thFriend
Messages: 832
Registered: July 2009
Location: Grenoble, France
Senior Member

Choosing the right handler is the responsibility of the Platform and there isn't a way to enforce a handler over another in case of multiple ones active at the same time. However, you can contribute builders or listeners to the necessary projects if you want to add steps in the build phase.
The SO question has no answer, so there is nothing to trust in it.
Previous Topic:Cannot run Eclipse
Next Topic:Opening .java files
Goto Forum:

Current Time: Sun Sep 23 04:05:52 GMT 2018

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

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

Back to the top