Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » override methods
override methods [message #290416] Thu, 25 August 2005 10:47 Go to next message
Eclipse UserFriend
Originally posted by: ilnen.altervista.org

i need to change "override\implement methods" in "sorce" java editor menu.
wich class i need to manipulate? help me please!
tnx
Re: override methods [message #290421 is a reply to message #290416] Thu, 25 August 2005 12:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: automatic.javalobby.org

It's actually not that difficult to find this out for yourself. Here's how:

1) Import all the Eclipse plugins as source (from the PluginDevelopment menu). Or at least, all of the ones that you think are usable. In this case, you'd want all the .jdt.* ones. (I create a separate workspace for just the Eclipse plugins, so that my development isn't hindered with a set of unnecessary plugins)

2) Search for the menu/string/title name in files ending in *.properties. In this case, Override/Implement methods comes up in org.eclipse.jdt.ui, which probably isn't surprising.

3) Take the key in that file (in this case, it's ActionDefinition.overrideMethods.name) and search for that in Java files. Sometimes you need to be a bit canny, and in this case, I'd just search for overrideMethods (case-sensitive). If that doesn't work, try again with plugin.xml.

In this case, it results in:

<command
name="%ActionDefinition.overrideMethods.name"
description="%ActionDefinition.overrideMethods.description"
categoryId="org.eclipse.jdt.ui.category.source"
id="org.eclipse.jdt.ui.edit.text.java.override.methods">
</command>
[/xml]

3) Now repeat; in this case, looking for the id org.eclipse.jdt.ui.edit.text.java.override.methods


<action
definitionId="org.eclipse.jdt.ui.edit.text.java.override.methods "
label="%OverrideMethodsAction.label"
retarget="true"
menubarPath="org.eclipse.jdt.ui.source.menu/generateGroup"
id="org.eclipse.jdt.ui.actions.OverrideMethods">
</action>
[/xml]

4) Repeat again with org.eclipse.jdt.ui.actions.OverrideMethods

5) You're now at JdtActionConstants#OVERRIDE_METHODS. You can do a workspace search on this field which takes you to:

6)
actionBar.setGlobalActionHandler(JdtActionConstants.OVERRIDE_METHODS, fOverrideMethods);


The fOverrideMethods turns out to be a declared type of
private OverrideMethodsAction fOverrideMethods;
, and lo and behold it is initialised with
fOverrideMethods= new OverrideMethodsAction(editor);
.


You've now assembled all the pieces together that it's called
org.eclipse.jdt.ui.actions.OverrideMethodsAction
.

To be honest, I can't see what you'd want to change in there, but that's how you find where functionality X is defined in Eclipse ...

Alex.
Re: override methods [message #290425 is a reply to message #290421] Thu, 25 August 2005 12:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ilnen.altervista.org

tnx a lot.
i'll try.
Re: override methods [message #290529 is a reply to message #290421] Fri, 26 August 2005 06:27 Go to previous message
Eclipse UserFriend
Originally posted by: ilnen.altervista.org

In answer to your question...i need to add some feature to the dialog that
override\implements methods. it must add some comment to any implemented
method and to any group of methods
Previous Topic:tagetID
Next Topic:Keybindings for editors within MultiPageEditorPart
Goto Forum:
  


Current Time: Thu Apr 25 14:30:16 GMT 2024

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

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

Back to the top