SlideShare une entreprise Scribd logo
1  sur  42
Télécharger pour lire hors ligne
OSGi & Eclipse RCP
Eric Jain
Seattle Java User Group, November 15, 2011
OSGi and Eclipse RCP
1 acctggat...
2 acctgaat...
3 acctggag...
1 A*24:36N
2 A*02:01:21
3 A*03:20/A*11:86
Samples


                                                                             1 A*24:36N
                                                                             2 A*02:01:21
                                                                             3 A*03:20/A*11:86




                                                                      Resolution
     Quantification
                                                    Sequencing




Extraction    Normalization     Amplification
                                                                                   SNP-Calling   Genotyping



                                                QC Failure / Repeat
             Other Workflows
OSGi and Eclipse RCP
OSGi and Eclipse RCP
OSGi and Eclipse RCP
OSGi and Eclipse RCP
OSGi and Eclipse RCP
OSGi and Eclipse RCP
OSGi and Eclipse RCP
OSGi and Eclipse RCP
OSGi and Eclipse RCP
OSGi and Eclipse RCP
standalone              client

              ui
h2                           fs-proxy

              logging

       fs
              core      pg
     exec



              fs-http


             server
Workflow A
                                                      (v2)




                                      SNP
                   Sequencing                      Workflow A
                                     Calling           (v1)
                           1.0.0




Amplification



                Sequencing
                   2.0.0


                                      SNP
                                   Discovery



                                                 Workflow B
META-INF/MANIFEST.MF




Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Demo Bundle
Bundle-SymbolicName: org.seajug.demo
Bundle-Version: 1.0.0
Import-Package:
 com.google.common.base;version="[10.0.0,11.0.0)",
 com.google.common.collect;version="[10.0.0,11.0.0)",
 com.google.common.io;version="[10.0.0,11.0.0)"
Export-Package:
 org.seajug.demo;version="1.0.0",
 org.seajug.demo.ui;version="1.0.0"
Bundle-ClassPath: lib/jxl.jar, conf/, .
Bundle-Activator: org.seajug.demo.Activator
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bootstrap CL


            Extensions CL


       System Classpath CL



Context 1    Context 2      Context 3
Bootstrap CL


           Extensions CL


      System Classpath CL




             Bundle 2



Bundle 1                   Bundle 3
                           Fragment A


             Bundle 4
OSGi and Eclipse RCP
osgi> ss

Framework is launched.

id    State      Bundle
0     ACTIVE     org.eclipse.osgi_3.7.1.R37x_v20110808-1106
                 Fragments=1
1     RESOLVED   org.eclipse.equinox.weaving.hook_1.0.0.v20100108
                 Master=0
2     ACTIVE     org.eclipse.equinox.simpleconfigurator_1.0.200.v20110502
3     RESOLVED   ch.qos.logback.classic_0.9.29
                 Fragments=98
4     RESOLVED   ch.qos.logback.core_0.9.29
5     RESOLVED   com.google.guava_10.0.0
...
53    <<LAZY>>   org.eclipse.emf.ecore_2.7.0.v20110912-0920
...
78    RESOLVED   org.eclipse.swt_3.7.1.v3738a
                 Fragments=79
79    RESOLVED   org.eclipse.swt.win32.win32.x86_64_3.7.1.v3738a
                 Master=78
...
From: Creating Modular Applications in Java. Manning, 2011.
Activator.java




package org.seajug.demo;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;

public class Activator implements BundleActivator {

    @Override
    public void start(BundleContext context) {
      context.registerService(Foo.class, new Foo(), null);
      ServiceReference<Bar> ref =
        context.getServiceReference(Bar.class);
      Bar bar = (Bar) context.getService(ref);
      ...
    }

    @Override
    public void stop(BundleContext context) {

    }
}
META-INF/spring-context.xml




<?xml version="1.0" encoding="UTF-8"?>

<beans
  xmlns="http://www.springframework.org/schema/beans"
  xmlns:context="http://www.springframework.org/schema/context"
  xmlns:osgi="http://www.springframework.org/schema/osgi"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="..."
>

 <osgi:reference id="foo" interface="org.seajug.demo.Foo"/>

 <bean id="bar" class="org.seajug.demo.internal.BarImpl"/>

 <osgi:service ref="bar" interface="org.seajug.demo.Bar"/>

 <context:annotation-config/>

