From ac876256b794852dcad3ea65743489c91c4f48ec Mon Sep 17 00:00:00 2001 From: Simon Pizonka Date: Thu, 12 Apr 2018 20:49:26 +0200 Subject: [PATCH] Fixes #857 - Removes line wraps before property description Signed-off-by: Simon Pizonka --- .../vorto/editor/datatype/formatting/DatatypeFormatter.xtend | 4 ++++ .../functionblock/formatting/FunctionblockFormatter.xtend | 3 +++ 2 files changed, 7 insertions(+) diff --git a/bundles/org.eclipse.vorto.editor.datatype/src/org/eclipse/vorto/editor/datatype/formatting/DatatypeFormatter.xtend b/bundles/org.eclipse.vorto.editor.datatype/src/org/eclipse/vorto/editor/datatype/formatting/DatatypeFormatter.xtend index 6695ab03ca..a65589bcb0 100644 --- a/bundles/org.eclipse.vorto.editor.datatype/src/org/eclipse/vorto/editor/datatype/formatting/DatatypeFormatter.xtend +++ b/bundles/org.eclipse.vorto.editor.datatype/src/org/eclipse/vorto/editor/datatype/formatting/DatatypeFormatter.xtend @@ -82,5 +82,9 @@ class DatatypeFormatter extends AbstractDeclarativeFormatter { c.setNoSpace().after(f.propertyAccess.commaKeyword_5_3_0) c.setNoSpace().before(f.enumAccess.commaKeyword_11_1_0) + + //Property description + c.setNoLinewrap().before(f.propertyAccess.descriptionAssignment_7) + c.setLinewrap(2).after(f.propertyAccess.descriptionAssignment_7) } } 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 0527caccb9..e84880b58b 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 @@ -86,5 +86,8 @@ class FunctionblockFormatter extends AbstractDeclarativeFormatter { c.setNoSpace().before(f.operationAccess.commaKeyword_4_1_0) c.setLinewrap(1).after(f.operationAccess.commaKeyword_4_1_0) + //Property description + c.setNoLinewrap().before(f.propertyAccess.descriptionAssignment_7) + c.setLinewrap(2).after(f.propertyAccess.descriptionAssignment_7) } }