Author: dgolovin
Date: 2011-11-30 13:21:46 -0500 (Wed, 30 Nov 2011)
New Revision: 36794
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/JBossPerspectiveFactory.java
Log:
https://issues.jboss.org/browse/JBIDE-10214 JBoss Perspective: Close outline and palette
forced to show CheatSheetView at the same folder as Palette and outline, perspective needs
to be reseted before testing
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/JBossPerspectiveFactory.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/JBossPerspectiveFactory.java 2011-11-30
17:39:25 UTC (rev 36793)
+++
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/JBossPerspectiveFactory.java 2011-11-30
18:21:46 UTC (rev 36794)
@@ -15,6 +15,8 @@
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
+import org.eclipse.ui.internal.PageLayout;
+import org.eclipse.ui.internal.cheatsheets.ICheatSheetResource;
import org.eclipse.ui.navigator.resources.ProjectExplorer;
import org.eclipse.ui.progress.IProgressConstants;
@@ -28,6 +30,7 @@
protected static final String ID_SERVERS_VIEW =
"org.eclipse.wst.server.ui.ServersView"; //$NON-NLS-1$
protected static final String ID_SEARCH_VIEW =
"org.eclipse.search.ui.views.SearchView"; //$NON-NLS-1$
protected static final String ID_CONSOLE_VIEW =
"org.eclipse.ui.console.ConsoleView"; //$NON-NLS-1$
+ protected static final String ID_CHEATSHEET_VIEW =
"org.eclipse.ui.cheatsheets.cheatSheetView"; //$NON-NLS-1$
/* (non-Javadoc)
* @see
org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
@@ -81,5 +84,9 @@
// Top right.
IFolderLayout topRight = layout.createFolder("topRight", IPageLayout.RIGHT,
0.7f, editorArea);//$NON-NLS-1$
topRight.addView(IPageLayout.ID_OUTLINE);
+ // This line is required to force CheatSheetView placeholder, because it added by
default as sticky view and
+ // to make placeholder working it should be removed first
+ ((PageLayout)layout).removePlaceholder(ICheatSheetResource.CHEAT_SHEET_VIEW_ID);
+ topRight.addPlaceholder(ICheatSheetResource.CHEAT_SHEET_VIEW_ID);
}
}
\ No newline at end of file