Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to close a empty editor area automatically?(I need to know how to set no visible automatically an editor area when you close all editors)
icon5.gif  How to close a empty editor area automatically? [message #532203] Fri, 07 May 2010 14:06 Go to next message
Lucas Reimundo is currently offline Lucas ReimundoFriend
Messages: 2
Registered: May 2010
Junior Member
Hello community, first sorry for my english

i made an new perspective and views, and in the PerspectiveFactory, I set in false the visibility of the "editor area" with method layout.setEditorAreaVisible(false); but when you open and close any editor, the area of editors is visible and you can't close it.
I need to know how to set no visible automatically an "editor area" when you close all editors.

Thanks,

Lucas

[Updated on: Fri, 07 May 2010 14:14]

Report message to a moderator

icon3.gif  Re: How to close a empty editor area automatically? [message #532563 is a reply to message #532203] Mon, 10 May 2010 13:13 Go to previous message
Lucas Reimundo is currently offline Lucas ReimundoFriend
Messages: 2
Registered: May 2010
Junior Member
A possible solution is add an listener to the perspective that it set visible in false when not editor are opened.

PlatformUI.getWorkbench().getActiveWorkbenchWindow().addPers pectiveListener(new IPerspectiveListener() {

public void perspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) {
}

public void perspectiveChanged(IWorkbenchPage page, IPerspectiveDescriptor perspective, String changeId) {
if (page.isEditorAreaVisible()) {
IEditorReference[] editores = page.getEditorReferences();
if (editores.length <= 0) {
page.setEditorAreaVisible(false);
}
}

}

});
Previous Topic:Popup / Context Menu on a View without a Viewer
Next Topic:Prevent users from customizing certain items
Goto Forum:
  


Current Time: Tue Apr 16 07:03:21 GMT 2024

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

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

Back to the top