Call "Open type" dialog from own plugin, Open class in workspace-editor in own p [message #258567] |
Tue, 10 February 2009 07:56  |
Eclipse User |
|
|
|
Hi to everyone,
I am completely new to Eclipse plugin-development and have two different
problems to solve:
1. I want to call the "open type" dialog from my own plugin, where I have
a textfield to edit a classname.
The user should get the opportunity to search the class in the eclipse
given way.....
2. I want to easily navigate from my own plugin (it's an editor-plugin) to
the sourcecode of an class.
That means, if already opened in the editor, this one editor must be
opened. If the source-file is not yet opened in any editor a new editor
with this file should open.
Can you help me solving my problems?
Waiting for your solutions....
Bye Markus
|
|
|
|
|
|
|
|
|
|
Re: Call "Open type" dialog from own plugin, Open class in workspace-editor in own p [message #258866 is a reply to message #258693] |
Tue, 24 February 2009 07:59  |
Eclipse User |
|
|
|
Hello,
OK, I found a solution.... it's much easier.......
IJavaProject javaproject = JavaCore.create(project);
try {
IType findType = javaproject.findType(classname);
JavaUI.openInEditor(findType);
} catch (JavaModelException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (PartInitException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Thanx by the way
Markus
|
|
|
Powered by
FUDForum. Page generated in 0.03130 seconds