SlideShare uma empresa Scribd logo
1 de 7
Baixar para ler offline
Tutorial “SingleSourcing RAP and RCP”

                                  EclipseCon 2009

Setup
We provide a folder called RapTutorial2009. Copy this directory onto your computer. You
should now have a directory structure like this:
       RapTutorial2009/
   •
       ◦ projects/
         • org.eclipse.rap.tutorial (the starting point)
       ◦ results/ (all projects in the final form)
         • ...
       ◦ workspaces/
         • RAP/ (referred to as quot;RAP workspacequot;)
         • RCP/ (referred to as quot;RCP workspacequot;)
       ◦ ...

Install RAP Tooling
       Start Eclipse and choose the RAP workspace
   •
       Install the latest RAP Tooling (version 1.2 M6) from this update site
   •
       http://download.eclipse.org/rt/rap/1.2/update.The
       RAPTutorial2009 folder also contains a local update site.
       Restart Eclipse after the installation is done
   •
       On the Welcome page, click quot;Rich Ajax Platform (RAP)quot;
   •
       On the next page, click “Install Target Platform”
   •

         The RAP Tooling contains the RAP runtime. It also comes with a “target installer” that extracts the
         RAP runtime and sets it as the target platform of the current workspace (i.e. the platform that all
         plug-in projects in the workspace are compiled against).

         Alternatively, the target can be switched by Window -> Preferences -> Plugin Development ->
         Target Platform



Lab1 - Single Sourcing
Import Project into Workspace
We have prepared a simple project that basically contains the well-known mail template
from RCP. Open the RCP workspace and import this project:
       Open the File → Import → Existing Projects into Workspace wizard and select the
   •
       org.eclipse.rap.tutorial project
Important: Do not copy the project into your workspace!
         Make sure the Application runs. Open the MANIFEST.MF and click on the link
     •
         “Launch an Eclipse Application”.

Switch to RAP Workspace
         Select File → Switch workspace → Select “RAP” directory
     •
         Import the project org.eclipse.rap.tutorial into this workspace too, again
     •
         remember not to copy it into your workspace

Resolve compile errors

