Opening the jave class in ve programmatically [message #102541] |
Wed, 17 August 2005 06:49  |
Eclipse User |
|
|
|
Originally posted by: rashmi.ramachandra.churchillgroup.com
Hi all,
I want to open my java class programmatically in eclipse visual editor.
I was able to open the java editor by using the following code.
IEditorPart javaEditor = JavaUI.openInEditor(type);
( type is an instance of ICompilationUnit)
Is something similar possible for visual editor? If any information is
available on this front please forward it to me.
Thanks in advance.
-Rashmi
|
|
|
|
|
|
Re: Opening the jave class in ve programmatically [message #610315 is a reply to message #102541] |
Wed, 17 August 2005 09:48  |
Eclipse User |
|
|
|
Rashmi Ramachandra wrote:
> Hi all,
> I want to open my java class programmatically in eclipse visual editor.
> I was able to open the java editor by using the following code.
>
> IEditorPart javaEditor = JavaUI.openInEditor(type);
> ( type is an instance of ICompilationUnit)
>
> Is something similar possible for visual editor? If any information is
> available on this front please forward it to me.
>
> Thanks in advance.
> -Rashmi
>
>
This method will eventually call
IEditorPart editorPart= IDE.openEditor(p, file, activate);
... have not tried it, but I assume that if the file was set to use the VE, it will open the VE.
|
|
|
Re: Opening the jave class in ve programmatically [message #610321 is a reply to message #102571] |
Wed, 17 August 2005 10:44  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
There is API to do this in Eclipse, but you need to know the EditorID
for the java visual editor. The id is currently an internal id, so it
may change in the future, but this should do it:
public static IEditorPart openEditor(
IWorkbenchPage page,
IFile input,
String editorId) throws PartInitException {
Use " org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itor "
for the editor id.
--
Thanks,
Rich Kulp
|
|
|
|
Powered by
FUDForum. Page generated in 0.04693 seconds