Skip to content

Bridging Centrality Plugin #200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jan 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,22 +133,21 @@ Gephi can be extended in many ways but the major categories are `Layout`, `Expor

Plugins can use any JVM languages (e.g. Scala, Python, Groovy) but the default option is Java.

#### Can native librairies be used?
#### Can native libraries be used?

Yes, native librairies can be used in modules.
Yes, native libraries can be used in modules.

#### How is this repository structured?

The `modules` folder is where plugin modules go. Each plugin is defined in a in single folder in this directory. A plugin can be composed of multiple modules (it's called a suite then) but usually one is enough to do what you want.
The `modules` folder is where plugin modules go. Each plugin is defined in a single folder in this directory. A plugin can be composed of multiple modules (it's called a suite then) but usually one is enough to do what you want.

The `pom.xml` file in `modules` is the parent pom for plugins. A Maven pom can inherit configurations from a parent and that is something we use to keep each plugin's pom very simple. Notice that each plugin's pom (i.e. the `pom.xml` file in the plugin folder) has a `<parent>` defined.

The `pom.xml` file at the root folder makes eveything fit together and notably lists the modules.
The `pom.xml` file at the root folder makes everything fit together and notably lists the modules.

#### How are the manifest settings defined?

There are two options. The first option is what the `generate` task does: it puts entries `OpenIDE-Module-Short-Description`, `OpenIDE-Module-Long-Description`, `OpenIDE-Module-Display-Category` and `OpenIDE-Module-Name` into the `src/main/nbm/manifest.mf` file. The second option sets a `
OpenIDE-Module-Localizing-Bundle` entry into the `manifest.mf` so values are defined elsewhere in `Bundle.properties` file. The value is then simply the path to the file (e.g. `OpenIDE-Module-Localizing-Bundle: org/project/Bundle.properties`).
There are two options. The first option is what the `generate` task does: it puts entries `OpenIDE-Module-Short-Description`, `OpenIDE-Module-Long-Description`, `OpenIDE-Module-Display-Category` and `OpenIDE-Module-Name` into the `src/main/nbm/manifest.mf` file. The second option sets a `OpenIDE-Module-Localizing-Bundle` entry into the `manifest.mf` so values are defined elsewhere in `Bundle.properties` file. The value is then simply the path to the file (e.g. `OpenIDE-Module-Localizing-Bundle: org/project/Bundle.properties`).

The second option is preferable when the short or long description have too many characters as the manifest format is pretty restrictive.

Expand Down Expand Up @@ -185,7 +184,7 @@ The list of Gephi and Netbeans dependencies one can use can be found in the `mod

#### What are public packages for?

This applies for suite plugins with multiple modules. A module should declare the packages it wants to nake accessible to other modules. For instance, if a module `B` depends on the class `my.org.project.ExampleController` defined in a module `A`, the `A` module should declare `my.org.project` as public package.
This applies for suite plugins with multiple modules. A module should declare the packages it wants to make accessible to other modules. For instance, if a module `B` depends on the class `my.org.project.ExampleController` defined in a module `A`, the `A` module should declare `my.org.project` as public package.

Public packages are configured in the module's `pom.xml` file. Edit the `<publicPackages>` entry. Example:

Expand Down
4 changes: 4 additions & 0 deletions modules/BridgingPlugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Bridge Plugin

This README supports Markdown, see [syntax](https://help.github.com/articles/markdown-basics/)

18 changes: 18 additions & 0 deletions modules/BridgingPlugin/nb-configuration.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-shared-configuration>
<!--
This file contains additional configuration written by modules in the NetBeans IDE.
The configuration is intended to be shared among all the users of project and
therefore it is assumed to be part of version control checkout.
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
-->
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
<!--
Properties that influence various parts of the IDE, especially code formatting and the like.
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
That way multiple projects can share the same settings (useful for formatting rules for example).
Any value defined here will override the pom.xml file value but is only applicable to the current project.
-->
<org-netbeans-modules-whitelist.whitelist-oracle>false</org-netbeans-modules-whitelist.whitelist-oracle>
</properties>
</project-shared-configuration>
16 changes: 16 additions & 0 deletions modules/BridgingPlugin/nbactions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<actionName>run</actionName>
<packagings>
<packaging>nbm</packaging>
</packagings>
<goals>
<goal>nbm:cluster</goal>
<goal>nbm:run-ide</goal>
</goals>
<properties>
<netbeans.run.params>-J-Xmx1024m -J-Xss2m -J-Xms32m -J-XX:PermSize=32m</netbeans.run.params>
</properties>
</action>
</actions>
97 changes: 97 additions & 0 deletions modules/BridgingPlugin/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>gephi-plugin-parent</artifactId>
<groupId>org.gephi</groupId>
<version>0.9.2</version>
</parent>

<groupId>ia.ppgco.facom.ufu.br</groupId>
<artifactId>bridge-plugin</artifactId>
<version>1.0.1</version>
<packaging>nbm</packaging>

<name>Bridging Centrality Plugin</name>
<description>Bridging Centrality plugin.</description>

<dependencies>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>statistics-api</artifactId>
<exclusions>
<exclusion>
<groupId>org.gephi</groupId>
<artifactId>utils-longtask</artifactId>
</exclusion>
<exclusion>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>graph-api</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>statistics-plugin</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>utils-longtask</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>ui-utils</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>utils</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>core-library-wrapper</artifactId>
<exclusions>
<exclusion>
<groupId>jfree</groupId>
<artifactId>jfreechart</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util</artifactId>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util-lookup</artifactId>
</dependency>
<dependency>
<groupId>org.jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>1.0.19</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<configuration>
<licenseName>Apache 2.0</licenseName>
<author>Getúlio de Morais Pereira and Anderson Rodrigues dos Santos</author>
<authorEmail>santosardr@ufu.br</authorEmail>
<sourceCodeUrl>$sourcecode_url</sourceCodeUrl>
<publicPackages>
<!-- Insert public packages -->
</publicPackages>
</configuration>
</plugin>
</plugins>
</build>
</project>


Loading