Skip to main content



      Home
Home » Archived » Visual Editor (VE) » Opening the jave class in ve programmatically
Opening the jave class in ve programmatically [message #102541] Wed, 17 August 2005 06:49 Go to next message
Eclipse UserFriend
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 #102571 is a reply to message #102541] Wed, 17 August 2005 09:48 Go to previous messageGo to next message
Eclipse UserFriend
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 #102650 is a reply to message #102571] Wed, 17 August 2005 10:44 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Opening the jave class in ve programmatically [message #102773 is a reply to message #102650] Thu, 18 August 2005 08:49 Go to previous message
Eclipse UserFriend
Originally posted by: rashmi.ramachandra.churchillgroup.com

Thank you Rich . I was able to get the visual editor up programmatically
with help of the method you pointed out.
Best Regards
-Rashmi
Re: Opening the jave class in ve programmatically [message #610315 is a reply to message #102541] Wed, 17 August 2005 09:48 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Re: Opening the jave class in ve programmatically [message #610329 is a reply to message #102650] Thu, 18 August 2005 08:49 Go to previous message
Eclipse UserFriend
Originally posted by: rashmi.ramachandra.churchillgroup.com

Thank you Rich . I was able to get the visual editor up programmatically
with help of the method you pointed out.
Best Regards
-Rashmi
Previous Topic:Another code generation for SWT/JFACE
Next Topic:(newbie) Using VE to create Wizard pages
Goto Forum:
  


Current Time: Sat Jun 21 01:44:21 EDT 2025

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

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

Back to the top