Fix bundle dependencies
         Open Problems view, there are > 100 compile errors.
     •
         Open the MANIFEST.MF and go to the “Dependencies” tab, section “Required Plug-
     •
         ins”
         Make the bundle-dependency to org.eclipse.ui optional (Select
     •
         org.eclipse.ui, click on the “Properties” button and check “Optional”
         Add org.eclipse.rap.ui and make it optional as well and save the changes
     •
Note that the error count has reduced to two

Create class AboutActionHelper
         Paste the two classes below into the source folder of your
     •
         org.eclipse.rap.tutorial project
// AboutActionHelper
package org.eclipse.rap.tutorial;

import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;

public abstract class AboutActionHelper {

    private static final AboutActionHelper IMPL;
    static {
      Class clazz = AboutActionHelper.class;
      Object newInstance = ImplementationLoader.newInstance( clazz );
      IMPL = ( AboutActionHelper )newInstance;
    }

    public static IWorkbenchAction create( IWorkbenchWindow window ) {
      return IMPL.createInternal( window );
    }

    protected abstract IWorkbenchAction createInternal( IWorkbenchWindow window );
}


// ImplementationLoader
package org.eclipse.rap.tutorial;

import java.text.MessageFormat;
public final class ImplementationLoader {

    public static Object newInstance( Class type ) {
      String name = type.getName();
      Object result = null;
      ClassLoader loader = type.getClassLoader();
      try {
        Class clazz = loader.loadClass( name + quot;Implquot; );
        result = clazz.newInstance();
      } catch( Throwable t ) {
        String txt = quot;Could not load implementation for {0}quot;;
        String msg = MessageFormat.format( txt, new Object[]{ name } );
        throw new RuntimeException( msg, t );
      }
      return result;
    }

    private ImplementationLoader() {
    }
}



        In the class ApplicationActionBarAdvisor, go to line ~ 51 and change the
    •
        line
          aboutAction = ActionFactory.createAboutAction( window );
        to
          aboutAction = AboutActionHelper.create( window );

Create Fragment
        Choose. New → Project → Fragment Project from the menu to create a fragment
    •
        named org.eclipse.rap.tutorial.rap
        Make sure to uncheck the “Use default location” option
    •
        Location: RapTutorial2009/projects/org.eclipse.rap.tutorial.rap
    •
        Note: Make sure that the project name is included!
    •
        Press Next and select the host plug-in org.eclipse.rap.tutorial
    •

Create implementation class AboutActionHelperImpl
Paste this code in the source folder of the org.eclipse.rap.tutorial.rap fragment.
// AboutActionHelperImpl
package org.eclipse.rap.tutorial;

import   org.eclipse.jface.action.Action;
import   org.eclipse.jface.dialogs.MessageDialog;
import   org.eclipse.ui.IWorkbenchWindow;
import   org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;

public class AboutActionHelperImpl extends AboutActionHelper {

    private static final class AboutAction extends Action
      implements IWorkbenchAction
    {
      private AboutAction() {
        setText( quot;Aboutquot; );
setId( quot;aboutActionquot; );
         }
         public void run() {
           MessageDialog.openInformation( null, quot;Aboutquot;, quot;About the RAP tutorialquot; );
         }
         public void dispose() {
         }
    }

    protected IWorkbenchAction createInternal( IWorkbenchWindow win ) {
      return new AboutAction();
    }
}


“Resolve” the last problem
For the sake of simplicity, comment out the org.eclipse.ui.bindings extension in
the plugin.xml.
To actually solve this problem, you would switch to the RCP workspace and move the
bindings to the fragment.xml of org.eclipse.rap.tutorial.rcp.

Create an entry point for RAP application.
           Open the MANIFEST.MF of the fragment org.eclipse.rap.tutorial.rap
     •
           and go to to the tab “Extensions”
           Add a new extension to the extension point org.eclipse.rap.ui.entrypoint.
     •
           You can leave the presets for the attributes “id” and “class” at their defaults.
     •
           Change the attribute “parameter” to tutorial
     •
           Click on the class link to have a skeleton of the class created
     •
           Implement the createUI method of the entry point like this:
     •
    public int createUI() {
      Display display = PlatformUI.createDisplay();
      ApplicationWorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor();
      PlatformUI.createAndRunWorkbench( display, advisor );
      return 0;
    }
          You might need to press Ctrl+Shift+O to organize the imports

Launch RAP application
           Create a new RAP launch configuration (Run → Run Configurations → RAP
     •
           Application)
           On tab “Main”, set the “Entry Point” to “tutorial”
     •
           On tab “Bundles”, make sure that your configuration is sane by pressing the
     •
           “Validate Bundles” button
           Launch the application with the “Run” button
     •
Lab 2 - Styling the Application
Layout
To have to workbench window fill the entire browser window, paste the method below into
the ApplicationWorkbenchWindowAdvisor class.
  public void postWindowCreate() {
    super.postWindowCreate();
    if ( SWT.getPlatform().startsWith( quot;rapquot; ) ) {
      IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
      Shell shell = configurer.getWindow().getShell();
      shell.setMaximized( true );
    }
  }

And add the following lines to preWindowOpen
  if ( SWT.getPlatform().startsWith( quot;rapquot; ) ) {
    configurer.setShellStyle( SWT.NO_TRIM );
  }


Branding
       In the RAP workspace, open the fragment.xml of the RAP fragment. Switch to
   •
       the “Extensions” tab.
       Add an extension for the extension point org.eclipse.rap.ui.branding
   •
       Leave the default id as is
   •
       Set attribute “servletName” to “mail”
   •
       Set attribute “defaultEntrypointId” to “org.eclipse.rap.tutorial.rap.entrypoint1” As a
   •
       result, this entrypoint becomes the default entrypoint for this branding.
       Set attribute “title” to your chosen HTML title string, e.g. “RAP Tutorial Demo”. This
   •
       title will appear in the browser title bar
       In your launch configuration, change the servlet name to “mail” and restart the
   •
       application
Instead of localhost:<port>/rap?startup=tutorial, you can now start the
application with localhost:<port>/mail

Theming
       Copy the directory RapTutorial2009/templates/theme/ into the RAP
   •
       fragment.
       Back in the fragment editor, add an extension for the extension point
   •
       org.eclipse.rap.ui.themes.
       Leave the default id as is
   •
       Set attribute “file” to “theme/theme.css”.
   •
       In the above created branding extension , set attribute “themeId” to the id of this
   •
       extension (org.eclipse.rap.tutorial.rap.theme1).
Now the theme is connected to the “mail” branding
   •
       Restart the application to see the changes
   •
       Open the fragment's build.properties and ensure that the theme folder is
   •
       checked in the Binary Build section.

Presentation
If you like to experiment with the new interaction design API, there is a default
implementation available.
       Import the org.eclipse.rap.design.business project from the
   •
       RapTutorial2009/projects folder into your workspace
       open your launch configuration and change the “Servlet Name” to business
   •
       Make sure that your launch configuration also includes the just imported plug-in and
   •
       set the servlet name
       Restart the application
   •
The implementation is work in progress and will be available from the RAP CVS soon.


Lab 3 - Deployment
Ingredients
In order to deploy your application you will need three more projects:
       org.eclipse.rap.demo.feature – serves as a template
   •
       org.eclipse.equinox.servletbrige
   •
       org.eclipse.equinox.http.servletbridge - provides a means to bridge
   •
       the servlet and OSGi runtimes
Import these projects from the RapTutorial2009/projects folder into the workspace.
Make sure that “Copy projects into workspace“ is unchecked.

         These projects are also located in the Eclipse CVS
         (:pserver:anonymous@dev.eclipse.org:/cvsroot/rt). The
         org.eclipse.rap.demo.feature resides in the org.eclipse.rap/releng, the other projects can be
         found under org.eclipse.equinox/server-side/bundles.




Adjust the template
       Open the feature.xml from the org.eclipse.rap.demo.feature project
   •
       and go to the Plug-ins page
       Add org.eclipse.rap.tutorial and org.eclipse.rap.tutorial.rap to
   •
       the list of plug-ins
       Open the config.ini in the templates/WEB-INF/eclipse/configuration
   •
       folder
       Add the bundle IDs org.eclipse.rap.tutorial and
   •
org.eclipse.rap.tutorial.rap to the osgi.bundles property like this:
         org.eclipse.rap.tutorial@start,
         org.eclipse.rap.tutorial.rap@start

Run the build
       From the main menu choose Run → External Tools → External Tools Configuration
   •
       Run the webappBuilder launch configuration from the Ant Build category.
   •
       This launch configuration runs an Ant script and ensures that the script is executed
       within the same JRE as the workspace.
       See the script output in the console view and the PDE Export being started
       asynchronously
       Wait until the PDE Export has terminated as can be seen in the status line
   •
       Refresh the org.eclipse.rap.demo.feature project. You will see a build
   •
       folder.
       Open the “Archive File” export wizard under File → Export
   •
       Select the folder org.eclipse.rap.demo.feature/build/demo/WEB-INF/
   •
       Enter demo.war as archive filename (the filename will usually become the name of
   •
       the deployed web application).
       Choose “Create only selected directories” from the options
   •
       Make sure that the WEB-INF folder is included in the war archive at the top level.
   •

               For troubleshooting, you can turn on the OSGi console by uncommenting the
               commandline init parameter “-console” in your web.xml. To have exceptions logged you
               can also add the commandline parameter “-consolelog”.



Stress Testing
You can use the RAPTutorial2009/templates/stress-testing.jmx as a starting
point. Further information about this topic can be found here
http://wiki.eclipse.org/RAP/LoadTesting. Don't forget to change to filename of the “Simple
Data Writer” to something meaningful.


Resources
       Frequently asked questions - http://wiki.eclipse.org/RAP/FAQ
   •
       RAP home page - http://eclipse.org/rap
   •
       RAP wiki - http://wiki.eclipse.org/RAP
   •
       Single Sourcing - http://eclipse.org/rap/singlesourcing.php
   •

Mais conteúdo relacionado

Mais procurados

Droidcon ES '16 - How to fail going offline
Droidcon ES '16 - How to fail going offlineDroidcon ES '16 - How to fail going offline
Droidcon ES '16 - How to fail going offlineJavier de Pedro López
 
081107 Sammy Eclipse Summit2
081107   Sammy   Eclipse Summit2081107   Sammy   Eclipse Summit2
081107 Sammy Eclipse Summit2mkempka
 
Supplement J Eclipse
Supplement J EclipseSupplement J Eclipse
Supplement J Eclipsenga
 
Modernize Your Real-World Application with Eclipse 4 and JavaFX
Modernize Your Real-World Application with Eclipse 4 and JavaFXModernize Your Real-World Application with Eclipse 4 and JavaFX
Modernize Your Real-World Application with Eclipse 4 and JavaFXCole Markham
 
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)Tobias Schneck
 
