Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Equinox Demos"

(Application Model)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==API Tooling==
 
* generate a snapshot for a particular set of source code (JARs or bundles)
 
* compare another source set with snapshot and get 3 summary pages
 
** breaking changes
 
** non-breaking changes
 
** version number checks
 
 
 
==Application Model==
 
==Application Model==
The Eclipse platform implements an application container that is based on the OSGi Application Admin Service specification.  This demo shows how Eclipse applications can be managed using the OSGi Application Admin Service specification
+
The [[Equinox Application Model Demo]] shows how to create and run multiple OSGi MEG applications.
=== The Projects ===
+
The projects for the demo are stored in the Equinox Incubator on the main Eclispe CVS repository (dev.eclipse.org:/cvsroot/eclipse).  All projects are under the directory '''equinox-incubator/demos/app-model/'''.
+
==== org.eclipse.equinox.examples.app.selector ====
+
This project provides a simple RCP application that uses the application admin service to manage the other applications installed on the platform.
+
==== org.eclipse.equinox.examples.sharedisplay ====
+
This project provides a simple headless application that sets up a shared display that other applications can share when they are launched.
+
==== example SWT applications ====
+
Each of the following projects provide an example SWT application that can be launched using the application admin service
+
* org.eclipse.swt.examples.addressbook
+
* org.eclipse.swt.examples.browserexample
+
* org.eclipse.swt.examples.clipboard
+
* org.eclipse.swt.examples.graphics
+
* org.eclipse.swt.examples.paint
+
=== How to Run ===
+
There are two ways to run the demo. 
+
# Using the application selector UI
+
# Using the headless share display application
+
==== Using the application selector ====
+
This approach launches an RCP application called application selector.  This application is provided by the org.eclipse.equinox.examples.app.selector project.  Since this approach uses an RCP application many other bundles are required to run.  For example, the org.eclipse.ui.workbench and all of its dependencies.  The application selector displays the following information about each SWT example application installed on the platform:
+
# The application name
+
# If the application is enabled.
+
# The application state (inactive, starting, running, stopping)
+
To start the application selector use the ''Eclipse Application'' launcher called ''demoAppSelector''.  This launcher is included in the org.eclipse.equinox.examples.app.selector project.
+
===== Start an Application =====
+
Select an application to start from the application selector then use the context menu to run the ''start'' operation.  Note that the ''start'' operation will be disabled if the application state is not currently ''inactive''  This will cause the application to launch.  You should notice the state of the application move to ''running'' and the application will become disabled.  Disabled indicates that the application is no longer available for launch.  This is because all applications in this demo have a cardinality of 1.  Try launching other applications at the same time.  You will be able to launch all applications that are enabled at the same time.
+
===== Stop an Application =====
+
Select an application to stop from the application selector then use the context menu to run the ''stop'' operation.  Note that the ''stop'' operation will be disabled if the application is state is currently ''inactive''.  This will cause the application to stop.  You should notice the state of the application move to ''inactive''.
+
===== Stop the Application Selector =====
+
If the application selector is stopped while one or more of the example SWT applications are running then it will stop all of them before exiting the application selector.
+
==== Using the headless application ====
+
This approach launches a ''headless application'' which sets up a shared display for the example SWT applications to use.  This application is provided by the org.eclipse.equinox.examples.sharedisplay project.  This approach does not use an RCP application which allows it to run with a minumum set of bundles.  Since there is no UI available to control applications we must use the osgi> console commands provided by the org.eclipse.equinox.app bundle to start and stop the applications.
+
  
To start the application selector use the ''OSGi Framework'' launcher called ''equinoxShareDisplay''.  This launcher is included in the org.eclipse.equinox.examples.sharedisplay project.
+
==API Tooling==
===== Start an Application =====
+
To see a list of applications run the ''apps'' console command
+
<code>
+
osgi> apps
+
org.eclipse.swt.examples.paint.app [enabled]
+
org.eclipse.swt.examples.graphics.app [enabled]
+
org.eclipse.swt.examples.addressbook.app [enabled]
+
org.eclipse.equinox.examples.sharedisplay.application [disabled]
+
org.eclipse.equinox.app.error [disabled]
+
org.eclipse.swt.examples.browserexample.app [enabled]
+
org.eclipse.swt.examples.clipboard.app [enabled]
+
</code>
+
Pick an application id to start and run the ''startApp'' command.  This will cause the application to launch.
+
<code>
+
osgi> startApp org.eclipse.swt.examples.paint.app
+
Launched application: org.eclipse.swt.examples.paint.app
+
</code>
+
You should notice the application becomes disabled.  Disabled indicates that the application is no longer available for launch.  This is because all applications in this demo have a cardinality of 1.
+
<code>
+
osgi> apps
+
org.eclipse.swt.examples.paint.app '''[disabled]'''
+
org.eclipse.swt.examples.graphics.app [enabled]
+
org.eclipse.swt.examples.addressbook.app [enabled]
+
org.eclipse.equinox.examples.sharedisplay.application [disabled]
+
org.eclipse.equinox.app.error [disabled]
+
org.eclipse.swt.examples.browserexample.app [enabled]
+
org.eclipse.swt.examples.clipboard.app [enabled]
+
</code>
+
  
