Skip to content

Creating a new Plug in

Dominik Schadow edited this page Aug 5, 2014 · 24 revisions

Make sure you have read and understood our Coding Conventions and installed/ configured the required plug-ins before starting a new plug-in project!

Any JCrypTool plug-in starts as a normal Eclipse plug-in project. This is the case for both, crypto and non-crypto plug-ins. Use the Eclipse wizards and tools to get started with a new plug-in. Do not copy an existing plug-in, this creates a total mess and requires too much refactoring. Start with a fresh project for every plug-in.

The only difference between Eclipse and JCrypTool plug-ins are the extension points a crypto plug-in has to use. Have a look at the JCrypTool online help for a description of our extension points. And have a look at other plug-ins in the same category (like Visuals) on their implementation.

Please check your build.properties before pushing your sources. All resources, like images, icons, help files, must be added manually to the binary build section. If you don't do this, the files will be missing in the binary build. You can easily test the completeness by exporting the complete JCrypTool product.

##Conventions There are not too many conventions for developing a JCrypTool plug-in. You are required to use the JCrypTool code formatter template and the JCrypTool checkstyle configuration as described in our Getting started as a JCrypTool Developer.

For a consistent user interface, please use plug-in (English) and Plug-in (German) with a hyphen. We encourage you to take screenshots on OS X if you have the possibility.

##Adding the new plug-in to JCrypTool After creating a new (crypto) plug-in, this plug-in must be added to one of our features in order to be shipped with the next JCrypTool release. Simply open the feature.xml of the corresponding feature (all feature projects end with .feature), switch to the Plug-ins tab and use the Add... button to add your feature. In case your plug-in has a dependency on another new plug-in (like a supporting third party library), this plug-in must be added in the same way to the same feature.

As a normal developer, you may not have write access to the JCrypTool repositories. Simply do not commit and push the changes done in the feature and use it only for your local builds.

##Updating your run configuration Adding the plug-in to the feature does ship your plug-in with the next release. However, it does not update your runtime configuration. Your plug-in is therefore not available when you launch your local JCrypTool version via the run menu in Eclipse. You need to update your run menu configuration and add your plug-in manually:

  1. Open your Run Configurations dialog and select the JCrypTool entry
  2. Switch to the Plug-ins tab
  3. Look for your plug-in in the Workspace section and check the checkbox (repeat this with any new plug-in you have created, including all new dependencies)
  4. Click on the Apply button and Run your local JCrypTool

##Releasing your plug-in Have a look at the description at Releasing your plug-in or JCrypTool.

#Importing a plug-in into the JCrypTool Git repository The following task has to be executed by a JCrypTool Core member with write access to our repositories core and crypto. As a plug-in developer, you do not have sufficient rights to do this!

  1. git remote add -f [remote name] [remote url]
  2. Check with git remote for success, list must contain the new remote repository
  3. git merge -s ours --no-commit [remote name]/master
  4. git read-tree --prefix= -u [remote name]/master
  5. git commit -m "message"
  6. git push
  7. git remote remove [remote name]