June 27, 2012

From Paris with More Codelines

Traceability

Last September, I had the privilege of traveling to the beautiful city of Paris. I had an incredible time gazing at priceless art, eating exquisite food and visiting friends I've met at EclipseCon. One of the many highlights I had was viewing the street art displayed in the Montmartre area.

One I especially liked was the addition of a man to a "Do Not Enter" sign:

Do Not Enter

At Perforce, we have a preparatory codeline integrated from main with the purpose of stabilizing the code before branching a release line. I recently wondered how this image would look as the prep codeline icon in our P4EclipseMerge Quest plug-in.

After modifying the image a bit in Photoshop, I decided to play around with our Merge Quest extension points to see what it would look like.

After installing P4Eclipse and Merge Quest, I simply: 

  1. Click on File | New | Other...
  2. Click on Plug-in Development | Plug-in Project
  3. Click "Next" button
  4. Enter Project name
  5. Click "Next" button
  6. Click "Finish" button
  7. Open "MANIFEST.MF" file (located in META-INF directory)
  8. In the Editor window, click on "Dependencies" tab
  9. In the "Required Plug-ins" section, click "Add.." button
  10. In the "Plug-in Selection" dialog, enter "mergequest"
  11. Select "com.perforce.team.core.mergequest" plug-in
  12. Select "com.perforce.team.ui.mergquest" plug-in
  13. Click "OK" button
  14. Save "MANIFEST.MF" file (CTRL+S)
  15. Click on "Extensions" tab
  16. Click on "Add.." button
  17. Select "com.perforce.com.team.ui.mergequest.elements"
  18. Select "com.perforce.team.ui.mergequest.elementDescriptors"
  19. Click "Finish" button
  20. Select "com.perforce.com.team.ui.merquest.elements"
  21. Right click New | branch
  22. In "Extension Element Details" section, enter:
    type*: <NAME OF PLUG-IN PROJECT>.prepBranch
    label: Prep
  23. Select "com.perforce.com.team.ui.merquest.elementDescriptors"
  24. Right click New | element
  25. In "Extension Element Details" section, enter:
    name*: branch
    icon*: <Browse to desired icon>
    type: <NAME OF PLUG-IN PROJECT>.prepBranch
  26. Select "branch (element)"
  27. Right click New | createDescription
  28. Enter decription in "Body Text:" field (e.g. Add a prep codeline)
  29. Save "MANIFEST.MF" file (CTRL+S)
  30. Click the "Launch an Eclipse application" button (upper right hand corner of MANIFEST.MF file)

Let's take a look at what we get:


Now I have a new codeline type with a new icon and I'll always have Paris.