mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 16:58:56 +00:00
fixed FormatterTest.testLinewrapDatatypeRuleRef1 (see bug 347782)
This commit is contained in:
parent
915e9dead8
commit
644bb665d2
2 changed files with 4 additions and 2 deletions
|
@ -108,6 +108,8 @@ public class CrossReferenceSerializer implements ICrossReferenceSerializer {
|
|||
String text = linkingHelper.getCrossRefNodeAsString(node, true);
|
||||
QualifiedName qn = qualifiedNameConverter.toQualifiedName(text);
|
||||
URI targetURI = EcoreUtil.getURI(target);
|
||||
if (target.eResource() != null && target.eResource().getResourceSet() != null)
|
||||
targetURI = target.eResource().getResourceSet().getURIConverter().normalize(targetURI);
|
||||
for (IEObjectDescription desc : scope.getElements(qn))
|
||||
if (desc.getEObjectURI().equals(targetURI))
|
||||
return tokenUtil.serializeNode(node);
|
||||
|
|
|
@ -246,12 +246,12 @@ public class FormatterTest extends AbstractXtextTests {
|
|||
assertFormattedNM(expected, model, 0, model.length());
|
||||
}
|
||||
|
||||
@Ignore@Test public void testLinewrapDatatypeRuleRef1() throws Exception {
|
||||
@Test public void testLinewrapDatatypeRuleRef1() throws Exception {
|
||||
final String model = "test linewrap fqn ab .cd .ef; fqnref ab. cd. ef;";
|
||||
final String expected = "test linewrap\nfqn\nab.cd.ef;\nfqnref\nab.cd.ef;";
|
||||
// assertFormattedPTC(expected, model);
|
||||
assertFormattedNM(expected, model, 0, model.length());
|
||||
// assertEqualTokenStreams(model);
|
||||
assertEqualTokenStreams(model);
|
||||
}
|
||||
|
||||
@Test public void testLinewrapDatatypeRuleRef2() throws Exception {
|
||||
|
|
Loading…
Reference in a new issue