SlideShare uma empresa Scribd logo
1 de 23
The Basic RCP Application




An overview of the code that makes up the skeleton of a basic RCP
application. This includes the basics for advisors and perspectives. This
module also describes the basics of how to launch and debug an RCP
application.




Redistribution and other use of this material requires written permission from The RCP Company.

L0001 - 2010-11-27
Creating an Eclipse RCP Application




Use the “Plug-in Project” wizard!

Project Page:
     Specify the plug-in name:
      com.rcpcompany.cex (or whatever)




2
                                         L0001 - 2010-11-27
Creating an Eclipse RCP Application




Content Page
     Change information as appropriate
     Activator generated
     We contribute to the UI
     It is an RCP Application!




3
                                          L0001 - 2010-11-27
Creating an Eclipse RCP Application




Templates Page:
     Use “Hello RCP” template




4
                                      L0001 - 2010-11-27
Launch the Application




The launch configuration for the application can
be created in several ways
     E.g. use the “Launch an RCP Application”
      in the Overview page of the plugin.xml
      editor

Change the name of the application if needed
     Use “Run” → “Open Run Dialog…”




5
                                                   L0001 - 2010-11-27
Update the Launch configuration


The arguments of the launch configuration for the application should be
updated with the following extra arguments:
     -clean – cleans all internal caches
     -console – starts the OSGi console
     -consoleLog – prints all log messages on standard output




6
                                                                          L0001 - 2010-11-27
Eclipse Workbench Start-Up Sequence


The Eclipse workbench is started in the following steps

From the user code the important classes are
     Application (IApplication):
       
           Handles the initialization of the display
       
           Any login dialog
       
           Creates and runs the workbench using the workbench advisor
     WorkbenchAdvisor:
       
           Names the initial perspective
       
           Specifies the window advisor to use
       
           Provides call-outs that is invoked during the life cycle of the workbench
           – e.g. postStartup and preShutdown
     WorkbenchWindowAdvisor:
       
           Specifies the action bar advisor to use
       
           Provides call-outs that is invoked during the life cycle of the workbench
           window – e.g. postWindowCreate

7
                                                                                   L0001 - 2010-11-27
Eclipse Workbench Start-Up Sequence


     ActionBarAdvisor:
       
           In 3.2: Created all actions (if hard-coded) - filled in the actions in the
           menu, tool bar, and status line as needed
       
           In 3.3: Registers all built-in implementations for standard commands
       
           In 3.4 and later: Empty!




8
                                                                                    L0001 - 2010-11-27
The Application (IApplication) Object (3.3 and later edition)


Identified via the extension point org.eclipse.core.runtime.applications

Simply creates a new SWT display and launches the application code

The place to handle login dialogs and similar

Eclipse 3.3 has added a stop() method to gracefully stop an application

    public class Application implements IApplication {
        public Object start(IApplicationContext context) throws Exception {
            Display display = PlatformUI.createDisplay();
            try {
                int returnCode = PlatformUI.createAndRunWorkbench(display,
                                        new ApplicationWorkbenchAdvisor());
                if (returnCode == PlatformUI.RETURN_RESTART)
                    return IApplication.EXIT_RESTART;
                else
                    return IApplication.EXIT_OK;
            } finally {
                display.dispose();
            }
        }

        public void stop() {
            …
        }
    }



9
                                                                              L0001 - 2010-11-27
The WorkbenchAdvisor Object


     Specified by the Application object

     Identifies the initial perspective to be used in the application – can be
     overridden by saved state

     Specifies the WorkbenchWindowAdvisor to be used when SWT windows are
     created


public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
    private static final String PERSPECTIVE_ID = "com.rcpcompany.cex.perspective";

         public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
             return new ApplicationWorkbenchWindowAdvisor(configurer);
         }

         public String getInitialWindowPerspectiveId() {
             return PERSPECTIVE_ID;
         }
}




    10
                                                                                                          L0001 - 2010-11-27
The WorkbenchWindowAdvisor Object


    Specified by the WorkbenchAdvisor object

    Specifies the ActionBarAdvisor to use




public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
    public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
        super(configurer);
    }

      @Override
      public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
          return new ApplicationActionBarAdvisor(configurer);
      }

      ....
}




11
                                                                                          L0001 - 2010-11-27
The WorkbenchWindowAdvisor Object


    Configures the basic window properties
       Name
       Size
       Presence of basic UI elements
          
              Menu bar, toolbar, status Line, fast views, and perspective switcher
          
              Progress indicators


public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
    ....

      @Override
      public void preWindowOpen() {
          IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
          configurer.setInitialSize(new Point(800, 600));
          configurer.setShowCoolBar(false);
          configurer.setShowMenuBar(true);
          configurer.setShowStatusLine(false);
          configurer.setTitle("Hello Contact Manager");
      }
}




12
                                                                                     L0001 - 2010-11-27
The ActionBarAdvisor Object


 Specified by the WorkbenchWindowAdvisor object

 In 3.2: Created all actions (if hard-coded) - filled in the actions in the menu,
 tool bar, and status line as needed

 In 3.3: Registers all built-in implementations for standard commands

 In 3.4 and later: Empty!



        public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
            public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
                super(configurer);
            }

            protected void makeActions(IWorkbenchWindow window) {
            }

            protected void fillMenuBar(IMenuManager menuBar) {
            }
        }




13
                                                                                    L0001 - 2010-11-27
The Perspective Object


 Specified by the WorkbenchAdvisor object

 Creates the initial perspective in terms of
      Views
      Global actions
      Shortcuts on relevant menus



           public class Perspective implements IPerspectiveFactory {
               public void createInitialLayout(IPageLayout layout) {
               }
           }




14
                                                                       L0001 - 2010-11-27
Lab Exercise


 Create the application.

 If you have not used the Eclipse debugger before, then introduce an error –
 e.g. divide-by-zero – and find the error in the debugger




15
                                                                           L0001 - 2010-11-27
Adding a View




 A new view can easily be added using the
 extensions page for the plugin.xml file
      Add a new extension with the name
       “org.eclipse.ui.views”
      Select the new line and add a
       “New”→”view” using the context menu
      Specify id, name and class as shown here




16
                                                  L0001 - 2010-11-27
Adding a View, cont’


 Click on the “class” link to create the new View class automatically

 Two methods must be implemented
      createPartControl(Composite): Creates the visual content of the view
      setFocus(): Sets the initial focus of the view




             public class FirstView extends ViewPart {
                 @Override
                 public void createPartControl(Composite parent) {
                 }

                 @Override
                 public void setFocus() {
                 }
             }




17
                                                                              L0001 - 2010-11-27
Adding a View, cont’


 Adding the view to the perspective
      No editor is used
      Views are positioned relatively to other views (or the editor)
      The new view is placed to the left of the (non-existing) editor and will
       take all of the room



     public class Perspective implements IPerspectiveFactory {
         public void createInitialLayout(IPageLayout layout) {
             final String area = layout.getEditorArea();
             layout.setEditorAreaVisible(false);
             layout.addView(”com.rcpcompany.ex.views.FirstView”, IPageLayout.LEFT, 1.0f, area);
         }
     }




18
                                                                                                  L0001 - 2010-11-27
Re-Launch the Application




 Now the application includes the new view

 Note that
      The are no editor area
      The view tab is present
      The view can be closed
      The view can be minimized




19
                                             L0001 - 2010-11-27
Adding a File→Exit Command (3.3 and later edition)


 Added in the plugin.xml file
        <extension point="org.eclipse.ui.menus">
            <menuContribution locationURI="menu:org.eclipse.ui.main.menu">
                <menu label="File” id=”file” mnemonic="F">
                    <command commandId="org.eclipse.ui.file.exit" />
                </menu>
            </menuContribution>
        </extension>


 And to the ActionBarAdvisor object (3.3 edition only)
      Uses predefined exit action
        public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
            super(configurer);
        }

        protected void makeActions(IWorkbenchWindow window) {
            register(ActionFactory.QUIT.create(window));
        }

        protected void fillMenuBar(IMenuManager menuBar) {
        }

      This is not needed for Eclipse 3.4 or later, where the behavior is
       defined via the handlers extension point


20
                                                                                L0001 - 2010-11-27
Re-Launch the Application




 Now the application includes the new exit
 action




21
                                             L0001 - 2010-11-27
Lab Exercise


 Create 4 views altogether

 Add the views to the perspective
      The way to position views in a perspective have not be discussed in
       details, but…

 Create the actions
      Help→About
       
           Hint: the ID is org.eclipse.ui.help.aboutAction




 Extras:
      Add the “Show View” command




22
                                                                             L0001 - 2010-11-27
More Information


 “Eclipse Rich Client Platform: Designing, Coding, and Packaging Java(TM)
 Applications” by Jeff McAffer and Jean-Michel Lemieux (ISBN
 978-0321334619)
      The essential bible for everybody involved in Eclipse RCP. Includes
       numerous examples with best practices for RCP applications




23
                                                                             L0001 - 2010-11-27

Mais conteúdo relacionado

Mais procurados (20)

Java Swing
Java SwingJava Swing
Java Swing
 
Swing
SwingSwing
Swing
 
Chapter 1 swings
Chapter 1 swingsChapter 1 swings
Chapter 1 swings
 
Z blue introduction to gui (39023299)
Z blue   introduction to gui (39023299)Z blue   introduction to gui (39023299)
Z blue introduction to gui (39023299)
 
S313937 cdi dochez
S313937 cdi dochezS313937 cdi dochez
S313937 cdi dochez
 
04b swing tutorial
04b swing tutorial04b swing tutorial
04b swing tutorial
 