Debugging over tcp and http
Debugging over tcp and httpDebugging over tcp and http
Debugging over tcp and httpKaniska Mandal
 
What's new for JavaFX in JDK8 - Weaver
What's new for JavaFX in JDK8 - WeaverWhat's new for JavaFX in JDK8 - Weaver
What's new for JavaFX in JDK8 - WeaverCodemotion
 
Flash, actionscript 2 : preloader for loader component.pdf
Flash, actionscript 2 : preloader for loader component.pdfFlash, actionscript 2 : preloader for loader component.pdf
Flash, actionscript 2 : preloader for loader component.pdfSMK Negeri 6 Malang
 
Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812Pantech ProLabs India Pvt Ltd
 
Plugin for Plugin, или расширяем Android New Build System. Антон Руткевич
 Plugin for Plugin, или расширяем Android New Build System. Антон Руткевич Plugin for Plugin, или расширяем Android New Build System. Антон Руткевич
Plugin for Plugin, или расширяем Android New Build System. Антон РуткевичYandex
 
Selenium Automation in Java Using HttpWatch Plug-in
 Selenium Automation in Java Using HttpWatch Plug-in  Selenium Automation in Java Using HttpWatch Plug-in
Selenium Automation in Java Using HttpWatch Plug-in Sandeep Tol
 
