User Tools

Site Tools


devel:plugins:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
devel:plugins:start [2018/10/09 11:10] danildevel:plugins:start [2018/10/09 11:10] (current) – removed danil
Line 1: Line 1:
-====== Plugin development ====== 
- 
-The following set of exercises aims at development of basic plugins to enable the editing and simulation of a new type of a graph model in Workcraft. Follow the step-by-step instructions to proceed from the initial setup of the project, all the way to the implementation of the model components, and simulation tools. Alternatively, if you wish to skip some of the steps, download the completed plugin source code at the end of each exercise. 
- 
-Before continuing with these exercises make sure that you know how to [[devel:build|build Workcraft from sources]]). 
- 
-===== Project setup ===== 
- 
-For each exercise you will need to create a new project directory whose name starts with ''_'' (an underscore) and finishes with  ''Plugin'', e.g. ''_Exercise01Plugin''. Note that the directories starting with an underscore are automatically ignored both by Git and the distribution builder script, therefore this is a good way to add experimental plugins that should not become part of the main Workcraft build. 
- 
-In the project directory create a ''build.gradle'' file that specifies the project dependencies. Simple plugins only depend on the Workcraft framework, ''WorkcraftCore'' project: 
- 
-<file shell build.gradle> 
-dependencies { 
-    compile project(':WorkcraftCore') 
-} 
-</file> 
- 
-Now let us call the package for our Exercise01 plugin: ''org.workcraft.plugins.basic''. This follows Workcraft's standard of any new plugin to be packaged as ''org.workcraft.plugins.NewPluginName'' and is typically where all the plugin classes will live. For this step, we create the directory ''src/org/workcraft/plugins/basic'' under ''_Exercise01Plugin''. 
- 
-To complete the set up, go to the top directory of Workcraft and follow either step depending on your development IDE: 
- 
-For IntelliJ IDEA 
-  - Run the ''$./gradlew idea'' command to generate the IntelliJ IDEA project with the newly created plugin. 
-  - Open the ''workcraft.ipr'' file in IDEA to load the project. 
- 
-For Eclipse 
-  - Run the ''$./gradlew eclipse'' command to generate the Eclipse project with the newly created plugin. 
-  - Once opening Eclipse, ensure that you have selected ''workcraft'' as the current //Workspace// directory and imported the project as necessary. For further information on this, see the [[https://workcraft.org/devel/build#eclipse_integration|Eclipse Integration page]]. 
- 
-If everything has went smoothly, you are now set to go.  
- 
-  * [[:devel:plugin:graph|Basic model -- Directed Graph]] 
-  * [[:devel:plugin:petri|Advanced model - Petri Net]] 
-  * [[:devel:plugin:petri|Editor tool -- Petri net simulator]] 
- 
  
Copyright © 2014-2024 workcraft.org

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki