Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Adding an editor to a perspective
Adding an editor to a perspective [message #461400] Wed, 10 January 2007 12:44 Go to next message
Eclipse UserFriend
Originally posted by: badreddine49.yahoo.fr

To add a view we create a plugin project as a view template and we add view in perspective classe using
folder.addView("prg.exemple.view2.views.SampleView") and clicking Windows==>Show View. Its ok. my problem is i
will add an editor in my perspective!
how can i do this!?

Many thanks

badr
Re: Adding an editor to a perspective [message #461402 is a reply to message #461400] Wed, 10 January 2007 13:27 Go to previous messageGo to next message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
You have setEditorAreaVisible(true) from the perspective initial layout. Note that it will also open automatically if you open a file in the editor e.g. by the convenience methods located on IDE (IIRC).

Alex.
Re: Adding an editor to a perspective [message #461404 is a reply to message #461402] Wed, 10 January 2007 13:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: badreddine49.yahoo.fr

Thank you.
i have added this instruc in my Perspective classe: layout.setEditorAreaVisible(true);
in my RCP application i show the zone of editor, but no editor.
i have create a menu item:
<i>private IWorkbenchAction newAction;</i> in ApplicationActionBarAdvisor
and i have added this menu to FileMenu in fillMenuBar:
<i>MenuManager fileMenu = new MenuManager("&File");
fileMenu.add(newAction);</i>
and in makeActions:
<i>newAction = ActionFactory.NEW_WIZARD_DROP_DOWN.create(window);
register(newAction);</i>
but no results

can you give more details about your solution!!?
Re: Adding an editor to a perspective [message #461406 is a reply to message #461404] Wed, 10 January 2007 15:07 Go to previous message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
The editor area is blank until you open one or more files; all editors share the same editor area.

Like I said, you need to call one of the openEditor methods on IDE to make it work:

http://help.eclipse.org/help32/topic/org.eclipse.platform.do c.isv/reference/api/org/eclipse/ui/ide/IDE.html

org.eclipse.ui.ide.IDE.openEditor(page,file);


NB the file must be an Eclipse IFile, and not a java.io.File.

Alex.
Previous Topic:Loading data with background job
Next Topic:FormEditor with top Tabs
Goto Forum:
  


Current Time: Fri Apr 26 11:50:53 GMT 2024

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

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

Back to the top