Using HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in JavaUsing HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in JavaSandeep Tol
 
Developed your first Xamarin.Forms Application
Developed your first Xamarin.Forms ApplicationDeveloped your first Xamarin.Forms Application
Developed your first Xamarin.Forms ApplicationCheah Eng Soon
 
PhoneGap JavaScript API vs Native Components
PhoneGap JavaScript API vs Native ComponentsPhoneGap JavaScript API vs Native Components
PhoneGap JavaScript API vs Native ComponentsTechAhead
 
Maintaining a dependency graph with weaver
Maintaining a dependency graph with weaverMaintaining a dependency graph with weaver
Maintaining a dependency graph with weaverScribd
 
Getting started with code composer studio v4 for tms320 f2812
Getting started with code composer studio v4 for tms320 f2812Getting started with code composer studio v4 for tms320 f2812
Getting started with code composer studio v4 for tms320 f2812Pantech ProLabs India Pvt Ltd
 

Mais procurados (20)

Droidcon ES '16 - How to fail going offline
Droidcon ES '16 - How to fail going offlineDroidcon ES '16 - How to fail going offline
Droidcon ES '16 - How to fail going offline
 
Installing the java sdk
Installing the java sdkInstalling the java sdk
Installing the java sdk
 
081107 Sammy Eclipse Summit2
081107   Sammy   Eclipse Summit2081107   Sammy   Eclipse Summit2
081107 Sammy Eclipse Summit2
 
Supplement J Eclipse
Supplement J EclipseSupplement J Eclipse
Supplement J Eclipse
 
Modernize Your Real-World Application with Eclipse 4 and JavaFX
Modernize Your Real-World Application with Eclipse 4 and JavaFXModernize Your Real-World Application with Eclipse 4 and JavaFX
Modernize Your Real-World Application with Eclipse 4 and JavaFX
 
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
 
Debugging over tcp and http
Debugging over tcp and httpDebugging over tcp and http
Debugging over tcp and http
 
What's new for JavaFX in JDK8 - Weaver
What's new for JavaFX in JDK8 - WeaverWhat's new for JavaFX in JDK8 - Weaver
What's new for JavaFX in JDK8 - Weaver
 
Flash, actionscript 2 : preloader for loader component.pdf
Flash, actionscript 2 : preloader for loader component.pdfFlash, actionscript 2 : preloader for loader component.pdf
Flash, actionscript 2 : preloader for loader component.pdf
 
Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812
 
Plugin for Plugin, или расширяем Android New Build System. Антон Руткевич
 Plugin for Plugin, или расширяем Android New Build System. Антон Руткевич Plugin for Plugin, или расширяем Android New Build System. Антон Руткевич
Plugin for Plugin, или расширяем Android New Build System. Антон Руткевич
 
Php Debugger
Php DebuggerPhp Debugger
Php Debugger
 
Selenium Automation in Java Using HttpWatch Plug-in
 Selenium Automation in Java Using HttpWatch Plug-in  Selenium Automation in Java Using HttpWatch Plug-in
Selenium Automation in Java Using HttpWatch Plug-in
 
Using HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in JavaUsing HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in Java
 
Developed your first Xamarin.Forms Application
Developed your first Xamarin.Forms ApplicationDeveloped your first Xamarin.Forms Application
Developed your first Xamarin.Forms Application
 
PhoneGap JavaScript API vs Native Components
PhoneGap JavaScript API vs Native ComponentsPhoneGap JavaScript API vs Native Components
PhoneGap JavaScript API vs Native Components
 
Maintaining a dependency graph with weaver
Maintaining a dependency graph with weaverMaintaining a dependency graph with weaver
Maintaining a dependency graph with weaver
 
Getting started with code composer studio v4 for tms320 f2812
Getting started with code composer studio v4 for tms320 f2812Getting started with code composer studio v4 for tms320 f2812
Getting started with code composer studio v4 for tms320 f2812
 
The JavaFX Ecosystem
The JavaFX EcosystemThe JavaFX Ecosystem
The JavaFX Ecosystem
 
