|
|||||||||
PREV CLASS SOURCE NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.emf.codegen.jet.JETNature
Field Summary | |
protected static java.lang.String |
BUILDER
|
protected static java.lang.String |
DEFAULT_TEMPLATE_CONTAINER_NAME
|
protected static java.lang.String |
JET_NATURE_PROPERTIES_FILE
|
protected static java.lang.String |
JET_SETTINGS_NODE
|
protected org.eclipse.core.resources.IContainer |
jetJavaSourceContainer
|
protected org.eclipse.core.resources.IProject |
jetProject
|
protected java.util.List |
jetTemplateContainers
|
protected static java.lang.String |
SOURCE_CONTAINER_NODE
|
protected static java.lang.String |
TEMPLATE_CONTAINER_NODE
|
Fields inherited from interface org.eclipse.emf.codegen.jet.IJETNature |
NATURE_ID |
Constructor Summary | |
JETNature()
Constructor for JETNature. |
Method Summary | |
protected void |
addToFrontOfBuildSpec(java.lang.String builderID)
Adds a builder to the build spec for the given project. |
protected void |
commitXML(org.w3c.dom.Document document)
|
void |
configure()
|
void |
configure(org.eclipse.core.runtime.IProgressMonitor monitor)
|
protected void |
createDefaultJETSettingsFile(java.util.List templateContainers,
org.eclipse.core.resources.IContainer sourceContainer)
Writes the default file |
void |
deconfigure()
|
protected org.w3c.dom.Element |
getChildWithLocalName(org.w3c.dom.Element element,
java.lang.String localName)
Returns the child with the given local name. |
static java.lang.String |
getContainer(org.eclipse.core.resources.IProject project,
org.eclipse.core.resources.IContainer container)
|
static org.eclipse.core.resources.IContainer |
getContainer(org.eclipse.core.resources.IProject project,
org.eclipse.core.runtime.IPath path)
|
static org.eclipse.core.resources.IContainer |
getContainer(org.eclipse.core.resources.IProject project,
java.lang.String path)
|
static java.lang.String |
getContainers(org.eclipse.core.resources.IProject project,
java.util.List containers)
|
static java.util.List |
getContainers(org.eclipse.core.resources.IProject project,
java.lang.String paths)
|
protected org.eclipse.core.resources.IContainer |
getContainerValue(org.w3c.dom.Element element,
java.lang.String localName)
Returns the container defined from the base Element passed in. |
protected java.util.List |
getContainerValues(org.w3c.dom.Element element,
java.lang.String localName)
Returns the containers defined from the base Element passed in. |
protected org.eclipse.core.runtime.IPath |
getDefaultSourcePath()
Returns the project's root directory |
org.eclipse.core.resources.IContainer |
getJavaSourceContainer()
Returns the container where the generated Java sources go. |
org.eclipse.core.resources.IContainer |
getJavaSourceContainerFromFile()
Returns the template file from the .jetproperties file |
org.eclipse.core.resources.IProject |
getProject()
|
static JETNature |
getRuntime(org.eclipse.core.resources.IProject project)
Get a JETNature that corresponds to the supplied project. |
java.util.List |
getTemplateContainers()
Returns the containers where the templates are located. |
java.util.List |
getTemplateContainersFromFile()
Returns the template path from the .jetproperties file. |
protected void |
initJavaSourceContainer(org.eclipse.core.runtime.IProgressMonitor monitor)
Initializes the Java Source Container |
protected void |
initTemplateContainer(org.eclipse.core.runtime.IProgressMonitor monitor)
Initializes the template container. |
protected org.w3c.dom.Document |
parseJETSettings()
Parse the JET settings file for the root element. |
static byte[] |
readContentsAsBytes(java.io.InputStream input)
Reads an input stream and converts it to bytes |
protected java.io.StringReader |
readJETSettingFile()
Open the JET Settings file and return a StringReader on the contents |
protected void |
setContainerValue(org.eclipse.core.resources.IContainer container,
org.w3c.dom.Element element,
java.lang.String localName)
Sets the template container location in the settings file |
protected void |
setContainerValues(java.util.List containers,
org.w3c.dom.Element element,
java.lang.String localName)
Sets the template container locations in the settings file |
void |
setDefaults(org.eclipse.core.runtime.IProgressMonitor monitor)
Sets the containers to their defaults. |
void |
setJavaSourceContainer(org.eclipse.core.resources.IContainer javaSourceContainer)
Sets the container where the generated Java sources go. |
void |
setJavaSourceContainerToFile(org.eclipse.core.resources.IContainer sourceContainer)
Writes the Java Source Container Location to a file |
void |
setProject(org.eclipse.core.resources.IProject project)
|
void |
setTemplateContainers(java.util.List templateContainers)
Sets the containers where the templates are located. |
void |
setTemplateContainersToFile(java.util.List templateContainers)
Writes the Template Container Location to a file |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String BUILDER
protected static final java.lang.String DEFAULT_TEMPLATE_CONTAINER_NAME
protected static final java.lang.String JET_NATURE_PROPERTIES_FILE
protected static final java.lang.String TEMPLATE_CONTAINER_NODE
protected static final java.lang.String SOURCE_CONTAINER_NODE
protected static final java.lang.String JET_SETTINGS_NODE
protected org.eclipse.core.resources.IProject jetProject
protected java.util.List jetTemplateContainers
protected org.eclipse.core.resources.IContainer jetJavaSourceContainer
Constructor Detail |
public JETNature()
Method Detail |
public static JETNature getRuntime(org.eclipse.core.resources.IProject project)
project
- IProjectpublic java.util.List getTemplateContainers()
IJETNature
getTemplateContainers
in interface IJETNature
org.eclipse.emf.codegen.jet.IJETNature
public org.eclipse.core.resources.IContainer getJavaSourceContainer()
IJETNature
getJavaSourceContainer
in interface IJETNature
org.eclipse.emf.codegen.jet.IJETNature
public void setTemplateContainers(java.util.List templateContainers)
IJETNature
setTemplateContainers
in interface IJETNature
org.eclipse.emf.codegen.jet.IJETNature
templateContainer
- the new locations.public void setJavaSourceContainer(org.eclipse.core.resources.IContainer javaSourceContainer)
IJETNature
setJavaSourceContainer
in interface IJETNature
org.eclipse.emf.codegen.jet.IJETNature
javaSourceContainer
- the new location.public void configure() throws org.eclipse.core.runtime.CoreException
configure
in interface org.eclipse.core.resources.IProjectNature
public void configure(org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
public void setDefaults(org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
public void deconfigure() throws org.eclipse.core.runtime.CoreException
deconfigure
in interface org.eclipse.core.resources.IProjectNature
public org.eclipse.core.resources.IProject getProject()
getProject
in interface org.eclipse.core.resources.IProjectNature
public void setProject(org.eclipse.core.resources.IProject project)
setProject
in interface org.eclipse.core.resources.IProjectNature
protected void initTemplateContainer(org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
protected void initJavaSourceContainer(org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
protected org.eclipse.core.runtime.IPath getDefaultSourcePath()
protected void addToFrontOfBuildSpec(java.lang.String builderID) throws org.eclipse.core.runtime.CoreException
public java.util.List getTemplateContainersFromFile()
public org.eclipse.core.resources.IContainer getJavaSourceContainerFromFile()
protected org.w3c.dom.Document parseJETSettings() throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException, org.eclipse.core.runtime.CoreException
protected java.io.StringReader readJETSettingFile() throws org.eclipse.core.runtime.CoreException, java.io.IOException
protected java.util.List getContainerValues(org.w3c.dom.Element element, java.lang.String localName)
protected org.eclipse.core.resources.IContainer getContainerValue(org.w3c.dom.Element element, java.lang.String localName)
protected void setContainerValues(java.util.List containers, org.w3c.dom.Element element, java.lang.String localName)
protected void setContainerValue(org.eclipse.core.resources.IContainer container, org.w3c.dom.Element element, java.lang.String localName)
protected org.w3c.dom.Element getChildWithLocalName(org.w3c.dom.Element element, java.lang.String localName)
public static byte[] readContentsAsBytes(java.io.InputStream input) throws java.io.IOException
public void setTemplateContainersToFile(java.util.List templateContainers) throws org.eclipse.core.runtime.CoreException
public void setJavaSourceContainerToFile(org.eclipse.core.resources.IContainer sourceContainer) throws org.eclipse.core.runtime.CoreException
protected void createDefaultJETSettingsFile(java.util.List templateContainers, org.eclipse.core.resources.IContainer sourceContainer) throws org.eclipse.core.runtime.CoreException, java.io.IOException
protected void commitXML(org.w3c.dom.Document document) throws org.eclipse.core.runtime.CoreException, java.lang.ClassNotFoundException, java.io.IOException
public static org.eclipse.core.resources.IContainer getContainer(org.eclipse.core.resources.IProject project, org.eclipse.core.runtime.IPath path)
public static org.eclipse.core.resources.IContainer getContainer(org.eclipse.core.resources.IProject project, java.lang.String path)
public static java.util.List getContainers(org.eclipse.core.resources.IProject project, java.lang.String paths)
public static java.lang.String getContainers(org.eclipse.core.resources.IProject project, java.util.List containers)
public static java.lang.String getContainer(org.eclipse.core.resources.IProject project, org.eclipse.core.resources.IContainer container)
|
Copyright 2001-2002 IBM Corporation and others. All Rights Reserved. |
||||||||
PREV CLASS SOURCE NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |