Skip to content

Commit

Permalink
Fixes #153 - Added presence modifier to information model functionblo…
Browse files Browse the repository at this point in the history
…cks (#924)

* Fixes #153 - Added presence modifier to information model functionblocks.

Signed-off-by: Simon Pizonka <[email protected]>

* Removed required version from MANIFEST file for datatype.

Signed-off-by: Simon Pizonka <[email protected]>

* Removed unnecessary import of datatype.

Signed-off-by: Simon Pizonka <[email protected]>
  • Loading branch information
Ebolon authored and aedelmann committed May 7, 2018
1 parent 132e607 commit 7ea1ccf
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Bundle-SymbolicName: org.eclipse.vorto.editor.infomodel.ide; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.vorto.editor.infomodel,
org.eclipse.xtext.ide,
org.eclipse.xtext.xbase.ide
org.eclipse.xtext.xbase.ide,
org.eclipse.vorto.editor.datatype
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: org.eclipse.vorto.editor.infomodel.ide.contentassist.a
ntlr.internal,org.eclipse.vorto.editor.infomodel.ide.contentassist.an
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Require-Bundle: org.eclipse.xtext.ui,
org.eclipse.vorto.editor.infomodel,
org.eclipse.xtext.xbase.lib,
org.eclipse.xtend.lib;resolution:=optional,
org.eclipse.vorto.editor.infomodel.ide
org.eclipse.vorto.editor.infomodel.ide,
org.eclipse.vorto.editor.datatype.ui
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: org.eclipse.vorto.editor.infomodel.ui.contentassist,or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ Require-Bundle: org.eclipse.xtext;visibility:=reexport,
org.eclipse.xtext.xbase.lib,
org.eclipse.vorto.editor,
org.eclipse.xtend.lib,
org.eclipse.vorto.editor.functionblock
org.eclipse.vorto.editor.functionblock,
org.eclipse.vorto.editor.datatype
Import-Package: org.apache.log4j,
org.eclipse.vorto.editor.datatype.converter,
org.eclipse.vorto.editor.datatype.validation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Bosch Software Innovations GmbH - Please refer to git log
*
*******************************************************************************/
grammar org.eclipse.vorto.editor.infomodel.InformationModel with org.eclipse.xtext.common.Terminals
grammar org.eclipse.vorto.editor.infomodel.InformationModel with org.eclipse.vorto.editor.datatype.Datatype

import "http://www.eclipse.org/vorto/metamodel/InformationModel"
import "http://www.eclipse.org/vorto/metamodel/Model" as model
Expand Down Expand Up @@ -41,7 +41,7 @@ QualifiedName:
;

FunctionblockProperty:
name = ID 'as' type = [fbs::FunctionblockModel|QualifiedName] (description=STRING)?
(presence = Presence)? name = ID 'as' type = [fbs::FunctionblockModel|QualifiedName] (description=STRING)?
;

terminal VERSION : ('0'..'9')* '.' ('0'..'9')* '.' ('0'..'9')*('-'ID)?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class InformationModelFormatter extends AbstractDeclarativeFormatter {
c.setAutoLinewrap(120)

//Functionblocks
c.setLinewrap(1).before(dsl.functionblockPropertyAccess.nameAssignment_0)
c.setLinewrap(1).before(dsl.functionblockPropertyAccess.nameAssignment_1)

//Block Elements
findKeywordPairs("{","}").forEach[
Expand Down
2 changes: 2 additions & 0 deletions framework/org.eclipse.vorto.core/model/InformationModel.ecore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="ecore:EClass Functionblock.ecore#//FunctionblockModel"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="presence" eType="ecore:EClass Datatype.ecore#//Presence"
containment="true"/>
</eClassifiers>
</ecore:EPackage>

0 comments on commit 7ea1ccf

Please sign in to comment.