Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Karpisek2017-01-05 20:32:55 +0000
committerVikas Chandra2017-01-14 15:03:42 +0000
commit154aeac39edc8d6274f2fe6dce3cb849ae8e2cc6 (patch)
tree057b5ae88c61af311914c7b9b36e9b659d123722
parenta79438a06172a72bb03b381ba48893ee47bd51dd (diff)
downloadeclipse.pde.ui-154aeac39edc8d6274f2fe6dce3cb849ae8e2cc6.tar.gz
eclipse.pde.ui-154aeac39edc8d6274f2fe6dce3cb849ae8e2cc6.tar.xz
eclipse.pde.ui-154aeac39edc8d6274f2fe6dce3cb849ae8e2cc6.zip
Bug 351356 - Provide Select All in the PDE editorsI20170115-2000I20170114-2000
Adds implementation of SELECT_ALL action handling to PDE form editor sections, in cases where it was missing. TableSection or TreeSection subclasses now uses one common implementation for selectAll, which is used by default in #doGlobalAction (if not overriding by own custom version). Change-Id: I50e547913e8bd4cdb53c0aeafc1ab9fc03d9a2ec Signed-off-by: Martin Karpisek <martin.karpisek@gmail.com>
-rw-r--r--ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/sections/DSPropertiesSection.java5
-rw-r--r--ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/sections/DSProvideSection.java5
-rw-r--r--ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/sections/DSReferenceSection.java5
-rwxr-xr-xua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/comp/CompCSMasterTreeSection.java7
-rwxr-xr-xua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/SimpleCSMasterTreeSection.java5
-rw-r--r--ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/ctxhelp/CtxHelpTreeSection.java5
-rwxr-xr-xua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/toc/TocTreeSection.java5
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDESection.java8
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/StructuredViewerSection.java13
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/TableSection.java18
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/TreeSection.java20
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildClasspathSection.java36
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/CategorySection.java10
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/DownloadStatsSection.java5
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/RepositoryReferenceSection.java5
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/IncludedFeaturesSection.java10
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/PluginSection.java10
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/RequiresSection.java10
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/URLSection.java10
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/DependencyManagementSection.java5
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExecutionEnvironmentSection.java5
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExportPackageSection.java5
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExportPackageVisibilitySection.java5
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionPointsSection.java5
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionsSection.java12
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ImportPackageSection.java5
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/LibrarySection.java5
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/RequiresSection.java5
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/FeatureSection.java5
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/PluginSection.java5
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/UpdatesSection.java5
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/ElementSection.java5
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaIncludesSection.java5
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/ArchiveSection.java27
-rw-r--r--ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/CategorySection.java9
35 files changed, 182 insertions, 123 deletions
diff --git a/ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/sections/DSPropertiesSection.java b/ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/sections/DSPropertiesSection.java
index ca239fc01b..4b49794fbc 100644
--- a/ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/sections/DSPropertiesSection.java
+++ b/ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/sections/DSPropertiesSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2016 Code 9 Corporation and others.
+ * Copyright (c) 2008, 2017 Code 9 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
@@ -10,6 +10,7 @@
* EclipseSource Corporation - ongoing enhancements
* Rafael Oliveira Nobrega <rafael.oliveira@gmail.com> - bug 244997, 248216
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487988
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ds.ui.editor.sections;
@@ -485,7 +486,7 @@ public class DSPropertiesSection extends TableSection {
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
@Override
diff --git a/ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/sections/DSProvideSection.java b/ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/sections/DSProvideSection.java
index a9c0ddc2b2..a8594277d4 100644
--- a/ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/sections/DSProvideSection.java
+++ b/ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/sections/DSProvideSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2016 Code 9 Corporation and others.
+ * Copyright (c) 2008, 2017 Code 9 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
@@ -9,6 +9,7 @@
* Code 9 Corporation - initial API and implementation
* EclipseSource Corporation - ongoing enhancements
* Rafael Oliveira Nobrega <rafael.oliveira@gmail.com> - bug 242028
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ds.ui.editor.sections;
@@ -345,7 +346,7 @@ public class DSProvideSection extends TableSection implements
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
@Override
diff --git a/ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/sections/DSReferenceSection.java b/ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/sections/DSReferenceSection.java
index 2c8de7ff88..7a9b379fd1 100644
--- a/ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/sections/DSReferenceSection.java
+++ b/ds/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/sections/DSReferenceSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2016 Code 9 Corporation and others.
+ * Copyright (c) 2008, 2017 Code 9 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
@@ -9,6 +9,7 @@
* IBM Corporation - initial API and implementation
* EclipseSource Corporation - ongoing enhancements
* Rafael Oliveira Nobrega <rafael.oliveira@gmail.com> - bug 242028, 248226
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ds.ui.editor.sections;
@@ -430,7 +431,7 @@ public class DSReferenceSection extends TableSection implements
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
@Override
diff --git a/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/comp/CompCSMasterTreeSection.java b/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/comp/CompCSMasterTreeSection.java
index 6eddfa1c93..57d63c9cb2 100755
--- a/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/comp/CompCSMasterTreeSection.java
+++ b/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/comp/CompCSMasterTreeSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2013 IBM Corporation and others.
+ * Copyright (c) 2006, 2017 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
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Alexander Kurtakov <akurtako@redhat.com> - bug 415649
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ua.ui.editor.cheatsheet.comp;
@@ -117,7 +118,7 @@ public class CompCSMasterTreeSection extends TreeSection implements ICSMaster {
private void createTree(Composite container, FormToolkit toolkit) {
TreePart treePart = getTreePart();
- createViewerPartControl(container, SWT.SINGLE, 2, toolkit);
+ createViewerPartControl(container, SWT.MULTI, 2, toolkit);
fTreeViewer = treePart.getTreeViewer();
fTreeViewer.setContentProvider(new CompCSContentProvider());
fTreeViewer.setLabelProvider(PDEUserAssistanceUIPlugin.getDefault()
@@ -571,7 +572,7 @@ public class CompCSMasterTreeSection extends TreeSection implements ICSMaster {
handleDeleteAction();
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
private void handleDeleteAction() {
diff --git a/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/SimpleCSMasterTreeSection.java b/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/SimpleCSMasterTreeSection.java
index 344e037bbf..0f5154b2fe 100755
--- a/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/SimpleCSMasterTreeSection.java
+++ b/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/SimpleCSMasterTreeSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2013 IBM Corporation and others.
+ * Copyright (c) 2006, 2017 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
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Alexander Kurtakov <akurtako@redhat.com> - bug 415649
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ua.ui.editor.cheatsheet.simple;
@@ -1101,7 +1102,7 @@ public class SimpleCSMasterTreeSection extends TreeSection implements ICSMaster
doPaste();
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
private void handleDeleteAction() {
diff --git a/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/ctxhelp/CtxHelpTreeSection.java b/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/ctxhelp/CtxHelpTreeSection.java
index ba851b511b..f0eeca5dc6 100644
--- a/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/ctxhelp/CtxHelpTreeSection.java
+++ b/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/ctxhelp/CtxHelpTreeSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2013 IBM Corporation and others.
+ * Copyright (c) 2008, 2017 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
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Alexander Kurtakov <akurtako@redhat.com> - bug 415649
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ua.ui.editor.ctxhelp;
@@ -631,7 +632,7 @@ public class CtxHelpTreeSection extends TreeSection {
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
@Override
diff --git a/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/toc/TocTreeSection.java b/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/toc/TocTreeSection.java
index 2e544ccbdb..1b02a2b549 100755
--- a/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/toc/TocTreeSection.java
+++ b/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/toc/TocTreeSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 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
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Alexander Kurtakov <akurtako@redhat.com> - bug 415649
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ua.ui.editor.toc;
@@ -561,7 +562,7 @@ public class TocTreeSection extends TreeSection {
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
@Override
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDESection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDESection.java
index 9c70d54ae2..594bb904fb 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDESection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDESection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2015 IBM Corporation and others.
+ * Copyright (c) 2003, 2017 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
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor;
@@ -51,6 +52,11 @@ public abstract class PDESection extends SectionPart implements IContextPart, IA
return false;
}
+ protected void handleSelectAll() {
+ // NO-OP
+ // Sub-classes to override
+ }
+
@Override
public void modelChanged(IModelChangedEvent e) {
if (e.getChangeType() == IModelChangedEvent.WORLD_CHANGED)
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/StructuredViewerSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/StructuredViewerSection.java
index daa0e5c0b3..3d71297125 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/StructuredViewerSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/StructuredViewerSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor;
@@ -15,6 +16,7 @@ import org.eclipse.jface.viewers.*;
import org.eclipse.pde.internal.ui.parts.StructuredViewerPart;
import org.eclipse.swt.dnd.*;
import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.forms.widgets.FormToolkit;
public abstract class StructuredViewerSection extends PDESection implements IPDEDragParticipant, IPDEDropParticipant {
@@ -95,6 +97,15 @@ public abstract class StructuredViewerSection extends PDESection implements IPDE
protected void buttonSelected(int index) {
}
+ @Override
+ public boolean doGlobalAction(String actionId) {
+ if (actionId.equals(ActionFactory.SELECT_ALL.getId())) {
+ handleSelectAll();
+ return true;
+ }
+ return super.doGlobalAction(actionId);
+ }
+
protected void doPaste() {
ISelection selection = getViewerSelection();
IStructuredSelection ssel = (IStructuredSelection) selection;
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/TableSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/TableSection.java
index 6a25ce055f..f742508b2c 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/TableSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/TableSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -7,11 +7,13 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.osgi.util.NLS;
import org.eclipse.pde.internal.ui.PDEUIMessages;
import org.eclipse.pde.internal.ui.parts.EditableTablePart;
@@ -128,4 +130,18 @@ public abstract class TableSection extends StructuredViewerSection {
protected boolean createCount() {
return false;
}
+
+ @Override
+ protected void handleSelectAll() {
+ TableViewer viewer = getTablePart().getTableViewer();
+ if (viewer == null) {
+ return;
+ }
+ Table table = viewer.getTable();
+ if (table == null) {
+ return;
+ }
+ table.selectAll();
+ selectionChanged(viewer.getStructuredSelection());
+ }
}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/TreeSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/TreeSection.java
index 66d985a16c..5c55589825 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/TreeSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/TreeSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor;
@@ -15,8 +16,7 @@ import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.pde.internal.ui.parts.StructuredViewerPart;
import org.eclipse.pde.internal.ui.parts.TreePart;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.*;
import org.eclipse.ui.forms.widgets.FormToolkit;
public abstract class TreeSection extends StructuredViewerSection {
@@ -99,4 +99,18 @@ public abstract class TreeSection extends StructuredViewerSection {
protected void enableButtons() {
}
+
+ @Override
+ protected void handleSelectAll() {
+ TreeViewer viewer = getTreePart().getTreeViewer();
+ if (viewer == null) {
+ return;
+ }
+ Tree tree = viewer.getTree();
+ if (tree == null) {
+ return;
+ }
+ tree.selectAll();
+ selectionChanged(viewer.getStructuredSelection());
+ }
}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildClasspathSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildClasspathSection.java
index 25ce4901a2..6f84adfd94 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildClasspathSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildClasspathSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487943
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.build;
@@ -159,7 +160,7 @@ public class BuildClasspathSection extends TableSection {
@Override
public void createClient(Section section, FormToolkit toolkit) {
Composite container = createClientContainer(section, 2, toolkit);
- createViewerPartControl(container, SWT.FULL_SELECTION, 2, toolkit);
+ createViewerPartControl(container, SWT.MULTI | SWT.FULL_SELECTION, 2, toolkit);
EditableTablePart tablePart = getTablePart();
tablePart.setEditable(true);
@@ -228,7 +229,7 @@ public class BuildClasspathSection extends TableSection {
}
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
public void enableSection(boolean enable) {
@@ -245,20 +246,21 @@ public class BuildClasspathSection extends TableSection {
}
private void handleDelete() {
- Object selection = ((IStructuredSelection) fTableViewer.getSelection()).getFirstElement();
- if (selection != null && selection instanceof String) {
- IBuild build = getBuildModel().getBuild();
- IBuildEntry entry = build.getEntry(IBuildPropertiesConstants.PROPERTY_JAR_EXTRA_CLASSPATH);
- if (entry != null) {
- try {
- entry.removeToken(selection.toString());
-
- String[] tokens = entry.getTokens();
- if (tokens.length == 0)
- build.remove(entry);
-
- } catch (CoreException e) {
- PDEPlugin.logException(e);
+ for (Object selection : fTableViewer.getStructuredSelection().toList()) {
+ if (selection != null && selection instanceof String) {
+ IBuild build = getBuildModel().getBuild();
+ IBuildEntry entry = build.getEntry(IBuildPropertiesConstants.PROPERTY_JAR_EXTRA_CLASSPATH);
+ if (entry != null) {
+ try {
+ entry.removeToken(selection.toString());
+
+ String[] tokens = entry.getTokens();
+ if (tokens.length == 0)
+ build.remove(entry);
+
+ } catch (CoreException e) {
+ PDEPlugin.logException(e);
+ }
}
}
}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/CategorySection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/CategorySection.java
index edb55f05e9..85cde9e578 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/CategorySection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/CategorySection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
-* Copyright (c) 2009, 2016 EclipseSource and others. All rights reserved. This
+* Copyright (c) 2009, 2017 EclipseSource 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 http://www.eclipse.org/legal/epl-v10.html
@@ -8,7 +8,7 @@
* EclipseSource - initial API and implementation
* IBM Corporation - ongoing enhancements
* Red Hat Inc - Support for bundles and nested categories
-* Martin Karpisek <martin.karpisek@gmail.com> - Bug 296392
+* Martin Karpisek <martin.karpisek@gmail.com> - Bug 296392, 351356
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487943
******************************************************************************/
package org.eclipse.pde.internal.ui.editor.category;
@@ -745,11 +745,7 @@ public class CategorySection extends TreeSection implements IFeatureModelListene
if (actionId.equals(ActionFactory.DELETE.getId())) {
return handleRemove();
}
- if (actionId.equals(ActionFactory.SELECT_ALL.getId())) {
- fCategoryViewer.getTree().selectAll();
- refresh();
- }
- return false;
+ return super.doGlobalAction(actionId);
}
@Override
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/DownloadStatsSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/DownloadStatsSection.java
index e1c5955117..3fc787043e 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/DownloadStatsSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/DownloadStatsSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2014, 2016 Rapicorp Corporation and others.
+ * Copyright (c) 2014, 2017 Rapicorp 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
@@ -8,6 +8,7 @@
* Contributors:
* Rapicorp Corporation - initial API and implementation
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487988
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.category;
@@ -232,7 +233,7 @@ public class DownloadStatsSection extends TableSection {
handleRemove();
return false;
}
- return false;
+ return super.doGlobalAction(actionId);
}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/RepositoryReferenceSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/RepositoryReferenceSection.java
index 0db88caf8c..0322f5854a 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/RepositoryReferenceSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/RepositoryReferenceSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2014, 2015 Rapicorp Corporation and others.
+ * Copyright (c) 2014, 2017 Rapicorp 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
@@ -7,6 +7,7 @@
*
* Contributors:
* Rapicorp Corporation - initial API and implementation
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.category;
@@ -304,7 +305,7 @@ public class RepositoryReferenceSection extends TableSection {
handleDelete();
return false;
}
- return false;
+ return super.doGlobalAction(actionId);
}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/IncludedFeaturesSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/IncludedFeaturesSection.java
index 15c27d9bf9..b5b6a2dc45 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/IncludedFeaturesSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/IncludedFeaturesSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -11,6 +11,7 @@
* Fabian Miehe - Bug 440420
* Simon Scholz <simon.scholz@vogella.com> - Bug 444808
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487943
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.feature;
@@ -273,13 +274,6 @@ public class IncludedFeaturesSection extends TableSection implements IFeatureMod
return false;
}
- private void handleSelectAll() {
- IStructuredContentProvider provider = (IStructuredContentProvider) fIncludesViewer.getContentProvider();
- Object[] elements = provider.getElements(fIncludesViewer.getInput());
- StructuredSelection ssel = new StructuredSelection(elements);
- fIncludesViewer.setSelection(ssel);
- }
-
private void handleDelete() {
IStructuredSelection ssel = (IStructuredSelection) fIncludesViewer.getSelection();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/PluginSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/PluginSection.java
index a13e2c9b0b..593c35c39b 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/PluginSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/PluginSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -11,6 +11,7 @@
* Fabian Miehe - Bug 440420
* Simon Scholz <simon.scholz@vogella.com> - Bug 444808
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487943
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.feature;
@@ -223,13 +224,6 @@ public class PluginSection extends TableSection implements IPluginModelListener
return true;
}
- private void handleSelectAll() {
- IStructuredContentProvider provider = (IStructuredContentProvider) fPluginViewer.getContentProvider();
- Object[] elements = provider.getElements(fPluginViewer.getInput());
- StructuredSelection ssel = new StructuredSelection(elements);
- fPluginViewer.setSelection(ssel);
- }
-
private void handleDelete() {
IStructuredSelection ssel = (IStructuredSelection) fPluginViewer.getSelection();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/RequiresSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/RequiresSection.java
index 7c9876acd3..7cccc11896 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/RequiresSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/RequiresSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -11,6 +11,7 @@
* Marc-Andre Laperle (Ericsson) - Handle double click (Bug 328467)
* Fabian Miehe - Bug 440420
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487943
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.feature;
@@ -316,13 +317,6 @@ public class RequiresSection extends TableSection implements IPluginModelListene
}
}
- private void handleSelectAll() {
- IStructuredContentProvider provider = (IStructuredContentProvider) fPluginViewer.getContentProvider();
- Object[] elements = provider.getElements(fPluginViewer.getInput());
- StructuredSelection ssel = new StructuredSelection(elements);
- fPluginViewer.setSelection(ssel);
- }
-
@Override
protected void handleDoubleClick(IStructuredSelection selection) {
handleOpen();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/URLSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/URLSection.java
index f5c2d8c22e..e28412c869 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/URLSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/URLSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487943
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.feature;
@@ -157,13 +158,6 @@ public class URLSection extends TableSection {
}
}
- private void handleSelectAll() {
- IStructuredContentProvider provider = (IStructuredContentProvider) fUrlViewer.getContentProvider();
- Object[] elements = provider.getElements(fUrlViewer.getInput());
- StructuredSelection ssel = new StructuredSelection(elements);
- fUrlViewer.setSelection(ssel);
- }
-
private void handleDelete() {
IStructuredSelection ssel = (IStructuredSelection) fUrlViewer.getSelection();
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/DependencyManagementSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/DependencyManagementSection.java
index 3041422e1d..e4e6c65a6c 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/DependencyManagementSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/DependencyManagementSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -11,6 +11,7 @@
* Anyware Technologies - ongoing enhancements
* Alexander Kurtakov <akurtako@redhat.com> - bug 415649
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487988
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.plugin;
@@ -510,7 +511,7 @@ public class DependencyManagementSection extends TableSection implements IPlugin
doPaste();
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExecutionEnvironmentSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExecutionEnvironmentSection.java
index 7c17d800b9..fe3c4be68d 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExecutionEnvironmentSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExecutionEnvironmentSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487988
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.plugin;
@@ -441,7 +442,7 @@ public class ExecutionEnvironmentSection extends TableSection {
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
@Override
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExportPackageSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExportPackageSection.java
index 79ece9e161..3edc8d9c42 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExportPackageSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExportPackageSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2016 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 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
@@ -10,6 +10,7 @@
* Remy Chi Jian Suen <remy.suen@gmail.com> - bug 200756
* Joern Dinkla <devnull@dinkla.com> - bug 200757
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487988
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.plugin;
@@ -151,7 +152,7 @@ public class ExportPackageSection extends TableSection {
doPaste();
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
@Override
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExportPackageVisibilitySection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExportPackageVisibilitySection.java
index ac7e7eb019..7cfd2151cf 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExportPackageVisibilitySection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExportPackageVisibilitySection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -9,6 +9,7 @@
* IBM Corporation - initial API and implementation
* Benjamin Cabe <benjamin.cabe@anyware-tech.com> - bug 201572
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487943
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.plugin;
@@ -191,7 +192,7 @@ public class ExportPackageVisibilitySection extends TableSection implements IPar
doPaste();
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
@Override
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionPointsSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionPointsSection.java
index bedc1a1d8d..376a5881ea 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionPointsSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionPointsSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2016 IBM Corporation and others.
+ * Copyright (c) 2003, 2017 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
@@ -9,6 +9,7 @@
* IBM Corporation - initial API and implementation
* Ketan Padegaonkar <KetanPadegaonkar@gmail.com> - bug 233682
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487943
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.plugin;
@@ -128,7 +129,7 @@ public class ExtensionPointsSection extends TableSection {
doPaste();
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
@Override
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionsSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionsSection.java
index c0dafbf2e7..48003915d6 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionsSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionsSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -12,6 +12,7 @@
* Alexander Kurtakov <akurtako@redhat.com> - bug 415649
* Brian de Alwis (MTI) - bug 429420
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487943
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.plugin;
@@ -393,12 +394,8 @@ public class ExtensionsSection extends TreeSection implements IPropertyChangeLis
}
return true;
}
- if (actionId.equals(ActionFactory.SELECT_ALL.getId())) {
- handleSelectAll();
- return true;
- }
- return false;
+ return super.doGlobalAction(actionId);
}
@Override
@@ -707,7 +704,8 @@ public class ExtensionsSection extends TreeSection implements IPropertyChangeLis
}
}
- private void handleSelectAll() {
+ @Override
+ protected void handleSelectAll() {
fExtensionTree.getTree().selectAll();
updateButtons(fFilteredTree.getViewer().getSelection());
}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ImportPackageSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ImportPackageSection.java
index fa4fd4b88e..a4c1deb664 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ImportPackageSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ImportPackageSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2016 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 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
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487988
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.plugin;
@@ -244,7 +245,7 @@ public class ImportPackageSection extends TableSection {
doPaste();
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
@Override
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/LibrarySection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/LibrarySection.java
index 82da691a17..01a7ea30f9 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/LibrarySection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/LibrarySection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487943
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.plugin;
@@ -244,7 +245,7 @@ public class LibrarySection extends TableSection implements IBuildPropertiesCons
doPaste();
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
@Override
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/RequiresSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/RequiresSection.java
index dce1151387..625a123f30 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/RequiresSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/RequiresSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -9,6 +9,7 @@
* IBM Corporation - initial API and implementation
* Alexander Kurtakov <akurtako@redhat.com> - bug 415649
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487988
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.plugin;
@@ -235,7 +236,7 @@ public class RequiresSection extends TableSection implements IPluginModelListene
doPaste();
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
@Override
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/FeatureSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/FeatureSection.java
index 8b61cce149..9b9c17ae4c 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/FeatureSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/FeatureSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2016 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 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
@@ -9,6 +9,7 @@
* IBM Corporation - initial API and implementation
* Alexander Kurtakov <akurtako@redhat.com> - bug 415649
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487988
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.product;
@@ -234,7 +235,7 @@ public class FeatureSection extends TableSection implements IPropertyChangeListe
doPaste();
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
@Override
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/PluginSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/PluginSection.java
index b03feb718f..0ce6fa9905 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/PluginSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/PluginSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2016 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 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
@@ -11,6 +11,7 @@
* Alexander Kurtakov <akurtako@redhat.com> - bug 415649
* Simon Scholz <simon.scholz@vogella.com> - bug 440275, 444808
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487988
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.product;
@@ -286,7 +287,7 @@ public class PluginSection extends TableSection implements IPluginModelListener
doPaste();
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
@Override
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/UpdatesSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/UpdatesSection.java
index 8d11e13102..5181ec4759 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/UpdatesSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/UpdatesSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2014, 2015 Rapicorp Corporation and others.
+ * Copyright (c) 2014, 2017 Rapicorp 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
@@ -7,6 +7,7 @@
*
* Contributors:
* Rapicorp Corporation - initial API and implementation
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.product;
@@ -297,7 +298,7 @@ public class UpdatesSection extends TableSection {
handleDelete();
return false;
}
- return false;
+ return super.doGlobalAction(actionId);
}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/ElementSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/ElementSection.java
index 8abfc7c872..75ff332cd5 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/ElementSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/ElementSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2016 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 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
@@ -9,6 +9,7 @@
* IBM Corporation - initial API and implementation
* Alexander Kurtakov <akurtako@redhat.com> - bug 415649
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487943
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.schema;
@@ -224,7 +225,7 @@ public class ElementSection extends TreeSection {
doPaste();
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
@Override
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaIncludesSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaIncludesSection.java
index ac1520e400..b78cc0fe42 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaIncludesSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaIncludesSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Code 9 Corporation - ongoing enhancements
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.schema;
@@ -139,7 +140,7 @@ public class SchemaIncludesSection extends TableSection {
handleRemoveInclude();
return true;
}
- return false;
+ return super.doGlobalAction(actionId);
}
private ISchema getSchema() {
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/ArchiveSection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/ArchiveSection.java
index 5ac9bf467c..086afaab9a 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/ArchiveSection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/ArchiveSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487943
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.site;
@@ -161,7 +162,7 @@ public class ArchiveSection extends PDESection {
}
private void createTable(Composite container, FormToolkit toolkit) {
- fTable = toolkit.createTable(container, SWT.FULL_SELECTION);
+ fTable = toolkit.createTable(container, SWT.MULTI | SWT.FULL_SELECTION);
GridData gd = new GridData(GridData.FILL_BOTH);
gd.heightHint = 100;
fTable.setLayoutData(gd);
@@ -246,7 +247,13 @@ public class ArchiveSection extends PDESection {
});
return true;
}
- return false;
+
+ if (actionId.equals(ActionFactory.SELECT_ALL.getId())) {
+ handleSelectAll();
+ return true;
+ }
+
+ return super.doGlobalAction(actionId);
}
@Override
@@ -295,4 +302,18 @@ public class ArchiveSection extends PDESection {
}
return super.setFormInput(input);
}
+
+ @Override
+ protected void handleSelectAll() {
+ TableViewer viewer = fViewer;
+ if (viewer == null) {
+ return;
+ }
+ Table table = viewer.getTable();
+ if (table == null) {
+ return;
+ }
+ table.selectAll();
+ handleSelectionChanged();
+ }
}
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/CategorySection.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/CategorySection.java
index f44a5b93bf..b64c256afe 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/CategorySection.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/CategorySection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2016 IBM Corporation and others.
+ * Copyright (c) 2003, 2017 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
@@ -9,6 +9,7 @@
* IBM Corporation - initial API and implementation
* Bartosz Michalik <bartosz.michalik@gmail.com> - bug 181878
* Lars Vogel <Lars.Vogel@vogella.com> - Bug 487943
+ * Martin Karpisek <martin.karpisek@gmail.com> - Bug 351356
*******************************************************************************/
package org.eclipse.pde.internal.ui.editor.site;
@@ -513,11 +514,7 @@ public class CategorySection extends TreeSection implements IFeatureModelListene
if (actionId.equals(ActionFactory.DELETE.getId())) {
return handleRemove();
}
- if (actionId.equals(ActionFactory.SELECT_ALL.getId())) {
- fCategoryViewer.getTree().selectAll();
- refresh();
- }
- return false;
+ return super.doGlobalAction(actionId);
}
@Override

Back to the top