Complete java swing
Complete java swingComplete java swing
Complete java swing
 
java swing
java swingjava swing
java swing
 
java2 swing
java2 swingjava2 swing
java2 swing
 
JAVA PROGRAMMING- GUI Programming with Swing - The Swing Buttons
JAVA PROGRAMMING- GUI Programming with Swing - The Swing ButtonsJAVA PROGRAMMING- GUI Programming with Swing - The Swing Buttons
JAVA PROGRAMMING- GUI Programming with Swing - The Swing Buttons
 
Basic using of Swing in Java
Basic using of Swing in JavaBasic using of Swing in Java
Basic using of Swing in Java
 
Graphical User Interface (GUI) - 1
Graphical User Interface (GUI) - 1Graphical User Interface (GUI) - 1
Graphical User Interface (GUI) - 1
 
UIViewControllerのコーナーケース
UIViewControllerのコーナーケースUIViewControllerのコーナーケース
UIViewControllerのコーナーケース
 
Visual Studio commands
Visual Studio commandsVisual Studio commands
Visual Studio commands
 
Android UI Fundamentals part 1
Android UI Fundamentals part 1Android UI Fundamentals part 1
Android UI Fundamentals part 1
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
 
Android Basic Components
Android Basic ComponentsAndroid Basic Components
Android Basic Components
 
Introduction to AutoCad 2011
Introduction to AutoCad 2011Introduction to AutoCad 2011
Introduction to AutoCad 2011
 
Java swing
Java swingJava swing
Java swing
 
Android Components
Android ComponentsAndroid Components
Android Components
 

Destaque

Eclipse Summit Europe '10 - Test UI Aspects of Plug-ins
Eclipse Summit Europe '10 - Test UI Aspects of Plug-insEclipse Summit Europe '10 - Test UI Aspects of Plug-ins
Eclipse Summit Europe '10 - Test UI Aspects of Plug-insTonny Madsen
 
L0016 - The Structure of an Eclipse Plug-in
L0016 - The Structure of an Eclipse Plug-inL0016 - The Structure of an Eclipse Plug-in
L0016 - The Structure of an Eclipse Plug-inTonny Madsen
 
eclipse.dk - Eclipse RCP Under the Hood
eclipse.dk - Eclipse RCP Under the Hoodeclipse.dk - Eclipse RCP Under the Hood
eclipse.dk - Eclipse RCP Under the HoodTonny Madsen
 
Eclipse Training - SWT & JFace
Eclipse Training - SWT & JFaceEclipse Training - SWT & JFace
Eclipse Training - SWT & JFaceLuca D'Onofrio
 
Building Eclipse Plugins and RCP applications with Tycho
Building Eclipse Plugins and RCP applications with TychoBuilding Eclipse Plugins and RCP applications with Tycho
Building Eclipse Plugins and RCP applications with Tychojsievers
 
PDE Good Practices
PDE Good PracticesPDE Good Practices
PDE Good PracticesAnkur Sharma
 

Destaque (6)

Eclipse Summit Europe '10 - Test UI Aspects of Plug-ins
Eclipse Summit Europe '10 - Test UI Aspects of Plug-insEclipse Summit Europe '10 - Test UI Aspects of Plug-ins
Eclipse Summit Europe '10 - Test UI Aspects of Plug-ins
 
L0016 - The Structure of an Eclipse Plug-in
L0016 - The Structure of an Eclipse Plug-inL0016 - The Structure of an Eclipse Plug-in
L0016 - The Structure of an Eclipse Plug-in
 
eclipse.dk - Eclipse RCP Under the Hood
eclipse.dk - Eclipse RCP Under the Hoodeclipse.dk - Eclipse RCP Under the Hood
eclipse.dk - Eclipse RCP Under the Hood
 
Eclipse Training - SWT & JFace
Eclipse Training - SWT & JFaceEclipse Training - SWT & JFace
Eclipse Training - SWT & JFace
 
Building Eclipse Plugins and RCP applications with Tycho
Building Eclipse Plugins and RCP applications with TychoBuilding Eclipse Plugins and RCP applications with Tycho
Building Eclipse Plugins and RCP applications with Tycho
 
PDE Good Practices
PDE Good PracticesPDE Good Practices
PDE Good Practices
 

Semelhante a L0020 - The Basic RCP Application

Inversion of Control and Dependency Injection
Inversion of Control and Dependency InjectionInversion of Control and Dependency Injection
Inversion of Control and Dependency InjectionDinesh Sharma
 
Making React Native UI Components with Swift
Making React Native UI Components with SwiftMaking React Native UI Components with Swift
Making React Native UI Components with SwiftRay Deck
 
Aspnet mvc tutorial_01_cs
Aspnet mvc tutorial_01_csAspnet mvc tutorial_01_cs
Aspnet mvc tutorial_01_csAlfa Gama Omega
 
