Commit 6d7704bc authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ formatting refinements

parent 59bcad38
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -66,7 +66,9 @@ class TDLan2Formatter extends AbstractFormatter2 {
	
	def dispatch void format(PackageableElement p, extension IFormattableDocument document) {
	    p.prepend[newLine]
        p.allRegionsFor.keyword(';').prepend[noSpace]
	    p.allRegionsFor.keyword(';').append[newLine]
	    p.allRegionsFor.keyword(',').prepend[noSpace]
	    p.append[newLine]
	    
	    interior(
@@ -86,6 +88,7 @@ class TDLan2Formatter extends AbstractFormatter2 {
            }  
            for (m : p.member) {
                m.prepend[newLine]
                m.format
            }          
        } 
        for (Comment comment : p.getComment()) {
@@ -355,6 +358,8 @@ class TDLan2Formatter extends AbstractFormatter2 {

	def dispatch void format(Element e, extension IFormattableDocument document) {
		e.prepend[newLine]
        e.allRegionsFor.keyword(',').prepend[noSpace]
        e.allRegionsFor.keyword(';').prepend[noSpace]
	    
	    interior(
	       	e.regionFor.keyword('{').append[newLine],
@@ -363,9 +368,11 @@ class TDLan2Formatter extends AbstractFormatter2 {
    	)

		for (c : e.getComment()) {
		    c.prepend[newLine]
			c.format;
		}
		for (a : e.getAnnotation()) {
			a.prepend[newLine]
			a.format
		}