Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarika Sinha2016-02-01 10:34:58 +0000
committerSarika Sinha2016-02-01 10:34:58 +0000
commit0b578a4efb6323cc3cdcdea5ef1783eaa717088f (patch)
treee30930855b0e82686843fb65836cb712b34690cd /org.eclipse.core.variables/src/org
parent010b0f7e4baced2770dc7bb8a3c21d9e59e91abb (diff)
downloadeclipse.platform.debug-0b578a4efb6323cc3cdcdea5ef1783eaa717088f.tar.gz
eclipse.platform.debug-0b578a4efb6323cc3cdcdea5ef1783eaa717088f.tar.xz
eclipse.platform.debug-0b578a4efb6323cc3cdcdea5ef1783eaa717088f.zip
Bug 486347 - Move org.eclipse.core.variables to Java 1.7I20160202-1000I20160202-0800
Diffstat (limited to 'org.eclipse.core.variables/src/org')
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringSubstitutionEngine.java10
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java12
2 files changed, 11 insertions, 11 deletions
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringSubstitutionEngine.java b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringSubstitutionEngine.java
index ce098e850..bce5c5934 100644
--- a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringSubstitutionEngine.java
+++ b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringSubstitutionEngine.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -85,13 +85,13 @@ public class StringSubstitutionEngine {
*/
public String performStringSubstitution(String expression, boolean reportUndefinedVariables, boolean resolveVariables, IStringVariableManager manager) throws CoreException {
substitute(expression, reportUndefinedVariables, resolveVariables, manager);
- List<HashSet<String>> resolvedVariableSets = new ArrayList<HashSet<String>>();
+ List<HashSet<String>> resolvedVariableSets = new ArrayList<>();
while (fSubs) {
HashSet<String> resolved = substitute(fResult.toString(), reportUndefinedVariables, true, manager);
for(int i=resolvedVariableSets.size()-1; i>=0; i--) {
HashSet<String> prevSet = resolvedVariableSets.get(i);
if (prevSet.equals(resolved)) {
- HashSet<String> conflictingSet = new HashSet<String>();
+ HashSet<String> conflictingSet = new HashSet<>();
for (; i<resolvedVariableSets.size(); i++) {
conflictingSet.addAll(resolvedVariableSets.get(i));
}
@@ -135,10 +135,10 @@ public class StringSubstitutionEngine {
*/
private HashSet<String> substitute(String expression, boolean reportUndefinedVariables, boolean resolveVariables, IStringVariableManager manager) throws CoreException {
fResult = new StringBuffer(expression.length());
- fStack = new Stack<VariableReference>();
+ fStack = new Stack<>();
fSubs = false;
- HashSet<String> resolvedVariables = new HashSet<String>();
+ HashSet<String> resolvedVariables = new HashSet<>();
int pos = 0;
int state = SCAN_FOR_START;
diff --git a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java
index 0270d9185..6dc72e1fb 100644
--- a/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java
+++ b/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -193,7 +193,7 @@ public class StringVariableManager implements IStringVariableManager, IPreferenc
* Constructs a new string variable manager.
*/
private StringVariableManager() {
- fListeners = new ListenerList<IValueVariableListener>();
+ fListeners = new ListenerList<>();
}
/**
@@ -202,8 +202,8 @@ public class StringVariableManager implements IStringVariableManager, IPreferenc
private synchronized void initialize() {
if (fDynamicVariables == null) {
fInternalChange = true;
- fDynamicVariables = new HashMap<String, IDynamicVariable>(5);
- fValueVariables = new HashMap<String, IStringVariable>(5);
+ fDynamicVariables = new HashMap<>(5);
+ fValueVariables = new HashMap<>(5);
loadContributedValueVariables();
loadPersistedValueVariables();
loadDynamicVariables();
@@ -325,7 +325,7 @@ public class StringVariableManager implements IStringVariableManager, IPreferenc
@Override
public synchronized IStringVariable[] getVariables() {
initialize();
- List<IStringVariable> list = new ArrayList<IStringVariable>(fDynamicVariables.size() + fValueVariables.size());
+ List<IStringVariable> list = new ArrayList<>(fDynamicVariables.size() + fValueVariables.size());
list.addAll(fDynamicVariables.values());
list.addAll(fValueVariables.values());
return list.toArray(new IStringVariable[list.size()]);
@@ -405,7 +405,7 @@ public class StringVariableManager implements IStringVariableManager, IPreferenc
@Override
public synchronized void removeVariables(IValueVariable[] variables) {
initialize();
- List<IValueVariable> removed = new ArrayList<IValueVariable>(variables.length);
+ List<IValueVariable> removed = new ArrayList<>(variables.length);
for (int i = 0; i < variables.length; i++) {
IValueVariable variable = variables[i];
if (fValueVariables.remove(variable.getName()) != null) {

Back to the top