</beans>
OSGi and Eclipse RCP
pom.xml
<plugin>
  <groupId>org.apache.felix</groupId>
  <artifactId>maven-bundle-plugin</artifactId>
  <version>2.1.0</version>
  <configuration>
    <instructions>
      <module>com.google.inject</module>
      <Bundle-Copyright>Copyright (C) 2006 Google Inc.</Bundle-Copyright>
      <Bundle-DocURL>http://code.google.com/p/google-guice/</Bundle-DocURL>
      <Bundle-Name>${project.artifactId}</Bundle-Name>
      <Bundle-SymbolicName>$(module)</Bundle-SymbolicName>
      <Bundle-RequiredExecutionEnvironment>
        J2SE-1.5,JavaSE-1.6
      </Bundle-RequiredExecutionEnvironment>
      <Import-Package>!com.google.inject.*,*</Import-Package>
      <_versionpolicy>
        [$(version;==;$(@)),$(version;+;$(@)))
      </_versionpolicy>
    </instructions>
  </configuration>
  <executions>
    <execution>
      <phase>prepare-package</phase>
      <goals>
        <goal>manifest</goal>
      </goals>
    </execution>
  </executions>
</plugin>
module-info.java




module com.greetings @ 0.1 {
    requires jdk.base; // default to the highest available version
    requires org.astro @ 1.[1.1.1]+;
    class com.greetings.Hello;
}}




                                  http://openjdk.java.net/projects/jigsaw/
TableDemo.java




package org.seajug.demo;

import   org.eclipse.swt.SWT;
import   org.eclipse.swt.widgets.Composite;
import   org.eclipse.swt.widgets.Table;
import   org.eclipse.swt.widgets.TableItem;

public class TableDemo {

    public void show(String[] values, Composite parent) {
      Table table = new Table(parent, SWT.BORDER | SWT.V_SCROLL);
      for (String value : values) {
        TableItem item = new TableItem(table, SWT.NONE);
        item.setText(value);
      }
    }
}
TableViewerDemo.java




package org.seajug.demo;

import   org.eclipse.jface.viewers.ArrayContentProvider;
import   org.eclipse.jface.viewers.LabelProvider;
import   org.eclipse.jface.viewers.TableViewer;
import   org.eclipse.swt.SWT;
import   org.eclipse.swt.widgets.Composite;

public class TableViewerDemo {

    public void show(String[] values, Composite parent) {
      TableViewer viewer = new TableViewer(parent, SWT.BORDER | SWT.V_SCROLL);
      viewer.setLabelProvider(new LabelProvider());
      viewer.setContentProvider(new ArrayContentProvider());
      viewer.setInput(values);
    }
}
TableViewPartDemo.java

package org.seajug.demo;

import   org.eclipse.jface.viewers.TableViewer;
import   org.eclipse.swt.widgets.Composite;
import   org.eclipse.ui.IViewSite;
import   org.eclipse.ui.PartInitException;
import   org.eclipse.ui.part.ViewPart;

public class DemoViewPart extends ViewPart {

    private TableViewer viewer;

    @Override
    public void init(IViewSite site) throws PartInitException {
      super.init(site);
    }

    @Override
    public void createPartControl(Composite parent) {
      viewer = new TableViewer(parent, SWT.BORDER | SWT.V_SCROLL);
      ...
    }

    @Override
    public void setFocus() {
      viewer.getControl().setFocus();
    }

    @Override
    public void dispose() {
      super.dispose();
    }
}
plugin.xml



<extension point="org.eclipse.ui.views">
  <view
     id="demoView"
     name="Demo"
     class="org.seajug.demo.DemoViewPart"
  />
</extension>
plugin.xml


<extension point="org.eclipse.ui.commands">
  <command id="openItem" name="Open Item"/>
</extension>

<extension point="org.eclipse.ui.handlers">
  <handler class="org.seajug.demo.OpenItemHandler" commandId="openItem">
    <activeWhen>
      <with variable="activePartId">
        <equals value="demoView"/>
      </with>
    </activeWhen>
    <enabledWhen>
      <with variable="selection">
        <and>
          <count value="1"/>
          <iterate>
             <instanceof value="org.seajug.demo.Item"/>
          </iterate>
        </and>
      </with>
    </enabledWhen>
  </handler>
</extension>

<extension point="org.eclipse.ui.menus">
  <menuContribution locationURI="toolbar:demoView">
    <command commandId="openItem" icon="icons/open.png" style="push"/>
  </menuContribution>
</extension>
OSGi and Eclipse RCP
OSGi and Eclipse RCP
package org.fhcrc.gems.ui;

import   org.eclipse.core.runtime.IProgressMonitor;
import   org.eclipse.core.runtime.IStatus;
import   org.eclipse.core.runtime.Status;
import   org.eclipse.core.runtime.jobs.Job;

public class JobDemo {

