...
 
Commits (5)
......@@ -572,7 +572,7 @@ Identifier returns ecore::EString:
;
QIdentifier returns ecore::EString:
ID ('.' ID)+
ID ('.' ID)*
;
......@@ -603,7 +603,7 @@ ElementImport returns tdl::ElementImport:
|
(importedElement+=[tdl::PackageableElement|Identifier] ( "," importedElement+=[tdl::PackageableElement|Identifier])*)
)
'from' (importedPackage=[tdl::Package|Identifier] | importedPackage=[tdl::Package|QIdentifier])
'from' (importedPackage=[tdl::Package|QIdentifier])
('with'
'{'
(comment+=Comment (comment+=Comment)*)?
......
......@@ -28,6 +28,9 @@ import org.etsi.mts.tdl.PeriodicBehaviour
import org.etsi.mts.tdl.SingleCombinedBehaviour
import org.etsi.mts.tdl.MultipleCombinedBehaviour
import org.etsi.mts.tdl.ExceptionalBehaviour
import org.etsi.mts.tdl.DataUse
import org.etsi.mts.tdl.ParameterBinding
import org.etsi.mts.tdl.DataInstanceUse
class TDLan2Formatter extends AbstractFormatter2 {
......@@ -138,6 +141,26 @@ class TDLan2Formatter extends AbstractFormatter2 {
t.format
}
e.argument.format
for (c : e.getComment()) {
c.format;
}
for (a : e.getAnnotation()) {
a.format
}
}
def dispatch void format(DataUse e, extension IFormattableDocument document) {
interior(
e.regionFor.keyword('(').append[newLine],
e.regionFor.keyword(')').prepend[newLine],
[indent]
)
for (t : e.argument) {
t.format
}
for (c : e.getComment()) {
c.format;
}
......@@ -146,6 +169,15 @@ class TDLan2Formatter extends AbstractFormatter2 {
}
}
def dispatch void format(ParameterBinding e, extension IFormattableDocument document) {
interior(
e.regionFor.keyword('(').append[newLine],
e.regionFor.keyword(')').prepend[newLine],
[indent]
)
e.prepend[newLine]
}
def dispatch void format(Target e, extension IFormattableDocument document) {
interior(
e.regionFor.keyword('{').append[newLine],
......
......@@ -139,6 +139,9 @@ public class TDLScopeProvider extends AbstractDeclarativeScopeProvider {
} else {
//TODO: handle?
}
} else {
//TODO: double check
elements.addAll(c.getEndPoint());
}
// GateReference opposite = ((Message) context).getTarget().get(0).getTargetGate();
......
......@@ -85,7 +85,7 @@ public class TranslationHandler extends AbstractHandler {
tr.getContents().addAll(EcoreUtil.copyAll(r.getContents()));
try {
tr.save(null);
} catch (IOException e1) {
} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
......
......@@ -71,7 +71,7 @@ public class TransformationHandler extends AbstractHandler {
Resource ir = rs.createResource(interimURI);
transformer.transform(r, ir);
URI targetURI = URI.createURI(uri.toString()+".ttcn3");
URI targetURI = URI.createPlatformResourceURI(file.getFullPath().toString()+".ttcn3", true);
Injector injector = Guice.createInjector(new de.ugoe.cs.swe.TTCN3RuntimeModule());
XtextResourceSet resourceSet = injector.getInstance(XtextResourceSet.class);
Resource tr = resourceSet.createResource(targetURI);
......