[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 583: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 639: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
Gephi forums •Help with creating a layout plugin
Page 1 of 2

Help with creating a layout plugin

Posted: 19 May 2016 13:22
by suryanash
Hi there,

I have been using Gephi-Toolkit for the past couple of months on a university project to layout some network graphs but now I have been trying to create a modification of the ForceAtlas2 layout. I have tried to fork both the gephi-plugins and gephi-plugins-bootcamp code to start my work however I run into a lot of issues with maven. I am currently trying to work off of the gephi-plugins-bootcamp code, but when I try to run

Code: Select all

mvn clean package
I get the following error:

Code: Select all

Failed to execute goal org.gephi:gephi-maven-plugin:1.1.2-SNAPSHOT:validate (validate-plugin) on project gephi-plugins: Multiple module suites have been found, this is not supported -> [Help 1]
I have tried commenting out the other plugins but then I get other errors. Could someone help me get started with writing my own gephi plugin? I want to start my modification from the existing ForceAtlas2 modification, so my plan was to copy over the implementation in gephi and after identical plugin works to then build upon it.

Thanks,

Surya

Re: Help with creating a layout plugin

Posted: 19 May 2016 14:16
by eduramiba
Hi,
In your modules section there can be only one module that other modules do not depend on. Also try to use gephi-plugins instead, not sure if the bootcamp is completely updated.

Re: Help with creating a layout plugin

Posted: 19 May 2016 14:55
by suryanash
Thanks, I am trying to work from just the gephi-plugins fork now. I have created my own module (GravityPlugin) now but am having trouble adding in the grid layout code from the bootcamp (the files I downloaded/copy pasted were GridLayout.java and GridLayoutBuilder.java). I have placed the code in the path of ../gephi-plugins/modules/GravityPlugin/src/main/ but initially had them in ../gephi-plugins/modules/GravityPlugin/src/main/java/ but ran into wrong package issues. However I am still unable to to use/see this layout when I run the plugin project.

I am fairly unfamiliar with maven and the structuring of the project as I have only really used POOJ when using Java, so I apologise.

Is there some a guide or another forum post that I should look at on how to get my custom layout set up? I imagine for people with more experience with maven the gephi-plugins-bootcamp should suffice but I found I am finding it hard to replicate.

Thanks,

Surya

Re: Help with creating a layout plugin

Posted: 19 May 2016 16:15
by eduramiba
You can check how it should be done in the Geolayout plugin, which is working correctly: https://github.com/gephi/gephi-plugins/ ... /GeoLayout

Re: Help with creating a layout plugin

Posted: 19 May 2016 18:17
by suryanash
Ah I see, I have now set up my directories like that. Thanks, I now have no errors in Netbeans. When I run gephi by right clicking gephi-plugins and running it, I can't seem to see the layout listed anywhere. However I can see the plugin when I go to Tools > Plugins in Installed.

Re: Help with creating a layout plugin

Posted: 19 May 2016 19:32
by eduramiba
Cool, make sure you have a layout builder like https://github.com/gephi/gephi-plugins/ ... ilder.java and is annotated with the @ServiceProvider(service = LayoutBuilder.class) annotation.

Re: Help with creating a layout plugin

Posted: 23 May 2016 11:34
by suryanash
I do have the annotation, however it still was not working so I tried to start using the geo plugin instead of the grid one, however I ended up getting stuck in the same place. Here is my current repo: https://github.com/suryanash/gephi-plugins

Does anything stick out as incorrectly done to you?

Re: Help with creating a layout plugin

Posted: 23 May 2016 11:48
by eduramiba
Looks fine, are you runing it from your gephi-plugins root folder with this command?

mvn org.gephi:gephi-maven-plugin:run

That or just click Run in Netbeans from the root (gephi-plugins) maven project.

Re: Help with creating a layout plugin

Posted: 23 May 2016 11:54
by suryanash
Okay I will try running it through the console instead, I have been running it through netbeans by running the gephi-plugins project.

When gephi runs, is the plugin layout supposed to appear in the drop down with the other layouts? Also I just realised when I click on Plugins in the menu bar (not Tools > Plugins, just Plugins) nothing happens. Not sure if thats related though.

Re: Help with creating a layout plugin

Posted: 23 May 2016 11:57
by eduramiba
Yes it should appear in layouts.
The plugins menu is only a place holder for possible plugins, so it's normally empty.