Re-integrate Argeo RCP into Argeo Commons
authormbaudier <mbaudier@europe.weserstr.mbaudier.netiket.eu>
Tue, 3 Jul 2018 05:57:22 +0000 (07:57 +0200)
committermbaudier <mbaudier@europe.weserstr.mbaudier.netiket.eu>
Tue, 3 Jul 2018 05:57:22 +0000 (07:57 +0200)
68 files changed:
pom.xml
rcp/demo/.gitignore [new file with mode: 0644]
rcp/demo/argeo-companion.properties [new file with mode: 0644]
rcp/demo/log4j.properties [new file with mode: 0644]
rcp/dep/.gitignore [new file with mode: 0644]
rcp/dep/org.argeo.dep.cms.e4.rcp/.gitignore [new file with mode: 0644]
rcp/dep/org.argeo.dep.cms.e4.rcp/META-INF/.gitignore [new file with mode: 0644]
rcp/dep/org.argeo.dep.cms.e4.rcp/bnd.bnd [new file with mode: 0644]
rcp/dep/org.argeo.dep.cms.e4.rcp/p2.inf [new file with mode: 0644]
rcp/dep/org.argeo.dep.cms.e4.rcp/pom.xml [new file with mode: 0644]
rcp/dep/org.argeo.dep.cms.e4.rcp/src/assembly/linux.x86.xml [new file with mode: 0644]
rcp/dep/org.argeo.dep.cms.e4.rcp/src/assembly/linux.x86_64.xml [new file with mode: 0644]
rcp/dep/org.argeo.dep.cms.e4.rcp/src/assembly/win32.x86.xml [new file with mode: 0644]
rcp/dep/pom.xml [new file with mode: 0644]
rcp/org.argeo.cms.e4.rcp/.classpath [new file with mode: 0644]
rcp/org.argeo.cms.e4.rcp/.gitignore [new file with mode: 0644]
rcp/org.argeo.cms.e4.rcp/.project [new file with mode: 0644]
rcp/org.argeo.cms.e4.rcp/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
rcp/org.argeo.cms.e4.rcp/.settings/org.eclipse.pde.core.prefs [new file with mode: 0644]
rcp/org.argeo.cms.e4.rcp/META-INF/.gitignore [new file with mode: 0644]
rcp/org.argeo.cms.e4.rcp/argeo-companion.e4xmi [new file with mode: 0644]
rcp/org.argeo.cms.e4.rcp/bnd.bnd [new file with mode: 0644]
rcp/org.argeo.cms.e4.rcp/build.properties [new file with mode: 0644]
rcp/org.argeo.cms.e4.rcp/plugin.xml [new file with mode: 0644]
rcp/org.argeo.cms.e4.rcp/pom.xml [new file with mode: 0644]
rcp/org.argeo.cms.e4.rcp/src/org/argeo/cms/e4/rcp/CmsE4Application.java [new file with mode: 0644]
rcp/org.argeo.cms.e4.rcp/src/org/argeo/cms/e4/rcp/CmsRcpLifeCycle.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/.classpath [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/.gitignore [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/.project [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/META-INF/.gitignore [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/bnd.bnd [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/build.properties [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/pom.xml [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/rcp/internal/rwt/RcpClient.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/rcp/internal/rwt/RcpResourceManager.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/DefaultNLS.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/EclipseUiSpecificUtils.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/OpenFile.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/SingleSourcingException.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/UiContext.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/fileupload/FileDetails.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/fileupload/FileUploadEvent.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/fileupload/FileUploadHandler.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/fileupload/FileUploadListener.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/fileupload/FileUploadReceiver.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/RWT.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/SingletonUtil.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/application/AbstractEntryPoint.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/application/Application.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/application/ApplicationConfiguration.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/application/EntryPoint.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/application/EntryPointFactory.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/application/ExceptionHandler.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/Client.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/WebClient.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/service/BrowserNavigation.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/service/BrowserNavigationEvent.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/service/BrowserNavigationListener.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/service/ClientService.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/service/JavaScriptExecutor.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/service/UrlLauncher.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/service/ResourceLoader.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/service/ResourceManager.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/service/ServerPushSession.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/widgets/DropDown.java [new file with mode: 0644]
rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/widgets/FileUpload.java [new file with mode: 0644]
rcp/pom.xml [new file with mode: 0644]

diff --git a/pom.xml b/pom.xml
index 6e41168a3edaae03253d3510d487f0756ee80f60..66c6f47c19a4aedb096a0996e255335bd1b29f04 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -50,6 +50,7 @@
                <module>demo</module>
                <module>doc</module>
                <module>dist</module>
+               <module>rcp</module>
        </modules>
        <scm>
                <connection>scm:git:http://git.argeo.org/apache2/argeo-commons.git</connection>
diff --git a/rcp/demo/.gitignore b/rcp/demo/.gitignore
new file mode 100644 (file)
index 0000000..45dfa56
--- /dev/null
@@ -0,0 +1 @@
+/exec/
diff --git a/rcp/demo/argeo-companion.properties b/rcp/demo/argeo-companion.properties
new file mode 100644 (file)
index 0000000..95dcd98
--- /dev/null
@@ -0,0 +1,18 @@
+argeo.osgi.start.2.node=\
+org.eclipse.equinox.metatype,\
+org.eclipse.equinox.cm,\
+
+argeo.osgi.start.3.node=\
+org.argeo.cms
+
+applicationXMI=org.argeo.cms.e4.rcp/argeo-companion.e4xmi
+lifeCycleURI=bundleclass://org.argeo.cms.e4.rcp/org.argeo.cms.e4.rcp.CmsRcpLifeCycle
+clearPersistedState=true
+#argeo.cms.desktop.inTray=true
+
+# Remote node:
+#argeo.node.repo.labeledUri=http://root:demo@localhost:7070/jcr/node
+
+log4j.configuration=file:../../log4j.properties
+argeo.node.useradmin.uris=os:///
+eclipse.application=org.argeo.cms.e4.rcp.CmsE4Application
diff --git a/rcp/demo/log4j.properties b/rcp/demo/log4j.properties
new file mode 100644 (file)
index 0000000..13f949f
--- /dev/null
@@ -0,0 +1,32 @@
+log4j.rootLogger=WARN, development
+
+## Levels
+log4j.logger.org.argeo=DEBUG
+log4j.logger.org.argeo.jackrabbit.remote.ExtendedDispatcherServlet=WARN
+log4j.logger.org.argeo.server.webextender.TomcatDeployer=INFO
+
+#log4j.logger.org.springframework.security=DEBUG
+#log4j.logger.org.apache.commons.exec=DEBUG
+#log4j.logger.org.apache.jackrabbit.webdav=DEBUG
+#log4j.logger.org.apache.jackrabbit.remote=DEBUG
+#log4j.logger.org.apache.jackrabbit.core.observation=DEBUG
+
+log4j.logger.org.apache.catalina=INFO
+log4j.logger.org.apache.coyote=INFO
+
+log4j.logger.org.apache.directory=INFO
+log4j.logger.org.apache.directory.server=ERROR
+log4j.logger.org.apache.jackrabbit.core.query.lucene=ERROR
+
+## Appenders
+# console is set to be a ConsoleAppender.
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+
+# console uses PatternLayout.
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern= %-5p %d{ISO8601} %m - %c - [%t]%n
+
+# development appender (slow!)
+log4j.appender.development=org.apache.log4j.ConsoleAppender
+log4j.appender.development.layout=org.apache.log4j.PatternLayout
+log4j.appender.development.layout.ConversionPattern=%d{HH:mm:ss} [%16.16t] %5p %m (%F:%L) %c%n
diff --git a/rcp/dep/.gitignore b/rcp/dep/.gitignore
new file mode 100644 (file)
index 0000000..b83d222
--- /dev/null
@@ -0,0 +1 @@
+/target/
diff --git a/rcp/dep/org.argeo.dep.cms.e4.rcp/.gitignore b/rcp/dep/org.argeo.dep.cms.e4.rcp/.gitignore
new file mode 100644 (file)
index 0000000..5e85f8d
--- /dev/null
@@ -0,0 +1,3 @@
+/org.argeo.security.dep.node.rcp-maven.target
+/target/
+/*.target
diff --git a/rcp/dep/org.argeo.dep.cms.e4.rcp/META-INF/.gitignore b/rcp/dep/org.argeo.dep.cms.e4.rcp/META-INF/.gitignore
new file mode 100644 (file)
index 0000000..4854a41
--- /dev/null
@@ -0,0 +1 @@
+/MANIFEST.MF
diff --git a/rcp/dep/org.argeo.dep.cms.e4.rcp/bnd.bnd b/rcp/dep/org.argeo.dep.cms.e4.rcp/bnd.bnd
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/rcp/dep/org.argeo.dep.cms.e4.rcp/p2.inf b/rcp/dep/org.argeo.dep.cms.e4.rcp/p2.inf
new file mode 100644 (file)
index 0000000..0423aa5
--- /dev/null
@@ -0,0 +1,2 @@
+properties.1.name=org.eclipse.equinox.p2.type.category
+properties.1.value=true
\ No newline at end of file
diff --git a/rcp/dep/org.argeo.dep.cms.e4.rcp/pom.xml b/rcp/dep/org.argeo.dep.cms.e4.rcp/pom.xml
new file mode 100644 (file)
index 0000000..925f898
--- /dev/null
@@ -0,0 +1,503 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.commons.rcp</groupId>
+               <artifactId>dep</artifactId>
+               <version>2.1.74-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.dep.cms.e4.rcp</artifactId>
+       <name>Node Eclipse RCP</name>
+       <dependencies>
+               <!-- SWT for ARM -->
+               <dependency>
+                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                       <artifactId>org.eclipse.swt.gtk.linux.arm</artifactId>
+                       <version>3.106.100.v20180305-0927</version>
+               </dependency>
+
+               <!-- RCP -->
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>argeo-tp-rcp-e4</artifactId>
+                       <version>${version.argeo-tp}</version>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.osgi</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.osgi.services</artifactId>
+                               </exclusion>
+
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.osgi.compatibility.state</artifactId>
+                               </exclusion>
+
+                               <!-- Deprecated update configurator has side effect in PDE -->
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.update.configurator</artifactId>
+                               </exclusion>
+                               <!-- SWT -->
+                               <!-- <exclusion> -->
+                               <!-- <groupId>org.argeo.tp.rcp.e4</groupId> -->
+                               <!-- <artifactId>org.eclipse.swt.win32.win32.x86_64</artifactId> -->
+                               <!-- </exclusion> -->
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.swt.carbon.macosx</artifactId>
+                               </exclusion>
+                               <!-- <exclusion> -->
+                               <!-- <groupId>org.argeo.tp.rcp.e4</groupId> -->
+                               <!-- <artifactId>org.eclipse.swt.cocoa.macosx.x86_64</artifactId> -->
+                               <!-- </exclusion> -->
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.swt.gtk.solaris.sparc</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.swt.gtk.solaris.x86</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.swt.motif.solaris.sparc</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.swt.gtk.linux.s390</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.swt.gtk.linux.s390x</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.swt.gtk.linux.ppc64</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.swt.motif.linux.x86</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.swt.gtk.linux.ppc</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.swt.photon.qnx.x86</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.swt.motif.aix.ppc</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.swt.motif.aix.ppc64</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.swt.motif.hpux.ia64_32</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.swt.gtk.aix.ppc</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.swt.gtk.aix.ppc64</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.swt.gtk.hpux.ia64_32</artifactId>
+                               </exclusion>
+
+                               <!-- Equinox Launcher -->
+                               <!-- <exclusion> -->
+                               <!-- <groupId>org.argeo.tp.rcp.e4</groupId> -->
+                               <!-- <artifactId>org.eclipse.equinox.launcher.win32.win32.x86_64</artifactId> -->
+                               <!-- </exclusion> -->
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.equinox.launcher.carbon.macosx</artifactId>
+                               </exclusion>
+                               <!-- <exclusion> -->
+                               <!-- <groupId>org.argeo.tp.rcp.e4</groupId> -->
+                               <!-- <artifactId>org.eclipse.equinox.launcher.cocoa.macosx.x86_64</artifactId> -->
+                               <!-- </exclusion> -->
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.equinox.launcher.gtk.solaris.sparc</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.equinox.launcher.gtk.solaris.x86</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.equinox.launcher.motif.solaris.sparc</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.equinox.launcher.gtk.linux.s390</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.equinox.launcher.gtk.linux.s390x</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.equinox.launcher.gtk.linux.ppc64</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.equinox.launcher.motif.linux.x86</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.equinox.launcher.gtk.linux.ppc</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.equinox.launcher.photon.qnx.x86</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.equinox.launcher.motif.aix.ppc</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.equinox.launcher.motif.aix.ppc64</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.equinox.launcher.motif.hpux.ia64_32</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.equinox.launcher.gtk.aix.ppc</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.equinox.launcher.gtk.aix.ppc64</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.equinox.launcher.gtk.hpux.ia64_32</artifactId>
+                               </exclusion>
+
+                               <!-- Eclipse UI -->
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.e4</groupId>
+                                       <artifactId>org.eclipse.ui.carbon</artifactId>
+                               </exclusion>
+
+                               <!-- Felix Gogo shell -->
+                               <!-- <exclusion> -->
+                               <!-- <groupId>org.argeo.tp.rap.platform</groupId> -->
+                               <!-- <artifactId>org.apache.felix.gogo.runtime</artifactId> -->
+                               <!-- </exclusion> -->
+                               <!-- <exclusion> -->
+                               <!-- <groupId>org.argeo.tp.rap.platform</groupId> -->
+                               <!-- <artifactId>org.apache.felix.gogo.shell</artifactId> -->
+                               <!-- </exclusion> -->
+                               <!-- <exclusion> -->
+                               <!-- <groupId>org.argeo.tp.rap.platform</groupId> -->
+                               <!-- <artifactId>org.apache.felix.gogo.command</artifactId> -->
+                               <!-- </exclusion> -->
+                               <!-- <exclusion> -->
+                               <!-- <groupId>org.argeo.tp.rap.platform</groupId> -->
+                               <!-- <artifactId>org.eclipse.equinox.console</artifactId> -->
+                               <!-- </exclusion> -->
+                       </exclusions>
+               </dependency>
+
+               <!-- From RAP -->
+               <dependency>
+                       <groupId>org.argeo.tp.rap.e4</groupId>
+                       <artifactId>org.eclipse.emf.common</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp.rap.e4</groupId>
+                       <artifactId>org.eclipse.emf.ecore</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp.rap.e4</groupId>
+                       <artifactId>org.eclipse.emf.ecore.change</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp.rap.e4</groupId>
+                       <artifactId>org.eclipse.emf.ecore.xmi</artifactId>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.argeo.tp.rap.e4</groupId>
+                       <artifactId>org.eclipse.e4.ui.di</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp.rap.e4</groupId>
+                       <artifactId>org.eclipse.e4.core.di</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp.rap.e4</groupId>
+                       <artifactId>org.eclipse.e4.core.di.extensions.supplier</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp.rap.e4</groupId>
+                       <artifactId>org.eclipse.e4.ui.model.workbench</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp.rap.e4</groupId>
+                       <artifactId>org.eclipse.e4.emf.xpath</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp.rap.e4</groupId>
+                       <artifactId>org.eclipse.e4.core.contexts</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp.rap.e4</groupId>
+                       <artifactId>org.eclipse.e4.core.services</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp.rap.e4</groupId>
+                       <artifactId>org.eclipse.e4.core.di.annotations</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp.rap.e4</groupId>
+                       <artifactId>org.eclipse.e4.ui.services</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp.rap.e4</groupId>
+                       <artifactId>org.eclipse.e4.core.di.extensions</artifactId>
+               </dependency>
+
+
+               <!-- Eclipse -->
+               <dependency>
+                       <groupId>org.argeo.commons</groupId>
+                       <artifactId>org.argeo.eclipse.ui</artifactId>
+                       <version>2.1.74-SNAPSHOT</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons.rcp</groupId>
+                       <artifactId>org.argeo.cms.e4.rcp</artifactId>
+                       <version>2.1.74-SNAPSHOT</version>
+               </dependency>
+
+               <!-- RCP specific -->
+               <!-- <dependency> -->
+               <!-- <groupId>org.argeo.commons.rcp</groupId> -->
+               <!-- <artifactId>org.argeo.cms.ui.workbench.rcp</artifactId> -->
+               <!-- <version>2.1.18-SNAPSHOT</version> -->
+               <!-- </dependency> -->
+               <!-- <dependency> -->
+               <!-- <groupId>org.argeo.commons</groupId> -->
+               <!-- <artifactId>org.argeo.cms.ui.workbench</artifactId> -->
+               <!-- <version>${version.argeo-commons}</version> -->
+               <!-- </dependency> -->
+
+               <dependency>
+                       <groupId>org.argeo.commons</groupId>
+                       <artifactId>org.argeo.dep.cms.sdk</artifactId>
+                       <version>2.1.74-SNAPSHOT</version>
+                       <type>pom</type>
+                       <exclusions>
+                               <!-- Equinox base -->
+                               <!-- <exclusion> -->
+                               <!-- <groupId>org.argeo.tp.equinox</groupId> -->
+                               <!-- <artifactId>org.eclipse.osgi</artifactId> -->
+                               <!-- </exclusion> -->
+                               <!-- <exclusion> -->
+                               <!-- <groupId>org.argeo.tp.equinox</groupId> -->
+                               <!-- <artifactId>org.eclipse.osgi.services</artifactId> -->
+                               <!-- </exclusion> -->
+
+                               <exclusion>
+                                       <groupId>org.argeo.commons</groupId>
+                                       <artifactId>org.argeo.cms.ui.workbench</artifactId>
+                               </exclusion>
+                               <!-- Argeo RAP -->
+                               <exclusion>
+                                       <groupId>org.argeo.commons</groupId>
+                                       <artifactId>org.argeo.eclipse.ui.rap</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.commons</groupId>
+                                       <artifactId>org.argeo.cms.ui.workbench.rap</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.commons</groupId>
+                                       <artifactId>org.argeo.ext.rap.ui.workbench</artifactId>
+                               </exclusion>
+
+                               <!-- RAP minimal -->
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.e4</groupId>
+                                       <artifactId>org.eclipse.rap.rwt</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.e4</groupId>
+                                       <artifactId>org.eclipse.rap.jface</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.e4</groupId>
+                                       <artifactId>org.eclipse.rap.filedialog</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.e4</groupId>
+                                       <artifactId>org.eclipse.rap.fileupload</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.e4</groupId>
+                                       <artifactId>org.eclipse.core.commands</artifactId>
+                               </exclusion>
+
+                               <!-- RAP UI -->
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.ui.forms</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.rwt</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.jface</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.ui</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.ui.views</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.ui.workbench</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.rwt.osgi</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.jface.databinding</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.core.jobs</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.core.expressions</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.core.databinding.observable</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.help</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.core.databinding</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.core.databinding.beans</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.core.runtime</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.core.databinding.property</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>com.ibm.icu.base</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.core.contenttype</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.core.commands</artifactId>
+                               </exclusion>
+
+                               <!-- Addons -->
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.filedialog</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.fileupload</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+
+               <!-- SDK -->
+               <dependency>
+                       <groupId>org.argeo.tp.equinox</groupId>
+                       <artifactId>org.eclipse.osgi</artifactId>
+                       <scope>test</scope>
+               </dependency>
+
+       </dependencies>
+       <profiles>
+               <profile>
+                       <id>rpmbuild</id>
+                       <build>
+                               <plugins>
+                                       <plugin>
+                                               <groupId>org.codehaus.mojo</groupId>
+                                               <artifactId>rpm-maven-plugin</artifactId>
+                                               <configuration>
+                                               </configuration>
+                                               <executions>
+                                                       <execution>
+                                                               <id>rpm-node-rcp</id>
+                                                               <phase>package</phase>
+                                                               <goals>
+                                                                       <goal>rpm</goal>
+                                                               </goals>
+                                                               <configuration>
+                                                                       <name>argeo-cms-e4-rcp</name>
+                                                                       <mappings>
+                                                                               <mapping>
+                                                                                       <directory>/usr/share/osgi/rcp</directory>
+                                                                                       <username>root</username>
+                                                                                       <groupname>root</groupname>
+                                                                                       <filemode>644</filemode>
+                                                                                       <directoryIncluded>false</directoryIncluded>
+                                                                                       <dependency>
+                                                                                               <includes>
+                                                                                                       <include>org.argeo.commons.rcp:org.argeo.eclipse.ui.rcp</include>
+                                                                                                       <include>org.argeo.commons.rcp:org.argeo.cms.e4.rcp</include>
+                                                                                               </includes>
+                                                                                       </dependency>
+                                                                               </mapping>
+                                                                       </mappings>
+                                                                       <requires>
+                                                                               <!-- <require>argeo-node</require> -->
+                                                                       </requires>
+                                                               </configuration>
+                                                       </execution>
+                                               </executions>
+                                       </plugin>
+                               </plugins>
+                       </build>
+               </profile>
+       </profiles>
+</project>
diff --git a/rcp/dep/org.argeo.dep.cms.e4.rcp/src/assembly/linux.x86.xml b/rcp/dep/org.argeo.dep.cms.e4.rcp/src/assembly/linux.x86.xml
new file mode 100644 (file)
index 0000000..0b321cd
--- /dev/null
@@ -0,0 +1,59 @@
+<!--
+
+    Copyright (C) 2007-2012 Argeo GmbH
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+            http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<!-- Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org> Licensed under 
+       the Apache License, Version 2.0 (the "License"); you may not use this file 
+       except in compliance with the License. You may obtain a copy of the License 
+       at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable 
+       law or agreed to in writing, software distributed under the License is distributed 
+       on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
+       express or implied. See the License for the specific language governing permissions 
+       and limitations under the License. -->
+
+<assembly
+       xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+       <id>linux.x86</id>
+       <baseDirectory>argeo-node-ui</baseDirectory>
+       <formats>
+               <format>tar.gz</format>
+       </formats>
+       <dependencySets>
+               <dependencySet>
+                       <unpack>false</unpack>
+                       <outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}
+                       </outputFileNameMapping>
+                       <outputDirectory>lib</outputDirectory>
+                       <includes>
+                               <include>*:jar</include>
+                       </includes>
+                       <excludes>
+                               <exclude>org.eclipse.swt:org.eclipse.swt*:jar</exclude>
+                       </excludes>
+               </dependencySet>
+               <dependencySet>
+                       <unpack>false</unpack>
+                       <outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}
+                       </outputFileNameMapping>
+                       <outputDirectory>lib</outputDirectory>
+                       <includes>
+                               <include>org.eclipse.swt:org.eclipse.swt.gtk.linux.x86:jar</include>
+                       </includes>
+               </dependencySet>
+       </dependencySets>
+</assembly>
\ No newline at end of file
diff --git a/rcp/dep/org.argeo.dep.cms.e4.rcp/src/assembly/linux.x86_64.xml b/rcp/dep/org.argeo.dep.cms.e4.rcp/src/assembly/linux.x86_64.xml
new file mode 100644 (file)
index 0000000..12a0a32
--- /dev/null
@@ -0,0 +1,59 @@
+<!--
+
+    Copyright (C) 2007-2012 Argeo GmbH
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+            http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<!-- Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org> Licensed under 
+       the Apache License, Version 2.0 (the "License"); you may not use this file 
+       except in compliance with the License. You may obtain a copy of the License 
+       at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable 
+       law or agreed to in writing, software distributed under the License is distributed 
+       on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
+       express or implied. See the License for the specific language governing permissions 
+       and limitations under the License. -->
+
+<assembly
+       xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+       <id>linux.x86_64</id>
+       <baseDirectory>argeo-node-ui</baseDirectory>
+       <formats>
+               <format>tar.gz</format>
+       </formats>
+       <dependencySets>
+               <dependencySet>
+                       <unpack>false</unpack>
+                       <outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}
+                       </outputFileNameMapping>
+                       <outputDirectory>lib</outputDirectory>
+                       <includes>
+                               <include>*:jar</include>
+                       </includes>
+                       <excludes>
+                               <exclude>org.eclipse.swt:org.eclipse.swt*:jar</exclude>
+                       </excludes>
+               </dependencySet>
+               <dependencySet>
+                       <unpack>false</unpack>
+                       <outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}
+                       </outputFileNameMapping>
+                       <outputDirectory>lib</outputDirectory>
+                       <includes>
+                               <include>org.eclipse.swt:org.eclipse.swt.gtk.linux.x86_64:jar</include>
+                       </includes>
+               </dependencySet>
+       </dependencySets>
+</assembly>
\ No newline at end of file
diff --git a/rcp/dep/org.argeo.dep.cms.e4.rcp/src/assembly/win32.x86.xml b/rcp/dep/org.argeo.dep.cms.e4.rcp/src/assembly/win32.x86.xml
new file mode 100644 (file)
index 0000000..15cec0d
--- /dev/null
@@ -0,0 +1,59 @@
+<!--
+
+    Copyright (C) 2007-2012 Argeo GmbH
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+            http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<!-- Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org> Licensed under 
+       the Apache License, Version 2.0 (the "License"); you may not use this file 
+       except in compliance with the License. You may obtain a copy of the License 
+       at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable 
+       law or agreed to in writing, software distributed under the License is distributed 
+       on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
+       express or implied. See the License for the specific language governing permissions 
+       and limitations under the License. -->
+
+<assembly
+       xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+       <id>win32.x86</id>
+       <baseDirectory>argeo-node-ui</baseDirectory>
+       <formats>
+               <format>zip</format>
+       </formats>
+       <dependencySets>
+               <dependencySet>
+                       <unpack>false</unpack>
+                       <outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}
+                       </outputFileNameMapping>
+                       <outputDirectory>lib</outputDirectory>
+                       <includes>
+                               <include>*:jar</include>
+                       </includes>
+                       <excludes>
+                               <exclude>org.eclipse.swt:org.eclipse.swt*:jar</exclude>
+                       </excludes>
+               </dependencySet>
+               <dependencySet>
+                       <unpack>false</unpack>
+                       <outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}
+                       </outputFileNameMapping>
+                       <outputDirectory>lib</outputDirectory>
+                       <includes>
+                               <include>org.eclipse.swt:org.eclipse.swt.win32.win32.x86:jar</include>
+                       </includes>
+               </dependencySet>
+       </dependencySets>
+</assembly>
\ No newline at end of file
diff --git a/rcp/dep/pom.xml b/rcp/dep/pom.xml
new file mode 100644 (file)
index 0000000..ec0dc8e
--- /dev/null
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.commons.rcp</groupId>
+               <artifactId>argeo-rcp</artifactId>
+               <version>2.1.74-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>dep</artifactId>
+       <name>RCP Base Dependencies</name>
+       <packaging>pom</packaging>
+       <modules>
+               <module>org.argeo.dep.cms.e4.rcp</module>
+       </modules>
+       <dependencies>
+       </dependencies>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               <configuration>
+                                       <instructions>
+                                               <SLC-ModularDistribution>default</SLC-ModularDistribution>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.argeo.maven.plugins</groupId>
+                               <artifactId>maven-argeo-osgi-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <id>generate-descriptors</id>
+                                               <goals>
+                                                       <goal>descriptors</goal>
+                                               </goals>
+                                               <phase>generate-resources</phase>
+                                       </execution>
+                               </executions>
+                       </plugin>
+               </plugins>
+       </build>
+       <profiles>
+               <profile>
+                       <id>check-osgi</id>
+                       <dependencies>
+                               <dependency>
+                                       <groupId>org.argeo.commons</groupId>
+                                       <artifactId>org.argeo.osgi.boot</artifactId>
+                                       <version>${version.argeo-commons}</version>
+                                       <scope>test</scope>
+                               </dependency>
+                       </dependencies>
+                       <build>
+                               <plugins>
+                                       <plugin>
+                                               <groupId>org.argeo.maven.plugins</groupId>
+                                               <artifactId>maven-argeo-osgi-plugin</artifactId>
+                                               <executions>
+                                                       <execution>
+                                                               <id>check-osgi</id>
+                                                               <phase>test</phase>
+                                                               <goals>
+                                                                       <goal>equinox</goal>
+                                                               </goals>
+                                                               <configuration>
+                                                                       <onlyCheck>true</onlyCheck>
+                                                               </configuration>
+                                                       </execution>
+                                               </executions>
+                                       </plugin>
+                               </plugins>
+                       </build>
+               </profile>
+       </profiles>
+</project>
\ No newline at end of file
diff --git a/rcp/org.argeo.cms.e4.rcp/.classpath b/rcp/org.argeo.cms.e4.rcp/.classpath
new file mode 100644 (file)
index 0000000..eca7bdb
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/rcp/org.argeo.cms.e4.rcp/.gitignore b/rcp/org.argeo.cms.e4.rcp/.gitignore
new file mode 100644 (file)
index 0000000..09e3bc9
--- /dev/null
@@ -0,0 +1,2 @@
+/bin/
+/target/
diff --git a/rcp/org.argeo.cms.e4.rcp/.project b/rcp/org.argeo.cms.e4.rcp/.project
new file mode 100644 (file)
index 0000000..64d5619
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.cms.e4.rcp</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/rcp/org.argeo.cms.e4.rcp/.settings/org.eclipse.jdt.core.prefs b/rcp/org.argeo.cms.e4.rcp/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..0c68a61
--- /dev/null
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/rcp/org.argeo.cms.e4.rcp/.settings/org.eclipse.pde.core.prefs b/rcp/org.argeo.cms.e4.rcp/.settings/org.eclipse.pde.core.prefs
new file mode 100644 (file)
index 0000000..f29e940
--- /dev/null
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+pluginProject.extensions=false
+resolve.requirebundle=false
diff --git a/rcp/org.argeo.cms.e4.rcp/META-INF/.gitignore b/rcp/org.argeo.cms.e4.rcp/META-INF/.gitignore
new file mode 100644 (file)
index 0000000..4854a41
--- /dev/null
@@ -0,0 +1 @@
+/MANIFEST.MF
diff --git a/rcp/org.argeo.cms.e4.rcp/argeo-companion.e4xmi b/rcp/org.argeo.cms.e4.rcp/argeo-companion.e4xmi
new file mode 100644 (file)
index 0000000..abce62a
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ASCII"?>
+<application:Application xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:advanced="http://www.eclipse.org/ui/2010/UIModel/application/ui/advanced" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmi:id="_c4iAgCnCEei1F8sdBz8Mpw" elementId="org.argeo.cms.e4.rcp.application">
+  <children xsi:type="basic:TrimmedWindow" xmi:id="_hSGBwCnCEei1F8sdBz8Mpw" elementId="org.argeo.cms.e4.rcp.trimmedwindow.argeocompanion" label="Argeo Companion">
+    <children xsi:type="advanced:PerspectiveStack" xmi:id="_nxzQICnCEei1F8sdBz8Mpw" elementId="org.argeo.cms.e4.rcp.perspectivestack.0">
+      <children xsi:type="advanced:Perspective" xmi:id="_oI_oICnCEei1F8sdBz8Mpw" elementId="org.argeo.cms.e4.rcp.perspective.cmsadmin" label="CMS Admin">
+        <children xsi:type="basic:PartSashContainer" xmi:id="_qc16ECnCEei1F8sdBz8Mpw" elementId="org.argeo.cms.e4.rcp.partsashcontainer.0" horizontal="true">
+          <children xsi:type="basic:PartStack" xmi:id="_RE87kDsXEeiUntFYWh-hFg" elementId="org.argeo.cms.e4.rcp.partstack.1">
+            <children xsi:type="basic:Part" xmi:id="_V1WvgDsXEeiUntFYWh-hFg" elementId="org.argeo.cms.e4.rcp.part.files" contributionURI="bundleclass://org.argeo.cms.e4/org.argeo.cms.e4.files.NodeFsBrowserView" label="Files"/>
+            <children xsi:type="basic:Part" xmi:id="_vOqDQCnCEei1F8sdBz8Mpw" elementId="org.argeo.cms.e4.rcp.part.jcr" containerData="4000" contributionURI="bundleclass://org.argeo.cms.e4/org.argeo.cms.e4.jcr.JcrBrowserView" label="JCR"/>
+          </children>
+          <children xsi:type="basic:PartStack" xmi:id="_0eRiwCnCEei1F8sdBz8Mpw" elementId="org.argeo.cms.e4.rcp.partstack.0" containerData="6000"/>
+        </children>
+      </children>
+    </children>
+  </children>
+  <addons xmi:id="_c4iAgSnCEei1F8sdBz8Mpw" elementId="org.eclipse.e4.core.commands.service" contributionURI="bundleclass://org.eclipse.e4.core.commands/org.eclipse.e4.core.commands.CommandServiceAddon"/>
+  <addons xmi:id="_c4iAginCEei1F8sdBz8Mpw" elementId="org.eclipse.e4.ui.contexts.service" contributionURI="bundleclass://org.eclipse.e4.ui.services/org.eclipse.e4.ui.services.ContextServiceAddon"/>
+  <addons xmi:id="_c4iAgynCEei1F8sdBz8Mpw" elementId="org.eclipse.e4.ui.bindings.service" contributionURI="bundleclass://org.eclipse.e4.ui.bindings/org.eclipse.e4.ui.bindings.BindingServiceAddon"/>
+  <addons xmi:id="_c4iAhCnCEei1F8sdBz8Mpw" elementId="org.eclipse.e4.ui.workbench.commands.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon"/>
+  <addons xmi:id="_c4iAhSnCEei1F8sdBz8Mpw" elementId="org.eclipse.e4.ui.workbench.contexts.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon"/>
+  <addons xmi:id="_c4iAhinCEei1F8sdBz8Mpw" elementId="org.eclipse.e4.ui.workbench.bindings.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench.swt/org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon"/>
+  <addons xmi:id="_c4iAhynCEei1F8sdBz8Mpw" elementId="org.eclipse.e4.ui.workbench.handler.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon"/>
+</application:Application>
diff --git a/rcp/org.argeo.cms.e4.rcp/bnd.bnd b/rcp/org.argeo.cms.e4.rcp/bnd.bnd
new file mode 100644 (file)
index 0000000..7759c84
--- /dev/null
@@ -0,0 +1,8 @@
+Bundle-SymbolicName: org.argeo.cms.e4.rcp;singleton=true
+
+Require-Bundle: org.eclipse.core.runtime
+
+Import-Package: org.argeo.node,\
+!org.eclipse.core.runtime,\
+org.eclipse.swt,\
+*
diff --git a/rcp/org.argeo.cms.e4.rcp/build.properties b/rcp/org.argeo.cms.e4.rcp/build.properties
new file mode 100644 (file)
index 0000000..355413e
--- /dev/null
@@ -0,0 +1,5 @@
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               argeo-companion.e4xmi
+source.. = src/
diff --git a/rcp/org.argeo.cms.e4.rcp/plugin.xml b/rcp/org.argeo.cms.e4.rcp/plugin.xml
new file mode 100644 (file)
index 0000000..3e6896b
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         id="CmsE4Application"
+         name="CMS E4 Application"
+         point="org.eclipse.core.runtime.applications">
+      <application
+            cardinality="singleton-global"
+            thread="main"
+            visible="true">
+         <run class="org.argeo.cms.e4.rcp.CmsE4Application"></run>
+      </application>
+   </extension>
+</plugin>
diff --git a/rcp/org.argeo.cms.e4.rcp/pom.xml b/rcp/org.argeo.cms.e4.rcp/pom.xml
new file mode 100644 (file)
index 0000000..86e9492
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.commons.rcp</groupId>
+               <artifactId>argeo-rcp</artifactId>
+               <version>2.1.74-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.cms.e4.rcp</artifactId>
+       <name>CMS E4 RCP</name>
+       <packaging>jar</packaging>
+       <dependencies>
+               <!-- Base Argeo UI -->
+               <dependency>
+                       <groupId>org.argeo.commons</groupId>
+                       <artifactId>org.argeo.cms.ui</artifactId>
+                       <version>2.1.74-SNAPSHOT</version>
+               </dependency>
+               <!-- RCP specific -->
+               <dependency>
+                       <groupId>org.argeo.commons.rcp</groupId>
+                       <artifactId>org.argeo.eclipse.ui.rcp</artifactId>
+                       <version>2.1.74-SNAPSHOT</version>
+               </dependency>
+       </dependencies>
+</project>
\ No newline at end of file
diff --git a/rcp/org.argeo.cms.e4.rcp/src/org/argeo/cms/e4/rcp/CmsE4Application.java b/rcp/org.argeo.cms.e4.rcp/src/org/argeo/cms/e4/rcp/CmsE4Application.java
new file mode 100644 (file)
index 0000000..f8c82cb
--- /dev/null
@@ -0,0 +1,194 @@
+package org.argeo.cms.e4.rcp;
+
+import java.security.PrivilegedExceptionAction;
+
+import javax.security.auth.Subject;
+import javax.security.auth.login.LoginContext;
+import javax.security.auth.login.LoginException;
+
+import org.argeo.cms.CmsException;
+import org.argeo.cms.auth.CurrentUser;
+import org.argeo.cms.ui.CmsImageManager;
+import org.argeo.cms.ui.CmsView;
+import org.argeo.cms.ui.UxContext;
+import org.argeo.cms.util.SimpleUxContext;
+import org.argeo.cms.widgets.auth.CmsLoginShell;
+import org.argeo.node.NodeConstants;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.equinox.app.IApplication;
+import org.eclipse.equinox.app.IApplicationContext;
+import org.eclipse.swt.widgets.Display;
+
+public class CmsE4Application implements IApplication, CmsView {
+       private LoginContext loginContext;
+       private IApplication e4Application;
+       private UxContext uxContext;
+
+       @Override
+       public Object start(IApplicationContext context) throws Exception {
+               Subject subject = new Subject();
+               Display display = createDisplay();
+               CmsLoginShell loginShell = new CmsLoginShell(this);
+               // TODO customize CmsLoginShell to be smaller and centered
+               loginShell.setSubject(subject);
+               try {
+                       // try pre-auth
+                       loginContext = new LoginContext(NodeConstants.LOGIN_CONTEXT_USER, subject, loginShell);
+                       loginContext.login();
+               } catch (LoginException e) {
+                       e.printStackTrace();
+                       loginShell.createUi();
+                       loginShell.open();
+
+                       while (!loginShell.getShell().isDisposed()) {
+                               if (!display.readAndDispatch())
+                                       display.sleep();
+                       }
+               }
+               if (CurrentUser.getUsername(getSubject()) == null)
+                       throw new CmsException("Cannot log in");
+
+               // try {
+               // CallbackHandler callbackHandler = new DefaultLoginDialog(
+               // display.getActiveShell());
+               // loginContext = new LoginContext(
+               // NodeConstants.LOGIN_CONTEXT_SINGLE_USER, subject,
+               // callbackHandler);
+               // } catch (LoginException e1) {
+               // throw new CmsException("Cannot initialize login context", e1);
+               // }
+               //
+               // // login
+               // try {
+               // loginContext.login();
+               // subject = loginContext.getSubject();
+               // } catch (LoginException e) {
+               // e.printStackTrace();
+               // display.dispose();
+               // try {
+               // Thread.sleep(2000);
+               // } catch (InterruptedException e1) {
+               // // silent
+               // }
+               // return null;
+               // }
+
+               uxContext = new SimpleUxContext();
+
+               e4Application = getApplication(null);
+               Object res = Subject.doAs(subject, new PrivilegedExceptionAction<Object>() {
+
+                       @Override
+                       public Object run() throws Exception {
+                               return e4Application.start(context);
+                       }
+
+               });
+               return res;
+       }
+
+       @Override
+       public void stop() {
+               if (e4Application != null)
+                       e4Application.stop();
+       }
+
+       static IApplication getApplication(String[] args) {
+               IExtension extension = Platform.getExtensionRegistry().getExtension(Platform.PI_RUNTIME,
+                               Platform.PT_APPLICATIONS, "org.eclipse.e4.ui.workbench.swt.E4Application");
+               try {
+                       IConfigurationElement[] elements = extension.getConfigurationElements();
+                       if (elements.length > 0) {
+                               IConfigurationElement[] runs = elements[0].getChildren("run");
+                               if (runs.length > 0) {
+                                       Object runnable;
+                                       runnable = runs[0].createExecutableExtension("class");
+                                       if (runnable instanceof IApplication)
+                                               return (IApplication) runnable;
+                               }
+                       }
+               } catch (Exception e) {
+                       throw new IllegalStateException("Cannot find e4 application", e);
+               }
+               throw new IllegalStateException("Cannot find e4 application");
+       }
+
+       public static Display createDisplay() {
+               Display.setAppName("Argeo CMS RCP");
+
+               // create the display
+               Display newDisplay = Display.getCurrent();
+               if (newDisplay == null) {
+                       newDisplay = new Display();
+               }
+               // Set the priority higher than normal so as to be higher
+               // than the JobManager.
+               Thread.currentThread().setPriority(Math.min(Thread.MAX_PRIORITY, Thread.NORM_PRIORITY + 1));
+               return newDisplay;
+       }
+
+       //
+       // CMS VIEW
+       //
+
+       @Override
+       public UxContext getUxContext() {
+               return uxContext;
+       }
+
+       @Override
+       public void navigateTo(String state) {
+               // TODO Auto-generated method stub
+
+       }
+
+       @Override
+       public void authChange(LoginContext loginContext) {
+               if (loginContext == null)
+                       throw new CmsException("Login context cannot be null");
+               // logout previous login context
+               // if (this.loginContext != null)
+               // try {
+               // this.loginContext.logout();
+               // } catch (LoginException e1) {
+               // System.err.println("Could not log out: " + e1);
+               // }
+               this.loginContext = loginContext;
+       }
+
+       @Override
+       public void logout() {
+               if (loginContext == null)
+                       throw new CmsException("Login context should not bet null");
+               try {
+                       CurrentUser.logoutCmsSession(loginContext.getSubject());
+                       loginContext.logout();
+               } catch (LoginException e) {
+                       throw new CmsException("Cannot log out", e);
+               }
+       }
+
+       @Override
+       public void exception(Throwable e) {
+               // TODO Auto-generated method stub
+
+       }
+
+       @Override
+       public CmsImageManager getImageManager() {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
+       protected Subject getSubject() {
+               return loginContext.getSubject();
+       }
+
+       @Override
+       public boolean isAnonymous() {
+               return CurrentUser.isAnonymous(getSubject());
+       }
+
+}
diff --git a/rcp/org.argeo.cms.e4.rcp/src/org/argeo/cms/e4/rcp/CmsRcpLifeCycle.java b/rcp/org.argeo.cms.e4.rcp/src/org/argeo/cms/e4/rcp/CmsRcpLifeCycle.java
new file mode 100644 (file)
index 0000000..1d38fe7
--- /dev/null
@@ -0,0 +1,27 @@
+package org.argeo.cms.e4.rcp;
+
+import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.ui.workbench.lifecycle.PostContextCreate;
+import org.eclipse.e4.ui.workbench.lifecycle.PreSave;
+import org.eclipse.e4.ui.workbench.lifecycle.ProcessAdditions;
+import org.eclipse.e4.ui.workbench.lifecycle.ProcessRemovals;
+
+@SuppressWarnings("restriction")
+public class CmsRcpLifeCycle {
+
+       @PostContextCreate
+       void postContextCreate(IEclipseContext workbenchContext) {
+       }
+
+       @PreSave
+       void preSave(IEclipseContext workbenchContext) {
+       }
+
+       @ProcessAdditions
+       void processAdditions(IEclipseContext workbenchContext) {
+       }
+
+       @ProcessRemovals
+       void processRemovals(IEclipseContext workbenchContext) {
+       }
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/.classpath b/rcp/org.argeo.eclipse.ui.rcp/.classpath
new file mode 100644 (file)
index 0000000..457b115
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" path="src" />
+       <classpathentry kind="con"
+               path="org.eclipse.pde.core.requiredPlugins" />
+       <classpathentry kind="con"
+               path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8" />
+       <classpathentry kind="output" path="bin" />
+</classpath>
diff --git a/rcp/org.argeo.eclipse.ui.rcp/.gitignore b/rcp/org.argeo.eclipse.ui.rcp/.gitignore
new file mode 100644 (file)
index 0000000..0f63015
--- /dev/null
@@ -0,0 +1,2 @@
+/target/
+/bin/
diff --git a/rcp/org.argeo.eclipse.ui.rcp/.project b/rcp/org.argeo.eclipse.ui.rcp/.project
new file mode 100644 (file)
index 0000000..ef2dc2d
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.argeo.eclipse.ui.rcp</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/rcp/org.argeo.eclipse.ui.rcp/META-INF/.gitignore b/rcp/org.argeo.eclipse.ui.rcp/META-INF/.gitignore
new file mode 100644 (file)
index 0000000..4854a41
--- /dev/null
@@ -0,0 +1 @@
+/MANIFEST.MF
diff --git a/rcp/org.argeo.eclipse.ui.rcp/bnd.bnd b/rcp/org.argeo.eclipse.ui.rcp/bnd.bnd
new file mode 100644 (file)
index 0000000..bcfde8e
--- /dev/null
@@ -0,0 +1,19 @@
+Import-Package: org.apache.commons.io,\
+                               org.eclipse.core.commands,\
+                               org.springframework.beans.factory,\
+                               org.springframework.core.io.support,\
+                               org.argeo.eclipse.ui.utils,\
+                               !org.eclipse.core.runtime,\
+                               !org.eclipse.ui.plugin,\
+                               org.eclipse.swt,\
+                               *
+
+Export-Package: org.argeo.*,\
+org.eclipse.rap.fileupload.*;version="3.4",\
+org.eclipse.rap.rwt.*;version="3.4"
+
+# Was !org.eclipse.core.commands,\ why ?
+
+#Bundle-Activator: org.argeo.eclipse.ui.ArgeoUiPlugin
+#Bundle-ActivationPolicy: lazy
+#Ignore-Package: org.eclipse.core.commands
\ No newline at end of file
diff --git a/rcp/org.argeo.eclipse.ui.rcp/build.properties b/rcp/org.argeo.eclipse.ui.rcp/build.properties
new file mode 100644 (file)
index 0000000..c6b651a
--- /dev/null
@@ -0,0 +1,3 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/
diff --git a/rcp/org.argeo.eclipse.ui.rcp/pom.xml b/rcp/org.argeo.eclipse.ui.rcp/pom.xml
new file mode 100644 (file)
index 0000000..21d23d8
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.commons.rcp</groupId>
+               <artifactId>argeo-rcp</artifactId>
+               <version>2.1.74-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.eclipse.ui.rcp</artifactId>
+       <name>Eclipse UI RCP</name>
+       <description>Provide RCP specific classes and behaviour in order to enable single sourcing</description>
+       <packaging>jar</packaging>
+       <dependencies>
+               <dependency>
+                       <groupId>org.argeo.commons</groupId>
+                       <artifactId>org.argeo.eclipse.ui</artifactId>
+                       <version>2.1.74-SNAPSHOT</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons</groupId>
+                       <artifactId>org.argeo.util</artifactId>
+                       <version>2.1.74-SNAPSHOT</version>
+               </dependency>
+       </dependencies>
+</project>
\ No newline at end of file
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/rcp/internal/rwt/RcpClient.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/rcp/internal/rwt/RcpClient.java
new file mode 100644 (file)
index 0000000..0d9ce48
--- /dev/null
@@ -0,0 +1,44 @@
+package org.argeo.eclipse.ui.rcp.internal.rwt;
+
+import org.eclipse.rap.rwt.client.Client;
+import org.eclipse.rap.rwt.client.service.BrowserNavigation;
+import org.eclipse.rap.rwt.client.service.BrowserNavigationListener;
+import org.eclipse.rap.rwt.client.service.ClientService;
+import org.eclipse.rap.rwt.client.service.JavaScriptExecutor;
+
+public class RcpClient implements Client {
+
+       @Override
+       public <T extends ClientService> T getService(Class<T> type) {
+               if (type.isAssignableFrom(JavaScriptExecutor.class))
+                       return (T) javaScriptExecutor;
+               else if (type.isAssignableFrom(BrowserNavigation.class))
+                       return (T) browserNavigation;
+               else
+                       return null;
+       }
+
+       private JavaScriptExecutor javaScriptExecutor = new JavaScriptExecutor() {
+
+               @Override
+               public void execute(String code) {
+                       // TODO Auto-generated method stub
+
+               }
+       };
+       private BrowserNavigation browserNavigation = new BrowserNavigation() {
+
+               @Override
+               public void pushState(String state, String title) {
+                       // TODO Auto-generated method stub
+
+               }
+
+               @Override
+               public void addBrowserNavigationListener(
+                               BrowserNavigationListener listener) {
+                       // TODO Auto-generated method stub
+
+               }
+       };
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/rcp/internal/rwt/RcpResourceManager.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/rcp/internal/rwt/RcpResourceManager.java
new file mode 100644 (file)
index 0000000..91109a9
--- /dev/null
@@ -0,0 +1,46 @@
+package org.argeo.eclipse.ui.rcp.internal.rwt;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Collections;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.apache.commons.io.IOUtils;
+import org.eclipse.rap.rwt.service.ResourceManager;
+
+public class RcpResourceManager implements ResourceManager {
+       private Map<String, byte[]> register = Collections
+                       .synchronizedMap(new TreeMap<String, byte[]>());
+
+       @Override
+       public void register(String name, InputStream in) {
+               try {
+                       register.put(name, IOUtils.toByteArray(in));
+               } catch (IOException e) {
+                       throw new RuntimeException("Cannot register " + name, e);
+               }
+       }
+
+       @Override
+       public boolean unregister(String name) {
+               return register.remove(name) != null;
+       }
+
+       @Override
+       public InputStream getRegisteredContent(String name) {
+               return new ByteArrayInputStream(register.get(name));
+       }
+
+       @Override
+       public String getLocation(String name) {
+               return name;
+       }
+
+       @Override
+       public boolean isRegistered(String name) {
+               return register.containsKey(name);
+       }
+
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/DefaultNLS.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/DefaultNLS.java
new file mode 100644 (file)
index 0000000..1d3cd29
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2007-2012 Argeo GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.eclipse.ui.specific;
+
+/** RCP specific {@link NLS} to be extended */
+public class DefaultNLS {// extends NLS {
+//     public final static String DEFAULT_BUNDLE_LOCATION = "/properties/plugin";
+//
+//     public DefaultNLS() {
+//             this(DEFAULT_BUNDLE_LOCATION);
+//     }
+//
+//     public DefaultNLS(String bundleName) {
+//             NLS.initializeMessages(bundleName, getClass());
+//     }
+}
\ No newline at end of file
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/EclipseUiSpecificUtils.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/EclipseUiSpecificUtils.java
new file mode 100644 (file)
index 0000000..7ed0a4f
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2007-2012 Argeo GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.eclipse.ui.specific;
+
+import org.eclipse.jface.viewers.ColumnViewer;
+import org.eclipse.jface.viewers.ColumnViewerToolTipSupport;
+import org.eclipse.jface.viewers.Viewer;
+
+/** Static utilities to bridge differences between RCP and RAP */
+public class EclipseUiSpecificUtils {
+       /**
+        * TootlTip support is supported for {@link ColumnViewer} in RCP
+        * 
+        * @see ColumnViewerToolTipSupport#enableFor(Viewer)
+        */
+       public static void enableToolTipSupport(Viewer viewer) {
+               if (viewer instanceof ColumnViewer)
+                       ColumnViewerToolTipSupport.enableFor((ColumnViewer) viewer);
+       }
+
+       private EclipseUiSpecificUtils() {
+       }
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/OpenFile.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/OpenFile.java
new file mode 100644 (file)
index 0000000..704079f
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2007-2012 Argeo GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.argeo.eclipse.ui.specific;
+
+import static org.argeo.eclipse.ui.utils.SingleSourcingConstants.FILE_SCHEME;
+import static org.argeo.eclipse.ui.utils.SingleSourcingConstants.SCHEME_HOST_SEPARATOR;
+
+import java.awt.Desktop;
+import java.io.File;
+import java.io.IOException;
+
+import org.argeo.eclipse.ui.utils.SingleSourcingConstants;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+/**
+ * RCP specific command handler to open a file.
+ * 
+ * The parameter "URI" is used to determine the correct method to open it.
+ * 
+ * Various instances of this handler with different command ID might coexist in
+ * order to provide context specific open file services.
+ * 
+ */
+public class OpenFile extends AbstractHandler {
+       // private final static Log log = LogFactory.getLog(OpenFile.class);
+       public final static String ID = SingleSourcingConstants.OPEN_FILE_CMD_ID;
+       public final static String PARAM_FILE_NAME = SingleSourcingConstants.PARAM_FILE_NAME;
+       public final static String PARAM_FILE_URI = SingleSourcingConstants.PARAM_FILE_URI;
+
+       public Object execute(ExecutionEvent event) throws ExecutionException {
+               String fileUri = event.getParameter(PARAM_FILE_URI);
+
+               // sanity check
+               if (fileUri == null || "".equals(fileUri.trim()))
+                       return null;
+
+               Desktop desktop = null;
+               if (Desktop.isDesktopSupported()) {
+                       desktop = Desktop.getDesktop();
+               }
+
+               File file = getFileFromUri(fileUri);
+               if (file != null)
+                       try {
+                               desktop.open(file);
+                       } catch (IOException e) {
+                               throw new SingleSourcingException("Unable to open file with URI: " + fileUri, e);
+                       }
+               return null;
+       }
+
+       protected File getFileFromUri(String uri) {
+               if (uri.startsWith(FILE_SCHEME)) {
+                       String path = uri.substring((FILE_SCHEME + SCHEME_HOST_SEPARATOR).length());
+                       return new File(path);
+               }
+               return null;
+       }
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/SingleSourcingException.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/SingleSourcingException.java
new file mode 100644 (file)
index 0000000..9b75690
--- /dev/null
@@ -0,0 +1,15 @@
+package org.argeo.eclipse.ui.specific;
+
+/** Exception related to SWT/RWT single sourcing. */
+public class SingleSourcingException extends RuntimeException {
+       private static final long serialVersionUID = -727700418055348468L;
+
+       public SingleSourcingException(String message, Throwable cause) {
+               super(message, cause);
+       }
+
+       public SingleSourcingException(String message) {
+               super(message);
+       }
+
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/UiContext.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/UiContext.java
new file mode 100644 (file)
index 0000000..bb7cea2
--- /dev/null
@@ -0,0 +1,53 @@
+package org.argeo.eclipse.ui.specific;
+
+import java.util.Locale;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.eclipse.swt.widgets.Display;
+
+/** Singleton class providing single sources infos about the UI context. */
+public class UiContext {
+
+       public static HttpServletRequest getHttpRequest() {
+               return null;
+       }
+
+       public static HttpServletResponse getHttpResponse() {
+               return null;
+       }
+
+       public static Locale getLocale() {
+               return Locale.getDefault();
+       }
+
+       public static void setLocale(Locale locale) {
+               Locale.setDefault(locale);
+       }
+
+       /** Can always be null */
+       @SuppressWarnings("unchecked")
+       public static <T> T getData(String key) {
+               Display display = getDisplay();
+               if (display == null)
+                       return null;
+               return (T) display.getData(key);
+       }
+
+       public static void setData(String key, Object value) {
+               Display display = getDisplay();
+               if (display == null)
+                       throw new SingleSourcingException(
+                                       "Not display available in RAP context");
+               display.setData(key, value);
+       }
+
+       private static Display getDisplay() {
+               return Display.getCurrent();
+       }
+
+       private UiContext() {
+       }
+
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/fileupload/FileDetails.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/fileupload/FileDetails.java
new file mode 100644 (file)
index 0000000..fbb36dd
--- /dev/null
@@ -0,0 +1,9 @@
+package org.eclipse.rap.fileupload;
+
+public interface FileDetails {
+       String getContentType();
+
+       long getContentLength();
+
+       String getFileName();
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/fileupload/FileUploadEvent.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/fileupload/FileUploadEvent.java
new file mode 100644 (file)
index 0000000..a745280
--- /dev/null
@@ -0,0 +1,21 @@
+package org.eclipse.rap.fileupload;
+
+import java.util.EventObject;
+
+public abstract class FileUploadEvent extends EventObject {
+
+       private static final long serialVersionUID = 1L;
+
+       protected FileUploadEvent(FileUploadHandler source) {
+               super(source);
+       }
+
+       public abstract FileDetails[] getFileDetails();
+
+       public abstract long getContentLength();
+
+       public abstract long getBytesRead();
+
+       public abstract Exception getException();
+
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/fileupload/FileUploadHandler.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/fileupload/FileUploadHandler.java
new file mode 100644 (file)
index 0000000..7d89300
--- /dev/null
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 EclipseSource and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    EclipseSource - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.rap.fileupload;
+
+/**
+ * A file upload handler is used to accept file uploads from a client. After
+ * creating a file upload handler, the server will accept file uploads to the
+ * URL returned by <code>getUploadUrl()</code>. Upload listeners can be attached
+ * to react on progress. When the upload has finished, a FileUploadHandler has
+ * to be disposed of by calling its <code>dispose()</code> method.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class FileUploadHandler {
+
+       public FileUploadHandler(FileUploadReceiver fileUploadReceiver) {
+       }
+
+       public void dispose() {
+
+       }
+
+       public void addUploadListener(FileUploadListener listener) {
+
+       }
+
+       public String getUploadUrl() {
+               return null;
+       }
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/fileupload/FileUploadListener.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/fileupload/FileUploadListener.java
new file mode 100644 (file)
index 0000000..b59fd39
--- /dev/null
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 EclipseSource and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    EclipseSource - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.rap.fileupload;
+
+import org.eclipse.swt.widgets.Display;
+
+
+/**
+ * Listener to react on progress and completion of a file upload.
+ * <p>
+ * <strong>Note:</strong> This listener will be called from a different thread than the UI thread.
+ * Implementations must use {@link Display#asyncExec(Runnable)} to access the UI.
+ * </p>
+ *
+ * @see FileUploadEvent
+ */
+public interface FileUploadListener {
+
+  /**
+   * Called when new information about an in-progress upload is available.
+   *
+   * @param event event object that contains information about the uploaded file
+   * @see FileUploadEvent#getBytesRead()
+   */
+  void uploadProgress( FileUploadEvent event );
+
+  /**
+   * Called when a file upload has finished successfully.
+   *
+   * @param event event object that contains information about the uploaded file
+   * @see FileUploadEvent
+   */
+  void uploadFinished( FileUploadEvent event );
+
+  /**
+   * Called when a file upload failed.
+   *
+   * @param event event object that contains information about the uploaded file
+   * @see FileUploadEvent#getErrorMessage()
+   */
+  void uploadFailed( FileUploadEvent event );
+
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/fileupload/FileUploadReceiver.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/fileupload/FileUploadReceiver.java
new file mode 100644 (file)
index 0000000..3f4cf47
--- /dev/null
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2013 EclipseSource and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    EclipseSource - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.rap.fileupload;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+
+/**
+ * Instances of this interface are responsible for reading and processing the data from a file
+ * upload.
+ */
+public abstract class FileUploadReceiver {
+
+  /**
+   * Reads and processes all data from the provided input stream.
+   *
+   * @param stream the stream to read from
+   * @param details the details of the uploaded file like file name, content-type and size
+   * @throws IOException if an input / output error occurs
+   */
+  public abstract void receive( InputStream stream, FileDetails details ) throws IOException;
+
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/RWT.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/RWT.java
new file mode 100644 (file)
index 0000000..1219641
--- /dev/null
@@ -0,0 +1,43 @@
+package org.eclipse.rap.rwt;
+
+import java.util.Locale;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.argeo.eclipse.ui.rcp.internal.rwt.RcpClient;
+import org.argeo.eclipse.ui.rcp.internal.rwt.RcpResourceManager;
+import org.eclipse.rap.rwt.client.Client;
+import org.eclipse.rap.rwt.service.ResourceManager;
+
+public class RWT {
+       public final static String CUSTOM_VARIANT = "argeo-rcp:CUSTOM_VARIANT";
+       public final static String MARKUP_ENABLED = "argeo-rcp:MARKUP_ENABLED";
+       public final static String CUSTOM_ITEM_HEIGHT = "argeo-rcp:CUSTOM_ITEM_HEIGHT";
+       public final static String ACTIVE_KEYS = "argeo-rcp:ACTIVE_KEYS";
+       public final static String CANCEL_KEYS = "argeo-rcp:CANCEL_KEYS";
+
+       public final static int HYPERLINK = 0;
+
+       private static Locale locale = Locale.getDefault();
+       private static RcpClient client = new RcpClient();
+       private static ResourceManager resourceManager = new RcpResourceManager();
+       static {
+
+       }
+
+       public static Locale getLocale() {
+               return locale;
+       }
+
+       public static HttpServletRequest getRequest() {
+               return null;
+       }
+
+       public static ResourceManager getResourceManager() {
+               return resourceManager;
+       }
+
+       public static Client getClient() {
+               return client;
+       }
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/SingletonUtil.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/SingletonUtil.java
new file mode 100644 (file)
index 0000000..6e30aa6
--- /dev/null
@@ -0,0 +1,7 @@
+package org.eclipse.rap.rwt;
+
+public class SingletonUtil {
+       public static <T> T getSessionInstance(Class<T> clss) {
+               return null;
+       }
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/application/AbstractEntryPoint.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/application/AbstractEntryPoint.java
new file mode 100644 (file)
index 0000000..980a818
--- /dev/null
@@ -0,0 +1,43 @@
+package org.eclipse.rap.rwt.application;
+
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+public abstract class AbstractEntryPoint implements EntryPoint {
+       private Display display;
+       private Shell shell;
+
+       protected Shell createShell(Display display) {
+               return new Shell(display);
+       }
+
+       protected void createContents(Composite parent) {
+
+       }
+
+       public int createUI() {
+               display = new Display();
+               shell = createShell(display);
+               shell.setLayout(new GridLayout(1, false));
+               createContents(shell);
+               if (shell.getMaximized()) {
+                       shell.layout();
+               } else {
+                       shell.pack();
+               }
+               shell.open();
+               while (!shell.isDisposed()) {
+                       if (!display.readAndDispatch()) {
+                               display.sleep();
+                       }
+               }
+               display.dispose();
+               return 0;
+       }
+
+       protected Shell getShell() {
+               return shell;
+       }
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/application/Application.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/application/Application.java
new file mode 100644 (file)
index 0000000..6cb5f29
--- /dev/null
@@ -0,0 +1,27 @@
+package org.eclipse.rap.rwt.application;
+
+import java.util.Map;
+
+import org.eclipse.rap.rwt.service.ResourceLoader;
+
+public interface Application {
+       public static enum OperationMode {
+               JEE_COMPATIBILITY, SWT_COMPATIBILITY,
+       }
+
+       void setOperationMode(OperationMode operationMode);
+
+       void addResource(String name, ResourceLoader resourceLoader);
+
+       void setExceptionHandler(ExceptionHandler exceptionHandler);
+
+       void addEntryPoint(String path, EntryPointFactory entryPointFactory,
+                       Map<String, String> properties);
+
+       void addEntryPoint(String path, Class<? extends EntryPoint> entryPoint,
+                       Map<String, String> properties);
+
+       void addStyleSheet(String themeId, String styleSheetLocation,
+                       ResourceLoader resourceLoader);
+
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/application/ApplicationConfiguration.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/application/ApplicationConfiguration.java
new file mode 100644 (file)
index 0000000..961ad70
--- /dev/null
@@ -0,0 +1,5 @@
+package org.eclipse.rap.rwt.application;
+
+public interface ApplicationConfiguration {
+       void configure(Application application);
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/application/EntryPoint.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/application/EntryPoint.java
new file mode 100644 (file)
index 0000000..c0d559a
--- /dev/null
@@ -0,0 +1,5 @@
+package org.eclipse.rap.rwt.application;
+
+public interface EntryPoint {
+       int createUI();
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/application/EntryPointFactory.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/application/EntryPointFactory.java
new file mode 100644 (file)
index 0000000..d5b24d8
--- /dev/null
@@ -0,0 +1,5 @@
+package org.eclipse.rap.rwt.application;
+
+public interface EntryPointFactory {
+       public EntryPoint create();
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/application/ExceptionHandler.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/application/ExceptionHandler.java
new file mode 100644 (file)
index 0000000..13daf21
--- /dev/null
@@ -0,0 +1,5 @@
+package org.eclipse.rap.rwt.application;
+
+public interface ExceptionHandler {
+       public void handleException(Throwable throwable);
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/Client.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/Client.java
new file mode 100644 (file)
index 0000000..934feae
--- /dev/null
@@ -0,0 +1,18 @@
+package org.eclipse.rap.rwt.client;
+
+import java.io.Serializable;
+
+import org.eclipse.rap.rwt.client.service.ClientService;
+
+public interface Client extends Serializable {
+
+  /**
+   * Returns this client's implementation of a given service, if available.
+   *
+   * @param type the type of the requested service, must be a subtype of ClientService
+   * @return the requested service if provided by this client, otherwise <code>null</code>
+   * @see ClientService
+   */
+  <T extends ClientService> T getService( Class<T> type );
+
+}
\ No newline at end of file
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/WebClient.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/WebClient.java
new file mode 100644 (file)
index 0000000..fbcb440
--- /dev/null
@@ -0,0 +1,8 @@
+package org.eclipse.rap.rwt.client;
+
+public interface WebClient {
+       public final static String FAVICON = "rcp:FAVICON";
+       public final static String PAGE_TITLE = "rcp:PAGE_TITLE";
+       public final static String BODY_HTML = "rcp:BODY_HTML";
+       public final static String THEME_ID = "rcp:THEME_ID";
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/service/BrowserNavigation.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/service/BrowserNavigation.java
new file mode 100644 (file)
index 0000000..ffba4e4
--- /dev/null
@@ -0,0 +1,7 @@
+package org.eclipse.rap.rwt.client.service;
+
+public interface BrowserNavigation extends ClientService {
+       void pushState(String state, String title);
+
+       void addBrowserNavigationListener(BrowserNavigationListener listener);
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/service/BrowserNavigationEvent.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/service/BrowserNavigationEvent.java
new file mode 100644 (file)
index 0000000..3e1b3eb
--- /dev/null
@@ -0,0 +1,10 @@
+package org.eclipse.rap.rwt.client.service;
+
+public class BrowserNavigationEvent {
+       private String state;
+
+       public String getState() {
+               return state;
+       }
+
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/service/BrowserNavigationListener.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/service/BrowserNavigationListener.java
new file mode 100644 (file)
index 0000000..8319c03
--- /dev/null
@@ -0,0 +1,5 @@
+package org.eclipse.rap.rwt.client.service;
+
+public interface BrowserNavigationListener {
+       public void navigated(BrowserNavigationEvent event);
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/service/ClientService.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/service/ClientService.java
new file mode 100644 (file)
index 0000000..9f479d1
--- /dev/null
@@ -0,0 +1,6 @@
+package org.eclipse.rap.rwt.client.service;
+
+import java.io.Serializable;
+
+public interface ClientService extends Serializable {
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/service/JavaScriptExecutor.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/service/JavaScriptExecutor.java
new file mode 100644 (file)
index 0000000..6c44c72
--- /dev/null
@@ -0,0 +1,5 @@
+package org.eclipse.rap.rwt.client.service;
+
+public interface JavaScriptExecutor extends ClientService {
+       public void execute( String code );
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/service/UrlLauncher.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/client/service/UrlLauncher.java
new file mode 100644 (file)
index 0000000..9dae811
--- /dev/null
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2012 EclipseSource and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    EclipseSource - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.rap.rwt.client.service;
+
+/**
+ * The UrlLauncher service allows loading an URL in an external window, application or save dialog.
+ *
+ * @since 2.0
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface UrlLauncher extends ClientService {
+
+  /**
+   * Opens the given URL.
+   *
+   * Any HTTP URL or relative URL will be opened in a new window.
+   * Modern browser may block any attempt to open new windows, but will usually prompt the user to
+   * accept or ignore. Even if accepted, the decision may be applied to only this attempt, or only
+   * to future attempts. It could also trigger a document reload, causing a session restart.
+   *
+   * Non-HTTP URLs like "mailto" will not create a new browser window, but require the client
+   * to have a matching protocol handler registered.
+   *
+   * @param url the URL to open
+   */
+  void openURL( String url );
+
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/service/ResourceLoader.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/service/ResourceLoader.java
new file mode 100644 (file)
index 0000000..7e7116c
--- /dev/null
@@ -0,0 +1,9 @@
+package org.eclipse.rap.rwt.service;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+public interface ResourceLoader {
+       public InputStream getResourceAsStream(String resourceName)
+                       throws IOException;
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/service/ResourceManager.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/service/ResourceManager.java
new file mode 100644 (file)
index 0000000..c3379ea
--- /dev/null
@@ -0,0 +1,15 @@
+package org.eclipse.rap.rwt.service;
+
+import java.io.InputStream;
+
+public interface ResourceManager {
+       public void register(String name, InputStream in);
+
+       boolean unregister(String name);
+
+       public InputStream getRegisteredContent(String name);
+
+       public String getLocation(String name);
+
+       public boolean isRegistered(String name);
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/service/ServerPushSession.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/service/ServerPushSession.java
new file mode 100644 (file)
index 0000000..bed194f
--- /dev/null
@@ -0,0 +1,12 @@
+package org.eclipse.rap.rwt.service;
+
+/** Mock, does nothing as this is irrelevant for RCP. */
+public class ServerPushSession {
+       public void start() {
+
+       }
+
+       public void stop() {
+
+       }
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/widgets/DropDown.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/widgets/DropDown.java
new file mode 100644 (file)
index 0000000..b2a2005
--- /dev/null
@@ -0,0 +1,33 @@
+package org.eclipse.rap.rwt.widgets;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Widget;
+
+public class DropDown {
+       private boolean visible=false;
+
+       public DropDown(Widget parent, int style) {
+               // FIXME implement a shell
+       }
+
+       public DropDown(Widget parent) {
+               this(parent, SWT.NONE);
+       }
+
+       public void setVisible(boolean visible) {
+               this.visible = visible;
+       }
+
+       public boolean isVisible() {
+               return visible;
+       }
+       
+       public void setItems( String[] items ) {
+               
+       }
+       
+       public void setSelectionIndex( int selection ) {
+               
+       }
+       
+}
diff --git a/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/widgets/FileUpload.java b/rcp/org.argeo.eclipse.ui.rcp/src/org/eclipse/rap/rwt/widgets/FileUpload.java
new file mode 100644 (file)
index 0000000..e955516
--- /dev/null
@@ -0,0 +1,28 @@
+package org.eclipse.rap.rwt.widgets;
+
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+
+public class FileUpload extends Composite {
+
+       public FileUpload(Composite parent, int style) {
+               super(parent, style);
+       }
+
+       public void addSelectionListener(SelectionListener listener) {
+
+       }
+
+       public void submit(String url) {
+
+       }
+       
+        public void setImage( Image image ) {
+                
+        }
+        
+        public void setText(String text){
+                
+        }
+}
diff --git a/rcp/pom.xml b/rcp/pom.xml
new file mode 100644 (file)
index 0000000..8f5f3ed
--- /dev/null
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.commons</groupId>
+               <artifactId>argeo-commons</artifactId>
+               <version>2.1.74-SNAPSHOT</version>
+               <relativePath>..</relativePath>
+       </parent>
+       <groupId>org.argeo.commons.rcp</groupId>
+       <artifactId>argeo-rcp</artifactId>
+       <name>Argeo RCP</name>
+       <packaging>pom</packaging>
+       <modules>
+               <module>org.argeo.eclipse.ui.rcp</module>
+               <module>org.argeo.cms.e4.rcp</module>
+               <module>dep</module>
+               <!-- <module>demo</module> -->
+       </modules>
+       <dependencies>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>argeo-tp</artifactId>
+                       <version>${version.argeo-tp}</version>
+                       <scope>provided</scope>
+                       <exclusions>
+                               <!-- Equinox base -->
+                               <!-- <exclusion> -->
+                               <!-- <groupId>org.argeo.tp.equinox</groupId> -->
+                               <!-- <artifactId>org.eclipse.osgi</artifactId> -->
+                               <!-- </exclusion> -->
+                               <!-- <exclusion> -->
+                               <!-- <groupId>org.argeo.tp.equinox</groupId> -->
+                               <!-- <artifactId>org.eclipse.osgi.services</artifactId> -->
+                               <!-- </exclusion> -->
+
+                               <!-- RAP UI -->
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.ui.forms</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.rwt</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.jface</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.ui</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.ui.views</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.ui.workbench</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.rwt.osgi</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.jface.databinding</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.core.jobs</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.core.expressions</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.core.databinding.observable</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.help</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.core.databinding</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.core.databinding.beans</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.core.runtime</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.core.databinding.property</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>com.ibm.icu.base</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.core.contenttype</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.core.commands</artifactId>
+                               </exclusion>
+
+                               <!-- Addons -->
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.filedialog</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rap.platform</groupId>
+                                       <artifactId>org.eclipse.rap.fileupload</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.tp</groupId>
+                       <artifactId>argeo-tp-rcp-e4</artifactId>
+                       <version>${version.argeo-tp}</version>
+                       <scope>provided</scope>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.platform</groupId>
+                                       <artifactId>org.eclipse.osgi</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>org.argeo.tp.rcp.platform</groupId>
+                                       <artifactId>org.eclipse.osgi.services</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+               <!-- <dependency> -->
+               <!-- <groupId>org.argeo.tp.eclipse.ide</groupId> -->
+               <!-- <artifactId>org.eclipse.ui.forms</artifactId> -->
+               <!-- <version>3.7.101.v20170815-1446</version> -->
+               <!-- <scope>provided</scope> -->
+               <!-- </dependency> -->
+       </dependencies>
+       <dependencyManagement>
+               <dependencies>
+                       <dependency>
+                               <groupId>org.argeo.tp</groupId>
+                               <artifactId>argeo-tp-rcp-e4</artifactId>
+                               <version>${version.argeo-tp}</version>
+                               <type>pom</type>
+                               <scope>import</scope>
+                       </dependency>
+               </dependencies>
+       </dependencyManagement>
+</project>