提交 91aa3b2c 编写于 作者: M Mathieu Bastian

Fix issue #1193

上级 ad88b82e
...@@ -291,7 +291,7 @@ public class ImporterGML implements FileImporter, LongTask { ...@@ -291,7 +291,7 @@ public class ImporterGML implements FileImporter, LongTask {
} else if ("directed".equalsIgnoreCase(key)) { } else if ("directed".equalsIgnoreCase(key)) {
if (value instanceof Double) { if (value instanceof Double) {
EdgeDirection type = ((Double) value) == 1 ? EdgeDirection.DIRECTED : EdgeDirection.UNDIRECTED; EdgeDirection type = ((Double) value) == 1 ? EdgeDirection.DIRECTED : EdgeDirection.UNDIRECTED;
edge.setType(type); edge.setDirection(type);
} else { } else {
report.logIssue(new Issue(NbBundle.getMessage(ImporterGML.class, "importerGML_error_directedparse", edge.toString()), Issue.Level.WARNING)); report.logIssue(new Issue(NbBundle.getMessage(ImporterGML.class, "importerGML_error_directedparse", edge.toString()), Issue.Level.WARNING));
} }
......
...@@ -406,15 +406,15 @@ public class ImporterGraphML implements FileImporter, LongTask { ...@@ -406,15 +406,15 @@ public class ImporterGraphML implements FileImporter, LongTask {
//Type //Type
if (!directed.isEmpty()) { if (!directed.isEmpty()) {
if (directed.equalsIgnoreCase("true")) { if (directed.equalsIgnoreCase("true")) {
edge.setType(EdgeDirection.DIRECTED); edge.setDirection(EdgeDirection.DIRECTED);
} else if (directed.equalsIgnoreCase("false")) { } else if (directed.equalsIgnoreCase("false")) {
edge.setType(EdgeDirection.UNDIRECTED); edge.setDirection(EdgeDirection.UNDIRECTED);
} else { } else {
report.logIssue(new Issue(NbBundle.getMessage(ImporterGraphML.class, "importerGraphML_error_edgetype", directed, edge), Issue.Level.SEVERE)); report.logIssue(new Issue(NbBundle.getMessage(ImporterGraphML.class, "importerGraphML_error_edgetype", directed, edge), Issue.Level.SEVERE));
edge.setType(edgeDefault); edge.setDirection(edgeDefault);
} }
} else { } else {
edge.setType(edgeDefault); edge.setDirection(edgeDefault);
} }
boolean end = false; boolean end = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册