Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-05-19 03:07:13 -0400
committerAlexander Kurtakov2017-05-19 04:42:08 -0400
commitbcaae52874672d24ee39738e02b1236711673f8d (patch)
tree2e5d331300072bc87244fbe55ea7221afd6e7be6 /changelog
parent8723f076b325d0dc7b0d9b71c02f04e2a5e551ff (diff)
downloadorg.eclipse.linuxtools-bcaae52874672d24ee39738e02b1236711673f8d.tar.gz
org.eclipse.linuxtools-bcaae52874672d24ee39738e02b1236711673f8d.tar.xz
org.eclipse.linuxtools-bcaae52874672d24ee39738e02b1236711673f8d.zip
Make use IStructuredSelection directly.
Request the structured selection directly instead of getting the selection and checking whether it's instance of IStructuredSelection or just blindly cast. Change-Id: Id1b3b7a2e0398b83fa5a736fcbc484f81c14183a Signed-off-by: Alexander Kurtakov <akurtako@redhat.com> Reviewed-on: https://git.eclipse.org/r/97513 Tested-by: Hudson CI
Diffstat (limited to 'changelog')
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/ChangeLogContainerSelectionGroup.java5
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/InsertChangeLogKeyHandler.java6
2 files changed, 3 insertions, 8 deletions
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/ChangeLogContainerSelectionGroup.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/ChangeLogContainerSelectionGroup.java
index 444edfe9ea..24e372b46b 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/ChangeLogContainerSelectionGroup.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/ChangeLogContainerSelectionGroup.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 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
@@ -211,8 +211,7 @@ public class ChangeLogContainerSelectionGroup extends Composite {
treeViewer.setComparator(new ViewerComparator());
treeViewer.setUseHashlookup(true);
treeViewer.addSelectionChangedListener(event -> {
- IStructuredSelection selection = (IStructuredSelection) event
- .getSelection();
+ IStructuredSelection selection = event.getStructuredSelection();
containerSelectionChanged((IContainer) selection
.getFirstElement()); // allow null
});
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/InsertChangeLogKeyHandler.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/InsertChangeLogKeyHandler.java
index e418780057..c9ef14724a 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/InsertChangeLogKeyHandler.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/InsertChangeLogKeyHandler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 Phil Muldoon <pkmuldoon@picobot.org>.
+ * Copyright (c) 2006, 2017 Phil Muldoon <pkmuldoon@picobot.org>.
* 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
@@ -27,10 +27,6 @@ import org.eclipse.ui.IWorkbenchWindowActionDelegate;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * @author pmuldoon (Phil Muldoon)
- */
public class InsertChangeLogKeyHandler extends ChangeLogAction implements
IHandler, IWorkbenchWindowActionDelegate {

Back to the top