#JavaFX.forReal()
#JavaFX.forReal()#JavaFX.forReal()
#JavaFX.forReal()
 

Semelhante a Single Sourcing RAP and RCP - Desktop and web clients from a single code base

Getting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platformGetting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platformJean-Michel Bouffard
 
Java Intro: Unit1. Hello World
Java Intro: Unit1. Hello WorldJava Intro: Unit1. Hello World
Java Intro: Unit1. Hello WorldYakov Fain
 
Ultimate Survival - React-Native edition
Ultimate Survival - React-Native editionUltimate Survival - React-Native edition
Ultimate Survival - React-Native editionRichard Radics
 
Jenkins Pipeline meets Oracle
Jenkins Pipeline meets OracleJenkins Pipeline meets Oracle
Jenkins Pipeline meets OracleOliver Lemm
 
Developing Java SWT Applications - A Starter
Developing Java SWT Applications - A StarterDeveloping Java SWT Applications - A Starter
Developing Java SWT Applications - A Startervcaselli
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to javaciklum_ods
 
Introduction to react_js
Introduction to react_jsIntroduction to react_js
Introduction to react_jsMicroPyramid .
 
Developing for Plone using ArchGenXML / ArgoUML
Developing for Plone using ArchGenXML / ArgoUMLDeveloping for Plone using ArchGenXML / ArgoUML
Developing for Plone using ArchGenXML / ArgoUMLJazkarta, Inc.
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesPavol Pitoňák
 
oops with java modules iii & iv.pptx
oops with java modules iii & iv.pptxoops with java modules iii & iv.pptx
oops with java modules iii & iv.pptxrani marri
 
Creating a windowed program
Creating a windowed programCreating a windowed program
Creating a windowed programmyrajendra
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalDrupalDay
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupalsparkfabrik
 
BLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docxBLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docxmoirarandell
 
Chapter 2.1
Chapter 2.1Chapter 2.1
Chapter 2.1sotlsoc
 
LISA Qooxdoo Tutorial Handouts
LISA Qooxdoo Tutorial HandoutsLISA Qooxdoo Tutorial Handouts
LISA Qooxdoo Tutorial HandoutsTobias Oetiker
 

Semelhante a Single Sourcing RAP and RCP - Desktop and web clients from a single code base (20)

Getting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platformGetting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platform
 
Java Intro: Unit1. Hello World
Java Intro: Unit1. Hello WorldJava Intro: Unit1. Hello World
Java Intro: Unit1. Hello World
 
Ultimate Survival - React-Native edition
Ultimate Survival - React-Native editionUltimate Survival - React-Native edition
Ultimate Survival - React-Native edition
 
Jenkins Pipeline meets Oracle
Jenkins Pipeline meets OracleJenkins Pipeline meets Oracle
Jenkins Pipeline meets Oracle
 
Developing Java SWT Applications - A Starter
Developing Java SWT Applications - A StarterDeveloping Java SWT Applications - A Starter
Developing Java SWT Applications - A Starter
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to java
 
Java applet
Java appletJava applet
Java applet
 
Introduction to react_js
Introduction to react_jsIntroduction to react_js
Introduction to react_js
 
Developing for Plone using ArchGenXML / ArgoUML
Developing for Plone using ArchGenXML / ArgoUMLDeveloping for Plone using ArchGenXML / ArgoUML
Developing for Plone using ArchGenXML / ArgoUML
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile Devices
 
oops with java modules iii & iv.pptx
oops with java modules iii & iv.pptxoops with java modules iii & iv.pptx
oops with java modules iii & iv.pptx
 
Le Wagon - React 101
Le Wagon - React 101Le Wagon - React 101
Le Wagon - React 101
 
Creating a windowed program
Creating a windowed programCreating a windowed program
Creating a windowed program
 
Os Haase
Os HaaseOs Haase
Os Haase
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupal
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupal
 
BLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docxBLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docx
 
Chapter 2.1
Chapter 2.1Chapter 2.1
Chapter 2.1
 
Javalecture 1
Javalecture 1Javalecture 1
Javalecture 1
 
LISA Qooxdoo Tutorial Handouts
LISA Qooxdoo Tutorial HandoutsLISA Qooxdoo Tutorial Handouts
LISA Qooxdoo Tutorial Handouts
 

Mais de Ralf Sternberg

Eclipse in Telemedicine and Health Care - A Success Story with RCP and RAP
Eclipse in Telemedicine and Health Care - A Success Story with RCP and RAPEclipse in Telemedicine and Health Care - A Success Story with RCP and RAP
Eclipse in Telemedicine and Health Care - A Success Story with RCP and RAPRalf Sternberg
 
