Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » How i do for start a Visual Editor by code or extension?
How i do for start a Visual Editor by code or extension? [message #142765] Wed, 07 November 2007 08:01 Go to next message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

Hello:
when we create a visual class ,visual editor can start,
now i want start a visual editor by code or extension .
how i do?
Re: How i do for start a Visual Editor by code or extension? [message #142795 is a reply to message #142765] Thu, 08 November 2007 00:22 Go to previous messageGo to next message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
To Open VE, you need to open a Java file. with VE editor ID using
IDE.openEditor(IWorkbenchPage page, IFile input,
String editorId);

Regards

Yves YANG

-----

http://www.soyatec.com/eface

"zxc" <caye5200@yahoo.com.cn> wrote in message
news:fgrrcm$qqk$1@build.eclipse.org...
> Hello:
> when we create a visual class ,visual editor can start,
> now i want start a visual editor by code or extension .
> how i do?
>
Re: How i do for start a Visual Editor by code or extension? [message #142804 is a reply to message #142795] Thu, 08 November 2007 01:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

Yves YANG,
thank you, i can open ve using this method,
EditorUtility.openInEditor(IEditorInput input, String editorID, boolean
activate)
editorID is
" org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itor "

but ,i have anthor problem, i try get a EditorPart,

BundleHost
bundle=(BundleHost)org.eclipse.ve.internal.java.core.JavaVEP lugin.getPlugin().getBundle()
className=" org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart "
classInstance=bundle.loadClass(className);
visualPart=(JavaVisualEditorPart)classInstance.newInstance() ;
visualPart.init(IEditorSite site, IEditorInput input)

the method argument "site" how can i do to get?
"Yves YANG" <yves.yang@soyatec.com> wrote in message
news:fgtkrv$ibu$1@build.eclipse.org...
> To Open VE, you need to open a Java file. with VE editor ID using
> IDE.openEditor(IWorkbenchPage page, IFile input,
> String editorId);
>
> Regards
>
> Yves YANG
>
> -----
>
> http://www.soyatec.com/eface
>
> "zxc" <caye5200@yahoo.com.cn> wrote in message
> news:fgrrcm$qqk$1@build.eclipse.org...
>> Hello:
>> when we create a visual class ,visual editor can start,
>> now i want start a visual editor by code or extension .
>> how i do?
>>
>
>
>
Re: How i do for start a Visual Editor by code or extension? [message #142862 is a reply to message #142804] Thu, 08 November 2007 16:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

You can't just new up an editor instance. You have to use the
EditorUtility.openInEditor to open an editor. There are many different
things that need to be set up and called and the EditorUtility does that
for you.
Re: How i do for start a Visual Editor by code or extension? [message #142872 is a reply to message #142804] Thu, 08 November 2007 16:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

You can't just new up an editor instance. You have to use the
EditorUtility.openInEditor to open an editor. There are many different
things that need to be set up and called and the EditorUtility does that
for you.
Re: How i do for start a Visual Editor by code or extension? [message #142883 is a reply to message #142872] Fri, 09 November 2007 00:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

Rich kulp,
Thank you ! i am Develop a plugin now , i want to get lastModel for a view
and not open the Editor, I am failed.
then ,i found that VE must be activated

"Rich Kulp" <richkulp@us.NO_SPAM.ibm.com> wrote in message
news:fgvc0f$u81$2@build.eclipse.org...
> You can't just new up an editor instance. You have to use the
> EditorUtility.openInEditor to open an editor. There are many different
> things that need to be set up and called and the EditorUtility does that
> for you.
>
Re: How i do for start a Visual Editor by code or extension? [message #143132 is a reply to message #142765] Fri, 23 November 2007 15:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: oliver.mietrach.macio.de

I do it by opening a .jave-File by Code. Here is my Snippet

IProject project = ResourcesPlugin.getWorkspace().getRoot()
.getProject("project");
IFile iFile = project.getFile("myFile.java");
IWorkbenchPage page = this.getWindowConfigurer().getWindow()
.getActivePage();
page.openEditor(new FileEditorInput(iFile),
" org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itor ");


This will do it, I hope.

Greets Oliver

zxc schrieb:
> Hello:
> when we create a visual class ,visual editor can start,
> now i want start a visual editor by code or extension .
> how i do?
>
Re: How i do for start a Visual Editor by code or extension? [message #143140 is a reply to message #143132] Fri, 23 November 2007 15:47 Go to previous message
Eclipse UserFriend
Originally posted by: oliver.mietrach.macio.de

Excuse me I saw the answers too late

Oliver Mietrach schrieb:
> I do it by opening a .jave-File by Code. Here is my Snippet
>
> IProject project = ResourcesPlugin.getWorkspace().getRoot()
> .getProject("project");
> IFile iFile = project.getFile("myFile.java");
> IWorkbenchPage page = this.getWindowConfigurer().getWindow()
> .getActivePage();
> page.openEditor(new FileEditorInput(iFile),
> " org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itor ");
>
>
> This will do it, I hope.
>
> Greets Oliver
>
> zxc schrieb:
>> Hello:
>> when we create a visual class ,visual editor can start,
>> now i want start a visual editor by code or extension .
>> how i do?
>>
Re: How i do for start a Visual Editor by code or extension? [message #616853 is a reply to message #142765] Thu, 08 November 2007 00:22 Go to previous message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
To Open VE, you need to open a Java file. with VE editor ID using
IDE.openEditor(IWorkbenchPage page, IFile input,
String editorId);

Regards

Yves YANG

-----

http://www.soyatec.com/eface

"zxc" <caye5200@yahoo.com.cn> wrote in message
news:fgrrcm$qqk$1@build.eclipse.org...
> Hello:
> when we create a visual class ,visual editor can start,
> now i want start a visual editor by code or extension .
> how i do?
>
Re: How i do for start a Visual Editor by code or extension? [message #616854 is a reply to message #142795] Thu, 08 November 2007 01:21 Go to previous message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

Yves YANG,
thank you, i can open ve using this method,
EditorUtility.openInEditor(IEditorInput input, String editorID, boolean
activate)
editorID is
" org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itor "

but ,i have anthor problem, i try get a EditorPart,

BundleHost
bundle=(BundleHost)org.eclipse.ve.internal.java.core.JavaVEP lugin.getPlugin().getBundle()
className=" org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart "
classInstance=bundle.loadClass(className);
visualPart=(JavaVisualEditorPart)classInstance.newInstance() ;
visualPart.init(IEditorSite site, IEditorInput input)

the method argument "site" how can i do to get?
"Yves YANG" <yves.yang@soyatec.com> wrote in message
news:fgtkrv$ibu$1@build.eclipse.org...
> To Open VE, you need to open a Java file. with VE editor ID using
> IDE.openEditor(IWorkbenchPage page, IFile input,
> String editorId);
>
> Regards
>
> Yves YANG
>
> -----
>
> http://www.soyatec.com/eface
>
> "zxc" <caye5200@yahoo.com.cn> wrote in message
> news:fgrrcm$qqk$1@build.eclipse.org...
>> Hello:
>> when we create a visual class ,visual editor can start,
>> now i want start a visual editor by code or extension .
>> how i do?
>>
>
>
>
Re: How i do for start a Visual Editor by code or extension? [message #616860 is a reply to message #142804] Thu, 08 November 2007 16:03 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

You can't just new up an editor instance. You have to use the
EditorUtility.openInEditor to open an editor. There are many different
things that need to be set up and called and the EditorUtility does that
for you.
Re: How i do for start a Visual Editor by code or extension? [message #616861 is a reply to message #142804] Thu, 08 November 2007 16:04 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

You can't just new up an editor instance. You have to use the
EditorUtility.openInEditor to open an editor. There are many different
things that need to be set up and called and the EditorUtility does that
for you.
Re: How i do for start a Visual Editor by code or extension? [message #616862 is a reply to message #142872] Fri, 09 November 2007 00:58 Go to previous message
Eclipse UserFriend
Originally posted by: caye5200.yahoo.com.cn

Rich kulp,
Thank you ! i am Develop a plugin now , i want to get lastModel for a view
and not open the Editor, I am failed.
then ,i found that VE must be activated

"Rich Kulp" <richkulp@us.NO_SPAM.ibm.com> wrote in message
news:fgvc0f$u81$2@build.eclipse.org...
> You can't just new up an editor instance. You have to use the
> EditorUtility.openInEditor to open an editor. There are many different
> things that need to be set up and called and the EditorUtility does that
> for you.
>
Re: How i do for start a Visual Editor by code or extension? [message #616887 is a reply to message #142765] Fri, 23 November 2007 15:44 Go to previous message
Eclipse UserFriend
Originally posted by: oliver.mietrach.macio.de

I do it by opening a .jave-File by Code. Here is my Snippet

IProject project = ResourcesPlugin.getWorkspace().getRoot()
.getProject("project");
IFile iFile = project.getFile("myFile.java");
IWorkbenchPage page = this.getWindowConfigurer().getWindow()
.getActivePage();
page.openEditor(new FileEditorInput(iFile),
" org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itor ");


This will do it, I hope.

Greets Oliver

zxc schrieb:
> Hello:
> when we create a visual class ,visual editor can start,
> now i want start a visual editor by code or extension .
> how i do?
>
Re: How i do for start a Visual Editor by code or extension? [message #616888 is a reply to message #143132] Fri, 23 November 2007 15:47 Go to previous message
Eclipse UserFriend
Originally posted by: oliver.mietrach.macio.de

Excuse me I saw the answers too late

Oliver Mietrach schrieb:
> I do it by opening a .jave-File by Code. Here is my Snippet
>
> IProject project = ResourcesPlugin.getWorkspace().getRoot()
> .getProject("project");
> IFile iFile = project.getFile("myFile.java");
> IWorkbenchPage page = this.getWindowConfigurer().getWindow()
> .getActivePage();
> page.openEditor(new FileEditorInput(iFile),
> " org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itor ");
>
>
> This will do it, I hope.
>
> Greets Oliver
>
> zxc schrieb:
>> Hello:
>> when we create a visual class ,visual editor can start,
>> now i want start a visual editor by code or extension .
>> how i do?
>>
Previous Topic:Getting an Error after unpacking some sources
Next Topic:Problem with mirror hosting VE updates: http://www.eclipse.ps.pl/tools/ve/updates/1.0
Goto Forum:
  


Current Time: Tue Mar 19 11:00:03 GMT 2024

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

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

Back to the top