    public void run() {
      new Job("Genotyping") {
        @Override
        protected IStatus run(IProgressMonitor monitor) {
          monitor.beginTask("Reticulating splines", 100);
          for (int i = 0; i < 100; ++i) {
            if (monitor.isCanceled()) {
              return Status.CANCEL_STATUS;
            }
            ...
          }
          monitor.done();
          return Status.OK_STATUS;
        }
      }.schedule();
    }
}
OSGi and Eclipse RCP
pom.xml
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0">

 <modelVersion>4.0.0</modelVersion>

 <groupId>org.seajug.demo</groupId>
 <artifactId>parent</artifactId>
 <version>1.0.0-SNAPSHOT</version>
 <packaging>pom</packaging>

 <properties>
   <tycho-version>0.13.0</tycho-version>
 </properties>

 <modules>
   <module>product</module>
   <module>org.seajug.demo.core</module>
   <module>org.seajug.demo.feature</module>
   <module>org.seajug.demo.test</module>
   <module>target-definition</module>
 </modules>

 <build>
   <plugins>
     <plugin>
       <groupId>org.eclipse.tycho</groupId>
       <artifactId>tycho-maven-plugin</artifactId>
       <version>${tycho-version}</version>
       <extensions>true</extensions>
     </plugin>
     <plugin>
       <groupId>org.eclipse.tycho</groupId>
       <artifactId>target-platform-configuration</artifactId>
       <version>${tycho-version}</version>
       <configuration>
          <resolver>p2</resolver>
          <target>
            <artifact>
              <groupId>org.seajug.demo</groupId>
              <artifactId>target-definition</artifactId>
              <version>1.0.0-SNAPSHOT</version>
              <classifier>build</classifier>
            </artifact>
          </target>
       </configuration>
     </plugin>
   </plugins>
 </build>
org.seajug.demo.core/pom.xml




<project xmlns="http://maven.apache.org/POM/4.0.0">

 <modelVersion>4.0.0</modelVersion>

 <groupId>org.seajug.demo</groupId>
 <artifactId>org.seajug.demo.core</artifactId>
 <version>1.0.0-SNAPSHOT</version>
 <packaging>eclipse-plugin</packaging>

 <parent>
   <groupId>org.seajug.demo</groupId>
   <artifactId>parent</artifactId>
   <version>1.0.0-SNAPSHOT</version>
 </parent>

</project>
OSGi and Eclipse RCP
OSGi and Eclipse RCP
OSGi and Eclipse RCP

Contenu connexe

Tendances

Тестирование на Android с Dagger 2
Тестирование на Android с Dagger 2Тестирование на Android с Dagger 2
Тестирование на Android с Dagger 2Kirill Rozov
 
Java8 tgtbatu javaone
Java8 tgtbatu javaoneJava8 tgtbatu javaone
Java8 tgtbatu javaoneBrian Vermeer
 
Java(8) The Good, The Bad and the Ugly
Java(8) The Good, The Bad and the UglyJava(8) The Good, The Bad and the Ugly
Java(8) The Good, The Bad and the UglyBrian Vermeer
 
Making the most of your gradle build - Gr8Conf 2017
Making the most of your gradle build - Gr8Conf 2017Making the most of your gradle build - Gr8Conf 2017
Making the most of your gradle build - Gr8Conf 2017Andres Almiray
 
Making the most of your gradle build - Greach 2017
Making the most of your gradle build - Greach 2017Making the most of your gradle build - Greach 2017
Making the most of your gradle build - Greach 2017Andres Almiray
 
Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1Zianed Hou
 
#11.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원학원,재직자/실업자교육학원,스프링교육,마이바...
#11.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원학원,재직자/실업자교육학원,스프링교육,마이바...#11.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원학원,재직자/실업자교육학원,스프링교육,마이바...
#11.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원학원,재직자/실업자교육학원,스프링교육,마이바...탑크리에듀(구로디지털단지역3번출구 2분거리)
 
Easy REST APIs with Jersey and RestyGWT
Easy REST APIs with Jersey and RestyGWTEasy REST APIs with Jersey and RestyGWT
Easy REST APIs with Jersey and RestyGWTDavid Chandler
 
Jersey framework
Jersey frameworkJersey framework
Jersey frameworkknight1128
 
Clojure - A new Lisp
Clojure - A new LispClojure - A new Lisp
Clojure - A new Lispelliando dias
 
T.Y.B.S.CS Advance Java Practicals Sem 5 Mumbai University
T.Y.B.S.CS Advance Java Practicals Sem 5 Mumbai UniversityT.Y.B.S.CS Advance Java Practicals Sem 5 Mumbai University
T.Y.B.S.CS Advance Java Practicals Sem 5 Mumbai UniversityNiraj Bharambe
 
