Developer guide

GroIMP load doclet.xml files on startup that contains description of methods and classes.

Access Descriptor files in runtime

The loaded content is added in the runtime registry under /plugins/statics. This directory should have the three directories: methods, fields, and classes. The java objects used are ContentDescriptionType

→ Read more...

You can change navigation with view > navigators > select the one you want.

You can add a new navigator by creating a new plugin. See template navigator.

WIP

Implicit conversion

GroIMP compiler can automatically perform implicit conversions. By default RGG files use this implicit conversions. A common example is the conversion from float to double (and vice versa).

→ Read more...

Groimp enables to includes default imports in files when compiling them. These imports are defined in the registry under. /io/filter/xx where xx is the filter type to manage.

Currently only the rgg filter is modified, thus, all .rgg files are compiled with additional default imports.

The paths of default imports are :

  • /io/filter/rgg/packageimports: equivalent to import pckname.*, where pckname is the name of a java package (e.g. java.lang).
  • /io/filter/rgg/singletypeimports: equivalent to import pck.ClassName, where pck.ClassName represent the complete name of a type (e.g. de.grogra.graph.impl.Node).
  • /io/filter/rgg/statictypeimports: equivalent to import static pck.ClassName.

This page only list imports from the RGG plugin. Other plugin can includes default import by adding them in the registry under the paths above.

Package imports

  • java.lang
  • de.grogra.xl.lang
  • de.grogra.annotation
  • de.grogra.rgg
  • de.grogra.turtle
  • de.grogra.imp3d.objects
  • de.grogra.imp3d.shading
  • de.grogra.math
  • javax.vecmath
  • de.grogra.pf.data

→ Read more...

Create object from

Nodes

→ All objects that are supposed to be added in a groimp project should implement persistence management. (project graph & registry)

→ source enhancement

How to create a node class

automatic-code-enhancement

Includes object in production

Custom object persistence

Disposable Nodes/Fields

Implicit conversion

graph-listeners

user-pattern

Add to the Git repository

Disposable Nodes/Fields

A Node is considered deleted when it is removed from the graph. The Node is made “transient”, i.e. it is not handled by the persistence manager anymore.

Once a Node is “transient” it will be automatically garbage collected by Java. However, a Node can have attributes (fields in java) that require a specific dispose method (e.g cloud objects, or secondary graph).

In most cases, the nodes are not “informed” that they are made transient, thus it is not convenient to add a listener on them (see the GraphManager's listeners). Indeed, when a Node is deleted, if it has connected edges of Node that are not connected to the graph anymore, they all are deleted. But only the first one is visited.

To ensure an object (that can be used as a Node's attribute) is disposed properly it should implements the DisposableField interface.

→ Read more...

Custom object persistence

GroIMP require Nodes, Node's attributes, and SCOs to be manageable by the persistence manager, to process the save/ load/ query operations.

GroIMP define its own persistence management. To be managed by the GroIMP persistence management, an object need to implements either PersistenceCapable (GroIMP interface), or Serializable (java interface).

Usually the persistence is handled in memory (except when the project is saved), but GroIMP provides a way to integrate it with file persistence (the object is written/loaded from the file). This rely on EmbeddedSharedObject and EmbeddedFileObject.

→ Read more...

mvn compile

mvn package: If the plugin have some java dependencies managed from Maven, the property <maven.assembly.plugin.move-lib>generate-resources</maven.assembly.plugin.move-lib> needs to be added to the pom.xml.

mvn package -P app-with-doc: Add to the package command the compilation of the plugin's doc. Require sudo apt install xsltproc docbook docbook-xsl to be installed.

mvn package -P release

mvn package javadoc:aggregate

GroIMP is designed around plugins which can be added, modified or removed without modifying the GroIMP installation.

GroIMP Plugin

Any repository with a plugin.xml and plugin.properties files is considered as a plugin by GroIMP. To be properly loadable though, the plugin.xml needs to include:

<?xml version="1.0" encoding="UTF-8"?> 
<plugin id="your.plugin.id" 
version="x.x" 
xmlns="http://grogra.de/registry" >

where plugin id and version need to be filled with the plugin information.

See more:

→ Read more...

Plugin repositories

The Plugin Manager uses Plugin repositories to gather knowledge on the available plugins. The repositories can be provided in three formats:

  1. Ordered List ItemAs a JSON file. Which contains the metadata of one or several plugins.The file need to follow the JSON format for plugin data (see bellow).
  2. Ordered List ItemAs a local directory. The directory is automatically scanned to find any Groimp plugin. They are found from their plugin.xml file. The plugin data is then extracted from that file.
  3. Ordered List ItemAs a list of repositories (.list). The .list file is a simple list of any of the three repository formats.

→ Read more...