Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Fedorov2020-07-25 07:38:05 +0000
committerAlexander Fedorov2020-07-28 09:15:03 +0000
commitf7efa5595fa9df6b1a703d5a0bdb165a7a2b9093 (patch)
treed5db5f31f51a4aa57e0218c2e74406380f37aa2a
parent6b95639379e54637a6801569c9a189998135e3ab (diff)
downloadeclipse.platform.team-f7efa5595fa9df6b1a703d5a0bdb165a7a2b9093.tar.gz
eclipse.platform.team-f7efa5595fa9df6b1a703d5a0bdb165a7a2b9093.tar.xz
eclipse.platform.team-f7efa5595fa9df6b1a703d5a0bdb165a7a2b9093.zip
Add type parameters to collections for org.eclipse.team.internal.ui.mapping Change-Id: Ic36b17f60816692085b5232f5816774dc81a9083 Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/AbstractCompareInput.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java8
3 files changed, 9 insertions, 9 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/AbstractCompareInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/AbstractCompareInput.java
index 400e3a6b6..bf4e84167 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/AbstractCompareInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/AbstractCompareInput.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -32,7 +32,7 @@ public abstract class AbstractCompareInput implements ICompareInput {
private ITypedElement left;
private ITypedElement right;
private int kind;
- private final ListenerList listeners = new ListenerList(ListenerList.IDENTITY);
+ private final ListenerList<ICompareInputChangeListener> listeners = new ListenerList<>(ListenerList.IDENTITY);
public AbstractCompareInput(int kind,
ITypedElement ancestor,
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java
index db7fc0229..5f862535d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2017 IBM Corporation and others.
+ * Copyright (c) 2006, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -89,7 +89,7 @@ public abstract class CompareInputChangeNotifier implements
private class InputChangeEventHandler extends BackgroundEventHandler {
private final Set<ICompareInput> changedInputs = new HashSet<>();
- private final List pendingRunnables = new ArrayList();
+ private final List<Event> pendingRunnables = new ArrayList<>();
protected InputChangeEventHandler() {
super(TeamUIMessages.CompareInputChangeNotifier_0, TeamUIMessages.CompareInputChangeNotifier_1);
@@ -105,7 +105,7 @@ public abstract class CompareInputChangeNotifier implements
if (changedInputs.isEmpty() && pendingRunnables.isEmpty())
return false;
toDispatch = changedInputs.toArray(new ICompareInput[changedInputs.size()]);
- events = (RunnableEvent[]) pendingRunnables.toArray(new RunnableEvent[pendingRunnables.size()]);
+ events = pendingRunnables.toArray(new RunnableEvent[pendingRunnables.size()]);
changedInputs.clear();
pendingRunnables.clear();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java
index 55e3a64eb..b900c194a 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2017 IBM Corporation and others.
+ * Copyright (c) 2006, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -166,7 +166,7 @@ public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage
@Override
protected boolean checkWorkingSetElements() {
- List allWorkingSetElements = new ArrayList();
+ List<Object> allWorkingSetElements = new ArrayList<>();
IWorkingSet[] workingSets = getWorkingSets();
for (IWorkingSet set : workingSets) {
allWorkingSetElements.addAll(computeSelectedResources(new StructuredSelection(set.getElements())));
@@ -175,8 +175,8 @@ public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage
return !allWorkingSetElements.isEmpty();
}
- private Collection computeSelectedResources(StructuredSelection selection) {
- List result = new ArrayList();
+ private Collection<Object> computeSelectedResources(StructuredSelection selection) {
+ List<Object> result = new ArrayList<>();
for (Iterator iter = selection.iterator(); iter.hasNext();) {
Object element = iter.next();
ResourceMapping mapping = Utils.getResourceMapping(element);

Back to the top