The Ring programming language version 1.10 book - Part 94 of 212
The Ring programming language version 1.10 book - Part 94 of 212The Ring programming language version 1.10 book - Part 94 of 212
The Ring programming language version 1.10 book - Part 94 of 212Mahmoud Samir Fayed
 
Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...
Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...
Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...julien.ponge
 
Google I/O 2021 Recap
Google I/O 2021 RecapGoogle I/O 2021 Recap
Google I/O 2021 Recapfurusin
 
Turbo Charged Test Suites
Turbo Charged Test SuitesTurbo Charged Test Suites
Turbo Charged Test SuitesCurtis Poe
 
Ejemplo radio
Ejemplo radioEjemplo radio
Ejemplo radiolupe ga
 
Under the Hood: Using Spring in Grails
Under the Hood: Using Spring in GrailsUnder the Hood: Using Spring in Grails
Under the Hood: Using Spring in GrailsGR8Conf
 
Hello click click boom
Hello click click boomHello click click boom
Hello click click boomsymbian_mgl
 

Tendances (20)

Тестирование на Android с Dagger 2
Тестирование на Android с Dagger 2Тестирование на Android с Dagger 2
Тестирование на Android с Dagger 2
 
Java8 tgtbatu javaone
Java8 tgtbatu javaoneJava8 tgtbatu javaone
Java8 tgtbatu javaone
 
Vaadin 7
Vaadin 7Vaadin 7
Vaadin 7
 
Java(8) The Good, The Bad and the Ugly
Java(8) The Good, The Bad and the UglyJava(8) The Good, The Bad and the Ugly
Java(8) The Good, The Bad and the Ugly
 
Making the most of your gradle build - Gr8Conf 2017
Making the most of your gradle build - Gr8Conf 2017Making the most of your gradle build - Gr8Conf 2017
Making the most of your gradle build - Gr8Conf 2017
 
Making the most of your gradle build - Greach 2017
Making the most of your gradle build - Greach 2017Making the most of your gradle build - Greach 2017
Making the most of your gradle build - Greach 2017
 
Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1
 
#11.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원학원,재직자/실업자교육학원,스프링교육,마이바...
#11.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원학원,재직자/실업자교육학원,스프링교육,마이바...#11.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원학원,재직자/실업자교육학원,스프링교육,마이바...
#11.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_국비지원학원,재직자/실업자교육학원,스프링교육,마이바...
 
Easy REST APIs with Jersey and RestyGWT
Easy REST APIs with Jersey and RestyGWTEasy REST APIs with Jersey and RestyGWT
Easy REST APIs with Jersey and RestyGWT
 
Jersey framework
Jersey frameworkJersey framework
Jersey framework
 
Clojure - A new Lisp
Clojure - A new LispClojure - A new Lisp
Clojure - A new Lisp
 
T.Y.B.S.CS Advance Java Practicals Sem 5 Mumbai University
T.Y.B.S.CS Advance Java Practicals Sem 5 Mumbai UniversityT.Y.B.S.CS Advance Java Practicals Sem 5 Mumbai University
T.Y.B.S.CS Advance Java Practicals Sem 5 Mumbai University
 
The Ring programming language version 1.10 book - Part 94 of 212
The Ring programming language version 1.10 book - Part 94 of 212The Ring programming language version 1.10 book - Part 94 of 212
The Ring programming language version 1.10 book - Part 94 of 212
 
Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...
Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...
Java 7 Launch Event at LyonJUG, Lyon France. Fork / Join framework and Projec...
 
Java 7 LavaJUG
Java 7 LavaJUGJava 7 LavaJUG
Java 7 LavaJUG
 
Google I/O 2021 Recap
Google I/O 2021 RecapGoogle I/O 2021 Recap
Google I/O 2021 Recap
 
Turbo Charged Test Suites
Turbo Charged Test SuitesTurbo Charged Test Suites
Turbo Charged Test Suites
 
Ejemplo radio
Ejemplo radioEjemplo radio
Ejemplo radio
 
Under the Hood: Using Spring in Grails
Under the Hood: Using Spring in GrailsUnder the Hood: Using Spring in Grails
Under the Hood: Using Spring in Grails
 
Hello click click boom
Hello click click boomHello click click boom
Hello click click boom
 

En vedette

Eclipse Plug-in Develompent Tips And Tricks
Eclipse Plug-in Develompent Tips And TricksEclipse Plug-in Develompent Tips And Tricks
Eclipse Plug-in Develompent Tips And TricksChris Aniszczyk
 
OSGi For Eclipse Developers
OSGi For Eclipse DevelopersOSGi For Eclipse Developers
OSGi For Eclipse DevelopersChris Aniszczyk
 
