+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.argeo.slc.client.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>
+++ /dev/null
-#Wed Aug 04 16:32:22 CEST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+++ /dev/null
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: SLC RCP
-Bundle-SymbolicName: org.argeo.slc.client.rcp;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.argeo.slc.client.rcp.ClientRcpPlugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.argeo.slc.client.ui.perspectives,
- org.argeo.slc.core.test.tree;version="0.13.0.SNAPSHOT-r3768",
- org.argeo.slc.execution;version="0.13.0.SNAPSHOT-r3770",
- org.argeo.slc.process;version="0.13.0.SNAPSHOT-r3770",
- org.argeo.slc.runtime;version="0.13.0.SNAPSHOT-r3770",
- org.argeo.slc.services;version="0.13.0.SNAPSHOT-r3753",
- org.argeo.slc.services.impl;version="0.13.0.SNAPSHOT-r3753"
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<beans:beans xmlns="http://www.springframework.org/schema/osgi"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
- xsi:schemaLocation="http://www.springframework.org/schema/osgi
- http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
- <beans:description> Implements All RCP basic classes that are not SLC
- dependent.
- </beans:description>
-</beans:beans>
\ No newline at end of file
+++ /dev/null
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- splash.bmp,\
- plugin_customization.ini
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
- <extension
- id="org.argeo.slc.client.rcp.application"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run
- class="org.argeo.slc.client.rcp.SlcClientRcpApplication">
- </run>
- </application>
- </extension>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="Slc Execution"
- class="org.argeo.slc.client.ui.perspectives.SlcExecution"
- id="org.argeo.slc.client.ui.perspectives.slcExecution"
- icon="icons/slc_execution_perspective.gif">
- </perspective>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="menu:org.eclipse.ui.main.menu">
- <menu
- id="fileMenu"
- label="File">
- <command
- commandId="org.argeo.slc.client.rcp.commands.Exit"
- label="Exit"
- style="push"
- tooltip="Exits the application">
- </command>
- </menu>
- </menuContribution>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- defaultHandler="org.argeo.slc.client.rcp.commands.ExitHandler"
- id="org.argeo.slc.client.rcp.commands.Exit"
- name="Exit">
- </command>
- </extension>
- <extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.argeo.slc.client.rcp.application"
- name="SLC">
- <property
- name="windowImages"
- value="icons/argeo-icon-256.png">
- </property>
- <property
- name="appName"
- value="SLC">
- </property>
- <property
- name="preferenceCustomization"
- value="plugin_customization.ini">
- </property>
- </product>
- </extension>
- <!-- <extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.argeo.slc.client.rcp.application"
- name="SLC">
- <property
- name="windowImages"
- value="icons/argeo-icon-256.png">
- </property>
- <property
- name="appName"
- value="SLC">
- </property>
- </product>
- </extension> -->
-
-</plugin>
+++ /dev/null
-org.eclipse.ui/DOCK_PERSPECTIVE_BAR=topRight
-org.eclipse.ui/SHOW_TEXT_ON_PERSPECTIVE_BAR=false
-org.eclipse.ui/PERSPECTIVE_BAR_SIZE=100
-org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=true
-org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = false
+++ /dev/null
-<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.slc.eclipse</groupId>
- <artifactId>plugins</artifactId>
- <version>0.13.0-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.client.rcp</artifactId>
- <name>SLC Client RCP</name>
- <packaging>jar</packaging>
- <dependencies>
- <!-- SLC -->
- <dependency>
- <groupId>org.argeo.slc.eclipse</groupId>
- <artifactId>org.argeo.slc.client.ui</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!-- Eclipse -->
- <dependency>
- <groupId>org.eclipse.ui</groupId>
- <artifactId>org.eclipse.ui</artifactId>
- </dependency>
- <dependency>
- <groupId>org.eclipse.core</groupId>
- <artifactId>org.eclipse.core.runtime</artifactId>
- </dependency>
- <dependency>
- <groupId>org.eclipse.swt</groupId>
- <artifactId>org.eclipse.swt.gtk.linux.x86_64</artifactId>
- </dependency>
- <dependency>
- <groupId>org.eclipse.swt</groupId>
- <artifactId>org.eclipse.swt.gtk.linux.x86</artifactId>
- </dependency>
-
- </dependencies>
-</project>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="SLC" uid="org.argeo.slc.client.rcp.product" id="org.argeo.slc.client.rcp.product" application="org.argeo.slc.client.rcp.application" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true">
-
- <configIni use="default">
- </configIni>
-
- <launcherArgs>
- <programArgs>-console</programArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <windowImages i16="icons/argeo-icon-256.png"/>
-
- <launcher>
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="com.ibm.icu"/>
- <plugin id="com.springsource.antlr"/>
- <plugin id="com.springsource.bsh"/>
- <plugin id="com.springsource.com.jcraft.jsch"/>
- <plugin id="com.springsource.com.jcraft.jzlib"/>
- <plugin id="com.springsource.com.lowagie.text"/>
- <plugin id="com.springsource.com.mysql.jdbc"/>
- <plugin id="com.springsource.com.thoughtworks.xstream"/>
- <plugin id="com.springsource.edu.emory.mathcs.backport"/>
- <plugin id="com.springsource.edu.oswego.cs.dl.util.concurrent"/>
- <plugin id="com.springsource.javassist"/>
- <plugin id="com.springsource.javax.activation"/>
- <plugin id="com.springsource.javax.annotation"/>
- <plugin id="com.springsource.javax.ejb"/>
- <plugin id="com.springsource.javax.el"/>
- <plugin id="com.springsource.javax.jms"/>
- <plugin id="com.springsource.javax.mail"/>
- <plugin id="com.springsource.javax.management.j2ee"/>
- <plugin id="com.springsource.javax.media.jai.codec"/>
- <plugin id="com.springsource.javax.media.jai.core"/>
- <plugin id="com.springsource.javax.persistence"/>
- <plugin id="com.springsource.javax.resource"/>
- <plugin id="com.springsource.javax.servlet"/>
- <plugin id="com.springsource.javax.servlet.jsp"/>
- <plugin id="com.springsource.javax.servlet.jsp.jstl"/>
- <plugin id="com.springsource.javax.transaction"/>
- <plugin id="com.springsource.javax.xml.bind"/>
- <plugin id="com.springsource.javax.xml.rpc"/>
- <plugin id="com.springsource.javax.xml.soap"/>
- <plugin id="com.springsource.javax.xml.stream"/>
- <plugin id="com.springsource.javax.xml.ws"/>
- <plugin id="com.springsource.jcifs"/>
- <plugin id="com.springsource.jdbm"/>
- <plugin id="com.springsource.json"/>
- <plugin id="com.springsource.junit"/>
- <plugin id="com.springsource.jxl"/>
- <plugin id="com.springsource.net.sf.cglib"/>
- <plugin id="com.springsource.net.sf.ehcache"/>
- <plugin id="com.springsource.net.sourceforge.jtds"/>
- <plugin id="com.springsource.oracle.jdbc"/>
- <plugin id="com.springsource.org.antlr"/>
- <plugin id="com.springsource.org.aopalliance"/>
- <plugin id="com.springsource.org.apache.bsf"/>
- <plugin id="com.springsource.org.apache.commons.beanutils"/>
- <plugin id="com.springsource.org.apache.commons.cli"/>
- <plugin id="com.springsource.org.apache.commons.codec"/>
- <plugin id="com.springsource.org.apache.commons.collections"/>
- <plugin id="com.springsource.org.apache.commons.dbcp"/>
- <plugin id="com.springsource.org.apache.commons.fileupload"/>
- <plugin id="com.springsource.org.apache.commons.httpclient"/>
- <plugin id="com.springsource.org.apache.commons.io"/>
- <plugin id="com.springsource.org.apache.commons.lang"/>
- <plugin id="com.springsource.org.apache.commons.net"/>
- <plugin id="com.springsource.org.apache.commons.pool"/>
- <plugin id="com.springsource.org.apache.commons.vfs"/>
- <plugin id="com.springsource.org.apache.derby"/>
- <plugin id="com.springsource.org.apache.directory.server.changepw"/>
- <plugin id="com.springsource.org.apache.directory.server.core" fragment="true"/>
- <plugin id="com.springsource.org.apache.directory.server.core.shared"/>
- <plugin id="com.springsource.org.apache.directory.server.jndi"/>
- <plugin id="com.springsource.org.apache.directory.server.kerberos"/>
- <plugin id="com.springsource.org.apache.directory.server.kerberos.shared"/>
- <plugin id="com.springsource.org.apache.directory.server.ldap"/>
- <plugin id="com.springsource.org.apache.directory.server.ntp"/>
- <plugin id="com.springsource.org.apache.directory.server.protocol.shared"/>
- <plugin id="com.springsource.org.apache.directory.shared.asn1"/>
- <plugin id="com.springsource.org.apache.directory.shared.ldap"/>
- <plugin id="com.springsource.org.apache.log4j"/>
- <plugin id="com.springsource.org.apache.lucene"/>
- <plugin id="com.springsource.org.apache.mina"/>
- <plugin id="com.springsource.org.apache.oro"/>
- <plugin id="com.springsource.org.apache.regexp"/>
- <plugin id="com.springsource.org.apache.taglibs.standard"/>
- <plugin id="com.springsource.org.apache.tools.ant"/>
- <plugin id="com.springsource.org.apache.tools.ant.launch"/>
- <plugin id="com.springsource.org.apache.ws.commons.schema"/>
- <plugin id="com.springsource.org.apache.xalan"/>
- <plugin id="com.springsource.org.apache.xerces" fragment="true"/>
- <plugin id="com.springsource.org.apache.xml.resolver"/>
- <plugin id="com.springsource.org.apache.xml.serializer"/>
- <plugin id="com.springsource.org.apache.xmlbeans"/>
- <plugin id="com.springsource.org.apache.xmlcommons"/>
- <plugin id="com.springsource.org.aspectj.runtime"/>
- <plugin id="com.springsource.org.aspectj.weaver"/>
- <plugin id="com.springsource.org.castor"/>
- <plugin id="com.springsource.org.codehaus.jackson"/>
- <plugin id="com.springsource.org.codehaus.jackson.mapper"/>
- <plugin id="com.springsource.org.dbunit"/>
- <plugin id="com.springsource.org.dom4j"/>
- <plugin id="com.springsource.org.h2"/>
- <plugin id="com.springsource.org.hibernate"/>
- <plugin id="com.springsource.org.hsqldb"/>
- <plugin id="com.springsource.org.jaxen"/>
- <plugin id="com.springsource.org.jdom"/>
- <plugin id="com.springsource.org.jgroups"/>
- <plugin id="com.springsource.org.mortbay.jetty.server"/>
- <plugin id="com.springsource.org.mortbay.util"/>
- <plugin id="com.springsource.org.postgresql.jdbc3"/>
- <plugin id="com.springsource.org.quartz"/>
- <plugin id="com.springsource.org.tmatesoft.svn"/>
- <plugin id="com.springsource.org.xmlpull"/>
- <plugin id="com.springsource.slf4j.api"/>
- <plugin id="com.springsource.slf4j.log4j" fragment="true"/>
- <plugin id="com.springsource.slf4j.org.apache.commons.logging"/>
- <plugin id="org.argeo.basic.nodeps"/>
- <plugin id="org.argeo.dep.osgi.activemq"/>
- <plugin id="org.argeo.dep.osgi.activemq.optional" fragment="true"/>
- <plugin id="org.argeo.dep.osgi.commons.exec"/>
- <plugin id="org.argeo.dep.osgi.directory.shared.asn.codec" fragment="true"/>
- <plugin id="org.argeo.dep.osgi.geoapi"/>
- <plugin id="org.argeo.dep.osgi.geotools"/>
- <plugin id="org.argeo.dep.osgi.jai.imageio"/>
- <plugin id="org.argeo.dep.osgi.java3d"/>
- <plugin id="org.argeo.dep.osgi.jsr275"/>
- <plugin id="org.argeo.dep.osgi.jts"/>
- <plugin id="org.argeo.dep.osgi.maven.embedder"/>
- <plugin id="org.argeo.dep.osgi.mina.filter.ssl" fragment="true"/>
- <plugin id="org.argeo.dep.osgi.springframework.ldap"/>
- <plugin id="org.argeo.eclipse.ui"/>
- <plugin id="org.argeo.infra.core" fragment=""/>
- <plugin id="org.argeo.infra.security.services" fragment="true"/>
- <plugin id="org.argeo.security.core"/>
- <plugin id="org.argeo.security.manager.ldap"/>
- <plugin id="org.argeo.security.services"/>
- <plugin id="org.argeo.server.core"/>
- <plugin id="org.argeo.server.jdbc" fragment="true"/>
- <plugin id="org.argeo.server.json"/>
- <plugin id="org.argeo.slc.agent"/>
- <plugin id="org.argeo.slc.agent.ext.bsf" fragment="true"/>
- <plugin id="org.argeo.slc.agent.ext.jdbc" fragment="true"/>
- <plugin id="org.argeo.slc.agent.ext.xalan" fragment="true"/>
- <plugin id="org.argeo.slc.client.agent"/>
- <plugin id="org.argeo.slc.client.core"/>
- <plugin id="org.argeo.slc.client.gis" fragment=""/>
- <plugin id="org.argeo.slc.client.hibernate"/>
- <plugin id="org.argeo.slc.client.oxm"/>
- <plugin id="org.argeo.slc.client.rcp"/>
- <plugin id="org.argeo.slc.client.ui"/>
- <plugin id="org.argeo.slc.core"/>
- <plugin id="org.argeo.slc.demo.agent" fragment="true"/>
- <plugin id="org.argeo.slc.demo.ant"/>
- <plugin id="org.argeo.slc.demo.basic"/>
- <plugin id="org.argeo.slc.demo.log4j" fragment="true"/>
- <plugin id="org.argeo.slc.detached"/>
- <plugin id="org.argeo.slc.ext.activemq" fragment="true"/>
- <plugin id="org.argeo.slc.gis.ext.dbcp" fragment="true"/>
- <plugin id="org.argeo.slc.gis.position.backend" fragment=""/>
- <plugin id="org.argeo.slc.gis.position.gpsbabel" fragment=""/>
- <plugin id="org.argeo.slc.server"/>
- <plugin id="org.argeo.slc.server.castor"/>
- <plugin id="org.argeo.slc.server.h2"/>
- <plugin id="org.argeo.slc.server.hibernate"/>
- <plugin id="org.argeo.slc.server.services"/>
- <plugin id="org.argeo.slc.specs"/>
- <plugin id="org.argeo.slc.support.activemq"/>
- <plugin id="org.argeo.slc.support.ant"/>
- <plugin id="org.argeo.slc.support.castor" fragment="true"/>
- <plugin id="org.argeo.slc.support.gis"/>
- <plugin id="org.argeo.slc.support.hibernate" fragment="true"/>
- <plugin id="org.argeo.slc.support.maven" fragment="true"/>
- <plugin id="org.argeo.slc.support.osgi"/>
- <plugin id="org.argeo.slc.support.simple"/>
- <plugin id="org.eclipse.core.commands"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.databinding"/>
- <plugin id="org.eclipse.core.databinding.observable"/>
- <plugin id="org.eclipse.core.databinding.property"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.runtime"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.help"/>
- <plugin id="org.eclipse.jface"/>
- <plugin id="org.eclipse.jface.databinding"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.swt"/>
- <plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/>
- <plugin id="org.eclipse.swt.gtk.linux.x86_64" fragment="true"/>
- <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.ui"/>
- <plugin id="org.eclipse.ui.workbench"/>
- <plugin id="org.springframework.aop"/>
- <plugin id="org.springframework.beans"/>
- <plugin id="org.springframework.context"/>
- <plugin id="org.springframework.context.support"/>
- <plugin id="org.springframework.core"/>
- <plugin id="org.springframework.jdbc"/>
- <plugin id="org.springframework.jms"/>
- <plugin id="org.springframework.orm"/>
- <plugin id="org.springframework.osgi.core"/>
- <plugin id="org.springframework.osgi.extender"/>
- <plugin id="org.springframework.osgi.io"/>
- <plugin id="org.springframework.oxm"/>
- <plugin id="org.springframework.security.core"/>
- <plugin id="org.springframework.transaction"/>
- <plugin id="org.springframework.web"/>
- <plugin id="org.springframework.web.servlet"/>
- <plugin id="org.springframework.xml"/>
- </plugins>
-
- <configurations>
- <plugin id="org.argeo.security.manager.ldap" autoStart="true" startLevel="0" />
- <plugin id="org.argeo.security.services" autoStart="true" startLevel="0" />
- <plugin id="org.argeo.slc.agent" autoStart="true" startLevel="0" />
- <plugin id="org.argeo.slc.client.agent" autoStart="true" startLevel="0" />
- <plugin id="org.argeo.slc.client.gis" autoStart="true" startLevel="0" />
- <plugin id="org.argeo.slc.client.hibernate" autoStart="true" startLevel="0" />
- <plugin id="org.argeo.slc.client.oxm" autoStart="true" startLevel="0" />
- <plugin id="org.argeo.slc.client.ui" autoStart="true" startLevel="0" />
- <plugin id="org.argeo.slc.demo.ant" autoStart="true" startLevel="0" />
- <plugin id="org.argeo.slc.demo.basic" autoStart="true" startLevel="0" />
- <plugin id="org.argeo.slc.gis.position.backend" autoStart="true" startLevel="0" />
- <plugin id="org.argeo.slc.gis.position.gpsbabel" autoStart="true" startLevel="0" />
- <plugin id="org.argeo.slc.server.castor" autoStart="true" startLevel="0" />
- <plugin id="org.argeo.slc.server.h2" autoStart="true" startLevel="0" />
- <plugin id="org.argeo.slc.server.hibernate" autoStart="true" startLevel="0" />
- <plugin id="org.argeo.slc.server.services" autoStart="true" startLevel="0" />
- </configurations>
-
-</product>
+++ /dev/null
-package org.argeo.slc.client.rcp;
-
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-
-/**
- * An action bar advisor is responsible for creating, adding, and disposing of
- * the actions added to a workbench window. Each window will be populated with
- * new actions.
- */
-public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
-
- // Actions - important to allocate these only in makeActions, and then use
- // them in the fill methods. This ensures that the actions aren't recreated
- // when fillActionBars is called with FILL_PROXY.
-
- public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
- super(configurer);
- }
-
- protected void makeActions(final IWorkbenchWindow window) {
- // Creates the actions and registers them.
- // Registering is needed to ensure that key bindings work.
- // The corresponding commands keybindings are defined in the plugin.xml
- // file.
- // Registering also provides automatic disposal of the actions when
- // the window is closed.
- }
-
- protected void fillMenuBar(IMenuManager menuBar) {
- }
-
-}
+++ /dev/null
-package org.argeo.slc.client.rcp;
-
-import org.eclipse.ui.application.IWorkbenchConfigurer;
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchAdvisor;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-/**
- * implements initial perspective and saveAndRestore status of the workbench.
- *
- * @author bsinou
- *
- */
-public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
-
- private static final String PERSPECTIVE_ID = "org.argeo.slc.client.ui.perspectives.slcExecution";
-
- public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(
- IWorkbenchWindowConfigurer configurer) {
- return new ApplicationWorkbenchWindowAdvisor(configurer);
- }
-
- public String getInitialWindowPerspectiveId() {
- return PERSPECTIVE_ID;
- }
-
- @Override
- public void initialize(IWorkbenchConfigurer configurer) {
- super.initialize(configurer);
-
- // To remember the user's layout and window size for the next time he
- // starts the application
- configurer.setSaveAndRestore(true);
- }
-
-}
+++ /dev/null
-package org.argeo.slc.client.rcp;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tray;
-import org.eclipse.swt.widgets.TrayItem;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-/**
- * Set here initial default size of the UI
- *
- * @author bsinou
- *
- */
-public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
-
- private TrayItem trayItem;
-
- public ApplicationWorkbenchWindowAdvisor(
- IWorkbenchWindowConfigurer configurer) {
- super(configurer);
- }
-
- public ActionBarAdvisor createActionBarAdvisor(
- IActionBarConfigurer configurer) {
- return new ApplicationActionBarAdvisor(configurer);
- }
-
- public void preWindowOpen() {
- IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
-
- configurer.getWorkbenchConfigurer().restoreState();
- // set default window size
- configurer.setInitialSize(new Point(1200, 900));
- configurer.setShowCoolBar(true);
- configurer.setShowStatusLine(true);
- configurer.setShowPerspectiveBar(true);
-
- }
-
- public void postWindowOpen() {
- initTray();
- }
-
- @Override
- public boolean preWindowShellClose() {
- // hide but do not dispose if tray is supported
- if (trayItem != null) {
- getWindowConfigurer().getWindow().getShell().setVisible(false);
- return false;
- } else
- return true;
- }
-
- /** Init tray support */
- protected void initTray() {
- IWorkbenchWindow window = getWindowConfigurer().getWindow();
- final Tray tray = window.getShell().getDisplay().getSystemTray();
- trayItem = new TrayItem(tray, SWT.NONE);
- if (trayItem == null)
- return;
-
- // image
- Image trayImage = ClientRcpPlugin.getDefault().getImageRegistry()
- .get("argeoTrayIcon");
- trayItem.setImage(trayImage);
- trayItem.setToolTipText("Argeo SLC");
-
- // add pop-menu
- // TODO: contribute more commands
- trayItem.addListener(SWT.MenuDetect, new Listener() {
- public void handleEvent(Event event) {
- IWorkbenchWindow window = getWindowConfigurer().getWindow();
- Menu menu = new Menu(window.getShell(), SWT.POP_UP);
- MenuItem exit = new MenuItem(menu, SWT.NONE);
- exit.setText("Exit");
- exit.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- getWindowConfigurer().getWorkbenchConfigurer()
- .getWorkbench().close();
- }
- });
- menu.setVisible(true);
- }
- });
-
- // add behavior when clicked upon
- trayItem.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- Shell shell = getWindowConfigurer().getWindow().getShell();
- if (shell.isVisible()) {
- if (shell.getMinimized())
- shell.setMinimized(false);
- else {
- shell.setVisible(false);
- shell.setMinimized(true);
- }
- } else {
- shell.setVisible(true);
- shell.setActive();
- shell.setFocus();
- shell.setMinimized(false);
- }
- }
- });
- }
-
- @Override
- public void dispose() {
- if (trayItem != null)
- trayItem.dispose();
- }
-
-}
+++ /dev/null
-package org.argeo.slc.client.rcp;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class ClientRcpPlugin extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.argeo.slc.client.rcp";
-
- // The shared instance
- private static ClientRcpPlugin plugin;
-
- /**
- * The constructor
- */
- public ClientRcpPlugin() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
- * )
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
- * )
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static ClientRcpPlugin getDefault() {
- return plugin;
- }
-
- @Override
- protected void initializeImageRegistry(ImageRegistry reg) {
- reg.put("argeoTrayIcon",
- getImageDescriptor("icons/argeo-trayIcon-256.png"));
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in
- * relative path
- *
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-}
+++ /dev/null
-package org.argeo.slc.client.rcp;
-
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This class controls all aspects of the application's execution
- */
-public class SlcClientRcpApplication implements IApplication {
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext context) {
- Display display = PlatformUI.createDisplay();
- try {
- int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
- if (returnCode == PlatformUI.RETURN_RESTART) {
- return IApplication.EXIT_RESTART;
- }
- return IApplication.EXIT_OK;
- } finally {
- display.dispose();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- final IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench == null)
- return;
- final Display display = workbench.getDisplay();
- display.syncExec(new Runnable() {
- public void run() {
- if (!display.isDisposed())
- workbench.close();
- }
- });
- }
-}
+++ /dev/null
-package org.argeo.slc.client.rcp.commands;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-public class ExitHandler extends AbstractHandler {
-
- // TODO: Could be implemented using default RCP commands.
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- HandlerUtil.getActiveWorkbenchWindow(event).close();
- return null;
- }
-
-}