mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
clean up warnings
This commit is contained in:
parent
a4ee63b31d
commit
0bcf54bfc5
5 changed files with 19 additions and 16 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue