diff options
author | Andrew Ferguson | 2007-09-17 14:17:15 +0000 |
---|---|---|
committer | Andrew Ferguson | 2007-09-17 14:17:15 +0000 |
commit | 90b276e9c0625ceeddebed7776776c836ba8d49f (patch) | |
tree | 26443cea0d23cb8b0c026d96f1b74d629692f1a0 /core/org.eclipse.cdt.core/templateengine/org/eclipse | |
parent | 02e0e771fe04f953c63dffb45fd339de21bb8783 (diff) | |
download | org.eclipse.cdt-90b276e9c0625ceeddebed7776776c836ba8d49f.tar.gz org.eclipse.cdt-90b276e9c0625ceeddebed7776776c836ba8d49f.tar.xz org.eclipse.cdt-90b276e9c0625ceeddebed7776776c836ba8d49f.zip |
203553: Apply patch plus additional docs improvements on behalf on Beth Tibbitts. Remove unused usageDescription attribute.
Diffstat (limited to 'core/org.eclipse.cdt.core/templateengine/org/eclipse')
2 files changed, 9 insertions, 20 deletions
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 f73a9af070a..81d3eacf15e 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 @@ -111,7 +111,7 @@ public class TemplateEngine { } /** - * This method will be called by Contianer UIs (Wizard, PropertyPage, + * This method will be called by Container UIs (Wizard, PropertyPage, * PreferencePage). Create a Template instance, update the ValueStore, with * SharedDefaults. This method calls the getTemplate(URL), after getting URL * for the given String TemplateDescriptor. @@ -209,7 +209,6 @@ public class TemplateEngine { String pluginId = null; String projectType = null; String filterPattern = null; - String usage = null; boolean isCategory = false; String extraPagesProvider = null; @@ -217,14 +216,13 @@ public class TemplateEngine { for(int i=0; i<extensions.length; i++) { IExtension extension = extensions[i]; IConfigurationElement[] configElements = extension.getConfigurationElements(); - pluginId = extension.getNamespaceIdentifier(); // Plugin-id of the extending plugin. + pluginId = extension.getNamespaceIdentifier(); // Plug-in id of the extending plug-in. for(int j=0; j<configElements.length; j++) { IConfigurationElement config = configElements[j]; templateId = config.getAttribute(TemplateEngineHelper.ID); location = config.getAttribute(TemplateEngineHelper.LOCATION); projectType = config.getAttribute(TemplateEngineHelper.PROJECT_TYPE); filterPattern = config.getAttribute(TemplateEngineHelper.FILTER_PATTERN); - usage = config.getAttribute(TemplateEngineHelper.USAGE_DESCRIPTION); isCategory = Boolean.valueOf(config.getAttribute(TemplateEngineHelper.IS_CATEGORY)).booleanValue(); extraPagesProvider = config.getAttribute(TemplateEngineHelper.EXTRA_PAGES_PROVIDER); @@ -236,7 +234,7 @@ public class TemplateEngine { TemplateInfo templateInfo = new TemplateInfo(templateId, projectType, filterPattern, location, pluginId, toolChainIdSet, - usage, extraPagesProvider, isCategory); + extraPagesProvider, isCategory); if (!templateInfoMap.containsKey(projectType)) { templateInfoMap.put(projectType, new ArrayList/*<TemplateInfo>*/()); } @@ -280,12 +278,12 @@ public class TemplateEngine { } /** - * Gets an array of template info objects matching the criteria passed as params. + * Gets an array of template info objects matching the criteria passed as parameters. * @param projectType may not be null * @param toolChain may be null to indicate no tool-chain * @param usageFilter a usage string which is matched against the filter from the template, may be null * to indicate no usage filtering - * @return an array of template infos (never null) + * @return an array of TemplateInfo objects (never null) */ public TemplateInfo[] getTemplateInfos(String projectType, String toolChain, String usageFilter) { List/*<TemplateInfo>*/ templateInfoList = (List/*<TemplateInfo*/) templateInfoMap.get(projectType.trim()); @@ -364,7 +362,7 @@ public class TemplateEngine { /** * Returns the Children of the Element. * @param element - * @return List of the child elelments + * @return List of the child elements * * @since 4.0 */ @@ -374,7 +372,7 @@ public class TemplateEngine { for (int i = 0, l = children.getLength(); i < l; i++) { Node child = children.item(i); if (child.getNodeType() == Node.ELEMENT_NODE) { - list.add((Element) child); + list.add(child); } } return list; @@ -395,7 +393,7 @@ public class TemplateEngine { for (int i = 0, l = children.getLength(); i < l; i++) { Node child = children.item(i); if (child.getNodeType() == Node.ELEMENT_NODE && child.getNodeName().equals(tag)) { - list.add((Element) child); + list.add(child); } } return list; diff --git a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateInfo.java b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateInfo.java index e4e6c13c1c7..0552e7ebd73 100644 --- a/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateInfo.java +++ b/core/org.eclipse.cdt.core/templateengine/org/eclipse/cdt/core/templateengine/TemplateInfo.java @@ -21,7 +21,6 @@ import java.util.Set; public class TemplateInfo { private String projectTypeId; private String filterPattern; - private String usageDescription; private String templatePath; private String pluginId; private Set toolChainIdSet; @@ -32,7 +31,7 @@ public class TemplateInfo { private List configs; public TemplateInfo(String templateId, String projectTypeId, String filterPattern, String templatePath, - String pluginId, Set toolChainIdSet, String usageDescription, + String pluginId, Set toolChainIdSet, String pagesProvider, boolean isCategory) { this.templateId = templateId; this.filterPattern = filterPattern; @@ -40,7 +39,6 @@ public class TemplateInfo { this.pluginId = pluginId; this.projectTypeId = projectTypeId; this.toolChainIdSet = toolChainIdSet; - this.usageDescription = usageDescription != null ? usageDescription : ""; //$NON-NLS-1$ this.pagesProvider = pagesProvider; this.isCategory = isCategory; this.configs = null; @@ -77,13 +75,6 @@ public class TemplateInfo { public String getFilterPattern() { return filterPattern; } - - /** - * @return the usageDescription - */ - public String getUsageDescription() { - return usageDescription; - } public String getExtraPagesProvider() { return pagesProvider; |