use of org.eclipse.xtext.parsetree.impl.commentAssociation.Element in project xtext-core by eclipse.
the class CommentAssociationTest method testSerializeReplacement.
// TODO https://github.com/eclipse/xtext-core/issues/32
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=475457
@Ignore
@Test
public void testSerializeReplacement() throws Exception {
String xBlock = "// comment pre x\n" + "element /* comment inside x */ x // comment post x\n" + "";
String yBlock = "// comment pre y\n" + "element /* comment inside y */ y // comment post y\n" + "";
String zBlock = "// comment pre z\n" + "element z";
String textModel = xBlock + yBlock + zBlock;
Model model = (Model) getModel(textModel);
EList<Element> elements = model.getElements();
Element x = elements.get(0);
Element y = elements.get(1);
Element z = elements.get(2);
checkReplaceRegion(x, xBlock, textModel);
checkReplaceRegion(y, yBlock, textModel);
checkReplaceRegion(z, zBlock, textModel);
}
use of org.eclipse.xtext.parsetree.impl.commentAssociation.Element in project xtext-core by eclipse.
the class CommentAssociationTest method testCommentAssociationAtEndOfFile.
@Test
public void testCommentAssociationAtEndOfFile() throws Exception {
String textModel = "element x // comment post x";
Model model = (Model) getModel(textModel);
Multimap<EObject, String> multimap = createModel2CommentMap(model);
EList<Element> elements = model.getElements();
Element x = elements.get(0);
checkComments(multimap, x, "// comment post x");
}
Aggregations