├── .gitignore ├── LICENSE ├── README.md ├── de.bitub.step-updatesite ├── .project ├── category.xml └── pom.xml ├── de.bitub.step.build-resources ├── .gitignore ├── .project ├── STEP.setup ├── codetemplates.xml ├── conventions.xml ├── de.bitub.step-luna.target ├── de.bitub.step-mars.target ├── de.bitub.step-neon.target └── pom.xml ├── de.bitub.step.express.sdk-feature ├── .project ├── build.properties ├── epl-v10.html ├── feature.xml ├── license.html └── pom.xml ├── de.bitub.step.express.tests ├── .classpath ├── .gitignore ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs ├── META-INF │ └── MANIFEST.MF ├── RunAllXcoreGenTests.launch ├── RunXCoreInverseRelationshipTest.launch ├── RunXcoreAnalyticalPartitioningDelegateTest.launch ├── RunXcoreEnumTest.launch ├── RunXcoreIfc2x3GenTest.launch ├── RunXcoreIfc4GenTest.launch ├── RunXcoreInverseLeftNonUniqueRelationshipTest.launch ├── RunXcoreInverseSuperTypeTest.launch ├── RunXcoreMultiInverseLeftNonUniqueRelationshipTest.launch ├── RunXcoreNestedCollectionTest.launch ├── RunXcoreNestedTypeWrappers.launch ├── RunXcorePackagePartitioningTests.launch ├── RunXcoreReferencedMixedSelect.launch ├── RunXcoreReferencedSelect.launch ├── build.properties └── src │ └── de │ └── bitub │ └── step │ └── express │ └── tests │ └── xcoregen │ ├── AbstractXcoreGeneratorTest.xtend │ ├── XcoreAnalyticalPartitioningDelegateTest.xtend │ ├── XcoreEnumTest.xtend │ ├── XcoreInverseLeftNonUniqueRelationshipTest.xtend │ ├── XcoreInverseRelationshipTest.xtend │ ├── XcoreInverseSuperTypeTest.xtend │ ├── XcoreMultiInverseLeftNonUniqueRelationshipTest.xtend │ ├── XcoreNestedCollectionTest.xtend │ ├── XcoreNestedTypeWrappers.xtend │ ├── XcorePackagePartitioningTests.xtend │ ├── XcoreReferencedMixedSelect.xtend │ ├── XcoreReferencedSelect.xtend │ ├── XcoreSimpleEntityWithAttributes.xtend │ ├── XcoreSimpleRelationshipTest.xtend │ ├── XcoreSuperTypeTest.xtend │ └── ifc │ ├── IFC2X3_TC1.exp │ ├── IFC4.exp │ ├── IFC4_ADD1.exp │ ├── IFC4_ADD2.exp │ ├── IfcPartitioningDelegate.xtend │ ├── XcoreIfc2x3GenTest.xtend │ └── XcoreIfc4GenTest.xtend ├── de.bitub.step.express.ui ├── .classpath ├── .gitignore ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── plugin.xml ├── plugin.xml_gen ├── pom.xml └── src │ └── de │ └── bitub │ └── step │ └── ui │ ├── EXPRESSUiModule.java │ ├── adapters │ └── EXPRESS2EObjectResolverAdapterFactory.xtend │ ├── commands │ └── EXPRESSXCoreGenerationHandler.java │ ├── contentassist │ └── EXPRESSProposalProvider.xtend │ ├── labeling │ ├── EXPRESSDescriptionLabelProvider.xtend │ └── EXPRESSLabelProvider.xtend │ ├── outline │ └── EXPRESSOutlineTreeProvider.xtend │ ├── quickfix │ └── EXPRESSQuickfixProvider.xtend │ └── views │ └── EXPRESSInheritanceGraphViewPart.java ├── de.bitub.step.express ├── .classpath ├── .gitignore ├── .launch │ └── Generate Language Infrastructure (de.bitub.step.express).launch ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── model │ └── generated │ │ ├── EXPRESS.ecore │ │ └── EXPRESS.genmodel ├── plugin.xml ├── plugin.xml_gen ├── pom.xml ├── src-gen │ └── .gitignore └── src │ └── de │ └── bitub │ └── step │ ├── EXPRESS.xtext │ ├── EXPRESSRuntimeModule.java │ ├── EXPRESSStandaloneSetup.java │ ├── GenerateEXPRESS.mwe2 │ ├── analyzing │ ├── EXPRESSInterpreter.xtend │ └── EXPRESSModelInfo.xtend │ ├── formatting │ └── EXPRESSFormatter.xtend │ ├── generator │ └── EXPRESSGenerator.xtend │ ├── scoping │ └── EXPRESSScopeProvider.xtend │ ├── util │ └── EXPRESSExtension.xtend │ ├── validation │ └── EXPRESSValidator.xtend │ └── xcore │ ├── .gitignore │ ├── FunctionGenerator.xtend │ ├── XcoreBasePartitionDelegate.xtend │ ├── XcoreConstants.xtend │ ├── XcoreDefaultPartitionDelegate.xtend │ ├── XcoreFunctionalPartitioningDelegate.xtend │ ├── XcoreGenerator.xtend │ ├── XcoreGenericSubPackageDescriptor.xtend │ ├── XcoreInfo.xtend │ ├── XcoreMultiPartitionDelegate.xtend │ ├── XcoreOutputConfigurationProvider.xtend │ ├── XcorePackage.xtend │ ├── XcorePackageDescriptor.xtend │ └── XcorePartitioningDelegate.java ├── de.bitub.step.p21.antlr ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── pom.xml └── src │ └── main │ └── antlr4 │ ├── de │ └── bitub │ │ └── step │ │ └── p21 │ │ ├── StepLexer.g4 │ │ ├── StepParser.g4 │ │ └── string │ │ ├── StringLexer.g4 │ │ └── StringParser.g4 │ └── imports │ ├── BasicAlphabet.g4 │ ├── StepLexer.g4 │ └── Tokens.g4 ├── de.bitub.step.p21.f ├── .project ├── build.properties ├── epl-v10.html ├── feature.xml ├── license.html └── pom.xml ├── de.bitub.step.p21.test ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.pde.core.prefs ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── ifc-files │ └── ifc4 │ │ ├── 4_Waende_2_Decken.ifc │ │ ├── BasinAdvancedBrep.ifc │ │ ├── BasinBrep.ifc │ │ ├── BasinTessellation.ifc │ │ ├── Bath.ifc │ │ ├── BeamExtruded.ifc │ │ ├── BeamTessellated.ifc │ │ ├── BeamUnitTestsVaryingCardinal.ifc │ │ ├── BeamUnitTestsVaryingPath.ifc │ │ ├── BeamUnitTestsVaryingProfile.ifc │ │ ├── Column.ifc │ │ ├── IndexedColourMap.ifc │ │ ├── P21InverseRelationshipTest.ifc │ │ ├── ReinforcingAssembly.ifc │ │ ├── ReinforcingBar.ifc │ │ ├── Slab.ifc │ │ ├── SlabOpenings.ifc │ │ ├── Wall.ifc │ │ └── WallWithOpeningAndWindow.ifc └── src │ └── de │ └── bitub │ └── step │ └── p21 │ └── test │ ├── AbstractP21TestHelper.java │ ├── AllTests.java │ ├── Ifc4BasinAdvancedBrepTest.java │ ├── Ifc4WallTest.java │ ├── IndexUtilTest.java │ ├── P21EntityListenerTest.java │ ├── P21InverseRelationshipTest.java │ ├── P21ParserPrimitivesTest.java │ ├── P21ParserResolveReferencesTest.java │ ├── P21TestSuite.java │ └── XPressModelTest.java ├── de.bitub.step.p21.ui ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── icons │ └── sample.gif ├── plugin.xml └── src │ └── de │ └── bitub │ └── step │ └── p21 │ └── ui │ └── editors │ ├── EntityIdRule.java │ ├── P21MultiPageEditor.java │ ├── P21SourceEditor.java │ └── P21SourceViewerConfiguration.java ├── de.bitub.step.p21 ├── .classpath ├── .gitignore ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── plugin.xml ├── pom.xml └── src │ └── de │ └── bitub │ └── step │ └── p21 │ ├── AllP21Entities.java │ ├── AllP21EntitiesImpl.java │ ├── StepUntypedToEcore.java │ ├── XPressModel.java │ ├── XPressModelConstants.java │ ├── concurrrent │ ├── P21DataLineTask.java │ ├── P21ResolveReferencesListTask.java │ └── P21ResolveReferencesTask.java │ ├── di │ ├── P21Module.java │ ├── P21ParserFactory.java │ └── P21ParserFactoryImpl.java │ ├── mapper │ ├── NameToClassifierMap.java │ ├── NameToClassifierMapImpl.java │ ├── NameToContainerListsMap.java │ └── NameToContainerListsMapImpl.java │ ├── parser │ ├── P21DataLineTasksGenerator.java │ ├── P21EntityListener.java │ ├── P21LevelListener.java │ ├── SingleLineEntityParser.java │ └── util │ │ ├── Antlr4Util.java │ │ ├── IndexUtil.java │ │ └── IndexUtilImpl.java │ ├── persistence │ ├── P21Helper.java │ ├── P21HelperImpl.java │ ├── P21Load.java │ ├── P21LoadImpl.java │ ├── P21Resource.java │ ├── P21ResourceFactoryImpl.java │ └── P21ResourceImpl.java │ └── util │ ├── IOHelper.java │ └── LoggerHelper.java ├── org.buildingsmart.mvd.edit ├── .classpath ├── .project ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── icons │ └── full │ │ ├── ctool16 │ │ ├── CreateApplicabilityType_definitions_Definitions.gif │ │ ├── CreateApplicabilityType_templateRules_TemplateRules.gif │ │ ├── CreateApplicabilityType_template_GenericReference.gif │ │ ├── CreateAttributeRule_constraints_ConstraintsType.gif │ │ ├── CreateAttributeRule_entityRules_EntityRulesType.gif │ │ ├── CreateConceptRoot_applicability_ApplicabilityType.gif │ │ ├── CreateConceptRoot_concepts_ConceptsType.gif │ │ ├── CreateConceptRoot_definitions_Definitions.gif │ │ ├── CreateConceptTemplate_definitions_Definitions.gif │ │ ├── CreateConceptTemplate_rules_RulesType.gif │ │ ├── CreateConceptTemplate_subTemplates_SubTemplatesType.gif │ │ ├── CreateConcept_definitions_Definitions.gif │ │ ├── CreateConcept_requirements_Requirements.gif │ │ ├── CreateConcept_templateRules_TemplateRules.gif │ │ ├── CreateConcept_template_GenericReference.gif │ │ ├── CreateConceptsType_concept_Concept.gif │ │ ├── CreateDefinitionType_body_BodyType.gif │ │ ├── CreateDefinitionType_link_LinkType.gif │ │ ├── CreateDefinitions_definition_DefinitionType.gif │ │ ├── CreateEntityRule_attributeRules_AttributeRulesType.gif │ │ ├── CreateEntityRule_constraints_ConstraintsType.gif │ │ ├── CreateEntityRule_references_ReferencesType.gif │ │ ├── CreateExchangeRequirementType_definitions_Definitions.gif │ │ ├── CreateExchangeRequirementsType_exchangeRequirement_ExchangeRequirementType.gif │ │ ├── CreateModelView_baseView_GenericReference.gif │ │ ├── CreateModelView_definitions_Definitions.gif │ │ ├── CreateModelView_exchangeRequirements_ExchangeRequirementsType.gif │ │ ├── CreateModelView_roots_RootsType.gif │ │ ├── CreateMvdXML_templates_TemplatesType.gif │ │ ├── CreateMvdXML_views_ViewsType.gif │ │ ├── CreateReferencesType_template_GenericReference.gif │ │ ├── CreateRequirements_requirement_Requirement.gif │ │ ├── CreateRootsType_conceptRoot_ConceptRoot.gif │ │ ├── CreateRulesType_attributeRule_AttributeRule.gif │ │ ├── CreateSubTemplatesType_conceptTemplate_ConceptTemplate.gif │ │ ├── CreateTemplatesType_conceptTemplate_ConceptTemplate.gif │ │ └── CreateViewsType_modelView_ModelView.gif │ │ └── obj16 │ │ ├── ApplicabilityType.gif │ │ ├── AttributeRule.gif │ │ ├── AttributeRulesType.gif │ │ ├── BodyType.gif │ │ ├── Concept.gif │ │ ├── ConceptRoot.gif │ │ ├── ConceptTemplate.gif │ │ ├── ConceptsType.gif │ │ ├── ConstraintType.gif │ │ ├── ConstraintsType.gif │ │ ├── DefinitionType.gif │ │ ├── Definitions.gif │ │ ├── EntityRule.gif │ │ ├── EntityRulesType.gif │ │ ├── ExchangeRequirementType.gif │ │ ├── ExchangeRequirementsType.gif │ │ ├── GenericReference.gif │ │ ├── LinkType.gif │ │ ├── ModelView.gif │ │ ├── MvdXML.gif │ │ ├── References.gif │ │ ├── ReferencesType.gif │ │ ├── Requirement.gif │ │ ├── Requirements.gif │ │ ├── RootsType.gif │ │ ├── Rules.gif │ │ ├── RulesType.gif │ │ ├── SubConceptsType.gif │ │ ├── SubTemplatesType.gif │ │ ├── TemplateRuleType.gif │ │ ├── TemplateRules.gif │ │ ├── TemplatesType.gif │ │ └── ViewsType.gif ├── plugin.properties └── plugin.xml ├── org.buildingsmart.mvd.editor ├── .classpath ├── .project ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── icons │ └── full │ │ ├── obj16 │ │ └── MvdXmlModelFile.gif │ │ └── wizban │ │ └── NewMvdXml.gif ├── plugin.properties ├── plugin.xml └── src │ └── org │ └── buildingsmart │ └── mvd │ ├── commands │ ├── MVD2TextualMVDGenerationHandler.java │ └── ValidateIfcFileWithMvdRules.java │ ├── menu │ ├── IfcFileContributionItem.java │ └── MvdFileContributionItem.java │ └── util │ └── EditorUtils.java ├── org.buildingsmart.mvd.expressions.ide ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs ├── META-INF │ └── MANIFEST.MF └── build.properties ├── org.buildingsmart.mvd.expressions.tests ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs ├── META-INF │ └── MANIFEST.MF ├── build.properties └── src │ └── org │ └── buildingsmart │ └── mvd │ └── expressions │ └── tests │ ├── ExpressionString2OCLTest.xtend │ └── ExpressionStringsParsingTest.xtend ├── org.buildingsmart.mvd.expressions.ui.tests ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs ├── META-INF │ └── MANIFEST.MF └── build.properties ├── org.buildingsmart.mvd.expressions.ui ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── plugin.xml ├── plugin.xml_gen └── src │ └── org │ └── buildingsmart │ └── mvd │ └── expressions │ └── ui │ ├── ExpressionStringsUiModule.xtend │ ├── contentassist │ └── ExpressionStringsProposalProvider.xtend │ ├── labeling │ ├── ExpressionStringsDescriptionLabelProvider.xtend │ └── ExpressionStringsLabelProvider.xtend │ ├── outline │ └── ExpressionStringsOutlineTreeProvider.xtend │ └── quickfix │ └── ExpressionStringsQuickfixProvider.xtend ├── org.buildingsmart.mvd.expressions ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── model │ └── generated │ │ ├── ExpressionStrings.ecore │ │ └── ExpressionStrings.genmodel ├── plugin.xml ├── plugin.xml_gen └── src │ └── org │ └── buildingsmart │ └── mvd │ └── expressions │ ├── ExpressionStrings.xtext │ ├── ExpressionStringsRuntimeModule.xtend │ ├── ExpressionStringsStandaloneSetup.xtend │ ├── GenerateExpressionStrings.mwe2 │ ├── generator │ └── ExpressionStringsGenerator.xtend │ ├── scoping │ └── ExpressionStringsScopeProvider.xtend │ ├── transform │ └── ExpressionString2OCL.xtend │ ├── util │ └── IOUtil.xtend │ └── validation │ └── ExpressionStringsValidator.xtend ├── org.buildingsmart.mvd.tmvd.sdk ├── .project ├── build.properties └── feature.xml ├── org.buildingsmart.mvd.tmvd.tests ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── ifc-files │ └── WallWithOpeningAndWindow.ifc ├── mvd-files │ ├── DesignTransferView_V2-corrected.mvdxml │ ├── DoorHasSelfClosing.mvdxml │ ├── ProjectHaveTerrainObject.mvdxml │ └── mvdXML_V1-1-Final_Validation.mvdxml ├── org.buildingsmart.mvd.tmvd.tests.launch ├── src │ └── org │ │ └── buildingsmart │ │ └── mvd │ │ └── tmvd │ │ ├── AbstractTextualMVDTest.xtend │ │ ├── converter │ │ └── ApplicableEntitiesValueConverterTest.xtend │ │ ├── formatting2 │ │ └── TextualMVDFormatterTest.xtend │ │ ├── ocl │ │ ├── ConceptTemplateTree2OCLTest.xtend │ │ ├── MVD2OCLGeneratorTest.xtend │ │ └── MvdToOclConverterTest.xtend │ │ ├── parsing │ │ └── TextualMVDParserTest.xtend │ │ └── scoping │ │ ├── TextualMVDIndexTest.xtend │ │ └── TextualMVDScopeProviderTest.xtend └── tmvd-files │ ├── DesignTransferView_V2-corrected.tmvd │ └── DoorHasSelfClosing.tmvd ├── org.buildingsmart.mvd.tmvd.ui ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── plugin.xml ├── plugin.xml_gen └── src │ └── org │ └── buildingsmart │ └── mvd │ └── tmvd │ └── ui │ ├── TextualMVDUiModule.java │ ├── contentassist │ └── TextualMVDProposalProvider.xtend │ ├── errormessages │ └── TextualMvdSyntaxErrorMessageProvider.xtend │ ├── hover │ ├── TextualMVDDocumentationProvider.xtend │ └── TextualMVDHoverProvider.xtend │ ├── labeling │ ├── TextualMVDDescriptionLabelProvider.xtend │ └── TextualMVDLabelProvider.xtend │ ├── outline │ └── TextualMVDOutlineTreeProvider.xtend │ └── quickfix │ └── TextualMVDQuickfixProvider.xtend ├── org.buildingsmart.mvd.tmvd ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── plugin.xml └── src │ └── org │ └── buildingsmart │ └── mvd │ └── tmvd │ ├── GenerateTextualMVD.mwe2 │ ├── TextualMVD.xtext │ ├── TextualMVDRuntimeModule.java │ ├── TextualMVDStandaloneSetup.java │ ├── analyzing │ ├── IfcModelChecker.xtend │ ├── MVDConstraint.xtend │ ├── MVDModelInfo.xtend │ └── MvdReport.xtend │ ├── converter │ ├── ApplicableEntitiesValueConverter.xtend │ ├── ApplicableSchemasValueConverter.xtend │ ├── ExtendedDefaultTerminalConverters.java │ ├── LanguageValueConverter.java │ ├── MvdNameValueConverter.java │ ├── NormalizedStringValueConverter.java │ └── UUIDValueConverter.java │ ├── formatting2 │ └── TextualMVDFormatter.xtend │ ├── generator │ ├── ConceptTemplateTree2OCL.xtend │ ├── MVD2OCLGenerator.xtend │ ├── MvdOutputConfigurationProvider.xtend │ └── TextualMVDGenerator.xtend │ ├── interpreter │ └── TextualMVDInterpreter.xtend │ ├── scoping │ ├── TextualMVDIndex.xtend │ └── TextualMVDScopeProvider.xtend │ ├── serializer │ ├── TextualMVDSemanticSequencer.xtend │ └── TextualMVDSyntacticSequencer.xtend │ ├── util │ ├── IOHelper.xtend │ ├── MvdXmlResourceHandler.xtend │ └── RulesTreePrinter.xtend │ └── validation │ └── TextualMVDValidator.xtend ├── org.buildingsmart.mvd ├── .classpath ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── META-INF │ └── MANIFEST.MF ├── build.properties ├── model │ ├── MvdXmlXML.xsd │ ├── MvdXmlXML.xsd2ecore │ ├── mvdXML.ecore │ └── mvdXML.genmodel ├── plugin.properties ├── plugin.xml ├── src-gen │ └── .gitignore └── src │ └── org │ └── buildingsmart │ └── mvd │ └── mvdxml │ ├── resource │ └── MvdXmlResourceHandler.java │ └── util │ └── IOHelper.java └── viatra.mvd.query.example ├── .classpath ├── .project ├── .settings ├── org.eclipse.core.resources.prefs ├── org.eclipse.jdt.core.prefs └── org.eclipse.pde.core.prefs ├── META-INF └── MANIFEST.MF ├── build.properties ├── plugin.xml └── src └── viatra └── mvd └── query └── example ├── Aggregate.vql ├── PropertySetsAndValues.vql └── QueryIfc.xtend /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | 3 | # Mobile Tools for Java (J2ME) 4 | .mtj.tmp/ 5 | 6 | # Package Files # 7 | *.jar 8 | *.war 9 | *.ear 10 | 11 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 12 | hs_err_pid* 13 | 14 | # Can ignore specific files 15 | .DS_Store 16 | 17 | # Use wildcards as well 18 | *~ 19 | *.metadata 20 | 21 | # Can also ignore all directories and files in a directory. 22 | .metadata/**/* 23 | 24 | # Ignore binaries built by IDE 25 | bin/**/* 26 | bin/ 27 | 28 | # ignore target directories generated by Maven/Tycho 29 | target/**/* 30 | target/ 31 | 32 | # ignore trace files 33 | *.java._trace 34 | 35 | # ignore log files 36 | *.log 37 | *.log.* 38 | 39 | # ignore generated files 40 | src-gen/**/* 41 | src-gen/ 42 | xtend-gen/**/* 43 | xtend-gen/ 44 | 45 | de.bitub.step.express/schemas/ 46 | de.bitub.step.p21/docs/ 47 | de.bitub.step.p21.antlr/src-gen/ 48 | org.buildingsmart.mvd.edit/src-gen/ 49 | org.buildingsmart.mvd.editor/src-gen/ 50 | org.buildingsmart.mvd.tests/ 51 | de.bitub.step.express.tests/csv/ 52 | de.bitub.step.express.tests/examples/ 53 | de.bitub.step.p21.test/logs/ 54 | org.buildingsmart.mvd.tmvd/xtend-gen/ 55 | org.buildingsmart.mvd.tmvd/src-gen/ 56 | org.buildingsmart.mvd.tmvd.ui/src-gen/ 57 | org.buildingsmart.mvd.tmvd.ui/xtend-gen/ 58 | org.buildingsmart.mvd.tmvd.tests/src-gen/ 59 | org.buildingsmart.mvd.tmvd.tests/xtend-gen/ 60 | de.bitub.step.express/src/de/bitub/step/generator/EXPRESSGenerator.xtend 61 | 62 | # Generated plugin configs 63 | *.xml_gen 64 | -------------------------------------------------------------------------------- /de.bitub.step-updatesite/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | de.bitub.step-updatesite 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.pde.UpdateSiteBuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.pde.UpdateSiteNature 16 | 17 | 18 | -------------------------------------------------------------------------------- /de.bitub.step-updatesite/category.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /de.bitub.step.build-resources/.gitignore: -------------------------------------------------------------------------------- 1 | /de.bitub.step-test.target 2 | -------------------------------------------------------------------------------- /de.bitub.step.build-resources/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | de.bitub.step.build-resources 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /de.bitub.step.express.sdk-feature/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | de.bitub.step.express.sdk-feature 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.pde.FeatureBuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.pde.FeatureNature 16 | 17 | 18 | -------------------------------------------------------------------------------- /de.bitub.step.express.sdk-feature/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes =feature.xml 2 | -------------------------------------------------------------------------------- /de.bitub.step.express.sdk-feature/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | de.bitub.step 7 | parent 8 | 0.1.0-SNAPSHOT 9 | ../de.bitub.step.build-resources/pom.xml 10 | 11 | 12 | de.bitub.step 13 | de.bitub.step.express.sdk.f 14 | eclipse-feature 15 | 16 | EXPRESS Grammar SDK Feature 17 | 18 | -------------------------------------------------------------------------------- /de.bitub.step.express.tests/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /de.bitub.step.express.tests/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore generated sources 2 | 3 | /generated/**/* 4 | /generated-sources/**/* 5 | /src-gen/**/* 6 | /xtend-gen/**/* -------------------------------------------------------------------------------- /de.bitub.step.express.tests/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | de.bitub.step.express.tests 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.xtext.ui.shared.xtextBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.ManifestBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.pde.SchemaBuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jdt.core.javanature 31 | org.eclipse.pde.PluginNature 32 | org.eclipse.xtext.ui.shared.xtextNature 33 | 34 | 35 | -------------------------------------------------------------------------------- /de.bitub.step.express.tests/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /de.bitub.step.express.tests/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /de.bitub.step.express.tests/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: de.bitub.step.express.tests 4 | Bundle-Vendor: bitub.de 5 | Bundle-Version: 1.0.0.qualifier 6 | Bundle-SymbolicName: de.bitub.step.express.tests; singleton:=true 7 | Bundle-ActivationPolicy: lazy 8 | Require-Bundle: org.eclipse.ui, 9 | de.bitub.step.express, 10 | de.bitub.step.express.ui, 11 | org.eclipse.core.runtime, 12 | org.eclipse.core.resources, 13 | org.objectweb.asm;resolution:=optional, 14 | org.eclipse.xtext.xbase.ui, 15 | org.eclipse.ui.workbench;resolution:=optional, 16 | org.eclipse.xtext.xbase.lib, 17 | org.eclipse.xtext.xbase.junit, 18 | org.eclipse.emf.ecore.xcore.ui, 19 | org.eclipse.emf.ecore.xcore.edit, 20 | org.eclipse.emf.ecore.xcore, 21 | com.google.guava, 22 | org.eclipse.xtend.lib, 23 | org.eclipse.xtend.lib.macro, 24 | org.eclipse.xtend, 25 | org.eclipse.xtext.junit4 26 | Import-Package: org.apache.log4j, 27 | org.hamcrest.core, 28 | org.junit, 29 | org.junit.runner;version="4.5.0", 30 | org.junit.runner.manipulation;version="4.5.0", 31 | org.junit.runner.notification;version="4.5.0", 32 | org.junit.runners;version="4.5.0", 33 | org.junit.runners.model;version="4.5.0" 34 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 35 | Export-Package: de.bitub.step.express.tests.xcoregen; uses:="de.bitub.step.express, org.eclipse.emf.ecore.resource, de.bitub.step.xcore, de.bitub.step.analyzing, org.eclipse.xtext.junit4.util", 36 | de.bitub.step 37 | -------------------------------------------------------------------------------- /de.bitub.step.express.tests/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/,\ 2 | src-gen/,\ 3 | xtend-gen/ 4 | bin.includes = META-INF/,\ 5 | . 6 | -------------------------------------------------------------------------------- /de.bitub.step.express.tests/src/de/bitub/step/express/tests/xcoregen/XcoreSimpleEntityWithAttributes.xtend: -------------------------------------------------------------------------------- 1 | package de.bitub.step.express.tests.xcoregen 2 | 3 | import de.bitub.step.EXPRESSInjectorProvider 4 | import org.eclipse.xtext.junit4.InjectWith 5 | import org.eclipse.xtext.junit4.XtextRunner 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | @RunWith(typeof(XtextRunner)) 10 | @InjectWith(typeof(EXPRESSInjectorProvider)) 11 | class XcoreSimpleEntityWithAttributes extends AbstractXcoreGeneratorTest { 12 | 13 | @Test 14 | def void testSimpleRelationship() { 15 | 16 | val model = 17 | ''' 18 | SCHEMA XcoreSimpleEntityWithAttributes; 19 | 20 | TYPE EnumA = ENUMERATION OF ( 21 | Value1, Value2); 22 | END_TYPE; 23 | 24 | TYPE Alias = STRING; 25 | END_TYPE; 26 | 27 | ENTITY ChildEntity; 28 | END_ENTITY; 29 | 30 | ENTITY Entity; 31 | State : EnumA; 32 | Label : Alias; 33 | Value : INTEGER; 34 | Field : LIST[0:?] OF INTEGER; 35 | Child : ChildEntity; 36 | DERIVE 37 | DState : EnumA := ?; 38 | DLabel : Alias := ?; 39 | DValue : INTEGER := ?; 40 | DField : LIST[0:?] OF INTEGER := ?; 41 | DChild : ChildEntity := ?; 42 | END_ENTITY; 43 | 44 | END_SCHEMA; 45 | ''' 46 | 47 | val xcore = generateXCore(model) 48 | validateXCore(xcore) 49 | } 50 | } -------------------------------------------------------------------------------- /de.bitub.step.express.tests/src/de/bitub/step/express/tests/xcoregen/XcoreSimpleRelationshipTest.xtend: -------------------------------------------------------------------------------- 1 | package de.bitub.step.express.tests.xcoregen 2 | 3 | import de.bitub.step.EXPRESSInjectorProvider 4 | import org.eclipse.xtext.junit4.InjectWith 5 | import org.eclipse.xtext.junit4.XtextRunner 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | @RunWith(typeof(XtextRunner)) 10 | @InjectWith(typeof(EXPRESSInjectorProvider)) 11 | class XcoreSimpleRelationshipTest extends AbstractXcoreGeneratorTest { 12 | 13 | @Test 14 | def void testSimpleRelationship() { 15 | 16 | val model = 17 | ''' 18 | SCHEMA XCoreSimpleInverseRelationsTest; 19 | 20 | ENTITY EntityA; 21 | RelationA : EntityB; 22 | END_ENTITY; 23 | 24 | ENTITY EntityB; 25 | RelationB : EntityA; 26 | END_ENTITY; 27 | 28 | ENTITY EntityC; 29 | INVERSE 30 | RelationC : EntityD FOR RelationD; 31 | END_ENTITY; 32 | 33 | ENTITY EntityD; 34 | RelationD : EntityC; 35 | END_ENTITY; 36 | 37 | ENTITY EntityE; 38 | INVERSE 39 | RelationE : SET [0:?] OF EntityF FOR RelationF; 40 | END_ENTITY; 41 | 42 | ENTITY EntityF; 43 | RelationF : EntityE; 44 | END_ENTITY; 45 | 46 | END_SCHEMA; 47 | ''' 48 | 49 | val xcore = generateXCore(model) 50 | validateXCore(xcore) 51 | } 52 | } -------------------------------------------------------------------------------- /de.bitub.step.express.tests/src/de/bitub/step/express/tests/xcoregen/XcoreSuperTypeTest.xtend: -------------------------------------------------------------------------------- 1 | package de.bitub.step.express.tests.xcoregen 2 | 3 | import de.bitub.step.EXPRESSInjectorProvider 4 | import org.eclipse.xtext.junit4.InjectWith 5 | import org.eclipse.xtext.junit4.XtextRunner 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | @RunWith(typeof(XtextRunner)) 10 | @InjectWith(typeof(EXPRESSInjectorProvider)) 11 | class XcoreSuperTypeTest extends AbstractXcoreGeneratorTest { 12 | 13 | @Test 14 | def void testXcoreSuperTypeTest() { 15 | 16 | val model = 17 | ''' 18 | SCHEMA XcoreSuperTypeTest; 19 | 20 | ENTITY EntityA 21 | SUPERTYPE OF (ONEOF (EntityB)); 22 | END_ENTITY; 23 | 24 | ENTITY EntityB 25 | SUBTYPE OF (EntityA); 26 | RelationB : EntityC; 27 | END_ENTITY; 28 | 29 | ENTITY EntityC; 30 | END_ENTITY; 31 | 32 | END_SCHEMA; 33 | ''' 34 | 35 | val xcore = generateXCore(model) 36 | validateXCore(xcore) 37 | } 38 | } -------------------------------------------------------------------------------- /de.bitub.step.express.ui/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /de.bitub.step.express.ui/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore generated sources 2 | 3 | /generated/**/* 4 | /generated-sources/**/* 5 | /src-gen/**/* 6 | /xtend-gen/**/* -------------------------------------------------------------------------------- /de.bitub.step.express.ui/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | de.bitub.step.express.ui 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.xtext.ui.shared.xtextBuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jdt.core.javanature 31 | org.eclipse.pde.PluginNature 32 | org.eclipse.xtext.ui.shared.xtextNature 33 | 34 | 35 | -------------------------------------------------------------------------------- /de.bitub.step.express.ui/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /de.bitub.step.express.ui/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /de.bitub.step.express.ui/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: de.bitub.step.express.ui 4 | Bundle-Vendor: bitub.de 5 | Bundle-Version: 0.1.0.qualifier 6 | Bundle-SymbolicName: de.bitub.step.express.ui; singleton:=true 7 | Bundle-ActivationPolicy: lazy 8 | Require-Bundle: de.bitub.step.express;visibility:=reexport, 9 | org.eclipse.xtext.ui, 10 | org.eclipse.ui.editors;bundle-version="3.5.0", 11 | org.eclipse.ui.ide;bundle-version="3.5.0", 12 | org.eclipse.xtext.ui.shared, 13 | org.eclipse.ui, 14 | org.eclipse.xtext.builder, 15 | org.eclipse.xtext.xbase.lib, 16 | org.antlr.runtime, 17 | org.eclipse.xtext.common.types.ui, 18 | org.eclipse.xtext.ui.codetemplates.ui, 19 | org.eclipse.compare, 20 | org.eclipse.emf.ecore.xcore.lib, 21 | org.eclipse.zest.core, 22 | org.eclipse.zest.layouts 23 | Import-Package: de.bitub.step.xcore, 24 | org.apache.log4j 25 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 26 | Export-Package: de.bitub.step.ui, 27 | de.bitub.step.ui.adapters, 28 | de.bitub.step.ui.commands, 29 | de.bitub.step.ui.contentassist, 30 | de.bitub.step.ui.contentassist.antlr, 31 | de.bitub.step.ui.internal, 32 | de.bitub.step.ui.labeling, 33 | de.bitub.step.ui.outline, 34 | de.bitub.step.ui.quickfix, 35 | de.bitub.step.ui.views, 36 | de.bitub.step.ui.contentassist.antlr.internal 37 | Bundle-Activator: de.bitub.step.ui.internal.EXPRESSActivator 38 | -------------------------------------------------------------------------------- /de.bitub.step.express.ui/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/,\ 2 | src-gen/,\ 3 | xtend-gen/ 4 | bin.includes = META-INF/,\ 5 | .,\ 6 | plugin.xml -------------------------------------------------------------------------------- /de.bitub.step.express.ui/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | de.bitub.step 8 | parent 9 | 0.1.0-SNAPSHOT 10 | ../de.bitub.step.build-resources/pom.xml 11 | 12 | 13 | de.bitub.step.express.ui 14 | eclipse-plugin 15 | 16 | EXPRESS Grammar UI Integration 17 | 18 | 19 | 20 | 21 | org.apache.maven.plugins 22 | maven-clean-plugin 23 | 24 | 25 | gen-clean 26 | clean 27 | 28 | 29 | 30 | 31 | org.eclipse.xtend 32 | xtend-maven-plugin 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /de.bitub.step.express.ui/src/de/bitub/step/ui/EXPRESSUiModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Bernold Kraft and others (Berlin, Germany). 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Bernold Kraft - initial implementation and initial documentation 10 | */ 11 | package de.bitub.step.ui; 12 | 13 | import org.eclipse.ui.plugin.AbstractUIPlugin; 14 | import org.eclipse.xtext.generator.IOutputConfigurationProvider; 15 | 16 | import com.google.inject.Binder; 17 | 18 | import de.bitub.step.xcore.XcoreOutputConfigurationProvider; 19 | 20 | /** 21 | * Use this class to register components to be used within the IDE. 22 | */ 23 | public class EXPRESSUiModule extends de.bitub.step.ui.AbstractEXPRESSUiModule 24 | { 25 | 26 | public EXPRESSUiModule(AbstractUIPlugin plugin) 27 | { 28 | super(plugin); 29 | } 30 | 31 | @Override 32 | public void configure(Binder binder) 33 | { 34 | super.configure(binder); 35 | 36 | binder.bind(IOutputConfigurationProvider.class).to(XcoreOutputConfigurationProvider.class); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /de.bitub.step.express.ui/src/de/bitub/step/ui/contentassist/EXPRESSProposalProvider.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Bernold Kraft and others (Berlin, Germany). 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Bernold Kraft - initial implementation and initial documentation 10 | */ 11 | 12 | package de.bitub.step.ui.contentassist 13 | 14 | import de.bitub.step.ui.contentassist.AbstractEXPRESSProposalProvider 15 | 16 | /** 17 | * see http://www.eclipse.org/Xtext/documentation.html#contentAssist on how to customize content assistant 18 | */ 19 | class EXPRESSProposalProvider extends AbstractEXPRESSProposalProvider { 20 | } 21 | -------------------------------------------------------------------------------- /de.bitub.step.express.ui/src/de/bitub/step/ui/labeling/EXPRESSDescriptionLabelProvider.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Bernold Kraft and others (Berlin, Germany). 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Bernold Kraft - initial implementation and initial documentation 10 | */ 11 | 12 | package de.bitub.step.ui.labeling 13 | 14 | //import org.eclipse.xtext.resource.IEObjectDescription 15 | 16 | /** 17 | * Provides labels for a IEObjectDescriptions and IResourceDescriptions. 18 | * 19 | * see http://www.eclipse.org/Xtext/documentation.html#labelProvider 20 | */ 21 | class EXPRESSDescriptionLabelProvider extends org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider { 22 | 23 | // Labels and icons can be computed like this: 24 | 25 | // override text(IEObjectDescription ele) { 26 | // ele.name.toString 27 | // } 28 | // 29 | // override image(IEObjectDescription ele) { 30 | // ele.EClass.name + '.gif' 31 | // } 32 | } 33 | -------------------------------------------------------------------------------- /de.bitub.step.express.ui/src/de/bitub/step/ui/labeling/EXPRESSLabelProvider.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Bernold Kraft and others (Berlin, Germany). 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Bernold Kraft - initial implementation and initial documentation 10 | */ 11 | 12 | package de.bitub.step.ui.labeling 13 | 14 | import com.google.inject.Inject 15 | import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider 16 | import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider 17 | 18 | /** 19 | * Provides labels for a EObjects. 20 | * 21 | * see http://www.eclipse.org/Xtext/documentation.html#labelProvider 22 | */ 23 | class EXPRESSLabelProvider extends DefaultEObjectLabelProvider { 24 | 25 | @Inject 26 | new(AdapterFactoryLabelProvider delegate) { 27 | super(delegate); 28 | } 29 | 30 | // Labels and icons can be computed like this: 31 | // def text(Entity entity) { 32 | // entity.name 33 | // } 34 | // 35 | // def image(Attribute attribute) { 36 | // } 37 | } 38 | -------------------------------------------------------------------------------- /de.bitub.step.express.ui/src/de/bitub/step/ui/quickfix/EXPRESSQuickfixProvider.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Bernold Kraft and others (Berlin, Germany). 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Bernold Kraft - initial implementation and initial documentation 10 | */ 11 | 12 | package de.bitub.step.ui.quickfix 13 | 14 | //import org.eclipse.xtext.ui.editor.quickfix.Fix 15 | //import org.eclipse.xtext.ui.editor.quickfix.IssueResolutionAcceptor 16 | //import org.eclipse.xtext.validation.Issue 17 | 18 | /** 19 | * Custom quickfixes. 20 | * 21 | * see http://www.eclipse.org/Xtext/documentation.html#quickfixes 22 | */ 23 | class EXPRESSQuickfixProvider extends org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider { 24 | 25 | // @Fix(MyDslValidator::INVALID_NAME) 26 | // def capitalizeName(Issue issue, IssueResolutionAcceptor acceptor) { 27 | // acceptor.accept(issue, 'Capitalize name', 'Capitalize the name.', 'upcase.png') [ 28 | // context | 29 | // val xtextDocument = context.xtextDocument 30 | // val firstLetter = xtextDocument.get(issue.offset, 1) 31 | // xtextDocument.replace(issue.offset, 1, firstLetter.toUpperCase) 32 | // ] 33 | // } 34 | } 35 | -------------------------------------------------------------------------------- /de.bitub.step.express/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /de.bitub.step.express/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore generated sources 2 | /generated/**/* 3 | /generated-sources/**/* 4 | /src-gen/**/* 5 | /xtend-gen/**/* -------------------------------------------------------------------------------- /de.bitub.step.express/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | de.bitub.step.express 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.xtext.ui.shared.xtextBuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jdt.core.javanature 31 | org.eclipse.pde.PluginNature 32 | org.eclipse.xtext.ui.shared.xtextNature 33 | 34 | 35 | -------------------------------------------------------------------------------- /de.bitub.step.express/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /de.bitub.step.express/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /de.bitub.step.express/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: de.bitub.step.express 4 | Bundle-Vendor: bitub.de 5 | Bundle-Version: 0.1.0.qualifier 6 | Bundle-SymbolicName: de.bitub.step.express; singleton:=true 7 | Bundle-ActivationPolicy: lazy 8 | Require-Bundle: org.eclipse.xtext;visibility:=reexport, 9 | org.eclipse.xtext.xbase;resolution:=optional;visibility:=reexport, 10 | org.eclipse.xtext.generator;resolution:=optional, 11 | org.eclipse.emf.codegen.ecore;resolution:=optional, 12 | org.eclipse.emf.mwe.utils;resolution:=optional, 13 | org.eclipse.emf.mwe2.launch;resolution:=optional, 14 | org.eclipse.xtext.util, 15 | org.eclipse.emf.ecore, 16 | org.eclipse.emf.common, 17 | org.eclipse.xtext.xbase.lib, 18 | org.antlr.runtime, 19 | org.eclipse.xtext.common.types, 20 | org.objectweb.asm;bundle-version="[5.0.1,6.0.0)";resolution:=optional, 21 | org.eclipse.core.resources;bundle-version="3.9.0", 22 | org.apache.log4j;bundle-version="1.2.15", 23 | org.eclipse.equinox.common;bundle-version="3.6.0", 24 | org.eclipse.emf.ecore.xcore, 25 | org.apache.commons.logging 26 | Import-Package: org.apache.log4j 27 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 28 | Export-Package: de.bitub.step, 29 | de.bitub.step.analyzing, 30 | de.bitub.step.express, 31 | de.bitub.step.express.impl, 32 | de.bitub.step.express.util, 33 | de.bitub.step.formatting, 34 | de.bitub.step.parser.antlr, 35 | de.bitub.step.parser.antlr.internal, 36 | de.bitub.step.scoping, 37 | de.bitub.step.serializer, 38 | de.bitub.step.services, 39 | de.bitub.step.util, 40 | de.bitub.step.validation, 41 | de.bitub.step.xcore 42 | -------------------------------------------------------------------------------- /de.bitub.step.express/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/,\ 2 | src-gen/,\ 3 | xtend-gen/ 4 | bin.includes = model/,\ 5 | META-INF/,\ 6 | .,\ 7 | plugin.xml -------------------------------------------------------------------------------- /de.bitub.step.express/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 16 | 17 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /de.bitub.step.express/plugin.xml_gen: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /de.bitub.step.express/src-gen/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore -------------------------------------------------------------------------------- /de.bitub.step.express/src/de/bitub/step/EXPRESSRuntimeModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015,2016 Bernold Kraft and others (Berlin, Germany). 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Bernold Kraft - initial implementation and initial documentation 10 | */ 11 | 12 | package de.bitub.step; 13 | 14 | import org.eclipse.xtext.generator.IGenerator; 15 | 16 | import de.bitub.step.xcore.XcoreGenerator; 17 | 18 | /** 19 | * Use this class to register components to be used at runtime / without the 20 | * Equinox extension registry. 21 | * This is the DI Configuration Module for the internally used Google Guice. 22 | */ 23 | public class EXPRESSRuntimeModule extends AbstractEXPRESSRuntimeModule 24 | { 25 | 26 | /** 27 | * Overwrite DI bindings from EXPRESSgenerator to Xcoregenerator. 28 | */ 29 | public Class bindIGenerator() 30 | { 31 | return XcoreGenerator.class; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /de.bitub.step.express/src/de/bitub/step/EXPRESSStandaloneSetup.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Bernold Kraft and others (Berlin, Germany). 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Bernold Kraft - initial implementation and initial documentation 10 | */ 11 | 12 | package de.bitub.step; 13 | 14 | /** 15 | * Initialization support for running Xtext languages 16 | * without equinox extension registry 17 | */ 18 | public class EXPRESSStandaloneSetup extends EXPRESSStandaloneSetupGenerated{ 19 | 20 | public static void doSetup() { 21 | new EXPRESSStandaloneSetup().createInjectorAndDoEMFRegistration(); 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /de.bitub.step.express/src/de/bitub/step/formatting/EXPRESSFormatter.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Bernold Kraft and others (Berlin, Germany). 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Bernold Kraft - initial implementation and initial documentation 10 | */ 11 | 12 | package de.bitub.step.formatting 13 | 14 | import org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter 15 | import org.eclipse.xtext.formatting.impl.FormattingConfig 16 | // import com.google.inject.Inject; 17 | // import de.bitub.step.services.EXPRESSGrammarAccess 18 | 19 | /** 20 | * This class contains custom formatting description. 21 | * 22 | * see : http://www.eclipse.org/Xtext/documentation.html#formatting 23 | * on how and when to use it 24 | * 25 | * Also see {@link org.eclipse.xtext.xtext.XtextFormattingTokenSerializer} as an example 26 | */ 27 | class EXPRESSFormatter extends AbstractDeclarativeFormatter { 28 | 29 | // @Inject extension EXPRESSGrammarAccess 30 | 31 | override protected void configureFormatting(FormattingConfig c) { 32 | // It's usually a good idea to activate the following three statements. 33 | // They will add and preserve newlines around comments 34 | // c.setLinewrap(0, 1, 2).before(SL_COMMENTRule) 35 | // c.setLinewrap(0, 1, 2).before(ML_COMMENTRule) 36 | // c.setLinewrap(0, 1, 1).after(ML_COMMENTRule) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /de.bitub.step.express/src/de/bitub/step/generator/EXPRESSGenerator.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 3 | */ 4 | package de.bitub.step.generator 5 | 6 | import org.eclipse.emf.ecore.resource.Resource 7 | import org.eclipse.xtext.generator.IGenerator 8 | import org.eclipse.xtext.generator.IFileSystemAccess 9 | 10 | /** 11 | * Generates code from your model files on save. 12 | * 13 | * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation 14 | */ 15 | class EXPRESSGenerator implements IGenerator { 16 | 17 | override void doGenerate(Resource resource, IFileSystemAccess fsa) { 18 | // fsa.generateFile('greetings.txt', 'People to greet: ' + 19 | // resource.allContents 20 | // .filter(typeof(Greeting)) 21 | // .map[name] 22 | // .join(', ')) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /de.bitub.step.express/src/de/bitub/step/validation/EXPRESSValidator.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Bernold Kraft and others (Berlin, Germany). 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Bernold Kraft - initial implementation and initial documentation 10 | * Sebastian Riemschüssel - simple entity name checks 11 | */ 12 | package de.bitub.step.validation 13 | 14 | import org.eclipse.xtext.validation.Check 15 | import de.bitub.step.express.Entity 16 | import de.bitub.step.express.ExpressPackage 17 | 18 | /** 19 | * Custom validation rules. 20 | * 21 | * see http://www.eclipse.org/Xtext/documentation.html#validation 22 | */ 23 | class EXPRESSValidator extends AbstractEXPRESSValidator { 24 | 25 | public static val INVALID_NAME = 'invalidName' 26 | 27 | @Check 28 | def checkEntityStartsWithCapital(Entity entity) { 29 | 30 | if (!Character.isUpperCase(entity.name.charAt(0))) { 31 | warning('Name should start with a capital', ExpressPackage.Literals.EXPRESS_CONCEPT__NAME, INVALID_NAME) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /de.bitub.step.express/src/de/bitub/step/xcore/.gitignore: -------------------------------------------------------------------------------- 1 | /EXPRESSGenerator.xtend 2 | -------------------------------------------------------------------------------- /de.bitub.step.express/src/de/bitub/step/xcore/XcoreBasePartitionDelegate.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Bernold Kraft and others (Berlin, Germany). 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Bernold Kraft, Sebastian Riemschüssel - initial implementation and initial documentation 10 | */ 11 | package de.bitub.step.xcore 12 | 13 | import de.bitub.step.express.ExpressConcept 14 | import java.util.Optional 15 | import org.eclipse.xtext.naming.QualifiedName 16 | 17 | class XcoreBasePartitionDelegate implements XcorePartitioningDelegate { 18 | 19 | val XcorePackageDescriptor baseDescriptor 20 | var XcoreInfo info 21 | 22 | new(String declaredName, QualifiedName packageQn, String namespaceUri) { 23 | 24 | baseDescriptor = new XcorePackageDescriptor() { 25 | 26 | override getNsURI() { 27 | namespaceUri 28 | } 29 | 30 | override getName() { 31 | declaredName 32 | } 33 | 34 | override getBasePackage() { 35 | packageQn 36 | } 37 | } 38 | } 39 | 40 | 41 | override apply(ExpressConcept t) { 42 | 43 | Optional.of(baseDescriptor) 44 | } 45 | 46 | override setSchemeInfo(XcoreInfo info) { 47 | 48 | this.info = info 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /de.bitub.step.express/src/de/bitub/step/xcore/XcoreDefaultPartitionDelegate.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Bernold Kraft and others (Berlin, Germany). 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Bernold Kraft, Sebastian Riemschüssel - initial implementation and initial documentation 10 | */ 11 | package de.bitub.step.xcore 12 | 13 | import de.bitub.step.express.ExpressConcept 14 | import java.util.Optional 15 | 16 | /** 17 | * This partition delegate will add all concepts into a single (default) namespace. 18 | */ 19 | class XcoreDefaultPartitionDelegate implements XcorePartitioningDelegate { 20 | 21 | 22 | override apply(ExpressConcept t) { 23 | 24 | Optional.empty 25 | } 26 | 27 | override setSchemeInfo(XcoreInfo info) { 28 | 29 | 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /de.bitub.step.express/src/de/bitub/step/xcore/XcoreGenericSubPackageDescriptor.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Bernold Kraft and others (Berlin, Germany). 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Bernold Kraft, Sebastian Riemschüssel - initial implementation and initial documentation 10 | */ 11 | package de.bitub.step.xcore 12 | 13 | class XcoreGenericSubPackageDescriptor implements XcorePackageDescriptor { 14 | 15 | val String packageName 16 | 17 | val XcorePackageDescriptor base; 18 | 19 | new(XcorePackageDescriptor baseDescriptor, String packageName) { 20 | 21 | this.packageName = packageName 22 | this.base = baseDescriptor 23 | } 24 | 25 | 26 | override getNsURI() { 27 | 28 | if(packageName.trim.length > 0) { 29 | base.nsURI +"/"+ packageName.toFirstLower 30 | } else { 31 | base.nsURI 32 | } 33 | } 34 | 35 | override getName() { 36 | 37 | if(packageName.trim.length > 0) { 38 | base.name + packageName.toFirstUpper 39 | } else { 40 | base.name 41 | } 42 | } 43 | 44 | override getBasePackage() { 45 | 46 | if(packageName.trim.length > 0) { 47 | base.basePackage.append(packageName.toLowerCase) 48 | } else { 49 | base.basePackage 50 | } 51 | } 52 | 53 | } -------------------------------------------------------------------------------- /de.bitub.step.express/src/de/bitub/step/xcore/XcoreOutputConfigurationProvider.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015,2016 Bernold Kraft and others (Berlin, Germany). 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Bernold Kraft, Sebastian Riemschüssel - initial implementation and initial documentation 10 | */ 11 | package de.bitub.step.xcore 12 | 13 | import org.eclipse.xtext.generator.IOutputConfigurationProvider 14 | import org.eclipse.xtext.generator.IFileSystemAccess 15 | import org.eclipse.xtext.generator.OutputConfiguration 16 | 17 | class XcoreOutputConfigurationProvider implements IOutputConfigurationProvider { 18 | 19 | override getOutputConfigurations() { 20 | 21 | var defaultOutput = new OutputConfiguration(IFileSystemAccess.DEFAULT_OUTPUT); 22 | defaultOutput.setDescription("Output Folder"); 23 | defaultOutput.setOutputDirectory("./model-gen"); 24 | defaultOutput.setOverrideExistingResources(true); 25 | defaultOutput.setCreateOutputDirectory(true); 26 | defaultOutput.setCleanUpDerivedResources(true); 27 | defaultOutput.setSetDerivedProperty(true); 28 | 29 | return newHashSet(defaultOutput); 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /de.bitub.step.express/src/de/bitub/step/xcore/XcorePackageDescriptor.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015,2016 Bernold Kraft and others (Berlin, Germany). 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Bernold Kraft, Sebastian Riemschüssel - initial implementation and initial documentation 10 | */ 11 | package de.bitub.step.xcore 12 | 13 | import org.eclipse.xtext.naming.QualifiedName 14 | 15 | interface XcorePackageDescriptor { 16 | 17 | def String getNsURI() 18 | 19 | def String getName() 20 | 21 | def QualifiedName getBasePackage() 22 | } -------------------------------------------------------------------------------- /de.bitub.step.express/src/de/bitub/step/xcore/XcorePartitioningDelegate.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.xcore; 2 | 3 | import java.util.Optional; 4 | import java.util.function.Function; 5 | 6 | import de.bitub.step.express.ExpressConcept; 7 | 8 | public interface XcorePartitioningDelegate extends Function> { 9 | 10 | void setSchemeInfo(XcoreInfo info); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /de.bitub.step.p21.antlr/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /de.bitub.step.p21.antlr/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | de.bitub.step.p21.antlr 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.xtext.ui.shared.xtextBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.ManifestBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.pde.SchemaBuilder 25 | 26 | 27 | 28 | 29 | org.eclipse.m2e.core.maven2Builder 30 | 31 | 32 | 33 | 34 | 35 | org.eclipse.m2e.core.maven2Nature 36 | org.eclipse.pde.PluginNature 37 | org.eclipse.jdt.core.javanature 38 | org.eclipse.xtext.ui.shared.xtextNature 39 | 40 | 41 | -------------------------------------------------------------------------------- /de.bitub.step.p21.antlr/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /de.bitub.step.p21.antlr/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /de.bitub.step.p21.antlr/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /de.bitub.step.p21.antlr/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: STEP P21 ANTLR4 Parser 4 | Bundle-SymbolicName: de.bitub.step.p21.antlr;singleton:=true 5 | Bundle-Version: 0.1.0.qualifier 6 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 7 | Require-Bundle: org.antlr.antlr4-runtime-osgi;bundle-version="4.5.0", 8 | org.openifctools.stringconverter;bundle-version="1.0.0" 9 | Export-Package: de.bitub.step.p21;uses:="org.antlr.v4.runtime,org.antlr.v4.runtime.tree,org.antlr.v4.runtime.atn" 10 | Bundle-ActivationPolicy: lazy 11 | -------------------------------------------------------------------------------- /de.bitub.step.p21.antlr/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/,\ 2 | src-gen/ 3 | output.. = bin/ 4 | bin.includes = META-INF/,\ 5 | .,\ 6 | src-gen/ 7 | src.includes = src/,\ 8 | src-gen/ 9 | -------------------------------------------------------------------------------- /de.bitub.step.p21.antlr/src/main/antlr4/de/bitub/step/p21/string/StringParser.g4: -------------------------------------------------------------------------------- 1 | parser grammar StringParser; 2 | 3 | options { 4 | tokenVocab = StringLexer; 5 | } 6 | 7 | string 8 | : 9 | L_APOSTROPHE 10 | ( 11 | NON_Q_CHAR 12 | | APOSTROPHE APOSTROPHE 13 | | REVERSE_SOLIDUS REVERSE_SOLIDUS 14 | | controlDirectives 15 | )* R_APOSTROPHE 16 | ; 17 | 18 | controlDirectives 19 | : 20 | ( 21 | PAGE 22 | | ALPHABET 23 | | EXTENDED2 24 | | EXTENDED4 25 | | ARBITARY 26 | ) 27 | ; 28 | -------------------------------------------------------------------------------- /de.bitub.step.p21.antlr/src/main/antlr4/imports/BasicAlphabet.g4: -------------------------------------------------------------------------------- 1 | lexer grammar BasicAlphabet; 2 | 3 | fragment 4 | SPACE 5 | : 6 | ' ' 7 | ; 8 | 9 | fragment 10 | DIGIT 11 | : 12 | ( 13 | '0' .. '9' 14 | ) 15 | ; 16 | 17 | fragment 18 | LOWER 19 | : 20 | ( 21 | 'a' .. 'z' 22 | ) 23 | ; 24 | 25 | fragment 26 | UPPER 27 | : 28 | ( 29 | 'A' .. 'Z' 30 | | '_' 31 | ) 32 | ; 33 | 34 | fragment 35 | SPECIAL 36 | : 37 | ( 38 | '!' 39 | | '""' 40 | | '*' 41 | | '$' 42 | | '%' 43 | | '&' 44 | | '.' 45 | | '#' 46 | | '+' 47 | | ',' 48 | | '-' 49 | | '(' 50 | | ')' 51 | | '?' 52 | | '/' 53 | | ':' 54 | | ';' 55 | | '<' 56 | | '=' 57 | | '>' 58 | | '@' 59 | | '[' 60 | | ']' 61 | | '{' 62 | | '|' 63 | | '}' 64 | | '^' 65 | | '`' 66 | | '~' 67 | ) 68 | ; 69 | 70 | fragment 71 | REVERSE_SOLIDUS 72 | : 73 | '\\' 74 | ; 75 | 76 | fragment 77 | APOSTROPHE 78 | : 79 | '\'' 80 | ; 81 | 82 | fragment 83 | CHARACTER 84 | : 85 | ( 86 | SPACE 87 | | DIGIT 88 | | LOWER 89 | | UPPER 90 | | SPECIAL 91 | | REVERSE_SOLIDUS 92 | | APOSTROPHE 93 | ) 94 | ; -------------------------------------------------------------------------------- /de.bitub.step.p21.antlr/src/main/antlr4/imports/StepLexer.g4: -------------------------------------------------------------------------------- 1 | lexer grammar StepLexer; 2 | 3 | import Tokens; 4 | 5 | @header { 6 | import java.util.*; 7 | 8 | import openifctools.com.openifcjavatoolbox.stringconverter.StringConverter; 9 | import java.nio.charset.CharacterCodingException; 10 | } 11 | 12 | tokens { 13 | FILE_DESCRIPTION, 14 | FILE_SCHEMA 15 | } 16 | 17 | @members { 18 | Map keywords = new HashMap() {{ 19 | put("FILE_DESCRIPTION", StepParser.FILE_DESCRIPTION); 20 | put("FILE_SCHEMA", StepParser.FILE_SCHEMA); 21 | }}; 22 | } 23 | 24 | /** 25 | * Seperators 26 | */ 27 | ISO21 28 | : 29 | 'ISO-10303-21;' 30 | ; 31 | 32 | ENDISO21 33 | : 34 | 'END-ISO-10303-21;' 35 | ; 36 | 37 | HEADER 38 | : 39 | 'HEADER;' 40 | ; 41 | 42 | DATA 43 | : 44 | 'DATA' 45 | ; 46 | 47 | ENDSEC 48 | : 49 | 'ENDSEC;' 50 | ; 51 | 52 | /** 53 | * Punctuation 54 | */ 55 | SEMICOLON 56 | : 57 | ';' 58 | ; 59 | 60 | LPAREN 61 | : 62 | '(' 63 | ; 64 | 65 | RPAREN 66 | : 67 | ')' 68 | ; 69 | 70 | COMMA 71 | : 72 | ',' 73 | ; 74 | 75 | SOLIDUS 76 | : 77 | '//' 78 | ; 79 | 80 | HASH 81 | : 82 | '#' 83 | ; 84 | 85 | EQUAL 86 | : 87 | '=' 88 | ; 89 | 90 | NOT 91 | : 92 | '!' 93 | ; 94 | 95 | /** 96 | * Special values 97 | */ 98 | OMITTED 99 | : 100 | '$' 101 | ; 102 | 103 | DERIVED 104 | : 105 | '*' 106 | ; 107 | 108 | NL 109 | : 110 | '\r'? '\n' -> skip 111 | ; 112 | 113 | COMMENT 114 | : 115 | ( 116 | '//' ~( '\n' | '\r' )* '\r'? '\n' 117 | | '/*' 118 | ) .*? '*/' -> skip 119 | ; 120 | 121 | WS 122 | : 123 | [ \t\f]+ -> skip 124 | ; 125 | -------------------------------------------------------------------------------- /de.bitub.step.p21.f/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | de.bitub.step.p21.f 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.pde.FeatureBuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.pde.FeatureNature 16 | 17 | 18 | -------------------------------------------------------------------------------- /de.bitub.step.p21.f/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = feature.xml 2 | -------------------------------------------------------------------------------- /de.bitub.step.p21.f/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | 6 | de.bitub.step 7 | parent 8 | 0.1.0-SNAPSHOT 9 | ../de.bitub.step.build-resources/pom.xml 10 | 11 | 12 | de.bitub.step 13 | de.bitub.step.p21.f 14 | eclipse-feature 15 | 16 | STEP P21 Parser Feature 17 | 18 | -------------------------------------------------------------------------------- /de.bitub.step.p21.test/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /de.bitub.step.p21.test/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | de.bitub.step.p21.test 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.pde.PluginNature 26 | org.eclipse.jdt.core.javanature 27 | 28 | 29 | -------------------------------------------------------------------------------- /de.bitub.step.p21.test/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /de.bitub.step.p21.test/.settings/org.eclipse.pde.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | pluginProject.extensions=false 3 | resolve.requirebundle=false 4 | -------------------------------------------------------------------------------- /de.bitub.step.p21.test/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: P21 Parser Tests 4 | Bundle-SymbolicName: de.bitub.step.p21.test 5 | Bundle-Version: 0.1.0.qualifier 6 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 7 | Require-Bundle: org.junit;bundle-version="4.12.0", 8 | org.junit.source;bundle-version="4.12.0", 9 | com.google.inject, 10 | org.buildingsmart.ifc4, 11 | de.bitub.step.p21 12 | Import-Package: de.bitub.step.p21, 13 | de.bitub.step.p21.di, 14 | de.bitub.step.p21.parser, 15 | de.bitub.step.p21.parser.util 16 | -------------------------------------------------------------------------------- /de.bitub.step.p21.test/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/ 2 | output.. = bin/ 3 | bin.includes = META-INF/,\ 4 | . 5 | -------------------------------------------------------------------------------- /de.bitub.step.p21.test/ifc-files/ifc4/P21InverseRelationshipTest.ifc: -------------------------------------------------------------------------------- 1 | ISO-10303-21; 2 | HEADER; 3 | FILE_DESCRIPTION((''),'2;1'); 4 | FILE_NAME('','2015-07-10T21:12:02',('Jon'),('Unknown'),'','','None'); 5 | FILE_SCHEMA (('IFC4')); 6 | ENDSEC; 7 | 8 | DATA; 9 | #1= IFCWALLSTANDARDCASE('0DWgwt6o1FOx7466fPk$jl',$,$,$,$,$,$,$,$); 10 | #2= IFCPROJECTIONELEMENT('39t4Pu3nTC4ekXYRIHJB9W$jl',$,$,$,$,$,$,$,$); 11 | #4= IFCRELPROJECTSELEMENT('36U74BIPDD89cYkx9bkV$Y',$,'Project Element Name','Project Element Desc',#1,#2); 12 | ENDSEC; 13 | 14 | END-ISO-10303-21; 15 | 16 | 1 -------------------------------------------------------------------------------- /de.bitub.step.p21.test/src/de/bitub/step/p21/test/AbstractP21TestHelper.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.test; 2 | 3 | import org.buildingsmart.ifc4.IFC4; 4 | import org.buildingsmart.ifc4.Ifc4Package; 5 | import org.eclipse.emf.common.util.URI; 6 | 7 | import de.bitub.step.p21.util.IOHelper; 8 | 9 | public class AbstractP21TestHelper 10 | { 11 | 12 | protected final Ifc4Package ifc4Package = Ifc4Package.eINSTANCE; 13 | 14 | // base path to ifc4 test files 15 | // 16 | protected static final String BASE_PATH = "ifc-files/ifc4/"; 17 | 18 | /** 19 | * Helper method for laoding IFC4 container from given file in test folder. 20 | * 21 | * @param fileName 22 | * @return 23 | */ 24 | protected IFC4 load(String fileName) 25 | { 26 | return (IFC4) IOHelper.load(URI.createFileURI(BASE_PATH + fileName), Ifc4Package.eINSTANCE); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /de.bitub.step.p21.test/src/de/bitub/step/p21/test/AllTests.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.test; 2 | 3 | import org.junit.runner.RunWith; 4 | import org.junit.runners.Suite; 5 | import org.junit.runners.Suite.SuiteClasses; 6 | 7 | @RunWith(Suite.class) 8 | @SuiteClasses({ P21EntityListenerTest.class, IndexUtilTest.class, P21ParserPrimitivesTest.class, 9 | P21ParserResolveReferencesTest.class }) 10 | public class AllTests 11 | { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /de.bitub.step.p21.test/src/de/bitub/step/p21/test/P21InverseRelationshipTest.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.test; 2 | 3 | import org.buildingsmart.ifc4.IFC4; 4 | import org.buildingsmart.ifc4.IfcProjectionElement; 5 | import org.buildingsmart.ifc4.IfcRelProjectsElement; 6 | import org.buildingsmart.ifc4.IfcWallStandardCase; 7 | import org.junit.Assert; 8 | import org.junit.Test; 9 | 10 | public class P21InverseRelationshipTest extends AbstractP21TestHelper 11 | { 12 | private IFC4 ifc4 = load("P21InverseRelationshipTest.ifc"); 13 | 14 | @Test 15 | public void p21InverseRelationshipTest() 16 | { 17 | Assert.assertEquals(1, ifc4.getIfcWallStandardCase().size()); 18 | Assert.assertEquals(1, ifc4.getIfcRelProjectsElement().size()); 19 | Assert.assertEquals(1, ifc4.getIfcProjectionElement().size()); 20 | 21 | IfcWallStandardCase wall = ifc4.getIfcWallStandardCase().get(0); 22 | IfcProjectionElement projectionElement = ifc4.getIfcProjectionElement().get(0); 23 | IfcRelProjectsElement relProjectsElement = ifc4.getIfcRelProjectsElement().get(0); 24 | 25 | Assert.assertEquals("0DWgwt6o1FOx7466fPk$jl", wall.getGlobalId()); 26 | Assert.assertEquals("39t4Pu3nTC4ekXYRIHJB9W$jl", projectionElement.getGlobalId()); 27 | Assert.assertEquals("36U74BIPDD89cYkx9bkV$Y", relProjectsElement.getGlobalId()); 28 | Assert.assertEquals("Project Element Name", relProjectsElement.getName()); 29 | Assert.assertEquals("Project Element Desc", relProjectsElement.getDescription()); 30 | 31 | Assert.assertEquals(relProjectsElement.getRelatedFeatureElement(), projectionElement); 32 | Assert.assertEquals(projectionElement.getProjectsElements(), relProjectsElement); 33 | 34 | Assert.assertEquals(relProjectsElement.getRelatingElement(), wall); 35 | Assert.assertEquals(1, wall.getHasProjections().size()); 36 | Assert.assertEquals(wall.getHasProjections().get(0), relProjectsElement); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /de.bitub.step.p21.test/src/de/bitub/step/p21/test/P21ParserResolveReferencesTest.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.test; 2 | 3 | import org.junit.Test; 4 | 5 | public class P21ParserResolveReferencesTest 6 | { 7 | 8 | @Test 9 | public void test() 10 | { 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /de.bitub.step.p21.test/src/de/bitub/step/p21/test/P21TestSuite.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.test; 2 | 3 | import org.junit.runner.RunWith; 4 | import org.junit.runners.Suite; 5 | import org.junit.runners.Suite.SuiteClasses; 6 | 7 | @RunWith(Suite.class) 8 | @SuiteClasses({ Ifc4WallTest.class, Ifc4BasinAdvancedBrepTest.class, XPressModelTest.class, P21InverseRelationshipTest.class }) 9 | public class P21TestSuite 10 | { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /de.bitub.step.p21.test/src/de/bitub/step/p21/test/XPressModelTest.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.test; 2 | 3 | import org.buildingsmart.ifc4.Ifc4Package; 4 | import org.eclipse.emf.ecore.EClass; 5 | import org.junit.Assert; 6 | import org.junit.Test; 7 | 8 | import de.bitub.step.p21.XPressModel; 9 | 10 | public class XPressModelTest extends AbstractP21TestHelper 11 | { 12 | @Test 13 | public void testIsProxy() 14 | { 15 | EClass proxy = Ifc4Package.eINSTANCE.getIfcClassificationReference(); 16 | 17 | Assert.assertEquals(true, XPressModel.isDelegate(proxy.getEStructuralFeature("classificationRefForObjects"))); 18 | Assert.assertEquals(false, XPressModel.isDelegate(proxy.getEStructuralFeature("description"))); 19 | } 20 | 21 | @Test 22 | public void testIsSelectProxy() 23 | { 24 | EClass selectProxy = Ifc4Package.eINSTANCE.getIfcMetric(); 25 | Assert.assertEquals(true, XPressModel.isSelectProxy(selectProxy.getEStructuralFeature("hasExternalReferences"))); 26 | Assert.assertEquals(false, XPressModel.isSelectProxy(selectProxy.getEStructuralFeature("propertiesForConstraint"))); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /de.bitub.step.p21.ui/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /de.bitub.step.p21.ui/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | de.bitub.step.p21.ui 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.pde.PluginNature 26 | org.eclipse.jdt.core.javanature 27 | 28 | 29 | -------------------------------------------------------------------------------- /de.bitub.step.p21.ui/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /de.bitub.step.p21.ui/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: P21 File Viewer 4 | Bundle-SymbolicName: de.bitub.step.p21.ui;singleton:=true 5 | Bundle-Version: 1.0.0.qualifier 6 | Require-Bundle: org.eclipse.jface.text, 7 | org.eclipse.core.resources, 8 | org.eclipse.ui, 9 | org.eclipse.ui.editors, 10 | org.eclipse.ui.ide, 11 | org.eclipse.core.runtime, 12 | org.eclipse.emf.ecore.editor;bundle-version="2.11.0" 13 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 14 | -------------------------------------------------------------------------------- /de.bitub.step.p21.ui/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/ 2 | output.. = bin/ 3 | bin.includes = plugin.xml,\ 4 | META-INF/,\ 5 | .,\ 6 | icons/ 7 | -------------------------------------------------------------------------------- /de.bitub.step.p21.ui/icons/sample.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/de.bitub.step.p21.ui/icons/sample.gif -------------------------------------------------------------------------------- /de.bitub.step.p21.ui/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /de.bitub.step.p21.ui/src/de/bitub/step/p21/ui/editors/P21MultiPageEditor.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.ui.editors; 2 | 3 | import org.eclipse.emf.ecore.presentation.EcoreEditor; 4 | import org.eclipse.ui.PartInitException; 5 | import org.eclipse.ui.editors.text.TextEditor; 6 | 7 | public class P21MultiPageEditor extends EcoreEditor 8 | { 9 | TextEditor editor = null; 10 | 11 | public P21MultiPageEditor() 12 | { 13 | super(); 14 | } 15 | 16 | @Override 17 | public void createPages() 18 | { 19 | super.createPages(); 20 | addP21Viewer(); 21 | } 22 | 23 | void addP21Viewer() 24 | { 25 | // Composite composite = new Composite(getContainer(), SWT.NONE); 26 | try { 27 | editor = new P21SourceEditor(); 28 | int index = addPage(editor, getEditorInput()); 29 | setPageText(index, editor.getTitle()); 30 | } 31 | catch (PartInitException e) { 32 | e.printStackTrace(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /de.bitub.step.p21.ui/src/de/bitub/step/p21/ui/editors/P21SourceEditor.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.ui.editors; 2 | 3 | import org.eclipse.ui.editors.text.TextEditor; 4 | 5 | public class P21SourceEditor extends TextEditor 6 | { 7 | 8 | @Override 9 | protected void initializeEditor() 10 | { 11 | super.initializeEditor(); 12 | setSourceViewerConfiguration(new P21SourceViewerConfiguration()); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /de.bitub.step.p21/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /de.bitub.step.p21/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore generated sources 2 | 3 | /generated/ 4 | /generated-sources/ 5 | /target/ 6 | /src-gen/ 7 | 8 | # Ignore documentation folder 9 | /docs/ 10 | -------------------------------------------------------------------------------- /de.bitub.step.p21/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | de.bitub.step.p21 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.m2e.core.maven2Builder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.m2e.core.maven2Nature 31 | org.eclipse.pde.PluginNature 32 | org.eclipse.jdt.core.javanature 33 | 34 | 35 | -------------------------------------------------------------------------------- /de.bitub.step.p21/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /de.bitub.step.p21/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /de.bitub.step.p21/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /de.bitub.step.p21/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: Step P21 IO 4 | Bundle-SymbolicName: de.bitub.step.p21;singleton:=true 5 | Bundle-Version: 0.1.0.qualifier 6 | Bundle-Vendor: bitub.de 7 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 8 | Require-Bundle: de.bitub.step.p21.antlr;bundle-version="0.1.0", 9 | org.antlr.antlr4-runtime-osgi;bundle-version="4.5.0", 10 | org.eclipse.emf.ecore, 11 | org.eclipse.emf.ecore.xmi, 12 | com.google.guava;bundle-version="15.0.0", 13 | com.google.inject;bundle-version="3.0.0", 14 | javax.inject;bundle-version="1.0.0", 15 | org.buildingsmart.ifc4;bundle-version="0.3.1" 16 | Export-Package: de.bitub.step.p21;uses:="org.eclipse.emf.ecore,org.eclipse.emf.common.util", 17 | de.bitub.step.p21.concurrrent;uses:="org.eclipse.emf.ecore,de.bitub.step.p21.parser", 18 | de.bitub.step.p21.di;uses:="org.eclipse.emf.ecore,com.google.inject,de.bitub.step.p21.parser", 19 | de.bitub.step.p21.mapper;uses:="org.eclipse.emf.ecore,org.eclipse.emf.common.util", 20 | de.bitub.step.p21.parser; 21 | uses:="org.eclipse.emf.ecore, 22 | de.bitub.step.p21, 23 | de.bitub.step.p21.mapper, 24 | de.bitub.step.p21.parser.util, 25 | de.bitub.step.p21.di", 26 | de.bitub.step.p21.parser.util;uses:="org.antlr.v4.runtime", 27 | de.bitub.step.p21.persistence; 28 | uses:="org.eclipse.emf.ecore, 29 | org.eclipse.emf.common.util, 30 | org.eclipse.emf.ecore.resource.impl, 31 | org.eclipse.emf.ecore.resource", 32 | de.bitub.step.p21.util;uses:="org.eclipse.emf.ecore,org.eclipse.emf.common.util" 33 | Bundle-ActivationPolicy: lazy 34 | -------------------------------------------------------------------------------- /de.bitub.step.p21/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/ 2 | bin.includes = META-INF/,\ 3 | .,\ 4 | plugin.xml 5 | -------------------------------------------------------------------------------- /de.bitub.step.p21/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /de.bitub.step.p21/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | de.bitub.step 8 | parent 9 | 0.1.0-SNAPSHOT 10 | ../de.bitub.step.build-resources/pom.xml 11 | 12 | 13 | de.bitub.step.p21 14 | eclipse-plugin 15 | STEP Parser Implementation 16 | 17 | -------------------------------------------------------------------------------- /de.bitub.step.p21/src/de/bitub/step/p21/AllP21Entities.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21; 2 | 3 | import java.util.Collection; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | import org.eclipse.emf.ecore.EObject; 8 | import org.eclipse.emf.ecore.EStructuralFeature; 9 | 10 | import de.bitub.step.p21.AllP21EntitiesImpl.IdStructuralFeaturePair; 11 | import de.bitub.step.p21.AllP21EntitiesImpl.ListTriple; 12 | 13 | public interface AllP21Entities 14 | { 15 | AllP21Entities eINSTANCE = AllP21EntitiesImpl.init(); 16 | 17 | EObject retrieve(String id); 18 | 19 | Map> retrieveUnresolved(); 20 | 21 | Collection retrieveUnresolvedLists(); 22 | 23 | EObject store(String id, EObject object); 24 | 25 | void store(String ref, String id, EStructuralFeature feature); 26 | 27 | void store(List references, EObject listWrapper, EStructuralFeature feature); 28 | 29 | List retrieveAll(List references); 30 | } 31 | -------------------------------------------------------------------------------- /de.bitub.step.p21/src/de/bitub/step/p21/XPressModelConstants.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21; 2 | 3 | public interface XPressModelConstants 4 | { 5 | String XPRESS_MODEL_ANNOTATION_SRC = "http://www.bitub.de/express/XpressModel"; 6 | String P21_MODEL_ANNOTATION_SRC = "http://www.bitub.de/express/P21"; 7 | 8 | String NEW = "new"; 9 | String GENERATED = "generated"; 10 | String MAPPED = "mapped"; 11 | String DELEGATE = "delegate"; 12 | 13 | String KIND = "kind"; 14 | String NAME = "name"; 15 | String PATTERN = "pattern"; 16 | String DATATYPE_REF = "datatypeRef"; 17 | String SELECT = "select"; 18 | 19 | String DOUBLE = "double"; 20 | String INT = "int"; 21 | String STRING = "string"; 22 | String BOOLEAN = "boolean"; 23 | String LOGICAL = "Boolean"; 24 | String DOUBLE_ARRAY = "double[]"; 25 | } 26 | -------------------------------------------------------------------------------- /de.bitub.step.p21/src/de/bitub/step/p21/concurrrent/P21DataLineTask.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.concurrrent; 2 | 3 | import java.util.concurrent.Callable; 4 | 5 | import org.eclipse.emf.ecore.EObject; 6 | 7 | import de.bitub.step.p21.parser.P21EntityListener; 8 | import de.bitub.step.p21.parser.SingleLineEntityParser; 9 | 10 | public class P21DataLineTask implements Callable 11 | { 12 | P21EntityListener listener; 13 | String line = ""; 14 | 15 | public P21DataLineTask(P21EntityListener listener, String line) 16 | { 17 | this.listener = listener; 18 | this.line = line; 19 | } 20 | 21 | @Override 22 | public EObject call() throws Exception 23 | { 24 | SingleLineEntityParser parser = new SingleLineEntityParser(); 25 | EObject result = null; 26 | try { 27 | result = parser.parse(line, listener); 28 | } 29 | catch (Exception e) { 30 | e.printStackTrace(); 31 | } 32 | return result; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /de.bitub.step.p21/src/de/bitub/step/p21/concurrrent/P21ResolveReferencesListTask.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.concurrrent; 2 | 3 | import java.util.List; 4 | 5 | import org.eclipse.emf.ecore.EObject; 6 | import org.eclipse.emf.ecore.EStructuralFeature; 7 | 8 | import de.bitub.step.p21.StepUntypedToEcore; 9 | 10 | public class P21ResolveReferencesListTask implements Runnable 11 | { 12 | 13 | private EStructuralFeature feature; 14 | private EObject wrapper; 15 | private List resolvedEntities; 16 | 17 | public P21ResolveReferencesListTask(EStructuralFeature feature, EObject wrapper, List resolvedEntities) 18 | { 19 | this.feature = feature; 20 | this.wrapper = wrapper; 21 | this.resolvedEntities = resolvedEntities; 22 | } 23 | 24 | @Override 25 | public void run() 26 | { 27 | StepUntypedToEcore.connectListWrapperWithUnresolvedReferences(feature, wrapper, resolvedEntities); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /de.bitub.step.p21/src/de/bitub/step/p21/concurrrent/P21ResolveReferencesTask.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.concurrrent; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.emf.ecore.EStructuralFeature; 5 | 6 | import de.bitub.step.p21.StepUntypedToEcore; 7 | 8 | public class P21ResolveReferencesTask implements Runnable 9 | { 10 | 11 | private EStructuralFeature feature; 12 | private EObject entity; 13 | private EObject resolvedEntity; 14 | 15 | public P21ResolveReferencesTask(EStructuralFeature feature, EObject entity, EObject resolvedEntity) 16 | { 17 | this.feature = feature; 18 | this.entity = entity; 19 | this.resolvedEntity = resolvedEntity; 20 | } 21 | 22 | @Override 23 | public void run() 24 | { 25 | try { 26 | if (feature != null && entity != null && resolvedEntity != null) { 27 | StepUntypedToEcore.connectEntityWithResolvedReference(feature, entity, resolvedEntity); 28 | } else { 29 | System.err.println(String.format("Null entry %s %s %s", entity, resolvedEntity, feature)); 30 | } 31 | } 32 | catch (IndexOutOfBoundsException | ClassCastException | ArrayStoreException e) { 33 | System.err.println(String.format("Exception %s %s %s", entity, resolvedEntity, feature.getName())); 34 | } 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /de.bitub.step.p21/src/de/bitub/step/p21/di/P21Module.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.di; 2 | 3 | import java.util.concurrent.ExecutorService; 4 | import java.util.concurrent.Executors; 5 | 6 | import com.google.inject.AbstractModule; 7 | import com.google.inject.Provides; 8 | 9 | import de.bitub.step.p21.AllP21Entities; 10 | import de.bitub.step.p21.AllP21EntitiesImpl; 11 | import de.bitub.step.p21.parser.util.IndexUtil; 12 | import de.bitub.step.p21.parser.util.IndexUtilImpl; 13 | 14 | public class P21Module extends AbstractModule 15 | { 16 | // private EPackage ePackage; 17 | // 18 | // public P21Module() 19 | // { 20 | // } 21 | // 22 | // public P21Module(EPackage ePackage) 23 | // { 24 | // this.ePackage = ePackage; 25 | // } 26 | 27 | @Override 28 | protected void configure() 29 | { 30 | bind(AllP21Entities.class).toInstance(AllP21EntitiesImpl.eINSTANCE); 31 | 32 | bind(IndexUtil.class).to(IndexUtilImpl.class); 33 | 34 | bind(P21ParserFactory.class).to(P21ParserFactoryImpl.class); 35 | } 36 | 37 | @Provides 38 | ExecutorService provideExecutor() 39 | { 40 | return Executors.newFixedThreadPool(10); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /de.bitub.step.p21/src/de/bitub/step/p21/di/P21ParserFactory.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.di; 2 | 3 | import org.eclipse.emf.ecore.EPackage; 4 | 5 | import de.bitub.step.p21.parser.P21EntityListener; 6 | 7 | public interface P21ParserFactory 8 | { 9 | P21EntityListener createWith(EPackage ePackage); 10 | } 11 | -------------------------------------------------------------------------------- /de.bitub.step.p21/src/de/bitub/step/p21/di/P21ParserFactoryImpl.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.di; 2 | 3 | import org.eclipse.emf.ecore.EPackage; 4 | 5 | import com.google.inject.Inject; 6 | import com.google.inject.Provider; 7 | 8 | import de.bitub.step.p21.AllP21Entities; 9 | import de.bitub.step.p21.mapper.NameToClassifierMapImpl; 10 | import de.bitub.step.p21.parser.P21EntityListener; 11 | import de.bitub.step.p21.parser.util.IndexUtil; 12 | 13 | public class P21ParserFactoryImpl implements P21ParserFactory 14 | { 15 | private final Provider p21IndexProvider; 16 | private final Provider indexProvider; 17 | 18 | @Inject 19 | public P21ParserFactoryImpl(Provider p21IndexProvider, Provider indexProvider) 20 | { 21 | this.p21IndexProvider = p21IndexProvider; 22 | this.indexProvider = indexProvider; 23 | } 24 | 25 | @Override 26 | public P21EntityListener createWith(EPackage ePackage) 27 | { 28 | return new P21EntityListener(p21IndexProvider.get(), indexProvider.get(), new NameToClassifierMapImpl(ePackage)); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /de.bitub.step.p21/src/de/bitub/step/p21/mapper/NameToClassifierMap.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.mapper; 2 | 3 | import org.eclipse.emf.ecore.EClassifier; 4 | 5 | public interface NameToClassifierMap 6 | { 7 | /** 8 | * Get classifier by name from current STEP schema package. 9 | * The name will be transformed to upper case inside without respect to 10 | * locale. 11 | * 12 | * 13 | * 14 | * @generated NOT 15 | * @param name The name of the classifier to search for. 16 | * @return The EClassifier if found or null. 17 | */ 18 | EClassifier getEClassifier(String name); 19 | } 20 | -------------------------------------------------------------------------------- /de.bitub.step.p21/src/de/bitub/step/p21/mapper/NameToContainerListsMap.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.mapper; 2 | 3 | import java.util.List; 4 | 5 | import org.eclipse.emf.common.util.EList; 6 | import org.eclipse.emf.ecore.EObject; 7 | 8 | public interface NameToContainerListsMap 9 | { 10 | 11 | EObject getRootEntity(); 12 | 13 | EList getContainmentList(String name); 14 | 15 | void addEntity(String name, EObject o); 16 | 17 | void addEntity(EObject entity); 18 | 19 | void addEntities(List entities); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /de.bitub.step.p21/src/de/bitub/step/p21/parser/P21LevelListener.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.parser; 2 | 3 | import org.antlr.v4.runtime.ParserRuleContext; 4 | 5 | import de.bitub.step.p21.StepParser; 6 | import de.bitub.step.p21.StepParser.ListContext; 7 | import de.bitub.step.p21.StepParser.ParameterContext; 8 | import de.bitub.step.p21.StepParser.ParameterListContext; 9 | import de.bitub.step.p21.parser.util.IndexUtil; 10 | import de.bitub.step.p21.StepParserBaseListener; 11 | import de.bitub.step.p21.StepParserListener; 12 | 13 | public abstract class P21LevelListener extends StepParserBaseListener implements StepParserListener 14 | { 15 | IndexUtil index; 16 | 17 | public P21LevelListener(IndexUtil index) 18 | { 19 | this.index = index; 20 | } 21 | 22 | @Override 23 | public void enterList(ListContext ctx) 24 | { 25 | index.levelDown(); 26 | } 27 | 28 | @Override 29 | public void exitList(ListContext ctx) 30 | { 31 | index.levelUp(); 32 | } 33 | 34 | @Override 35 | public void enterParameterList(ParameterListContext ctx) 36 | { 37 | index.levelDown(); 38 | } 39 | 40 | public void exitParameter(ParameterContext ctx) 41 | { 42 | ParserRuleContext parentCtx = ctx.getParent(); 43 | 44 | if (parentCtx instanceof StepParser.ParameterListContext || parentCtx instanceof StepParser.ListContext) { 45 | index.up(); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /de.bitub.step.p21/src/de/bitub/step/p21/parser/util/Antlr4Util.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.parser.util; 2 | 3 | import java.util.List; 4 | 5 | import org.antlr.v4.runtime.ParserRuleContext; 6 | import org.antlr.v4.runtime.tree.Tree; 7 | import org.antlr.v4.runtime.tree.Trees; 8 | 9 | import de.bitub.step.p21.StepParser.ListContext; 10 | 11 | public class Antlr4Util 12 | { 13 | public static boolean partOfList(ParserRuleContext ctx) 14 | { 15 | return Antlr4Util.isContextAncestorOf(ctx, ListContext.class); 16 | } 17 | 18 | /** 19 | * Check if there is an ancestor of a specific type. 20 | * 21 | * @param ctx 22 | * @param clazz 23 | * @return 24 | */ 25 | public static boolean isContextAncestorOf(ParserRuleContext ctx, Class clazz) 26 | { 27 | List ancestors = Trees.getAncestors(ctx); 28 | for (int i = ancestors.size() - 1; i >= 0; i--) { 29 | if (ancestors.get(i).getClass().equals(clazz)) { 30 | return true; 31 | } 32 | } 33 | return false; 34 | } 35 | 36 | /** 37 | * Check if parent is of specific type. 38 | * 39 | * @param ctx 40 | * @param clazz 41 | * @return 42 | */ 43 | public static boolean isDirectParentOf(ParserRuleContext ctx, Class clazz) 44 | { 45 | return ctx.getParent().getClass().equals(clazz); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /de.bitub.step.p21/src/de/bitub/step/p21/parser/util/IndexUtil.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.parser.util; 2 | 3 | public interface IndexUtil 4 | { 5 | void levelDown(); 6 | 7 | void levelUp(); 8 | 9 | void up(); 10 | 11 | int current(); 12 | 13 | int upper(); 14 | 15 | int level(); 16 | 17 | int entityLevelIndex(); 18 | 19 | boolean isNestedListLevel(); 20 | 21 | boolean isListLevel(); 22 | } 23 | -------------------------------------------------------------------------------- /de.bitub.step.p21/src/de/bitub/step/p21/parser/util/IndexUtilImpl.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.parser.util; 2 | 3 | import java.util.ArrayDeque; 4 | import java.util.Deque; 5 | 6 | public class IndexUtilImpl implements IndexUtil 7 | { 8 | Deque indexStack = new ArrayDeque(); 9 | 10 | private int curIndex = -1; 11 | private int upperIndex = -1; 12 | 13 | public void levelUp() 14 | { 15 | // restore old index from parent parameter list 16 | // 17 | curIndex = indexStack.isEmpty() ? -1 : indexStack.pop(); 18 | } 19 | 20 | public void up() 21 | { 22 | curIndex++; 23 | } 24 | 25 | private boolean isEntityLevel() 26 | { 27 | return curIndex == -1; 28 | } 29 | 30 | public void levelDown() 31 | { 32 | if (!isEntityLevel()) { 33 | rememberLevelIndex(); 34 | } 35 | 36 | curIndex = 0; 37 | } 38 | 39 | public void rememberLevelIndex() 40 | { 41 | indexStack.push(curIndex); 42 | upperIndex = curIndex; 43 | } 44 | 45 | public int upper() 46 | { 47 | return upperIndex; 48 | } 49 | 50 | public int current() 51 | { 52 | return curIndex; 53 | } 54 | 55 | @Override 56 | public int entityLevelIndex() 57 | { 58 | return indexStack.getLast(); 59 | } 60 | 61 | @Override 62 | public int level() 63 | { 64 | return indexStack.size(); 65 | } 66 | 67 | @Override 68 | public String toString() 69 | { 70 | return "Level: " + level() + " Index: " + current(); 71 | } 72 | 73 | @Override 74 | public boolean isListLevel() 75 | { 76 | return indexStack.size() == 1; 77 | } 78 | 79 | @Override 80 | public boolean isNestedListLevel() 81 | { 82 | return indexStack.size() > 1; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /de.bitub.step.p21/src/de/bitub/step/p21/persistence/P21Helper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Bernold Kraft, Sebastian Riemschüssel, Torsten Krämer (Berlin, Germany). 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Initial commit by Riemi @ 19.04.2015. 10 | */ 11 | package de.bitub.step.p21.persistence; 12 | 13 | import java.util.List; 14 | import java.util.concurrent.Future; 15 | 16 | import org.eclipse.emf.ecore.EObject; 17 | import org.eclipse.emf.ecore.EPackage; 18 | 19 | /** 20 | * 21 | * 22 | * 23 | * @generated NOT 24 | * @author Riemi - 19.04.2015 25 | */ 26 | public interface P21Helper 27 | { 28 | List futuresToEntities(List> futures); 29 | 30 | EPackage getEPackage(String nsURI); 31 | } 32 | -------------------------------------------------------------------------------- /de.bitub.step.p21/src/de/bitub/step/p21/persistence/P21Load.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Bernold Kraft, Sebastian Riemschüssel, Torsten Krämer (Berlin, Germany). 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Initial commit by Riemi @ 19.04.2015. 10 | */ 11 | package de.bitub.step.p21.persistence; 12 | 13 | import java.io.IOException; 14 | import java.io.InputStream; 15 | import java.util.Map; 16 | 17 | /** 18 | * 19 | * 20 | * 21 | * @generated NOT 22 | * @author Riemi - 19.04.2015 23 | */ 24 | public interface P21Load 25 | { 26 | void load(P21Resource resource, InputStream inputStream, Map options) throws IOException; 27 | } 28 | -------------------------------------------------------------------------------- /de.bitub.step.p21/src/de/bitub/step/p21/persistence/P21Resource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Bernold Kraft, Sebastian Riemschüssel, Torsten Krämer (Berlin, Germany). 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Initial commit by Riemi @ 16.04.2015. 10 | */ 11 | package de.bitub.step.p21.persistence; 12 | 13 | import java.io.IOException; 14 | import java.io.InputStream; 15 | import java.util.Map; 16 | 17 | import org.eclipse.emf.ecore.resource.Resource; 18 | 19 | /** 20 | * 21 | * 22 | * 23 | * @generated NOT 24 | * @author Riemi - 16.04.2015 25 | */ 26 | public interface P21Resource extends Resource 27 | { 28 | String OPTION_PACKAGE_NS_URI = "nsURI"; 29 | 30 | String OPTION_E_PACKAGE = "ePackage"; 31 | 32 | /** 33 | * 34 | * 35 | * 36 | * @generated NOT 37 | * @see org.eclipse.emf.ecore.resource.Resource#load(java.io.InputStream, 38 | * java.util.Map) 39 | */ 40 | @Override 41 | public void load(InputStream inputStream, Map options) throws IOException; 42 | } 43 | -------------------------------------------------------------------------------- /de.bitub.step.p21/src/de/bitub/step/p21/persistence/P21ResourceFactoryImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Bernold Kraft, Sebastian Riemschüssel, Torsten Krämer (Berlin, Germany). 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Initial commit by Riemi @ 19.04.2015. 10 | */ 11 | package de.bitub.step.p21.persistence; 12 | 13 | import org.eclipse.emf.common.util.URI; 14 | import org.eclipse.emf.ecore.resource.Resource; 15 | import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; 16 | 17 | /** 18 | * 19 | * 20 | * 21 | * @generated NOT 22 | * @author Riemi - 19.04.2015 23 | */ 24 | public class P21ResourceFactoryImpl extends ResourceFactoryImpl 25 | { 26 | 27 | /** 28 | * 29 | * 30 | * 31 | * @generated NOT 32 | */ 33 | public P21ResourceFactoryImpl() 34 | { 35 | super(); 36 | } 37 | 38 | /** 39 | * 40 | * 41 | * 42 | * @generated NOT 43 | * @see org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl#createResource(org.eclipse.emf.common.util.URI) 44 | */ 45 | @Override 46 | public Resource createResource(URI uri) 47 | { 48 | return new P21ResourceImpl(uri); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /de.bitub.step.p21/src/de/bitub/step/p21/util/LoggerHelper.java: -------------------------------------------------------------------------------- 1 | package de.bitub.step.p21.util; 2 | 3 | import java.io.IOException; 4 | import java.nio.file.FileSystems; 5 | import java.nio.file.Files; 6 | import java.nio.file.Path; 7 | import java.util.logging.FileHandler; 8 | import java.util.logging.Level; 9 | import java.util.logging.Logger; 10 | import java.util.logging.SimpleFormatter; 11 | 12 | public class LoggerHelper { 13 | public static Logger init(Level level, Class forClass) { 14 | FileHandler fh; 15 | Logger logger = Logger.getLogger(forClass.getName()); 16 | 17 | try { 18 | // This block configure the logger with handler and formatter 19 | // 20 | Path logFolderPath = FileSystems.getDefault().getPath("logs"); 21 | String logFileName = forClass.getSimpleName() + ".log"; 22 | 23 | if (Files.exists(logFolderPath)) { 24 | fh = new FileHandler("logs/" + logFileName); 25 | SimpleFormatter formatter = new SimpleFormatter(); 26 | fh.setFormatter(formatter); 27 | 28 | logger.addHandler(fh); 29 | logger.setLevel(level); 30 | logger.setUseParentHandlers(false); 31 | } 32 | 33 | } catch (SecurityException | IOException e) { 34 | e.printStackTrace(); 35 | } 36 | return logger; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.buildingsmart.mvd.edit 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.jdt.core.javanature 26 | org.eclipse.pde.PluginNature 27 | 28 | 29 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: %pluginName 4 | Bundle-SymbolicName: org.buildingsmart.mvd.edit;singleton:=true 5 | Bundle-Version: 1.0.0.qualifier 6 | Bundle-ClassPath: . 7 | Bundle-Activator: org.buildingsmart.mvd.mvdxml.provider.MvdXmlEditPlugin$Implementation 8 | Bundle-Vendor: %providerName 9 | Bundle-Localization: plugin 10 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 11 | Export-Package: org.buildingsmart.mvd.mvdxml.provider 12 | Require-Bundle: org.eclipse.core.runtime, 13 | org.buildingsmart.mvd;visibility:=reexport, 14 | org.eclipse.emf.edit;visibility:=reexport 15 | Bundle-ActivationPolicy: lazy 16 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/build.properties: -------------------------------------------------------------------------------- 1 | # 2 | 3 | bin.includes = .,\ 4 | icons/,\ 5 | META-INF/,\ 6 | plugin.xml,\ 7 | plugin.properties 8 | jars.compile.order = . 9 | source.. = src-gen/ 10 | output.. = bin/ 11 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateApplicabilityType_definitions_Definitions.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateApplicabilityType_definitions_Definitions.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateApplicabilityType_templateRules_TemplateRules.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateApplicabilityType_templateRules_TemplateRules.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateApplicabilityType_template_GenericReference.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateApplicabilityType_template_GenericReference.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateAttributeRule_constraints_ConstraintsType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateAttributeRule_constraints_ConstraintsType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateAttributeRule_entityRules_EntityRulesType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateAttributeRule_entityRules_EntityRulesType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConceptRoot_applicability_ApplicabilityType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConceptRoot_applicability_ApplicabilityType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConceptRoot_concepts_ConceptsType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConceptRoot_concepts_ConceptsType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConceptRoot_definitions_Definitions.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConceptRoot_definitions_Definitions.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConceptTemplate_definitions_Definitions.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConceptTemplate_definitions_Definitions.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConceptTemplate_rules_RulesType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConceptTemplate_rules_RulesType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConceptTemplate_subTemplates_SubTemplatesType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConceptTemplate_subTemplates_SubTemplatesType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConcept_definitions_Definitions.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConcept_definitions_Definitions.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConcept_requirements_Requirements.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConcept_requirements_Requirements.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConcept_templateRules_TemplateRules.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConcept_templateRules_TemplateRules.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConcept_template_GenericReference.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConcept_template_GenericReference.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConceptsType_concept_Concept.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateConceptsType_concept_Concept.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateDefinitionType_body_BodyType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateDefinitionType_body_BodyType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateDefinitionType_link_LinkType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateDefinitionType_link_LinkType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateDefinitions_definition_DefinitionType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateDefinitions_definition_DefinitionType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateEntityRule_attributeRules_AttributeRulesType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateEntityRule_attributeRules_AttributeRulesType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateEntityRule_constraints_ConstraintsType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateEntityRule_constraints_ConstraintsType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateEntityRule_references_ReferencesType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateEntityRule_references_ReferencesType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateExchangeRequirementType_definitions_Definitions.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateExchangeRequirementType_definitions_Definitions.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateExchangeRequirementsType_exchangeRequirement_ExchangeRequirementType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateExchangeRequirementsType_exchangeRequirement_ExchangeRequirementType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateModelView_baseView_GenericReference.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateModelView_baseView_GenericReference.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateModelView_definitions_Definitions.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateModelView_definitions_Definitions.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateModelView_exchangeRequirements_ExchangeRequirementsType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateModelView_exchangeRequirements_ExchangeRequirementsType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateModelView_roots_RootsType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateModelView_roots_RootsType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateMvdXML_templates_TemplatesType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateMvdXML_templates_TemplatesType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateMvdXML_views_ViewsType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateMvdXML_views_ViewsType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateReferencesType_template_GenericReference.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateReferencesType_template_GenericReference.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateRequirements_requirement_Requirement.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateRequirements_requirement_Requirement.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateRootsType_conceptRoot_ConceptRoot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateRootsType_conceptRoot_ConceptRoot.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateRulesType_attributeRule_AttributeRule.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateRulesType_attributeRule_AttributeRule.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateSubTemplatesType_conceptTemplate_ConceptTemplate.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateSubTemplatesType_conceptTemplate_ConceptTemplate.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateTemplatesType_conceptTemplate_ConceptTemplate.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateTemplatesType_conceptTemplate_ConceptTemplate.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/ctool16/CreateViewsType_modelView_ModelView.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/ctool16/CreateViewsType_modelView_ModelView.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/ApplicabilityType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/ApplicabilityType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/AttributeRule.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/AttributeRule.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/AttributeRulesType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/AttributeRulesType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/BodyType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/BodyType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/Concept.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/Concept.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/ConceptRoot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/ConceptRoot.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/ConceptTemplate.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/ConceptTemplate.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/ConceptsType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/ConceptsType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/ConstraintType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/ConstraintType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/ConstraintsType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/ConstraintsType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/DefinitionType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/DefinitionType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/Definitions.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/Definitions.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/EntityRule.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/EntityRule.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/EntityRulesType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/EntityRulesType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/ExchangeRequirementType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/ExchangeRequirementType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/ExchangeRequirementsType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/ExchangeRequirementsType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/GenericReference.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/GenericReference.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/LinkType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/LinkType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/ModelView.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/ModelView.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/MvdXML.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/MvdXML.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/References.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/References.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/ReferencesType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/ReferencesType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/Requirement.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/Requirement.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/Requirements.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/Requirements.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/RootsType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/RootsType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/Rules.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/Rules.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/RulesType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/RulesType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/SubConceptsType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/SubConceptsType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/SubTemplatesType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/SubTemplatesType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/TemplateRuleType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/TemplateRuleType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/TemplateRules.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/TemplateRules.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/TemplatesType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/TemplatesType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/icons/full/obj16/ViewsType.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.edit/icons/full/obj16/ViewsType.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.edit/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.editor/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.editor/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.buildingsmart.mvd.editor 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.jdt.core.javanature 26 | org.eclipse.pde.PluginNature 27 | 28 | 29 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.editor/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: %pluginName 4 | Bundle-SymbolicName: org.buildingsmart.mvd.editor;singleton:=true 5 | Bundle-Version: 1.0.0.qualifier 6 | Bundle-ClassPath: . 7 | Bundle-Activator: org.buildingsmart.mvd.mvdxml.presentation.MvdXmlEditorPlugin$Implementation 8 | Bundle-Vendor: %providerName 9 | Bundle-Localization: plugin 10 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 11 | Export-Package: org.buildingsmart.mvd.mvdxml.presentation 12 | Require-Bundle: org.eclipse.core.runtime, 13 | org.eclipse.core.resources;visibility:=reexport, 14 | org.buildingsmart.mvd.edit;visibility:=reexport, 15 | org.eclipse.emf.ecore.xmi;visibility:=reexport, 16 | org.eclipse.emf.edit.ui;visibility:=reexport, 17 | org.eclipse.ui.ide;visibility:=reexport, 18 | org.buildingsmart.mvd.tmvd;bundle-version="1.0.0", 19 | de.bitub.step.p21;bundle-version="0.1.0", 20 | org.buildingsmart.ifc4, 21 | org.buildingsmart.mvd 22 | Bundle-ActivationPolicy: lazy 23 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.editor/build.properties: -------------------------------------------------------------------------------- 1 | # 2 | 3 | bin.includes = .,\ 4 | icons/,\ 5 | META-INF/,\ 6 | plugin.xml,\ 7 | plugin.properties 8 | jars.compile.order = . 9 | source.. = src-gen/ 10 | output.. = bin 11 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.editor/icons/full/obj16/MvdXmlModelFile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.editor/icons/full/obj16/MvdXmlModelFile.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.editor/icons/full/wizban/NewMvdXml.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bitub/step/a6969b1b0b8cc5fd10292d2b3a79a03148278288/org.buildingsmart.mvd.editor/icons/full/wizban/NewMvdXml.gif -------------------------------------------------------------------------------- /org.buildingsmart.mvd.editor/plugin.properties: -------------------------------------------------------------------------------- 1 | # 2 | 3 | pluginName = MvdXml Editor 4 | providerName = www.example.org 5 | 6 | _UI_MvdXmlEditor_menu = &MvdXml Editor 7 | 8 | _UI_CreateChild_menu_item = &New Child 9 | _UI_CreateSibling_menu_item = N&ew Sibling 10 | 11 | _UI_ShowPropertiesView_menu_item = Show &Properties View 12 | _UI_RefreshViewer_menu_item = &Refresh 13 | 14 | _UI_SelectionPage_label = Selection 15 | _UI_ParentPage_label = Parent 16 | _UI_ListPage_label = List 17 | _UI_TreePage_label = Tree 18 | _UI_TablePage_label = Table 19 | _UI_TreeWithColumnsPage_label = Tree with Columns 20 | _UI_ObjectColumn_label = Object 21 | _UI_SelfColumn_label = Self 22 | 23 | _UI_NoObjectSelected = Selected Nothing 24 | _UI_SingleObjectSelected = Selected Object: {0} 25 | _UI_MultiObjectSelected = Selected {0} Objects 26 | 27 | _UI_OpenEditorError_label = Open Editor 28 | 29 | _UI_Wizard_category = Example EMF Model Creation Wizards 30 | 31 | _UI_CreateModelError_message = Problems encountered in file "{0}" 32 | 33 | _UI_MvdXmlModelWizard_label = MvdXml Model 34 | _UI_MvdXmlModelWizard_description = Create a new MvdXml model 35 | 36 | _UI_MvdXmlEditor_label = MvdXml Model Editor 37 | 38 | _UI_MvdXmlEditorFilenameDefaultBase = My 39 | _UI_MvdXmlEditorFilenameExtensions = mvdxml 40 | 41 | _UI_Wizard_label = New 42 | 43 | _WARN_FilenameExtension = The file name must end in ''.{0}'' 44 | _WARN_FilenameExtensions = The file name must have one of the following extensions: {0} 45 | 46 | _UI_ModelObject = &Model Object 47 | _UI_XMLEncoding = &XML Encoding 48 | _UI_XMLEncodingChoices = UTF-8 ASCII UTF-16 UTF-16BE UTF-16LE ISO-8859-1 49 | _UI_Wizard_initial_object_description = Select a model object to create 50 | 51 | _UI_FileConflict_label = File Conflict 52 | _WARN_FileConflict = There are unsaved changes that conflict with changes made outside the editor. Do you wish to discard this editor's changes? 53 | 54 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ide/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ide/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.buildingsmart.mvd.expressions.ide 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.xtext.ui.shared.xtextBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.ManifestBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.pde.SchemaBuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.xtext.ui.shared.xtextNature 31 | org.eclipse.jdt.core.javanature 32 | org.eclipse.pde.PluginNature 33 | 34 | 35 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ide/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ide/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ide/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: org.buildingsmart.mvd.expressions.ide 4 | Bundle-Vendor: My Company 5 | Bundle-Version: 1.0.0.qualifier 6 | Bundle-SymbolicName: org.buildingsmart.mvd.expressions.ide; singleton:=true 7 | Bundle-ActivationPolicy: lazy 8 | Require-Bundle: org.buildingsmart.mvd.expressions, 9 | org.eclipse.xtext.ide, 10 | org.eclipse.xtext.xbase.ide 11 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 12 | Export-Package: org.buildingsmart.mvd.expressions.ide.contentassist.antlr.internal, 13 | org.buildingsmart.mvd.expressions.ide.contentassist.antlr 14 | 15 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ide/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/,\ 2 | src-gen/,\ 3 | xtend-gen/ 4 | bin.includes = .,\ 5 | META-INF/ 6 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.tests/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.tests/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.buildingsmart.mvd.expressions.tests 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.xtext.ui.shared.xtextBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.ManifestBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.pde.SchemaBuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.xtext.ui.shared.xtextNature 31 | org.eclipse.jdt.core.javanature 32 | org.eclipse.pde.PluginNature 33 | 34 | 35 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.tests/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.tests/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.tests/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: org.buildingsmart.mvd.expressions.tests 4 | Bundle-Vendor: My Company 5 | Bundle-Version: 1.0.0.qualifier 6 | Bundle-SymbolicName: org.buildingsmart.mvd.expressions.tests; singleton:=true 7 | Bundle-ActivationPolicy: lazy 8 | Require-Bundle: org.buildingsmart.mvd.expressions, 9 | org.junit;bundle-version="4.7.0", 10 | org.eclipse.xtext.junit4, 11 | org.eclipse.xtext.xbase.junit, 12 | org.eclipse.xtext.xbase.lib 13 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 14 | Export-Package: org.buildingsmart.mvd.expressions.tests 15 | Import-Package: org.hamcrest.core, 16 | org.junit;version="4.5.0", 17 | org.junit.runners.model;version="4.5.0", 18 | org.junit.runner;version="4.5.0", 19 | org.junit.runners;version="4.5.0", 20 | org.junit.runner.manipulation;version="4.5.0", 21 | org.junit.runner.notification;version="4.5.0" 22 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.tests/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/,\ 2 | src-gen/,\ 3 | xtend-gen/ 4 | bin.includes = .,\ 5 | META-INF/ 6 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.tests/src/org/buildingsmart/mvd/expressions/tests/ExpressionStringsParsingTest.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.10.0 3 | */ 4 | package org.buildingsmart.mvd.expressions.tests 5 | 6 | import com.google.inject.Inject 7 | import org.buildingsmart.mvd.expressions.expressionStrings.Expression 8 | import org.eclipse.xtext.junit4.InjectWith 9 | import org.eclipse.xtext.junit4.XtextRunner 10 | import org.eclipse.xtext.junit4.util.ParseHelper 11 | import org.eclipse.xtext.junit4.validation.ValidationTestHelper 12 | import org.junit.Test 13 | import org.junit.runner.RunWith 14 | 15 | @RunWith(XtextRunner) 16 | @InjectWith(ExpressionStringsInjectorProvider) 17 | class ExpressionStringsParsingTest { 18 | 19 | @Inject 20 | extension ParseHelper 21 | 22 | @Inject 23 | extension ValidationTestHelper 24 | 25 | @Test 26 | def void loadModel() { 27 | ''' 28 | O_PsetName [Value] = 'Pset_WallCommon' AND O_PName [Value] = 'Thermal Transmittance' AND O_PSingleValue [Exists] = true 29 | '''.parse.assertNoErrors 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ui.tests/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ui.tests/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.buildingsmart.mvd.expressions.ui.tests 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.xtext.ui.shared.xtextBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.ManifestBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.pde.SchemaBuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.xtext.ui.shared.xtextNature 31 | org.eclipse.jdt.core.javanature 32 | org.eclipse.pde.PluginNature 33 | 34 | 35 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ui.tests/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ui.tests/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ui.tests/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: org.buildingsmart.mvd.expressions.ui.tests 4 | Bundle-Vendor: My Company 5 | Bundle-Version: 1.0.0.qualifier 6 | Bundle-SymbolicName: org.buildingsmart.mvd.expressions.ui.tests; singleton:=true 7 | Bundle-ActivationPolicy: lazy 8 | Require-Bundle: org.buildingsmart.mvd.expressions.ui, 9 | org.junit;bundle-version="4.7.0", 10 | org.eclipse.xtext.junit4, 11 | org.eclipse.xtext.xbase.junit, 12 | org.eclipse.core.runtime, 13 | org.eclipse.ui.workbench;resolution:=optional 14 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 15 | Export-Package: org.buildingsmart.mvd.expressions.ui.tests 16 | Import-Package: org.hamcrest.core, 17 | org.junit;version="4.5.0", 18 | org.junit.runners.model;version="4.5.0", 19 | org.junit.runner;version="4.5.0", 20 | org.junit.runners;version="4.5.0", 21 | org.junit.runner.manipulation;version="4.5.0", 22 | org.junit.runner.notification;version="4.5.0" 23 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ui.tests/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src-gen/,\ 2 | bin.includes = .,\ 3 | META-INF/,\ 4 | src-gen/ 5 | src.includes = src-gen/ 6 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ui/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ui/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.buildingsmart.mvd.expressions.ui 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.xtext.ui.shared.xtextBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.ManifestBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.pde.SchemaBuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.xtext.ui.shared.xtextNature 31 | org.eclipse.jdt.core.javanature 32 | org.eclipse.pde.PluginNature 33 | 34 | 35 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ui/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ui/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ui/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: org.buildingsmart.mvd.expressions.ui 4 | Bundle-Vendor: My Company 5 | Bundle-Version: 1.0.0.qualifier 6 | Bundle-SymbolicName: org.buildingsmart.mvd.expressions.ui; singleton:=true 7 | Bundle-ActivationPolicy: lazy 8 | Require-Bundle: org.buildingsmart.mvd.expressions, 9 | org.buildingsmart.mvd.expressions.ide, 10 | org.eclipse.xtext.ui, 11 | org.eclipse.xtext.ui.shared, 12 | org.eclipse.xtext.ui.codetemplates.ui, 13 | org.eclipse.ui.editors;bundle-version="3.5.0", 14 | org.eclipse.ui.ide;bundle-version="3.5.0", 15 | org.eclipse.ui, 16 | org.eclipse.compare, 17 | org.eclipse.xtext.builder, 18 | org.eclipse.xtend.lib;resolution:=optional, 19 | org.eclipse.xtext.xbase.lib 20 | Import-Package: org.apache.log4j 21 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 22 | Export-Package: org.buildingsmart.mvd.expressions.ui.quickfix, 23 | org.buildingsmart.mvd.expressions.ui.contentassist, 24 | org.buildingsmart.mvd.expressions.ui.internal 25 | Bundle-Activator: org.buildingsmart.mvd.expressions.ui.internal.ExpressionsActivator 26 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ui/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/,\ 2 | src-gen/,\ 3 | xtend-gen/ 4 | bin.includes = .,\ 5 | META-INF/,\ 6 | plugin.xml 7 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ui/src/org/buildingsmart/mvd/expressions/ui/ExpressionStringsUiModule.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.10.0 3 | */ 4 | package org.buildingsmart.mvd.expressions.ui 5 | 6 | import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor 7 | 8 | /** 9 | * Use this class to register components to be used within the Eclipse IDE. 10 | */ 11 | @FinalFieldsConstructor 12 | class ExpressionStringsUiModule extends AbstractExpressionStringsUiModule { 13 | } 14 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ui/src/org/buildingsmart/mvd/expressions/ui/contentassist/ExpressionStringsProposalProvider.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.10.0 3 | */ 4 | package org.buildingsmart.mvd.expressions.ui.contentassist 5 | 6 | 7 | /** 8 | * See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#content-assist 9 | * on how to customize the content assistant. 10 | */ 11 | class ExpressionStringsProposalProvider extends AbstractExpressionStringsProposalProvider { 12 | } 13 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ui/src/org/buildingsmart/mvd/expressions/ui/labeling/ExpressionStringsDescriptionLabelProvider.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.10.0 3 | */ 4 | package org.buildingsmart.mvd.expressions.ui.labeling 5 | 6 | import org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider 7 | 8 | /** 9 | * Provides labels for IEObjectDescriptions and IResourceDescriptions. 10 | * 11 | * See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#label-provider 12 | */ 13 | class ExpressionStringsDescriptionLabelProvider extends DefaultDescriptionLabelProvider { 14 | 15 | // Labels and icons can be computed like this: 16 | 17 | // override text(IEObjectDescription ele) { 18 | // ele.name.toString 19 | // } 20 | // 21 | // override image(IEObjectDescription ele) { 22 | // ele.EClass.name + '.gif' 23 | // } 24 | } 25 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ui/src/org/buildingsmart/mvd/expressions/ui/labeling/ExpressionStringsLabelProvider.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.10.0 3 | */ 4 | package org.buildingsmart.mvd.expressions.ui.labeling 5 | 6 | import com.google.inject.Inject 7 | import org.buildingsmart.mvd.expressions.expressionStrings.And 8 | import org.buildingsmart.mvd.expressions.expressionStrings.Expression 9 | import org.buildingsmart.mvd.expressions.expressionStrings.Or 10 | import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider 11 | import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider 12 | import org.buildingsmart.mvd.expressions.expressionStrings.BooleanTerm 13 | 14 | //import org.buildingsmart.mvd.expressions.expressionStrings.Equality 15 | //import org.buildingsmart.mvd.expressions.expressionStrings.Comparison 16 | /** 17 | * Provides labels for EObjects. 18 | * 19 | * See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#label-provider 20 | */ 21 | class ExpressionStringsLabelProvider extends DefaultEObjectLabelProvider { 22 | 23 | @Inject 24 | new(AdapterFactoryLabelProvider delegate) { 25 | super(delegate); 26 | } 27 | 28 | // Labels and icons can be computed like this: 29 | def text(Expression expr) { 30 | switch (expr) { 31 | And: '''AND''' 32 | Or: '''OR''' 33 | BooleanTerm: '''«expr.op»''' 34 | }.toString 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ui/src/org/buildingsmart/mvd/expressions/ui/outline/ExpressionStringsOutlineTreeProvider.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.10.0 3 | */ 4 | package org.buildingsmart.mvd.expressions.ui.outline 5 | 6 | import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider 7 | 8 | /** 9 | * Customization of the default outline structure. 10 | * 11 | * See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#outline 12 | */ 13 | class ExpressionStringsOutlineTreeProvider extends DefaultOutlineTreeProvider { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions.ui/src/org/buildingsmart/mvd/expressions/ui/quickfix/ExpressionStringsQuickfixProvider.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.10.0 3 | */ 4 | package org.buildingsmart.mvd.expressions.ui.quickfix 5 | 6 | import org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider 7 | 8 | /** 9 | * Custom quickfixes. 10 | * 11 | * See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#quick-fixes 12 | */ 13 | class ExpressionStringsQuickfixProvider extends DefaultQuickfixProvider { 14 | 15 | // @Fix(ExpressionStringsValidator.INVALID_NAME) 16 | // def capitalizeName(Issue issue, IssueResolutionAcceptor acceptor) { 17 | // acceptor.accept(issue, 'Capitalize name', 'Capitalize the name.', 'upcase.png') [ 18 | // context | 19 | // val xtextDocument = context.xtextDocument 20 | // val firstLetter = xtextDocument.get(issue.offset, 1) 21 | // xtextDocument.replace(issue.offset, 1, firstLetter.toUpperCase) 22 | // ] 23 | // } 24 | } 25 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.buildingsmart.mvd.expressions 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.xtext.ui.shared.xtextBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.ManifestBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.pde.SchemaBuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.xtext.ui.shared.xtextNature 31 | org.eclipse.jdt.core.javanature 32 | org.eclipse.pde.PluginNature 33 | 34 | 35 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/,\ 2 | src-gen/,\ 3 | xtend-gen/ 4 | bin.includes = model/generated/,\ 5 | .,\ 6 | META-INF/,\ 7 | plugin.xml 8 | additional.bundles = org.eclipse.xtext.xbase,\ 9 | org.eclipse.xtext.common.types,\ 10 | org.eclipse.xtext.xtext.generator,\ 11 | org.eclipse.emf.codegen.ecore,\ 12 | org.eclipse.emf.mwe.utils,\ 13 | org.eclipse.emf.mwe2.launch,\ 14 | org.eclipse.emf.mwe2.lib,\ 15 | org.objectweb.asm,\ 16 | org.apache.commons.logging,\ 17 | org.apache.log4j,\ 18 | com.ibm.icu 19 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions/plugin.xml_gen: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions/src/org/buildingsmart/mvd/expressions/ExpressionStringsRuntimeModule.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.10.0 3 | */ 4 | package org.buildingsmart.mvd.expressions 5 | 6 | 7 | /** 8 | * Use this class to register components to be used at runtime / without the Equinox extension registry. 9 | */ 10 | class ExpressionStringsRuntimeModule extends AbstractExpressionStringsRuntimeModule { 11 | } 12 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions/src/org/buildingsmart/mvd/expressions/ExpressionStringsStandaloneSetup.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.10.0 3 | */ 4 | package org.buildingsmart.mvd.expressions 5 | 6 | 7 | /** 8 | * Initialization support for running Xtext languages without Equinox extension registry. 9 | */ 10 | class ExpressionStringsStandaloneSetup extends ExpressionStringsStandaloneSetupGenerated { 11 | 12 | def static void doSetup() { 13 | new ExpressionStringsStandaloneSetup().createInjectorAndDoEMFRegistration() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions/src/org/buildingsmart/mvd/expressions/GenerateExpressionStrings.mwe2: -------------------------------------------------------------------------------- 1 | module org.buildingsmart.mvd.expressions.GenerateExpressionStrings 2 | 3 | import org.eclipse.xtext.xtext.generator.* 4 | import org.eclipse.xtext.xtext.generator.model.project.* 5 | 6 | var rootPath = ".." 7 | 8 | Workflow { 9 | 10 | component = XtextGenerator { 11 | configuration = { 12 | project = StandardProjectConfig { 13 | baseName = "org.buildingsmart.mvd.expressions" 14 | rootPath = rootPath 15 | runtimeTest = { 16 | enabled = true 17 | } 18 | eclipsePlugin = { 19 | enabled = true 20 | } 21 | eclipsePluginTest = { 22 | enabled = true 23 | } 24 | createEclipseMetaData = true 25 | } 26 | code = { 27 | encoding = "UTF-8" 28 | fileHeader = "/*\n * generated by Xtext \${version}\n */" 29 | } 30 | } 31 | language = StandardLanguage { 32 | name = "org.buildingsmart.mvd.expressions.ExpressionStrings" 33 | fileExtensions = "mvdrule" 34 | 35 | serializer = { 36 | generateStub = false 37 | } 38 | validator = { 39 | // composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator" 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions/src/org/buildingsmart/mvd/expressions/generator/ExpressionStringsGenerator.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.10.0 3 | */ 4 | package org.buildingsmart.mvd.expressions.generator 5 | 6 | import org.eclipse.emf.ecore.resource.Resource 7 | import org.eclipse.xtext.generator.AbstractGenerator 8 | import org.eclipse.xtext.generator.IFileSystemAccess2 9 | import org.eclipse.xtext.generator.IGeneratorContext 10 | 11 | /** 12 | * Generates code from your model files on save. 13 | * 14 | * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation 15 | */ 16 | class ExpressionStringsGenerator extends AbstractGenerator { 17 | 18 | override void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context) { 19 | // fsa.generateFile('greetings.txt', 'People to greet: ' + 20 | // resource.allContents 21 | // .filter(typeof(Greeting)) 22 | // .map[name] 23 | // .join(', ')) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions/src/org/buildingsmart/mvd/expressions/scoping/ExpressionStringsScopeProvider.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.10.0 3 | */ 4 | package org.buildingsmart.mvd.expressions.scoping 5 | 6 | 7 | /** 8 | * This class contains custom scoping description. 9 | * 10 | * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#scoping 11 | * on how and when to use it. 12 | */ 13 | class ExpressionStringsScopeProvider extends AbstractExpressionStringsScopeProvider { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions/src/org/buildingsmart/mvd/expressions/util/IOUtil.xtend: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.expressions.util 2 | 3 | import com.google.inject.Guice 4 | import java.io.ByteArrayInputStream 5 | import java.util.UUID 6 | import org.buildingsmart.mvd.expressions.ExpressionStringsRuntimeModule 7 | import org.buildingsmart.mvd.expressions.expressionStrings.Expression 8 | import org.buildingsmart.mvd.expressions.expressionStrings.ExpressionStringsPackage 9 | import org.eclipse.emf.common.util.URI 10 | import org.eclipse.emf.ecore.EPackage 11 | import org.eclipse.xtext.resource.XtextResource 12 | import org.eclipse.xtext.resource.XtextResourceFactory 13 | import org.eclipse.xtext.resource.XtextResourceSet 14 | 15 | class IOUtil { 16 | 17 | private XtextResourceSet resourceSet; 18 | 19 | new() { 20 | setup() 21 | } 22 | 23 | def setup() { 24 | var injector = Guice.createInjector(new ExpressionStringsRuntimeModule) 25 | resourceSet = injector.getInstance(XtextResourceSet); 26 | 27 | EPackage.Registry.INSTANCE.put(ExpressionStringsPackage.eNS_URI, ExpressionStringsPackage.eINSTANCE); 28 | resourceSet.resourceFactoryRegistry.extensionToFactoryMap.put("mvdrule", 29 | injector.getInstance(XtextResourceFactory)) 30 | resourceSet.addLoadOption(XtextResource.OPTION_RESOLVE_ALL, Boolean.TRUE) 31 | } 32 | 33 | def parse(String parameters) { 34 | var resource = resourceSet.createResource(URI.createURI("dummy:/" + UUID.randomUUID + ".mvdrule")) 35 | var in = new ByteArrayInputStream(parameters.bytes) 36 | resource.load(in, resourceSet.loadOptions) 37 | resource.contents.get(0) as Expression 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.expressions/src/org/buildingsmart/mvd/expressions/validation/ExpressionStringsValidator.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.10.0 3 | */ 4 | package org.buildingsmart.mvd.expressions.validation 5 | 6 | import org.buildingsmart.mvd.expressions.expressionStrings.BooleanTerm 7 | import org.buildingsmart.mvd.expressions.expressionStrings.ExpressionStringsPackage 8 | import org.eclipse.xtext.validation.Check 9 | import org.buildingsmart.mvd.expressions.expressionStrings.StringLiteral 10 | 11 | /** 12 | * This class contains custom validation rules. 13 | * 14 | * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation 15 | */ 16 | class ExpressionStringsValidator extends AbstractExpressionStringsValidator { 17 | 18 | public static val INVALID_METRIC_VALUE_PAIR = 'invalidMetricValuePair' 19 | 20 | @Check 21 | def checkMetricWorksWithCorrectType(BooleanTerm term) { 22 | 23 | val metric = term.param.metric 24 | val value = term.value 25 | switch (metric) { 26 | case VALUE: { 27 | } 28 | case EXISTS: { 29 | } 30 | case SIZE: { 31 | } 32 | case TYPE: { 33 | if (value instanceof StringLiteral) { 34 | warning('Used Metric do not match type of value.', 35 | ExpressionStringsPackage.Literals.BOOLEAN_TERM__VALUE, INVALID_METRIC_VALUE_PAIR) 36 | } 37 | } 38 | case UNIQUE: { 39 | } 40 | } 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.sdk/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.buildingsmart.mvd.tmvd.sdk 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.pde.FeatureBuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.pde.FeatureNature 16 | 17 | 18 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.sdk/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes =feature.xml 2 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.sdk/feature.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 20 | 21 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.tests/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.tests/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.buildingsmart.mvd.tmvd.tests 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.xtext.ui.shared.xtextBuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jdt.core.javanature 31 | org.eclipse.pde.PluginNature 32 | org.eclipse.xtext.ui.shared.xtextNature 33 | 34 | 35 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.tests/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.tests/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.tests/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: org.buildingsmart.mvd.tmvd.tests 4 | Bundle-Vendor: My Company 5 | Bundle-Version: 1.0.0.qualifier 6 | Bundle-SymbolicName: org.buildingsmart.mvd.tmvd.tests; singleton:=true 7 | Bundle-ActivationPolicy: lazy 8 | Require-Bundle: org.buildingsmart.mvd.tmvd, 9 | org.buildingsmart.mvd.tmvd.ui, 10 | org.eclipse.core.runtime, 11 | org.eclipse.ui.workbench;resolution:=optional, 12 | org.eclipse.xtext.xbase.lib, 13 | org.objectweb.asm;bundle-version="[5.0.1,6.0.0)";resolution:=optional, 14 | org.buildingsmart.mvd;bundle-version="1.0.0", 15 | org.buildingsmart.mvd.expressions;bundle-version="1.0.0", 16 | org.eclipse.ocl, 17 | org.buildingsmart.ifc4;bundle-version="0.3.1", 18 | org.eclipse.ocl.ecore, 19 | de.bitub.step.p21;bundle-version="0.1.0", 20 | org.eclipse.xtext.junit4 21 | Import-Package: org.apache.log4j, 22 | org.junit;version="4.5.0", 23 | org.junit.runner;version="4.5.0", 24 | org.junit.runner.manipulation;version="4.5.0", 25 | org.junit.runner.notification;version="4.5.0", 26 | org.junit.runners;version="4.5.0", 27 | org.junit.runners.model;version="4.5.0", 28 | org.hamcrest.core 29 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 30 | Export-Package: org.buildingsmart.mvd.tmvd 31 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.tests/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/,\ 2 | src-gen/,\ 3 | xtend-gen/ 4 | bin.includes = META-INF/,\ 5 | . 6 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.tests/org.buildingsmart.mvd.tmvd.tests.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.tests/src/org/buildingsmart/mvd/tmvd/AbstractTextualMVDTest.xtend: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.tmvd 2 | 3 | import com.google.inject.Inject 4 | import org.buildingsmart.mvd.tmvd.TextualMVDInjectorProvider 5 | import org.buildingsmart.mvd.tmvd.util.IOHelper 6 | import org.eclipse.emf.ecore.EObject 7 | import org.eclipse.xtext.junit4.InjectWith 8 | import org.eclipse.xtext.junit4.XtextRunner 9 | import org.junit.runner.RunWith 10 | 11 | @RunWith(typeof(XtextRunner)) 12 | @InjectWith(typeof(TextualMVDInjectorProvider)) 13 | class AbstractTextualMVDTest { 14 | 15 | @Inject extension IOHelper io 16 | 17 | def loadTextualMVD(String pathToFile) { 18 | io.loadTextualMVD(pathToFile) 19 | } 20 | 21 | def loadMvdXML(String pathToFile) { 22 | io.loadMvdXML(pathToFile) 23 | } 24 | 25 | def saveMvdXML(EObject root, String pathToFile) { 26 | io.storeAsMVDXML(root, pathToFile) 27 | } 28 | 29 | def saveTextualMVD(EObject root, String pathToFile) { 30 | io.storeAsTMVD(root, pathToFile) 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.tests/src/org/buildingsmart/mvd/tmvd/converter/ApplicableEntitiesValueConverterTest.xtend: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.tmvd.converter 2 | 3 | import com.google.inject.Inject 4 | import java.util.Arrays 5 | import org.buildingsmart.mvd.tmvd.TextualMVDInjectorProvider 6 | import org.eclipse.xtext.junit4.AbstractXtextTests 7 | import org.eclipse.xtext.junit4.InjectWith 8 | import org.eclipse.xtext.junit4.XtextRunner 9 | import org.junit.Test 10 | import org.junit.runner.RunWith 11 | import org.buildingsmart.mvd.tmvd.converter.ApplicableEntitiesValueConverter 12 | 13 | @RunWith(typeof(XtextRunner)) 14 | @InjectWith(typeof(TextualMVDInjectorProvider)) 15 | class ApplicableEntitiesValueConverterTest extends AbstractXtextTests { 16 | 17 | @Inject ApplicableEntitiesValueConverter valueConverter; 18 | 19 | @Test def testOneValue() throws Exception { 20 | val s = "IfcObject" 21 | val value = valueConverter.toValue(s, null) 22 | assertArrayEquals(Arrays.asList("IfcObject"), value) 23 | assertEquals(s, valueConverter.toString(value)) 24 | } 25 | 26 | @Test def testMultiValue() throws Exception { 27 | val s = "IfcObject,IfcElement" 28 | val value = valueConverter.toValue(s, null) 29 | assertArrayEquals(Arrays.asList("IfcObject", "IfcElement"), value) 30 | assertEquals(s, valueConverter.toString(value)) 31 | } 32 | 33 | @Test def testMultiValueWithSpace() throws Exception { 34 | val s = "IfcObject, IfcElement" 35 | val value = valueConverter.toValue(s, null) 36 | assertArrayEquals(Arrays.asList("IfcObject", "IfcElement"), value) 37 | assertEquals("IfcObject,IfcElement", valueConverter.toString(value)) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.tests/src/org/buildingsmart/mvd/tmvd/scoping/TextualMVDIndexTest.xtend: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.tmvd.scoping 2 | 3 | import com.google.inject.Inject 4 | import org.buildingsmart.mvd.tmvd.TextualMVDInjectorProvider 5 | import org.buildingsmart.mvd.tmvd.scoping.TextualMVDIndex 6 | import org.eclipse.xtext.junit4.InjectWith 7 | import org.eclipse.xtext.junit4.XtextRunner 8 | import org.junit.Test 9 | import org.junit.runner.RunWith 10 | import org.buildingsmart.mvd.mvdxml.MvdXML 11 | import org.buildingsmart.mvd.tmvd.AbstractTextualMVDTest 12 | 13 | @RunWith(typeof(XtextRunner)) 14 | @InjectWith(typeof(TextualMVDInjectorProvider)) 15 | class TextualMVDIndexTest extends AbstractTextualMVDTest { 16 | 17 | @Inject extension TextualMVDIndex 18 | 19 | @Test def void testExportedEObjectDescriptions() { 20 | 21 | val mvdXml = "org/buildingsmart/mvd/tmvd/tests/DoorHasSelfClosing.tmvd".loadMvdXML as MvdXML 22 | System::out.println(mvdXml.exportedEObjectDescriptions.map[qualifiedName].join(", ")) 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.tests/src/org/buildingsmart/mvd/tmvd/scoping/TextualMVDScopeProviderTest.xtend: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.tmvd.scoping 2 | 3 | import com.google.inject.Inject 4 | import org.buildingsmart.mvd.mvdxml.MvdXML 5 | import org.buildingsmart.mvd.mvdxml.MvdXmlPackage 6 | import org.buildingsmart.mvd.tmvd.TextualMVDInjectorProvider 7 | import org.eclipse.emf.ecore.EObject 8 | import org.eclipse.emf.ecore.EReference 9 | import org.eclipse.xtext.junit4.InjectWith 10 | import org.eclipse.xtext.junit4.XtextRunner 11 | import org.eclipse.xtext.scoping.IScopeProvider 12 | import org.junit.Test 13 | import org.junit.runner.RunWith 14 | import org.buildingsmart.mvd.tmvd.AbstractTextualMVDTest 15 | 16 | @RunWith(typeof(XtextRunner)) 17 | @InjectWith(typeof(TextualMVDInjectorProvider)) 18 | class TextualMVDScopeProviderTest extends AbstractTextualMVDTest { 19 | 20 | @Inject extension IScopeProvider 21 | 22 | @Test def void testExportedEObjectDescriptions() { 23 | 24 | val mvdXml = "org/buildingsmart/mvd/tmvd/tests/DoorHasSelfClosing.tmvd".loadMvdXML as MvdXML 25 | mvdXml.views.modelView.head.roots.conceptRoot.head.concepts.concept.head => [ 26 | System::out.println(assertScope(MvdXmlPackage::eINSTANCE.concept_Template)) 27 | ] 28 | } 29 | 30 | def assertScope(EObject context, EReference reference) { 31 | context.getScope(reference).allElements.map[name].join(" ,") 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.ui/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.ui/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.buildingsmart.mvd.tmvd.ui 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.xtext.ui.shared.xtextBuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jdt.core.javanature 31 | org.eclipse.pde.PluginNature 32 | org.eclipse.xtext.ui.shared.xtextNature 33 | 34 | 35 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.ui/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.ui/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.ui/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: org.buildingsmart.mvd.tmvd.ui 4 | Bundle-Vendor: My Company 5 | Bundle-Version: 1.0.0.qualifier 6 | Bundle-SymbolicName: org.buildingsmart.mvd.tmvd.ui; singleton:=true 7 | Bundle-ActivationPolicy: lazy 8 | Require-Bundle: org.buildingsmart.mvd.tmvd;visibility:=reexport, 9 | org.eclipse.xtext.ui, 10 | org.eclipse.ui.editors;bundle-version="3.5.0", 11 | org.eclipse.ui.ide;bundle-version="3.5.0", 12 | org.eclipse.xtext.ui.shared, 13 | org.eclipse.ui, 14 | org.eclipse.xtext.builder, 15 | org.eclipse.xtext.xbase.lib, 16 | org.eclipse.xtext.common.types.ui, 17 | org.eclipse.xtext.ui.codetemplates.ui, 18 | org.eclipse.compare, 19 | org.buildingsmart.mvd;bundle-version="1.0.0", 20 | org.eclipse.jdt.ui;bundle-version="3.11.1", 21 | org.buildingsmart.ifc4;bundle-version="0.3.1" 22 | Import-Package: org.apache.log4j 23 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 24 | Export-Package: org.buildingsmart.mvd.tmvd.ui.quickfix, 25 | org.buildingsmart.mvd.tmvd.ui.contentassist, 26 | org.buildingsmart.mvd.tmvd.ui.internal, 27 | org.buildingsmart.mvd.tmvd.ui.contentassist.antlr, 28 | org.buildingsmart.mvd.tmvd.ui.contentassist.antlr.internal 29 | Bundle-Activator: org.buildingsmart.mvd.tmvd.ui.internal.TextualMVDActivator 30 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.ui/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/,\ 2 | src-gen/,\ 3 | xtend-gen/ 4 | bin.includes = META-INF/,\ 5 | .,\ 6 | plugin.xml,\ 7 | icons/ 8 | 9 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.ui/src/org/buildingsmart/mvd/tmvd/ui/TextualMVDUiModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 3 | */ 4 | package org.buildingsmart.mvd.tmvd.ui; 5 | 6 | import org.buildingsmart.mvd.tmvd.ui.errormessages.TextualMvdSyntaxErrorMessageProvider; 7 | import org.buildingsmart.mvd.tmvd.ui.hover.TextualMVDDocumentationProvider; 8 | import org.buildingsmart.mvd.tmvd.ui.hover.TextualMVDHoverProvider; 9 | import org.eclipse.ui.plugin.AbstractUIPlugin; 10 | import org.eclipse.xtext.documentation.IEObjectDocumentationProvider; 11 | import org.eclipse.xtext.parser.antlr.ISyntaxErrorMessageProvider; 12 | import org.eclipse.xtext.ui.editor.hover.IEObjectHoverProvider; 13 | 14 | /** 15 | * Use this class to register components to be used within the IDE. 16 | */ 17 | public class TextualMVDUiModule extends org.buildingsmart.mvd.tmvd.ui.AbstractTextualMVDUiModule 18 | { 19 | public TextualMVDUiModule(AbstractUIPlugin plugin) 20 | { 21 | super(plugin); 22 | } 23 | 24 | public Class bindISyntaxErrorMessageProvider() 25 | { 26 | return TextualMvdSyntaxErrorMessageProvider.class; 27 | } 28 | 29 | public Class bindIEObjectHoverProvider() 30 | { 31 | return TextualMVDHoverProvider.class; 32 | } 33 | 34 | public Class bindIEObjectDocumentationProviderr() 35 | { 36 | return TextualMVDDocumentationProvider.class; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.ui/src/org/buildingsmart/mvd/tmvd/ui/errormessages/TextualMvdSyntaxErrorMessageProvider.xtend: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.tmvd.ui.errormessages 2 | 3 | import org.eclipse.xtext.parser.antlr.SyntaxErrorMessageProvider 4 | import org.eclipse.xtext.nodemodel.SyntaxErrorMessage 5 | import org.eclipse.xtext.parser.antlr.ISyntaxErrorMessageProvider.IValueConverterErrorContext 6 | import java.io.NotSerializableException 7 | import org.buildingsmart.mvd.tmvd.validation.TextualMVDValidator 8 | 9 | class TextualMvdSyntaxErrorMessageProvider extends SyntaxErrorMessageProvider { 10 | 11 | override getSyntaxErrorMessage(IValueConverterErrorContext context) { 12 | 13 | if (context.valueConverterException.cause instanceof NotSerializableException) { 14 | new SyntaxErrorMessage(context.getDefaultMessage(), TextualMVDValidator::NO_UUID); 15 | } 16 | return super.getSyntaxErrorMessage(context) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.ui/src/org/buildingsmart/mvd/tmvd/ui/hover/TextualMVDDocumentationProvider.xtend: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.tmvd.ui.hover 2 | 3 | import org.eclipse.emf.ecore.EObject 4 | import org.eclipse.xtext.documentation.IEObjectDocumentationProvider 5 | import org.buildingsmart.mvd.mvdxml.Rules 6 | 7 | class TextualMVDDocumentationProvider implements IEObjectDocumentationProvider { 8 | 9 | override getDocumentation(EObject o) { 10 | return switch (o) { 11 | Rules: "Rule: " + o.documentation 12 | default: null 13 | } 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.ui/src/org/buildingsmart/mvd/tmvd/ui/hover/TextualMVDHoverProvider.xtend: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.tmvd.ui.hover 2 | 3 | import org.eclipse.xtext.ui.editor.hover.html.DefaultEObjectHoverProvider 4 | import org.eclipse.emf.ecore.EObject 5 | import org.buildingsmart.mvd.mvdxml.Rules 6 | 7 | class TextualMVDHoverProvider extends DefaultEObjectHoverProvider { 8 | 9 | override protected getFirstLine(EObject o) { 10 | 11 | return switch (o) { 12 | Rules: "Rules: " + o.templateRules 13 | default: super.getFirstLine(o) 14 | } 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd.ui/src/org/buildingsmart/mvd/tmvd/ui/labeling/TextualMVDDescriptionLabelProvider.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 3 | */ 4 | package org.buildingsmart.mvd.tmvd.ui.labeling 5 | 6 | //import org.eclipse.xtext.resource.IEObjectDescription 7 | 8 | /** 9 | * Provides labels for IEObjectDescriptions and IResourceDescriptions. 10 | * 11 | * See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#label-provider 12 | */ 13 | class TextualMVDDescriptionLabelProvider extends org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider { 14 | 15 | // Labels and icons can be computed like this: 16 | 17 | // override text(IEObjectDescription ele) { 18 | // ele.name.toString 19 | // } 20 | // 21 | // override image(IEObjectDescription ele) { 22 | // ele.EClass.name + '.gif' 23 | // } 24 | } 25 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.buildingsmart.mvd.tmvd 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.pde.ManifestBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.SchemaBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.xtext.ui.shared.xtextBuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jdt.core.javanature 31 | org.eclipse.pde.PluginNature 32 | org.eclipse.xtext.ui.shared.xtextNature 33 | 34 | 35 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/,\ 2 | src-gen/,\ 3 | xtend-gen/ 4 | bin.includes = META-INF/,\ 5 | .,\ 6 | plugin.xml -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/src/org/buildingsmart/mvd/tmvd/TextualMVDRuntimeModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 3 | */ 4 | package org.buildingsmart.mvd.tmvd; 5 | 6 | import org.buildingsmart.mvd.tmvd.converter.ExtendedDefaultTerminalConverters; 7 | import org.buildingsmart.mvd.tmvd.generator.MvdOutputConfigurationProvider; 8 | import org.eclipse.xtext.conversion.IValueConverterService; 9 | import org.eclipse.xtext.generator.IOutputConfigurationProvider; 10 | 11 | /** 12 | * Use this class to register components to be used at runtime / without the 13 | * Equinox extension registry. 14 | */ 15 | public class TextualMVDRuntimeModule extends org.buildingsmart.mvd.tmvd.AbstractTextualMVDRuntimeModule 16 | { 17 | 18 | @Override 19 | public Class bindIValueConverterService() 20 | { 21 | return ExtendedDefaultTerminalConverters.class; 22 | } 23 | 24 | public Class bindIOutputConfigurationProvider() 25 | { 26 | return MvdOutputConfigurationProvider.class; 27 | } 28 | 29 | // @Override 30 | // public Class bindITransientValueService() 31 | // { 32 | // return TextualMVDTransientValueService.class; 33 | // } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/src/org/buildingsmart/mvd/tmvd/TextualMVDStandaloneSetup.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 3 | */ 4 | package org.buildingsmart.mvd.tmvd; 5 | 6 | /** 7 | * Initialization support for running Xtext languages 8 | * without equinox extension registry 9 | */ 10 | public class TextualMVDStandaloneSetup extends TextualMVDStandaloneSetupGenerated{ 11 | 12 | public static void doSetup() { 13 | new TextualMVDStandaloneSetup().createInjectorAndDoEMFRegistration(); 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/src/org/buildingsmart/mvd/tmvd/analyzing/MvdReport.xtend: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.tmvd.analyzing 2 | 3 | class MvdReport { 4 | 5 | 6 | def addError(){ 7 | 8 | } 9 | 10 | def addWarning(){ 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/src/org/buildingsmart/mvd/tmvd/converter/ApplicableEntitiesValueConverter.xtend: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.tmvd.converter 2 | 3 | import java.util.Arrays 4 | import java.util.List 5 | import org.eclipse.xtext.conversion.IValueConverter 6 | import org.eclipse.xtext.conversion.ValueConverterException 7 | import org.eclipse.xtext.nodemodel.INode 8 | import org.eclipse.xtext.util.Strings 9 | 10 | class ApplicableEntitiesValueConverter implements IValueConverter> { 11 | 12 | override toString(List list) throws ValueConverterException { 13 | if (list.size > 1) { 14 | list.join(",") 15 | } else { 16 | if (list.empty) { 17 | "" 18 | } else { 19 | list.get(0) 20 | } 21 | } 22 | } 23 | 24 | override toValue(String string, INode node) throws ValueConverterException { 25 | 26 | if (Strings::isEmpty(string)) 27 | throw new ValueConverterException("Couldn't convert empty list to an applicable entity value.", node, null) 28 | try { 29 | return Arrays.asList(string.split(",")).map[it.trim] 30 | } catch (IllegalArgumentException e) { 31 | throw new ValueConverterException("Couldn't convert " + string + " to an UUID value.", node, e) 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/src/org/buildingsmart/mvd/tmvd/converter/ApplicableSchemasValueConverter.xtend: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.tmvd.converter 2 | 3 | import java.util.Arrays 4 | import java.util.List 5 | import org.eclipse.xtext.conversion.IValueConverter 6 | import org.eclipse.xtext.conversion.ValueConverterException 7 | import org.eclipse.xtext.nodemodel.INode 8 | 9 | class ApplicableSchemasValueConverter implements IValueConverter> { 10 | 11 | override toString(List list) throws ValueConverterException { 12 | list.join(";") 13 | } 14 | 15 | override toValue(String string, INode node) throws ValueConverterException { 16 | if (string.isEmpty) 17 | throw new ValueConverterException("Couldn't convert empty list to an applicable schema value.", node, null); 18 | try { 19 | return Arrays.asList(string.split(";")).map[it.trim] 20 | } catch (IllegalArgumentException e) { 21 | throw new ValueConverterException("Couldn't convert " + string + " to an schema values.", node, e); 22 | } 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/src/org/buildingsmart/mvd/tmvd/converter/ExtendedDefaultTerminalConverters.java: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.tmvd.converter; 2 | 3 | import org.eclipse.xtext.common.services.DefaultTerminalConverters; 4 | 5 | import com.google.inject.Singleton; 6 | 7 | @Singleton 8 | public class ExtendedDefaultTerminalConverters extends DefaultTerminalConverters 9 | { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/src/org/buildingsmart/mvd/tmvd/converter/LanguageValueConverter.java: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.tmvd.converter; 2 | 3 | import org.eclipse.emf.ecore.xml.type.internal.RegEx.RegularExpression; 4 | import org.eclipse.xtext.conversion.IValueConverter; 5 | import org.eclipse.xtext.conversion.ValueConverterException; 6 | import org.eclipse.xtext.nodemodel.INode; 7 | import org.eclipse.xtext.util.Strings; 8 | 9 | public class LanguageValueConverter implements IValueConverter 10 | { 11 | private RegularExpression re = new RegularExpression("[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*"); 12 | 13 | @Override 14 | public String toValue(String string, INode node) throws ValueConverterException 15 | { 16 | if (Strings.isEmpty(string)) { 17 | throw new ValueConverterException("Couldn't convert empty string to an language value.", node, null); 18 | } 19 | if (re.matches(string)) { 20 | throw new ValueConverterException("Couldn't convert string to an valid language value.", node, null); 21 | } 22 | return string; 23 | } 24 | 25 | @Override 26 | public String toString(String value) throws ValueConverterException 27 | { 28 | return value; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/src/org/buildingsmart/mvd/tmvd/converter/MvdNameValueConverter.java: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.tmvd.converter; 2 | 3 | import org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil; 4 | import org.eclipse.xtext.conversion.IValueConverter; 5 | import org.eclipse.xtext.conversion.ValueConverterException; 6 | import org.eclipse.xtext.nodemodel.INode; 7 | import org.eclipse.xtext.util.Strings; 8 | 9 | public class MvdNameValueConverter implements IValueConverter 10 | { 11 | 12 | @Override 13 | public String toValue(String string, INode node) throws ValueConverterException 14 | { 15 | if (Strings.isEmpty(string)) 16 | throw new ValueConverterException("Couldn't convert empty string to an UUID value.", node, null); 17 | try { 18 | return XMLTypeUtil.normalize(string.substring(1, string.length() - 1), false); 19 | } 20 | catch (IllegalArgumentException e) { 21 | throw new ValueConverterException("Couldn't convert " + string + " to an UUID value.", node, null); 22 | } 23 | } 24 | 25 | @Override 26 | public String toString(String value) throws ValueConverterException 27 | { 28 | return value.toString(); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/src/org/buildingsmart/mvd/tmvd/converter/NormalizedStringValueConverter.java: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.tmvd.converter; 2 | 3 | import org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil; 4 | import org.eclipse.xtext.conversion.IValueConverter; 5 | import org.eclipse.xtext.conversion.ValueConverterException; 6 | import org.eclipse.xtext.nodemodel.INode; 7 | import org.eclipse.xtext.util.Strings; 8 | 9 | public class NormalizedStringValueConverter implements IValueConverter 10 | { 11 | 12 | @Override 13 | public String toValue(String string, INode node) throws ValueConverterException 14 | { 15 | if (Strings.isEmpty(string)) 16 | throw new ValueConverterException("Couldn't convert empty string to an UUID value.", node, null); 17 | try { 18 | return XMLTypeUtil.normalize(string, false); 19 | } 20 | catch (IllegalArgumentException e) { 21 | throw new ValueConverterException("Couldn't convert " + string + " to an UUID value.", node, null); 22 | } 23 | } 24 | 25 | @Override 26 | public String toString(String value) throws ValueConverterException 27 | { 28 | return value.toString(); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/src/org/buildingsmart/mvd/tmvd/converter/UUIDValueConverter.java: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.tmvd.converter; 2 | 3 | import java.util.UUID; 4 | 5 | import org.eclipse.xtext.conversion.IValueConverter; 6 | import org.eclipse.xtext.conversion.ValueConverterException; 7 | import org.eclipse.xtext.nodemodel.INode; 8 | import org.eclipse.xtext.util.Strings; 9 | 10 | public class UUIDValueConverter implements IValueConverter 11 | { 12 | 13 | @Override 14 | public UUID toValue(String string, INode node) throws ValueConverterException 15 | { 16 | if (Strings.isEmpty(string)) 17 | throw new ValueConverterException("Couldn't convert empty string to an UUID value.", node, null); 18 | try { 19 | return UUID.fromString(string); 20 | } 21 | catch (IllegalArgumentException e) { 22 | throw new ValueConverterException("Couldn't convert " + string + " to an UUID value.", node, e); 23 | } 24 | } 25 | 26 | @Override 27 | public String toString(UUID value) throws ValueConverterException 28 | { 29 | return value.toString(); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/src/org/buildingsmart/mvd/tmvd/generator/MvdOutputConfigurationProvider.xtend: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.tmvd.generator 2 | 3 | import org.eclipse.xtext.generator.OutputConfigurationProvider 4 | 5 | class MvdOutputConfigurationProvider extends OutputConfigurationProvider { 6 | 7 | public val MVD_GEN = "./mvd-gen" 8 | 9 | override getOutputConfigurations() { 10 | super.getOutputConfigurations() => [ 11 | head.outputDirectory = MVD_GEN 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/src/org/buildingsmart/mvd/tmvd/generator/TextualMVDGenerator.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 3 | */ 4 | package org.buildingsmart.mvd.tmvd.generator 5 | 6 | import com.google.inject.Inject 7 | import org.buildingsmart.mvd.mvdxml.MvdXML 8 | import org.buildingsmart.mvd.tmvd.util.IOHelper 9 | import org.eclipse.emf.ecore.resource.Resource 10 | import org.eclipse.xtext.generator.IFileSystemAccess 11 | import org.eclipse.xtext.generator.IGenerator 12 | 13 | /** 14 | * Generates code from your model files on save. 15 | * 16 | * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation 17 | */ 18 | class TextualMVDGenerator implements IGenerator { 19 | 20 | @Inject extension IOHelper 21 | 22 | override void doGenerate(Resource resource, IFileSystemAccess fsa) { 23 | 24 | val mvdXML = resource.allContents.findFirst[e|e instanceof MvdXML] as MvdXML 25 | 26 | // path segments 27 | val segments = resource.URI.segmentsList 28 | val plugin = segments.get(1) 29 | val fileName = mvdXML.name 30 | 31 | mvdXML.storeAsMVDXML(plugin + "/mvd-xml/" + fileName + ".mvdxml") 32 | 33 | // mvdXML.storeAsTMVD(segments.get(1) + "/tmvd/" + fileName) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/src/org/buildingsmart/mvd/tmvd/interpreter/TextualMVDInterpreter.xtend: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.tmvd.interpreter 2 | 3 | import org.buildingsmart.mvd.mvdxml.ConceptRoot 4 | import org.buildingsmart.mvd.mvdxml.OperatorType 5 | import org.buildingsmart.mvd.mvdxml.TemplateRuleType 6 | import org.buildingsmart.mvd.mvdxml.TemplateRules 7 | 8 | class TextualMVDInterpreter { 9 | 10 | def void validate(ConceptRoot conceptRoot) { 11 | 12 | // get all instances of applicable root entity for checking 13 | var rootEntityType = conceptRoot.applicableRootEntity 14 | 15 | // filter instances further by applying applicability constraints 16 | var applicability = conceptRoot.applicability // TODO reduce amount of instances applicable 17 | conceptRoot.concepts.concept.forEach [ 18 | 19 | // referenced concept template 20 | var referencedConceptTemplate = it.template.ref 21 | it.templateRules.interpret 22 | ] 23 | 24 | } 25 | 26 | def dispatch interpret(TemplateRules rules) { 27 | 28 | var op = rules.operator 29 | 30 | switch (op) { 31 | case OperatorType.AND: { 32 | rules.templateRule.forEach[it.interpret] 33 | } 34 | case OperatorType.OR: { 35 | } 36 | case OperatorType.NOT: { 37 | } 38 | default: { 39 | } 40 | } 41 | } 42 | 43 | def dispatch interpret(TemplateRuleType rule) { 44 | 45 | var expression = rule.parameters 46 | 47 | 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/src/org/buildingsmart/mvd/tmvd/scoping/TextualMVDIndex.xtend: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.tmvd.scoping 2 | 3 | import com.google.inject.Inject 4 | import org.eclipse.emf.ecore.EObject 5 | import org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider 6 | 7 | class TextualMVDIndex { 8 | 9 | @Inject ResourceDescriptionsProvider rdp 10 | 11 | def getResourceDescription(EObject o) { 12 | val index = rdp.getResourceDescriptions(o.eResource) 13 | index.getResourceDescription(o.eResource.URI) 14 | } 15 | 16 | def getExportedEObjectDescriptions(EObject o) { 17 | o.resourceDescription.exportedObjects 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/src/org/buildingsmart/mvd/tmvd/scoping/TextualMVDScopeProvider.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 3 | */ 4 | package org.buildingsmart.mvd.tmvd.scoping 5 | 6 | import org.buildingsmart.mvd.mvdxml.ApplicabilityType 7 | import org.buildingsmart.mvd.mvdxml.Concept 8 | import org.buildingsmart.mvd.mvdxml.ConceptTemplate 9 | import org.buildingsmart.mvd.mvdxml.ReferencesType 10 | import org.eclipse.emf.ecore.EObject 11 | import org.eclipse.emf.ecore.EReference 12 | import org.eclipse.xtext.EcoreUtil2 13 | import org.eclipse.xtext.scoping.Scopes 14 | import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider 15 | 16 | /** 17 | * This class contains custom scoping description. 18 | * 19 | * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#scoping 20 | * on how and when to use it. 21 | * 22 | */ 23 | class TextualMVDScopeProvider extends AbstractDeclarativeScopeProvider { 24 | 25 | def scope_GenericReference_ref(ApplicabilityType context, EReference reference) { 26 | getConceptTemplateScopes(context); 27 | } 28 | 29 | def scope_GenericReference_ref(ReferencesType context, EReference reference) { 30 | getConceptTemplateScopes(context); 31 | } 32 | 33 | def scope_GenericReference_ref(Concept context, EReference reference) { 34 | getConceptTemplateScopes(context); 35 | } 36 | 37 | def getConceptTemplateScopes(EObject context) { 38 | val candidates = getCandidates(context, ConceptTemplate) 39 | return Scopes::scopeFor(candidates) 40 | } 41 | 42 | /** 43 | * Collect a list of candidates by going through the model 44 | */ 45 | def getCandidates(EObject context, Class type) { 46 | val rootElement = EcoreUtil2.getRootContainer(context) 47 | return EcoreUtil2.getAllContentsOfType(rootElement, type) 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/src/org/buildingsmart/mvd/tmvd/serializer/TextualMVDSemanticSequencer.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 3 | */ 4 | package org.buildingsmart.mvd.tmvd.serializer 5 | 6 | class TextualMVDSemanticSequencer extends AbstractTextualMVDSemanticSequencer { 7 | } 8 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/src/org/buildingsmart/mvd/tmvd/serializer/TextualMVDSyntacticSequencer.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 3 | */ 4 | /* 5 | * generated by Xtext 6 | */ 7 | package org.buildingsmart.mvd.tmvd.serializer; 8 | 9 | 10 | class TextualMVDSyntacticSequencer extends AbstractTextualMVDSyntacticSequencer { 11 | } 12 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd.tmvd/src/org/buildingsmart/mvd/tmvd/util/RulesTreePrinter.xtend: -------------------------------------------------------------------------------- 1 | package org.buildingsmart.mvd.tmvd.util 2 | 3 | import org.buildingsmart.mvd.mvdxml.RulesType 4 | import org.buildingsmart.mvd.mvdxml.AttributeRulesType 5 | import org.buildingsmart.mvd.mvdxml.AttributeRule 6 | import org.buildingsmart.mvd.mvdxml.EntityRulesType 7 | import org.buildingsmart.mvd.mvdxml.EntityRule 8 | 9 | class RulesTreePrinter { 10 | 11 | def dispatch CharSequence tree(RulesType rules) { 12 | rules.attributeRule.map [ 13 | ''' - «tree»''' 14 | ].join('\n') 15 | } 16 | 17 | def dispatch CharSequence tree(AttributeRulesType rules) { 18 | rules.attributeRule.map [ 19 | ''' - «tree»''' 20 | ].join('\n') 21 | } 22 | 23 | def dispatch CharSequence tree(AttributeRule rule) { 24 | if (rule.entityRules != null) { 25 | return ''' 26 | «rule.name» 27 | «tree(rule.entityRules)» 28 | ''' 29 | } 30 | '''«rule.name»''' 31 | } 32 | 33 | def dispatch CharSequence tree(EntityRulesType rules) { 34 | rules.entityRule.map [ 35 | ''' - «tree»''' 36 | ].join('\n') 37 | } 38 | 39 | def dispatch CharSequence tree(EntityRule rule) { 40 | if (rule.attributeRules != null) { 41 | return ''' 42 | «rule.name» 43 | «print(rule.attributeRules)» 44 | ''' 45 | } 46 | if (rule.references != null) { 47 | return ''' 48 | «rule.name» 49 | «tree(rule.references.template.ref.rules)» 50 | ''' 51 | } 52 | '''«rule.name»''' 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.buildingsmart.mvd 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.xtext.ui.shared.xtextBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.ManifestBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.pde.SchemaBuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jdt.core.javanature 31 | org.eclipse.pde.PluginNature 32 | org.eclipse.xtext.ui.shared.xtextNature 33 | 34 | 35 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: %pluginName 4 | Bundle-SymbolicName: org.buildingsmart.mvd;singleton:=true 5 | Bundle-Version: 1.0.0.qualifier 6 | Bundle-ClassPath: . 7 | Bundle-Vendor: %providerName 8 | Bundle-Localization: plugin 9 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 10 | Export-Package: org.buildingsmart.mvd.mvdxml; 11 | uses:="org.eclipse.emf.ecore, 12 | org.eclipse.emf.common.util, 13 | org.eclipse.emf.ecore.util", 14 | org.buildingsmart.mvd.mvdxml.impl; 15 | uses:="org.eclipse.emf.ecore, 16 | org.eclipse.emf.ecore.impl, 17 | org.eclipse.emf.common.util, 18 | org.eclipse.emf.common.notify, 19 | org.eclipse.emf.ecore.util, 20 | org.buildingsmart.mvd.mvdxml", 21 | org.buildingsmart.mvd.mvdxml.util; 22 | uses:="org.eclipse.emf.ecore, 23 | org.eclipse.emf.ecore.resource.impl, 24 | org.eclipse.emf.ecore.xmi.impl, 25 | org.buildingsmart.mvd.mvdxml, 26 | org.eclipse.emf.ecore.xml.type.util, 27 | org.eclipse.emf.ecore.xmi.util, 28 | org.eclipse.emf.common.util, 29 | org.eclipse.emf.ecore.resource, 30 | org.eclipse.emf.common.notify, 31 | org.eclipse.emf.common.notify.impl, 32 | org.eclipse.emf.ecore.util" 33 | Require-Bundle: org.eclipse.core.runtime, 34 | org.eclipse.emf.ecore;visibility:=reexport, 35 | org.eclipse.emf.ecore.xmi;visibility:=reexport 36 | Bundle-ActivationPolicy: lazy 37 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd/build.properties: -------------------------------------------------------------------------------- 1 | # 2 | 3 | bin.includes = .,\ 4 | model/,\ 5 | META-INF/,\ 6 | plugin.xml,\ 7 | plugin.properties,\ 8 | src-gen/ 9 | jars.compile.order = . 10 | source.. = src-gen/ 11 | output.. = bin/ 12 | src.includes = src-gen/,\ 13 | model/ 14 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd/plugin.properties: -------------------------------------------------------------------------------- 1 | # 2 | 3 | pluginName = MvdXML_V1_1RC Model 4 | providerName = www.example.org 5 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /org.buildingsmart.mvd/src-gen/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore -------------------------------------------------------------------------------- /viatra.mvd.query.example/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /viatra.mvd.query.example/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | viatra.mvd.query.example 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.xtext.ui.shared.xtextBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.viatra.query.tooling.ui.projectbuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.pde.ManifestBuilder 25 | 26 | 27 | 28 | 29 | org.eclipse.pde.SchemaBuilder 30 | 31 | 32 | 33 | 34 | 35 | org.eclipse.pde.PluginNature 36 | org.eclipse.jdt.core.javanature 37 | org.eclipse.xtext.ui.shared.xtextNature 38 | org.eclipse.viatra.query.projectnature 39 | 40 | 41 | -------------------------------------------------------------------------------- /viatra.mvd.query.example/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /viatra.mvd.query.example/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.compliance=1.7 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.7 8 | -------------------------------------------------------------------------------- /viatra.mvd.query.example/.settings/org.eclipse.pde.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | pluginProject.equinox=false 3 | resolve.requirebundle=false 4 | -------------------------------------------------------------------------------- /viatra.mvd.query.example/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: test 4 | Bundle-SymbolicName: viatra.mvd.query.example;singleton:=true 5 | Bundle-Version: 0.0.1.qualifier 6 | Export-Package: viatra.mvd.query.example, 7 | viatra.mvd.query.example.util 8 | Require-Bundle: org.eclipse.emf.ecore, 9 | org.eclipse.viatra.query.runtime, 10 | org.eclipse.xtext.xbase.lib, 11 | org.buildingsmart.ifc4;bundle-version="0.3.1", 12 | org.eclipse.viatra.query.patternlanguage, 13 | org.eclipse.viatra.query.patternlanguage.emf, 14 | org.eclipse.viatra.transformation.runtime.emf 15 | Bundle-RequiredExecutionEnvironment: JavaSE-1.7 16 | Import-Package: org.apache.log4j 17 | -------------------------------------------------------------------------------- /viatra.mvd.query.example/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = META-INF/,\ 2 | .,\ 3 | plugin.xml 4 | source.. = src/,\ 5 | src-gen/ 6 | output.. = bin/ 7 | -------------------------------------------------------------------------------- /viatra.mvd.query.example/src/viatra/mvd/query/example/Aggregate.vql: -------------------------------------------------------------------------------- 1 | package viatra.mvd.query.example 2 | 3 | import "http://www.bitub.de/IFC4" 4 | import "http://www.eclipse.org/emf/2002/Ecore" 5 | 6 | // get all aggregates 7 | // 8 | pattern Aggregates(ApplicableEntity : IfcObjectDefinition, Object : IfcObject) { 9 | IfcObjectDefinition.isDecomposedBy(ApplicableEntity, IfcRelAggregates); 10 | IfcRelAggregates.relatedObjects(IfcRelAggregates, Object); 11 | } 12 | 13 | // associates type 14 | // 15 | pattern BuildingType(Building : IfcBuilding, Type : IfcObject) { 16 | find Aggregates(Building, Type); 17 | } 18 | 19 | ///////////// 20 | pattern BuildingStoreyType(BuildingStorey : IfcBuildingStorey) { 21 | find Aggregates(BuildingStorey, Object); 22 | IfcSpace(Object); 23 | } 24 | 25 | ///////////// 26 | @Constraint(key = { 27 | Project }, severity = "error", message = "Wrong data $Project$") 28 | pattern ProjectType(Project : IfcProject) { 29 | find Aggregates(Project, Object); 30 | IfcSite(Object); 31 | } 32 | 33 | ////////////// 34 | pattern SiteType(Site : IfcSite) { 35 | find Aggregates(Site, Object); 36 | IfcBuilding(Object); 37 | } 38 | 39 | @Constraint(key = { 40 | Project }, severity = "error", message = "Wrong data $Project$") 41 | pattern notProjectType(Project : IfcProject) { 42 | neg find ProjectType(Project); 43 | } 44 | --------------------------------------------------------------------------------