diff options
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); |