[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tools-dev] Need help for Plugin (beginner)

Title: Nachricht
Hey all,
i hope i'm in the right newsgroup.
 
I want to develop my first plugin. I have read a lot about developing plugins for eclipse, but cannot find anything to this problem:
 
Extension Point:

<extensionpoint="org.eclipse.ui.popupMenus">
<objectContributionobjectClass="org.eclipse.jdt.core.ICompilationUnit"
nameFilter=
"*.java"
id="de.hauschel.jbf.generatorl"
>
<action label="Fredy&apos;s VO Generator"
icon="icons/ctool16/openbrwsr.gif"
helpContextId=
"org.eclipse.ui.examples.readmetool.open_browser_action_context"
class=
"de.hauschel.jbf.generator.Test"
menubarPath=
"additions"
enablesFor=
"1"
id="de.hauschel.jbf.generator.actionid1"
>
</action>
</objectContribution>
...

public class Test implements IObjectActionDelegate {
private
IWorkbenchPart part;

public
void run(IAction action)
{
    MessageDialog.openInformation(
    this
.part.getSite().getShell(),
    "PlugIn Plug-in"
,
    "Fredys New Action was executed. "
);
}

How can i get the IFile Instance that calls this Action ?
 

Thanks Fredy