How to instantiate any view controller for free
How to instantiate any view controller for freeHow to instantiate any view controller for free
How to instantiate any view controller for freeBenotCaron
 
Distributing information on iOS
Distributing information on iOSDistributing information on iOS
Distributing information on iOSMake School
 
GUI design using JAVAFX.ppt
GUI design using JAVAFX.pptGUI design using JAVAFX.ppt
GUI design using JAVAFX.pptTabassumMaktum
 
Effective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjectsEffective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjectsSrikanth Shenoy
 
L2 Web App Development Guest Lecture At University of Surrey 20/11/09
L2 Web App Development Guest Lecture At University of Surrey 20/11/09L2 Web App Development Guest Lecture At University of Surrey 20/11/09
L2 Web App Development Guest Lecture At University of Surrey 20/11/09Daniel Bryant
 
javagruppen.dk - e4, the next generation Eclipse platform
javagruppen.dk - e4, the next generation Eclipse platformjavagruppen.dk - e4, the next generation Eclipse platform
javagruppen.dk - e4, the next generation Eclipse platformTonny Madsen
 
Custom cell in objective c
Custom cell in objective cCustom cell in objective c
Custom cell in objective cVishal Verma
 
iPhone SDK dev sharing - the very basics
iPhone SDK dev sharing - the very basicsiPhone SDK dev sharing - the very basics
iPhone SDK dev sharing - the very basicskenshin03
 
iOS Development (Part 3) - Additional GUI Components
iOS Development (Part 3) - Additional GUI ComponentsiOS Development (Part 3) - Additional GUI Components
iOS Development (Part 3) - Additional GUI ComponentsAsim Rais Siddiqui
 

Semelhante a L0020 - The Basic RCP Application (20)

Rcp by example
Rcp by exampleRcp by example
Rcp by example
 
Inversion of Control and Dependency Injection
Inversion of Control and Dependency InjectionInversion of Control and Dependency Injection
Inversion of Control and Dependency Injection
 
Making React Native UI Components with Swift
Making React Native UI Components with SwiftMaking React Native UI Components with Swift
Making React Native UI Components with Swift
 
Aspnet mvc tutorial_01_cs
Aspnet mvc tutorial_01_csAspnet mvc tutorial_01_cs
Aspnet mvc tutorial_01_cs
 
How to instantiate any view controller for free
How to instantiate any view controller for freeHow to instantiate any view controller for free
How to instantiate any view controller for free
 
Distributing information on iOS
Distributing information on iOSDistributing information on iOS
Distributing information on iOS
 
GUI design using JAVAFX.ppt
GUI design using JAVAFX.pptGUI design using JAVAFX.ppt
GUI design using JAVAFX.ppt
 
Effective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjectsEffective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjects
 
L2 Web App Development Guest Lecture At University of Surrey 20/11/09
L2 Web App Development Guest Lecture At University of Surrey 20/11/09L2 Web App Development Guest Lecture At University of Surrey 20/11/09
L2 Web App Development Guest Lecture At University of Surrey 20/11/09
 
javagruppen.dk - e4, the next generation Eclipse platform
javagruppen.dk - e4, the next generation Eclipse platformjavagruppen.dk - e4, the next generation Eclipse platform
javagruppen.dk - e4, the next generation Eclipse platform
 
Lightning Talk - Xamarin
Lightning Talk - Xamarin Lightning Talk - Xamarin
Lightning Talk - Xamarin
 
Custom cell in objective c
Custom cell in objective cCustom cell in objective c
Custom cell in objective c
 
iPhone SDK dev sharing - the very basics
iPhone SDK dev sharing - the very basicsiPhone SDK dev sharing - the very basics
iPhone SDK dev sharing - the very basics
 
Runtime surgery
Runtime surgeryRuntime surgery
Runtime surgery
 
Unit i informatica en ingles
Unit i informatica en inglesUnit i informatica en ingles
Unit i informatica en ingles
 
Unit 1 informatica en ingles
Unit 1 informatica en inglesUnit 1 informatica en ingles
Unit 1 informatica en ingles
 
The Prana IoC Container
The Prana IoC ContainerThe Prana IoC Container
The Prana IoC Container
 
iOS Development (Part 3) - Additional GUI Components
iOS Development (Part 3) - Additional GUI ComponentsiOS Development (Part 3) - Additional GUI Components
iOS Development (Part 3) - Additional GUI Components
 
DataFX - JavaOne 2013
DataFX - JavaOne 2013DataFX - JavaOne 2013
DataFX - JavaOne 2013
 
UIAutomator
UIAutomatorUIAutomator
UIAutomator
 

Mais de Tonny Madsen

L0037 - Basic Eclipse Configuration
L0037 - Basic Eclipse ConfigurationL0037 - Basic Eclipse Configuration
L0037 - Basic Eclipse ConfigurationTonny Madsen
 
