Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Refactoring menu entry
Refactoring menu entry [message #260062] Fri, 08 May 2009 10:58 Go to next message
Eclipse UserFriend
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 03:38 Go to previous messageGo to next message
Eclipse UserFriend
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 10:47 Go to previous messageGo to next message
Eclipse UserFriend
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 10:51 Go to previous messageGo to next message
Eclipse UserFriend
.... 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 10:04 Go to previous message
Eclipse UserFriend
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 May 07 16:11:29 EDT 2025

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

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

Back to the top