mirror of
https://github.com/Minres/RDL-Editor.git
synced 2025-07-01 21:43:26 +02:00
Cleanup and fix of old settings
This commit is contained in:
@ -43,16 +43,25 @@ Workflow {
|
||||
backtrack = true
|
||||
}
|
||||
}
|
||||
|
||||
formatter = {
|
||||
generateStub = true
|
||||
}
|
||||
|
||||
serializer = {
|
||||
generateStub = false
|
||||
}
|
||||
|
||||
validator = {
|
||||
// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
|
||||
composedCheck = "org.eclipse.xtext.validation.ImportUriValidator"
|
||||
}
|
||||
|
||||
generator = {
|
||||
generateXtendMain = true
|
||||
}
|
||||
newProjectWizardForEclipse = {
|
||||
|
||||
projectWizard = {
|
||||
generate = true
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,44 @@
|
||||
/*
|
||||
* generated by Xtext 2.14.0
|
||||
*/
|
||||
package com.minres.rdl.formatting2
|
||||
|
||||
import com.minres.rdl.rdl.PropertyDefinition
|
||||
import com.minres.rdl.rdl.Root
|
||||
import org.eclipse.xtext.formatting2.AbstractFormatter2
|
||||
import org.eclipse.xtext.formatting2.IFormattableDocument
|
||||
|
||||
class RDLFormatter extends AbstractFormatter2 {
|
||||
|
||||
//@Inject extension RDLGrammarAccess
|
||||
|
||||
def dispatch void format(Root root, extension IFormattableDocument document) {
|
||||
// TODO: format HiddenRegions around keywords, attributes, cross references, etc.
|
||||
for (include : root.includes) {
|
||||
include.format
|
||||
}
|
||||
for (componentDefinition : root.componentDefinitions) {
|
||||
componentDefinition.format
|
||||
}
|
||||
for (enumDefinition : root.enumDefinitions) {
|
||||
enumDefinition.format
|
||||
}
|
||||
for (instantiation : root.instantiations) {
|
||||
instantiation.format
|
||||
}
|
||||
for (propertyAssignment : root.propertyAssignments) {
|
||||
propertyAssignment.format
|
||||
}
|
||||
for (propertyDefinition : root.propertyDefinitions) {
|
||||
propertyDefinition.format
|
||||
}
|
||||
}
|
||||
|
||||
def dispatch void format(PropertyDefinition propertyDefinition, extension IFormattableDocument document) {
|
||||
// TODO: format HiddenRegions around keywords, attributes, cross references, etc.
|
||||
propertyDefinition.usage.format
|
||||
propertyDefinition.^default.format
|
||||
}
|
||||
|
||||
// TODO: implement for ComponentDefinition, Instantiation, ComponentInstance, ExplicitPropertyAssignment, PostPropertyAssignment, InstancePropertyRef, InstanceRef, PropertyAssignmentRhs, Concat, ConcatElem, EnumDefinition, EnumBody, EnumEntry
|
||||
}
|
Reference in New Issue
Block a user