Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Multiple EditorPart stack.(What is the RightWay to handle editors and make EditorArea vanish when last tab is closed?)
Multiple EditorPart stack. [message #500631] Fri, 27 November 2009 09:09 Go to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
The Description says it all. Smile
What is the RightWay(TM) to handle editor tabs and make EditorArea vanish when last one is closed?

I also have a problem with the initial
configurer.setSaveAndRestore(true);
because it remembers all my open Views and also the EditorArea visibility status,
But that doesn't make any sense because there's nothing to view or to edit till I actually open a file.
I should either automatically open last visited file (but it might not exist!) or just display some kind of blank background (or an image) till the user opens a file.

I have no idea about how to do that.
Can someone suggest a strategy?

TiA
Mauro
Re: Multiple EditorPart stack. [message #501822 is a reply to message #500631] Thu, 03 December 2009 22:47 Go to previous messageGo to next message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 423
Registered: July 2009
Senior Member
Hi Mauro,

Can you rephrase this? What exactly do you want?

Best Regards,
Wim Jongman

-- ASCII stupid question, get a stupid ANSI!
(Eclipse Old Skool Quote Service)


> The Description says it all. :)
> What is the RightWay(TM) to handle editor tabs and make EditorArea vanish
when last one is closed?
>
> I also have a problem with the initial configurer.setSaveAndRestore(true);
because it remembers all my open Views and also the EditorArea visibility
status,
> But that doesn't make any sense because there's nothing to view or to edit
till I actually open a file.
> I should either automatically open last visited file (but it might not
exist!) or just display some kind of blank background (or an image) till the
user opens a file.
>
> I have no idea about how to do that.
> Can someone suggest a strategy?
>
> TiA
> Mauro
Re: Multiple EditorPart stack. [message #502547 is a reply to message #501822] Tue, 08 December 2009 18:41 Go to previous messageGo to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Wim Jongman wrote on Thu, 03 December 2009 17:47
Hi Mauro,

Can you rephrase this? What exactly do you want?

Sorry.
I will try.

I am writing an application that essentially is an editor:
It opens an XML file, shows it in a few different views and/or editors and saves it back.
The XML file contains, among other things, pointers to other text files.
The XML editor can open one or more of those files for editing.

My problems:

  • I would like to have the central editorArea disappear when all files have been closed; I have found that setting layout.setEditorAreaVisible(false); will hide the editorArea at startup. It will appear as soon as I open an editor. I have found no way to make it disappear again when I close the editor. How can I do that?
  • In case (often!) i do not need to actually modify the XML file itself, but I need to edit only the text-files, I would like to close the XML editor and to leave only one of the views active (similar to an Outline View); is this possible?
  • If I set configurer.setSaveAndRestore(true); the system will try to reopen all files that were open last time; In case I closed the XML editor (see above) I would like to prevent this and I would like to force the user to manually reopen the XML file or, alternatively, reopen it in the non-editing mode (just the outline shown). Again: I do not know how to achieve this.


I hope this is a bit clearer.
Thanks for Your understanding
Mauro

Quote:
> The Description says it all. Smile
> What is the RightWay(TM) to handle editor tabs and make EditorArea vanish
when last one is closed?
>
> I also have a problem with the initial configurer.setSaveAndRestore(true);
because it remembers all my open Views and also the EditorArea visibility
status,
> But that doesn't make any sense because there's nothing to view or to edit
till I actually open a file.
> I should either automatically open last visited file (but it might not
exist!) or just display some kind of blank background (or an image) till the
user opens a file.
>
> I have no idea about how to do that.
> Can someone suggest a strategy?
>
> TiA
> Mauro

Re: Re: Multiple EditorPart stack. [message #503610 is a reply to message #502547] Mon, 14 December 2009 23:09 Go to previous message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 423
Registered: July 2009
Senior Member
Hi Mauro,

sorry for getting back so late.

>
> I would like to have the central editorArea disappear when all files have
been closed;

Try to reset the perspective if your last editor closes. You can add a
partlistener to the partservice
(getSite().getWorkbenchWindow().getPartService) the active page has
perspective methods.


--

Best Regards,
Wim Jongman
-- Press CTRL-ALT-DEL to continue ...
(Eclipse Old Skool Quote Service)
Previous Topic:.instance files
Next Topic:find duplicate entries for some plugin after update, same plugins then fail
Goto Forum:
  


Current Time: Tue Mar 19 09:49:34 GMT 2024

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

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

Back to the top