diff options
Diffstat (limited to 'qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt')
28 files changed, 60 insertions, 60 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 713ed93e70c..0623dee3a60 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 f1a3677be61..cf046ae0c54 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 4f19b787631..53fbb559603 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 bbb5d68feea..2dcd0e02ffa 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 bcecfeda006..42233f6e361 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 945352f4016..d904a628ef2 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 0d2f4306bfc..6174ec9e6ca 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 602891fab97..eb8e1f39923 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 22e04f7fcd9..1d46f15cd9f 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 69ea716b94a..d63c9a56546 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 98a0716e19d..4d744d59737 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 2b0a7d2dcc3..b9b5485d933 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 d8f68fec4b5..63e66f69742 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 e2d1f7ad25c..04337a12b2d 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 3e61526fcad..44b6948379b 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 246d855912a..6dc717b808b 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 e860808c22d..c77a9701708 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 1b3436cad10..f049cc248d2 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 fabed2893d6..8900d6b4a46 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 782833f587c..0c707c535e1 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 67d63467011..10b15df5a7f 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 cf15b3d2946..1b07883e68c 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 253fa534b9a..7ddfd2afccc 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 887fb462b15..0d5ce1e632c 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 3dafe8144da..204b73c5ea3 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 5fcaaaefb12..9707501aead 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 67b3e9c7f13..e423c75d964 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 ca7145dbb5e..f1eee967885 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); |