diff --git a/bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/functionblock/FunctionblockPackage.java b/bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/functionblock/FunctionblockPackage.java
index 9d1a36a148..1145c21e94 100644
--- a/bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/functionblock/FunctionblockPackage.java
+++ b/bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/functionblock/FunctionblockPackage.java
@@ -369,6 +369,15 @@ public interface FunctionblockPackage extends EPackage {
*/
int OPERATION__DESCRIPTION = 3;
+ /**
+ * The feature id for the 'Breakable' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int OPERATION__BREAKABLE = 4;
+
/**
* The number of structural features of the 'Operation' class.
*
@@ -376,7 +385,7 @@ public interface FunctionblockPackage extends EPackage {
* @generated
* @ordered
*/
- int OPERATION_FEATURE_COUNT = 4;
+ int OPERATION_FEATURE_COUNT = 5;
/**
* The meta object id for the '{@link org.eclipse.vorto.core.api.model.functionblock.impl.ReturnTypeImpl Return Type}' class.
@@ -928,6 +937,17 @@ public interface FunctionblockPackage extends EPackage {
*/
EAttribute getOperation_Description();
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.vorto.core.api.model.functionblock.Operation#isBreakable Breakable}'.
+ *
+ *
+ * @return the meta object for the attribute 'Breakable'.
+ * @see org.eclipse.vorto.core.api.model.functionblock.Operation#isBreakable()
+ * @see #getOperation()
+ * @generated
+ */
+ EAttribute getOperation_Breakable();
+
/**
* Returns the meta object for class '{@link org.eclipse.vorto.core.api.model.functionblock.ReturnType Return Type}'.
*
@@ -1340,6 +1360,14 @@ interface Literals {
*/
EAttribute OPERATION__DESCRIPTION = eINSTANCE.getOperation_Description();
+ /**
+ * The meta object literal for the 'Breakable' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute OPERATION__BREAKABLE = eINSTANCE.getOperation_Breakable();
+
/**
* The meta object literal for the '{@link org.eclipse.vorto.core.api.model.functionblock.impl.ReturnTypeImpl Return Type}' class.
*
diff --git a/bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/functionblock/Operation.java b/bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/functionblock/Operation.java
index 19ea0e0f60..053554cbca 100644
--- a/bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/functionblock/Operation.java
+++ b/bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/functionblock/Operation.java
@@ -19,6 +19,7 @@
* {@link org.eclipse.vorto.core.api.model.functionblock.Operation#getParams Params}
* {@link org.eclipse.vorto.core.api.model.functionblock.Operation#getReturnType Return Type}
* {@link org.eclipse.vorto.core.api.model.functionblock.Operation#getDescription Description}
+ * {@link org.eclipse.vorto.core.api.model.functionblock.Operation#isBreakable Breakable}
*
*
* @see org.eclipse.vorto.core.api.model.functionblock.FunctionblockPackage#getOperation()
@@ -120,4 +121,30 @@ public interface Operation extends EObject {
*/
void setDescription(String value);
+ /**
+ * Returns the value of the 'Breakable' attribute.
+ *
+ *
+ * If the meaning of the 'Breakable' attribute isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'Breakable' attribute.
+ * @see #setBreakable(boolean)
+ * @see org.eclipse.vorto.core.api.model.functionblock.FunctionblockPackage#getOperation_Breakable()
+ * @model
+ * @generated
+ */
+ boolean isBreakable();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.vorto.core.api.model.functionblock.Operation#isBreakable Breakable}' attribute.
+ *
+ *
+ * @param value the new value of the 'Breakable' attribute.
+ * @see #isBreakable()
+ * @generated
+ */
+ void setBreakable(boolean value);
+
} // Operation
diff --git a/bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/functionblock/impl/FunctionblockPackageImpl.java b/bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/functionblock/impl/FunctionblockPackageImpl.java
index 687fdef53b..8fe98eee78 100644
--- a/bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/functionblock/impl/FunctionblockPackageImpl.java
+++ b/bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/functionblock/impl/FunctionblockPackageImpl.java
@@ -396,6 +396,15 @@ public EAttribute getOperation_Description() {
return (EAttribute)operationEClass.getEStructuralFeatures().get(3);
}
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getOperation_Breakable() {
+ return (EAttribute)operationEClass.getEStructuralFeatures().get(4);
+ }
+
/**
*
*
@@ -622,6 +631,7 @@ public void createPackageContents() {
createEReference(operationEClass, OPERATION__PARAMS);
createEReference(operationEClass, OPERATION__RETURN_TYPE);
createEAttribute(operationEClass, OPERATION__DESCRIPTION);
+ createEAttribute(operationEClass, OPERATION__BREAKABLE);
returnTypeEClass = createEClass(RETURN_TYPE);
createEAttribute(returnTypeEClass, RETURN_TYPE__MULTIPLICITY);
@@ -716,6 +726,7 @@ public void initializePackageContents() {
initEReference(getOperation_Params(), this.getParam(), null, "params", null, 0, -1, Operation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEReference(getOperation_ReturnType(), this.getReturnType(), null, "returnType", null, 0, 1, Operation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(getOperation_Description(), ecorePackage.getEString(), "description", null, 0, 1, Operation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getOperation_Breakable(), ecorePackage.getEBoolean(), "breakable", null, 0, 1, Operation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEClass(returnTypeEClass, ReturnType.class, "ReturnType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEAttribute(getReturnType_Multiplicity(), ecorePackage.getEBoolean(), "multiplicity", null, 0, 1, ReturnType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/functionblock/impl/OperationImpl.java b/bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/functionblock/impl/OperationImpl.java
index b323a8da9a..1c0d261406 100644
--- a/bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/functionblock/impl/OperationImpl.java
+++ b/bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/functionblock/impl/OperationImpl.java
@@ -35,6 +35,7 @@
* {@link org.eclipse.vorto.core.api.model.functionblock.impl.OperationImpl#getParams Params}
* {@link org.eclipse.vorto.core.api.model.functionblock.impl.OperationImpl#getReturnType Return Type}
* {@link org.eclipse.vorto.core.api.model.functionblock.impl.OperationImpl#getDescription Description}
+ * {@link org.eclipse.vorto.core.api.model.functionblock.impl.OperationImpl#isBreakable Breakable}
*
*
* @generated
@@ -100,6 +101,26 @@ public class OperationImpl extends MinimalEObjectImpl.Container implements Opera
*/
protected String description = DESCRIPTION_EDEFAULT;
+ /**
+ * The default value of the '{@link #isBreakable() Breakable}' attribute.
+ *
+ *
+ * @see #isBreakable()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean BREAKABLE_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isBreakable() Breakable}' attribute.
+ *
+ *
+ * @see #isBreakable()
+ * @generated
+ * @ordered
+ */
+ protected boolean breakable = BREAKABLE_EDEFAULT;
+
/**
*
*
@@ -216,6 +237,27 @@ public void setDescription(String newDescription) {
eNotify(new ENotificationImpl(this, Notification.SET, FunctionblockPackage.OPERATION__DESCRIPTION, oldDescription, description));
}
+ /**
+ *
+ *
+ * @generated
+ */
+ public boolean isBreakable() {
+ return breakable;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void setBreakable(boolean newBreakable) {
+ boolean oldBreakable = breakable;
+ breakable = newBreakable;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FunctionblockPackage.OPERATION__BREAKABLE, oldBreakable, breakable));
+ }
+
/**
*
*
@@ -248,6 +290,8 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) {
return getReturnType();
case FunctionblockPackage.OPERATION__DESCRIPTION:
return getDescription();
+ case FunctionblockPackage.OPERATION__BREAKABLE:
+ return isBreakable();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -274,6 +318,9 @@ public void eSet(int featureID, Object newValue) {
case FunctionblockPackage.OPERATION__DESCRIPTION:
setDescription((String)newValue);
return;
+ case FunctionblockPackage.OPERATION__BREAKABLE:
+ setBreakable((Boolean)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -298,6 +345,9 @@ public void eUnset(int featureID) {
case FunctionblockPackage.OPERATION__DESCRIPTION:
setDescription(DESCRIPTION_EDEFAULT);
return;
+ case FunctionblockPackage.OPERATION__BREAKABLE:
+ setBreakable(BREAKABLE_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -318,6 +368,8 @@ public boolean eIsSet(int featureID) {
return returnType != null;
case FunctionblockPackage.OPERATION__DESCRIPTION:
return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+ case FunctionblockPackage.OPERATION__BREAKABLE:
+ return breakable != BREAKABLE_EDEFAULT;
}
return super.eIsSet(featureID);
}
@@ -336,6 +388,8 @@ public String toString() {
result.append(name);
result.append(", description: "); //$NON-NLS-1$
result.append(description);
+ result.append(", breakable: "); //$NON-NLS-1$
+ result.append(breakable);
result.append(')');
return result.toString();
}
diff --git a/bundles/org.eclipse.vorto.editor.functionblock/src/org/eclipse/vorto/editor/functionblock/Functionblock.xtext b/bundles/org.eclipse.vorto.editor.functionblock/src/org/eclipse/vorto/editor/functionblock/Functionblock.xtext
index 9a6bb6bac8..3cd9334df7 100644
--- a/bundles/org.eclipse.vorto.editor.functionblock/src/org/eclipse/vorto/editor/functionblock/Functionblock.xtext
+++ b/bundles/org.eclipse.vorto.editor.functionblock/src/org/eclipse/vorto/editor/functionblock/Functionblock.xtext
@@ -72,7 +72,7 @@ Fault:
;
Operation :
- name=ID '(' (params += Param (',' params+=Param)*)?')' ('returns' returnType = ReturnType)? (description=STRING)?
+ (breakable ?= 'breakable')? name=ID '(' (params += Param (',' params+=Param)*)?')' ('returns' returnType = ReturnType)? (description=STRING)?
;
ReturnType :
diff --git a/bundles/org.eclipse.vorto.editor.functionblock/src/org/eclipse/vorto/editor/functionblock/formatting/FunctionblockFormatter.xtend b/bundles/org.eclipse.vorto.editor.functionblock/src/org/eclipse/vorto/editor/functionblock/formatting/FunctionblockFormatter.xtend
index 6dde6bf91b..04f76f89c3 100644
--- a/bundles/org.eclipse.vorto.editor.functionblock/src/org/eclipse/vorto/editor/functionblock/formatting/FunctionblockFormatter.xtend
+++ b/bundles/org.eclipse.vorto.editor.functionblock/src/org/eclipse/vorto/editor/functionblock/formatting/FunctionblockFormatter.xtend
@@ -83,8 +83,8 @@ class FunctionblockFormatter extends AbstractDeclarativeFormatter {
c.setNoSpace().after(f.propertyAccess.commaKeyword_5_3_0)
//Operation parameters.
- c.setNoSpace().before(f.operationAccess.commaKeyword_2_1_0)
- c.setLinewrap(1).after(f.operationAccess.commaKeyword_2_1_0)
+ c.setNoSpace().before(f.operationAccess.commaKeyword_3_1_0)
+ c.setLinewrap(1).after(f.operationAccess.commaKeyword_3_1_0)
}
}