Try launching other applications at the same time.  You will be able to launch all applications that are enabled at the same time.
+
The [[API Comparison demo]] uses comparison of Eclipse SDK 3.1 and 3.2 to show how to generate reports on:
===== Stop an Application =====
+
<ul>
To see a list of active applications run the ''activeApps'' console command
+
<li>breaking API changes</li>
<code>
+
<li>binary backward-compatible changes</li>
osgi> activeApps
+
<li>version number checks</li>
org.eclipse.equinox.examples.sharedisplay.application [running]
+
</ul>
org.eclipse.swt.examples.paint.app [running]
+
</code>
+
Pick an application id to stop and run the ''stopApp'' command.  This will cause the application to stop.
+
<code>
+
osgi> stopApp org.eclipse.swt.examples.paint.app
+
Stopped application: org.eclipse.swt.examples.paint.app
+
</code>
+
===== Stop the Headless Share Display Application=====
+
If the headless application is stopped while one or more of the example SWT applications are running then it will stop all of them before exiting the headless application.
+
=== How it Works ===
+
==== The applications extension point ====
+
Each application is declared using the org.eclipse.core.runtime.applications extension point.  A bundle can declare an org.eclipse.core.runtime.applications extension to define an application in their plugin.xml file.  An application extension is used to declare the following characteristics about an application.
+
# The application ID
+
# The application Name
+
# The application Cardinality.  How many instances of the application can be running at the same time
+
# What thread must the application run on.
+
# What class provides the application implementation (IApplication)
+
The following is the Address Book application extension
+
<code>
+
<extension
+
  id="app"
+
  name="Address Book"
+
  point="org.eclipse.core.runtime.applications">
+
  <application
+
    cardinality="1"
+
    thread="any">
+
    <run
+
      class="org.eclipse.swt.examples.addressbook.Application">
+
    </run>
+
  </application>
+
</extension>
+
</code>
+
This extension defines the Address Book application and specifies that it can only have 1 instance running at a time and can run on any thread.  It is important that it runs on any thread because in the demo the driving applications (the Application Selector or the Headless Application) are run on the ''main'' thread.  This is necessary so that an SWT Display can be created and the SWT Event loop can be started with the main thread by the driving applications.  All other applications are launched using separate threads and share the display created by the driving application.
+
  
 
==Launcher Demos==
 
==Launcher Demos==
Line 123: Line 24:
 
==Resource Monitoring Demos==
 
==Resource Monitoring Demos==
  
Check out the [http://www.eclipse.org/equinox/incubator/monitoring/index.php Equinox Incubator] for more information on our Resource Monitoring demos.
+
Check out the [http://www.eclipse.org/equinox/incubator/monitoring/index.php Equinox Incubator] for more information on our Resource Monitoring code. Here is a link to our [[Equinox Resource Monitoring Demo | EclipseCon 2007 demo script]].
  
 
==Server-Side OSGi==
 
==Server-Side OSGi==

Latest revision as of 12:16, 22 March 2007

Application Model

The Equinox Application Model Demo shows how to create and run multiple OSGi MEG applications.

API Tooling

The API Comparison demo uses comparison of Eclipse SDK 3.1 and 3.2 to show how to generate reports on:

  • breaking API changes
  • binary backward-compatible changes
  • version number checks

Launcher Demos

Demos related to the new launcher work.

Phone Demos

Click here to check out some of the demos that the Equinox team has done for some cool phones.

Provisioning Demos

Demos related to the new provisioning story can be found here.

Resource Monitoring Demos

Check out the Equinox Incubator for more information on our Resource Monitoring code. Here is a link to our EclipseCon 2007 demo script.

Server-Side OSGi

  • JSPs - there are some demos that come with Tomcat and Struts
  • Embedded in app server
  • show the dev scenario - easy to use

Back to the top