Teams Winter 2011/team2/lab3

From CDOT Wiki
Revision as of 22:02, 11 March 2011 by Scborges (talk | contribs)
Jump to: navigation, search


In this tutorial,


Create a RCP Application

  • Run Eclipse
  • Select/Enter your preferred workspace in the text box provided and click okay


  • After Eclipse has completed loaded, create a plug-in project by clicking on "File" on the menu bar then scroll to New->Project->Other. A wizard should pop-up in which you should progress to click on the "Plugin-in Development" tree, select "Plug-in Project", and click next.


  • Enter the following information that is seen in the image below

Wiz2wT2.png Wiz3wT2.png Wiz4wT2.png

  • Since we decided to use a template to create our first project, there are already a few predefined classes that we will alter to suit our requirements for this lab.
  • What you should see in your Eclipse environment is something that looks very similar to the picture below


  • In the "MANIFEST" file, click on "Launch an Eclipse Application", this will run the "Hello RCP" template program that has not been edited yet. Running this application as is will result in a window to pop-up.


  • Lets open "" file so we can alter the window of our application.
  • Replace the following method with the one below
public void preWindowOpen() {
     //Retrieves the main window
     IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
     //Sets the size of the window
     configurer.setInitialSize(new Point(600, 500));
     //Header bar becomes available
     //Footer bar becomes available
     //Title of the window
     configurer.setTitle("My First RCP Application"); //$NON-NLS-1$