|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.codegen.ecore.java2ecore.JavaEcoreBuilder
Field Summary | |
protected Set |
demandCreatedEDataTypes
The set of data types that were created without setting the instance class. |
protected Map |
eClassToSuperTypeNamesMap
The map from a class to its base class names. |
protected Map |
eModelElementToIDOMNodeMap
The map from a model element to the corresponding JDOM node. |
protected Map |
ePackageToOrderingMap
The map from package to the map of ordering constants. |
protected Map |
ePackageToPrefixMap
The map from package to the it's prefix. |
protected Map |
eReferenceToOppositeNameMap
The map from a reference to the name it's opposite. |
protected Map |
eTypedElementToInstanceTypeNameMap
The map from a typed element to its datatype's instance type name. |
protected Map |
eTypedElementToTypeNameMap
The map from a typed element to its type name. |
protected static Pattern |
extendsAnnotationExpression
The pattern for extracting the @extends annotations. |
protected Collection |
externalGenModels
All the external GenModels from all required projects. |
protected Map |
externalPackageNameToEPackageMap
The map from a package name to the corresponding package. |
protected GenModel |
genModel
The GenModel being generated. |
protected IFile |
genModelFile
The file being generated. |
protected static Pattern |
implementsAnnotationExpression
The pattern for extracting the @implements annotations. |
protected static org.eclipse.jdt.core.jdom.DOMFactory |
jdomFactory
The factory used to create JDOM. |
protected static Pattern |
modelAnnotationExpression
The pattern for extracting the @model annotations. |
protected GenModel |
oldGenModelVersion
The old version to against which to reconcile. |
protected Map |
packageNameToEPackageMap
The map from a package name to the corresponding package. |
protected MultiStatus |
status
|
protected Collection |
usedGenPackages
All the used GenPackages. |
Constructor Summary | |
JavaEcoreBuilder(IFile genModelFile)
Creates a builder for the given file. |
|
JavaEcoreBuilder(IFile genModelFile,
GenModel oldGenModelVersion)
|
Method Summary | |
protected void |
analyzeCompilationUnit(org.eclipse.jdt.core.jdom.IDOMCompilationUnit compilationUnit)
Walks the compilation unit to analyze the type. |
protected void |
analyzeField(EEnum eEnum,
org.eclipse.jdt.core.jdom.IDOMField field)
Creates EEnumLiteral as appropriate. |
protected void |
analyzeMethod(EClass eClass,
org.eclipse.jdt.core.jdom.IDOMMethod method)
Creates an EOperation, EAttribute, or EReference as appropriate. |
protected ETypedElement |
analyzeMethod(EClass eClass,
String modelAnnotation,
String methodName,
String returnType,
String[] parameterNames,
String[] parameterTypes)
|
protected void |
analyzeType(org.eclipse.jdt.core.jdom.IDOMType type)
Walks the type either as an EClass or an ENum to analyze either the methods or the fields. |
protected EStructuralFeature |
createFeature(EClass eClass,
String name,
EClassifier eType)
|
void |
determineExternalPackages(GenPackage genPackage)
|
protected void |
error(String message)
Produces another IStatus in the MultiStatus. |
void |
getAllGenModelFiles(Collection result,
IContainer container)
Walks the container recursively. |
void |
getAllGenModelFiles(Collection result,
IFile file)
Walks the container recursively. |
void |
getAllReferencedProjects(Collection result,
IProject[] projects)
Walks the projects recursively. |
protected String |
getExtendsAnnotation(String comment)
Returns the @extends/@implements annotation contents, or null. |
protected String |
getFilteredModelAnnotations(String modelAnnotation,
String filter)
Returns the filtered matches xyzAttribute-name="value" or of xyxAttribute-name='value', or null. |
GenModel |
getGenModel()
Returns the generator model. |
protected String |
getModelAnnotation(String comment)
Returns the @model annotation contents, or null. |
protected String |
getModelAnnotationAttribute(String modelAnnotation,
String attributeName)
Returns the unquoted value of attribute-name="value" or of attribute-name='value', or null. |
protected int |
getOrderingValue(ENamedElement eNamedElement,
Map nameToIDMap)
|
IStatus |
getStatus()
Returns the status. |
protected EClassifier |
resolve(EModelElement eModelElement,
String typeName)
|
protected EClassifier |
resolve(EModelElement eModelElement,
String typeName,
boolean recordDemandCreatedEDataType)
|
protected EClass |
resolveMapEntry(EPackage ePackage,
EClassifier keyEClassifier,
EClassifier valueEClassifier)
|
Map |
run(IProgressMonitor progressMonitor)
Invokes the builder. |
Map |
run(IProgressMonitor progressMonitor,
boolean save)
Invokes the builder. |
protected void |
sort(EList eList,
Map nameToIDMap)
|
void |
traverse(IContainer container,
Set visited)
Walks the container recursively. |
void |
traverse(IFile file)
Analyzes .java files as JDOM compilation units. |
void |
used(EModelElement modelElement)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.eclipse.jdt.core.jdom.DOMFactory jdomFactory
protected IFile genModelFile
protected GenModel genModel
protected Map externalPackageNameToEPackageMap
protected Map packageNameToEPackageMap
protected Map ePackageToOrderingMap
protected Map ePackageToPrefixMap
protected Map eModelElementToIDOMNodeMap
protected Map eTypedElementToTypeNameMap
protected Map eTypedElementToInstanceTypeNameMap
protected Set demandCreatedEDataTypes
protected Map eClassToSuperTypeNamesMap
protected Map eReferenceToOppositeNameMap
protected Collection externalGenModels
protected Collection usedGenPackages
protected MultiStatus status
protected GenModel oldGenModelVersion
protected static Pattern modelAnnotationExpression
protected static Pattern extendsAnnotationExpression
protected static Pattern implementsAnnotationExpression
Constructor Detail |
public JavaEcoreBuilder(IFile genModelFile)
public JavaEcoreBuilder(IFile genModelFile, GenModel oldGenModelVersion)
Method Detail |
public Map run(IProgressMonitor progressMonitor)
public Map run(IProgressMonitor progressMonitor, boolean save)
public void used(EModelElement modelElement)
public void determineExternalPackages(GenPackage genPackage)
public void getAllReferencedProjects(Collection result, IProject[] projects) throws CoreException
CoreException
public void getAllGenModelFiles(Collection result, IContainer container) throws CoreException
CoreException
public void getAllGenModelFiles(Collection result, IFile file) throws CoreException
CoreException
public void traverse(IContainer container, Set visited) throws CoreException
CoreException
public void traverse(IFile file) throws CoreException
CoreException
protected void analyzeCompilationUnit(org.eclipse.jdt.core.jdom.IDOMCompilationUnit compilationUnit)
protected void analyzeType(org.eclipse.jdt.core.jdom.IDOMType type)
protected void analyzeMethod(EClass eClass, org.eclipse.jdt.core.jdom.IDOMMethod method)
protected ETypedElement analyzeMethod(EClass eClass, String modelAnnotation, String methodName, String returnType, String[] parameterNames, String[] parameterTypes)
protected EStructuralFeature createFeature(EClass eClass, String name, EClassifier eType)
protected void analyzeField(EEnum eEnum, org.eclipse.jdt.core.jdom.IDOMField field)
protected String getModelAnnotation(String comment)
protected String getExtendsAnnotation(String comment)
protected String getModelAnnotationAttribute(String modelAnnotation, String attributeName)
protected String getFilteredModelAnnotations(String modelAnnotation, String filter)
protected EClassifier resolve(EModelElement eModelElement, String typeName)
protected EClassifier resolve(EModelElement eModelElement, String typeName, boolean recordDemandCreatedEDataType)
protected EClass resolveMapEntry(EPackage ePackage, EClassifier keyEClassifier, EClassifier valueEClassifier)
protected void sort(EList eList, Map nameToIDMap)
protected int getOrderingValue(ENamedElement eNamedElement, Map nameToIDMap)
public IStatus getStatus()
public GenModel getGenModel()
protected void error(String message)
message
- a description of the error.
|
Copyright 2001-2004 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |