Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Swanson2004-05-07 04:13:10 +0000
committerDarin Swanson2004-05-07 04:13:10 +0000
commit4a0aacdbc15e0bfeb8e39e2d5bb2cee95ec148b9 (patch)
treee1e4c7e1bd56e80368792b9305ea5d35f86067d5 /org.eclipse.core.variables/src/org/eclipse/core/internal
parentb60c10b0de83392ad57bab96d88b7abdc0c815a5 (diff)
downloadeclipse.platform.debug-4a0aacdbc15e0bfeb8e39e2d5bb2cee95ec148b9.tar.gz
eclipse.platform.debug-4a0aacdbc15e0bfeb8e39e2d5bb2cee95ec148b9.tar.xz
eclipse.platform.debug-4a0aacdbc15e0bfeb8e39e2d5bb2cee95ec148b9.zip
Removed unncessary else statements
Diffstat (limited to 'org.eclipse.core.variables/src/org/eclipse/core/internal')
-rw-r--r--org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringSubstitutionEngine.java50
1 files changed, 23 insertions, 27 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 03d772137..542fc7b9f 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
@@ -257,33 +257,29 @@ public class StringSubstitutionEngine {
// no variables with the given name
if (reportUndefinedVariables) {
throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, MessageFormat.format(VariablesMessages.getString("StringSubstitutionEngine.3"), new String[]{name}), null)); //$NON-NLS-1$
- } else {
- // leave as is
- return getOriginalVarText(var);
- }
- } else {
- if (resolveVariables) {
- fSubs = true;
- return dynamicVariable.getValue(arg);
- } else {
- //leave as is
- return getOriginalVarText(var);
- }
- }
- } else {
- if (arg == null) {
- if (resolveVariables) {
- fSubs = true;
- return valueVariable.getValue();
- } else {
- //leave as is
- return getOriginalVarText(var);
- }
- } else {
- // error - an argument specified for a value variable
- throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, MessageFormat.format(VariablesMessages.getString("StringSubstitutionEngine.4"), new String[]{valueVariable.getName()}), null)); //$NON-NLS-1$
- }
- }
+ }
+ // leave as is
+ return getOriginalVarText(var);
+ }
+
+ if (resolveVariables) {
+ fSubs = true;
+ return dynamicVariable.getValue(arg);
+ }
+ //leave as is
+ return getOriginalVarText(var);
+ }
+
+ if (arg == null) {
+ if (resolveVariables) {
+ fSubs = true;
+ return valueVariable.getValue();
+ }
+ //leave as is
+ return getOriginalVarText(var);
+ }
+ // error - an argument specified for a value variable
+ throw new CoreException(new Status(IStatus.ERROR, VariablesPlugin.getUniqueIdentifier(), VariablesPlugin.INTERNAL_ERROR, MessageFormat.format(VariablesMessages.getString("StringSubstitutionEngine.4"), new String[]{valueVariable.getName()}), null)); //$NON-NLS-1$
}
private String getOriginalVarText(VariableReference var) {

Back to the top