On this page, we describe, how you can build your own plugin. If you share your work with other researchers, feel free to send us your implementation as a plugin by email (firstname.lastname@example.org). We will publish it on our website.
Currently, creating a plugin needs some manual work. There is no tool supporting the creation of a plugin. Although a plugin may contain several extensions, i.e. a new algebra and display classes for the new introduced types, the following sections describe how to create a single extension plugin.
First of all, the algebra must be created. If the algebra works fine, a plugin can be created from it.
We create a new folder outside the Secondo-installation. After that, we copy all source files
into this directory (including
In the same directory, we create a new file
copyright information about this plugin.
SecondoExtension.xml. For the
PointSequenceAlgebrawhich is part of a Secondo distribution, the file has the following content:
...depfile created during compiling Secondo. If there are dependencies to external libraries, these must also be written within the
Dependenciessection. For example, if the
gsllibrary is required by the algebra, the following code must be part of the Dependencies section:
makefile.algebras. The section
SourceCodehas to contain all files which must be copied into the algebra directory except the
example fileand the
spec file. The
ExampleFilesections contain the filenames of the corresponding files. The content of the file from the
Copyrightsection will be displayed after the installation of the plugin. After creating the XML-file, just use the
ziptool to compress all files into a single zip file. The command is:
zip plugin.zip *
viewerdirectory of Secondo's
Javagui. The procedure is similar to the one creating an algebra plugin:
Dependenciessection, the minimum required Secondo version must be specified. Furthermore, the required Java version is given. If there are dependencies to external libraries, they must be listed here. The attributes of a library entry are:
Mainclassentry contains the name of the viewer class. This file is extracted from the zip-file into the Javagui's
viewerdirectory. If the viewer has more than one source file, these files are given in the
Filessection. Besides the filename, the directory of the file relatively to the
viewerdirectory is provided using the
algebradirectory of the
HoeseViewerand may use some supporting classes within a subdirectory of the
algebradirectory. Within a single plugin, several displayclasses may be contained. Again, all required files are copied into an empty directory and zipped together with an XML file. In the following, the code of the XML-file for a plugin providing display classes for periodic moving object is shown.
HoeseExtensionsections. Its sufficient to write them down once. The given location is the directory relatively to the
algebradirectory of the
HoeseViewer. Similar it's enough to give the dependencies for a single display class. The remainder of this file should be self-explanatory.
% Section:Start:Name % Section:End:NameAll extension code must be inserted between existing tags. If some code is outside such blocks, it cannot be converted into a plugin. If the extension needs additional files, copy them into an empty directory. Create the copyright file and an XML-file. The XML-file for an optimizer extension has the following structure:
Dependenciessection only the Secondo version is supported. The
Copyrightsection and the
Filesection are the same as for other plugins. Files are copyied into a directory given as
locationattribute relatively to the
Optimizerdirectory of Secondo. Code snippets which should be inserted into existing files are listed as Blocks. The attribute
fileis the name of the file to modify (within the
sectionattribute specifies the name of the section where the code should be inserted. The attribute
positiondescribes whether the code should be inserted at the start of the section (
first) or at the end of the section (
last), respectively. This is only important if several extensions are installed.
Back to the Plugin page