Eclipse Extensions Vs OSGI Services Tikal@ EclipseDemoCamps Tel Aviv
Eclipse Extensions Vs OSGI Services   Tikal@ EclipseDemoCamps Tel AvivEclipse Extensions Vs OSGI Services   Tikal@ EclipseDemoCamps Tel Aviv
Eclipse Extensions Vs OSGI Services Tikal@ EclipseDemoCamps Tel Avivguestb69b980e
 
OSGi Technology, Eclipse and Convergence - Jeff McAffer, IBM
OSGi Technology, Eclipse and Convergence - Jeff McAffer, IBMOSGi Technology, Eclipse and Convergence - Jeff McAffer, IBM
OSGi Technology, Eclipse and Convergence - Jeff McAffer, IBMmfrancis
 
OSGi, Eclipse and API Tooling
OSGi, Eclipse and API ToolingOSGi, Eclipse and API Tooling
OSGi, Eclipse and API ToolingChris Aniszczyk
 
PDE Good Practices
PDE Good PracticesPDE Good Practices
PDE Good PracticesAnkur Sharma
 
Intro to OSGi and Eclipse Virgo
Intro to OSGi and Eclipse VirgoIntro to OSGi and Eclipse Virgo
Intro to OSGi and Eclipse VirgoGordon Dickens
 
Mastering your Eclipse IDE - Tips, Tricks, Java 8 tooling & More!
Mastering your Eclipse IDE - Tips, Tricks, Java 8 tooling & More!Mastering your Eclipse IDE - Tips, Tricks, Java 8 tooling & More!
Mastering your Eclipse IDE - Tips, Tricks, Java 8 tooling & More!Noopur Gupta
 
Eclipse plug in development
Eclipse plug in developmentEclipse plug in development
Eclipse plug in developmentMartin Toshev
 
The Eclipse IDE - The Force Awakens (Devoxx France 2016)
The Eclipse IDE - The Force Awakens (Devoxx France 2016)The Eclipse IDE - The Force Awakens (Devoxx France 2016)
The Eclipse IDE - The Force Awakens (Devoxx France 2016)mikaelbarbero
 

En vedette (11)

Eclipse Plug-in Develompent Tips And Tricks
Eclipse Plug-in Develompent Tips And TricksEclipse Plug-in Develompent Tips And Tricks
Eclipse Plug-in Develompent Tips And Tricks
 
Eclipse RCP 4
Eclipse RCP 4Eclipse RCP 4
Eclipse RCP 4
 
OSGi For Eclipse Developers
OSGi For Eclipse DevelopersOSGi For Eclipse Developers
OSGi For Eclipse Developers
 
Eclipse Extensions Vs OSGI Services Tikal@ EclipseDemoCamps Tel Aviv
Eclipse Extensions Vs OSGI Services   Tikal@ EclipseDemoCamps Tel AvivEclipse Extensions Vs OSGI Services   Tikal@ EclipseDemoCamps Tel Aviv
Eclipse Extensions Vs OSGI Services Tikal@ EclipseDemoCamps Tel Aviv
 
OSGi Technology, Eclipse and Convergence - Jeff McAffer, IBM
OSGi Technology, Eclipse and Convergence - Jeff McAffer, IBMOSGi Technology, Eclipse and Convergence - Jeff McAffer, IBM
OSGi Technology, Eclipse and Convergence - Jeff McAffer, IBM
 
OSGi, Eclipse and API Tooling
OSGi, Eclipse and API ToolingOSGi, Eclipse and API Tooling
OSGi, Eclipse and API Tooling
 
PDE Good Practices
PDE Good PracticesPDE Good Practices
PDE Good Practices
 
Intro to OSGi and Eclipse Virgo
Intro to OSGi and Eclipse VirgoIntro to OSGi and Eclipse Virgo
Intro to OSGi and Eclipse Virgo
 
Mastering your Eclipse IDE - Tips, Tricks, Java 8 tooling & More!
Mastering your Eclipse IDE - Tips, Tricks, Java 8 tooling & More!Mastering your Eclipse IDE - Tips, Tricks, Java 8 tooling & More!
Mastering your Eclipse IDE - Tips, Tricks, Java 8 tooling & More!
 
Eclipse plug in development
Eclipse plug in developmentEclipse plug in development
Eclipse plug in development
 
The Eclipse IDE - The Force Awakens (Devoxx France 2016)
The Eclipse IDE - The Force Awakens (Devoxx France 2016)The Eclipse IDE - The Force Awakens (Devoxx France 2016)
The Eclipse IDE - The Force Awakens (Devoxx France 2016)
 

Similaire à OSGi and Eclipse RCP

CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...Jesse Gallagher
 
