Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Ann's note: Please add a tutorial explaining how to develop a simple plug-in. Your graph plug-in is probably a good place to start. We need a very simple but cool example that relies on a stable part of the API so that the tutorial doesn't get out of date.)

Sample plug-in

 Project Explorer - blank area
 New > Project ... > Plug-in Project > "Next >" button
 Project name: "HelloWorld" > "Next >" button
 Version: "1.0.0" check "Generate an activator ...",
    Activator "helloworld.Activator", Rich Client Application click "No",
    "Next >" button
 Uncheck "Create a plug-in using one of the templates", "Finish" button
 Under the new HelloWorld project, find the META-INF directory, and open
    the MANIFEST.MF file by double-clicking on it.
 Click on the "Dependencies" tab,
    in the "Required Plug-ins" box, 
    highlight org.eclipse.core.runtime, and click the "Remove" button on the right.
    next to the "Imported Packages" box, click the "Add..." button, int
    the "Package Selection" popup in the text box, enter "com.affymetrix.genoviz.util"
    and click the "OK" button. Do the same for "org.osgi.framework" (there may be
    a version number in paraentheses after the name).
    Right click on the blank area at the top, next to "Dependencies" and
    a context menu comes up, click "Save".
 Open the Activator.java file under src/helloworld, add the import statement
    import com.affymetrix.genoviz.util.ErrorHandler;
    at the top, and add the line
    ErrorHandler.errorPanel("Hello World");
    at the end of the start() method, and
    ErrorHandler.errorPanel("Goodbye World");
    at the end of the stop method
    Save the file
 In the Project Explorer, Right click the HelloWorld project, > "Export ..."
    "Deployable plug-ins and fragments", "Next >" button,Under "Available Plug-ins and Fragments:, check only
    Hello World, Directory: use any directory you like. click the "Finish" button.
    
 Project Explorer - blank area

 New > Project ... > Plug-in Project > "Next >" button

 Project name: "HelloWorld" > "Next >" button

 Version: "1.0.0" check "Generate an activator ...",

    Activator "helloworld.Activator", Rich Client Application click "No",

    "Next >" button

 Uncheck "Create a plug-in using one of the templates", "Finish" button

 Under the new HelloWorld project, find the META-INF directory, and open

    the MANIFEST.MF file by double-clicking on it.

 Click on the "Dependencies" tab,

    in the "Required Plug-ins" box, 

    highlight org.eclipse.core.runtime, and click the "Remove" button on the right.

    next to the "Imported Packages" box, click the "Add..." button, int

    the "Package Selection" popup in the text box, enter "com.affymetrix.genoviz.util"

    and click the "OK" button. Do the same for "org.osgi.framework" (there may be

    a version number in paraentheses after the name).

    Right click on the blank area at the top, next to "Dependencies" and

    a context menu comes up, click "Save".

 Open the Activator.java file under src/helloworld, add the import statement

    import com.affymetrix.genoviz.util.ErrorHandler;

    at the top, and add the line

    ErrorHandler.errorPanel("Hello World");

    at the end of the start() method, and

    ErrorHandler.errorPanel("Goodbye World");

    at the end of the stop method

    Save the file

 In the Project Explorer, Right click the HelloWorld project, > "Export ..."

    "Deployable plug-ins and fragments", "Next >" button,Under "Available Plug-ins and Fragments:, check only

    Hello World, Directory: use any directory you like. click the "Finish" button.

    

To create plug-ins using NetBeans - a Quick-Start Guide

...