Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Viewer Contribution(Add new refactoring to Compilation Unit Context Editor)
icon8.gif  Viewer Contribution [message #553858] Thu, 19 August 2010 08:29 Go to next message
_IvI_ is currently offline _IvI_Friend
Messages: 3
Registered: August 2010
Location: Spain
Junior Member

Hi, i am adding my new refactoring (Inline Class) to Eclipse and i can`t add it to the java editor context in the refactor menu. why???
I have added it to main manu bar and to explorer package context without problems.

This is the viewer contribution (file plugin.xml):

<viewerContribution
            id="es.uva.infor.pfc.eclipse.inlineclass.ui.editor"
            targetID="org.eclipse.jdt.ui.CompilationUnitEditor.EditorContext">
          <menu
               id="org.eclipse.jdt.ui.refactoring.menu"
               label="Refactor" 
               path="group.reorganize"> 
            <separator
                  name="fowler">
            </separator>
	    </menu> 
	    <menu
               id="FowlerCatalogue"
               label="Fowler Catalogue"
               path="org.eclipse.jdt.ui.refactoring.menu/fowler">
            <separator
                  name="inlineclass">
            </separator>
	    </menu> 
         <action
              class="es.uva.infor.pfc.eclipse.inlineclass.ui.actions.javaeditor.InlineClassEditorAction"
               definitionId="es.uva.infor.pfc.eclipse.inlineclass.ui.action.InlineClassAction"
               id="es.uva.infor.pfc.eclipse.inlineclass.ui.action.editor.InlineClass"
               label="Inline Class..."
               menubarPath="org.eclipse.jdt.ui.refactoring.menu/FowlerCatalogue/inlineclass">
      </action>
    </viewerContribution>

My refactoring is not shown in the java editor context, but if i use "path=additions" it works perfectly, but i want that my refactoring appears in the Refactor menu (Refactor->Fowler Catalogue->Inline Class...).
Help please.

[Updated on: Thu, 19 August 2010 09:15]

Report message to a moderator

Re: Viewer Contribution [message #553911 is a reply to message #553858] Thu, 19 August 2010 11:50 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Iv wrote:
> <menu
> id="org.eclipse.jdt.ui.refactoring.menu"
> label="Refactor" path="group.reorganize">
> <separator
> name="fowler">
> </separator>
> </menu>

you probably don't want to re-define the Refactor menu.

<menu
> id="FowlerCatalogue"
> label="Fowler Catalogue"
> path="org.eclipse.jdt.ui.refactoring.menu/fowler">

Update your path to work against something that already exists in the
Refactor menu.

Any reason you're adding another submenu instead of just a group of actions?

Later,
PW



--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: Viewer Contribution [message #553922 is a reply to message #553858] Thu, 19 August 2010 12:33 Go to previous messageGo to next message
_IvI_ is currently offline _IvI_Friend
Messages: 3
Registered: August 2010
Location: Spain
Junior Member

Thanks but I need a submenu to have more localized potential refactorings of Fowler Catalogue that may be appearing in the future.

I still can not make it work. In the way you say to me doesn't work.

It is possible to do it???

I only get problems adding this refactoring (throw a viewer contribution) to the Java Editor Context.

[Updated on: Thu, 19 August 2010 12:37]

Report message to a moderator

Re: Viewer Contribution [message #559502 is a reply to message #553858] Thu, 16 September 2010 21:19 Go to previous messageGo to next message
kcassell2001 is currently offline kcassell2001Friend
Messages: 18
Registered: May 2010
Junior Member
Will you be making your plug-in publicly available? It would certainly be useful for me.

Cheers,
Keith
Re: Viewer Contribution [message #559570 is a reply to message #559502] Fri, 17 September 2010 08:59 Go to previous messageGo to next message
_IvI_ is currently offline _IvI_Friend
Messages: 3
Registered: August 2010
Location: Spain
Junior Member

yes, in a few days I'll tell you where to find it
Re: Viewer Contribution [message #706063 is a reply to message #559570] Sat, 30 July 2011 20:24 Go to previous message
kcassell2001 is currently offline kcassell2001Friend
Messages: 18
Registered: May 2010
Junior Member
Any update on where we might find Inline Class?
Previous Topic:?? Could not publish to server (Glassfish) Helios
Next Topic:FIELD_ACCESS in org.eclipse.jdt.core.dom.FieldAccess *Strange behaviour
Goto Forum:
  


Current Time: Fri Mar 29 06:34:13 GMT 2024

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

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

Back to the top