Class TemplateEngineHelper
java.lang.Object
org.eclipse.cdt.core.templateengine.TemplateEngineHelper
Acts as an Helper class for Template Engine
- Since:
- 4.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
checkDirectoryInWorkspace
(String directoryName) Check whether there is a directory existing in present workspace, with the given name.static String
externalizeTemplateString
(String pluginId, String location, String key) static String
externalizeTemplateString
(TemplateInfo ti, String key) static String
getFirstMarkerID
(String markerString) static File
getSharedDefaultLocation
(String sharedLocation) Gets the backup shareddefaults XML file.static URL
getTemplateResourceURL
(String pluginId, String resourcePath) Return Template Source path as URLstatic URL
getTemplateResourceURLRelativeToTemplate
(TemplateCore template, String resourcePath) Returns the Template Resource Relative Path as URLstatic org.eclipse.core.runtime.IPath
This method returns the workspace path present in the workspacestatic File
storeSharedDefaultLocation
(String sharedLocation) Stores the shareddefaults xml file in "${workspace}/.metadata/.plugins/${plugin.name}/shareddefaults.xml" path.
-
Field Details
-
US
- See Also:
-
OPEN_MARKER
- See Also:
-
CLOSE_MARKER
- See Also:
-
STRING_EXTERNALIZATION_MARKER
- See Also:
-
LOGGER_FILE_NAME
- See Also:
-
PROJRESOURCE
- See Also:
-
PLUGIN_ID
- See Also:
-
PLUGIN_PROPERTIES
- See Also:
-
TEMPLATE_PROPERTIES
- See Also:
-
BOOLTRUE
- See Also:
-
ID
- See Also:
-
VALUE
- See Also:
-
SDLOG_FILE_NAME
- See Also:
-
LOCATION
- See Also:
-
WIZARD_ID
- See Also:
-
FILTER_PATTERN
- See Also:
-
USAGE_DESCRIPTION
- See Also:
-
PROJECT_TYPE
- See Also:
-
TOOL_CHAIN
- See Also:
-
EXTRA_PAGES_PROVIDER
- See Also:
-
IS_CATEGORY
- See Also:
-
-
Constructor Details
-
TemplateEngineHelper
public TemplateEngineHelper()
-
-
Method Details
-
getWorkspacePath
public static org.eclipse.core.runtime.IPath getWorkspacePath()This method returns the workspace path present in the workspace- Returns:
- String Example : file:/C:/eclipse/workspace/
- Since:
- 4.0
-
getFirstMarkerID
- Parameters:
markerString
-- Returns:
- the first content of a region matching $(.*) e.g. given a String of the form "foo $(ID) bar", return ID.
- Since:
- 4.0
-
checkDirectoryInWorkspace
Check whether there is a directory existing in present workspace, with the given name.- Parameters:
directoryName
-- Returns:
- true, if directory exists.
- Since:
- 4.0
-
getTemplateResourceURL
Return Template Source path as URL- Parameters:
pluginId
-resourcePath
-- Returns:
- URL, of the Template Resource
- Throws:
IOException
- Since:
- 4.0
-
getTemplateResourceURLRelativeToTemplate
public static URL getTemplateResourceURLRelativeToTemplate(TemplateCore template, String resourcePath) throws IOException Returns the Template Resource Relative Path as URL- Parameters:
template
-resourcePath
-- Returns:
- URL, of the Template Resource
- Throws:
IOException
- Since:
- 4.0
-
externalizeTemplateString
-
externalizeTemplateString