L0001 - The Terminology of the Eclipse Platform
L0001 - The Terminology of the Eclipse PlatformL0001 - The Terminology of the Eclipse Platform
L0001 - The Terminology of the Eclipse PlatformTonny Madsen
 
EclipseCon '11 - Using Adapters to Handle Menus and Handlers in Large Scale A...
EclipseCon '11 - Using Adapters to Handle Menus and Handlers in Large Scale A...EclipseCon '11 - Using Adapters to Handle Menus and Handlers in Large Scale A...
EclipseCon '11 - Using Adapters to Handle Menus and Handlers in Large Scale A...Tonny Madsen
 
PROSA - Eclipse Is Just What?
PROSA - Eclipse Is Just What?PROSA - Eclipse Is Just What?
PROSA - Eclipse Is Just What?Tonny Madsen
 
Eclipse Demo Camp 2010 - Eclipse e4 – The Status and the Future
Eclipse Demo Camp 2010 - Eclipse e4 – The Status and the FutureEclipse Demo Camp 2010 - Eclipse e4 – The Status and the Future
Eclipse Demo Camp 2010 - Eclipse e4 – The Status and the FutureTonny Madsen
 
Eclipse Demo Camp 2010 - UI Bindings - An Introduction
Eclipse Demo Camp 2010 - UI Bindings - An IntroductionEclipse Demo Camp 2010 - UI Bindings - An Introduction
Eclipse Demo Camp 2010 - UI Bindings - An IntroductionTonny Madsen
 
ITU - MDD – Model-to-Model Transformations
ITU - MDD – Model-to-Model TransformationsITU - MDD – Model-to-Model Transformations
ITU - MDD – Model-to-Model TransformationsTonny Madsen
 
IDA - Eclipse Workshop II (In Danish)
IDA - Eclipse Workshop II (In Danish)IDA - Eclipse Workshop II (In Danish)
IDA - Eclipse Workshop II (In Danish)Tonny Madsen
 
