Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » editors close -- how to reclaim space for views?
editors close -- how to reclaim space for views? [message #324845] Fri, 01 February 2008 19:35 Go to next message
Eclipse UserFriend
I have an editor which pop-up as user wants to modify properties in the
view. Once editing is done user will close it.

How can I instruct view to reclaim editor's space?? What I end up left
with is just and empty (gray on my OS) area where editor was!?!
Re: editors close -- how to reclaim space for views? [message #324948 is a reply to message #324845] Mon, 04 February 2008 13:17 Go to previous messageGo to next message
Eclipse UserFriend
Ivan B wrote:
> I have an editor which pop-up as user wants to modify properties in the
> view. Once editing is done user will close it.
>
> How can I instruct view to reclaim editor's space?? What I end up left
> with is just and empty (gray on my OS) area where editor was!?!

You might be able to do it, just execute the command
org.eclipse.ui.window.hideShowEditors

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm
Re: editors close -- how to reclaim space for views? [message #324960 is a reply to message #324948] Mon, 04 February 2008 14:48 Go to previous message
Eclipse UserFriend
I was able to resolve the problem by registering perspective listener
and doing this. There is a warning about discouraged access, but I think
I am fine for now :) If anyone has better idea please chime in:

final IWorkbenchWindow window = getWindowConfigurer().getWindow();
window.addPerspectiveListener(new IPerspectiveListener() {
public void perspectiveActivated(IWorkbenchPage page,
IPerspectiveDescriptor perspective) {}

public void perspectiveChanged(IWorkbenchPage page,
IPerspectiveDescriptor perspective, String changeId) {

if (changeId.equals(WorkbenchPage.CHANGE_EDITOR_CLOSE)) {
IEditorReference[] refs =
window.getActivePage().getEditorReferences();
if (refs.length == 0)
window.getActivePage().setEditorAreaVisible(false);
}
}
});


Paul Webster wrote:
> Ivan B wrote:
>> I have an editor which pop-up as user wants to modify properties in
>> the view. Once editing is done user will close it.
>>
>> How can I instruct view to reclaim editor's space?? What I end up left
>> with is just and empty (gray on my OS) area where editor was!?!
>
> You might be able to do it, just execute the command
> org.eclipse.ui.window.hideShowEditors
>
> PW
>
Previous Topic:Re: NullPointerException on getText()
Next Topic:Re: Capturing FormText errors
Goto Forum:
  


Current Time: Thu Jul 17 20:47:15 EDT 2025

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

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

Back to the top