Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-10-19 10:03:42 +0000
committerEike Stepper2010-10-19 10:03:42 +0000
commitcd3cf8d6d462c75aedc127c7dc24c0f05be3fe7d (patch)
tree2bb5a24b79ce3dffe38c85874418580fb8cf764c /plugins/org.eclipse.net4j.util.ui
parent229a1603ee62c04266c90e50909a04e464fb5bf8 (diff)
downloadcdo-cd3cf8d6d462c75aedc127c7dc24c0f05be3fe7d.tar.gz
cdo-cd3cf8d6d462c75aedc127c7dc24c0f05be3fe7d.tar.xz
cdo-cd3cf8d6d462c75aedc127c7dc24c0f05be3fe7d.zip
[327405] Provide an offline CDOWorkspace with Checkout/Update/Commit workflows
https://bugs.eclipse.org/bugs/show_bug.cgi?id=327405
Diffstat (limited to 'plugins/org.eclipse.net4j.util.ui')
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerItemProvider.java33
1 files changed, 33 insertions, 0 deletions
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 582b3573d8..9797a733bc 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
@@ -20,12 +20,17 @@ import org.eclipse.net4j.util.event.IListener;
import org.eclipse.net4j.util.internal.ui.SharedIcons;
import org.eclipse.net4j.util.lifecycle.LifecycleState;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
+import org.eclipse.net4j.util.ui.UIUtil;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.viewers.ITreeSelection;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.PartInitException;
import java.text.MessageFormat;
import java.util.ArrayList;
@@ -270,6 +275,34 @@ public class ContainerItemProvider<CONTAINER extends IContainer<Object>> extends
}
@Override
+ protected void fillContextMenu(IMenuManager manager, ITreeSelection selection)
+ {
+ super.fillContextMenu(manager, selection);
+ if (selection.size() == 1)
+ {
+ Object element = selection.getFirstElement();
+ if (element instanceof ContainerItemProvider.ErrorElement)
+ {
+ manager.add(new Action("Open Error Log")
+ {
+ @Override
+ public void run()
+ {
+ try
+ {
+ UIUtil.getActiveWorkbenchPage().showView(UIUtil.ERROR_LOG_ID);
+ }
+ catch (PartInitException ex)
+ {
+ OM.LOG.error(ex);
+ }
+ }
+ });
+ }
+ }
+ }
+
+ @Override
public Font getFont(Object obj)
{
if (obj instanceof ContainerItemProvider.LazyElement)

Back to the top