This page (revision-37) was last changed on 08-Feb-2013 00:41 by Albrecht Striffler

This page was created on 17-Dec-2012 09:42 by LukasBrehl

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
37 08-Feb-2013 00:41 7 KB Albrecht Striffler to previous
36 08-Feb-2013 00:41 7 KB Albrecht Striffler to previous | to last
35 19-Dec-2012 06:48 7 KB Volker Belli to previous | to last
34 19-Dec-2012 06:47 7 KB Volker Belli to previous | to last
33 19-Dec-2012 06:46 7 KB Volker Belli to previous | to last
32 19-Dec-2012 06:43 7 KB Volker Belli to previous | to last
31 19-Dec-2012 06:40 7 KB Volker Belli to previous | to last
30 19-Dec-2012 06:37 6 KB Volker Belli to previous | to last
29 19-Dec-2012 06:33 6 KB Volker Belli to previous | to last
28 19-Dec-2012 06:31 6 KB Volker Belli to previous | to last
27 19-Dec-2012 06:29 6 KB Volker Belli to previous | to last
26 19-Dec-2012 06:04 5 KB Volker Belli to previous | to last
25 17-Dec-2012 17:48 4 KB constin to previous | to last
24 17-Dec-2012 17:33 4 KB constin to previous | to last
23 17-Dec-2012 16:38 4 KB LukasBrehl to previous | to last
22 17-Dec-2012 12:08 4 KB LukasBrehl to previous | to last
21 17-Dec-2012 12:00 4 KB LukasBrehl to previous | to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 7 changed one line
The structure of the XML file is described in more detail in [plugin.xml|Meaning of plugin.xml].
The structure of the XML file is described in more detail in [plugin.xml|Meaning of pluginxml].
At line 17 removed 22 lines
!! Basic Parameters
Every extension defines a set of standard parameters that enabled d3web to use the extension well. Depending on the extension point, there might be additional parameters. The most frequently parameters are as following:
|| Parameter || Description
| class | Defines the class that is used to instantiate the extension's implementation. The class denoted here must implement the java interface that belongs to this extension point. Please note that most extensions will be instantiated by their default constructor.
| name | A unique name of the extension in this plugin.xml. Usually the name shall be unique at all, but this is not necessarily required.
| description | A brief description of the plugin. The description is in some cases also used to be displayed to the user, so use them carefully. Simple html markups are allowed to be used in the description (such as <b>,<br>,<code>,<ol>,<ul>, ...)
| version | Version of this extension implementation.
| priority | The priority of the extension within the same extension point. The lower the number, the more the extension is prioritized.
| scope | The scope of this extension. The scope is only used for KnowWE-extensions. Defines a set of sections, where this extension should be applied to.
!! Working with Priorities
The priority of the extension is a number compared to all the other priorities within the same extension point. The lower the number, the more the extension is prioritized. Most extensions use 5, but always use a number between 1 and 9. Fractional numbers are allowed.
The priority defines the order the extensions are considered by the specific extension points. Depending on the extension point different priorities may lead to completely different results. See the table below to get some idea how priorities will effect the behavior:
|| Extension Point || Effect of Priority
| ToolProvider | Defines the order tool menu items in the tool menu of a specific section. The tool menu items from prioritized ToolProviders are displayed before other ones.
| Renderer | For a specific section type (based on a matching scope, see below), only the renderer with the highest priority is selected to render the section. With more prioritized implementations you can redefine the rendering of a wiki page.
At line 41 changed one line
A scope is an selector of a specific subset of KDOM nodes. Its selection is based on the type of the KDOM nodes itself as well as on the type of the KDOM node's anchestors. It can be compared a little bit to the css selectors.
There are only a few Extension Points with a Scope.
At line 43 removed 15 lines
The scope is a path of those KDOM node types that should be matched/selected. The path can be relative (anywhere in the KDOM tree) or root based. Specific path wildcards as "*" and "**" are allowed.
Synopsis:
*The elements within the path are separated by "/".
*If the scope starts with "/" it must match its path from the KDOM root.
*Each of the path entries name a KDOM node, either by naming the "name" of the Type (see Type.getName() or its simple class name or the simple class name of any of it's super-classes or interfaces.
*For default markups the name of the markup section can be used. For it's annotations the annotation name can be used. For a default markup content section "content" can be used. (e.g. "solution/package" matches the package declaration of the solution markup).
*The matching is done case insensitive.
*If you specify a "*" wildcard as a path entry (".../ * /...") any section is matched to it.
*If you specify a "**" wildcard as a path entry (".../ ** /...") , any sub-path is matched to it. Especially also the empty sub-path is matched. (If you want to *have at least one section in between, use ".../ ** / * /...".)
!! Kinds of Scopes
There are only a few scopes. Here are some descriptions for the most important scopes.
At line 60 changed one line
For the interface [Type|https://isci.informatik.uni-wuerzburg.de/javadoc/KnowWE/de/knowwe/core/kdom/Type.html] scope defines the enclosing type. For example root is the enclosing type of HeaderType. This means that the sections of type HeaderType are located in the root-level of the wiki page, instead of being a sub-section of sections of any other specific type.
For the class [Type|https://isci.informatik.uni-wuerzburg.de/javadoc/KnowWE/de/knowwe/core/kdom/Type.html] scope defines the father type.
At line 62 changed 4 lines
For the interface [Type|https://isci.informatik.uni-wuerzburg.de/javadoc/KnowWE/de/knowwe/core/kdom/Type.html] scope defines the father type. For example root is the father of HeaderType.
%%prettify
{{{
%%prettify {{{
At line 67 changed 8 lines
id="HeaderType">
<parameter id="class" value="de.knowwe.jspwiki.types.HeaderType" />
<parameter id="name" value="HeaderType" />
<parameter id="description" value="Represents a HeaderType in KDOM" />
<parameter id="version" value="0.2" />
<parameter id="priority" value="2.1" />
<parameter id="scope" value="root" />
</extension>
id="HeaderType">
<parameter id="class" value="de.knowwe.jspwiki.types.HeaderType" />
<parameter id="name" value="HeaderType" />
<parameter id="description" value="Represents a HeaderType in KDOM" />
<parameter id="version" value="0.2" />
<parameter id="priority" value="2.1" />
<parameter id="scope" value="root" />
</extension>
At line 78 removed 38 lines
! Scope for ToolProvider
For the interface [ToolProvider|https://isci.informatik.uni-wuerzburg.de/javadoc/KnowWE/de/knowwe/tools/ToolProvider.html] scope defines for which markup(s) the tools should appear in the tool menu. In the example below, the tools of WikiBookDownloadProvider are shown for the WikiBook-markup.
%%prettify
{{{
<extension plugin-id="KnowWEExtensionPoints" point-id="ToolProvider"
id="WikiBookDownloadProvider">
<parameter id="class"
value="com.denkbares.wikibook.WikiBookDownloadProvider" />
<parameter id="name" value="WikiBookDownloadProvider" />
<parameter id="description"
value="Offer a download button to download the Wikibook." />
<parameter id="version" value="1.0" />
<parameter id="priority" value="5" />
<parameter id="scope" value="WikiBook" />
</extension>
}}}
/%
! Scope for Renderer
For the interface [Renderer|https://isci.informatik.uni-wuerzburg.de/javadoc/KnowWE/de/knowwe/core/kdom/rendering/Renderer.html] scope defines which type should be rendered by the Renderer. The example below defines, that the root section (the whole wiki-page content) is rendered by an instance of the class RootTypeIdRenderer.
%%prettify
{{{
<extension plugin-id="KnowWEExtensionPoints" point-id="Renderer" id="RootTypeIdRenderer">
<parameter id="class" value="com.denkbares.editmode.RootTypeIdRenderer" />
<parameter id="name" value="RootTypeIdRenderer" />
<parameter id="description" value="Adds ids to rendered sections to allow editing in EditMode" />
<parameter id="version" value="1.0" />
<parameter id="priority" value="5" />
<parameter id="scope" value="root" />
</extension>
}}}
/%
At line 117 changed one line
howto create ExtensionPoints
howto