OSGi ecosystems compared on Apache Karaf - Christian Schneider
OSGi ecosystems compared on Apache Karaf - Christian SchneiderOSGi ecosystems compared on Apache Karaf - Christian Schneider
OSGi ecosystems compared on Apache Karaf - Christian Schneidermfrancis
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesLindsay Holmwood
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleThierry Wasylczenko
 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to ProtractorJie-Wei Wu
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Carlos Sanchez
 
Eric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build systemEric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build systemGuardSquare
 
Javascript tdd byandreapaciolla
Javascript tdd byandreapaciollaJavascript tdd byandreapaciolla
Javascript tdd byandreapaciollaAndrea Paciolla
 
Mobicents JSLEE progress and roadmap - Mobicents Summit 2011
Mobicents JSLEE progress and roadmap - Mobicents Summit 2011Mobicents JSLEE progress and roadmap - Mobicents Summit 2011
Mobicents JSLEE progress and roadmap - Mobicents Summit 2011telestax
 
Building Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaBuilding Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaRick Warren
 
JBoss AS Upgrade
JBoss AS UpgradeJBoss AS Upgrade
JBoss AS Upgradesharmami
 
Workshop 23: ReactJS, React & Redux testing
Workshop 23: ReactJS, React & Redux testingWorkshop 23: ReactJS, React & Redux testing
Workshop 23: ReactJS, React & Redux testingVisual Engineering
 
Spring Performance Gains
Spring Performance GainsSpring Performance Gains
Spring Performance GainsVMware Tanzu
 
Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!Roberto Franchini
 
JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing UpDavid Padbury
 

Similaire à OSGi and Eclipse RCP (20)

CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
 
OSGi ecosystems compared on Apache Karaf - Christian Schneider
OSGi ecosystems compared on Apache Karaf - Christian SchneiderOSGi ecosystems compared on Apache Karaf - Christian Schneider
OSGi ecosystems compared on Apache Karaf - Christian Schneider
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradle
 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to Protractor
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
 
Annotation processing
Annotation processingAnnotation processing
Annotation processing
 
Eric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build systemEric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build system
 
Javascript tdd byandreapaciolla
Javascript tdd byandreapaciollaJavascript tdd byandreapaciolla
Javascript tdd byandreapaciolla
 
Mobicents JSLEE progress and roadmap - Mobicents Summit 2011
Mobicents JSLEE progress and roadmap - Mobicents Summit 2011Mobicents JSLEE progress and roadmap - Mobicents Summit 2011
Mobicents JSLEE progress and roadmap - Mobicents Summit 2011
 
Building Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaBuilding Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJava
 
JBoss AS Upgrade
JBoss AS UpgradeJBoss AS Upgrade
JBoss AS Upgrade
 
Workshop 23: ReactJS, React & Redux testing
Workshop 23: ReactJS, React & Redux testingWorkshop 23: ReactJS, React & Redux testing
Workshop 23: ReactJS, React & Redux testing
 
Maven
MavenMaven
Maven
 
devday2012
devday2012devday2012
devday2012
 
Spring Performance Gains
Spring Performance GainsSpring Performance Gains
Spring Performance Gains
 
Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!
 
JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing Up
 
Java Quiz - Meetup
Java Quiz - MeetupJava Quiz - Meetup
Java Quiz - Meetup
 
Play vs Rails
Play vs RailsPlay vs Rails
Play vs Rails
 

Plus de Eric Jain

Image classification with Deeplearning4j
Image classification with Deeplearning4jImage classification with Deeplearning4j
Image classification with Deeplearning4jEric Jain
 
Combining your data with Zenobase
Combining your data with ZenobaseCombining your data with Zenobase
Combining your data with ZenobaseEric Jain
 
Java Time Puzzlers
Java Time PuzzlersJava Time Puzzlers
Java Time PuzzlersEric Jain
 
beta.uniprot.org - 5 Lessons Learned
beta.uniprot.org - 5 Lessons Learnedbeta.uniprot.org - 5 Lessons Learned
beta.uniprot.org - 5 Lessons LearnedEric Jain
 
UniProt REST API
UniProt REST APIUniProt REST API
UniProt REST APIEric Jain
 
UniProt & Ontologies
UniProt & OntologiesUniProt & Ontologies
UniProt & OntologiesEric Jain
 

Plus de Eric Jain (6)

Image classification with Deeplearning4j
Image classification with Deeplearning4jImage classification with Deeplearning4j
Image classification with Deeplearning4j
 
Combining your data with Zenobase
Combining your data with ZenobaseCombining your data with Zenobase
Combining your data with Zenobase
 
Java Time Puzzlers
Java Time PuzzlersJava Time Puzzlers
Java Time Puzzlers
 
beta.uniprot.org - 5 Lessons Learned
beta.uniprot.org - 5 Lessons Learnedbeta.uniprot.org - 5 Lessons Learned
beta.uniprot.org - 5 Lessons Learned
 
