summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Pontesegger2013-02-07 11:06:44 (EST)
committerCurtis Windatt2013-02-07 11:06:44 (EST)
commitbc074c5de98955df44b818df5b4279edfacfcb49 (patch)
treebfa3330afb4a853d920a5d50930bf90247f59144
parentd5fb2fd23870b6d158fa792cba155488c8b5733a (diff)
downloadeclipse.pde.ui-bc074c5de98955df44b818df5b4279edfacfcb49.zip
eclipse.pde.ui-bc074c5de98955df44b818df5b4279edfacfcb49.tar.gz
eclipse.pde.ui-bc074c5de98955df44b818df5b4279edfacfcb49.tar.bz2
Bug 400206 - Add double click support to Plug-in Registry viewv20130207-160644
-rw-r--r--ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowser.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowser.java b/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowser.java
index cd5033e..eed72a5 100644
--- a/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowser.java
+++ b/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -22,6 +22,7 @@ import org.eclipse.jface.viewers.*;
import org.eclipse.osgi.util.NLS;
import org.eclipse.pde.internal.runtime.*;
import org.eclipse.pde.internal.runtime.registry.model.*;
+import org.eclipse.pde.internal.ui.editor.plugin.ManifestEditor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.dnd.*;
@@ -217,6 +218,7 @@ public class RegistryBrowser extends ViewPart {
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
makeActions();
createTreeViewer(composite);
+ hookDoubleClickAction();
fClipboard = new Clipboard(fTreeViewer.getTree().getDisplay());
fillToolBar();
}
@@ -283,6 +285,19 @@ public class RegistryBrowser extends ViewPart {
tree.setMenu(menu);
}
+ private void hookDoubleClickAction() {
+ fTreeViewer.addDoubleClickListener(new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent event) {
+ IStructuredSelection selection = (IStructuredSelection) fTreeViewer.getSelection();
+ if (selection.size() == 1) {
+ Object obj = selection.getFirstElement();
+ if (obj instanceof Bundle)
+ ManifestEditor.openPluginEditor(((Bundle) obj).getSymbolicName());
+ }
+ }
+ });
+ }
+
private void fillToolBar() {
fDrillDownAdapter = new RegistryDrillDownAdapter(fTreeViewer);
IActionBars bars = getViewSite().getActionBars();