Dynamic Web Applications with OSGi and RAP
Dynamic Web Applications with OSGi and RAPDynamic Web Applications with OSGi and RAP
Dynamic Web Applications with OSGi and RAPRalf Sternberg
 
A look ahead at RAP - News and Vision
A look ahead at RAP - News and VisionA look ahead at RAP - News and Vision
A look ahead at RAP - News and VisionRalf Sternberg
 
A look ahead at RAP (ESE 2010)
A look ahead at RAP (ESE 2010)A look ahead at RAP (ESE 2010)
A look ahead at RAP (ESE 2010)Ralf Sternberg
 
Single Sourcing RAP and RCP - Desktop and web clients from a single code base
Single Sourcing RAP and RCP - Desktop and web clients from a single code baseSingle Sourcing RAP and RCP - Desktop and web clients from a single code base
Single Sourcing RAP and RCP - Desktop and web clients from a single code baseRalf Sternberg
 
Single Sourcing Techniques for RAP and RCP
Single Sourcing Techniques for RAP and RCPSingle Sourcing Techniques for RAP and RCP
Single Sourcing Techniques for RAP and RCPRalf Sternberg
 
Styling RAP Applications - Short Talk
Styling RAP Applications - Short TalkStyling RAP Applications - Short Talk
Styling RAP Applications - Short TalkRalf Sternberg
 

Mais de Ralf Sternberg (9)

Eclipse in Telemedicine and Health Care - A Success Story with RCP and RAP
Eclipse in Telemedicine and Health Care - A Success Story with RCP and RAPEclipse in Telemedicine and Health Care - A Success Story with RCP and RAP
Eclipse in Telemedicine and Health Care - A Success Story with RCP and RAP
 
Dynamic Web Applications with OSGi and RAP
Dynamic Web Applications with OSGi and RAPDynamic Web Applications with OSGi and RAP
Dynamic Web Applications with OSGi and RAP
 
RAP
RAPRAP
RAP
 
A look ahead at RAP - News and Vision
A look ahead at RAP - News and VisionA look ahead at RAP - News and Vision
A look ahead at RAP - News and Vision
 
A look ahead at RAP (ESE 2010)
A look ahead at RAP (ESE 2010)A look ahead at RAP (ESE 2010)
A look ahead at RAP (ESE 2010)
 
Single Sourcing RAP and RCP - Desktop and web clients from a single code base
Single Sourcing RAP and RCP - Desktop and web clients from a single code baseSingle Sourcing RAP and RCP - Desktop and web clients from a single code base
Single Sourcing RAP and RCP - Desktop and web clients from a single code base
 
Single Sourcing Techniques for RAP and RCP
Single Sourcing Techniques for RAP and RCPSingle Sourcing Techniques for RAP and RCP
Single Sourcing Techniques for RAP and RCP
 
Styling RAP Applications - Short Talk
Styling RAP Applications - Short TalkStyling RAP Applications - Short Talk
Styling RAP Applications - Short Talk
 
Single Sourcing
Single SourcingSingle Sourcing
Single Sourcing
 

Último

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Último (20)

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

