Open Editor for IProgramElement [message #47272] |
Tue, 01 February 2005 12:20  |
Eclipse User |
|
|
|
Hi,
how do I tell Eclipse/Ajdt to open an Editor and jump to the Position of
a given IProgramElement.
Using the code below, i get a "not implemented" errormessage.
IProgramElement elem = ...;
Ajde.getDefault().getEditorAdapter().showSourceLine(elem.get SourceLocation(),
true);
Greets,
Juergen
|
|
|
Re: Open Editor for IProgramElement [message #47425 is a reply to message #47272] |
Fri, 04 February 2005 05:31  |
Eclipse User |
|
|
|
Originally posted by: mchapman.uk.ibm.com
On Tue, 01 Feb 2005 18:20:22 +0100, Juergen Graf wrote:
> how do I tell Eclipse/Ajdt to open an Editor and jump to the Position of
> a given IProgramElement.
>
> Using the code below, i get a "not implemented" errormessage.
>
> IProgramElement elem = ...;
> Ajde.getDefault().getEditorAdapter().showSourceLine(elem.get SourceLocation(),
> true);
Hi,
This is really a question for the ajdt-dev list, but one route is to
convert the IProgramElement into an Eclipse object, such as a IJavaElement
or IResource, then you can use the standard Eclipse API calls for opening
an editor and jumping to a location. For some examples, see JDTUtils in
the visualiser code, and AJModel.getCorrespondingJavaElement() in
ajdt.core.
Regards,
Matt.
--
Matt Chapman
AJDT Development, http://www.eclipse.org/ajdt
|
|
|
Re: Open Editor for IProgramElement [message #586432 is a reply to message #47272] |
Fri, 04 February 2005 05:31  |
Eclipse User |
|
|
|
On Tue, 01 Feb 2005 18:20:22 +0100, Juergen Graf wrote:
> how do I tell Eclipse/Ajdt to open an Editor and jump to the Position of
> a given IProgramElement.
>
> Using the code below, i get a "not implemented" errormessage.
>
> IProgramElement elem = ...;
> Ajde.getDefault().getEditorAdapter().showSourceLine(elem.get SourceLocation(),
> true);
Hi,
This is really a question for the ajdt-dev list, but one route is to
convert the IProgramElement into an Eclipse object, such as a IJavaElement
or IResource, then you can use the standard Eclipse API calls for opening
an editor and jumping to a location. For some examples, see JDTUtils in
the visualiser code, and AJModel.getCorrespondingJavaElement() in
ajdt.core.
Regards,
Matt.
--
Matt Chapman
AJDT Development, http://www.eclipse.org/ajdt
|
|
|
Powered by
FUDForum. Page generated in 0.03535 seconds