Page 1 of 1

Gephi plugin doesn't stop

Posted: 15 Nov 2017 17:04
by CodeIt
I am writing on a plugin for Gephi in which the label of the nodes change depending on the labels of the neighbor nodes.
This should serve the clustering.
The changed labels will show in a column of the data labor. So far the code works.
As soon as the labels should not change, stop the programm should be stopped.
And here is the problem the program doesn't stop.
I use the ColumnObserver and the observer.hasColumnChanged() method. See the following code part:

public void execute(GraphModel graphModel){
Table nodeTable = graphModel.getNodeTable();

Column col = nodeTable.getColumn(prob);
if (col == null) {
col = nodeTable.addColumn(prob, String.class);
ColumnObserver observer = col.createColumnObserver(true);

Graph graph = graph.Model.getGraph();
Node[] nodes = graph.getNodes().toArray();
boolean changed = true;
for (Node n: nodes){
n.setLabel(newLabel); //here should be a method() to check the graph if a change of the labels occured

if (observer.hasColumnChanged()){
change = true;
change = false;

What could be the reason why the program does not stop.

For any help thanks in advance

Re: Gephi plugin doesn't stop

Posted: 15 Nov 2017 17:16
by eduramiba