Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer.ui/plugin.xml19
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/application/CDOExplorerPerspective.java55
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/actions/ShowInActionProvider.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/plugin.xml23
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerItemProvider.java8
5 files changed, 71 insertions, 38 deletions
diff --git a/plugins/org.eclipse.emf.cdo.explorer.ui/plugin.xml b/plugins/org.eclipse.emf.cdo.explorer.ui/plugin.xml
index b9c785bc11..9c7421de07 100644
--- a/plugins/org.eclipse.emf.cdo.explorer.ui/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo.explorer.ui/plugin.xml
@@ -91,6 +91,25 @@
</perspective>
</extension>
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension
+ targetID="org.eclipse.ui.resourcePerspective">
+ <view
+ id="org.eclipse.emf.cdo.explorer.ui.CDORepositoriesView"
+ relationship="stack"
+ relative="org.eclipse.ui.views.ContentOutline">
+ </view>
+ <view
+ id="org.eclipse.ui.views.PropertySheet"
+ relationship="stack"
+ relative="org.eclipse.ui.views.TaskList">
+ </view>
+ <perspectiveShortcut id="org.eclipse.emf.cdo.explorer.ui.CDOExplorerPerspective"/>
+ <viewShortcut id="org.eclipse.emf.cdo.explorer.ui.CDORepositoriesView"/>
+ </perspectiveExtension>
+ </extension>
+
<extension point="org.eclipse.ui.preferencePages">
<page
category="org.eclipse.emf.cdo.ui.CDOPreferencePage"
diff --git a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/application/CDOExplorerPerspective.java b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/application/CDOExplorerPerspective.java
index 0e0125be3b..dd55707f9a 100644
--- a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/application/CDOExplorerPerspective.java
+++ b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/application/CDOExplorerPerspective.java
@@ -11,13 +11,17 @@
*/
package org.eclipse.emf.cdo.explorer.ui.application;
+import org.eclipse.emf.cdo.explorer.ui.checkouts.actions.ShowInActionProvider;
+import org.eclipse.emf.cdo.explorer.ui.repositories.CDORepositoriesView;
import org.eclipse.emf.cdo.internal.ui.views.CDORemoteSessionsView;
import org.eclipse.emf.cdo.internal.ui.views.CDOSessionsView;
+import org.eclipse.emf.cdo.internal.ui.views.CDOTimeMachineView;
import org.eclipse.emf.cdo.internal.ui.views.CDOWatchListView;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
+import org.eclipse.ui.IPlaceholderFolderLayout;
import org.eclipse.ui.PlatformUI;
/**
@@ -27,6 +31,16 @@ public class CDOExplorerPerspective implements IPerspectiveFactory
{
public static final String ID = "org.eclipse.emf.cdo.explorer.CDOExplorerPerspective"; //$NON-NLS-1$
+ private static final String CHECKOUT_AREA = "checkoutArea";
+
+ private static final String AUDITING_AREA = "auditingArea";
+
+ private static final String REPOSITORY_AREA = "repositoryArea";
+
+ private static final String PROPERTIES_AREA = "propertiesArea";
+
+ private static final String OUTLINE_AREA = "outlineArea";
+
private IPageLayout pageLayout;
public CDOExplorerPerspective()
@@ -48,27 +62,39 @@ public class CDOExplorerPerspective implements IPerspectiveFactory
protected void addViews()
{
- IFolderLayout sessionsPane = pageLayout.createFolder("sessionsPane", IPageLayout.LEFT, 0.30f, //$NON-NLS-1$
+ IFolderLayout checkoutArea = pageLayout.createFolder(CHECKOUT_AREA, IPageLayout.LEFT, 0.30f,
pageLayout.getEditorArea());
- sessionsPane.addView(CDOSessionsView.ID);
+ checkoutArea.addView(IPageLayout.ID_PROJECT_EXPLORER);
- IFolderLayout propertiesPane = pageLayout.createFolder("propertiesPane", IPageLayout.BOTTOM, 0.70f, //$NON-NLS-1$
+ IFolderLayout repositoryArea = pageLayout.createFolder(REPOSITORY_AREA, IPageLayout.BOTTOM, 0.70f, CHECKOUT_AREA);
+ repositoryArea.addView(CDORepositoriesView.ID);
+
+ IFolderLayout propertiesArea = pageLayout.createFolder(PROPERTIES_AREA, IPageLayout.BOTTOM, 0.70f,
+ pageLayout.getEditorArea());
+ propertiesArea.addView(IPageLayout.ID_PROP_SHEET);
+ propertiesArea.addView(ShowInActionProvider.HISTORY_VIEW_ID);
+ propertiesArea.addView(CDOWatchListView.ID);
+ propertiesArea.addView(CDORemoteSessionsView.ID);
+
+ IFolderLayout outlineArea = pageLayout.createFolder(OUTLINE_AREA, IPageLayout.RIGHT, 0.70f,
pageLayout.getEditorArea());
- propertiesPane.addView(IPageLayout.ID_PROP_SHEET);
- propertiesPane.addView(CDOWatchListView.ID);
- propertiesPane.addView(CDORemoteSessionsView.ID);
+ outlineArea.addView(IPageLayout.ID_OUTLINE);
- IFolderLayout outlinePane = pageLayout.createFolder("outlinePane", IPageLayout.RIGHT, 0.70f, //$NON-NLS-1$
+ IPlaceholderFolderLayout auditingArea = pageLayout.createPlaceholderFolder(AUDITING_AREA, IPageLayout.BOTTOM, 0.84f,
pageLayout.getEditorArea());
- outlinePane.addView(IPageLayout.ID_OUTLINE);
+ auditingArea.addPlaceholder(CDOTimeMachineView.ID);
}
protected void addViewShortcuts()
{
+ pageLayout.addShowViewShortcut(CDORemoteSessionsView.ID);
+ pageLayout.addShowViewShortcut(CDORepositoriesView.ID);
pageLayout.addShowViewShortcut(CDOSessionsView.ID);
+ pageLayout.addShowViewShortcut(CDOTimeMachineView.ID);
pageLayout.addShowViewShortcut(CDOWatchListView.ID);
- pageLayout.addShowViewShortcut(CDORemoteSessionsView.ID);
+ pageLayout.addShowViewShortcut(ShowInActionProvider.HISTORY_VIEW_ID);
pageLayout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
+ pageLayout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER);
pageLayout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
}
@@ -79,7 +105,14 @@ public class CDOExplorerPerspective implements IPerspectiveFactory
static public boolean isCurrent()
{
- return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getPerspective().getId()
- .equals(CDOExplorerPerspective.ID);
+ try
+ {
+ return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getPerspective().getId()
+ .equals(CDOExplorerPerspective.ID);
+ }
+ catch (Throwable ex)
+ {
+ return false;
+ }
}
}
diff --git a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/actions/ShowInActionProvider.java b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/actions/ShowInActionProvider.java
index a391a2d4cf..1352f0f375 100644
--- a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/actions/ShowInActionProvider.java
+++ b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/actions/ShowInActionProvider.java
@@ -78,6 +78,8 @@ public class ShowInActionProvider extends AbstractActionProvider<Object>
{
public static final String TITLE = "Show In";
+ public static final String HISTORY_VIEW_ID = "org.eclipse.team.ui.GenericHistoryView";
+
private static final String ID = ShowInActionProvider.class.getName();
private static final String DASHBOARD_KEY = CDOCheckoutDashboard.class.getName();
@@ -438,8 +440,6 @@ public class ShowInActionProvider extends AbstractActionProvider<Object>
*/
private static final class ShowInHistoryAction extends ShowInViewAction
{
- private static final String HISTORY_VIEW_ID = "org.eclipse.team.ui.GenericHistoryView";
-
private final Object selectedElement;
public ShowInHistoryAction(IWorkbenchPage page, Object selectedElement)
diff --git a/plugins/org.eclipse.emf.cdo.ui/plugin.xml b/plugins/org.eclipse.emf.cdo.ui/plugin.xml
index f0dce4aed2..fbb2a04c18 100644
--- a/plugins/org.eclipse.emf.cdo.ui/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo.ui/plugin.xml
@@ -73,19 +73,6 @@
</view>
</extension>
- <extension
- point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension
- targetID="org.eclipse.ui.resourcePerspective">
- <view
- id="org.eclipse.emf.cdo.ui.CDOSessionsView"
- ratio="0.2"
- relationship="bottom"
- relative="org.eclipse.ui.views.ResourceNavigator">
- </view>
- </perspectiveExtension>
- </extension>
-
<extension point = "org.eclipse.ui.editors">
<editor
id = "org.eclipse.emf.cdo.ui.CDOEditor"
@@ -171,16 +158,6 @@
</extension>
<extension
- point="org.eclipse.ui.perspectives">
- <perspective
- class="org.eclipse.emf.cdo.internal.ui.perspectives.CDOPerspective"
- icon="platform:/plugin/org.eclipse.emf.cdo.ui.shared/icons/full/view16/cdo_sessions.gif"
- id="org.eclipse.emf.cdo.ui.CDOExplorerPerspective"
- name="%perspective.name">
- </perspective>
- </extension>
-
- <extension
point="org.eclipse.core.runtime.adapters">
<factory
adaptableType="org.eclipse.emf.cdo.session.CDOSession"
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerItemProvider.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerItemProvider.java
index 7b1d7da9ec..45c215529a 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerItemProvider.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerItemProvider.java
@@ -189,8 +189,12 @@ public class ContainerItemProvider<CONTAINER extends IContainer<Object>> extends
private void disposeRoot()
{
- root.dispose(); // Also disposes of all children
- root = null;
+ if (root != null)
+ {
+ root.dispose(); // Also disposes of all children
+ root = null;
+ }
+
nodes.clear();
}

Back to the top