UniProt REST API
UniProt REST APIUniProt REST API
UniProt REST API
 
UniProt & Ontologies
UniProt & OntologiesUniProt & Ontologies
UniProt & Ontologies
 

Dernier

UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
Babel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxBabel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxYounusS2
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 
Things you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceThings you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceMartin Humpolec
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataSafe Software
 
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdfJamie (Taka) Wang
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URLRuncy Oommen
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
RAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIRAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIUdaiappa Ramachandran
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfinfogdgmi
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
GenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncGenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncObject Automation
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 
Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum ComputingGDSC PJATK
 

Dernier (20)

UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
Babel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxBabel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptx
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
Things you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceThings you didn't know you can use in your Salesforce
Things you didn't know you can use in your Salesforce
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
 
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URL
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
RAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIRAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AI
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdf
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
GenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncGenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation Inc
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 
Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum Computing
 

OSGi and Eclipse RCP

  • 1. OSGi & Eclipse RCP Eric Jain Seattle Java User Group, November 15, 2011
  • 4. 1 A*24:36N 2 A*02:01:21 3 A*03:20/A*11:86
  • 5. Samples 1 A*24:36N 2 A*02:01:21 3 A*03:20/A*11:86 Resolution Quantification Sequencing Extraction Normalization Amplification SNP-Calling Genotyping QC Failure / Repeat Other Workflows
  • 16. standalone client ui h2 fs-proxy logging fs core pg exec fs-http server
  • 17. Workflow A (v2) SNP Sequencing Workflow A Calling (v1) 1.0.0 Amplification Sequencing 2.0.0 SNP Discovery Workflow B
  • 18. META-INF/MANIFEST.MF Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Demo Bundle Bundle-SymbolicName: org.seajug.demo Bundle-Version: 1.0.0 Import-Package: com.google.common.base;version="[10.0.0,11.0.0)", com.google.common.collect;version="[10.0.0,11.0.0)", com.google.common.io;version="[10.0.0,11.0.0)" Export-Package: org.seajug.demo;version="1.0.0", org.seajug.demo.ui;version="1.0.0" Bundle-ClassPath: lib/jxl.jar, conf/, . Bundle-Activator: org.seajug.demo.Activator Bundle-RequiredExecutionEnvironment: JavaSE-1.6
  • 19. Bootstrap CL Extensions CL System Classpath CL Context 1 Context 2 Context 3
  • 20. Bootstrap CL Extensions CL System Classpath CL Bundle 2 Bundle 1 Bundle 3 Fragment A Bundle 4
  • 22. osgi> ss Framework is launched. id State Bundle 0 ACTIVE org.eclipse.osgi_3.7.1.R37x_v20110808-1106 Fragments=1 1 RESOLVED org.eclipse.equinox.weaving.hook_1.0.0.v20100108 Master=0 2 ACTIVE org.eclipse.equinox.simpleconfigurator_1.0.200.v20110502 3 RESOLVED ch.qos.logback.classic_0.9.29 Fragments=98 4 RESOLVED ch.qos.logback.core_0.9.29 5 RESOLVED com.google.guava_10.0.0 ... 53 <<LAZY>> org.eclipse.emf.ecore_2.7.0.v20110912-0920 ... 78 RESOLVED org.eclipse.swt_3.7.1.v3738a Fragments=79 79 RESOLVED org.eclipse.swt.win32.win32.x86_64_3.7.1.v3738a Master=78 ...
  • 23. From: Creating Modular Applications in Java. Manning, 2011.
  • 24. Activator.java package org.seajug.demo; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; public class Activator implements BundleActivator { @Override public void start(BundleContext context) { context.registerService(Foo.class, new Foo(), null); ServiceReference<Bar> ref = context.getServiceReference(Bar.class); Bar bar = (Bar) context.getService(ref); ... } @Override public void stop(BundleContext context) { } }
  • 25. META-INF/spring-context.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:osgi="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="..." > <osgi:reference id="foo" interface="org.seajug.demo.Foo"/> <bean id="bar" class="org.seajug.demo.internal.BarImpl"/> <osgi:service ref="bar" interface="org.seajug.demo.Bar"/> <context:annotation-config/> </beans>
  • 27. pom.xml <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.1.0</version> <configuration> <instructions> <module>com.google.inject</module> <Bundle-Copyright>Copyright (C) 2006 Google Inc.</Bundle-Copyright> <Bundle-DocURL>http://code.google.com/p/google-guice/</Bundle-DocURL> <Bundle-Name>${project.artifactId}</Bundle-Name> <Bundle-SymbolicName>$(module)</Bundle-SymbolicName> <Bundle-RequiredExecutionEnvironment> J2SE-1.5,JavaSE-1.6 </Bundle-RequiredExecutionEnvironment> <Import-Package>!com.google.inject.*,*</Import-Package> <_versionpolicy> [$(version;==;$(@)),$(version;+;$(@))) </_versionpolicy> </instructions> </configuration> <executions> <execution> <phase>prepare-package</phase> <goals> <goal>manifest</goal> </goals> </execution> </executions> </plugin>
  • 28. module-info.java module com.greetings @ 0.1 { requires jdk.base; // default to the highest available version requires org.astro @ 1.[1.1.1]+; class com.greetings.Hello; }} http://openjdk.java.net/projects/jigsaw/
  • 29. TableDemo.java package org.seajug.demo; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableItem; public class TableDemo { public void show(String[] values, Composite parent) { Table table = new Table(parent, SWT.BORDER | SWT.V_SCROLL); for (String value : values) { TableItem item = new TableItem(table, SWT.NONE); item.setText(value); } } }
  • 30. TableViewerDemo.java package org.seajug.demo; import org.eclipse.jface.viewers.ArrayContentProvider; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; public class TableViewerDemo { public void show(String[] values, Composite parent) { TableViewer viewer = new TableViewer(parent, SWT.BORDER | SWT.V_SCROLL); viewer.setLabelProvider(new LabelProvider()); viewer.setContentProvider(new ArrayContentProvider()); viewer.setInput(values); } }
  • 31. TableViewPartDemo.java package org.seajug.demo; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.IViewSite; import org.eclipse.ui.PartInitException; import org.eclipse.ui.part.ViewPart; public class DemoViewPart extends ViewPart { private TableViewer viewer; @Override public void init(IViewSite site) throws PartInitException { super.init(site); } @Override public void createPartControl(Composite parent) { viewer = new TableViewer(parent, SWT.BORDER | SWT.V_SCROLL); ... } @Override public void setFocus() { viewer.getControl().setFocus(); } @Override public void dispose() { super.dispose(); } }
  • 32. plugin.xml <extension point="org.eclipse.ui.views"> <view id="demoView" name="Demo" class="org.seajug.demo.DemoViewPart" /> </extension>
  • 33. plugin.xml <extension point="org.eclipse.ui.commands"> <command id="openItem" name="Open Item"/> </extension> <extension point="org.eclipse.ui.handlers"> <handler class="org.seajug.demo.OpenItemHandler" commandId="openItem"> <activeWhen> <with variable="activePartId"> <equals value="demoView"/> </with> </activeWhen> <enabledWhen> <with variable="selection"> <and> <count value="1"/> <iterate> <instanceof value="org.seajug.demo.Item"/> </iterate> </and> </with> </enabledWhen> </handler> </extension> <extension point="org.eclipse.ui.menus"> <menuContribution locationURI="toolbar:demoView"> <command commandId="openItem" icon="icons/open.png" style="push"/> </menuContribution> </extension>
  • 36. package org.fhcrc.gems.ui; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; public class JobDemo { public void run() { new Job("Genotyping") { @Override protected IStatus run(IProgressMonitor monitor) { monitor.beginTask("Reticulating splines", 100); for (int i = 0; i < 100; ++i) { if (monitor.isCanceled()) { return Status.CANCEL_STATUS; } ... } monitor.done(); return Status.OK_STATUS; } }.schedule(); } }
  • 38. pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0"> <modelVersion>4.0.0</modelVersion> <groupId>org.seajug.demo</groupId> <artifactId>parent</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>pom</packaging> <properties> <tycho-version>0.13.0</tycho-version> </properties> <modules> <module>product</module> <module>org.seajug.demo.core</module> <module>org.seajug.demo.feature</module> <module>org.seajug.demo.test</module> <module>target-definition</module> </modules> <build> <plugins> <plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>tycho-maven-plugin</artifactId> <version>${tycho-version}</version> <extensions>true</extensions> </plugin> <plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>target-platform-configuration</artifactId> <version>${tycho-version}</version> <configuration> <resolver>p2</resolver> <target> <artifact> <groupId>org.seajug.demo</groupId> <artifactId>target-definition</artifactId> <version>1.0.0-SNAPSHOT</version> <classifier>build</classifier> </artifact> </target> </configuration> </plugin> </plugins> </build>
  • 39. org.seajug.demo.core/pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0"> <modelVersion>4.0.0</modelVersion> <groupId>org.seajug.demo</groupId> <artifactId>org.seajug.demo.core</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> <parent> <groupId>org.seajug.demo</groupId> <artifactId>parent</artifactId> <version>1.0.0-SNAPSHOT</version> </parent> </project>