Skip to main content
summaryrefslogtreecommitdiffstats
path: root/qt
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 11:20:42 -0500
committerJonah Graham2018-11-22 16:55:36 -0500
commitcaf2292768deccd885b5b6989b731742e2e5edf4 (patch)
tree711a6088f2e17c7e31ebb51af1eadc1af00768e5 /qt
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 'qt')
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/ASTUtil.java2
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtFunctionCall.java2
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtIncludePaths.java2
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtIncludePathsProvider.java2
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtMethodUtil.java2
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QEnum.java2
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QGadget.java2
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeEnvInfo.java4
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeEnvProviderDescriptor.java2
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeEnvProviderManager.java2
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeInfo.java4
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeParser.java6
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfo.java4
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfoManager.java12
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QObject.java22
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QObjectMembers.java6
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QtFactory.java2
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QtIndexImpl.java2
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/AbstractQtPDOMClass.java2
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QObjectName.java4
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtASTClass.java6
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtASTVisitor.java4
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMLinkage.java4
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMNameIndex.java2
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMProperty.java4
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMQObject.java10
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMVisitor.java2
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPropertyName.java2
-rw-r--r--qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/ASTUtilTests.java6
-rw-r--r--qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/QObjectTests.java4
-rw-r--r--qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/QtRegressionTests.java6
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/QObjectConnectCompletion.java6
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/QtCompletionProposalComputer.java2
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/assist/QPropertyAttributeProposal.java8
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/assist/QPropertyExpansion.java6
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/pro/parser/QtProjectVariable.java2
36 files changed, 80 insertions, 80 deletions
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/ASTUtil.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/ASTUtil.java
index 713ed93e70..0623dee3a6 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/ASTUtil.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/ASTUtil.java
@@ -185,7 +185,7 @@ public class ASTUtil {
* Does not return null.
*/
public static Collection<IQMethod> findMethods(IQObject qobj, QtMethodReference ref) {
- Set<IQMethod> bindings = new LinkedHashSet<IQMethod>();
+ Set<IQMethod> bindings = new LinkedHashSet<>();
Iterable<IQMethod> methods = null;
switch (ref.getType()) {
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtFunctionCall.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtFunctionCall.java
index f1a3677be6..cf046ae0c5 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtFunctionCall.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtFunctionCall.java
@@ -174,7 +174,7 @@ public class QtFunctionCall {
else if (firstNonNull == null)
firstNonNull = t;
else {
- list = new ArrayList<T>(withNulls.length);
+ list = new ArrayList<>(withNulls.length);
list.add(firstNonNull);
list.add(t);
}
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtIncludePaths.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtIncludePaths.java
index 4f19b78763..53fbb55960 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtIncludePaths.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtIncludePaths.java
@@ -258,7 +258,7 @@ public class QtIncludePaths extends LanguageSettingsSerializableProvider {
}
});
- List<ICLanguageSettingEntry> entries = new ArrayList<ICLanguageSettingEntry>(files.length + 1);
+ List<ICLanguageSettingEntry> entries = new ArrayList<>(files.length + 1);
safeAdd(entries, qtInstallHeadersDir);
for (File file : files)
safeAdd(entries, file);
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtIncludePathsProvider.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtIncludePathsProvider.java
index bbb5d68fee..2dcd0e02ff 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtIncludePathsProvider.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtIncludePathsProvider.java
@@ -39,7 +39,7 @@ public class QtIncludePathsProvider extends LanguageSettingsSerializableProvider
* The provider identifies Qt installations by the absolute path to the qmake binary. The
* include paths relevant to the installations are computed and persisted in {@link QtIncludePaths}.
*/
- private final Map<String, QtIncludePaths> qtInstallHeaders = new HashMap<String, QtIncludePaths>();
+ private final Map<String, QtIncludePaths> qtInstallHeaders = new HashMap<>();
/**
* The build configuration stores the path to the qmake binary as an environment variable.
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtMethodUtil.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtMethodUtil.java
index bcecfeda00..42233f6e36 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtMethodUtil.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtMethodUtil.java
@@ -114,7 +114,7 @@ public class QtMethodUtil {
signature.append('(');
boolean first = true;
- List<String> signatures = new ArrayList<String>();
+ List<String> signatures = new ArrayList<>();
qtEncSignatures = qtEncSignatures.substring(i + 1);
Pattern p = Pattern.compile("^([a-zA-Z0-9+/=]*)(@?).*$");
while (!qtEncSignatures.isEmpty()) {
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QEnum.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QEnum.java
index 945352f401..d904a628ef 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QEnum.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QEnum.java
@@ -26,7 +26,7 @@ public class QEnum implements IQEnum {
public QEnum(String name, boolean isFlag, List<IEnumerator> enumerators) {
this.name = name;
this.isFlag = isFlag;
- this.enumerators = new ArrayList<IQEnum.Enumerator>(enumerators.size());
+ this.enumerators = new ArrayList<>(enumerators.size());
for (IEnumerator enumerator : enumerators)
this.enumerators.add(new Enumerator(enumerator));
}
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QGadget.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QGadget.java
index 0d2f4306bf..6174ec9e6c 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QGadget.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QGadget.java
@@ -26,7 +26,7 @@ public class QGadget implements IQGadget {
public QGadget(QtIndexImpl qtIndex, CDTIndex cdtIndex, AbstractQtPDOMClass pdomQGadget) throws CoreException {
this.name = pdomQGadget.getName();
- this.enums = new ArrayList<IQEnum>();
+ this.enums = new ArrayList<>();
for (QtPDOMQEnum pdom : pdomQGadget.getChildren(QtPDOMQEnum.class))
this.enums.add(new QEnum(pdom.getName(), pdom.isFlag(), pdom.getEnumerators()));
}
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeEnvInfo.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeEnvInfo.java
index 602891fab9..eb8e1f3992 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeEnvInfo.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeEnvInfo.java
@@ -42,9 +42,9 @@ public final class QMakeEnvInfo {
Collection<IFile> sensitiveFiles) {
this.proFile = proFile;
this.qmakeFilePath = qmakeFilePath;
- this.environment = environment != null ? new HashMap<String, String>(environment)
+ this.environment = environment != null ? new HashMap<>(environment)
: Collections.<String, String>emptyMap();
- this.sensitiveFiles = sensitiveFiles != null ? new HashSet<IFile>(sensitiveFiles)
+ this.sensitiveFiles = sensitiveFiles != null ? new HashSet<>(sensitiveFiles)
: Collections.<IFile>emptySet();
}
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeEnvProviderDescriptor.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeEnvProviderDescriptor.java
index 22e04f7fcd..1d46f15cd9 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeEnvProviderDescriptor.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeEnvProviderDescriptor.java
@@ -37,7 +37,7 @@ public final class QMakeEnvProviderDescriptor implements Comparable<QMakeEnvProv
private final IConfigurationElement element;
private final String id;
private final int priority;
- private final AtomicReference<Boolean> evaluation = new AtomicReference<Boolean>();
+ private final AtomicReference<Boolean> evaluation = new AtomicReference<>();
private final Expression enablementExpression;
QMakeEnvProviderDescriptor(IConfigurationElement element) {
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeEnvProviderManager.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeEnvProviderManager.java
index 69ea716b94..d63c9a5654 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeEnvProviderManager.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeEnvProviderManager.java
@@ -46,7 +46,7 @@ public final class QMakeEnvProviderManager {
* @return the list of extensions
*/
private static List<QMakeEnvProviderDescriptor> loadDescriptors() {
- List<QMakeEnvProviderDescriptor> descriptors = new ArrayList<QMakeEnvProviderDescriptor>();
+ List<QMakeEnvProviderDescriptor> descriptors = new ArrayList<>();
IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(Activator.ID,
Activator.QMAKE_ENV_PROVIDER_EXT_POINT_NAME);
for (IConfigurationElement element : elements) {
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeInfo.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeInfo.java
index 98a0716e19..4d744d5973 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeInfo.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeInfo.java
@@ -59,9 +59,9 @@ public final class QMakeInfo implements IQMakeInfo {
this.qmakeQueryMap = Collections.unmodifiableMap(queryMap);
this.qtVersion = QMakeVersion.create(queryMap.get(QMakeParser.KEY_QT_VERSION));
- List<String> tmpQtImportPaths = new ArrayList<String>(
+ List<String> tmpQtImportPaths = new ArrayList<>(
QMakeParser.singleValue(queryMap, QMakeParser.KEY_QT_INSTALL_IMPORTS));
- List<String> tmpQtQmlPaths = new ArrayList<String>(
+ List<String> tmpQtQmlPaths = new ArrayList<>(
QMakeParser.singleValue(queryMap, QMakeParser.KEY_QT_INSTALL_QML));
this.qtDocPath = QMakeParser.singleValue(queryMap, QMakeParser.KEY_QT_INSTALL_DOCS);
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeParser.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeParser.java
index 2b0a7d2dcc..b9b5485d93 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeParser.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeParser.java
@@ -51,7 +51,7 @@ public final class QMakeParser {
* @throws IOException when io error happens
*/
public static Map<String, String> parse(Pattern regex, BufferedReader reader) throws IOException {
- Map<String, String> result = new LinkedHashMap<String, String>();
+ Map<String, String> result = new LinkedHashMap<>();
String line;
while ((line = reader.readLine()) != null) {
@@ -95,7 +95,7 @@ public final class QMakeParser {
return Collections.emptyList();
}
- List<String> result = new ArrayList<String>();
+ List<String> result = new ArrayList<>();
for (String item : qmake3SplitValueList(value)) {
result.add(qmake3DecodeValue(item));
}
@@ -161,7 +161,7 @@ public final class QMakeParser {
* @return the modifiable list of values
*/
private static List<String> qmake3SplitValueList(String value) {
- List<String> result = new ArrayList<String>();
+ List<String> result = new ArrayList<>();
StringBuilder sb = new StringBuilder();
char quote = 0;
boolean hadWord = false;
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfo.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfo.java
index d8f68fec4b..63e66f6974 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfo.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfo.java
@@ -42,7 +42,7 @@ public final class QMakeProjectInfo implements IQMakeProjectInfo {
private final State STATE_INVALID = new State();
// listeners
- private final List<IQMakeProjectInfoListener> listeners = new CopyOnWriteArrayList<IQMakeProjectInfoListener>();
+ private final List<IQMakeProjectInfoListener> listeners = new CopyOnWriteArrayList<>();
private final IProject project;
@@ -190,7 +190,7 @@ public final class QMakeProjectInfo implements IQMakeProjectInfo {
// retrieves qmake executable path
String qmakeFilePath = qmakeEnvInfo != null ? qmakeEnvInfo.getQMakeFilePath() : null;
// retries environment
- List<String> envList = new ArrayList<String>();
+ List<String> envList = new ArrayList<>();
Map<String, String> envMap = qmakeEnvInfo != null ? qmakeEnvInfo.getEnvironment()
: Collections.<String, String>emptyMap();
for (Map.Entry<String, String> entry : envMap.entrySet()) {
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfoManager.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfoManager.java
index e2d1f7ad25..04337a12b2 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfoManager.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfoManager.java
@@ -47,7 +47,7 @@ public class QMakeProjectInfoManager {
// called by QtPlugin activator to setup this class
public static final void start() {
synchronized (CACHE_SYNC) {
- CACHE = new HashMap<IProject, QMakeProjectInfo>();
+ CACHE = new HashMap<>();
}
CoreModel.getDefault().addCProjectDescriptionListener(PD_LISTENER,
CProjectDescriptionEvent.LOADED | CProjectDescriptionEvent.APPLIED);
@@ -61,7 +61,7 @@ public class QMakeProjectInfoManager {
CoreModel.getDefault().removeCProjectDescriptionListener(PD_LISTENER);
List<QMakeProjectInfo> infos;
synchronized (CACHE_SYNC) {
- infos = new ArrayList<QMakeProjectInfo>(CACHE.values());
+ infos = new ArrayList<>(CACHE.values());
CACHE = null;
}
for (QMakeProjectInfo info : infos) {
@@ -176,9 +176,9 @@ public class QMakeProjectInfoManager {
private static final class RDVisitor implements IResourceDeltaVisitor {
- private final Set<IResource> projectsToDelete = new HashSet<IResource>();
- private final Set<IResource> projectsToUpdate = new HashSet<IResource>();
- private final Set<IPath> changedFiles = new HashSet<IPath>();
+ private final Set<IResource> projectsToDelete = new HashSet<>();
+ private final Set<IResource> projectsToUpdate = new HashSet<>();
+ private final Set<IPath> changedFiles = new HashSet<>();
@Override
public boolean visit(IResourceDelta delta) throws CoreException {
@@ -233,7 +233,7 @@ public class QMakeProjectInfoManager {
if (CACHE == null)
return;
- infos = new ArrayList<QMakeProjectInfo>(CACHE.values());
+ infos = new ArrayList<>(CACHE.values());
}
for (QMakeProjectInfo info : infos) {
// checking if any project description change or any of the changed files affect QMakeProjectInfo
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QObject.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QObject.java
index 3e61526fca..44b6948379 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QObject.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QObject.java
@@ -40,12 +40,12 @@ public class QObject implements IQObject {
this.name = pdomQObject.getName();
this.pdomQObject = pdomQObject;
- List<IQMethod> baseSlots = new ArrayList<IQMethod>();
- List<IQMethod> baseSignals = new ArrayList<IQMethod>();
- List<IQMethod> baseInvokables = new ArrayList<IQMethod>();
- List<IQProperty> baseProps = new ArrayList<IQProperty>();
+ List<IQMethod> baseSlots = new ArrayList<>();
+ List<IQMethod> baseSignals = new ArrayList<>();
+ List<IQMethod> baseInvokables = new ArrayList<>();
+ List<IQProperty> baseProps = new ArrayList<>();
- this.bases = new ArrayList<IQObject>();
+ this.bases = new ArrayList<>();
for (QtPDOMQObject base : pdomQObject.findBases()) {
QObject baseQObj = new QObject(qtIndex, cdtIndex, base);
this.bases.add(baseQObj);
@@ -57,9 +57,9 @@ public class QObject implements IQObject {
this.classInfos = pdomQObject.getClassInfos();
- List<IQMethod> slots = new ArrayList<IQMethod>();
- List<IQMethod> signals = new ArrayList<IQMethod>();
- List<IQMethod> invokables = new ArrayList<IQMethod>();
+ List<IQMethod> slots = new ArrayList<>();
+ List<IQMethod> signals = new ArrayList<>();
+ List<IQMethod> invokables = new ArrayList<>();
for (QtPDOMQMethod pdom : pdomQObject.getChildren(QtPDOMQMethod.class))
switch (pdom.getKind()) {
case Slot:
@@ -79,11 +79,11 @@ public class QObject implements IQObject {
this.signals = QObjectMembers.create(signals, baseSignals);
this.invokables = QObjectMembers.create(invokables, baseInvokables);
- this.enums = new ArrayList<IQEnum>();
+ this.enums = new ArrayList<>();
for (QtPDOMQEnum pdom : pdomQObject.getChildren(QtPDOMQEnum.class))
this.enums.add(new QEnum(pdom.getName(), pdom.isFlag(), pdom.getEnumerators()));
- List<IQProperty> props = new ArrayList<IQProperty>();
+ List<IQProperty> props = new ArrayList<>();
for (QtPDOMProperty pdom : pdomQObject.getChildren(QtPDOMProperty.class)) {
QProperty qProp = new QProperty(this, pdom.getType(), pdom.getName());
for (QtPDOMProperty.Attribute attr : pdom.getAttributes())
@@ -92,7 +92,7 @@ public class QObject implements IQObject {
}
this.properties = QObjectMembers.create(props, baseProps);
- this.qmlRegistrations = new ArrayList<IQmlRegistration>();
+ this.qmlRegistrations = new ArrayList<>();
for (QtPDOMQmlRegistration pdom : QtPDOMQmlRegistration.findFor(pdomQObject))
this.qmlRegistrations.add(QmlRegistration.create(qtIndex, pdom));
}
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QObjectMembers.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QObjectMembers.java
index 246d855912..6dc717b808 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QObjectMembers.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QObjectMembers.java
@@ -27,10 +27,10 @@ public class QObjectMembers<T extends IQObject.IMember> implements IQObject.IMem
// the algorithm for computing #withoutOverrides will filter out the parent members and
// not the local ones.
// @see withoutOverrides()
- ArrayList<T> all = new ArrayList<T>(locals.size() + inherited.size());
+ ArrayList<T> all = new ArrayList<>(locals.size() + inherited.size());
all.addAll(locals);
all.addAll(inherited);
- return new QObjectMembers<T>(all, locals);
+ return new QObjectMembers<>(all, locals);
}
private QObjectMembers(List<T> all, Collection<T> locals) {
@@ -69,7 +69,7 @@ public class QObjectMembers<T extends IQObject.IMember> implements IQObject.IMem
// / \
// o1 o2
- ArrayList<T> filtered = new ArrayList<T>(all.size());
+ ArrayList<T> filtered = new ArrayList<>(all.size());
for (T member : all) {
boolean isOverridden = false;
for (Iterator<T> i = filtered.iterator(); !isOverridden && i.hasNext();)
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QtFactory.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QtFactory.java
index e860808c22..c77a970170 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QtFactory.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QtFactory.java
@@ -108,7 +108,7 @@ public class QtFactory {
@Override
public QtVersion access(IIndex index) throws CoreException {
// Multiple macros might be found, sort the values and choose the highest version.
- SortedSet<String> versions = new TreeSet<String>();
+ SortedSet<String> versions = new TreeSet<>();
try {
for (IIndexMacro macro : index.findMacros(QT_VERSION, IndexFilter.ALL, null))
versions.add(new String(macro.getExpansion()).toLowerCase());
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QtIndexImpl.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QtIndexImpl.java
index 1b3436cad1..f049cc248d 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QtIndexImpl.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QtIndexImpl.java
@@ -116,7 +116,7 @@ public class QtIndexImpl extends QtIndex {
IQmlRegistration qml = QmlRegistration.create(QtIndexImpl.this, binding);
if (qml != null) {
if (types == null)
- types = new ArrayList<IQmlRegistration>();
+ types = new ArrayList<>();
types.add(qml);
}
}
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/AbstractQtPDOMClass.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/AbstractQtPDOMClass.java
index fabed2893d..8900d6b4a4 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/AbstractQtPDOMClass.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/AbstractQtPDOMClass.java
@@ -105,7 +105,7 @@ public abstract class AbstractQtPDOMClass extends QtPDOMBinding {
}
public <T extends QtPDOMBinding> List<T> getChildren(Class<T> cls) throws CoreException {
- QtPDOMVisitor.All<T> collector = new QtPDOMVisitor.All<T>(cls);
+ QtPDOMVisitor.All<T> collector = new QtPDOMVisitor.All<>(cls);
try {
children.accept(collector);
} catch (CoreException e) {
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QObjectName.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QObjectName.java
index 782833f587..0c707c535e 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QObjectName.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QObjectName.java
@@ -27,8 +27,8 @@ import org.eclipse.core.runtime.CoreException;
public class QObjectName extends AbstractQClassName {
private final char[] fullyQualifiedName;
- private final List<QtPropertyName> properties = new ArrayList<QtPropertyName>();
- private final Map<String, String> classInfos = new LinkedHashMap<String, String>();
+ private final List<QtPropertyName> properties = new ArrayList<>();
+ private final Map<String, String> classInfos = new LinkedHashMap<>();
public QObjectName(ICPPASTCompositeTypeSpecifier spec) {
super(spec);
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtASTClass.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtASTClass.java
index 67d6346701..10b15df5a7 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtASTClass.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtASTClass.java
@@ -153,9 +153,9 @@ public class QtASTClass {
// tags (including resolving precedence).
// This allows single-method tags to overlap regions because regions may be shortened
// by a later step.
- ArrayList<Tag> tags = new ArrayList<Tag>();
- ArrayList<Revision> revisions = new ArrayList<Revision>();
- ArrayList<Region> regions = new ArrayList<Region>();
+ ArrayList<Tag> tags = new ArrayList<>();
+ ArrayList<Revision> revisions = new ArrayList<>();
+ ArrayList<Region> regions = new ArrayList<>();
Region currRegion = null;
for (IASTNodeLocation location : spec.getNodeLocations()) {
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtASTVisitor.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtASTVisitor.java
index cf15b3d294..1b07883e68 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtASTVisitor.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtASTVisitor.java
@@ -271,8 +271,8 @@ public class QtASTVisitor extends ASTVisitor {
// three. Two lists are created during this processing. Then those lists are uses to create
// the QEnum instances.
- List<EnumDecl> enumDecls = new ArrayList<QtASTVisitor.EnumDecl>();
- Map<String, String> flagAliases = new HashMap<String, String>();
+ List<EnumDecl> enumDecls = new ArrayList<>();
+ Map<String, String> flagAliases = new HashMap<>();
for (IASTPreprocessorMacroExpansion expansion : expansions) {
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMLinkage.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMLinkage.java
index 253fa534b9..7ddfd2afcc 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMLinkage.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMLinkage.java
@@ -63,7 +63,7 @@ public class QtPDOMLinkage extends PDOMLinkage {
// The version that has been read from/written to the persisted file.
private int version;
- private final Map<IQtASTName, PDOMBinding> cache = new WeakHashMap<IQtASTName, PDOMBinding>();
+ private final Map<IQtASTName, PDOMBinding> cache = new WeakHashMap<>();
public QtPDOMLinkage(PDOM pdom, long record) throws CoreException {
super(pdom, record);
@@ -257,7 +257,7 @@ public class QtPDOMLinkage extends PDOMLinkage {
if (names.isEmpty())
return Collections.emptyList();
- ArrayList<QtPDOMQmlRegistration> registrations = new ArrayList<QtPDOMQmlRegistration>();
+ ArrayList<QtPDOMQmlRegistration> registrations = new ArrayList<>();
for (PDOMName name : names) {
PDOMBinding binding = name.getBinding();
if (binding instanceof QtPDOMQmlRegistration)
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMNameIndex.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMNameIndex.java
index 887fb462b1..0d5ce1e632 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMNameIndex.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMNameIndex.java
@@ -57,7 +57,7 @@ public class QtPDOMNameIndex {
if (finder.headRec == 0)
return Collections.emptyList();
- List<PDOMName> names = new ArrayList<PDOMName>();
+ List<PDOMName> names = new ArrayList<>();
for (long node = db.getRecPtr(finder.headRec); node != 0; node = db.getRecPtr(node + Database.PTR_SIZE))
names.add(new PDOMName(qtLinkage, db.getRecPtr(node)));
return names;
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMProperty.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMProperty.java
index 3dafe8144d..204b73c5ea 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMProperty.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMProperty.java
@@ -95,14 +95,14 @@ public class QtPDOMProperty extends QtPDOMBinding {
public void setAttributes(Attribute[] attributes) throws CoreException {
long rec = getDB().getRecPtr(Field.Attributes.getRecord(record));
- QtPDOMArray<Attribute> pdomArray = new QtPDOMArray<Attribute>(getQtLinkage(), Attribute.Codec, rec);
+ QtPDOMArray<Attribute> pdomArray = new QtPDOMArray<>(getQtLinkage(), Attribute.Codec, rec);
rec = pdomArray.set(attributes);
getDB().putRecPtr(Field.Attributes.getRecord(record), rec);
}
public Attribute[] getAttributes() throws CoreException {
long rec = getDB().getRecPtr(Field.Attributes.getRecord(record));
- QtPDOMArray<Attribute> pdomArray = new QtPDOMArray<Attribute>(getQtLinkage(), Attribute.Codec, rec);
+ QtPDOMArray<Attribute> pdomArray = new QtPDOMArray<>(getQtLinkage(), Attribute.Codec, rec);
return pdomArray.get();
}
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMQObject.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMQObject.java
index 5fcaaaefb1..9707501aea 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMQObject.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMQObject.java
@@ -60,7 +60,7 @@ public class QtPDOMQObject extends AbstractQtPDOMClass {
public void delete() throws CoreException {
long fieldRec = Field.ClassInfos.getRecord(record);
- new QtPDOMArray<ClassInfo>(getQtLinkage(), ClassInfo.Codec, fieldRec).delete();
+ new QtPDOMArray<>(getQtLinkage(), ClassInfo.Codec, fieldRec).delete();
getDB().putRecPtr(Field.ClassInfos.getRecord(record), 0);
}
@@ -76,7 +76,7 @@ public class QtPDOMQObject extends AbstractQtPDOMClass {
// Store the array into the Database.
long arrayRec = getDB().getRecPtr(Field.ClassInfos.getRecord(record));
- QtPDOMArray<ClassInfo> pdomArray = new QtPDOMArray<QtPDOMQObject.ClassInfo>(getQtLinkage(), ClassInfo.Codec,
+ QtPDOMArray<ClassInfo> pdomArray = new QtPDOMArray<>(getQtLinkage(), ClassInfo.Codec,
arrayRec);
arrayRec = pdomArray.set(array);
@@ -85,11 +85,11 @@ public class QtPDOMQObject extends AbstractQtPDOMClass {
}
public Map<String, String> getClassInfos() throws CoreException {
- Map<String, String> classInfos = new LinkedHashMap<String, String>();
+ Map<String, String> classInfos = new LinkedHashMap<>();
// Read the array from the Database and insert the elements into the Map that is to be returned.
long arrayRec = getDB().getRecPtr(Field.ClassInfos.getRecord(record));
- QtPDOMArray<ClassInfo> pdomArray = new QtPDOMArray<QtPDOMQObject.ClassInfo>(getQtLinkage(), ClassInfo.Codec,
+ QtPDOMArray<ClassInfo> pdomArray = new QtPDOMArray<>(getQtLinkage(), ClassInfo.Codec,
arrayRec);
ClassInfo[] array = pdomArray.get();
@@ -124,7 +124,7 @@ public class QtPDOMQObject extends AbstractQtPDOMClass {
if (cppClassType == null)
return Collections.emptyList();
- List<QtPDOMQObject> bases = new ArrayList<QtPDOMQObject>();
+ List<QtPDOMQObject> bases = new ArrayList<>();
for (ICPPBase base : cppClassType.getBases()) {
if (base.getVisibility() != ICPPBase.v_public)
continue;
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMVisitor.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMVisitor.java
index 67b3e9c7f1..e423c75d96 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMVisitor.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMVisitor.java
@@ -34,7 +34,7 @@ public abstract class QtPDOMVisitor implements IPDOMVisitor {
public static class All<T> extends QtPDOMVisitor {
private final Class<T> cls;
- public final ArrayList<T> list = new ArrayList<T>();
+ public final ArrayList<T> list = new ArrayList<>();
public All(Class<T> cls) {
this.cls = cls;
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPropertyName.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPropertyName.java
index ca7145dbb5..f1eee96788 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPropertyName.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPropertyName.java
@@ -24,7 +24,7 @@ public class QtPropertyName extends AbstractQObjectMemberName implements IQtASTN
private String type;
// TODO The PDOM attrs should only be created in #createPDOMBinding
- private List<QtPDOMProperty.Attribute> attributes = new ArrayList<QtPDOMProperty.Attribute>();
+ private List<QtPDOMProperty.Attribute> attributes = new ArrayList<>();
public QtPropertyName(QObjectName qobjName, IASTName ast, String name, QtASTImageLocation location) {
super(qobjName, ast, name, location);
diff --git a/qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/ASTUtilTests.java b/qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/ASTUtilTests.java
index c4a9bb4288..af7a4cf2ed 100644
--- a/qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/ASTUtilTests.java
+++ b/qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/ASTUtilTests.java
@@ -39,7 +39,7 @@ public class ASTUtilTests extends AST2TestBase {
assertNotNull(tu);
// Find the callee function call.
- ArrayList<IASTFunctionCallExpression> fnCalls = new ArrayList<IASTFunctionCallExpression>();
+ ArrayList<IASTFunctionCallExpression> fnCalls = new ArrayList<>();
collectChildren(fnCalls, tu, IASTFunctionCallExpression.class);
assertEquals(7, fnCalls.size());
@@ -89,7 +89,7 @@ public class ASTUtilTests extends AST2TestBase {
assertNotNull(tu);
// Find the C1 type.
- ArrayList<ICPPASTCompositeTypeSpecifier> specs = new ArrayList<ICPPASTCompositeTypeSpecifier>();
+ ArrayList<ICPPASTCompositeTypeSpecifier> specs = new ArrayList<>();
collectChildren(specs, tu, ICPPASTCompositeTypeSpecifier.class);
assertEquals(1, specs.size());
@@ -101,7 +101,7 @@ public class ASTUtilTests extends AST2TestBase {
assertEquals("C1", specName.getRawSignature());
// Find the function call expression "c.get()".
- ArrayList<IASTFunctionCallExpression> fnCalls = new ArrayList<IASTFunctionCallExpression>();
+ ArrayList<IASTFunctionCallExpression> fnCalls = new ArrayList<>();
collectChildren(fnCalls, tu, IASTFunctionCallExpression.class);
assertEquals(2, fnCalls.size());
diff --git a/qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/QObjectTests.java b/qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/QObjectTests.java
index 4617dbb955..59d87af3c2 100644
--- a/qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/QObjectTests.java
+++ b/qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/QObjectTests.java
@@ -368,7 +368,7 @@ public class QObjectTests extends BaseQtTestCase {
throws Exception {
// this map is used to make sure that all expected attributes are found
- Map<String, ExpectedQProperty> qprops = new HashMap<String, QObjectTests.ExpectedQProperty>();
+ Map<String, ExpectedQProperty> qprops = new HashMap<>();
for (ExpectedQProperty qprop : expectedProperties)
if (qprops.containsKey(qprop.name))
fail("duplicate properties in expected list " + qprop.name);
@@ -382,7 +382,7 @@ public class QObjectTests extends BaseQtTestCase {
assertEquals("unexpected type for " + expected.name, expected.name, qprop.getName());
// make sure that all attributes that were found were expected
- Set<Attribute> allAttrs = new HashSet<Attribute>(Arrays.asList(Attribute.values()));
+ Set<Attribute> allAttrs = new HashSet<>(Arrays.asList(Attribute.values()));
for (int i = 0; i < expected.attributes.length; ++i) {
Attribute attr = (Attribute) expected.attributes[i];
diff --git a/qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/QtRegressionTests.java b/qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/QtRegressionTests.java
index 55e2d3eb5b..a99208621b 100644
--- a/qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/QtRegressionTests.java
+++ b/qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/QtRegressionTests.java
@@ -41,12 +41,12 @@ import org.eclipse.ui.ide.IDE;
public class QtRegressionTests extends BaseQtTestCase {
private static Map<String, Set<String>> buildExpectedMap(String mocOutput) {
- Map<String, Set<String>> expected = new HashMap<String, Set<String>>();
+ Map<String, Set<String>> expected = new HashMap<>();
for (String moc_signature : mocOutput.split("\0")) {
String name = moc_signature.split("\\(")[0];
Set<String> set = expected.get(name);
if (set == null) {
- set = new HashSet<String>();
+ set = new HashSet<>();
expected.put(name, set);
}
set.add(moc_signature);
@@ -334,7 +334,7 @@ public class QtRegressionTests extends BaseQtTestCase {
// make sure that the three slot functions are found, but none of the inherited or
// non-slot functions
- Set<String> expected = new HashSet<String>(Arrays.asList("slot1", "slot2", "slot3"));
+ Set<String> expected = new HashSet<>(Arrays.asList("slot1", "slot2", "slot3"));
for (IQMethod method : localSlots)
assertTrue("unexpected slot " + method.getName(), expected.remove(method.getName()));
assertEquals("missing slots " + expected.toString(), 0, expected.size());
diff --git a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/QObjectConnectCompletion.java b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/QObjectConnectCompletion.java
index a2f29cc018..6829376498 100644
--- a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/QObjectConnectCompletion.java
+++ b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/QObjectConnectCompletion.java
@@ -155,7 +155,7 @@ public class QObjectConnectCompletion {
private static int[] computeCommaPositions(String code) {
final int length = code.length();
int pos = 0;
- List<Integer> positions = new ArrayList<Integer>();
+ List<Integer> positions = new ArrayList<>();
positions.add(-1);
while (pos < length && pos != -1) {
char ch = code.charAt(pos);
@@ -207,7 +207,7 @@ public class QObjectConnectCompletion {
if (qobj == null)
return null;
- Collection<QObjectConnectCompletion> completions = new ArrayList<QObjectConnectCompletion>();
+ Collection<QObjectConnectCompletion> completions = new ArrayList<>();
String raw = arg.getRawSignature();
if (raw.startsWith(QtKeywords.SIGNAL))
for (IQMethod method : qobj.getSignals().withoutOverrides())
@@ -304,7 +304,7 @@ public class QObjectConnectCompletion {
if (qtProposals == null || qtProposals.isEmpty())
return null;
- Collection<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>();
+ Collection<ICompletionProposal> proposals = new ArrayList<>();
for (QObjectConnectCompletion qtProposal : qtProposals)
qtProposal.addProposals(proposals, context);
return proposals;
diff --git a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/QtCompletionProposalComputer.java b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/QtCompletionProposalComputer.java
index 713329a7d5..cee5b5d684 100644
--- a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/QtCompletionProposalComputer.java
+++ b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/QtCompletionProposalComputer.java
@@ -116,7 +116,7 @@ public class QtCompletionProposalComputer extends ParsingBasedProposalComputer {
return list;
if (list == null)
- return new ArrayList<T>(toAdd);
+ return new ArrayList<>(toAdd);
list.addAll(toAdd);
return list;
diff --git a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/assist/QPropertyAttributeProposal.java b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/assist/QPropertyAttributeProposal.java
index c64b5d1494..ea0b2865fd 100644
--- a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/assist/QPropertyAttributeProposal.java
+++ b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/assist/QPropertyAttributeProposal.java
@@ -118,7 +118,7 @@ public class QPropertyAttributeProposal {
// Return all the methods, including inherited and non-visible ones.
ICPPMethod[] methods = cls.getMethods();
- List<ICPPMethod> filtered = new ArrayList<ICPPMethod>(methods.length);
+ List<ICPPMethod> filtered = new ArrayList<>(methods.length);
for (ICPPMethod method : methods)
if (methodAttribute.keep(method))
filtered.add(method);
@@ -126,7 +126,7 @@ public class QPropertyAttributeProposal {
// TODO Choose the overload that is the best match -- closest parameter type and fewest
// parameters with default values.
- List<QPropertyAttributeProposal> proposals = new ArrayList<QPropertyAttributeProposal>();
+ List<QPropertyAttributeProposal> proposals = new ArrayList<>();
for (ICPPMethod method : getMethods(context, methodAttribute))
proposals.add(new QPropertyAttributeProposal(method.getName(), getDisplay(cls, method),
methodAttribute.getRelevance(method)));
@@ -158,7 +158,7 @@ public class QPropertyAttributeProposal {
if (qobj == null)
return Collections.emptyList();
- List<QPropertyAttributeProposal> proposals = new ArrayList<QPropertyAttributeProposal>();
+ List<QPropertyAttributeProposal> proposals = new ArrayList<>();
for (IQMethod qMethod : qobj.getSignals().all())
proposals.add(new QPropertyAttributeProposal(qMethod.getName(), IMethodAttribute.BaseRelevance));
@@ -488,7 +488,7 @@ public class QPropertyAttributeProposal {
// Return all the methods, including inherited and non-visible ones.
ICPPMethod[] methods = cls.getMethods();
- List<ICPPMethod> filtered = new ArrayList<ICPPMethod>(methods.length);
+ List<ICPPMethod> filtered = new ArrayList<>(methods.length);
for (ICPPMethod method : methods)
if (methodAttribute.keep(method))
filtered.add(method);
diff --git a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/assist/QPropertyExpansion.java b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/assist/QPropertyExpansion.java
index 7f1ec424c8..4b7c151999 100644
--- a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/assist/QPropertyExpansion.java
+++ b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/assist/QPropertyExpansion.java
@@ -348,14 +348,14 @@ public class QPropertyExpansion {
// it is added as an unspecified attribute. If the loop completes, then we create a list of proposals
// for from that unspecified list.
- List<Attribute> unspecifiedAttributes = new ArrayList<Attribute>();
+ List<Attribute> unspecifiedAttributes = new ArrayList<>();
for (IQProperty.Attribute attr : IQProperty.Attribute.values()) {
if (attr.hasValue && (prevIdentifier != null && attr.identifier.equals(prevIdentifier.ident))) {
Collection<QPropertyAttributeProposal> attrProposals = QPropertyAttributeProposal.buildProposals(attr,
context, type, name);
if (attrProposals != null) {
- List<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>();
+ List<ICompletionProposal> proposals = new ArrayList<>();
for (QPropertyAttributeProposal value : attrProposals)
if (prefix == null || value.getIdentifier().startsWith(prefix))
proposals.add(value.createProposal(prefix, context.getInvocationOffset()));
@@ -373,7 +373,7 @@ public class QPropertyExpansion {
unspecifiedAttributes.add(new Attribute(attr));
}
- List<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>();
+ List<ICompletionProposal> proposals = new ArrayList<>();
for (Attribute attr : unspecifiedAttributes) {
ICompletionProposal proposal = attr.getProposal(contextId, context);
if (proposal != null)
diff --git a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/pro/parser/QtProjectVariable.java b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/pro/parser/QtProjectVariable.java
index 3ad0517e73..afde85f299 100644
--- a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/pro/parser/QtProjectVariable.java
+++ b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/pro/parser/QtProjectVariable.java
@@ -154,7 +154,7 @@ public class QtProjectVariable {
* @return a List containing all of the value(s) assigned to this variable
*/
public List<String> getValues() {
- List<String> values = new ArrayList<String>();
+ List<String> values = new ArrayList<>();
values.add(matchResults.get(0).group(GROUP_VAR_CONTENTS));
for (int i = 1; i < matchResults.size(); i++) {
values.add(matchResults.get(i).group(GROUP_LINE_CONTENTS));

Back to the top