IDA - Eclipse Workshop I (In Danish)
IDA - Eclipse Workshop I (In Danish)IDA - Eclipse Workshop I (In Danish)
IDA - Eclipse Workshop I (In Danish)Tonny Madsen
 
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen (In Dan...
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen (In Dan...IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen (In Dan...
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen (In Dan...Tonny Madsen
 
ITU - MDD - Eclipse Plug-ins
ITU - MDD - Eclipse Plug-insITU - MDD - Eclipse Plug-ins
ITU - MDD - Eclipse Plug-insTonny Madsen
 
EclipseCon '08 - BoF - Building a local Eclipse user group
EclipseCon '08 - BoF - Building a local Eclipse user groupEclipseCon '08 - BoF - Building a local Eclipse user group
EclipseCon '08 - BoF - Building a local Eclipse user groupTonny Madsen
 
Eclipse Summit Europe '08 - Implementing Screen Flows in Eclipse RCP Applicat...
Eclipse Summit Europe '08 - Implementing Screen Flows in Eclipse RCP Applicat...Eclipse Summit Europe '08 - Implementing Screen Flows in Eclipse RCP Applicat...
Eclipse Summit Europe '08 - Implementing Screen Flows in Eclipse RCP Applicat...Tonny Madsen
 
EclipseCon '09 - The Happy Marriage of EMF, Data binding, UI Forms and Field ...
EclipseCon '09 - The Happy Marriage of EMF, Data binding, UI Forms and Field ...EclipseCon '09 - The Happy Marriage of EMF, Data binding, UI Forms and Field ...
EclipseCon '09 - The Happy Marriage of EMF, Data binding, UI Forms and Field ...Tonny Madsen
 
ITU - MDD – Modeling Techniques
ITU - MDD – Modeling TechniquesITU - MDD – Modeling Techniques
ITU - MDD – Modeling TechniquesTonny Madsen
 
ITU - MDD - Textural Languages and Grammars
ITU - MDD - Textural Languages and GrammarsITU - MDD - Textural Languages and Grammars
ITU - MDD - Textural Languages and GrammarsTonny Madsen
 
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejenIDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejenTonny Madsen
 
EclipseCon '08 - Lessons Learned from an Enterprise RCP Application
EclipseCon '08 - Lessons Learned from an Enterprise RCP ApplicationEclipseCon '08 - Lessons Learned from an Enterprise RCP Application
EclipseCon '08 - Lessons Learned from an Enterprise RCP ApplicationTonny Madsen
 

Mais de Tonny Madsen (20)

L0037 - Basic Eclipse Configuration
L0037 - Basic Eclipse ConfigurationL0037 - Basic Eclipse Configuration
L0037 - Basic Eclipse Configuration
 
L0001 - The Terminology of the Eclipse Platform
L0001 - The Terminology of the Eclipse PlatformL0001 - The Terminology of the Eclipse Platform
L0001 - The Terminology of the Eclipse Platform
 
EclipseCon '11 - Using Adapters to Handle Menus and Handlers in Large Scale A...
EclipseCon '11 - Using Adapters to Handle Menus and Handlers in Large Scale A...EclipseCon '11 - Using Adapters to Handle Menus and Handlers in Large Scale A...
EclipseCon '11 - Using Adapters to Handle Menus and Handlers in Large Scale A...
 
PROSA - Eclipse Is Just What?
PROSA - Eclipse Is Just What?PROSA - Eclipse Is Just What?
PROSA - Eclipse Is Just What?
 
Eclipse Demo Camp 2010 - Eclipse e4 – The Status and the Future
Eclipse Demo Camp 2010 - Eclipse e4 – The Status and the FutureEclipse Demo Camp 2010 - Eclipse e4 – The Status and the Future
Eclipse Demo Camp 2010 - Eclipse e4 – The Status and the Future
 
Eclipse Demo Camp 2010 - UI Bindings - An Introduction
Eclipse Demo Camp 2010 - UI Bindings - An IntroductionEclipse Demo Camp 2010 - UI Bindings - An Introduction
Eclipse Demo Camp 2010 - UI Bindings - An Introduction
 
ITU - MDD – Model-to-Model Transformations
ITU - MDD – Model-to-Model TransformationsITU - MDD – Model-to-Model Transformations
ITU - MDD – Model-to-Model Transformations
 
IDA - Eclipse Workshop II (In Danish)
IDA - Eclipse Workshop II (In Danish)IDA - Eclipse Workshop II (In Danish)
IDA - Eclipse Workshop II (In Danish)
 
IDA - Eclipse Workshop I (In Danish)
IDA - Eclipse Workshop I (In Danish)IDA - Eclipse Workshop I (In Danish)
IDA - Eclipse Workshop I (In Danish)
 
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen (In Dan...
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen (In Dan...IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen (In Dan...
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen (In Dan...
 
ITU - MDD - EMF
ITU - MDD - EMFITU - MDD - EMF
ITU - MDD - EMF
 
ITU - MDD - Eclipse Plug-ins
ITU - MDD - Eclipse Plug-insITU - MDD - Eclipse Plug-ins
ITU - MDD - Eclipse Plug-ins
 
ITU - MDD - XText
ITU - MDD - XTextITU - MDD - XText
ITU - MDD - XText
 
EclipseCon '08 - BoF - Building a local Eclipse user group
EclipseCon '08 - BoF - Building a local Eclipse user groupEclipseCon '08 - BoF - Building a local Eclipse user group
EclipseCon '08 - BoF - Building a local Eclipse user group
 
Eclipse Summit Europe '08 - Implementing Screen Flows in Eclipse RCP Applicat...
Eclipse Summit Europe '08 - Implementing Screen Flows in Eclipse RCP Applicat...Eclipse Summit Europe '08 - Implementing Screen Flows in Eclipse RCP Applicat...
Eclipse Summit Europe '08 - Implementing Screen Flows in Eclipse RCP Applicat...
 
EclipseCon '09 - The Happy Marriage of EMF, Data binding, UI Forms and Field ...
EclipseCon '09 - The Happy Marriage of EMF, Data binding, UI Forms and Field ...EclipseCon '09 - The Happy Marriage of EMF, Data binding, UI Forms and Field ...
EclipseCon '09 - The Happy Marriage of EMF, Data binding, UI Forms and Field ...
 
ITU - MDD – Modeling Techniques
ITU - MDD – Modeling TechniquesITU - MDD – Modeling Techniques
ITU - MDD – Modeling Techniques
 
ITU - MDD - Textural Languages and Grammars
ITU - MDD - Textural Languages and GrammarsITU - MDD - Textural Languages and Grammars
ITU - MDD - Textural Languages and Grammars
 
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejenIDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen
 
EclipseCon '08 - Lessons Learned from an Enterprise RCP Application
EclipseCon '08 - Lessons Learned from an Enterprise RCP ApplicationEclipseCon '08 - Lessons Learned from an Enterprise RCP Application
EclipseCon '08 - Lessons Learned from an Enterprise RCP Application
 

Último

31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleCeline George
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvRicaMaeCastro1
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsPooky Knightsmith
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 

Último (20)

prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP Module
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young minds
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 

L0020 - The Basic RCP Application

  • 1. The Basic RCP Application An overview of the code that makes up the skeleton of a basic RCP application. This includes the basics for advisors and perspectives. This module also describes the basics of how to launch and debug an RCP application. Redistribution and other use of this material requires written permission from The RCP Company. L0001 - 2010-11-27
  • 2. Creating an Eclipse RCP Application Use the “Plug-in Project” wizard! Project Page:  Specify the plug-in name: com.rcpcompany.cex (or whatever) 2 L0001 - 2010-11-27
  • 3. Creating an Eclipse RCP Application Content Page  Change information as appropriate  Activator generated  We contribute to the UI  It is an RCP Application! 3 L0001 - 2010-11-27
  • 4. Creating an Eclipse RCP Application Templates Page:  Use “Hello RCP” template 4 L0001 - 2010-11-27
  • 5. Launch the Application The launch configuration for the application can be created in several ways  E.g. use the “Launch an RCP Application” in the Overview page of the plugin.xml editor Change the name of the application if needed  Use “Run” → “Open Run Dialog…” 5 L0001 - 2010-11-27
  • 6. Update the Launch configuration The arguments of the launch configuration for the application should be updated with the following extra arguments:  -clean – cleans all internal caches  -console – starts the OSGi console  -consoleLog – prints all log messages on standard output 6 L0001 - 2010-11-27
  • 7. Eclipse Workbench Start-Up Sequence The Eclipse workbench is started in the following steps From the user code the important classes are  Application (IApplication):  Handles the initialization of the display  Any login dialog  Creates and runs the workbench using the workbench advisor  WorkbenchAdvisor:  Names the initial perspective  Specifies the window advisor to use  Provides call-outs that is invoked during the life cycle of the workbench – e.g. postStartup and preShutdown  WorkbenchWindowAdvisor:  Specifies the action bar advisor to use  Provides call-outs that is invoked during the life cycle of the workbench window – e.g. postWindowCreate 7 L0001 - 2010-11-27
  • 8. Eclipse Workbench Start-Up Sequence  ActionBarAdvisor:  In 3.2: Created all actions (if hard-coded) - filled in the actions in the menu, tool bar, and status line as needed  In 3.3: Registers all built-in implementations for standard commands  In 3.4 and later: Empty! 8 L0001 - 2010-11-27
  • 9. The Application (IApplication) Object (3.3 and later edition) Identified via the extension point org.eclipse.core.runtime.applications Simply creates a new SWT display and launches the application code The place to handle login dialogs and similar Eclipse 3.3 has added a stop() method to gracefully stop an application public class Application implements IApplication { public Object start(IApplicationContext context) throws Exception { Display display = PlatformUI.createDisplay(); try { int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor()); if (returnCode == PlatformUI.RETURN_RESTART) return IApplication.EXIT_RESTART; else return IApplication.EXIT_OK; } finally { display.dispose(); } } public void stop() { … } } 9 L0001 - 2010-11-27
  • 10. The WorkbenchAdvisor Object Specified by the Application object Identifies the initial perspective to be used in the application – can be overridden by saved state Specifies the WorkbenchWindowAdvisor to be used when SWT windows are created public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor { private static final String PERSPECTIVE_ID = "com.rcpcompany.cex.perspective"; public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) { return new ApplicationWorkbenchWindowAdvisor(configurer); } public String getInitialWindowPerspectiveId() { return PERSPECTIVE_ID; } } 10 L0001 - 2010-11-27
  • 11. The WorkbenchWindowAdvisor Object Specified by the WorkbenchAdvisor object Specifies the ActionBarAdvisor to use public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor { public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) { super(configurer); } @Override public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) { return new ApplicationActionBarAdvisor(configurer); } .... } 11 L0001 - 2010-11-27
  • 12. The WorkbenchWindowAdvisor Object Configures the basic window properties  Name  Size  Presence of basic UI elements  Menu bar, toolbar, status Line, fast views, and perspective switcher  Progress indicators public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor { .... @Override public void preWindowOpen() { IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); configurer.setInitialSize(new Point(800, 600)); configurer.setShowCoolBar(false); configurer.setShowMenuBar(true); configurer.setShowStatusLine(false); configurer.setTitle("Hello Contact Manager"); } } 12 L0001 - 2010-11-27
  • 13. The ActionBarAdvisor Object Specified by the WorkbenchWindowAdvisor object In 3.2: Created all actions (if hard-coded) - filled in the actions in the menu, tool bar, and status line as needed In 3.3: Registers all built-in implementations for standard commands In 3.4 and later: Empty! public class ApplicationActionBarAdvisor extends ActionBarAdvisor { public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) { super(configurer); } protected void makeActions(IWorkbenchWindow window) { } protected void fillMenuBar(IMenuManager menuBar) { } } 13 L0001 - 2010-11-27
  • 14. The Perspective Object Specified by the WorkbenchAdvisor object Creates the initial perspective in terms of  Views  Global actions  Shortcuts on relevant menus public class Perspective implements IPerspectiveFactory { public void createInitialLayout(IPageLayout layout) { } } 14 L0001 - 2010-11-27
  • 15. Lab Exercise Create the application. If you have not used the Eclipse debugger before, then introduce an error – e.g. divide-by-zero – and find the error in the debugger 15 L0001 - 2010-11-27
  • 16. Adding a View A new view can easily be added using the extensions page for the plugin.xml file  Add a new extension with the name “org.eclipse.ui.views”  Select the new line and add a “New”→”view” using the context menu  Specify id, name and class as shown here 16 L0001 - 2010-11-27
  • 17. Adding a View, cont’ Click on the “class” link to create the new View class automatically Two methods must be implemented  createPartControl(Composite): Creates the visual content of the view  setFocus(): Sets the initial focus of the view public class FirstView extends ViewPart { @Override public void createPartControl(Composite parent) { } @Override public void setFocus() { } } 17 L0001 - 2010-11-27
  • 18. Adding a View, cont’ Adding the view to the perspective  No editor is used  Views are positioned relatively to other views (or the editor)  The new view is placed to the left of the (non-existing) editor and will take all of the room public class Perspective implements IPerspectiveFactory { public void createInitialLayout(IPageLayout layout) { final String area = layout.getEditorArea(); layout.setEditorAreaVisible(false); layout.addView(”com.rcpcompany.ex.views.FirstView”, IPageLayout.LEFT, 1.0f, area); } } 18 L0001 - 2010-11-27
  • 19. Re-Launch the Application Now the application includes the new view Note that  The are no editor area  The view tab is present  The view can be closed  The view can be minimized 19 L0001 - 2010-11-27
  • 20. Adding a File→Exit Command (3.3 and later edition) Added in the plugin.xml file <extension point="org.eclipse.ui.menus"> <menuContribution locationURI="menu:org.eclipse.ui.main.menu"> <menu label="File” id=”file” mnemonic="F"> <command commandId="org.eclipse.ui.file.exit" /> </menu> </menuContribution> </extension> And to the ActionBarAdvisor object (3.3 edition only)  Uses predefined exit action public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) { super(configurer); } protected void makeActions(IWorkbenchWindow window) { register(ActionFactory.QUIT.create(window)); } protected void fillMenuBar(IMenuManager menuBar) { }  This is not needed for Eclipse 3.4 or later, where the behavior is defined via the handlers extension point 20 L0001 - 2010-11-27
  • 21. Re-Launch the Application Now the application includes the new exit action 21 L0001 - 2010-11-27
  • 22. Lab Exercise Create 4 views altogether Add the views to the perspective  The way to position views in a perspective have not be discussed in details, but… Create the actions  Help→About  Hint: the ID is org.eclipse.ui.help.aboutAction Extras:  Add the “Show View” command 22 L0001 - 2010-11-27
  • 23. More Information “Eclipse Rich Client Platform: Designing, Coding, and Packaging Java(TM) Applications” by Jeff McAffer and Jean-Michel Lemieux (ISBN 978-0321334619)  The essential bible for everybody involved in Eclipse RCP. Includes numerous examples with best practices for RCP applications 23 L0001 - 2010-11-27

Notas do Editor

  1. \n
  2. Creating a new Eclipse RCP is quite easy: just use the supplied wizard. \n
  3. Enabling the API Analysis does not matter in this case. It is used to test for incompatible changes between releases of a plug-in.\n
  4. Don&amp;#x2019;t use any of thee other templates &amp;#x2013; that would be cheating!\n
  5. A launch configuration can be saved in the files system making it easy to share the configuration. Simply click the Shared option on the &amp;#x201C;Common&amp;#x201D; tab of the launch configuration and specify the name of the launch file. The shared launch configurations are automatically picked up by Eclipse IDE.\n
  6. \n
  7. The different advisors are described in details in the module &amp;#x201C;L0038 - The Workbench Configuration&amp;#x201D;.\n
  8. The different advisors are described in details in the module &amp;#x201C;L0038 - The Workbench Configuration&amp;#x201D;.\n
  9. \n
  10. The changes made to way the application is started (and stopped), is primary due to better support servers. In server multiple applications can be running in the same process space and the start and stop methods are therefore important. \n
  11. The generated code above is not really optional when scaling up the application. The PERSPECTIVE_ID should be moved to the Perspective class as ID.\n
  12. \n
  13. \n
  14. The fact that the ActionBarAdvisor is specified by the WorkbenchWindowAdvisor means that each window will have its own set of actions, menus, etc. In most cases, this is overkill and could be avoided by some careful programming. Note though that if the windows are placed on different monitors (with different properties such as size, resolution and color-depth) then it is necessary to have different font and image resources for the different windows&amp;#x2026;\nThe configurer is used to retrieve the different managers for the menu, tool bar, status line, etc. It is also used to register global actions if needed.\n
  15. \n
  16. Now it&amp;#x2019;s time for the lab.\n
  17. \n
  18. \n
  19. The exact possibilities when positioning views is covered in the module &amp;#x201C;L0011 - Contributing to the Eclipse User Interface&amp;#x201D;.\n
  20. The tab can easily be avoided by using addStandaloneView(&amp;#x2026;) instead of addView(&amp;#x2026;). This is useful when certain view may never be moved or closed.\n
  21. This is basically the same as on the previous slide &amp;#x2013; just declared instead of programmed&amp;#x2026;\n
  22. \n
  23. Now it&amp;#x2019;s time for the lab.\n
  24. \n