Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Ferguson2007-04-27 09:41:35 +0000
committerAndrew Ferguson2007-04-27 09:41:35 +0000
commit0bcf54bfc57cd2f67039cac1938ca8abd512e81a (patch)
treec57093585f1a6366786dd7ac79401c29942091b0 /core/org.eclipse.cdt.core/templateengine
parenta4ee63b31d8ff235b8c060abf7d8cd3b05c17bf7 (diff)
downloadorg.eclipse.cdt-0bcf54bfc57cd2f67039cac1938ca8abd512e81a.tar.gz
org.eclipse.cdt-0bcf54bfc57cd2f67039cac1938ca8abd512e81a.tar.xz
org.eclipse.cdt-0bcf54bfc57cd2f67039cac1938ca8abd512e81a.zip
clean up warnings
Diffstat (limited to 'core/org.eclipse.cdt.core/templateengine')
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/SharedDefaults.java2
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateDescriptor.java2
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngineHelper.java22
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessArgument.java7
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/processes/AppendCreate.java2
5 files changed, 19 insertions, 16 deletions
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/SharedDefaults.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/SharedDefaults.java
index 7872ba64e37..927292ef60d 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/SharedDefaults.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/SharedDefaults.java
@@ -136,7 +136,7 @@ public class SharedDefaults extends HashMap/*<String, String>*/ {
Element xmlElement = (Element) sharedElementList.get(i);
key = xmlElement.getAttribute(TemplateEngineHelper.ID);
value = xmlElement.getAttribute(TemplateEngineHelper.VALUE);
- if (key != null && !key.trim().equals("")) {
+ if (key != null && !key.trim().equals("")) { //$NON-NLS-1$
sharedDefaultsMap.put(key, value);
}
}
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateDescriptor.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateDescriptor.java
index bacec4f40ad..36cfd87d80e 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateDescriptor.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateDescriptor.java
@@ -169,7 +169,7 @@ public class TemplateDescriptor {
Element propertyElement = (Element) children.get(i);
String key = propertyElement.getAttribute(ID);
String value = propertyElement.getAttribute(DEFAULT);
- if (key != null && !key.equals("")) {
+ if (key != null && !key.equals("")) { //$NON-NLS-1$
defaults.put(key, value);
}
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngineHelper.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngineHelper.java
index 1866acdba6b..2f662c92df2 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngineHelper.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngineHelper.java
@@ -37,18 +37,18 @@ public class TemplateEngineHelper {
// This is used while getting the Plugin Path.
public static final String PROJRESOURCE = "plugin.xml"; //$NON-NLS-1$
public static final String BOOLTRUE = "true"; //$NON-NLS-1$
- public static final String ID = "id"; //NON-NLS-1$
- public static final String VALUE = "value"; //NON-NLS-1$
+ public static final String ID = "id"; //$NON-NLS-1$
+ public static final String VALUE = "value"; //$NON-NLS-1$
public static final String SDLOG_FILE_NAME = "sharedDefaults"; //$NON-NLS-1$
- public static final String LOCATION = "location"; //NON-NLS-1$
- public static final String WIZARD_ID = "wizardId"; //NON-NLS-1$
- public static final String FILTER_PATTERN = "filterPattern"; //NON-NLS-1$
- public static final String USAGE_DESCRIPTION = "usageDescription"; //NON-NLS-1$
- public static final String PROJECT_TYPE = "projectType"; //NON-NLS-1$
- public static final String TOOL_CHAIN = "toolChain"; //NON-NLS-1$
- public static final String EXTRA_PAGES_PROVIDER = "pagesAfterTemplateSelectionProvider"; //NON-NLS-1$
- public static final String IS_CATEGORY = "isCategory"; //NON-NLS-1$
- public static final String CONFIGURATIONS = "Configurations"; //NON-NLS-1$
+ public static final String LOCATION = "location"; //$NON-NLS-1$
+ public static final String WIZARD_ID = "wizardId"; //$NON-NLS-1$
+ public static final String FILTER_PATTERN = "filterPattern"; //$NON-NLS-1$
+ public static final String USAGE_DESCRIPTION = "usageDescription"; //$NON-NLS-1$
+ public static final String PROJECT_TYPE = "projectType"; //$NON-NLS-1$
+ public static final String TOOL_CHAIN = "toolChain"; //$NON-NLS-1$
+ public static final String EXTRA_PAGES_PROVIDER = "pagesAfterTemplateSelectionProvider"; //$NON-NLS-1$
+ public static final String IS_CATEGORY = "isCategory"; //$NON-NLS-1$
+ public static final String CONFIGURATIONS = "Configurations"; //$NON-NLS-1$
/**
* Gets the backup shareddefaults XML file. Presence of the file indicates
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessArgument.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessArgument.java
index b5abbba0137..f65a0e67afc 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessArgument.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessArgument.java
@@ -232,10 +232,13 @@ public class ProcessArgument {
public boolean areAllMacrosExpandable() {
switch (type) {
case ProcessParameter.SIMPLE:
- if (externalParam != null) {
+ case ProcessParameter.SIMPLE_ARRAY:
+ // the code for these cases is in this form as
+ // fall-through generates warning, with no way to
+ // suppress pre-java 1.5
+ if (type==ProcessParameter.SIMPLE && externalParam != null) {
return externalParam.isNullable() || template.getValueStore().get(name) != null;
}
- case ProcessParameter.SIMPLE_ARRAY:
if (macros == null || macros.size() == 0) {
return true;
}
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/processes/AppendCreate.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/processes/AppendCreate.java
index 63e49f1e950..fce035e574a 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/processes/AppendCreate.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/processes/AppendCreate.java
@@ -68,7 +68,7 @@ public class AppendCreate extends ProcessRunner {
if (!iFile.getParent().exists()) {
ProcessHelper.mkdirs(projectHandle, projectHandle.getFolder(iFile.getParent().getProjectRelativePath()));
}
- InputStream contents = new ByteArrayInputStream(fileContents.getBytes());;
+ InputStream contents = new ByteArrayInputStream(fileContents.getBytes());
if (!iFile.exists()) {
// Create the file
iFile.create(contents, true, null);

Back to the top