showing node labels
Hello,
I am writing a Layout Plugin (for version 0.9.1) and I would like to set the node labels visible. I thought that this code would work, but I get the error below.
in pom.xml
<dependency>
<groupId>org.gephi</groupId>
<artifactId>visualization</artifactId>
</dependency>"
in code itself
import org.gephi.visualization.VizController; import org.gephi.visualization.VizModel;
VizModel vizModel = VizController.getInstance().getVizModel(); vizModel.getTextModel().setShowNodeLabels(true);
[ERROR] Project depends on packages not accessible at runtime in module org.gephi:visualization:jar:0.9.1
What am I missing?
Thanks!
I have the exact same issue. Did you solve it?
Hi, I did not find a solution to solve this issue. Apparently the latest version provides less freedom to plugin developers. But I have to say it has been a while since a last worked on this...
Yes, I saw. This function could be really handy. I hope later they give it back, or provide some other solution for this.
I hope so as well...
That's strange. I think it should just work, since the package is made public in the pom: https://github.com/gephi/gephi/blob/master/modules/VisualizationImpl/pom.xml#L212
What imports are you using from this module?
If I remember well, the problem is with the TextModel.
<dependencies>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>visualization-api</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>tools-api</artifactId>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util-lookup</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>graph-api</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>visualization</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>layout-plugin</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>ui-library-wrapper</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>layout-api</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>ui-propertyeditor</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>project-api</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>ui-utils</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>tools-api</artifactId>
</dependency>
</dependencies>
And the imports are: import org.gephi.visualization.text.TextModelImpl; import org.gephi.visualization.VizController; import org.gephi.visualization.VizModel;
Error: Private classes referenced in module: [org.gephi.visualization.text.TextModelImpl] Project depends on packages not accessible at runtime in module org.gephi:visualization:jar:0.9.1 ... Failed to execute goal org.codehaus.mojo:nbm-maven-plugin:3.14:manifest (default-manifest) on project layout: See above for failures in runtime NetBeans dependencies verification. -> [Help 1]
Can it happen that <publicPackage>org.gephi.visualization.text</publicPackage> is missing from there?
Right, org.gephi.visualization.text must be the problem. What classes do you use from that? We can make it public in next release/update
TextModelImpl. It is nice to hear. However, I am not very good at using maven (just wrote my first plugin yesterday), please check it, to be sure.
As a workaround maybe you are able to do the call with reflection or something, but I am not sure that will work.
I made a pull request, to gephi, I hope it helps. https://github.com/gephi/gephi/pull/1572
Great, I think it will have to be done for 0.9.2 instead of 0.9.1 as an update since you can't compile the plugin against the 0.9.1 release artifacts in maven.
Thanks, I am looking forward to it!