1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 18:26:01 +02:00

clean up warnings

This commit is contained in:
Andrew Ferguson 2008-04-18 12:38:06 +00:00
parent 5323561c07
commit 677d68715d
7 changed files with 23 additions and 61 deletions

View file

@ -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;
}

View file

@ -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;

View file

@ -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,38 +93,23 @@ 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
*
@ -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
*/

View file

@ -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$

View file

@ -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;

View file

@ -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

View file

@ -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);