Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Ferguson2008-04-18 12:38:06 +0000
committerAndrew Ferguson2008-04-18 12:38:06 +0000
commit677d68715d57655898169a2e0183aedbb25e34c6 (patch)
tree3caba652759f5209cf958838ee90ced6e3019a7a /core/org.eclipse.cdt.core
parent5323561c07721dacb10fecc8aa73866417087a68 (diff)
downloadorg.eclipse.cdt-677d68715d57655898169a2e0183aedbb25e34c6.tar.gz
org.eclipse.cdt-677d68715d57655898169a2e0183aedbb25e34c6.tar.xz
org.eclipse.cdt-677d68715d57655898169a2e0183aedbb25e34c6.zip
clean up warnings
Diffstat (limited to 'core/org.eclipse.cdt.core')
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/SharedDefaults.java5
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngine.java20
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngineHelper.java35
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ConditionalProcessGroup.java2
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Process.java7
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessArgument.java9
-rw-r--r--core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessRunnerFactory.java6
7 files changed, 23 insertions, 61 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 97ce360ebd..20a45520ce 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
@@ -75,11 +75,8 @@ public class SharedDefaults extends HashMap<String, String> {
private static SharedDefaults SHAREDDEFAULTS = new SharedDefaults();
/**
- * Returns static SharedDefaults Instance
- *
- * @return
+ * @return the shared SharedDefaults Instance
*/
-
public static SharedDefaults getInstance() {
return SHAREDDEFAULTS;
}
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngine.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngine.java
index 0dc2bfd93a..4d12275997 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngine.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateEngine.java
@@ -81,14 +81,14 @@ public class TemplateEngine {
}
/**
- * Returns the TemplateCore for the first template defined for the specified parameters, or null
- * if no such definition exists, or if there is an error initializing the template (the error will
- * be logged).
+ * Returns the first template defined for the specified parameters
* @param projectType may not be null
* @param toolChain may be null to indicate no tool-chain filtering
* @param usageFilter a regex in java.util.regex.Pattern format, may be null to indicate no filtering
* @see java.util.regex.Pattern
- * @return
+ * @return the TemplateCore for the first template defined for the specified parameters, or null
+ * if no such definition exists, or if there is an error initializing the template (the error will
+ * be logged).
*/
public TemplateCore getFirstTemplate(String projectType, String toolChain, String usageFilter) {
TemplateInfo[] infos= getTemplateInfos(projectType, toolChain, usageFilter);
@@ -153,9 +153,7 @@ public class TemplateEngine {
}
/**
- * return the SharedDefaults.
- *
- * @return
+ * @return the SharedDefaults.
*/
public static Map<String, String> getSharedDefaults() {
return SharedDefaults.getInstance().getSharedDefaultsMap();
@@ -170,7 +168,6 @@ public class TemplateEngine {
* values of IDs in ValueStore, which are also present in PersistTrueIDs
* vector.
* @param template
- * @param aSharedValue
*/
public void updateSharedDefaults(TemplateCore template) {
Map<String, String> tobePersisted = new HashMap<String, String>();
@@ -333,8 +330,7 @@ public class TemplateEngine {
}
/**
- * Returns all TemplateInfo objects known to the TemplateEngine
- * @return
+ * @return all TemplateInfo objects known to the TemplateEngine
*/
public TemplateInfo[] getTemplateInfos() {
List<TemplateInfo> infoList = new ArrayList<TemplateInfo>();
@@ -346,9 +342,7 @@ public class TemplateEngine {
/**
- * Getter for templateInfoMap
- *
- * @return
+ * @return the map from project-type ID's to all associated TemplateInfo instances
*/
public Map<String, List<TemplateInfo>> getTemplateInfoMap() {
return templateInfoMap;
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 3a97d3d97e..f60edc2489 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
@@ -69,7 +69,6 @@ public class TemplateEngineHelper {
*/
public static File getSharedDefaultLocation(String sharedLocation) {
-
File sharedXMLFile = findLocation(sharedLocation);
return sharedXMLFile;
}
@@ -82,14 +81,11 @@ public class TemplateEngineHelper {
*
* @since 4.0
*/
-
private static File findLocation(String fileLocation) {
-
Plugin plugin = CCorePlugin.getDefault();
IPath stateLoc = plugin.getStateLocation();
fileLocation = stateLoc.toString() + File.separator + fileLocation;
File file = new File(fileLocation);
-
return file;
}
@@ -97,39 +93,24 @@ public class TemplateEngineHelper {
* Stores the shareddefaults xml file in
* "${workspace}/.metadata/.plugins/${plugin.name}/shareddefaults.xml" path.
*
- * @param sharedLocation
- * @return sharedXMLFile
+ * @param sharedLocation the relative path within the plug-in
+ * @return a File object corresponding to the location within the plug-in
*
* @since 4.0
*/
-
public static File storeSharedDefaultLocation(String sharedLocation) {
-
File sharedXMLFile = findLocation(sharedLocation);
-
try {
- createNewFile(sharedXMLFile.getPath());
+ if(!sharedXMLFile.exists()) {
+ sharedXMLFile.createNewFile();
+ }
} catch (IOException e) {
- e.printStackTrace();
+ CCorePlugin.log(e);
}
return sharedXMLFile;
}
/**
- * This creates a new File, in the Absolute Path given as argument. The File
- * name will be part of the path argument.
- *
- * @param aFileName,
- * absoulute File path(including File name) to be created.
- *
- * @since 4.0
- */
- public static void createNewFile(String fileName) throws IOException {
-
- (new File(fileName)).createNewFile();
- }
-
- /**
* This method returns the workspace path present in the workspace
*
* @return String Example : file:/C:/eclipse/workspace/
@@ -146,10 +127,8 @@ public class TemplateEngineHelper {
}
/**
- * given a String of the form $(ID), return ID.
- *
* @param markerString
- * @return
+ * @return the first content of a region matching $(.*) e.g. given a String of the form "foo $(ID) bar", return ID.
*
* @since 4.0
*/
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 d2e1fd5330..4570f795b5 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
@@ -70,7 +70,6 @@ public class ConditionalProcessGroup {
/**
* Constructs a ConditionalProcess element from the supplied conditionElement (&lt;if&gt;) while building Process
* objects out of each of the element's &lt;process&gt; children.
- * @throws ProcessFailureException
*/
public ConditionalProcessGroup(TemplateCore template, Element conditionElement, int id) {
this.id = "Condition " + id; //$NON-NLS-1$
@@ -117,7 +116,6 @@ public class ConditionalProcessGroup {
* objects out of each of the supplied process elements (&lt;process&gt;). The condition in this case is evaluated to true.
*
* This Constructor is expected to be used to evaluate all those process elements that are children of the template root element.
- * @throws ProcessFailureException
*/
public ConditionalProcessGroup(TemplateCore template, Element[] processElements) {
id = "No Condition"; //$NON-NLS-1$
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Process.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Process.java
index fe7a500d8b..e5910c5971 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Process.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/Process.java
@@ -143,9 +143,9 @@ public class Process {
}
/**
- * Constructor
+ * Executes this process
* @param monitor
- * @return
+ * @return the result of executing this process
* @throws ProcessFailureException
*/
public IStatus process(IProgressMonitor monitor) throws ProcessFailureException {
@@ -175,8 +175,7 @@ public class Process {
}
/**
- * Returns the Macros.
- * @return
+ * @return the macros defined in the context of this process
*/
public Set<String> getMacros() {
Set<String> set = null;
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 b30d7df95f..3738992321 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
@@ -120,7 +120,7 @@ public class ProcessArgument {
}
/**
- * Adds the marcos based on the value.
+ * Adds the macros based on the value.
* @param value
*/
private void collectMacros(String value) {
@@ -223,8 +223,7 @@ public class ProcessArgument {
}
/**
- * Returns true if All macros are Expandable.
- * @return
+ * @return true if All macros are Expandable.
*/
public boolean areAllMacrosExpandable() {
switch (type) {
@@ -311,8 +310,7 @@ public class ProcessArgument {
}
/**
- * Returns the Macros as Set.
- * @return Set, contains the Macros.
+ * @return the macros defined in the context of this argument
*/
public Set<String> getMacros() {
return macros;
@@ -371,7 +369,6 @@ public class ProcessArgument {
}
/*
- * (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessRunnerFactory.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessRunnerFactory.java
index fd465c4fc4..ba8c73d908 100644
--- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessRunnerFactory.java
+++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/process/ProcessRunnerFactory.java
@@ -81,17 +81,15 @@ public class ProcessRunnerFactory {
}
/**
- * Process Runners Factory instance.
- * @return
+ * @return the singleton {@link ProcessRunnerFactory}
*/
public static ProcessRunnerFactory getDefault() {
return instance;
}
/**
- * Return the ProcessRunner based on the ProcessType.
* @param processType
- * @return
+ * @return the ProcessRunner based on the ProcessType.
*/
public ProcessRunner getProcessRunner(String processType) {
return processRunnerMap.get(processType);

Back to the top