Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Opening a file in visual editor programatically
Opening a file in visual editor programatically [message #122718] Thu, 27 November 2003 10:11 Go to next message
Eclipse UserFriend
Originally posted by: javibasi.yahoo.es

Hi

I've developed, as a part of one plugin, a wizard for Java classes. After
the class is created, I want to get it opened in a the visual Java Editor.

As it's a .java file, the default editor is the text Java Editor, and I
don`t want to change this default options.

Searching the APIs and newsgroups, I found the method
IWorkbenchPAge.openEditor(IFile input, String editorID).

My question is about where I can find the editorID corresponding to the
Visual Editor for Java.

Thank you very much.

Dian Cecht
Re: Opening a file in visual editor programatically [message #123460 is a reply to message #122718] Mon, 01 December 2003 14:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

It is " org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itor "
However, since it is internal, it may change in the future. At this time
it is steady and will not change for Release 0.5.0

--
Thanks, Rich Kulp

Re: Opening a file in visual editor programatically [message #123900 is a reply to message #123460] Tue, 02 December 2003 13:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: javibasi.yahoo.es

First of all, Rich, thanks for your reply.

I think from what I read (could be wrong) that that class is a part of
Eclipse v2.1 and the new visual editor project.

I was just trying to open the default visual editor, the same you have as
an option to associate to ".java" files. If you use the normal open
method, you will get the default editor associated with that file. In my
case, and for ".java" files, it's the text editor.

What I'm trying to do is recognize the kinf of ".java" file (visual or
not) and open one or another editor. That's the reason I was looking for
the identifier of the Visual Editor.

Dian Cecht


Rich Kulp wrote:

> It is " org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itor "
> However, since it is internal, it may change in the future. At this time
> it is steady and will not change for Release 0.5.0
Re: Opening a file in visual editor programatically [message #123927 is a reply to message #123900] Tue, 02 December 2003 13:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

There is no kindof. Any java file at all can be opened in either the
default java editor or the visual editor.

--
Thanks, Rich Kulp

Re: Opening a file in visual editor programatically [message #124028 is a reply to message #123927] Wed, 03 December 2003 05:48 Go to previous message
Eclipse UserFriend
Originally posted by: javibasi.yahoo.es

Thanks again for your reply, Rich.

I finally found a way to identify visual java files, but still couldn't
manage to open the visual editor. What I finally did is setting the visual
editor as default, so when I call the open method, I get the .java file
I've created visually edited.

I know it's not the best solution, but it's the only one I've found.
Anyway, I think there should be a way to programatically invoking an
editor based on public identifiers for each editor.

Thanks again.

Dian Cecht


Rich Kulp wrote:

> There is no kindof. Any java file at all can be opened in either the
> default java editor or the visual editor.
Previous Topic:eclipse & BINGO RMI example
Next Topic:Adding Menu to Java Perspective
Goto Forum:
  


Current Time: Sun Jul 13 19:04:23 EDT 2025

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

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

Back to the top