Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Ferguson2008-04-29 14:15:45 +0000
committerAndrew Ferguson2008-04-29 14:15:45 +0000
commitab41c57c9f2c8beaf21fc678e890a564185b0956 (patch)
tree9f4f38100f05a85d044a4bf93b01290924d96ceb /core/org.eclipse.cdt.core/templateengine
parent1d5e7d407ba1ef0f029dc8bda470a2c604dbe2d8 (diff)
downloadorg.eclipse.cdt-ab41c57c9f2c8beaf21fc678e890a564185b0956.tar.gz
org.eclipse.cdt-ab41c57c9f2c8beaf21fc678e890a564185b0956.tar.xz
org.eclipse.cdt-ab41c57c9f2c8beaf21fc678e890a564185b0956.zip
fix more warnings
Diffstat (limited to 'core/org.eclipse.cdt.core/templateengine')
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateDescriptor.java6
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java3
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessHelper.java20
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/TemplateProcessHandler.java3
4 files changed, 12 insertions, 20 deletions
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 38f17237106..a146be89df0 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
@@ -110,10 +110,8 @@ public class TemplateDescriptor {
/**
* This method is to get the list of property-group elements from template
- * descriptor root element
+ * descriptor root element.
*
- * @param aRootElement
- * root element of type JDOM Element
* @return list of property-group elements
*/
public List<Element> getPropertyGroupList() {
@@ -156,7 +154,7 @@ public class TemplateDescriptor {
Element nextPGElement = propertyGroupList.get(i);
if (isNestedElement(nextPGElement))
nextPGElementName = nextPGElement.getNodeName();
- if (nextPGElementName.equalsIgnoreCase(PROPERTY_GROUP) && isNestedElement(nextPGElement)) {
+ if (PROPERTY_GROUP.equalsIgnoreCase(nextPGElementName) && isNestedElement(nextPGElement)) {
return nextPGElement;
}
}
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java
index 4570f795b50..6c75f520ec7 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java
@@ -253,8 +253,7 @@ public class ConditionalProcessGroup {
}
/**
- * Returns All Macros as a Set.
- * @return Set, contains macros
+ * @return the union of all macros used in the child processes
*/
public Set<String> getAllMacros() {
Set<String> set = null;
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessHelper.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessHelper.java
index 2a5bd44b61c..1e6eb795ce7 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessHelper.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessHelper.java
@@ -43,10 +43,8 @@ public class ProcessHelper {
/**
* This method is to append the given contents into a file.
*
- * @param fileContents,
- * contents which are appended to the file.
- * @param toFile,
- * a file to append contents.
+ * @param fileContents contents which are appended to the file.
+ * @param toFile a file to append contents.
* @throws IOException,
* exception while writing contents into a file
*
@@ -62,7 +60,9 @@ public class ProcessHelper {
raf.skipBytes((int) raf.length());
raf.writeBytes(fileContents);
} finally {
- raf.close();
+ if(raf != null) {
+ raf.close();
+ }
}
}
}
@@ -71,8 +71,7 @@ public class ProcessHelper {
* This method returns a vector of all replace marker strings. (e.g.,
* $(item), vector contains 'item' as one item. , ) is the end pattern.
*
- * @param str,
- * A given string possibly containing markers.
+ * @param str A given string possibly containing markers.
* @return the set of names occurring within markers
* @since 4.0
*/
@@ -172,11 +171,10 @@ public class ProcessHelper {
/**
- * Returns the Macro Value after expanding the Macros.
* @param string
* @param macros
* @param valueStore
- * @return
+ * @return the Macro Value after expanding the Macros.
*
* @since 4.0
*/
@@ -192,10 +190,8 @@ public class ProcessHelper {
}
/**
- * Construct and return the replacement markers
- * after adding the patterns to the macro.
* @param macro
- * @return
+ * @return the replacement marker string
*
* @since 4.0
*/
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/TemplateProcessHandler.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/TemplateProcessHandler.java
index e2bce626344..c46adba0631 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/TemplateProcessHandler.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/TemplateProcessHandler.java
@@ -71,8 +71,7 @@ public class TemplateProcessHandler {
}
/**
- * Returns all macros
- * @return
+ * @return the union of all macros used in this template's process groups
*/
public Set<String> getAllMacros() {
Set<String> set = new HashSet<String>();

Back to the top