Single Sourcing RAP and RCP - Desktop and web clients from a single code base

  • 1. Tutorial “SingleSourcing RAP and RCP” EclipseCon 2009 Setup We provide a folder called RapTutorial2009. Copy this directory onto your computer. You should now have a directory structure like this: RapTutorial2009/ • ◦ projects/ • org.eclipse.rap.tutorial (the starting point) ◦ results/ (all projects in the final form) • ... ◦ workspaces/ • RAP/ (referred to as quot;RAP workspacequot;) • RCP/ (referred to as quot;RCP workspacequot;) ◦ ... Install RAP Tooling Start Eclipse and choose the RAP workspace • Install the latest RAP Tooling (version 1.2 M6) from this update site • http://download.eclipse.org/rt/rap/1.2/update.The RAPTutorial2009 folder also contains a local update site. Restart Eclipse after the installation is done • On the Welcome page, click quot;Rich Ajax Platform (RAP)quot; • On the next page, click “Install Target Platform” • The RAP Tooling contains the RAP runtime. It also comes with a “target installer” that extracts the RAP runtime and sets it as the target platform of the current workspace (i.e. the platform that all plug-in projects in the workspace are compiled against). Alternatively, the target can be switched by Window -> Preferences -> Plugin Development -> Target Platform Lab1 - Single Sourcing Import Project into Workspace We have prepared a simple project that basically contains the well-known mail template from RCP. Open the RCP workspace and import this project: Open the File → Import → Existing Projects into Workspace wizard and select the • org.eclipse.rap.tutorial project
  • 2. Important: Do not copy the project into your workspace! Make sure the Application runs. Open the MANIFEST.MF and click on the link • “Launch an Eclipse Application”. Switch to RAP Workspace Select File → Switch workspace → Select “RAP” directory • Import the project org.eclipse.rap.tutorial into this workspace too, again • remember not to copy it into your workspace Resolve compile errors Fix bundle dependencies Open Problems view, there are > 100 compile errors. • Open the MANIFEST.MF and go to the “Dependencies” tab, section “Required Plug- • ins” Make the bundle-dependency to org.eclipse.ui optional (Select • org.eclipse.ui, click on the “Properties” button and check “Optional” Add org.eclipse.rap.ui and make it optional as well and save the changes • Note that the error count has reduced to two Create class AboutActionHelper Paste the two classes below into the source folder of your • org.eclipse.rap.tutorial project // AboutActionHelper package org.eclipse.rap.tutorial; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction; public abstract class AboutActionHelper { private static final AboutActionHelper IMPL; static { Class clazz = AboutActionHelper.class; Object newInstance = ImplementationLoader.newInstance( clazz ); IMPL = ( AboutActionHelper )newInstance; } public static IWorkbenchAction create( IWorkbenchWindow window ) { return IMPL.createInternal( window ); } protected abstract IWorkbenchAction createInternal( IWorkbenchWindow window ); } // ImplementationLoader package org.eclipse.rap.tutorial; import java.text.MessageFormat;
  • 3. public final class ImplementationLoader { public static Object newInstance( Class type ) { String name = type.getName(); Object result = null; ClassLoader loader = type.getClassLoader(); try { Class clazz = loader.loadClass( name + quot;Implquot; ); result = clazz.newInstance(); } catch( Throwable t ) { String txt = quot;Could not load implementation for {0}quot;; String msg = MessageFormat.format( txt, new Object[]{ name } ); throw new RuntimeException( msg, t ); } return result; } private ImplementationLoader() { } } In the class ApplicationActionBarAdvisor, go to line ~ 51 and change the • line aboutAction = ActionFactory.createAboutAction( window ); to aboutAction = AboutActionHelper.create( window ); Create Fragment Choose. New → Project → Fragment Project from the menu to create a fragment • named org.eclipse.rap.tutorial.rap Make sure to uncheck the “Use default location” option • Location: RapTutorial2009/projects/org.eclipse.rap.tutorial.rap • Note: Make sure that the project name is included! • Press Next and select the host plug-in org.eclipse.rap.tutorial • Create implementation class AboutActionHelperImpl Paste this code in the source folder of the org.eclipse.rap.tutorial.rap fragment. // AboutActionHelperImpl package org.eclipse.rap.tutorial; import org.eclipse.jface.action.Action; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction; public class AboutActionHelperImpl extends AboutActionHelper { private static final class AboutAction extends Action implements IWorkbenchAction { private AboutAction() { setText( quot;Aboutquot; );
  • 4. setId( quot;aboutActionquot; ); } public void run() { MessageDialog.openInformation( null, quot;Aboutquot;, quot;About the RAP tutorialquot; ); } public void dispose() { } } protected IWorkbenchAction createInternal( IWorkbenchWindow win ) { return new AboutAction(); } } “Resolve” the last problem For the sake of simplicity, comment out the org.eclipse.ui.bindings extension in the plugin.xml. To actually solve this problem, you would switch to the RCP workspace and move the bindings to the fragment.xml of org.eclipse.rap.tutorial.rcp. Create an entry point for RAP application. Open the MANIFEST.MF of the fragment org.eclipse.rap.tutorial.rap • and go to to the tab “Extensions” Add a new extension to the extension point org.eclipse.rap.ui.entrypoint. • You can leave the presets for the attributes “id” and “class” at their defaults. • Change the attribute “parameter” to tutorial • Click on the class link to have a skeleton of the class created • Implement the createUI method of the entry point like this: • public int createUI() { Display display = PlatformUI.createDisplay(); ApplicationWorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor(); PlatformUI.createAndRunWorkbench( display, advisor ); return 0; } You might need to press Ctrl+Shift+O to organize the imports Launch RAP application Create a new RAP launch configuration (Run → Run Configurations → RAP • Application) On tab “Main”, set the “Entry Point” to “tutorial” • On tab “Bundles”, make sure that your configuration is sane by pressing the • “Validate Bundles” button Launch the application with the “Run” button •
  • 5. Lab 2 - Styling the Application Layout To have to workbench window fill the entire browser window, paste the method below into the ApplicationWorkbenchWindowAdvisor class. public void postWindowCreate() { super.postWindowCreate(); if ( SWT.getPlatform().startsWith( quot;rapquot; ) ) { IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); Shell shell = configurer.getWindow().getShell(); shell.setMaximized( true ); } } And add the following lines to preWindowOpen if ( SWT.getPlatform().startsWith( quot;rapquot; ) ) { configurer.setShellStyle( SWT.NO_TRIM ); } Branding In the RAP workspace, open the fragment.xml of the RAP fragment. Switch to • the “Extensions” tab. Add an extension for the extension point org.eclipse.rap.ui.branding • Leave the default id as is • Set attribute “servletName” to “mail” • Set attribute “defaultEntrypointId” to “org.eclipse.rap.tutorial.rap.entrypoint1” As a • result, this entrypoint becomes the default entrypoint for this branding. Set attribute “title” to your chosen HTML title string, e.g. “RAP Tutorial Demo”. This • title will appear in the browser title bar In your launch configuration, change the servlet name to “mail” and restart the • application Instead of localhost:<port>/rap?startup=tutorial, you can now start the application with localhost:<port>/mail Theming Copy the directory RapTutorial2009/templates/theme/ into the RAP • fragment. Back in the fragment editor, add an extension for the extension point • org.eclipse.rap.ui.themes. Leave the default id as is • Set attribute “file” to “theme/theme.css”. • In the above created branding extension , set attribute “themeId” to the id of this • extension (org.eclipse.rap.tutorial.rap.theme1).
  • 6. Now the theme is connected to the “mail” branding • Restart the application to see the changes • Open the fragment's build.properties and ensure that the theme folder is • checked in the Binary Build section. Presentation If you like to experiment with the new interaction design API, there is a default implementation available. Import the org.eclipse.rap.design.business project from the • RapTutorial2009/projects folder into your workspace open your launch configuration and change the “Servlet Name” to business • Make sure that your launch configuration also includes the just imported plug-in and • set the servlet name Restart the application • The implementation is work in progress and will be available from the RAP CVS soon. Lab 3 - Deployment Ingredients In order to deploy your application you will need three more projects: org.eclipse.rap.demo.feature – serves as a template • org.eclipse.equinox.servletbrige • org.eclipse.equinox.http.servletbridge - provides a means to bridge • the servlet and OSGi runtimes Import these projects from the RapTutorial2009/projects folder into the workspace. Make sure that “Copy projects into workspace“ is unchecked. These projects are also located in the Eclipse CVS (:pserver:anonymous@dev.eclipse.org:/cvsroot/rt). The org.eclipse.rap.demo.feature resides in the org.eclipse.rap/releng, the other projects can be found under org.eclipse.equinox/server-side/bundles. Adjust the template Open the feature.xml from the org.eclipse.rap.demo.feature project • and go to the Plug-ins page Add org.eclipse.rap.tutorial and org.eclipse.rap.tutorial.rap to • the list of plug-ins Open the config.ini in the templates/WEB-INF/eclipse/configuration • folder Add the bundle IDs org.eclipse.rap.tutorial and •
  • 7. org.eclipse.rap.tutorial.rap to the osgi.bundles property like this: org.eclipse.rap.tutorial@start, org.eclipse.rap.tutorial.rap@start Run the build From the main menu choose Run → External Tools → External Tools Configuration • Run the webappBuilder launch configuration from the Ant Build category. • This launch configuration runs an Ant script and ensures that the script is executed within the same JRE as the workspace. See the script output in the console view and the PDE Export being started asynchronously Wait until the PDE Export has terminated as can be seen in the status line • Refresh the org.eclipse.rap.demo.feature project. You will see a build • folder. Open the “Archive File” export wizard under File → Export • Select the folder org.eclipse.rap.demo.feature/build/demo/WEB-INF/ • Enter demo.war as archive filename (the filename will usually become the name of • the deployed web application). Choose “Create only selected directories” from the options • Make sure that the WEB-INF folder is included in the war archive at the top level. • For troubleshooting, you can turn on the OSGi console by uncommenting the commandline init parameter “-console” in your web.xml. To have exceptions logged you can also add the commandline parameter “-consolelog”. Stress Testing You can use the RAPTutorial2009/templates/stress-testing.jmx as a starting point. Further information about this topic can be found here http://wiki.eclipse.org/RAP/LoadTesting. Don't forget to change to filename of the “Simple Data Writer” to something meaningful. Resources Frequently asked questions - http://wiki.eclipse.org/RAP/FAQ • RAP home page - http://eclipse.org/rap • RAP wiki - http://wiki.eclipse.org/RAP • Single Sourcing - http://eclipse.org/rap/singlesourcing.php •