The DevCOP Eclipse Plugin



Questions? Please contact Mark Sherriff at mark.sherriff@ncsu.edu

IMPORTANT NOTE: The next version of the DevCOP plugin will be released in the spring of 2006. This information DOES NOT reflect the newest version (v0.1 instead of v0.2), but most of it is the same. New information will be posted on the DevCOP Wiki ASAP.

Q: How do I install DevCOP?

A: In Eclipse, click Help > Software Updates > Find and Install... . Choose "Search for new features to install" and click Next. Click "New Remote Site..." and enter:

Name: DevCOP
URL: http://agile.csc.ncsu.edu/devcop/update/

and click OK. Make sure this new DevCOP site is selected in the site list and click Next. Select NCSU DevCOP from the menu and click Next. Accept the license agreement, click Next, then click Finish. Accept the installation and then restart your workbench. The DevCOP plugin can now be found in the view list (Windows > Show view > Other...).

Q: I've installed DevCOP, but where is it?

A: The DevCOP plugin views can now be found in the view list (Windows > Show view > Other...) under DevCOP.

Q: How do I add a certificate to a function?

A: To add a certificate, open the Package Explorer in the Java perspective.

Expand your project out to the function level. Right click on any function to get the context menu.

Choose Certificates > Add a New Certificate. The Add Certificate dialog will appear.

Some information will be filled in for you initially - these boxes will be grayed out. Enter the rest of the information (if you do not know the weight or if your project is not using weights, leave it at 1). Then save your new certificate. Note: You can select more than one function to add certificates to at once. If you do so, the certificates will all have the same Type, Weight, Description, Creator, and Created but the appropriate Function, Class, etc.

Your certificate will now have been added to the certificate list in the DevCOP window. Note: You may have to refresh the DevCOP window for the new certificate to appear.

Q: I want to certify more than one function with one type of certificate. How do I do that?

A: There are two ways to do this. The first is to simply hold down the CTRL key and select multiple functions to be certified. Then, using the right-click context menu, select Choose Certificates > Add a New Certificate. The other way is to use Active Certificates.

Q: What are Active Certificates?

A: Active Certificates are a method for recording the changes made to several methods while a developer is making the changes. For example, if two developers were going to begin a pair programming session, an Active Certificate could be started at the beginning of the session. When the session is completed, the Active Certificate is completed and the appropriate certificates are stored with each method without any extra developer effort.

Q: How do Active Certificates work?

A: Basically, DevCOP initiates a JavaElementChangedListener that watches what files a developer touches. If a file is touched, DevCOP makes a backup-copy of the methods of that file in memory. Then, when the developer is finished, the old versions are compared with the new to see where changes have occured.

Q: How do I use Active Certificates?

A: An Active Certificate is initiated when the developer hits the button in the Certificates view. The developer is asked to confirm if they would like to begin. If the developer chooses Yes, a progress meter appears in the lower-right corner of the Eclipse workspace. The developer can now make changes across files as they need for this certificate.

When the developer is through making changes, they hit the same button again to end recording. The developer is then presented with a list of all methods that were changed during the recording session. It is up to the developer to determine if the changes warrent being recorded as a certificate. Once the methods are chosen, click OK. The basic certificate information window then appears where the rest of the basic information is put in in order to save the certificate.

Q: Can I record more than one type (e.g. pair programming, code inspection, etc.) of Active Certificate at a time?

A: No. All changes during a single Active Certificate session are attributed to one type of certificate at a time. However, you can still add different certificates through the context menu on the Package Explorer while also recording an Active Certificate.

Q: Are Active Certificates different than other certificates?

A: No. The only difference is the way that they are recorded. After that, they are indistinguishable from other certificates.

Q: What if I close Eclipse without ending my Active Certificate session? Do I lose my certificates?

A: No. DevCOP will store your current Active Certificate session to disk if Eclipse closes when a session is underway. Eclipse will then prompt the developer at startup that an Active Certificate session is about to be restarted.

Q: What are the different parts of a certificate?

A: Function: This is the name of the function that you are certifying, along with information about it's Java signature, separating it from a similarly named function, but with different parameters.
Class: The class the function appears in.
Project: The Eclipse project the function appears in.
File: The .java file the function appears in.
Type: This is the type of validation or verification technique that was performed on the function such that a certificate is being made.
Weight: Score of the relative effectiveness of this technique. (Scale currently under research - use this field as directed for your project at this time.)
Source Hash: A hash of the source code for the function that ignors Java code formatting.
Desc: A more detailed description of the V&V technique used.
Creator: The person creating the certificate.
Created: The date or time the certificate is created.

Q: Where are the certificates stored?

A: Certificates are stored in an external MySQL database. Information on changing this database can be found in the DevCOP preferences.

Q: DevCOP is currently set to use your database... can I make my own?

A: Certainly. Email me and I'll be happy to send you the SQL code to create the database. Or, you have the login and password to mine - you can figure it out from there ;-).

Q: I've changed my code since I created the certificate. What happens now?

A: Certificates contain a hash of the code that they are certifying. Except for formatting changes (spaces, tabs, returns, etc.), any change to the code in a function will render the certificates associated with that function invalid. This is because a certificate is issued based on the current state of code. An invalid certificate is indicated by a icon by the certificate name. If the developer who changed the code knows that the change did not majorly alter the code in any way, he or she can "revalidate" the certificate, which stores the new source hash with the certificate.

Q: How do I revalidate a certificate?

A: Either right click on a certificate and choose the Validate option, or select a certificate and hit the Validate button at the top of the view.

Q: How do I delete a certificate?

A: Either right click on a certificate and choose the Delete Certificate option, or select a certificate and hit the Delete Certificate button at the top of the view.

Q: How do I edit a certificate?

A: A: Either right click on a certificate and choose the Edit Certificate option, or select a certificate and hit the Edit Certificate button at the top of the view. Make your changes in the DevCOP Certificate dialog, then save the changes. Note: You can only edit one certificate at a time. If you select more than one to edit, you will be provided with a dialog only for the first selection.

Q: How do I add a bug fix to a function?

A: During maintenence, you can also record fixes to a function as a special type of certificate, a BUG FIX certificate. It is created just as the others; it has it's own special type found under the Type drop down menu in the DevCOP Certificate dialog.

Q: What do all the icons mean?

A: BUG FIX certificate
Valid certificate
Invalid certificate
Refresh the certificate list
(Re)Validate a certificate
Edit a certificate
Delete a certificate
Begin/End Active Certifcates