Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Refactoring menu entry
Refactoring menu entry [message #260062] Fri, 08 May 2009 14:58 Go to next message
Stefan Sidler is currently offline Stefan SidlerFriend
Messages: 3
Registered: July 2009
Junior Member
Hi all

We are working on the cross-language refactoring.
In Groovy it is possible to mix up Groovy and Java classes.

When you use a Groovy element in Java, and try to start a
rename-refactoring from the java-editor the refactoring menu entry is not
shown (because java can't rename binary sources).

Our idea is now, make a new menu entry, which is just shown, if the binary
type implements the GroovyObject interface.

But how can i make a new menu entry in the refactoring section of the jdt?

And after this, it would be nice to have the same hotkey-shortcut to the
rename refactoring.
is it possible, to overwrite the shortcut? or how can i disable the
java-refactoring?


Thanks guys for your help!
Re: Refactoring menu entry [message #260081 is a reply to message #260062] Mon, 11 May 2009 07:38 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Stefan Sidler wrote:
> Hi all
>
> We are working on the cross-language refactoring.
> In Groovy it is possible to mix up Groovy and Java classes.
>
> When you use a Groovy element in Java, and try to start a
> rename-refactoring from the java-editor the refactoring menu entry is
> not shown (because java can't rename binary sources).
>
> Our idea is now, make a new menu entry, which is just shown, if the
> binary type implements the GroovyObject interface.
>
> But how can i make a new menu entry in the refactoring section of the
> jdt?
>
> And after this, it would be nice to have the same hotkey-shortcut to
> the rename refactoring.
> is it possible, to overwrite the shortcut? or how can i disable the
> java-refactoring?
It depends on whether you provide your own editor or not. If you use
your own editor then you can simply provide your own scope aka context
and register your new rename action but if you want to do this on top of
the existing Java editor then it might be very hard to disable the Java
rename.

Dani
>
>
> Thanks guys for your help!
>
>
>
Re: Refactoring menu entry [message #260127 is a reply to message #260062] Thu, 14 May 2009 14:47 Go to previous messageGo to next message
Stefan Sidler is currently offline Stefan SidlerFriend
Messages: 3
Registered: July 2009
Junior Member
Hi again

I found the insertion points for the menu.
but i still have a problem...

I can add a menu entry on the context menu.
(rightclick on the code in the jdt )
Re: Refactoring menu entry [message #260131 is a reply to message #260127] Thu, 14 May 2009 14:51 Go to previous messageGo to next message
Stefan Sidler is currently offline Stefan SidlerFriend
Messages: 3
Registered: July 2009
Junior Member
.... i postet a bit tooo fast :)

as i said, i have the entry in the context menu, in the java editor.
But not in the "Refactoring" sub-menu.

I tried a lot of different ways, but nothing realy worked.

Someone has an idea how to push the menu-entry in the submenu?


Thanks very much for your help

Regards
Stefan Sidler
Re: Refactoring menu entry [message #551175 is a reply to message #260131] Thu, 05 August 2010 14:04 Go to previous message
No real name is currently offline No real nameFriend
Messages: 3
Registered: August 2010
Junior Member
For everyone who wants to know more about the refactoring and how to put it into the refactor menu item:

http://www.eclipse.org/articles/article.php?file=Article-Unl eashing-the-Power-of-Refactoring/index.html

regards
Previous Topic:Error while exporting plugin project as eclipse product
Next Topic:need a good way for calculating composite's size with a text widget inside
Goto Forum:
  


Current Time: Wed Aug 14 18:23:54 GMT 2024

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

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

Back to the top