Mirko,
I'm not sure if I'm pointing you to the right spot, but if you take a look
at the JDT's ui plugin.xml they set up actions, menus and
actionSetPartAssociations for refactoring.
It looks like they define a CodingActionSet, throw in the refactoring stuff
inside there as actions linked to a menu, then in another extension they
associate the CodingActionSet with particular views. So here's snippets of
what I'm talking about, that we could use as a base. You can keep a lot
similar for the associations (rip out the PackageExplorer and replace with
Ruby Resources view id, Remove the TypeHierarchy, PackagesView and
ClassFileEditor, rename CompilationUnitEditor to RubyScriptEditor.).
<extension
point="org.eclipse.ui.actionSets">
<actionSet
label="%CodingActionSet.label"
description="%CodingActionSet.description"
visible="false"
id="org.eclipse.jdt.ui.CodingActionSet">
<!--
===========================================================================
-->
<!-- Refactoring
Menu -->
<!--
===========================================================================
-->
<menu
label="%Refactoring.menu.label"
path="edit"
id="org.eclipse.jdt.ui.refactoring.menu">
<separator name="undoRedoGroup"/>
<separator name="reorgGroup"/>
<separator name="codingGroup"/>
<separator name="reorgGroup2"/>
<separator name="typeGroup"/>
<separator name="codingGroup2"/>
<separator name="typeGroup2"/>
<separator name="scriptGroup"/>
</menu>
<!-- reorg group -->
<action
definitionId="org.eclipse.jdt.ui.edit.text.java.move.element"
label="%Refactoring.moveAction.label"
retarget="true"
menubarPath="org.eclipse.jdt.ui.refactoring.menu/reorgGroup"
id="org.eclipse.jdt.ui.actions.Move">
</action>
<action
definitionId="
org.eclipse.jdt.ui.edit.text.java.rename.element"
label="%Refactoring.renameAction.label"
retarget="true"
menubarPath="org.eclipse.jdt.ui.refactoring.menu/reorgGroup"
id="org.eclipse.jdt.ui.actions.Rename">
</action>
</actionSet>
</extension>
<extension
point="org.eclipse.ui.actionSetPartAssociations">
<actionSetPartAssociation
targetID="org.eclipse.jdt.ui.CodingActionSet">
<part
id="org.eclipse.jdt.ui.PackageExplorer">
</part>
<part
id="org.eclipse.jdt.ui.TypeHierarchy">
</part>
<part
id="org.eclipse.jdt.ui.CompilationUnitEditor">
</part>
<part
id="org.eclipse.jdt.ui.ClassFileEditor">
</part>
<part
id="org.eclipse.jdt.ui.ProjectsView">
</part>
<part
id="org.eclipse.jdt.ui.PackagesView">
</part>
<part
id="org.eclipse.jdt.ui.TypesView">
</part>
<part
id="org.eclipse.jdt.ui.MembersView">
</part>
</actionSetPartAssociation>
</extension>
Thanks,
Chris
On 4/25/07, Mirko Stocker <[EMAIL PROTECTED]> wrote:
Hi!
I'd like to replace the current 'rename' action in the context menu of the
ruby resources view with my own, which will invoke a refactoring and
replaces
not just the file name but also updates the require statements. Something
like the JDT has.. I've figured out how to do the file renaming in a
refactoring but I'm stuck on the context menu (and F2 shortcut).
Can someone help me with that?
Thanks
Mirko
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Rubyeclipse-development mailing list
Rubyeclipse-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rubyeclipse-development
--
http://cwilliams.textdriven.com
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Rubyeclipse-development mailing list
Rubyeclipse-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rubyeclipse-development