|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.codegen.jet.JETNature
Field Summary | |
protected static String |
BUILDER
|
protected static String |
DEFAULT_TEMPLATE_CONTAINER_NAME
|
protected static String |
JET_NATURE_PROPERTIES_FILE
|
protected static String |
JET_SETTINGS_NODE
|
protected IContainer |
jetJavaSourceContainer
|
protected IProject |
jetProject
|
protected List |
jetTemplateContainers
|
protected List |
jetTemplateSourceContainers
|
protected static String |
SOURCE_CONTAINER_NODE
|
protected static 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(String builderID)
Adds a builder to the build spec for the given project. |
protected void |
commitXML(Document document)
|
void |
configure()
|
void |
configure(IProgressMonitor monitor)
|
protected void |
createDefaultJETSettingsFile(List templateContainers,
IContainer sourceContainer)
|
protected void |
createDefaultJETSettingsFile(List templateContainers,
List templateSourceContainers,
IContainer sourceContainer)
Writes the default file |
void |
deconfigure()
|
protected Element |
getChildWithLocalName(Element element,
String localName)
Returns the child with the given local name. |
static String |
getContainer(IProject project,
IContainer container)
|
static IContainer |
getContainer(IProject project,
IPath path)
|
static IContainer |
getContainer(IProject project,
String path)
|
static String |
getContainers(IProject project,
List containers)
|
static String |
getContainers(IProject project,
List containers,
List sourceContainers)
|
static List |
getContainers(IProject project,
String paths)
|
static List |
getContainers(IProject project,
String paths,
boolean filter)
|
protected IContainer |
getContainerValue(Element element,
String localName)
Returns the container defined from the base Element passed in. |
protected List |
getContainerValues(Element element,
String localName)
Returns the containers defined from the base Element passed in. |
protected List |
getContainerValues(Element element,
String localName,
boolean filter)
Returns the containers defined from the base Element passed in with entries starting with @ filtered out. |
protected IPath |
getDefaultSourcePath()
Returns the project's root directory |
IContainer |
getJavaSourceContainer()
Returns the container where the generated Java sources go. |
IContainer |
getJavaSourceContainerFromFile()
Returns the template file from the .jetproperties file |
IProject |
getProject()
|
static JETNature |
getRuntime(IProject project)
Get a JETNature that corresponds to the supplied project. |
List |
getTemplateContainers()
Returns the containers where the templates are located. |
List |
getTemplateContainersFromFile()
Returns the template path from the .jetproperties file. |
List |
getTemplateSourceContainers()
Returns the containers where the template sources are located. |
protected List |
getTemplateSourceContainersFromFile()
Returns the template source path from the .jetproperties file. |
protected void |
initJavaSourceContainer(IProgressMonitor monitor)
Initializes the Java Source Container |
protected void |
initTemplateContainer(IProgressMonitor monitor)
Initializes the template container. |
protected Document |
parseJETSettings()
Parse the JET settings file for the root element. |
static byte[] |
readContentsAsBytes(InputStream input)
Reads an input stream and converts it to bytes |
protected StringReader |
readJETSettingFile()
Open the JET Settings file and return a StringReader on the contents |
protected void |
setContainerValue(IContainer container,
Element element,
String localName)
Sets the template container location in the settings file |
protected void |
setContainerValues(List containers,
Element element,
String localName)
|
protected void |
setContainerValues(List containers,
List sourceContainers,
Element element,
String localName)
Sets the template container locations in the settings file |
void |
setDefaults(IProgressMonitor monitor)
Sets the containers to their defaults. |
void |
setJavaSourceContainer(IContainer javaSourceContainer)
Sets the container where the generated Java sources go. |
void |
setJavaSourceContainerToFile(IContainer sourceContainer)
Writes the Java Source Container Location to a file |
void |
setProject(IProject project)
|
void |
setTemplateContainers(List templateContainers)
Sets the containers where the templates are located. |
void |
setTemplateContainers(List templateContainers,
List templateSourceContainers)
Sets the containers where the template sources are located. |
void |
setTemplateContainersToFile(List templateContainers)
|
void |
setTemplateContainersToFile(List templateContainers,
List templateSourceContainers)
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 String BUILDER
protected static final String DEFAULT_TEMPLATE_CONTAINER_NAME
protected static final String JET_NATURE_PROPERTIES_FILE
protected static final String TEMPLATE_CONTAINER_NODE
protected static final String SOURCE_CONTAINER_NODE
protected static final String JET_SETTINGS_NODE
protected IProject jetProject
protected List jetTemplateContainers
protected List jetTemplateSourceContainers
protected IContainer jetJavaSourceContainer
Constructor Detail |
public JETNature()
Method Detail |
public static JETNature getRuntime(IProject project)
project
- IProject
public List getTemplateContainers()
IJETNature
getTemplateContainers
in interface IJETNature
public List getTemplateSourceContainers()
IJETNature
getTemplateSourceContainers
in interface IJETNature
public IContainer getJavaSourceContainer()
IJETNature
getJavaSourceContainer
in interface IJETNature
public void setTemplateContainers(List templateContainers)
IJETNature
setTemplateContainers
in interface IJETNature
templateContainers
- the new locations.public void setTemplateContainers(List templateContainers, List templateSourceContainers)
IJETNature
setTemplateContainers
in interface IJETNature
templateContainers
- the new locations.templateSourceContainers
- the new sourcelocations.public void setJavaSourceContainer(IContainer javaSourceContainer)
IJETNature
setJavaSourceContainer
in interface IJETNature
javaSourceContainer
- the new location.public void configure() throws CoreException
configure
in interface IProjectNature
CoreException
public void configure(IProgressMonitor monitor) throws CoreException
CoreException
public void setDefaults(IProgressMonitor monitor) throws CoreException
CoreException
public void deconfigure() throws CoreException
deconfigure
in interface IProjectNature
CoreException
public IProject getProject()
getProject
in interface IProjectNature
public void setProject(IProject project)
setProject
in interface IProjectNature
protected void initTemplateContainer(IProgressMonitor monitor) throws CoreException
CoreException
protected void initJavaSourceContainer(IProgressMonitor monitor) throws CoreException
CoreException
protected IPath getDefaultSourcePath()
protected void addToFrontOfBuildSpec(String builderID) throws CoreException
CoreException
public List getTemplateContainersFromFile()
protected List getTemplateSourceContainersFromFile()
public IContainer getJavaSourceContainerFromFile()
protected Document parseJETSettings() throws ParserConfigurationException, SAXException, IOException, CoreException
ParserConfigurationException
SAXException
IOException
CoreException
protected StringReader readJETSettingFile() throws CoreException, IOException
CoreException
IOException
protected List getContainerValues(Element element, String localName)
protected List getContainerValues(Element element, String localName, boolean filter)
protected IContainer getContainerValue(Element element, String localName)
protected void setContainerValues(List containers, Element element, String localName)
protected void setContainerValues(List containers, List sourceContainers, Element element, String localName)
protected void setContainerValue(IContainer container, Element element, String localName)
protected Element getChildWithLocalName(Element element, String localName)
public static byte[] readContentsAsBytes(InputStream input) throws IOException
IOException
public void setTemplateContainersToFile(List templateContainers) throws CoreException
CoreException
public void setTemplateContainersToFile(List templateContainers, List templateSourceContainers) throws CoreException
CoreException
public void setJavaSourceContainerToFile(IContainer sourceContainer) throws CoreException
CoreException
protected void createDefaultJETSettingsFile(List templateContainers, IContainer sourceContainer) throws CoreException, IOException
CoreException
IOException
protected void createDefaultJETSettingsFile(List templateContainers, List templateSourceContainers, IContainer sourceContainer) throws CoreException, IOException
CoreException
IOException
protected void commitXML(Document document) throws CoreException, ClassNotFoundException, IOException
CoreException
ClassNotFoundException
IOException
public static IContainer getContainer(IProject project, IPath path)
public static IContainer getContainer(IProject project, String path)
public static List getContainers(IProject project, String paths)
public static List getContainers(IProject project, String paths, boolean filter)
public static String getContainers(IProject project, List containers)
public static String getContainers(IProject project, List containers, List sourceContainers)
public static String getContainer(IProject project, IContainer container)
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |