Skip to content

Commit ad97af3

Browse files
committed
Better progress ticket
1 parent e026c35 commit ad97af3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

modules/Neo4jPlugin/src/main/java/org/gephi/plugins/neo4j/importer/Neo4jDatabaseImporter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ public boolean execute(ContainerLoader containerLoader) {
9696
this.container = containerLoader;
9797
this.report = new Report();
9898
if (this.progressTicket != null) {
99+
this.progressTicket.start();
99100
this.progressTicket.setDisplayName("Neo4j import");
100101
this.progressTicket.switchToIndeterminate();
101-
this.progressTicket.start();
102102
}
103103

104104
try {
@@ -295,6 +295,7 @@ private Boolean mergeNodeInGephi(Node neo4jNode) {
295295
private Boolean mergeNodeInGephi(String id, String[] labels, Map<String, Value> attributes) {
296296
if (this.getContainer().nodeExists(id)) return false;
297297

298+
if(this.progressTicket != null) this.progressTicket.progress(String.format("Importing node %s", id));
298299
NodeDraft draft = this.getContainer().factory().newNodeDraft(id);
299300
String mainLabel = (labels != null && labels.length > 0) ? labels[0] : "";
300301

@@ -347,6 +348,7 @@ private Boolean mergeEdgeInGephi(String id, String type, String sourceId, String
347348
return false;
348349
}
349350

351+
if(this.progressTicket != null) this.progressTicket.progress(String.format("Importing edge %s", id));
350352
EdgeDraft draft = this.getContainer().factory().newEdgeDraft(id);
351353
draft.setLabel(type);
352354
draft.setType(type);

0 commit comments

Comments
 (0)