|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.importer.java.builder.JavaEcoreBuilder
Field Summary | |
protected BasicDiagnostic |
basicDiagnostic
|
protected Set |
demandCreatedEDataTypes
The set of data types that were created without setting the instance class. |
protected static Pattern |
eAnnotationDetailExpression
|
protected static Pattern |
eAnnotationExpression
|
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 |
eOperationToExceptionTypeNamesMap
The map from an operation to its exception type names. |
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 boolean |
foundJava
|
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 static Pattern |
modelDocExpression
The pattern for extracting the model documentation. |
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 Collection |
usedGenPackages
All the used GenPackages. |
Constructor Summary | |
JavaEcoreBuilder(IFile genModelFile)
Creates a builder for the given file. |
|
JavaEcoreBuilder(IFile genModelFile,
GenModel oldGenModelVersion)
|
|
JavaEcoreBuilder(IFile genModelFile,
GenModel oldGenModelVersion,
GenModel genModel)
|
Method Summary | |
protected IPath |
analyseProject(IProject project)
|
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,
String[] exceptionTypes)
|
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. |
void |
computeEPackages(Monitor monitor,
ModelImporter modelImporter)
|
protected EStructuralFeature |
createFeature(EClass eClass,
String name,
EClassifier eType)
|
protected ResourceSet |
createResourceSet()
|
void |
determineExternalPackages(GenPackage genPackage)
|
protected void |
determineExternalPackages(GenPackage genPackage,
ModelImporter modelImporter)
|
protected void |
error(String message)
Produces another IStatus in the MultiStatus. |
protected List |
extractEAnnotations(String modelAnnotation)
|
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. |
Diagnostic |
getDiagnostic()
Returns the diagnostic. |
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 String |
getModelAnnotationAttributes(String modelAnnotation,
String attributeName)
Returns the space separated concatenation of the unquoted value of each attribute-name="value" or attribute-name='value' repeat, or null. |
protected String |
getModelDocumentation(String comment)
Returns the model documentation, or null. |
protected int |
getOrderingValue(ENamedElement eNamedElement,
Map nameToIDMap)
|
Collection |
getUsedGenPackages()
Returns the list of used GenPackages. |
protected void |
handleETypedElement(ETypedElement eTypedElement,
String name,
String type,
String modelAnnotation,
String identifierName)
|
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 EClassifier |
resolveType(ETypedElement eTypedElement)
|
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)
|
protected void |
warning(String message)
Produces another IStatus in the MultiStatus, with warning severity. |
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 eOperationToExceptionTypeNamesMap
protected Map eReferenceToOppositeNameMap
protected Collection externalGenModels
protected Collection usedGenPackages
protected BasicDiagnostic basicDiagnostic
protected boolean foundJava
protected GenModel oldGenModelVersion
protected static Pattern modelDocExpression
protected static Pattern modelAnnotationExpression
protected static Pattern extendsAnnotationExpression
protected static Pattern implementsAnnotationExpression
protected static Pattern eAnnotationExpression
protected static Pattern eAnnotationDetailExpression
Constructor Detail |
public JavaEcoreBuilder(IFile genModelFile)
public JavaEcoreBuilder(IFile genModelFile, GenModel oldGenModelVersion)
public JavaEcoreBuilder(IFile genModelFile, GenModel oldGenModelVersion, GenModel genModel)
Method Detail |
protected ResourceSet createResourceSet()
protected IPath analyseProject(IProject project) throws Exception
Exception
public void computeEPackages(Monitor monitor, ModelImporter modelImporter) throws Exception
Exception
public void used(EModelElement modelElement)
public void determineExternalPackages(GenPackage genPackage)
protected void determineExternalPackages(GenPackage genPackage, ModelImporter modelImporter)
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, String[] exceptionTypes)
protected void handleETypedElement(ETypedElement eTypedElement, String name, String type, String modelAnnotation, String identifierName)
protected EStructuralFeature createFeature(EClass eClass, String name, EClassifier eType)
protected void analyzeField(EEnum eEnum, org.eclipse.jdt.core.jdom.IDOMField field)
protected String getModelDocumentation(String comment)
protected String getModelAnnotation(String comment)
protected String getExtendsAnnotation(String comment)
protected String getModelAnnotationAttribute(String modelAnnotation, String attributeName)
protected String getModelAnnotationAttributes(String modelAnnotation, String attributeName)
protected List extractEAnnotations(String modelAnnotation)
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 EClassifier resolveType(ETypedElement eTypedElement)
protected void sort(EList eList, Map nameToIDMap)
protected int getOrderingValue(ENamedElement eNamedElement, Map nameToIDMap)
public Diagnostic getDiagnostic()
public GenModel getGenModel()
public Collection getUsedGenPackages()
protected void error(String message)
message
- a description of the error.protected void warning(String message)
message
- a description of the error.
|
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 |