|
||||||||||||
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 java.util.Set |
demandCreatedEDataTypes
The set of data types that were created without setting the instance class. |
protected static java.util.regex.Pattern |
eAnnotationDetailExpression
|
protected static java.util.regex.Pattern |
eAnnotationExpression
|
protected java.util.Map |
eClassToSuperTypeNamesMap
The map from a class to its base class names. |
protected java.util.Map |
eModelElementToIDOMNodeMap
The map from a model element to the corresponding JDOM node. |
protected java.util.Map |
eOperationToExceptionTypeNamesMap
The map from an operation to its exception type names. |
protected java.util.Map |
ePackageToOrderingMap
The map from package to the map of ordering constants. |
protected java.util.Map |
ePackageToPrefixMap
The map from package to the it's prefix. |
protected java.util.Map |
eReferenceToOppositeNameMap
The map from a reference to the name it's opposite. |
protected java.util.Map |
eTypedElementToInstanceTypeNameMap
The map from a typed element to its datatype's instance type name. |
protected java.util.Map |
eTypedElementToTypeNameMap
The map from a typed element to its type name. |
protected static java.util.regex.Pattern |
extendsAnnotationExpression
The pattern for extracting the @extends annotations. |
protected java.util.Collection |
externalGenModels
All the external GenModels from all required projects. |
protected java.util.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 java.util.regex.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 java.util.regex.Pattern |
modelAnnotationExpression
The pattern for extracting the @model annotations. |
protected static java.util.regex.Pattern |
modelDocExpression
The pattern for extracting the model documentation. |
protected GenModel |
oldGenModelVersion
The old version to against which to reconcile. |
protected java.util.Map |
packageNameToEPackageMap
The map from a package name to the corresponding package. |
protected java.util.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,
java.lang.String modelAnnotation,
java.lang.String methodName,
java.lang.String returnType,
java.lang.String[] parameterNames,
java.lang.String[] parameterTypes,
java.lang.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,
java.lang.String name,
EClassifier eType)
|
protected ResourceSet |
createResourceSet()
|
void |
determineExternalPackages(GenPackage genPackage)
|
protected void |
determineExternalPackages(GenPackage genPackage,
ModelImporter modelImporter)
|
protected void |
error(java.lang.String message)
Produces another IStatus in the MultiStatus. |
protected java.util.List |
extractEAnnotations(java.lang.String modelAnnotation)
|
void |
getAllGenModelFiles(java.util.Collection result,
IContainer container)
Walks the container recursively. |
void |
getAllGenModelFiles(java.util.Collection result,
IFile file)
Walks the container recursively. |
void |
getAllReferencedProjects(java.util.Collection result,
IProject[] projects)
Walks the projects recursively. |
Diagnostic |
getDiagnostic()
Returns the diagnostic. |
protected java.lang.String |
getExtendsAnnotation(java.lang.String comment)
Returns the @extends/@implements annotation contents, or null. |
protected java.lang.String |
getFilteredModelAnnotations(java.lang.String modelAnnotation,
java.lang.String filter)
Returns the filtered matches xyzAttribute-name="value" or of xyxAttribute-name='value', or null. |
GenModel |
getGenModel()
Returns the generator model. |
protected java.lang.String |
getModelAnnotation(java.lang.String comment)
Returns the @model annotation contents, or null. |
protected java.lang.String |
getModelAnnotationAttribute(java.lang.String modelAnnotation,
java.lang.String attributeName)
Returns the unquoted value of attribute-name="value" or of attribute-name='value', or null. |
protected java.lang.String |
getModelAnnotationAttributes(java.lang.String modelAnnotation,
java.lang.String attributeName)
Returns the space separated concatenation of the unquoted value of each attribute-name="value" or attribute-name='value' repeat, or null. |
protected java.lang.String |
getModelDocumentation(java.lang.String comment)
Returns the model documentation, or null. |
protected int |
getOrderingValue(ENamedElement eNamedElement,
java.util.Map nameToIDMap)
|
java.util.Collection |
getUsedGenPackages()
Returns the list of used GenPackages. |
protected void |
handleETypedElement(ETypedElement eTypedElement,
java.lang.String name,
java.lang.String type,
java.lang.String modelAnnotation,
java.lang.String identifierName)
|
protected EClassifier |
resolve(EModelElement eModelElement,
java.lang.String typeName)
|
protected EClassifier |
resolve(EModelElement eModelElement,
java.lang.String typeName,
boolean recordDemandCreatedEDataType)
|
protected EClass |
resolveMapEntry(EPackage ePackage,
EClassifier keyEClassifier,
EClassifier valueEClassifier)
|
protected EClassifier |
resolveType(ETypedElement eTypedElement)
|
protected void |
sort(EList eList,
java.util.Map nameToIDMap)
|
void |
traverse(IContainer container,
java.util.Set visited)
Walks the container recursively. |
void |
traverse(IFile file)
Analyzes .java files as JDOM compilation units. |
void |
used(EModelElement modelElement)
|
protected void |
warning(java.lang.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 java.util.Map externalPackageNameToEPackageMap
protected java.util.Map packageNameToEPackageMap
protected java.util.Map ePackageToOrderingMap
protected java.util.Map ePackageToPrefixMap
protected java.util.Map eModelElementToIDOMNodeMap
protected java.util.Map eTypedElementToTypeNameMap
protected java.util.Map eTypedElementToInstanceTypeNameMap
protected java.util.Set demandCreatedEDataTypes
protected java.util.Map eClassToSuperTypeNamesMap
protected java.util.Map eOperationToExceptionTypeNamesMap
protected java.util.Map eReferenceToOppositeNameMap
protected java.util.Collection externalGenModels
protected java.util.Collection usedGenPackages
protected BasicDiagnostic basicDiagnostic
protected boolean foundJava
protected GenModel oldGenModelVersion
protected static java.util.regex.Pattern modelDocExpression
protected static java.util.regex.Pattern modelAnnotationExpression
protected static java.util.regex.Pattern extendsAnnotationExpression
protected static java.util.regex.Pattern implementsAnnotationExpression
protected static java.util.regex.Pattern eAnnotationExpression
protected static java.util.regex.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 java.lang.Exception
java.lang.Exception
public void computeEPackages(Monitor monitor, ModelImporter modelImporter) throws java.lang.Exception
java.lang.Exception
public void used(EModelElement modelElement)
public void determineExternalPackages(GenPackage genPackage)
protected void determineExternalPackages(GenPackage genPackage, ModelImporter modelImporter)
public void getAllReferencedProjects(java.util.Collection result, IProject[] projects) throws CoreException
CoreException
public void getAllGenModelFiles(java.util.Collection result, IContainer container) throws CoreException
CoreException
public void getAllGenModelFiles(java.util.Collection result, IFile file) throws CoreException
CoreException
public void traverse(IContainer container, java.util.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, java.lang.String modelAnnotation, java.lang.String methodName, java.lang.String returnType, java.lang.String[] parameterNames, java.lang.String[] parameterTypes, java.lang.String[] exceptionTypes)
protected void handleETypedElement(ETypedElement eTypedElement, java.lang.String name, java.lang.String type, java.lang.String modelAnnotation, java.lang.String identifierName)
protected EStructuralFeature createFeature(EClass eClass, java.lang.String name, EClassifier eType)
protected void analyzeField(EEnum eEnum, org.eclipse.jdt.core.jdom.IDOMField field)
protected java.lang.String getModelDocumentation(java.lang.String comment)
protected java.lang.String getModelAnnotation(java.lang.String comment)
protected java.lang.String getExtendsAnnotation(java.lang.String comment)
protected java.lang.String getModelAnnotationAttribute(java.lang.String modelAnnotation, java.lang.String attributeName)
protected java.lang.String getModelAnnotationAttributes(java.lang.String modelAnnotation, java.lang.String attributeName)
protected java.util.List extractEAnnotations(java.lang.String modelAnnotation)
protected java.lang.String getFilteredModelAnnotations(java.lang.String modelAnnotation, java.lang.String filter)
protected EClassifier resolve(EModelElement eModelElement, java.lang.String typeName)
protected EClassifier resolve(EModelElement eModelElement, java.lang.String typeName, boolean recordDemandCreatedEDataType)
protected EClass resolveMapEntry(EPackage ePackage, EClassifier keyEClassifier, EClassifier valueEClassifier)
protected EClassifier resolveType(ETypedElement eTypedElement)
protected void sort(EList eList, java.util.Map nameToIDMap)
protected int getOrderingValue(ENamedElement eNamedElement, java.util.Map nameToIDMap)
public Diagnostic getDiagnostic()
public GenModel getGenModel()
public java.util.Collection getUsedGenPackages()
protected void error(java.lang.String message)
message
- a description of the error.protected void warning(java.lang.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 |