Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » which plugins implement Open Declaration?
which plugins implement Open Declaration? [message #114715] Fri, 22 August 2003 11:40 Go to next message
Eclipse UserFriend
Originally posted by: xing.cs.ualberta.ca

hi,

when you press F3, the declaration of java element will be opened. which
plugins implement that?

thanks
zhenchang
Re: which plugins implement Open Declaration? [message #114731 is a reply to message #114715] Fri, 22 August 2003 11:53 Go to previous messageGo to next message
Eclipse UserFriend
> hi,
>
> when you press F3, the declaration of java element will be opened. which
> plugins implement that?

Check org.eclipse.jdt.ui (Stuff like actions, dialogs, editors is mostly
there ;)

Ok Ok here is the correct class and hey I give you a quick snippet;)

public class OpenDeclaringTypeAction extends OpenStackFrameAction {

protected String getTypeNameToOpen(IDebugElement frame)
throws DebugException {
return ((IJavaStackFrame)frame).getDeclaringTypeName();
}

protected void doAction(Object e) throws DebugException {
Object sourceElement= getSourceElement(e);
if (sourceElement != null) {
openInEditor(sourceElement);
}
}
}


;-)

Martin (Kersten)

PS: Just a tipp. Create a new Workspace, add all plugin sources of eclipse
to it and then use open type option to look for it. (remember the use of
'*').
The classes are named well (I looked at Preferences->Keys found
'Open Declaration' and just looked for it ;).
Re: which plugins implement Open Declaration? [message #114781 is a reply to message #114731] Fri, 22 August 2003 12:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: xing.cs.ualberta.ca

Martin Kersten wrote:

> > hi,
> >
> > when you press F3, the declaration of java element will be opened. which
> > plugins implement that?

> Check org.eclipse.jdt.ui (Stuff like actions, dialogs, editors is mostly
> there ;)

> Ok Ok here is the correct class and hey I give you a quick snippet;)

> public class OpenDeclaringTypeAction extends OpenStackFrameAction {

> protected String getTypeNameToOpen(IDebugElement frame)
> throws DebugException {
> return ((IJavaStackFrame)frame).getDeclaringTypeName();
> }

> protected void doAction(Object e) throws DebugException {
> Object sourceElement= getSourceElement(e);
> if (sourceElement != null) {
> openInEditor(sourceElement);
> }
> }
> }


> ;-)

> Martin (Kersten)

> PS: Just a tipp. Create a new Workspace, add all plugin sources of eclipse
> to it and then use open type option to look for it. (remember the use of
> '*').
> The classes are named well (I looked at Preferences->Keys found
> 'Open Declaration' and just looked for it ;).

that's actually great. thanks so much.
BTW, how to create a new workspace? [message #114831 is a reply to message #114731] Fri, 22 August 2003 12:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: xing.cs.ualberta.ca

Martin Kersten wrote:

> > hi,
> >
> > when you press F3, the declaration of java element will be opened. which
> > plugins implement that?

> Check org.eclipse.jdt.ui (Stuff like actions, dialogs, editors is mostly
> there ;)

> Ok Ok here is the correct class and hey I give you a quick snippet;)

> public class OpenDeclaringTypeAction extends OpenStackFrameAction {

> protected String getTypeNameToOpen(IDebugElement frame)
> throws DebugException {
> return ((IJavaStackFrame)frame).getDeclaringTypeName();
> }

> protected void doAction(Object e) throws DebugException {
> Object sourceElement= getSourceElement(e);
> if (sourceElement != null) {
> openInEditor(sourceElement);
> }
> }
> }


> ;-)

> Martin (Kersten)

> PS: Just a tipp. Create a new Workspace, add all plugin sources of eclipse

BTW, how to create a new Workspace? ;)

> to it and then use open type option to look for it. (remember the use of
> '*').
> The classes are named well (I looked at Preferences->Keys found
> 'Open Declaration' and just looked for it ;).
Re: BTW, how to create a new workspace? [message #115061 is a reply to message #114831] Fri, 22 August 2003 15:36 Go to previous message
Eclipse UserFriend
> > PS: Just a tipp. Create a new Workspace, add all plugin sources of
eclipse
>
> BTW, how to create a new Workspace? ;)

You can specify the directory of you workspace when you start eclipse.
Add -data directory as commandline option.

Win2k:

C:\eclipse\eclipse.exe -mx256m -ms64m -data c:/eclipse/workspace-XXX

I have a link for every workspace so I can choose em easily. You can run
as many workspaces as you like. But I advice to copy an existing
workspace and use the copy as new one. So you can get all the settings
of the old to be used by the new one ;)


Martin (Kersten)
Previous Topic:DefaultUndoManager undoable()
Next Topic:how to parse .java source file programmatically
Goto Forum:
  


Current Time: Fri Apr 25 20:19:50 EDT 2025

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

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

Back to the top