SlideShare ist ein Scribd-Unternehmen logo
1 von 42
Downloaden Sie, um offline zu lesen
OSGi & Eclipse RCP
Eric Jain
Seattle Java User Group, November 15, 2011
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
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> 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>
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>
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();
    }
}
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

Weitere ähnliche Inhalte

Was ist angesagt?

Тестирование на 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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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)
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 

Kürzlich hochgeladen (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 

OSGi and Eclipse RCP

  • 1. OSGi & Eclipse RCP Eric Jain Seattle Java User Group, November 15, 2011
  • 2.
  • 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
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 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
  • 21.
  • 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>
  • 26.
  • 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>
  • 34.
  • 35.
  • 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(); } }
  • 37.
  • 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>