-
Notifications
You must be signed in to change notification settings - Fork 43
Extension Points
JCrypTool contains a growing number of Extension Points. Extension points are the best way to extend JCrypTool. Most of the extension points (the most important ones too) are contained in the org.jcryptool.core.operations plug-in: from algorithms to providers, all cryptographic extension points are available in this plug-in.
Extension points are always defined in an exsd file. This file is normally located in a schema subfolder of the defining plug-in. Any JCrypTool extension point can be used as a normal Eclipse extension point: open the plugin.xml of your plug-in and click on the Add button on the extensions page of the editor. All JCrypTool extension points start with org.jcryptool as ID, e.g. org.jcryptool.core.algorithms_cmd.
Add the extension point as described above to your plug-in. After selecting the new entry a link Show extension point description appears on the right side of the editor. Simply follow this link for information on the selected extension point. You can use the other links provided to find the extension point schema or to jump to the declaring plug-in.
The most used extension points in JCrypTool are the ones required for cryptographic extensions (crypto plug-ins):
- org.jcryptool.core.operations.algorithms_cmd
- org.jcryptool.core.operations.analysis
- org.jcryptool.core.operations.games
- org.jcryptool.core.operations.visuals
One of these extension points is required to extend JCrypTool with a new crypto plug-in. This extension point takes care of adding the cryptographic extension (e.g. an algorithm) to the corresponding menu and to the Crypto Explorer view. This means you do not have to provide any more information than the required fields (highlighted with a *) to make your new extension available in JCrypTool.
The following code snippet shows a visualization view configured in a plugin.xml. Note the two extension points org.eclipse.ui.views and org.jcryptool.core.operations.visuals and how the later references your view id defined the first extension points. These two ids must be identical, otherwise your view will not show up!
<extension point="org.eclipse.ui.views">
<view
category="org.jcryptool.visual"
class="org.jcryptool.visual.MySampleView"
icon="icons/view.gif"
id="org.jcryptool.visual.MySampleView"
name="My Sample View">
</view>
</extension>
<extension point="org.jcryptool.core.operations.visuals">
<Visual
name="My Sample View"
viewId="org.jcryptool.visual.MySampleView"
contextHelpId="org.jcryptool.visual.MySampleView">
</Visual>
</extension>
Need help? Please visit the public JCT Chatroom or open a new Issue and ask your question. We'll be happy to assist you!