diff options
author | Alexander Fedorov | 2020-07-25 07:38:05 +0000 |
---|---|---|
committer | Alexander Fedorov | 2020-07-28 09:15:03 +0000 |
commit | f7efa5595fa9df6b1a703d5a0bdb165a7a2b9093 (patch) | |
tree | d5db5f31f51a4aa57e0218c2e74406380f37aa2a | |
parent | 6b95639379e54637a6801569c9a189998135e3ab (diff) | |
download | eclipse.platform.team-f7efa5595fa9df6b1a703d5a0bdb165a7a2b9093.tar.gz eclipse.platform.team-f7efa5595fa9df6b1a703d5a0bdb165a7a2b9093.tar.xz eclipse.platform.team-f7efa5595fa9df6b1a703d5a0bdb165a7a2b9093.zip |
Add type parameters for org.eclipse.team.internal.ui.mappingY20200805-1200Y20200804-1200Y20200801-1200Y20200729-1200Y20200729-0630Y20200728-0600I20200805-1800I20200805-0750I20200805-0630I20200804-1800I20200803-1800I20200803-0210I20200801-1800I20200801-0010I20200731-2040I20200731-1800I20200731-0520I20200730-1800I20200729-1800I20200729-0120I20200728-1800I20200728-1120
Add type parameters to collections for
org.eclipse.team.internal.ui.mapping
Change-Id: Ic36b17f60816692085b5232f5816774dc81a9083
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
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); |