Skip to content

Plugins for JCrypTool development

Dominik Schadow edited this page Jul 1, 2017 · 10 revisions

This page contains various recommendations for plug-ins some of us are using to develop JCrypTool. Code Quality plug-ins are a must use, including the JCrypTool Checkstyle configuration. Other plug-ins are optional.

Use the Eclipse Update Manager (via Install New Software...) or the Eclipse Marketplace for an easy installation wherever possible.

Required Plug-ins

Use these plug-ins frequently. FindBugs identifies a lot of nasty bugs that will cause problems sooner or later. Checkstyle configured to use the JCrypTool configuration makes sure all our code shares a common structure. You are required to remove the identified warnings before pushing your sources!

Any plug-in project in one of our official JCrypTool Git repositories is required to format its code according to our formatter configuration and to use Checkstyle to verify and rework according to our Checkstyle configuration.

Code Quality

Eclipse Code Formatter

Open the Eclipse preferences and switch to the Java - Code Style - Formatter page. Click on Import... and switch to the JCrypTool core repository you have previously cloned. Locate the org.jcryptool.releng project in there and select the formatter.xml file. Click Open and after that Apply in the main preferences dialog:

Configure the Eclipse code formatter to use the JCrypTool code style configuration

No installation required, included in every Eclipse bundle.

Checkstyle

Checkstyle checks your code for violations against Java and JCrypTool policies. You have to use our checkstyle.xml configuration available in the org.jcryptool.releng project as well.

Open the Eclipse preferences, switch to the Checkstyle preference page and click on New.... Select External Configuration File in the Type drop down and enter JCrypTool Checkstyle as Name. Click on Browse... and navigate to the org.jcryptool.releng folder in the core repository again. Select the checkstyle.xml file and click on Open. Highlight the new JCrypTool Checkstyle entry in the table and click on Set as Default and on OK afterwards:

Configure Checkstyle to use the JCrypTool Checkstyle configuration

Checkstyle is enabled now but does not scan your plug-in automatically. Right click on your plug-in in the Package Explorer, select the Checkstyle submenu and Check Code with Checkstyle. All violations will be listed in the normal Eclipse Problems view.

Install via Eclipse Marketplace.

FindBugs

FindBugs on demand scans your code for bugs and various other problems. Scan your code often, at least before pushing it to our repository.

Install via Eclipse Marketplace.

ResourceBundle Editor

As JCrypTool supports English and German, you are required to provide two resource files for these languages in your plug-in. To make editing easier and less error prone, you should use the ResourceBundle Editor. This way you can easily make sure, that all resource keys are fully available in both supported languages.

Install via Eclipse Marketplace.

Optional Plug-ins

Graphical Design

WindowBuilder is the recommended visual GUI builder for JCrypTool plug-ins.

Install via Eclipse Update Manager.

Testing

We are using JUnit tests to test the JCrypTool Core and certain JCrypTool Crypto plug-ins. EclEmma is the perfect tool to verify that your tests cover all available code and may already be installed (depending on your Eclipse package).

Install via Eclipse Marketplace.

UML

Generally we do not use UML diagrams but you are of course welcome to design and use diagrams. Our recommended plug-in is Papyrus UML.

Install via Eclipse Update Manager.