Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 16:20:42 +0000
committerJonah Graham2018-11-22 21:55:36 +0000
commitcaf2292768deccd885b5b6989b731742e2e5edf4 (patch)
tree711a6088f2e17c7e31ebb51af1eadc1af00768e5 /build/org.eclipse.cdt.make.ui
parent8844a8f9f22802fedffa3cb2a8a21b041aa64b74 (diff)
downloadorg.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.tar.gz
org.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.tar.xz
org.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.zip
Bug 540373: Cleanup: Remove redundant type arguments
This was done by selecting all projects in Eclipse then Source -> Clean Up... -> choosing: - Remove redundant type arguments and completing the wizard Change-Id: Iaecc7010f097b4b1fabd29ccaa34ccb23a716fbf
Diffstat (limited to 'build/org.eclipse.cdt.make.ui')
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeEnvironmentBlock.java6
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java8
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/FileTransferDropTargetListener.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/LocalTransferDropTargetListener.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetDndUtil.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetTransferData.java4
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/TextTransferDropTargetListener.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/AddBuildTargetAction.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileContentOutlinePage.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileToggleCommentAction.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/NotifyingReconciler.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/OpenIncludeAction.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/ProjectionMakefileUpdater.java16
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/WorkingCopyManager.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java6
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/MakefileEditorPreferencePage.java4
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElement.java4
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/ColorManager.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/AbstractMakefileCodeScanner.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCodeScanner.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCompletionProcessor.java14
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefilePartitionScanner.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/MakeContentProvider.java10
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/TargetBuild.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java4
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/AbstractDiscoveryOptionsBlock.java4
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveredPathContainerPage.java16
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveryOptionsBlock.java4
28 files changed, 65 insertions, 65 deletions
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeEnvironmentBlock.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeEnvironmentBlock.java
index 57b3d30cfc1..de4e28f8d14 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeEnvironmentBlock.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeEnvironmentBlock.java
@@ -311,7 +311,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage {
// Convert the table's items into a Map so that this can be saved in the
// configuration's attributes.
TableItem[] items = environmentTable.getTable().getItems();
- Map<String, String> map = new HashMap<String, String>(items.length);
+ Map<String, String> map = new HashMap<>(items.length);
for (int i = 0; i < items.length; i++) {
EnvironmentVariable var = (EnvironmentVariable) items[i].getData();
map.put(var.getName(), var.getValue());
@@ -607,7 +607,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage {
private Map<String, EnvironmentVariable> getNativeEnvironment() {
@SuppressWarnings({ "unchecked", "rawtypes" })
Map<String, String> stringVars = (Hashtable) EnvironmentReader.getEnvVars();
- HashMap<String, EnvironmentVariable> vars = new HashMap<String, EnvironmentVariable>();
+ HashMap<String, EnvironmentVariable> vars = new HashMap<>();
for (Iterator<String> i = stringVars.keySet().iterator(); i.hasNext();) {
String key = i.next();
String value = stringVars.get(key);
@@ -713,7 +713,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage {
}
};
- TreeMap<String, EnvironmentVariable> envVars = new TreeMap<String, EnvironmentVariable>(comparator);
+ TreeMap<String, EnvironmentVariable> envVars = new TreeMap<>(comparator);
envVars.putAll((Map<String, EnvironmentVariable>) inputElement);
elements = new EnvironmentVariable[envVars.size()];
int index = 0;
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java
index 69a88e63bc2..7896414156e 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java
@@ -51,10 +51,10 @@ public class MultipleInputDialog extends Dialog {
protected Composite panel;
- protected List<FieldSummary> fieldList = new ArrayList<FieldSummary>();
- protected List<Text> controlList = new ArrayList<Text>();
- protected List<Validator> validators = new ArrayList<Validator>();
- protected Map<Object, String> valueMap = new HashMap<Object, String>();
+ protected List<FieldSummary> fieldList = new ArrayList<>();
+ protected List<Text> controlList = new ArrayList<>();
+ protected List<Validator> validators = new ArrayList<>();
+ protected Map<Object, String> valueMap = new HashMap<>();
private String title;
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/FileTransferDropTargetListener.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/FileTransferDropTargetListener.java
index 0f7e2105850..1958eebf6ea 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/FileTransferDropTargetListener.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/FileTransferDropTargetListener.java
@@ -117,7 +117,7 @@ public class FileTransferDropTargetListener extends AbstractContainerAreaDropAda
*/
private static IMakeTarget[] prepareMakeTargetsFromFiles(String[] filenames, IContainer dropContainer,
Shell shell) {
- List<IMakeTarget> makeTargetsList = new ArrayList<IMakeTarget>(filenames.length);
+ List<IMakeTarget> makeTargetsList = new ArrayList<>(filenames.length);
int errorCount = 0;
int nonFileCount = 0;
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/LocalTransferDropTargetListener.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/LocalTransferDropTargetListener.java
index 97762064d71..12b5023d616 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/LocalTransferDropTargetListener.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/LocalTransferDropTargetListener.java
@@ -206,7 +206,7 @@ public class LocalTransferDropTargetListener extends AbstractContainerAreaDropAd
private static IMakeTarget[] prepareMakeTargetsFromSelection(IStructuredSelection selection,
IContainer dropContainer) {
List<?> elements = selection.toList();
- List<IMakeTarget> makeTargetsList = new ArrayList<IMakeTarget>(elements.size());
+ List<IMakeTarget> makeTargetsList = new ArrayList<>(elements.size());
for (Object element : elements) {
if (element instanceof IMakeTarget) {
makeTargetsList.add((IMakeTarget) element);
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetDndUtil.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetDndUtil.java
index a2102124d0c..135321b5871 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetDndUtil.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetDndUtil.java
@@ -100,7 +100,7 @@ public class MakeTargetDndUtil {
return false;
}
- List<String> names = new ArrayList<String>(selectedElements.size());
+ List<String> names = new ArrayList<>(selectedElements.size());
for (Object element : selectedElements) {
if (!(element instanceof IMakeTarget)) {
return false;
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetTransferData.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetTransferData.java
index 688ef39c687..e78f0853b06 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetTransferData.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetTransferData.java
@@ -127,7 +127,7 @@ public class MakeTargetTransferData {
*
*/
public MakeTargetTransferData() {
- makeTargetData = new ArrayList<MakeTargetData>();
+ makeTargetData = new ArrayList<>();
}
/**
@@ -175,7 +175,7 @@ public class MakeTargetTransferData {
*/
public IMakeTarget[] createMakeTargets(IProject project) {
IMakeTargetManager makeTargetManager = MakeCorePlugin.getDefault().getTargetManager();
- ArrayList<IMakeTarget> makeTargets = new ArrayList<IMakeTarget>(makeTargetData.size());
+ ArrayList<IMakeTarget> makeTargets = new ArrayList<>(makeTargetData.size());
String[] ids = makeTargetManager.getTargetBuilders(project);
String builderId = ids[0];
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/TextTransferDropTargetListener.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/TextTransferDropTargetListener.java
index 8487269cdfe..2da17066acf 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/TextTransferDropTargetListener.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/TextTransferDropTargetListener.java
@@ -113,7 +113,7 @@ public class TextTransferDropTargetListener extends AbstractContainerAreaDropAda
private static IMakeTarget[] prepareMakeTargetsFromString(String multilineText, IContainer container) {
if (container != null) {
String[] lines = multilineText.split("[\n\r]"); //$NON-NLS-1$
- List<IMakeTarget> makeTargets = new ArrayList<IMakeTarget>(lines.length);
+ List<IMakeTarget> makeTargets = new ArrayList<>(lines.length);
for (String command : lines) {
command = command.trim();
if (command.length() > 0) {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/AddBuildTargetAction.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/AddBuildTargetAction.java
index 34a9817b91a..b81084ddd90 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/AddBuildTargetAction.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/AddBuildTargetAction.java
@@ -142,7 +142,7 @@ public class AddBuildTargetAction extends Action {
if (!sel.isEmpty() && sel instanceof IStructuredSelection) {
List<?> list = ((IStructuredSelection) sel).toList();
if (list.size() > 0) {
- List<ITargetRule> targets = new ArrayList<ITargetRule>(list.size());
+ List<ITargetRule> targets = new ArrayList<>(list.size());
Object[] elements = list.toArray();
for (Object element : elements) {
if (element instanceof ITargetRule) {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileContentOutlinePage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileContentOutlinePage.java
index c5ed626f86a..b3167933b9a 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileContentOutlinePage.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileContentOutlinePage.java
@@ -120,7 +120,7 @@ public class MakefileContentOutlinePage extends ContentOutlinePage {
} else {
directives = new IDirective[0];
}
- List<IDirective> list = new ArrayList<IDirective>(directives.length);
+ List<IDirective> list = new ArrayList<>(directives.length);
for (IDirective directive : directives) {
if (showMacroDefinition && directive instanceof IMacroDefinition) {
list.add(directive);
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileToggleCommentAction.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileToggleCommentAction.java
index eb31a60c991..0e4ff8ac41f 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileToggleCommentAction.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileToggleCommentAction.java
@@ -335,7 +335,7 @@ public final class MakefileToggleCommentAction extends TextEditorAction {
fPrefixesMap = null;
String[] types = configuration.getConfiguredContentTypes(sourceViewer);
- Map<String, String[]> prefixesMap = new HashMap<String, String[]>(types.length);
+ Map<String, String[]> prefixesMap = new HashMap<>(types.length);
for (String type : types) {
String[] prefixes = configuration.getDefaultPrefixes(sourceViewer, type);
if (prefixes != null && prefixes.length > 0) {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/NotifyingReconciler.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/NotifyingReconciler.java
index a3e47b2d40a..a6d2290d2fb 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/NotifyingReconciler.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/NotifyingReconciler.java
@@ -24,7 +24,7 @@ import org.eclipse.jface.text.reconciler.MonoReconciler;
* NotifyingReconciler
*/
public class NotifyingReconciler extends MonoReconciler {
- private ArrayList<IReconcilingParticipant> fReconcilingParticipants = new ArrayList<IReconcilingParticipant>();
+ private ArrayList<IReconcilingParticipant> fReconcilingParticipants = new ArrayList<>();
/**
* Constructor for NotifyingReconciler.
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/OpenIncludeAction.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/OpenIncludeAction.java
index 47767995b11..a6e8d9947c1 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/OpenIncludeAction.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/OpenIncludeAction.java
@@ -106,7 +106,7 @@ public class OpenIncludeAction extends Action {
@SuppressWarnings("unchecked")
List<Object> list = ((IStructuredSelection) sel).toList();
if (list.size() > 0) {
- List<IInclude> includes = new ArrayList<IInclude>(list.size());
+ List<IInclude> includes = new ArrayList<>(list.size());
for (Object element : list) {
if (element instanceof IInclude) {
includes.add((IInclude) element);
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/ProjectionMakefileUpdater.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/ProjectionMakefileUpdater.java
index ee1cb015f65..a5ebc6dcd56 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/ProjectionMakefileUpdater.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/ProjectionMakefileUpdater.java
@@ -169,7 +169,7 @@ public class ProjectionMakefileUpdater implements IProjectionListener {
}
private Map<MakefileProjectionAnnotation, Position> computeAdditions(IParent parent) {
- Map<MakefileProjectionAnnotation, Position> map = new HashMap<MakefileProjectionAnnotation, Position>();
+ Map<MakefileProjectionAnnotation, Position> map = new HashMap<>();
computeAdditions(parent.getDirectives(), map);
return map;
}
@@ -242,9 +242,9 @@ public class ProjectionMakefileUpdater implements IProjectionListener {
fCachedDocument = provider.getDocument(fEditor.getEditorInput());
fAllowCollapsing = false;
- Map<MakefileProjectionAnnotation, Position> additions = new HashMap<MakefileProjectionAnnotation, Position>();
- List<MakefileProjectionAnnotation> deletions = new ArrayList<MakefileProjectionAnnotation>();
- List<MakefileProjectionAnnotation> updates = new ArrayList<MakefileProjectionAnnotation>();
+ Map<MakefileProjectionAnnotation, Position> additions = new HashMap<>();
+ List<MakefileProjectionAnnotation> deletions = new ArrayList<>();
+ List<MakefileProjectionAnnotation> updates = new ArrayList<>();
Map<MakefileProjectionAnnotation, Position> updated = computeAdditions((IParent) fInput);
Map<IDirective, List<MakefileProjectionAnnotation>> previous = createAnnotationMap(model);
@@ -306,8 +306,8 @@ public class ProjectionMakefileUpdater implements IProjectionListener {
return;
}
- List<MakefileProjectionAnnotation> newDeletions = new ArrayList<MakefileProjectionAnnotation>();
- List<MakefileProjectionAnnotation> newChanges = new ArrayList<MakefileProjectionAnnotation>();
+ List<MakefileProjectionAnnotation> newDeletions = new ArrayList<>();
+ List<MakefileProjectionAnnotation> newChanges = new ArrayList<>();
Iterator<MakefileProjectionAnnotation> deletionIterator = deletions.iterator();
outer: while (deletionIterator.hasNext()) {
@@ -369,7 +369,7 @@ public class ProjectionMakefileUpdater implements IProjectionListener {
}
private Map<IDirective, List<MakefileProjectionAnnotation>> createAnnotationMap(IAnnotationModel model) {
- Map<IDirective, List<MakefileProjectionAnnotation>> map = new HashMap<IDirective, List<MakefileProjectionAnnotation>>();
+ Map<IDirective, List<MakefileProjectionAnnotation>> map = new HashMap<>();
Iterator<?> e = model.getAnnotationIterator();
while (e.hasNext()) {
Object annotation = e.next();
@@ -377,7 +377,7 @@ public class ProjectionMakefileUpdater implements IProjectionListener {
MakefileProjectionAnnotation directive = (MakefileProjectionAnnotation) annotation;
List<MakefileProjectionAnnotation> list = map.get(directive.getElement());
if (list == null) {
- list = new ArrayList<MakefileProjectionAnnotation>(2);
+ list = new ArrayList<>(2);
map.put(directive.getElement(), list);
}
list.add(directive);
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/WorkingCopyManager.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/WorkingCopyManager.java
index 83384845796..5ba6e8cf727 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/WorkingCopyManager.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/WorkingCopyManager.java
@@ -80,7 +80,7 @@ public class WorkingCopyManager implements IWorkingCopyManager, IWorkingCopyMana
public void setWorkingCopy(IEditorInput input, IMakefile workingCopy) {
if (fDocumentProvider.getDocument(input) != null) {
if (fMap == null) {
- fMap = new HashMap<IEditorInput, IMakefile>();
+ fMap = new HashMap<>();
}
fMap.put(input, workingCopy);
}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java
index 0ead6eafacc..9dfe6de71aa 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java
@@ -50,7 +50,7 @@ import com.ibm.icu.text.MessageFormat;
public abstract class AbstractMakefileEditorPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
OverlayPreferenceStore fOverlayStore;
- Map<Control, String> fCheckBoxes = new HashMap<Control, String>();
+ Map<Control, String> fCheckBoxes = new HashMap<>();
private SelectionListener fCheckBoxListener = new SelectionListener() {
@Override
public void widgetDefaultSelected(SelectionEvent e) {
@@ -63,7 +63,7 @@ public abstract class AbstractMakefileEditorPreferencePage extends PreferencePag
}
};
- Map<Control, String> fTextFields = new HashMap<Control, String>();
+ Map<Control, String> fTextFields = new HashMap<>();
private ModifyListener fTextFieldListener = new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
@@ -72,7 +72,7 @@ public abstract class AbstractMakefileEditorPreferencePage extends PreferencePag
}
};
- private Map<Text, String[]> fNumberFields = new HashMap<Text, String[]>();
+ private Map<Text, String[]> fNumberFields = new HashMap<>();
private ModifyListener fNumberFieldListener = new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/MakefileEditorPreferencePage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/MakefileEditorPreferencePage.java
index 1e25cdded39..4a353c19cfb 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/MakefileEditorPreferencePage.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/MakefileEditorPreferencePage.java
@@ -60,7 +60,7 @@ public class MakefileEditorPreferencePage extends AbstractMakefileEditorPreferen
private String[][] fSyntaxColorListModel;
private TableViewer fHighlightingColorListViewer;
- private final List<HighlightingColorListItem> fHighlightingColorList = new ArrayList<HighlightingColorListItem>(7);
+ private final List<HighlightingColorListItem> fHighlightingColorList = new ArrayList<>(7);
Button fAppearanceColorDefault;
ColorSelector fSyntaxForegroundColorEditor;
@@ -208,7 +208,7 @@ public class MakefileEditorPreferencePage extends AbstractMakefileEditorPreferen
ColorManager.MAKE_MATCHING_BRACKETS_COLOR, null },
{ MakefilePreferencesMessages.getString("MakefileEditorPreferencePage.makefile_editor_default"), //$NON-NLS-1$
ColorManager.MAKE_DEFAULT_COLOR, null }, };
- ArrayList<OverlayKey> overlayKeys = new ArrayList<OverlayKey>();
+ ArrayList<OverlayKey> overlayKeys = new ArrayList<>();
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
MakefileEditorPreferenceConstants.EDITOR_FOLDING_ENABLED));
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElement.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElement.java
index 569e93d5657..139c8553802 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElement.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/scannerconfig/DiscoveredElement.java
@@ -43,7 +43,7 @@ public class DiscoveredElement {
private String fEntry;
private int fEntryKind;
private boolean fRemoved;
- private ArrayList<DiscoveredElement> fChildren = new ArrayList<DiscoveredElement>();
+ private ArrayList<DiscoveredElement> fChildren = new ArrayList<>();
private DiscoveredElement fParent;
public DiscoveredElement(IProject project, String entry, int kind, boolean removed, boolean system) {
@@ -196,7 +196,7 @@ public class DiscoveredElement {
}
public void setChildren(DiscoveredElement[] children) {
- fChildren = new ArrayList<DiscoveredElement>(Arrays.asList(children));
+ fChildren = new ArrayList<>(Arrays.asList(children));
}
public boolean delete() {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/ColorManager.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/ColorManager.java
index 01053c3d9a6..a69e2ca3dba 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/ColorManager.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/ColorManager.java
@@ -51,7 +51,7 @@ public class ColorManager implements ISharedTextColors {
return fgColorManager;
}
- protected Map<RGB, Color> fColorTable = new HashMap<RGB, Color>(10);
+ protected Map<RGB, Color> fColorTable = new HashMap<>(10);
@Override
public void dispose() {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/AbstractMakefileCodeScanner.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/AbstractMakefileCodeScanner.java
index edd321f929d..f5af2612723 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/AbstractMakefileCodeScanner.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/AbstractMakefileCodeScanner.java
@@ -37,7 +37,7 @@ import org.eclipse.swt.graphics.RGB;
*/
public abstract class AbstractMakefileCodeScanner extends RuleBasedScanner {
- private Map<String, Token> fTokenMap = new HashMap<String, Token>();
+ private Map<String, Token> fTokenMap = new HashMap<>();
private String[] fPropertyNamesColor;
/**
* Preference keys for boolean preferences which are <code>true</code>,
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCodeScanner.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCodeScanner.java
index 8bbc6ad5261..c69446ef902 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCodeScanner.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCodeScanner.java
@@ -89,7 +89,7 @@ public class MakefileCodeScanner extends AbstractMakefileCodeScanner {
IToken macroDefToken = getToken(ColorManager.MAKE_MACRO_DEF_COLOR);
IToken defaultToken = getToken(ColorManager.MAKE_DEFAULT_COLOR);
- List<IRule> rules = new ArrayList<IRule>();
+ List<IRule> rules = new ArrayList<>();
// Add generic whitespace rule.
rules.add(new WhitespaceRule(new IWhitespaceDetector() {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCompletionProcessor.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCompletionProcessor.java
index d171ca1967d..893142798d6 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCompletionProcessor.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileCompletionProcessor.java
@@ -107,7 +107,7 @@ public class MakefileCompletionProcessor implements IContentAssistProcessor {
@Override
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
- List<ICompletionProposal> proposalList = new ArrayList<ICompletionProposal>();
+ List<ICompletionProposal> proposalList = new ArrayList<>();
IMakefile makefile = fManager.getWorkingCopy(fEditor.getEditorInput());
WordPartDetector wordPart = new WordPartDetector(viewer.getDocument(), documentOffset);
if (wordPart.isMacro()) {
@@ -139,7 +139,7 @@ public class MakefileCompletionProcessor implements IContentAssistProcessor {
private ArrayList<ICompletionProposal> createCompletionProposals(WordPartDetector wordPart,
IAutomaticVariable[] autoVars) {
- ArrayList<ICompletionProposal> proposalList = new ArrayList<ICompletionProposal>(autoVars.length);
+ ArrayList<ICompletionProposal> proposalList = new ArrayList<>(autoVars.length);
String wordPartName = wordPart.getName();
BracketHandler bracket = new BracketHandler(wordPartName);
String partialName = bracket.followingText;
@@ -165,7 +165,7 @@ public class MakefileCompletionProcessor implements IContentAssistProcessor {
private ArrayList<ICompletionProposal> createCompletionProposals(WordPartDetector wordPart,
IMacroDefinition[] macros) {
- ArrayList<ICompletionProposal> proposalList = new ArrayList<ICompletionProposal>(macros.length);
+ ArrayList<ICompletionProposal> proposalList = new ArrayList<>(macros.length);
String wordPartName = wordPart.getName();
BracketHandler bracket = new BracketHandler(wordPartName);
@@ -192,7 +192,7 @@ public class MakefileCompletionProcessor implements IContentAssistProcessor {
private ArrayList<ICompletionProposal> createCompletionProposals(WordPartDetector wordPart,
IBuiltinFunction[] builtinFuns) {
- ArrayList<ICompletionProposal> proposalList = new ArrayList<ICompletionProposal>(builtinFuns.length);
+ ArrayList<ICompletionProposal> proposalList = new ArrayList<>(builtinFuns.length);
String wordPartName = wordPart.getName();
BracketHandler bracket = new BracketHandler(wordPartName);
@@ -219,7 +219,7 @@ public class MakefileCompletionProcessor implements IContentAssistProcessor {
}
private ArrayList<ICompletionProposal> createCompletionProposals(WordPartDetector wordPart, ITargetRule[] targets) {
- ArrayList<ICompletionProposal> proposalList = new ArrayList<ICompletionProposal>(targets.length);
+ ArrayList<ICompletionProposal> proposalList = new ArrayList<>(targets.length);
String partialName = wordPart.getName();
for (ITargetRule target : targets) {
@@ -238,8 +238,8 @@ public class MakefileCompletionProcessor implements IContentAssistProcessor {
public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) {
WordPartDetector wordPart = new WordPartDetector(viewer.getDocument(), documentOffset);
IMakefile makefile = fManager.getWorkingCopy(fEditor.getEditorInput());
- ArrayList<String> contextList = new ArrayList<String>();
- ArrayList<IContextInformation> contextInformationList = new ArrayList<IContextInformation>();
+ ArrayList<String> contextList = new ArrayList<>();
+ ArrayList<IContextInformation> contextInformationList = new ArrayList<>();
if (wordPart.isMacro()) {
IDirective[] statements = makefile.getMacroDefinitions();
for (IDirective statement : statements) {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefilePartitionScanner.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefilePartitionScanner.java
index d6b0abc0ad8..b2ae0fcc46d 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefilePartitionScanner.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefilePartitionScanner.java
@@ -43,7 +43,7 @@ public class MakefilePartitionScanner extends RuleBasedPartitionScanner {
IToken tComment = new Token(MAKEFILE_COMMENT_PARTITION);
- List<EndOfLineRule> rules = new ArrayList<EndOfLineRule>();
+ List<EndOfLineRule> rules = new ArrayList<>();
// Add rule for single line comments.
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/MakeContentProvider.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/MakeContentProvider.java
index 8f954e3c235..298cfaecdd4 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/MakeContentProvider.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/MakeContentProvider.java
@@ -95,7 +95,7 @@ public class MakeContentProvider implements ITreeContentProvider, IMakeTargetLis
}
} else if (obj instanceof IContainer) {
IContainer container = (IContainer) obj;
- ArrayList<Object> children = new ArrayList<Object>();
+ ArrayList<Object> children = new ArrayList<>();
boolean isAddingSourceRoots = !bFlatten && (container instanceof IProject)
&& CCorePlugin.showSourceRootsAtTopOfProject();
@@ -135,7 +135,7 @@ public class MakeContentProvider implements ITreeContentProvider, IMakeTargetLis
return children.toArray();
} else if (obj instanceof TargetSourceContainer) {
- ArrayList<Object> children = new ArrayList<Object>();
+ ArrayList<Object> children = new ArrayList<>();
try {
IContainer container = ((TargetSourceContainer) obj).getContainer();
IResource[] resources = container.members();
@@ -177,7 +177,7 @@ public class MakeContentProvider implements ITreeContentProvider, IMakeTargetLis
@Override
public Object[] getElements(Object obj) {
if (bFlatten) {
- List<Object> list = new ArrayList<Object>();
+ List<Object> list = new ArrayList<>();
Object[] children = getChildren(obj);
for (int i = 0; i < children.length; i++) {
list.add(children[i]);
@@ -313,7 +313,7 @@ public class MakeContentProvider implements ITreeContentProvider, IMakeTargetLis
return;
}
- Set<IProject> affectedProjects = new HashSet<IProject>();
+ Set<IProject> affectedProjects = new HashSet<>();
for (IMakeTarget target : event.getTargets()) {
IContainer container = target.getContainer();
affectedProjects.add(container.getProject());
@@ -355,7 +355,7 @@ public class MakeContentProvider implements ITreeContentProvider, IMakeTargetLis
return;
}
- Set<IProject> affectedProjects = new HashSet<IProject>();
+ Set<IProject> affectedProjects = new HashSet<>();
collectAffectedProjects(delta, affectedProjects);
// If the view is being filtered or source roots shown,
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/TargetBuild.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/TargetBuild.java
index 4540834039d..fe35f2b5082 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/TargetBuild.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/TargetBuild.java
@@ -62,7 +62,7 @@ public class TargetBuild {
if (!BuildAction.isSaveAllSet())
return;
- List<IProject> projects = new ArrayList<IProject>();
+ List<IProject> projects = new ArrayList<>();
for (int i = 0; i < targets.length; ++i) {
IMakeTarget target = targets[i];
projects.add(target.getProject());
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java
index 94ab6051cb3..82a137a7c09 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java
@@ -72,7 +72,7 @@ public class UpdateMakeProjectAction implements IWorkbenchWindowActionDelegate {
public void run(IAction action) {
if (fSelection instanceof IStructuredSelection) {
Object[] elems = ((IStructuredSelection) fSelection).toArray();
- ArrayList<IProject> projects = new ArrayList<IProject>(elems.length);
+ ArrayList<IProject> projects = new ArrayList<>(elems.length);
for (int i = 0; i < elems.length; i++) {
Object elem = elems[i];
@@ -102,7 +102,7 @@ public class UpdateMakeProjectAction implements IWorkbenchWindowActionDelegate {
public static IProject[] getOldProjects() {
IProject[] project = MakeUIPlugin.getWorkspace().getRoot().getProjects();
- Vector<IProject> result = new Vector<IProject>();
+ Vector<IProject> result = new Vector<>();
try {
for (int i = 0; i < project.length; i++) {
if (isOldProject(project[i])) {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/AbstractDiscoveryOptionsBlock.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/AbstractDiscoveryOptionsBlock.java
index 43c00710e99..bca65db73d3 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/AbstractDiscoveryOptionsBlock.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/AbstractDiscoveryOptionsBlock.java
@@ -178,7 +178,7 @@ public abstract class AbstractDiscoveryOptionsBlock extends AbstractCOptionPage
*
*/
private void initializeProfilePageMap() {
- fProfilePageMap = new HashMap<String, DiscoveryProfilePageConfiguration>(5);
+ fProfilePageMap = new HashMap<>(5);
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(MakeUIPlugin.getPluginId(),
"DiscoveryProfilePage"); //$NON-NLS-1$
@@ -349,7 +349,7 @@ public abstract class AbstractDiscoveryOptionsBlock extends AbstractCOptionPage
}
protected List<String> getDiscoveryProfileIdList() {
- return new ArrayList<String>(fProfilePageMap.keySet());
+ return new ArrayList<>(fProfilePageMap.keySet());
}
protected abstract String getCurrentProfileId();
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveredPathContainerPage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveredPathContainerPage.java
index 324cadd2c1f..08acbbe32e2 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveredPathContainerPage.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveredPathContainerPage.java
@@ -146,7 +146,7 @@ public class DiscoveredPathContainerPage extends WizardPage implements IPathEntr
DiscoveredContainerAdapter adapter = new DiscoveredContainerAdapter();
- fDiscoveredContainerList = new TreeListDialogField<DiscoveredElement>(adapter, buttonLabels,
+ fDiscoveredContainerList = new TreeListDialogField<>(adapter, buttonLabels,
new DiscoveredElementLabelProvider());
fDiscoveredContainerList.setDialogFieldListener(adapter);
fDiscoveredContainerList.setLabelText(MakeUIPlugin.getResourceString(CONTAINER_LIST_LABEL));
@@ -154,7 +154,7 @@ public class DiscoveredPathContainerPage extends WizardPage implements IPathEntr
fDiscoveredContainerList.setTreeExpansionLevel(2);
fDiscoveredContainerList.setViewerSorter(new DiscoveredElementSorter());
dirty = false;
- deletedEntries = new ArrayList<DiscoveredElement>();
+ deletedEntries = new ArrayList<>();
}
/* (non-Javadoc)
@@ -220,8 +220,8 @@ public class DiscoveredPathContainerPage extends WizardPage implements IPathEntr
if (info instanceof IPerProjectDiscoveredPathInfo) {
IPerProjectDiscoveredPathInfo projectPathInfo = (IPerProjectDiscoveredPathInfo) info;
- LinkedHashMap<String, Boolean> includes = new LinkedHashMap<String, Boolean>();
- LinkedHashMap<String, SymbolEntry> symbols = new LinkedHashMap<String, SymbolEntry>();
+ LinkedHashMap<String, Boolean> includes = new LinkedHashMap<>();
+ LinkedHashMap<String, SymbolEntry> symbols = new LinkedHashMap<>();
DiscoveredElement container = (DiscoveredElement) fDiscoveredContainerList.getElement(0);
if (container != null && container.getEntryKind() == DiscoveredElement.CONTAINER) {
@@ -264,7 +264,7 @@ public class DiscoveredPathContainerPage extends WizardPage implements IPathEntr
try {
// update scanner configuration
- List<IResource> resourceDelta = new ArrayList<IResource>(1);
+ List<IResource> resourceDelta = new ArrayList<>(1);
resourceDelta.add(fCProject.getProject());
MakeCorePlugin.getDefault().getDiscoveryManager().updateDiscoveredInfo(info, resourceDelta);
return true;
@@ -294,7 +294,7 @@ public class DiscoveredPathContainerPage extends WizardPage implements IPathEntr
}
if (fPathEntry != null) {
DiscoveredElement element = populateDiscoveredElements(fPathEntry);
- ArrayList<DiscoveredElement> elements = new ArrayList<DiscoveredElement>();
+ ArrayList<DiscoveredElement> elements = new ArrayList<>();
elements.add(element);
fDiscoveredContainerList.addElements(elements);
}
@@ -606,7 +606,7 @@ public class DiscoveredPathContainerPage extends WizardPage implements IPathEntr
private boolean moveDown() {
boolean rc = false;
List<Object> selElements = fDiscoveredContainerList.getSelectedElements();
- List<Object> revSelElements = new ArrayList<Object>(selElements);
+ List<Object> revSelElements = new ArrayList<>(selElements);
Collections.reverse(revSelElements);
for (Iterator<Object> i = revSelElements.iterator(); i.hasNext();) {
DiscoveredElement elem = (DiscoveredElement) i.next();
@@ -649,7 +649,7 @@ public class DiscoveredPathContainerPage extends WizardPage implements IPathEntr
private boolean deleteEntry() {
boolean rc = false;
- List<DiscoveredElement> newSelection = new ArrayList<DiscoveredElement>();
+ List<DiscoveredElement> newSelection = new ArrayList<>();
List<Object> selElements = fDiscoveredContainerList.getSelectedElements();
boolean skipIncludes = false, skipSymbols = false;
for (int i = 0; i < selElements.size(); ++i) {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveryOptionsBlock.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveryOptionsBlock.java
index 0731352f96a..3a806deba13 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveryOptionsBlock.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveryOptionsBlock.java
@@ -331,7 +331,7 @@ public class DiscoveryOptionsBlock extends AbstractDiscoveryOptionsBlock {
ICProject cProject = CoreModel.getDefault().create(project);
if (cProject != null) {
IPathEntry[] entries = cProject.getRawPathEntries();
- List<IPathEntry> newEntries = new ArrayList<IPathEntry>(Arrays.asList(entries));
+ List<IPathEntry> newEntries = new ArrayList<>(Arrays.asList(entries));
if (!newEntries.contains(container)) {
newEntries.add(container);
cProject.setRawPathEntries(newEntries.toArray(new IPathEntry[newEntries.size()]), monitor);
@@ -345,7 +345,7 @@ public class DiscoveryOptionsBlock extends AbstractDiscoveryOptionsBlock {
String profileId = getBuildInfo().getSelectedProfileId();
ScannerConfigScope profileScope = ScannerConfigProfileManager.getInstance().getSCProfileConfiguration(profileId)
.getProfileScope();
- List<IResource> changedResources = new ArrayList<IResource>();
+ List<IResource> changedResources = new ArrayList<>();
// changedResources.add(project.getFullPath());
changedResources.add(project);
MakeCorePlugin.getDefault().getDiscoveryManager().changeDiscoveredContainer(project, profileScope,

Back to the top