Update metamodel
diff --git a/plugins/org.eclipse.mylyn.docs.intent.client.ui/src/org/eclipse/mylyn/docs/intent/client/ui/editor/quickfix/CreateResourceFix.java b/plugins/org.eclipse.mylyn.docs.intent.client.ui/src/org/eclipse/mylyn/docs/intent/client/ui/editor/quickfix/CreateResourceFix.java index 9967039..55dc4e9 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.client.ui/src/org/eclipse/mylyn/docs/intent/client/ui/editor/quickfix/CreateResourceFix.java +++ b/plugins/org.eclipse.mylyn.docs.intent.client.ui/src/org/eclipse/mylyn/docs/intent/client/ui/editor/quickfix/CreateResourceFix.java
@@ -24,8 +24,6 @@ import org.eclipse.mylyn.docs.intent.client.ui.IntentEditorActivator; import org.eclipse.mylyn.docs.intent.client.ui.editor.annotation.IntentAnnotation; import org.eclipse.mylyn.docs.intent.client.ui.logger.IntentUiLogger; -import org.eclipse.mylyn.docs.intent.collab.common.logger.IIntentLogger.LogType; -import org.eclipse.mylyn.docs.intent.collab.common.logger.IntentLogger; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Point; @@ -57,27 +55,26 @@ public void apply(IDocument document) { // Step 1 : getting the resources to compare URI String workingCopyResourceURI = getWorkingCopyResourceURI(); + String generatedResourceURI = null; if (syncAnnotation.getAdditionalInformations().toArray().length > 2) { - String generatedResourceURI = ((String)syncAnnotation.getAdditionalInformations().toArray()[2]) - .replace("\"", ""); + generatedResourceURI = ((String)syncAnnotation.getAdditionalInformations().toArray()[2]).replace( + "\"", ""); + } + // Step 2 : loading the resources + ResourceSetImpl rs = new ResourceSetImpl(); + Resource workingCopyResource = rs.createResource(URI.createURI(workingCopyResourceURI)); - // Step 2 : loading the resources - ResourceSetImpl rs = new ResourceSetImpl(); + if (generatedResourceURI != null) { Resource generatedResource = rs.getResource(URI.createURI(generatedResourceURI), true); - Resource workingCopyResource = rs.createResource(URI.createURI(workingCopyResourceURI)); - // Step 3 : Copy the content workingCopyResource.getContents().addAll(EcoreUtil.copyAll(generatedResource.getContents())); - - try { - workingCopyResource.save(null); - } catch (IOException e) { - IntentUiLogger.logError(e); - } - } else { - IntentLogger.getInstance().log(LogType.ERROR, - "Invalid URI : cannot create resource at " + syncAnnotation.getAdditionalInformations()); } + try { + workingCopyResource.save(null); + } catch (IOException e) { + IntentUiLogger.logError(e); + } + } private String getWorkingCopyResourceURI() {
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/model/document.ecore b/plugins/org.eclipse.mylyn.docs.intent.core/model/document.ecore index ed227bc..03767b3 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/model/document.ecore +++ b/plugins/org.eclipse.mylyn.docs.intent.core/model/document.ecore
@@ -5,6 +5,8 @@ <eClassifiers xsi:type="ecore:EClass" name="IntentGenericElement"> <eStructuralFeatures xsi:type="ecore:EReference" name="compilationStatus" upperBound="-1" eType="ecore:EClass compilerInformations.ecore#//CompilationStatus" containment="true"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="indexEntry" eType="ecore:EClass indexer.ecore#//IntentIndexEntry" + eOpposite="indexer.ecore#//IntentIndexEntry/referencedElement"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="IntentStructuredElement" abstract="true" eSuperTypes="../../org.eclipse.mylyn.docs.intent.markup/model/markup.ecore#//Section #//IntentGenericElement">
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/model/indexer.ecore b/plugins/org.eclipse.mylyn.docs.intent.core/model/indexer.ecore index 0e9c106..3881c46 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/model/indexer.ecore +++ b/plugins/org.eclipse.mylyn.docs.intent.core/model/indexer.ecore
@@ -1,8 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<ecore:EPackage xmi:version="2.0" - xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="indexer" - nsURI="http://www.eclipse.org/intent/indexer/0.7" nsPrefix="intentIndexer"> +<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="indexer" nsURI="http://www.eclipse.org/intent/indexer/0.7" nsPrefix="intentIndexer"> <eClassifiers xsi:type="ecore:EClass" name="IntentIndex"> <eStructuralFeatures xsi:type="ecore:EReference" name="entries" upperBound="-1" eType="#//IntentIndexEntry" containment="true"/> @@ -10,7 +8,8 @@ <eClassifiers xsi:type="ecore:EClass" name="IntentIndexEntry"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" lowerBound="1" eType="#//INDEX_ENTRY_TYPE"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="referencedElement" eType="ecore:EClass document.ecore#//IntentGenericElement"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="referencedElement" eType="ecore:EClass document.ecore#//IntentGenericElement" + eOpposite="document.ecore#//IntentGenericElement/indexEntry"/> <eStructuralFeatures xsi:type="ecore:EReference" name="subEntries" upperBound="-1" eType="#//IntentIndexEntry" containment="true"/> </eClassifiers>
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/model/indexer.genmodel b/plugins/org.eclipse.mylyn.docs.intent.core/model/indexer.genmodel deleted file mode 100644 index ee78466..0000000 --- a/plugins/org.eclipse.mylyn.docs.intent.core/model/indexer.genmodel +++ /dev/null
@@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<genmodel:GenModel xmi:version="2.0" - xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" - xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.mylyn.docs.intent.core/src-gen" - modelPluginID="org.eclipse.mylyn.docs.intent.core" modelName="Indexer" rootExtendsInterface="org.eclipse.emf.cdo.CDOObject" - rootExtendsClass="org.eclipse.emf.internal.cdo.CDOObjectImpl" reflectiveDelegation="true" - importerID="org.eclipse.emf.importer.cdo" featureDelegation="Reflective" containmentProxies="true" - complianceLevel="5.0" copyrightFields="false" usedGenPackages="../../org.eclipse.mylyn.docs.intent.markup/model/markupCDO.genmodel#//markup intent.genmodel#//modelingunit intent.genmodel#//genericunit intent.genmodel#//document intent.genmodel#//compiler intent.genmodel#//descriptionunit"> - <foreignModel>indexer.ecore</foreignModel> - <modelPluginVariables>CDO=org.eclipse.emf.cdo</modelPluginVariables> - <genPackages prefix="IntentIndexer" basePackage="org.eclipse.mylyn.docs.intent.core" - disposableProviderFactory="true" ecorePackage="indexer.ecore#/"> - <genEnums typeSafeEnumCompatible="false" ecoreEnum="indexer.ecore#//INDEX_ENTRY_TYPE"> - <genEnumLiterals ecoreEnumLiteral="indexer.ecore#//INDEX_ENTRY_TYPE/IntentDocument"/> - <genEnumLiterals ecoreEnumLiteral="indexer.ecore#//INDEX_ENTRY_TYPE/IntentChapter"/> - <genEnumLiterals ecoreEnumLiteral="indexer.ecore#//INDEX_ENTRY_TYPE/IntentSection"/> - </genEnums> - <genClasses ecoreClass="indexer.ecore#//IntentIndex"> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference indexer.ecore#//IntentIndex/entries"/> - </genClasses> - <genClasses ecoreClass="indexer.ecore#//IntentIndexEntry"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute indexer.ecore#//IntentIndexEntry/name"/> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute indexer.ecore#//IntentIndexEntry/type"/> - <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference indexer.ecore#//IntentIndexEntry/referencedElement"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference indexer.ecore#//IntentIndexEntry/subEntries"/> - </genClasses> - </genPackages> -</genmodel:GenModel>
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/model/intent.genmodel b/plugins/org.eclipse.mylyn.docs.intent.core/model/intent.genmodel index 50cf388..6f2d9be 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/model/intent.genmodel +++ b/plugins/org.eclipse.mylyn.docs.intent.core/model/intent.genmodel
@@ -128,6 +128,7 @@ <genDataTypes ecoreDataType="document.ecore#//URI"/> <genClasses ecoreClass="document.ecore#//IntentGenericElement"> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference document.ecore#//IntentGenericElement/compilationStatus"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference document.ecore#//IntentGenericElement/indexEntry"/> </genClasses> <genClasses image="false" ecoreClass="document.ecore#//IntentStructuredElement"> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute document.ecore#//IntentStructuredElement/formattedTitle"/> @@ -273,6 +274,23 @@ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute compilerInformations.ecore#//SynchronizerCompilationStatus/compiledResourceState"/> </genClasses> </genPackages> + <genPackages prefix="IntentIndexer" basePackage="org.eclipse.mylyn.docs.intent.core" + ecorePackage="indexer.ecore#/"> + <genEnums typeSafeEnumCompatible="false" ecoreEnum="indexer.ecore#//INDEX_ENTRY_TYPE"> + <genEnumLiterals ecoreEnumLiteral="indexer.ecore#//INDEX_ENTRY_TYPE/IntentDocument"/> + <genEnumLiterals ecoreEnumLiteral="indexer.ecore#//INDEX_ENTRY_TYPE/IntentChapter"/> + <genEnumLiterals ecoreEnumLiteral="indexer.ecore#//INDEX_ENTRY_TYPE/IntentSection"/> + </genEnums> + <genClasses ecoreClass="indexer.ecore#//IntentIndex"> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference indexer.ecore#//IntentIndex/entries"/> + </genClasses> + <genClasses ecoreClass="indexer.ecore#//IntentIndexEntry"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute indexer.ecore#//IntentIndexEntry/name"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute indexer.ecore#//IntentIndexEntry/type"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference indexer.ecore#//IntentIndexEntry/referencedElement"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference indexer.ecore#//IntentIndexEntry/subEntries"/> + </genClasses> + </genPackages> <genPackages prefix="DescriptionUnit" basePackage="org.eclipse.mylyn.docs.intent.core" disposableProviderFactory="true" ecorePackage="descriptionUnit.ecore#/"> <genClasses ecoreClass="descriptionUnit.ecore#//DescriptionUnit"/>
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/impl/CompilerFactoryImpl.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/impl/CompilerFactoryImpl.java index b931575..07ac7d0 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/impl/CompilerFactoryImpl.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/impl/CompilerFactoryImpl.java
@@ -20,6 +20,7 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.impl.EFactoryImpl; import org.eclipse.emf.ecore.plugin.EcorePlugin; +import org.eclipse.mylyn.docs.intent.core.compiler.*; import org.eclipse.mylyn.docs.intent.core.compiler.CompilationInformationHolder; import org.eclipse.mylyn.docs.intent.core.compiler.CompilationMessageType; import org.eclipse.mylyn.docs.intent.core.compiler.CompilationStatus;
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/impl/CompilerPackageImpl.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/impl/CompilerPackageImpl.java index ee80ad5..2efe55d 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/impl/CompilerPackageImpl.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/impl/CompilerPackageImpl.java
@@ -38,6 +38,8 @@ import org.eclipse.mylyn.docs.intent.core.document.impl.IntentDocumentPackageImpl; import org.eclipse.mylyn.docs.intent.core.genericunit.GenericUnitPackage; import org.eclipse.mylyn.docs.intent.core.genericunit.impl.GenericUnitPackageImpl; +import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexerPackage; +import org.eclipse.mylyn.docs.intent.core.indexer.impl.IntentIndexerPackageImpl; import org.eclipse.mylyn.docs.intent.core.modelingunit.ModelingUnitPackage; import org.eclipse.mylyn.docs.intent.core.modelingunit.impl.ModelingUnitPackageImpl; import org.eclipse.mylyn.docs.intent.markup.markup.MarkupPackage; @@ -228,6 +230,9 @@ IntentDocumentPackageImpl theIntentDocumentPackage = (IntentDocumentPackageImpl)(EPackage.Registry.INSTANCE .getEPackage(IntentDocumentPackage.eNS_URI) instanceof IntentDocumentPackageImpl ? EPackage.Registry.INSTANCE .getEPackage(IntentDocumentPackage.eNS_URI) : IntentDocumentPackage.eINSTANCE); + IntentIndexerPackageImpl theIntentIndexerPackage = (IntentIndexerPackageImpl)(EPackage.Registry.INSTANCE + .getEPackage(IntentIndexerPackage.eNS_URI) instanceof IntentIndexerPackageImpl ? EPackage.Registry.INSTANCE + .getEPackage(IntentIndexerPackage.eNS_URI) : IntentIndexerPackage.eINSTANCE); DescriptionUnitPackageImpl theDescriptionUnitPackage = (DescriptionUnitPackageImpl)(EPackage.Registry.INSTANCE .getEPackage(DescriptionUnitPackage.eNS_URI) instanceof DescriptionUnitPackageImpl ? EPackage.Registry.INSTANCE .getEPackage(DescriptionUnitPackage.eNS_URI) : DescriptionUnitPackage.eINSTANCE); @@ -237,6 +242,7 @@ theModelingUnitPackage.createPackageContents(); theGenericUnitPackage.createPackageContents(); theIntentDocumentPackage.createPackageContents(); + theIntentIndexerPackage.createPackageContents(); theDescriptionUnitPackage.createPackageContents(); // Initialize created meta-data @@ -244,6 +250,7 @@ theModelingUnitPackage.initializePackageContents(); theGenericUnitPackage.initializePackageContents(); theIntentDocumentPackage.initializePackageContents(); + theIntentIndexerPackage.initializePackageContents(); theDescriptionUnitPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/util/CompilerAdapterFactory.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/util/CompilerAdapterFactory.java index 371e94e..0d7db4f 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/util/CompilerAdapterFactory.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/util/CompilerAdapterFactory.java
@@ -18,6 +18,7 @@ import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClassifier; import org.eclipse.emf.ecore.EObject; +import org.eclipse.mylyn.docs.intent.core.compiler.*; import org.eclipse.mylyn.docs.intent.core.compiler.CompilationInformationHolder; import org.eclipse.mylyn.docs.intent.core.compiler.CompilationStatus; import org.eclipse.mylyn.docs.intent.core.compiler.CompilationStatusManager;
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/util/CompilerSwitch.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/util/CompilerSwitch.java index a0b5298..40cf3bb 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/util/CompilerSwitch.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/util/CompilerSwitch.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.util.Switch; +import org.eclipse.mylyn.docs.intent.core.compiler.*; import org.eclipse.mylyn.docs.intent.core.compiler.CompilationInformationHolder; import org.eclipse.mylyn.docs.intent.core.compiler.CompilationStatus; import org.eclipse.mylyn.docs.intent.core.compiler.CompilationStatusManager;
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/DescriptionUnitPackage.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/DescriptionUnitPackage.java index edeb8e2..8cc2edc 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/DescriptionUnitPackage.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/DescriptionUnitPackage.java
@@ -78,6 +78,15 @@ int DESCRIPTION_UNIT__COMPILATION_STATUS = GenericUnitPackage.GENERIC_UNIT__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DESCRIPTION_UNIT__INDEX_ENTRY = GenericUnitPackage.GENERIC_UNIT__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Instructions</b></em>' containment reference list. * <!-- begin-user-doc * --> <!-- end-user-doc --> @@ -123,6 +132,15 @@ int DESCRIPTION_UNIT_INSTRUCTION__COMPILATION_STATUS = GenericUnitPackage.UNIT_INSTRUCTION__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DESCRIPTION_UNIT_INSTRUCTION__INDEX_ENTRY = GenericUnitPackage.UNIT_INSTRUCTION__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> <!-- * end-user-doc --> @@ -168,6 +186,15 @@ int DESCRIPTION_BLOC__COMPILATION_STATUS = DESCRIPTION_UNIT_INSTRUCTION__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DESCRIPTION_BLOC__INDEX_ENTRY = DESCRIPTION_UNIT_INSTRUCTION__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> <!-- * end-user-doc -->
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/impl/DescriptionUnitFactoryImpl.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/impl/DescriptionUnitFactoryImpl.java index 61bc794..b5de738 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/impl/DescriptionUnitFactoryImpl.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/impl/DescriptionUnitFactoryImpl.java
@@ -15,6 +15,7 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.impl.EFactoryImpl; import org.eclipse.emf.ecore.plugin.EcorePlugin; +import org.eclipse.mylyn.docs.intent.core.descriptionunit.*; import org.eclipse.mylyn.docs.intent.core.descriptionunit.DescriptionBloc; import org.eclipse.mylyn.docs.intent.core.descriptionunit.DescriptionUnit; import org.eclipse.mylyn.docs.intent.core.descriptionunit.DescriptionUnitFactory;
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/impl/DescriptionUnitPackageImpl.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/impl/DescriptionUnitPackageImpl.java index 9818f99..c0a45b9 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/impl/DescriptionUnitPackageImpl.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/impl/DescriptionUnitPackageImpl.java
@@ -25,6 +25,8 @@ import org.eclipse.mylyn.docs.intent.core.document.impl.IntentDocumentPackageImpl; import org.eclipse.mylyn.docs.intent.core.genericunit.GenericUnitPackage; import org.eclipse.mylyn.docs.intent.core.genericunit.impl.GenericUnitPackageImpl; +import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexerPackage; +import org.eclipse.mylyn.docs.intent.core.indexer.impl.IntentIndexerPackageImpl; import org.eclipse.mylyn.docs.intent.core.modelingunit.ModelingUnitPackage; import org.eclipse.mylyn.docs.intent.core.modelingunit.impl.ModelingUnitPackageImpl; import org.eclipse.mylyn.docs.intent.markup.markup.MarkupPackage; @@ -123,6 +125,9 @@ CompilerPackageImpl theCompilerPackage = (CompilerPackageImpl)(EPackage.Registry.INSTANCE .getEPackage(CompilerPackage.eNS_URI) instanceof CompilerPackageImpl ? EPackage.Registry.INSTANCE .getEPackage(CompilerPackage.eNS_URI) : CompilerPackage.eINSTANCE); + IntentIndexerPackageImpl theIntentIndexerPackage = (IntentIndexerPackageImpl)(EPackage.Registry.INSTANCE + .getEPackage(IntentIndexerPackage.eNS_URI) instanceof IntentIndexerPackageImpl ? EPackage.Registry.INSTANCE + .getEPackage(IntentIndexerPackage.eNS_URI) : IntentIndexerPackage.eINSTANCE); // Create package meta-data objects theDescriptionUnitPackage.createPackageContents(); @@ -130,6 +135,7 @@ theGenericUnitPackage.createPackageContents(); theIntentDocumentPackage.createPackageContents(); theCompilerPackage.createPackageContents(); + theIntentIndexerPackage.createPackageContents(); // Initialize created meta-data theDescriptionUnitPackage.initializePackageContents(); @@ -137,6 +143,7 @@ theGenericUnitPackage.initializePackageContents(); theIntentDocumentPackage.initializePackageContents(); theCompilerPackage.initializePackageContents(); + theIntentIndexerPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theDescriptionUnitPackage.freeze();
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/util/DescriptionUnitAdapterFactory.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/util/DescriptionUnitAdapterFactory.java index f8813ce..12e5a7c 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/util/DescriptionUnitAdapterFactory.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/util/DescriptionUnitAdapterFactory.java
@@ -14,6 +14,7 @@ import org.eclipse.emf.common.notify.Notifier; import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; import org.eclipse.emf.ecore.EObject; +import org.eclipse.mylyn.docs.intent.core.descriptionunit.*; import org.eclipse.mylyn.docs.intent.core.descriptionunit.DescriptionBloc; import org.eclipse.mylyn.docs.intent.core.descriptionunit.DescriptionUnit; import org.eclipse.mylyn.docs.intent.core.descriptionunit.DescriptionUnitInstruction;
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/util/DescriptionUnitSwitch.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/util/DescriptionUnitSwitch.java index d56fef4..ea069ba 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/util/DescriptionUnitSwitch.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/descriptionunit/util/DescriptionUnitSwitch.java
@@ -13,6 +13,7 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.util.Switch; +import org.eclipse.mylyn.docs.intent.core.descriptionunit.*; import org.eclipse.mylyn.docs.intent.core.descriptionunit.DescriptionBloc; import org.eclipse.mylyn.docs.intent.core.descriptionunit.DescriptionUnit; import org.eclipse.mylyn.docs.intent.core.descriptionunit.DescriptionUnitInstruction;
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/IntentDocumentPackage.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/IntentDocumentPackage.java index 517f644..06a536a 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/IntentDocumentPackage.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/IntentDocumentPackage.java
@@ -87,13 +87,22 @@ int INTENT_GENERIC_ELEMENT__COMPILATION_STATUS = 0; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INTENT_GENERIC_ELEMENT__INDEX_ENTRY = 1; + + /** * The number of structural features of the '<em>Intent Generic Element</em>' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int INTENT_GENERIC_ELEMENT_FEATURE_COUNT = 1; + int INTENT_GENERIC_ELEMENT_FEATURE_COUNT = 2; /** * The meta object id for the '{@link org.eclipse.mylyn.docs.intent.core.document.impl.AnnotationMappingImpl <em>Annotation Mapping</em>}' class. @@ -161,13 +170,22 @@ int INTENT_STRUCTURED_ELEMENT__COMPILATION_STATUS = MarkupPackage.SECTION_FEATURE_COUNT + 0; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INTENT_STRUCTURED_ELEMENT__INDEX_ENTRY = MarkupPackage.SECTION_FEATURE_COUNT + 1; + + /** * The feature id for the '<em><b>Formatted Title</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int INTENT_STRUCTURED_ELEMENT__FORMATTED_TITLE = MarkupPackage.SECTION_FEATURE_COUNT + 1; + int INTENT_STRUCTURED_ELEMENT__FORMATTED_TITLE = MarkupPackage.SECTION_FEATURE_COUNT + 2; /** * The number of structural features of the '<em>Intent Structured Element</em>' class. @@ -176,7 +194,7 @@ * @generated * @ordered */ - int INTENT_STRUCTURED_ELEMENT_FEATURE_COUNT = MarkupPackage.SECTION_FEATURE_COUNT + 2; + int INTENT_STRUCTURED_ELEMENT_FEATURE_COUNT = MarkupPackage.SECTION_FEATURE_COUNT + 3; /** * The feature id for the '<em><b>Key</b></em>' attribute. @@ -363,6 +381,15 @@ int INTENT_DOCUMENT__COMPILATION_STATUS = INTENT_STRUCTURED_ELEMENT__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INTENT_DOCUMENT__INDEX_ENTRY = INTENT_STRUCTURED_ELEMENT__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Formatted Title</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -454,6 +481,15 @@ int INTENT_SUB_SECTION_CONTAINER__COMPILATION_STATUS = INTENT_STRUCTURED_ELEMENT__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INTENT_SUB_SECTION_CONTAINER__INDEX_ENTRY = INTENT_STRUCTURED_ELEMENT__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Formatted Title</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -563,6 +599,15 @@ int INTENT_CHAPTER__COMPILATION_STATUS = INTENT_SUB_SECTION_CONTAINER__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INTENT_CHAPTER__INDEX_ENTRY = INTENT_SUB_SECTION_CONTAINER__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Formatted Title</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -672,6 +717,15 @@ int INTENT_SECTION__COMPILATION_STATUS = INTENT_SUB_SECTION_CONTAINER__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INTENT_SECTION__INDEX_ENTRY = INTENT_SUB_SECTION_CONTAINER__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Formatted Title</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -867,6 +921,17 @@ EReference getIntentGenericElement_CompilationStatus(); /** + * Returns the meta object for the reference '{@link org.eclipse.mylyn.docs.intent.core.document.IntentGenericElement#getIndexEntry <em>Index Entry</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Index Entry</em>'. + * @see org.eclipse.mylyn.docs.intent.core.document.IntentGenericElement#getIndexEntry() + * @see #getIntentGenericElement() + * @generated + */ + EReference getIntentGenericElement_IndexEntry(); + + /** * Returns the meta object for class '{@link java.util.Map.Entry <em>Annotation Mapping</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1262,6 +1327,14 @@ .getIntentGenericElement_CompilationStatus(); /** + * The meta object literal for the '<em><b>Index Entry</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference INTENT_GENERIC_ELEMENT__INDEX_ENTRY = eINSTANCE.getIntentGenericElement_IndexEntry(); + + /** * The meta object literal for the '{@link org.eclipse.mylyn.docs.intent.core.document.impl.AnnotationMappingImpl <em>Annotation Mapping</em>}' class. * <!-- begin-user-doc --> * <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/IntentGenericElement.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/IntentGenericElement.java index 09930be..d50a332 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/IntentGenericElement.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/IntentGenericElement.java
@@ -13,6 +13,7 @@ import org.eclipse.emf.cdo.CDOObject; import org.eclipse.emf.common.util.EList; import org.eclipse.mylyn.docs.intent.core.compiler.CompilationStatus; +import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexEntry; /** * <!-- begin-user-doc --> @@ -23,6 +24,7 @@ * The following features are supported: * <ul> * <li>{@link org.eclipse.mylyn.docs.intent.core.document.IntentGenericElement#getCompilationStatus <em>Compilation Status</em>}</li> + * <li>{@link org.eclipse.mylyn.docs.intent.core.document.IntentGenericElement#getIndexEntry <em>Index Entry</em>}</li> * </ul> * </p> * @@ -48,4 +50,32 @@ */ EList<CompilationStatus> getCompilationStatus(); + /** + * Returns the value of the '<em><b>Index Entry</b></em>' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexEntry#getReferencedElement <em>Referenced Element</em>}'. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Index Entry</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Index Entry</em>' reference. + * @see #setIndexEntry(IntentIndexEntry) + * @see org.eclipse.mylyn.docs.intent.core.document.IntentDocumentPackage#getIntentGenericElement_IndexEntry() + * @see org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexEntry#getReferencedElement + * @model opposite="referencedElement" + * @generated + */ + IntentIndexEntry getIndexEntry(); + + /** + * Sets the value of the '{@link org.eclipse.mylyn.docs.intent.core.document.IntentGenericElement#getIndexEntry <em>Index Entry</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Index Entry</em>' reference. + * @see #getIndexEntry() + * @generated + */ + void setIndexEntry(IntentIndexEntry value); + } // IntentGenericElement
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/impl/IntentDocumentFactoryImpl.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/impl/IntentDocumentFactoryImpl.java index 9f8d8db..b4664f5 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/impl/IntentDocumentFactoryImpl.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/impl/IntentDocumentFactoryImpl.java
@@ -18,6 +18,7 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.impl.EFactoryImpl; import org.eclipse.emf.ecore.plugin.EcorePlugin; +import org.eclipse.mylyn.docs.intent.core.document.*; import org.eclipse.mylyn.docs.intent.core.document.IntentChapter; import org.eclipse.mylyn.docs.intent.core.document.IntentDocument; import org.eclipse.mylyn.docs.intent.core.document.IntentDocumentFactory;
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/impl/IntentDocumentPackageImpl.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/impl/IntentDocumentPackageImpl.java index 7c23b94..c1c36bc 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/impl/IntentDocumentPackageImpl.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/impl/IntentDocumentPackageImpl.java
@@ -38,6 +38,8 @@ import org.eclipse.mylyn.docs.intent.core.document.IntentSubSectionContainer; import org.eclipse.mylyn.docs.intent.core.genericunit.GenericUnitPackage; import org.eclipse.mylyn.docs.intent.core.genericunit.impl.GenericUnitPackageImpl; +import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexerPackage; +import org.eclipse.mylyn.docs.intent.core.indexer.impl.IntentIndexerPackageImpl; import org.eclipse.mylyn.docs.intent.core.modelingunit.ModelingUnitPackage; import org.eclipse.mylyn.docs.intent.core.modelingunit.impl.ModelingUnitPackageImpl; import org.eclipse.mylyn.docs.intent.markup.markup.MarkupPackage; @@ -203,6 +205,9 @@ CompilerPackageImpl theCompilerPackage = (CompilerPackageImpl)(EPackage.Registry.INSTANCE .getEPackage(CompilerPackage.eNS_URI) instanceof CompilerPackageImpl ? EPackage.Registry.INSTANCE .getEPackage(CompilerPackage.eNS_URI) : CompilerPackage.eINSTANCE); + IntentIndexerPackageImpl theIntentIndexerPackage = (IntentIndexerPackageImpl)(EPackage.Registry.INSTANCE + .getEPackage(IntentIndexerPackage.eNS_URI) instanceof IntentIndexerPackageImpl ? EPackage.Registry.INSTANCE + .getEPackage(IntentIndexerPackage.eNS_URI) : IntentIndexerPackage.eINSTANCE); DescriptionUnitPackageImpl theDescriptionUnitPackage = (DescriptionUnitPackageImpl)(EPackage.Registry.INSTANCE .getEPackage(DescriptionUnitPackage.eNS_URI) instanceof DescriptionUnitPackageImpl ? EPackage.Registry.INSTANCE .getEPackage(DescriptionUnitPackage.eNS_URI) : DescriptionUnitPackage.eINSTANCE); @@ -212,6 +217,7 @@ theModelingUnitPackage.createPackageContents(); theGenericUnitPackage.createPackageContents(); theCompilerPackage.createPackageContents(); + theIntentIndexerPackage.createPackageContents(); theDescriptionUnitPackage.createPackageContents(); // Initialize created meta-data @@ -219,6 +225,7 @@ theModelingUnitPackage.initializePackageContents(); theGenericUnitPackage.initializePackageContents(); theCompilerPackage.initializePackageContents(); + theIntentIndexerPackage.initializePackageContents(); theDescriptionUnitPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed @@ -252,6 +259,15 @@ * <!-- end-user-doc --> * @generated */ + public EReference getIntentGenericElement_IndexEntry() { + return (EReference)intentGenericElementEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public EClass getAnnotationMapping() { return annotationMappingEClass; } @@ -575,6 +591,7 @@ // Create classes and their features intentGenericElementEClass = createEClass(INTENT_GENERIC_ELEMENT); createEReference(intentGenericElementEClass, INTENT_GENERIC_ELEMENT__COMPILATION_STATUS); + createEReference(intentGenericElementEClass, INTENT_GENERIC_ELEMENT__INDEX_ENTRY); intentStructuredElementEClass = createEClass(INTENT_STRUCTURED_ELEMENT); createEAttribute(intentStructuredElementEClass, INTENT_STRUCTURED_ELEMENT__FORMATTED_TITLE); @@ -652,6 +669,8 @@ // Obtain other dependent packages CompilerPackage theCompilerPackage = (CompilerPackage)EPackage.Registry.INSTANCE .getEPackage(CompilerPackage.eNS_URI); + IntentIndexerPackage theIntentIndexerPackage = (IntentIndexerPackage)EPackage.Registry.INSTANCE + .getEPackage(IntentIndexerPackage.eNS_URI); MarkupPackage theMarkupPackage = (MarkupPackage)EPackage.Registry.INSTANCE .getEPackage(MarkupPackage.eNS_URI); GenericUnitPackage theGenericUnitPackage = (GenericUnitPackage)EPackage.Registry.INSTANCE @@ -682,6 +701,10 @@ theCompilerPackage.getCompilationStatus(), null, "compilationStatus", null, 0, -1, IntentGenericElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getIntentGenericElement_IndexEntry(), theIntentIndexerPackage.getIntentIndexEntry(), + theIntentIndexerPackage.getIntentIndexEntry_ReferencedElement(), "indexEntry", null, 0, 1, + IntentGenericElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, + IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(intentStructuredElementEClass, IntentStructuredElement.class, "IntentStructuredElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/impl/IntentGenericElementImpl.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/impl/IntentGenericElementImpl.java index d5ede5c..9c1d437 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/impl/IntentGenericElementImpl.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/impl/IntentGenericElementImpl.java
@@ -16,6 +16,7 @@ import org.eclipse.mylyn.docs.intent.core.compiler.CompilationStatus; import org.eclipse.mylyn.docs.intent.core.document.IntentDocumentPackage; import org.eclipse.mylyn.docs.intent.core.document.IntentGenericElement; +import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexEntry; /** * <!-- begin-user-doc --> @@ -25,6 +26,7 @@ * The following features are implemented: * <ul> * <li>{@link org.eclipse.mylyn.docs.intent.core.document.impl.IntentGenericElementImpl#getCompilationStatus <em>Compilation Status</em>}</li> + * <li>{@link org.eclipse.mylyn.docs.intent.core.document.impl.IntentGenericElementImpl#getIndexEntry <em>Index Entry</em>}</li> * </ul> * </p> * @@ -71,4 +73,23 @@ IntentDocumentPackage.Literals.INTENT_GENERIC_ELEMENT__COMPILATION_STATUS, true); } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public IntentIndexEntry getIndexEntry() { + return (IntentIndexEntry)eGet(IntentDocumentPackage.Literals.INTENT_GENERIC_ELEMENT__INDEX_ENTRY, + true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setIndexEntry(IntentIndexEntry newIndexEntry) { + eSet(IntentDocumentPackage.Literals.INTENT_GENERIC_ELEMENT__INDEX_ENTRY, newIndexEntry); + } + } //IntentGenericElementImpl
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/impl/IntentStructuredElementImpl.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/impl/IntentStructuredElementImpl.java index 3a04f2c..87f5157 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/impl/IntentStructuredElementImpl.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/impl/IntentStructuredElementImpl.java
@@ -16,6 +16,7 @@ import org.eclipse.mylyn.docs.intent.core.document.IntentDocumentPackage; import org.eclipse.mylyn.docs.intent.core.document.IntentGenericElement; import org.eclipse.mylyn.docs.intent.core.document.IntentStructuredElement; +import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexEntry; import org.eclipse.mylyn.docs.intent.markup.markup.impl.SectionImpl; /** @@ -26,6 +27,7 @@ * The following features are implemented: * <ul> * <li>{@link org.eclipse.mylyn.docs.intent.core.document.impl.IntentStructuredElementImpl#getCompilationStatus <em>Compilation Status</em>}</li> + * <li>{@link org.eclipse.mylyn.docs.intent.core.document.impl.IntentStructuredElementImpl#getIndexEntry <em>Index Entry</em>}</li> * <li>{@link org.eclipse.mylyn.docs.intent.core.document.impl.IntentStructuredElementImpl#getFormattedTitle <em>Formatted Title</em>}</li> * </ul> * </p> @@ -68,6 +70,25 @@ * <!-- end-user-doc --> * @generated */ + public IntentIndexEntry getIndexEntry() { + return (IntentIndexEntry)eGet(IntentDocumentPackage.Literals.INTENT_GENERIC_ELEMENT__INDEX_ENTRY, + true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setIndexEntry(IntentIndexEntry newIndexEntry) { + eSet(IntentDocumentPackage.Literals.INTENT_GENERIC_ELEMENT__INDEX_ENTRY, newIndexEntry); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public String getFormattedTitle() { return (String)eGet(IntentDocumentPackage.Literals.INTENT_STRUCTURED_ELEMENT__FORMATTED_TITLE, true); } @@ -92,6 +113,8 @@ switch (derivedFeatureID) { case IntentDocumentPackage.INTENT_STRUCTURED_ELEMENT__COMPILATION_STATUS: return IntentDocumentPackage.INTENT_GENERIC_ELEMENT__COMPILATION_STATUS; + case IntentDocumentPackage.INTENT_STRUCTURED_ELEMENT__INDEX_ENTRY: + return IntentDocumentPackage.INTENT_GENERIC_ELEMENT__INDEX_ENTRY; default: return -1; } @@ -110,6 +133,8 @@ switch (baseFeatureID) { case IntentDocumentPackage.INTENT_GENERIC_ELEMENT__COMPILATION_STATUS: return IntentDocumentPackage.INTENT_STRUCTURED_ELEMENT__COMPILATION_STATUS; + case IntentDocumentPackage.INTENT_GENERIC_ELEMENT__INDEX_ENTRY: + return IntentDocumentPackage.INTENT_STRUCTURED_ELEMENT__INDEX_ENTRY; default: return -1; }
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/util/IntentDocumentAdapterFactory.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/util/IntentDocumentAdapterFactory.java index d703f54..6d702d2 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/util/IntentDocumentAdapterFactory.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/util/IntentDocumentAdapterFactory.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.common.notify.Notifier; import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; import org.eclipse.emf.ecore.EObject; +import org.eclipse.mylyn.docs.intent.core.document.*; import org.eclipse.mylyn.docs.intent.core.document.IntentChapter; import org.eclipse.mylyn.docs.intent.core.document.IntentDocument; import org.eclipse.mylyn.docs.intent.core.document.IntentDocumentPackage;
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/util/IntentDocumentSwitch.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/util/IntentDocumentSwitch.java index 3de056f..82f4fa6 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/util/IntentDocumentSwitch.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/document/util/IntentDocumentSwitch.java
@@ -15,6 +15,7 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.util.Switch; +import org.eclipse.mylyn.docs.intent.core.document.*; import org.eclipse.mylyn.docs.intent.core.document.IntentChapter; import org.eclipse.mylyn.docs.intent.core.document.IntentDocument; import org.eclipse.mylyn.docs.intent.core.document.IntentDocumentPackage;
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/GenericUnitPackage.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/GenericUnitPackage.java index 14bb1e4..60368cf 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/GenericUnitPackage.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/GenericUnitPackage.java
@@ -86,6 +86,15 @@ int GENERIC_UNIT__COMPILATION_STATUS = IntentDocumentPackage.INTENT_GENERIC_ELEMENT__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int GENERIC_UNIT__INDEX_ENTRY = IntentDocumentPackage.INTENT_GENERIC_ELEMENT__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Instructions</b></em>' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -132,6 +141,15 @@ int UNIT_INSTRUCTION__COMPILATION_STATUS = IntentDocumentPackage.INTENT_GENERIC_ELEMENT__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int UNIT_INSTRUCTION__INDEX_ENTRY = IntentDocumentPackage.INTENT_GENERIC_ELEMENT__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -252,6 +270,15 @@ int INTENT_SECTION_REFERENCE_INSTRUCTION__COMPILATION_STATUS = UNIT_INSTRUCTION__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INTENT_SECTION_REFERENCE_INSTRUCTION__INDEX_ENTRY = UNIT_INSTRUCTION__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -316,6 +343,15 @@ int LABEL_DECLARATION__COMPILATION_STATUS = UNIT_INSTRUCTION__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LABEL_DECLARATION__INDEX_ENTRY = UNIT_INSTRUCTION__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -389,6 +425,15 @@ int LABEL_REFERENCE_INSTRUCTION__COMPILATION_STATUS = UNIT_INSTRUCTION__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LABEL_REFERENCE_INSTRUCTION__INDEX_ENTRY = UNIT_INSTRUCTION__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -453,6 +498,15 @@ int ADRESSED_ANNOTATION__COMPILATION_STATUS = UNIT_INSTRUCTION__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ADRESSED_ANNOTATION__INDEX_ENTRY = UNIT_INSTRUCTION__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> * <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/impl/GenericUnitFactoryImpl.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/impl/GenericUnitFactoryImpl.java index 83db3e8..6050a3d 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/impl/GenericUnitFactoryImpl.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/impl/GenericUnitFactoryImpl.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.impl.EFactoryImpl; import org.eclipse.emf.ecore.plugin.EcorePlugin; +import org.eclipse.mylyn.docs.intent.core.genericunit.*; import org.eclipse.mylyn.docs.intent.core.genericunit.AdressedAnnotation; import org.eclipse.mylyn.docs.intent.core.genericunit.GenericUnitFactory; import org.eclipse.mylyn.docs.intent.core.genericunit.GenericUnitPackage;
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/impl/GenericUnitPackageImpl.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/impl/GenericUnitPackageImpl.java index e295f8c..59df9af 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/impl/GenericUnitPackageImpl.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/impl/GenericUnitPackageImpl.java
@@ -33,6 +33,8 @@ import org.eclipse.mylyn.docs.intent.core.genericunit.TypeLabel; import org.eclipse.mylyn.docs.intent.core.genericunit.UnitInstruction; import org.eclipse.mylyn.docs.intent.core.genericunit.UnitInstructionReference; +import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexerPackage; +import org.eclipse.mylyn.docs.intent.core.indexer.impl.IntentIndexerPackageImpl; import org.eclipse.mylyn.docs.intent.core.modelingunit.ModelingUnitPackage; import org.eclipse.mylyn.docs.intent.core.modelingunit.impl.ModelingUnitPackageImpl; import org.eclipse.mylyn.docs.intent.markup.markup.MarkupPackage; @@ -169,6 +171,9 @@ CompilerPackageImpl theCompilerPackage = (CompilerPackageImpl)(EPackage.Registry.INSTANCE .getEPackage(CompilerPackage.eNS_URI) instanceof CompilerPackageImpl ? EPackage.Registry.INSTANCE .getEPackage(CompilerPackage.eNS_URI) : CompilerPackage.eINSTANCE); + IntentIndexerPackageImpl theIntentIndexerPackage = (IntentIndexerPackageImpl)(EPackage.Registry.INSTANCE + .getEPackage(IntentIndexerPackage.eNS_URI) instanceof IntentIndexerPackageImpl ? EPackage.Registry.INSTANCE + .getEPackage(IntentIndexerPackage.eNS_URI) : IntentIndexerPackage.eINSTANCE); DescriptionUnitPackageImpl theDescriptionUnitPackage = (DescriptionUnitPackageImpl)(EPackage.Registry.INSTANCE .getEPackage(DescriptionUnitPackage.eNS_URI) instanceof DescriptionUnitPackageImpl ? EPackage.Registry.INSTANCE .getEPackage(DescriptionUnitPackage.eNS_URI) : DescriptionUnitPackage.eINSTANCE); @@ -178,6 +183,7 @@ theModelingUnitPackage.createPackageContents(); theIntentDocumentPackage.createPackageContents(); theCompilerPackage.createPackageContents(); + theIntentIndexerPackage.createPackageContents(); theDescriptionUnitPackage.createPackageContents(); // Initialize created meta-data @@ -185,6 +191,7 @@ theModelingUnitPackage.initializePackageContents(); theIntentDocumentPackage.initializePackageContents(); theCompilerPackage.initializePackageContents(); + theIntentIndexerPackage.initializePackageContents(); theDescriptionUnitPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/util/GenericUnitAdapterFactory.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/util/GenericUnitAdapterFactory.java index ecae4df..7f3043c 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/util/GenericUnitAdapterFactory.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/util/GenericUnitAdapterFactory.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.mylyn.docs.intent.core.document.IntentGenericElement; import org.eclipse.mylyn.docs.intent.core.document.IntentReference; +import org.eclipse.mylyn.docs.intent.core.genericunit.*; import org.eclipse.mylyn.docs.intent.core.genericunit.AdressedAnnotation; import org.eclipse.mylyn.docs.intent.core.genericunit.GenericUnit; import org.eclipse.mylyn.docs.intent.core.genericunit.GenericUnitPackage;
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/util/GenericUnitSwitch.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/util/GenericUnitSwitch.java index 289a722..fef51d6 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/util/GenericUnitSwitch.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/genericunit/util/GenericUnitSwitch.java
@@ -15,6 +15,7 @@ import org.eclipse.emf.ecore.util.Switch; import org.eclipse.mylyn.docs.intent.core.document.IntentGenericElement; import org.eclipse.mylyn.docs.intent.core.document.IntentReference; +import org.eclipse.mylyn.docs.intent.core.genericunit.*; import org.eclipse.mylyn.docs.intent.core.genericunit.AdressedAnnotation; import org.eclipse.mylyn.docs.intent.core.genericunit.GenericUnit; import org.eclipse.mylyn.docs.intent.core.genericunit.GenericUnitPackage;
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/INDEX_ENTRY_TYPE.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/INDEX_ENTRY_TYPE.java index 18a2b33..2650591 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/INDEX_ENTRY_TYPE.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/INDEX_ENTRY_TYPE.java
@@ -107,12 +107,9 @@ * <!-- end-user-doc --> * @generated */ - private static final INDEX_ENTRY_TYPE[] VALUES_ARRAY = - new INDEX_ENTRY_TYPE[] { - INTENT_DOCUMENT, - INTENT_CHAPTER, - INTENT_SECTION, - }; + private static final INDEX_ENTRY_TYPE[] VALUES_ARRAY = new INDEX_ENTRY_TYPE[] {INTENT_DOCUMENT, + INTENT_CHAPTER, INTENT_SECTION, + }; /** * A public read-only list of all the '<em><b>INDEX ENTRY TYPE</b></em>' enumerators. @@ -120,7 +117,8 @@ * <!-- end-user-doc --> * @generated */ - public static final List<INDEX_ENTRY_TYPE> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + public static final List<INDEX_ENTRY_TYPE> VALUES = Collections.unmodifiableList(Arrays + .asList(VALUES_ARRAY)); /** * Returns the '<em><b>INDEX ENTRY TYPE</b></em>' literal with the specified literal value. @@ -162,9 +160,12 @@ */ public static INDEX_ENTRY_TYPE get(int value) { switch (value) { - case INTENT_DOCUMENT_VALUE: return INTENT_DOCUMENT; - case INTENT_CHAPTER_VALUE: return INTENT_CHAPTER; - case INTENT_SECTION_VALUE: return INTENT_SECTION; + case INTENT_DOCUMENT_VALUE: + return INTENT_DOCUMENT; + case INTENT_CHAPTER_VALUE: + return INTENT_CHAPTER; + case INTENT_SECTION_VALUE: + return INTENT_SECTION; } return null; } @@ -208,7 +209,7 @@ * @generated */ public int getValue() { - return value; + return value; } /** @@ -217,7 +218,7 @@ * @generated */ public String getName() { - return name; + return name; } /** @@ -226,7 +227,7 @@ * @generated */ public String getLiteral() { - return literal; + return literal; } /** @@ -239,5 +240,5 @@ public String toString() { return literal; } - + } //INDEX_ENTRY_TYPE
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/IntentIndexEntry.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/IntentIndexEntry.java index 459f7b0..7238f3a 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/IntentIndexEntry.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/IntentIndexEntry.java
@@ -92,6 +92,7 @@ /** * Returns the value of the '<em><b>Referenced Element</b></em>' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.mylyn.docs.intent.core.document.IntentGenericElement#getIndexEntry <em>Index Entry</em>}'. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Referenced Element</em>' reference list isn't clear, @@ -101,7 +102,8 @@ * @return the value of the '<em>Referenced Element</em>' reference. * @see #setReferencedElement(IntentGenericElement) * @see org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexerPackage#getIntentIndexEntry_ReferencedElement() - * @model + * @see org.eclipse.mylyn.docs.intent.core.document.IntentGenericElement#getIndexEntry + * @model opposite="indexEntry" * @generated */ IntentGenericElement getReferencedElement();
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/IntentIndexerFactory.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/IntentIndexerFactory.java index 811d1f7..03b56e5 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/IntentIndexerFactory.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/IntentIndexerFactory.java
@@ -27,7 +27,8 @@ * <!-- end-user-doc --> * @generated */ - IntentIndexerFactory eINSTANCE = org.eclipse.mylyn.docs.intent.core.indexer.impl.IntentIndexerFactoryImpl.init(); + IntentIndexerFactory eINSTANCE = org.eclipse.mylyn.docs.intent.core.indexer.impl.IntentIndexerFactoryImpl + .init(); /** * Returns a new object of class '<em>Intent Index</em>'.
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/IntentIndexerPackage.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/IntentIndexerPackage.java index 3a60107..19e3ceb 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/IntentIndexerPackage.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/IntentIndexerPackage.java
@@ -62,7 +62,8 @@ * <!-- end-user-doc --> * @generated */ - IntentIndexerPackage eINSTANCE = org.eclipse.mylyn.docs.intent.core.indexer.impl.IntentIndexerPackageImpl.init(); + IntentIndexerPackage eINSTANCE = org.eclipse.mylyn.docs.intent.core.indexer.impl.IntentIndexerPackageImpl + .init(); /** * The meta object id for the '{@link org.eclipse.mylyn.docs.intent.core.indexer.impl.IntentIndexImpl <em>Intent Index</em>}' class. @@ -147,7 +148,6 @@ */ int INTENT_INDEX_ENTRY_FEATURE_COUNT = 4; - /** * The meta object id for the '{@link org.eclipse.mylyn.docs.intent.core.indexer.INDEX_ENTRY_TYPE <em>INDEX ENTRY TYPE</em>}' enum. * <!-- begin-user-doc --> @@ -158,7 +158,6 @@ */ int INDEX_ENTRY_TYPE = 2; - /** * Returns the meta object for class '{@link org.eclipse.mylyn.docs.intent.core.indexer.IntentIndex <em>Intent Index</em>}'. * <!-- begin-user-doc -->
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/impl/IntentIndexEntryImpl.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/impl/IntentIndexEntryImpl.java index a8459be..7a4f0eb 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/impl/IntentIndexEntryImpl.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/impl/IntentIndexEntryImpl.java
@@ -106,7 +106,8 @@ * @generated */ public IntentGenericElement getReferencedElement() { - return (IntentGenericElement)eGet(IntentIndexerPackage.Literals.INTENT_INDEX_ENTRY__REFERENCED_ELEMENT, true); + return (IntentGenericElement)eGet( + IntentIndexerPackage.Literals.INTENT_INDEX_ENTRY__REFERENCED_ELEMENT, true); } /** @@ -125,7 +126,8 @@ */ @SuppressWarnings("unchecked") public EList<IntentIndexEntry> getSubEntries() { - return (EList<IntentIndexEntry>)eGet(IntentIndexerPackage.Literals.INTENT_INDEX_ENTRY__SUB_ENTRIES, true); + return (EList<IntentIndexEntry>)eGet(IntentIndexerPackage.Literals.INTENT_INDEX_ENTRY__SUB_ENTRIES, + true); } } //IntentIndexEntryImpl
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/impl/IntentIndexerFactoryImpl.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/impl/IntentIndexerFactoryImpl.java index 6fd5ce7..9230047 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/impl/IntentIndexerFactoryImpl.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/impl/IntentIndexerFactoryImpl.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.impl.EFactoryImpl; import org.eclipse.emf.ecore.plugin.EcorePlugin; +import org.eclipse.mylyn.docs.intent.core.indexer.*; import org.eclipse.mylyn.docs.intent.core.indexer.INDEX_ENTRY_TYPE; import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndex; import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexEntry; @@ -37,12 +38,12 @@ */ public static IntentIndexerFactory init() { try { - IntentIndexerFactory theIntentIndexerFactory = (IntentIndexerFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/intent/indexer/0.7"); + IntentIndexerFactory theIntentIndexerFactory = (IntentIndexerFactory)EPackage.Registry.INSTANCE + .getEFactory("http://www.eclipse.org/intent/indexer/0.7"); if (theIntentIndexerFactory != null) { return theIntentIndexerFactory; } - } - catch (Exception exception) { + } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new IntentIndexerFactoryImpl(); @@ -66,10 +67,13 @@ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { - case IntentIndexerPackage.INTENT_INDEX: return (EObject)createIntentIndex(); - case IntentIndexerPackage.INTENT_INDEX_ENTRY: return (EObject)createIntentIndexEntry(); + case IntentIndexerPackage.INTENT_INDEX: + return (EObject)createIntentIndex(); + case IntentIndexerPackage.INTENT_INDEX_ENTRY: + return (EObject)createIntentIndexEntry(); default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + throw new IllegalArgumentException("The class '" + eClass.getName() + + "' is not a valid classifier"); } } @@ -84,7 +88,8 @@ case IntentIndexerPackage.INDEX_ENTRY_TYPE: return createINDEX_ENTRY_TYPEFromString(eDataType, initialValue); default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + + "' is not a valid classifier"); } } @@ -99,7 +104,8 @@ case IntentIndexerPackage.INDEX_ENTRY_TYPE: return convertINDEX_ENTRY_TYPEToString(eDataType, instanceValue); default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + + "' is not a valid classifier"); } } @@ -130,7 +136,9 @@ */ public INDEX_ENTRY_TYPE createINDEX_ENTRY_TYPEFromString(EDataType eDataType, String initialValue) { INDEX_ENTRY_TYPE result = INDEX_ENTRY_TYPE.get(initialValue); - if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + if (result == null) + throw new IllegalArgumentException("The value '" + initialValue + + "' is not a valid enumerator of '" + eDataType.getName() + "'"); return result; }
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/impl/IntentIndexerPackageImpl.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/impl/IntentIndexerPackageImpl.java index 33551ce..edc6351 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/impl/IntentIndexerPackageImpl.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/impl/IntentIndexerPackageImpl.java
@@ -17,14 +17,20 @@ import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.impl.EPackageImpl; import org.eclipse.mylyn.docs.intent.core.compiler.CompilerPackage; +import org.eclipse.mylyn.docs.intent.core.compiler.impl.CompilerPackageImpl; import org.eclipse.mylyn.docs.intent.core.descriptionunit.DescriptionUnitPackage; +import org.eclipse.mylyn.docs.intent.core.descriptionunit.impl.DescriptionUnitPackageImpl; import org.eclipse.mylyn.docs.intent.core.document.IntentDocumentPackage; +import org.eclipse.mylyn.docs.intent.core.document.impl.IntentDocumentPackageImpl; import org.eclipse.mylyn.docs.intent.core.genericunit.GenericUnitPackage; +import org.eclipse.mylyn.docs.intent.core.genericunit.impl.GenericUnitPackageImpl; import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndex; import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexEntry; import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexerFactory; import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexerPackage; import org.eclipse.mylyn.docs.intent.core.modelingunit.ModelingUnitPackage; +import org.eclipse.mylyn.docs.intent.core.modelingunit.impl.ModelingUnitPackageImpl; +import org.eclipse.mylyn.docs.intent.markup.markup.MarkupPackage; /** * <!-- begin-user-doc --> @@ -93,30 +99,55 @@ * @generated */ public static IntentIndexerPackage init() { - if (isInited) return (IntentIndexerPackage)EPackage.Registry.INSTANCE.getEPackage(IntentIndexerPackage.eNS_URI); + if (isInited) + return (IntentIndexerPackage)EPackage.Registry.INSTANCE.getEPackage(IntentIndexerPackage.eNS_URI); // Obtain or create and register package - IntentIndexerPackageImpl theIntentIndexerPackage = (IntentIndexerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof IntentIndexerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new IntentIndexerPackageImpl()); + IntentIndexerPackageImpl theIntentIndexerPackage = (IntentIndexerPackageImpl)(EPackage.Registry.INSTANCE + .get(eNS_URI) instanceof IntentIndexerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) + : new IntentIndexerPackageImpl()); isInited = true; // Initialize simple dependencies - ModelingUnitPackage.eINSTANCE.eClass(); - GenericUnitPackage.eINSTANCE.eClass(); - IntentDocumentPackage.eINSTANCE.eClass(); - CompilerPackage.eINSTANCE.eClass(); - DescriptionUnitPackage.eINSTANCE.eClass(); + MarkupPackage.eINSTANCE.eClass(); + + // Obtain or create and register interdependencies + ModelingUnitPackageImpl theModelingUnitPackage = (ModelingUnitPackageImpl)(EPackage.Registry.INSTANCE + .getEPackage(ModelingUnitPackage.eNS_URI) instanceof ModelingUnitPackageImpl ? EPackage.Registry.INSTANCE + .getEPackage(ModelingUnitPackage.eNS_URI) : ModelingUnitPackage.eINSTANCE); + GenericUnitPackageImpl theGenericUnitPackage = (GenericUnitPackageImpl)(EPackage.Registry.INSTANCE + .getEPackage(GenericUnitPackage.eNS_URI) instanceof GenericUnitPackageImpl ? EPackage.Registry.INSTANCE + .getEPackage(GenericUnitPackage.eNS_URI) : GenericUnitPackage.eINSTANCE); + IntentDocumentPackageImpl theIntentDocumentPackage = (IntentDocumentPackageImpl)(EPackage.Registry.INSTANCE + .getEPackage(IntentDocumentPackage.eNS_URI) instanceof IntentDocumentPackageImpl ? EPackage.Registry.INSTANCE + .getEPackage(IntentDocumentPackage.eNS_URI) : IntentDocumentPackage.eINSTANCE); + CompilerPackageImpl theCompilerPackage = (CompilerPackageImpl)(EPackage.Registry.INSTANCE + .getEPackage(CompilerPackage.eNS_URI) instanceof CompilerPackageImpl ? EPackage.Registry.INSTANCE + .getEPackage(CompilerPackage.eNS_URI) : CompilerPackage.eINSTANCE); + DescriptionUnitPackageImpl theDescriptionUnitPackage = (DescriptionUnitPackageImpl)(EPackage.Registry.INSTANCE + .getEPackage(DescriptionUnitPackage.eNS_URI) instanceof DescriptionUnitPackageImpl ? EPackage.Registry.INSTANCE + .getEPackage(DescriptionUnitPackage.eNS_URI) : DescriptionUnitPackage.eINSTANCE); // Create package meta-data objects theIntentIndexerPackage.createPackageContents(); + theModelingUnitPackage.createPackageContents(); + theGenericUnitPackage.createPackageContents(); + theIntentDocumentPackage.createPackageContents(); + theCompilerPackage.createPackageContents(); + theDescriptionUnitPackage.createPackageContents(); // Initialize created meta-data theIntentIndexerPackage.initializePackageContents(); + theModelingUnitPackage.initializePackageContents(); + theGenericUnitPackage.initializePackageContents(); + theIntentDocumentPackage.initializePackageContents(); + theCompilerPackage.initializePackageContents(); + theDescriptionUnitPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theIntentIndexerPackage.freeze(); - // Update the registry and return the package EPackage.Registry.INSTANCE.put(IntentIndexerPackage.eNS_URI, theIntentIndexerPackage); return theIntentIndexerPackage; @@ -218,7 +249,8 @@ * @generated */ public void createPackageContents() { - if (isCreated) return; + if (isCreated) + return; isCreated = true; // Create classes and their features @@ -250,7 +282,8 @@ * @generated */ public void initializePackageContents() { - if (isInitialized) return; + if (isInitialized) + return; isInitialized = true; // Initialize package @@ -259,7 +292,8 @@ setNsURI(eNS_URI); // Obtain other dependent packages - IntentDocumentPackage theIntentDocumentPackage = (IntentDocumentPackage)EPackage.Registry.INSTANCE.getEPackage(IntentDocumentPackage.eNS_URI); + IntentDocumentPackage theIntentDocumentPackage = (IntentDocumentPackage)EPackage.Registry.INSTANCE + .getEPackage(IntentDocumentPackage.eNS_URI); // Create type parameters @@ -268,20 +302,38 @@ // Add supertypes to classes // Initialize classes and features; add operations and parameters - initEClass(intentIndexEClass, IntentIndex.class, "IntentIndex", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getIntentIndex_Entries(), this.getIntentIndexEntry(), null, "entries", null, 0, -1, IntentIndex.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(intentIndexEClass, IntentIndex.class, "IntentIndex", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getIntentIndex_Entries(), this.getIntentIndexEntry(), null, "entries", null, 0, -1, + IntentIndex.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, + IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEClass(intentIndexEntryEClass, IntentIndexEntry.class, "IntentIndexEntry", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getIntentIndexEntry_Name(), ecorePackage.getEString(), "name", null, 0, 1, IntentIndexEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getIntentIndexEntry_Type(), this.getINDEX_ENTRY_TYPE(), "type", null, 1, 1, IntentIndexEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getIntentIndexEntry_ReferencedElement(), theIntentDocumentPackage.getIntentGenericElement(), null, "referencedElement", null, 0, 1, IntentIndexEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getIntentIndexEntry_SubEntries(), this.getIntentIndexEntry(), null, "subEntries", null, 0, -1, IntentIndexEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(intentIndexEntryEClass, IntentIndexEntry.class, "IntentIndexEntry", !IS_ABSTRACT, + !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getIntentIndexEntry_Name(), ecorePackage.getEString(), "name", null, 0, 1, + IntentIndexEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getIntentIndexEntry_Type(), this.getINDEX_ENTRY_TYPE(), "type", null, 1, 1, + IntentIndexEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getIntentIndexEntry_ReferencedElement(), + theIntentDocumentPackage.getIntentGenericElement(), + theIntentDocumentPackage.getIntentGenericElement_IndexEntry(), "referencedElement", null, 0, + 1, IntentIndexEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, + IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getIntentIndexEntry_SubEntries(), this.getIntentIndexEntry(), null, "subEntries", + null, 0, -1, IntentIndexEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); // Initialize enums and add enum literals - initEEnum(indeX_ENTRY_TYPEEEnum, org.eclipse.mylyn.docs.intent.core.indexer.INDEX_ENTRY_TYPE.class, "INDEX_ENTRY_TYPE"); - addEEnumLiteral(indeX_ENTRY_TYPEEEnum, org.eclipse.mylyn.docs.intent.core.indexer.INDEX_ENTRY_TYPE.INTENT_DOCUMENT); - addEEnumLiteral(indeX_ENTRY_TYPEEEnum, org.eclipse.mylyn.docs.intent.core.indexer.INDEX_ENTRY_TYPE.INTENT_CHAPTER); - addEEnumLiteral(indeX_ENTRY_TYPEEEnum, org.eclipse.mylyn.docs.intent.core.indexer.INDEX_ENTRY_TYPE.INTENT_SECTION); + initEEnum(indeX_ENTRY_TYPEEEnum, org.eclipse.mylyn.docs.intent.core.indexer.INDEX_ENTRY_TYPE.class, + "INDEX_ENTRY_TYPE"); + addEEnumLiteral(indeX_ENTRY_TYPEEEnum, + org.eclipse.mylyn.docs.intent.core.indexer.INDEX_ENTRY_TYPE.INTENT_DOCUMENT); + addEEnumLiteral(indeX_ENTRY_TYPEEEnum, + org.eclipse.mylyn.docs.intent.core.indexer.INDEX_ENTRY_TYPE.INTENT_CHAPTER); + addEEnumLiteral(indeX_ENTRY_TYPEEEnum, + org.eclipse.mylyn.docs.intent.core.indexer.INDEX_ENTRY_TYPE.INTENT_SECTION); // Create resource createResource(eNS_URI);
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/util/IntentIndexerAdapterFactory.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/util/IntentIndexerAdapterFactory.java index 5966c3c..1829b3a 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/util/IntentIndexerAdapterFactory.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/util/IntentIndexerAdapterFactory.java
@@ -14,6 +14,7 @@ import org.eclipse.emf.common.notify.Notifier; import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; import org.eclipse.emf.ecore.EObject; +import org.eclipse.mylyn.docs.intent.core.indexer.*; import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndex; import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexEntry; import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexerPackage; @@ -72,21 +73,22 @@ * <!-- end-user-doc --> * @generated */ - protected IntentIndexerSwitch<Adapter> modelSwitch = - new IntentIndexerSwitch<Adapter>() { - @Override - public Adapter caseIntentIndex(IntentIndex object) { - return createIntentIndexAdapter(); - } - @Override - public Adapter caseIntentIndexEntry(IntentIndexEntry object) { - return createIntentIndexEntryAdapter(); - } - @Override - public Adapter defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; + protected IntentIndexerSwitch<Adapter> modelSwitch = new IntentIndexerSwitch<Adapter>() { + @Override + public Adapter caseIntentIndex(IntentIndex object) { + return createIntentIndexAdapter(); + } + + @Override + public Adapter caseIntentIndexEntry(IntentIndexEntry object) { + return createIntentIndexEntryAdapter(); + } + + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; /** * Creates an adapter for the <code>target</code>. @@ -101,7 +103,6 @@ return modelSwitch.doSwitch((EObject)target); } - /** * Creates a new adapter for an object of class '{@link org.eclipse.mylyn.docs.intent.core.indexer.IntentIndex <em>Intent Index</em>}'. * <!-- begin-user-doc -->
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/util/IntentIndexerSwitch.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/util/IntentIndexerSwitch.java index 0d5fb6f..68070b8 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/util/IntentIndexerSwitch.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/indexer/util/IntentIndexerSwitch.java
@@ -14,6 +14,9 @@ import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.util.Switch; +import org.eclipse.mylyn.docs.intent.core.indexer.*; import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndex; import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexEntry; import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexerPackage; @@ -31,7 +34,7 @@ * @see org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexerPackage * @generated */ -public class IntentIndexerSwitch<T> { +public class IntentIndexerSwitch<T> extends Switch<T> { /** * The cached model package * <!-- begin-user-doc --> @@ -53,14 +56,16 @@ } /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * Checks whether this is a switch for the given package. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the first non-null result returned by a <code>caseXXX</code> call. + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. * @generated */ - public T doSwitch(EObject theEObject) { - return doSwitch(theEObject.eClass(), theEObject); + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; } /** @@ -70,41 +75,25 @@ * @return the first non-null result returned by a <code>caseXXX</code> call. * @generated */ - protected T doSwitch(EClass theEClass, EObject theEObject) { - if (theEClass.eContainer() == modelPackage) { - return doSwitch(theEClass.getClassifierID(), theEObject); - } - else { - List<EClass> eSuperTypes = theEClass.getESuperTypes(); - return - eSuperTypes.isEmpty() ? - defaultCase(theEObject) : - doSwitch(eSuperTypes.get(0), theEObject); - } - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ + @Override protected T doSwitch(int classifierID, EObject theEObject) { switch (classifierID) { case IntentIndexerPackage.INTENT_INDEX: { IntentIndex intentIndex = (IntentIndex)theEObject; T result = caseIntentIndex(intentIndex); - if (result == null) result = defaultCase(theEObject); + if (result == null) + result = defaultCase(theEObject); return result; } case IntentIndexerPackage.INTENT_INDEX_ENTRY: { IntentIndexEntry intentIndexEntry = (IntentIndexEntry)theEObject; T result = caseIntentIndexEntry(intentIndexEntry); - if (result == null) result = defaultCase(theEObject); + if (result == null) + result = defaultCase(theEObject); return result; } - default: return defaultCase(theEObject); + default: + return defaultCase(theEObject); } } @@ -149,6 +138,7 @@ * @see #doSwitch(org.eclipse.emf.ecore.EObject) * @generated */ + @Override public T defaultCase(EObject object) { return null; }
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/ModelingUnitPackage.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/ModelingUnitPackage.java index fc4e6e2..2b9e52a 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/ModelingUnitPackage.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/ModelingUnitPackage.java
@@ -124,6 +124,15 @@ int MODELING_UNIT__COMPILATION_STATUS = GenericUnitPackage.GENERIC_UNIT__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MODELING_UNIT__INDEX_ENTRY = GenericUnitPackage.GENERIC_UNIT__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Instructions</b></em>' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -197,6 +206,15 @@ int MODELING_UNIT_INSTRUCTION__COMPILATION_STATUS = GenericUnitPackage.UNIT_INSTRUCTION__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MODELING_UNIT_INSTRUCTION__INDEX_ENTRY = GenericUnitPackage.UNIT_INSTRUCTION__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -363,6 +381,15 @@ int RESOURCE_DECLARATION__COMPILATION_STATUS = MODELING_UNIT_INSTRUCTION__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int RESOURCE_DECLARATION__INDEX_ENTRY = MODELING_UNIT_INSTRUCTION__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -445,6 +472,15 @@ int INTENT_SECTION_REFERENCEIN_MODELING_UNIT__COMPILATION_STATUS = GenericUnitPackage.INTENT_SECTION_REFERENCE_INSTRUCTION__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INTENT_SECTION_REFERENCEIN_MODELING_UNIT__INDEX_ENTRY = GenericUnitPackage.INTENT_SECTION_REFERENCE_INSTRUCTION__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -527,6 +563,15 @@ int LABELIN_MODELING_UNIT__COMPILATION_STATUS = GenericUnitPackage.LABEL_DECLARATION__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LABELIN_MODELING_UNIT__INDEX_ENTRY = GenericUnitPackage.LABEL_DECLARATION__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -618,6 +663,15 @@ int ANNOTATION_DECLARATION__COMPILATION_STATUS = MODELING_UNIT_INSTRUCTION__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ANNOTATION_DECLARATION__INDEX_ENTRY = MODELING_UNIT_INSTRUCTION__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -737,6 +791,15 @@ int INSTANCE_LEVEL_INSTRUCTION__COMPILATION_STATUS = MODELING_UNIT_INSTRUCTION__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INSTANCE_LEVEL_INSTRUCTION__INDEX_ENTRY = MODELING_UNIT_INSTRUCTION__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -792,6 +855,15 @@ int INSTANCIATION_INSTRUCTION__COMPILATION_STATUS = INSTANCE_LEVEL_INSTRUCTION__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int INSTANCIATION_INSTRUCTION__INDEX_ENTRY = INSTANCE_LEVEL_INSTRUCTION__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -865,6 +937,15 @@ int STRUCTURAL_FEATURE_AFFECTATION__COMPILATION_STATUS = INSTANCE_LEVEL_INSTRUCTION__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int STRUCTURAL_FEATURE_AFFECTATION__INDEX_ENTRY = INSTANCE_LEVEL_INSTRUCTION__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -947,6 +1028,15 @@ int VALUE_FOR_STRUCTURAL_FEATURE__COMPILATION_STATUS = MODELING_UNIT_INSTRUCTION__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VALUE_FOR_STRUCTURAL_FEATURE__INDEX_ENTRY = MODELING_UNIT_INSTRUCTION__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -993,6 +1083,15 @@ int NATIVE_VALUE_FOR_STRUCTURAL_FEATURE__COMPILATION_STATUS = VALUE_FOR_STRUCTURAL_FEATURE__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int NATIVE_VALUE_FOR_STRUCTURAL_FEATURE__INDEX_ENTRY = VALUE_FOR_STRUCTURAL_FEATURE__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1048,6 +1147,15 @@ int NEW_OBJECT_VALUE_FOR_STRUCTURAL_FEATURE__COMPILATION_STATUS = VALUE_FOR_STRUCTURAL_FEATURE__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int NEW_OBJECT_VALUE_FOR_STRUCTURAL_FEATURE__INDEX_ENTRY = VALUE_FOR_STRUCTURAL_FEATURE__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1103,6 +1211,15 @@ int REFERENCE_VALUE_FOR_STRUCTURAL_FEATURE__COMPILATION_STATUS = VALUE_FOR_STRUCTURAL_FEATURE__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int REFERENCE_VALUE_FOR_STRUCTURAL_FEATURE__INDEX_ENTRY = VALUE_FOR_STRUCTURAL_FEATURE__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1167,6 +1284,15 @@ int CONTRIBUTION_INSTRUCTION__COMPILATION_STATUS = MODELING_UNIT_INSTRUCTION__COMPILATION_STATUS; /** + * The feature id for the '<em><b>Index Entry</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int CONTRIBUTION_INSTRUCTION__INDEX_ENTRY = MODELING_UNIT_INSTRUCTION__INDEX_ENTRY; + + /** * The feature id for the '<em><b>Unit</b></em>' container reference. * <!-- begin-user-doc --> * <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/impl/ModelingUnitFactoryImpl.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/impl/ModelingUnitFactoryImpl.java index 4bb9f47..df00978 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/impl/ModelingUnitFactoryImpl.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/impl/ModelingUnitFactoryImpl.java
@@ -18,6 +18,7 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.impl.EFactoryImpl; import org.eclipse.emf.ecore.plugin.EcorePlugin; +import org.eclipse.mylyn.docs.intent.core.modelingunit.*; import org.eclipse.mylyn.docs.intent.core.modelingunit.AffectationOperator; import org.eclipse.mylyn.docs.intent.core.modelingunit.AnnotationDeclaration; import org.eclipse.mylyn.docs.intent.core.modelingunit.ContributionInstruction;
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/impl/ModelingUnitPackageImpl.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/impl/ModelingUnitPackageImpl.java index 2a46281..7fa4267 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/impl/ModelingUnitPackageImpl.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/impl/ModelingUnitPackageImpl.java
@@ -26,6 +26,8 @@ import org.eclipse.mylyn.docs.intent.core.document.impl.IntentDocumentPackageImpl; import org.eclipse.mylyn.docs.intent.core.genericunit.GenericUnitPackage; import org.eclipse.mylyn.docs.intent.core.genericunit.impl.GenericUnitPackageImpl; +import org.eclipse.mylyn.docs.intent.core.indexer.IntentIndexerPackage; +import org.eclipse.mylyn.docs.intent.core.indexer.impl.IntentIndexerPackageImpl; import org.eclipse.mylyn.docs.intent.core.modelingunit.AffectationOperator; import org.eclipse.mylyn.docs.intent.core.modelingunit.AnnotationDeclaration; import org.eclipse.mylyn.docs.intent.core.modelingunit.ContributionInstruction; @@ -258,6 +260,9 @@ CompilerPackageImpl theCompilerPackage = (CompilerPackageImpl)(EPackage.Registry.INSTANCE .getEPackage(CompilerPackage.eNS_URI) instanceof CompilerPackageImpl ? EPackage.Registry.INSTANCE .getEPackage(CompilerPackage.eNS_URI) : CompilerPackage.eINSTANCE); + IntentIndexerPackageImpl theIntentIndexerPackage = (IntentIndexerPackageImpl)(EPackage.Registry.INSTANCE + .getEPackage(IntentIndexerPackage.eNS_URI) instanceof IntentIndexerPackageImpl ? EPackage.Registry.INSTANCE + .getEPackage(IntentIndexerPackage.eNS_URI) : IntentIndexerPackage.eINSTANCE); DescriptionUnitPackageImpl theDescriptionUnitPackage = (DescriptionUnitPackageImpl)(EPackage.Registry.INSTANCE .getEPackage(DescriptionUnitPackage.eNS_URI) instanceof DescriptionUnitPackageImpl ? EPackage.Registry.INSTANCE .getEPackage(DescriptionUnitPackage.eNS_URI) : DescriptionUnitPackage.eINSTANCE); @@ -267,6 +272,7 @@ theGenericUnitPackage.createPackageContents(); theIntentDocumentPackage.createPackageContents(); theCompilerPackage.createPackageContents(); + theIntentIndexerPackage.createPackageContents(); theDescriptionUnitPackage.createPackageContents(); // Initialize created meta-data @@ -274,6 +280,7 @@ theGenericUnitPackage.initializePackageContents(); theIntentDocumentPackage.initializePackageContents(); theCompilerPackage.initializePackageContents(); + theIntentIndexerPackage.initializePackageContents(); theDescriptionUnitPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/util/ModelingUnitAdapterFactory.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/util/ModelingUnitAdapterFactory.java index 1a9cb7e..4a8d250 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/util/ModelingUnitAdapterFactory.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/util/ModelingUnitAdapterFactory.java
@@ -22,6 +22,7 @@ import org.eclipse.mylyn.docs.intent.core.genericunit.IntentSectionReferenceInstruction; import org.eclipse.mylyn.docs.intent.core.genericunit.LabelDeclaration; import org.eclipse.mylyn.docs.intent.core.genericunit.UnitInstruction; +import org.eclipse.mylyn.docs.intent.core.modelingunit.*; import org.eclipse.mylyn.docs.intent.core.modelingunit.AnnotationDeclaration; import org.eclipse.mylyn.docs.intent.core.modelingunit.ContributionInstruction; import org.eclipse.mylyn.docs.intent.core.modelingunit.InstanceLevelInstruction;
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/util/ModelingUnitSwitch.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/util/ModelingUnitSwitch.java index b605440..dd954c0 100644 --- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/util/ModelingUnitSwitch.java +++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/modelingunit/util/ModelingUnitSwitch.java
@@ -21,6 +21,7 @@ import org.eclipse.mylyn.docs.intent.core.genericunit.IntentSectionReferenceInstruction; import org.eclipse.mylyn.docs.intent.core.genericunit.LabelDeclaration; import org.eclipse.mylyn.docs.intent.core.genericunit.UnitInstruction; +import org.eclipse.mylyn.docs.intent.core.modelingunit.*; import org.eclipse.mylyn.docs.intent.core.modelingunit.AnnotationDeclaration; import org.eclipse.mylyn.docs.intent.core.modelingunit.ContributionInstruction; import org.eclipse.mylyn.docs.intent.core.modelingunit.InstanceLevelInstruction;
diff --git a/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/suite/UITestSuite.java b/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/suite/UITestSuite.java index a3fc596..8342718 100644 --- a/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/suite/UITestSuite.java +++ b/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/suite/UITestSuite.java
@@ -25,6 +25,7 @@ import org.eclipse.mylyn.docs.intent.client.ui.test.unit.refresher.RefresherTest; import org.eclipse.mylyn.docs.intent.client.ui.test.unit.repository.IntentRepositoryStructurerTest; import org.eclipse.mylyn.docs.intent.client.ui.test.unit.scenario.IntentAbstractResourceTest; +import org.eclipse.mylyn.docs.intent.client.ui.test.unit.scenario.SimpleCreationTest; /** * This suite will launch all the tests relative to the UI behavior. @@ -50,7 +51,7 @@ * @return The test suite containing all intent ui tests */ public static Test suite() { - final TestSuite suite = new TestSuite("Intent Global TestSuite"); + final TestSuite suite = new TestSuite("Intent Plugin TestSuite"); /* * Intent Technical Tests @@ -61,7 +62,7 @@ // Match & merge tests final TestSuite compareSuite = new TestSuite("Intent match and merge tests"); compareSuite.addTestSuite(IntentMatchEngineTests.class); - clientSuite.addTest(compareSuite); + // clientSuite.addTest(compareSuite); /* * Intent UI Tests @@ -71,7 +72,7 @@ // Core tests // All tests that test a technical concern (emf compare behavior, project lifecycle...) final TestSuite basicTestSuite = new TestSuite("Technical tests"); - // basicTestSuite.addTestSuite(MultipleReplacementInEditorTest.class); + basicTestSuite.addTestSuite(SimpleCreationTest.class); basicTestSuite.addTestSuite(IntentRepositoryStructurerTest.class); basicTestSuite.addTestSuite(ProjectTest.class); basicTestSuite.addTestSuite(RefresherTest.class);
diff --git a/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/repository/IntentRepositoryStructurerTest.java b/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/repository/IntentRepositoryStructurerTest.java index 2823b74..1e97bd6 100644 --- a/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/repository/IntentRepositoryStructurerTest.java +++ b/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/repository/IntentRepositoryStructurerTest.java
@@ -11,20 +11,11 @@ package org.eclipse.mylyn.docs.intent.client.ui.test.unit.repository; import com.google.common.collect.Lists; -import com.google.common.collect.Sets; -import com.google.common.collect.Sets.SetView; -import java.util.Collection; -import java.util.Set; - -import org.eclipse.core.resources.IFolder; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.mylyn.docs.intent.client.ui.editor.IntentEditor; import org.eclipse.mylyn.docs.intent.client.ui.editor.IntentEditorDocument; import org.eclipse.mylyn.docs.intent.client.ui.test.util.AbstractIntentUITest; -import org.eclipse.mylyn.docs.intent.collab.common.location.IntentLocations; /** * Ensures that the internal structure of the Intent Repository is correctly maintained. @@ -106,63 +97,4 @@ Lists.newArrayList("1.1", "2.1", "3.1", "3.2", "4.1"), Lists.newArrayList("2.1.1")); } - /** - * Checks that the structure of the repository is conform to the given specifications. - * - * @param expectedChapterNames - * the list of chapters resources that should be in the repository - * @param expectedSectionNames - * the list of section resources that should be in the repository - * @param expectedMUNames - * the list of Modeling unit resources that should be in the repository - */ - protected void checkRepositoryStructure(Collection<String> expectedChapterNames, - Collection<String> expectedSectionNames, Collection<String> expectedMUNames) { - IFolder documentFolder = intentProject.getFolder(".repository/" + IntentLocations.INTENT_FOLDER); - try { - documentFolder.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor()); - - IFolder chapterFolder = documentFolder.getFolder("IntentChapter"); - IFolder sectionFolder = documentFolder.getFolder("IntentSection"); - IFolder MUFolder = documentFolder.getFolder("ModelingUnit"); - - checkFolderStructure(chapterFolder, Sets.newLinkedHashSet(expectedChapterNames)); - checkFolderStructure(sectionFolder, Sets.newLinkedHashSet(expectedSectionNames)); - checkFolderStructure(MUFolder, Sets.newLinkedHashSet(expectedMUNames)); - } catch (CoreException e) { - fail(e.getMessage()); - } - } - - /** - * Ensures that the given folder contains exactly the given expected resources. - * - * @param folder - * the folder to check - * @param expectedResourcesName - * the expected resources - */ - protected void checkFolderStructure(IFolder folder, Set<String> expectedResourcesName) { - Set<String> folderContent = Sets.newLinkedHashSet(); - try { - // Collecting the resources contained by the given folder - for (IResource resource : folder.members()) { - folderContent.add(resource.getName().replace("." + resource.getFileExtension(), "")); - } - - // Checking that the folder does not contain more resource that the expected ones - SetView<String> folderDifferences = Sets.difference(folderContent, expectedResourcesName); - assertTrue("The " + folder.getName() + " folder contains too many " + folder.getName() + "(s) (" - + folderDifferences.size() + "): " + folderDifferences.toString(), - folderDifferences.isEmpty()); - - // Checking that the folder does contain all expected ones - folderDifferences = Sets.difference(expectedResourcesName, folderContent); - assertTrue("The " + folder.getName() + " folder should contain the following " + folder.getName() - + "(s): " + folderDifferences.toString(), folderDifferences.isEmpty()); - } catch (CoreException e) { - fail(e.getMessage()); - } - } - }
diff --git a/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/scenario/MultipleReplacementInEditorTest.java b/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/scenario/MultipleReplacementInEditorTest.java index aab0134..ed84569 100644 --- a/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/scenario/MultipleReplacementInEditorTest.java +++ b/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/scenario/MultipleReplacementInEditorTest.java
@@ -11,7 +11,6 @@ package org.eclipse.mylyn.docs.intent.client.ui.test.unit.scenario; import java.io.File; -import java.io.IOException; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.mylyn.docs.intent.client.ui.editor.IntentEditor; @@ -58,89 +57,25 @@ /** * Ensures that pasting several times content inside the document does not cause any issue. * - * @throws IOException + * @throws Exception */ - public void testCopyPastBigDocuments() throws IOException { + public void testCopyPastBigDocuments() throws Exception { String smallDocumentContent = FileToStringConverter.getFileAsString(new File(INTENT_SMALL_DOC_PATH)); String bigDocumentContent = FileToStringConverter.getFileAsString(new File(INTENT_BIG_DOC_PATH)); - document.set(bigDocumentContent); - editor.doSave(new NullProgressMonitor()); - waitForAllOperationsInUIThread(); + for (int i = 1; i < 200; i++) { + System.err.println(i); + document.set(bigDocumentContent); + editor.doSave(new NullProgressMonitor()); - document.set(smallDocumentContent); - editor.doSave(new NullProgressMonitor()); - waitForAllOperationsInUIThread(); - - document.set(bigDocumentContent); - editor.doSave(new NullProgressMonitor()); - waitForAllOperationsInUIThread(); - - document.set(smallDocumentContent); - editor.doSave(new NullProgressMonitor()); - waitForAllOperationsInUIThread(); - - document.set(bigDocumentContent); - editor.doSave(new NullProgressMonitor()); - waitForAllOperationsInUIThread(); - - document.set(smallDocumentContent); - editor.doSave(new NullProgressMonitor()); - waitForAllOperationsInUIThread(); - - document.set(bigDocumentContent); - editor.doSave(new NullProgressMonitor()); - waitForAllOperationsInUIThread(); - - document.set(smallDocumentContent); - editor.doSave(new NullProgressMonitor()); - waitForAllOperationsInUIThread(); - - document.set(bigDocumentContent); - editor.doSave(new NullProgressMonitor()); - waitForAllOperationsInUIThread(); - - document.set(smallDocumentContent); - editor.doSave(new NullProgressMonitor()); - waitForAllOperationsInUIThread(); - - document.set(bigDocumentContent); - editor.doSave(new NullProgressMonitor()); - waitForAllOperationsInUIThread(); - - document.set(smallDocumentContent); - editor.doSave(new NullProgressMonitor()); - waitForAllOperationsInUIThread(); + document.set(smallDocumentContent); + editor.doSave(new NullProgressMonitor()); + if (i % 15 == 0) { + waitForAllOperationsInUIThread(); + tearDown(); + setUp(); + } + } } - /** - * Ensures that pasting several times content inside the document, and removing all document content does - * not cause any issue. - * - * @throws IOException - */ - public void testCopyPastAndEmptyDocuments() throws IOException { - String smallDocumentContent = FileToStringConverter.getFileAsString(new File(INTENT_SMALL_DOC_PATH)); - String bigDocumentContent = FileToStringConverter.getFileAsString(new File(INTENT_BIG_DOC_PATH)); - - document.set(bigDocumentContent); - editor.doSave(new NullProgressMonitor()); - waitForAllOperationsInUIThread(); - - document.set("Document {\n}"); - editor.doSave(new NullProgressMonitor()); - waitForAllOperationsInUIThread(); - - document.set(bigDocumentContent); - editor.doSave(new NullProgressMonitor()); - waitForAllOperationsInUIThread(); - - document.set(smallDocumentContent); - editor.doSave(new NullProgressMonitor()); - waitForAllOperationsInUIThread(); - - document.set("Document {\n}"); - editor.doSave(new NullProgressMonitor()); - waitForAllOperationsInUIThread(); - } }
diff --git a/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/scenario/SimpleCreationTest.java b/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/scenario/SimpleCreationTest.java index 1e0e3fe..94c6c5f 100644 --- a/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/scenario/SimpleCreationTest.java +++ b/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/unit/scenario/SimpleCreationTest.java
@@ -1,78 +1,97 @@ -/******************************************************************************* - * Copyright (c) 2010, 2011 Obeo. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Obeo - initial API and implementation - *******************************************************************************/ -package org.eclipse.mylyn.docs.intent.client.ui.test.unit.scenario; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.mylyn.docs.intent.client.ui.editor.IntentEditor; -import org.eclipse.mylyn.docs.intent.client.ui.editor.IntentEditorDocument; -import org.eclipse.mylyn.docs.intent.client.ui.test.util.AbstractIntentUITest; - -/** - * <p> - * Ensures that the most simple creation test works. - * </p> - * - * @author <a href="mailto:alex.lagarde@obeo.fr">Alex Lagarde</a> - */ -public class SimpleCreationTest extends AbstractIntentUITest { - private static final String INTENT_DOC_PATH = "data/unit/documents/scenario/empty.intent"; - - private IntentEditor editor; - - private IntentEditorDocument document; - - /** - * {@inheritDoc} - * - * @see junit.framework.TestCase#setUp() - */ - @Override - protected void setUp() throws Exception { - super.setUp(); - - // Step 1 : Generic set up - setUpIntentProject("intentProject", INTENT_DOC_PATH, true); - - // Step 2 : open an editor on the root document - editor = openIntentEditor(); - document = (IntentEditorDocument)editor.getDocumentProvider().getDocument(editor.getEditorInput()); - } - - /** - * Ensures that abstract resources are not synchronized. - */ - public void testSimpleModifications() { - repositoryListener.startRecording(); - - document.set("Document {\n\tChapter Title {\n\t\tText\n\n\t\tSection Title {\n\t\t\tText\n\t\t}\n\t}\n\tChapter Title {\n\t\tText\n\t}\n}"); - editor.doSave(new NullProgressMonitor()); - waitForAllOperationsInUIThread(); - waitForSynchronizer(); - - document.set("Document {\n\tChapter C1 {\n\t\tText\n\n\t\tSection C11 {\n\t\t\tText\n\t\t}\n\t}\n\tChapter C2 {\n\t\tText\n\t}\n}"); - editor.doSave(new NullProgressMonitor()); - waitForAllOperationsInUIThread(); - waitForSynchronizer(); - } - - /** - * {@inheritDoc} - * - * @see junit.framework.TestCase#tearDown() - */ - @Override - protected void tearDown() throws Exception { - if (editor != null) { - editor.close(false); - } - super.tearDown(); - } -} +/******************************************************************************* + * Copyright (c) 2010, 2011 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.mylyn.docs.intent.client.ui.test.unit.scenario; + +import java.io.File; +import java.io.IOException; + +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.mylyn.docs.intent.client.ui.editor.IntentEditor; +import org.eclipse.mylyn.docs.intent.client.ui.editor.IntentEditorDocument; +import org.eclipse.mylyn.docs.intent.client.ui.test.util.AbstractIntentUITest; +import org.eclipse.mylyn.docs.intent.parser.modelingunit.test.utils.FileToStringConverter; + +/** + * <p> + * Ensures that the most simple creation test works. + * </p> + * + * @author <a href="mailto:alex.lagarde@obeo.fr">Alex Lagarde</a> + */ +public class SimpleCreationTest extends AbstractIntentUITest { + private static final String INTENT_DOC_PATH = "data/unit/documents/scenario/empty.intent"; + + private IntentEditor editor; + + private IntentEditorDocument document; + + /** + * {@inheritDoc} + * + * @see junit.framework.TestCase#setUp() + */ + @Override + protected void setUp() throws Exception { + super.setUp(); + + // Step 1 : Generic set up + setUpIntentProject("intentProject", INTENT_DOC_PATH, true); + + // Step 2 : open an editor on the root document + editor = openIntentEditor(); + document = (IntentEditorDocument)editor.getDocumentProvider().getDocument(editor.getEditorInput()); + } + + /** + * Ensures that abstract resources are not synchronized. + */ + public void testSimpleModifications() { + document.set("Document {\n\tChapter Title {\n\t\tText\n\n\t\tSection Title {\n\t\t\tText\n\t\t}\n\t}\n\tChapter Title {\n\t\tText\n\t}\n}"); + editor.doSave(new NullProgressMonitor()); + waitForAllOperationsInUIThread(); + + document.set("Document {\n\tChapter C1 {\n\t\tText\n\n\t\tSection C11 {\n\t\t\tText\n\t\t}\n\t}\n\tChapter C2 {\n\t\tText\n\t}\n}"); + editor.doSave(new NullProgressMonitor()); + waitForAllOperationsInUIThread(); + } + + /** + * Ensures that abstract resources are not synchronized. + * + * @throws IOException + */ + public void testSectionRenamming() throws IOException { + String intialContent = FileToStringConverter.getFileAsString(new File( + "data/unit/documents/scenario/simpleCreation/simpleCreation01.intent")); + String renamedContent = FileToStringConverter.getFileAsString(new File( + "data/unit/documents/scenario/simpleCreation/simpleCreation02.intent")); + document.set(intialContent); + editor.doSave(new NullProgressMonitor()); + waitForAllOperationsInUIThread(); + + document.set(renamedContent); + editor.doSave(new NullProgressMonitor()); + waitForAllOperationsInUIThread(); + } + + /** + * {@inheritDoc} + * + * @see junit.framework.TestCase#tearDown() + */ + @Override + protected void tearDown() throws Exception { + if (editor != null) { + editor.close(false); + } + super.tearDown(); + } +}
diff --git a/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/util/AbstractIntentUITest.java b/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/util/AbstractIntentUITest.java index 3793012..234784a 100644 --- a/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/util/AbstractIntentUITest.java +++ b/tests/org.eclipse.mylyn.docs.intent.client.ui.test/src/org/eclipse/mylyn/docs/intent/client/ui/test/util/AbstractIntentUITest.java
@@ -11,19 +11,23 @@ package org.eclipse.mylyn.docs.intent.client.ui.test.util; import com.google.common.collect.Sets; +import com.google.common.collect.Sets.SetView; import java.io.File; import java.io.IOException; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import java.util.Set; import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.IWorkspaceDescription; import org.eclipse.core.resources.IWorkspaceRunnable; @@ -537,4 +541,69 @@ } } + /** + * Checks that the structure of the repository is conform to the given specifications. + * + * @param expectedChapterNames + * the list of chapters resources that should be in the repository + * @param expectedSectionNames + * the list of section resources that should be in the repository + * @param expectedMUNames + * the list of Modeling unit resources that should be in the repository + */ + protected void checkRepositoryStructure(Collection<String> expectedChapterNames, + Collection<String> expectedSectionNames, Collection<String> expectedMUNames) { + IFolder documentFolder = intentProject.getFolder(".repository/" + IntentLocations.INTENT_FOLDER); + try { + documentFolder.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor()); + + IFolder chapterFolder = documentFolder.getFolder("IntentChapter"); + IFolder sectionFolder = documentFolder.getFolder("IntentSection"); + IFolder MUFolder = documentFolder.getFolder("ModelingUnit"); + + checkFolderStructure(chapterFolder, Sets.newLinkedHashSet(expectedChapterNames)); + checkFolderStructure(sectionFolder, Sets.newLinkedHashSet(expectedSectionNames)); + checkFolderStructure(MUFolder, Sets.newLinkedHashSet(expectedMUNames)); + } catch (CoreException e) { + fail(e.getMessage()); + } + } + + /** + * Ensures that the given folder contains exactly the given expected resources. + * + * @param folder + * the folder to check + * @param expectedResourcesName + * the expected resources + */ + protected void checkFolderStructure(IFolder folder, Set<String> expectedResourcesName) { + Set<String> folderContent = Sets.newLinkedHashSet(); + try { + if (folder.exists()) { + // Collecting the resources contained by the given folder + for (IResource resource : folder.members()) { + folderContent.add(resource.getName().replace("." + resource.getFileExtension(), "")); + } + + // Checking that the folder does not contain more resource that the expected ones + SetView<String> folderDifferences = Sets.difference(folderContent, expectedResourcesName); + assertTrue("The " + folder.getName() + " folder contains too many " + folder.getName() + + "(s) (" + folderDifferences.size() + "): " + folderDifferences.toString(), + folderDifferences.isEmpty()); + + // Checking that the folder does contain all expected ones + folderDifferences = Sets.difference(expectedResourcesName, folderContent); + assertTrue( + "The " + folder.getName() + " folder should contain the following " + + folder.getName() + "(s): " + folderDifferences.toString(), + folderDifferences.isEmpty()); + } else { + assertEquals("The folder " + folder.getName() + " does not contain any content ", + Sets.<String> newLinkedHashSet(), expectedResourcesName); + } + } catch (CoreException e) { + fail(e.getMessage()); + } + } }