Commit 91b441ad authored by Jay Jay Billings's avatar Jay Jay Billings
Browse files

Started updating the platform to support the Workspace Dialog. Removed a


bunch of old, unneeded files from the client.rcp bundle. Fixed imports
and addressed minor issues in other bundles. Updated the product to have
arguments that are consistent with out Eclipse spins. Updated the
feature to include missing bundles. Fixed cardinality issues for the IO
bundle so that it will start even if no services are registered.
Signed-off-by: default avatarJay Jay Billings <billingsjj@ornl.gov>
parent 8efbc3e3
......@@ -2795,4 +2795,39 @@ Java and all Java-based trademarks are trademarks of Oracle Corporation in the U
version="0.0.0"
unpack="false"/>
<plugin
id="ca.odell.glazedlists"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.apache.commons.math"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.hamcrest.library"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.apache.log4j"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.apache.poi"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="ICE" uid="ice.product" id="org.eclipse.ice.client.rcp.product" application="org.eclipse.ui.ide.workbench" version="2.0.0" useFeatures="true" includeLaunchers="true">
<product name="ICE" uid="ice.product" id="org.eclipse.platform.ide" application="org.eclipse.ui.ide.workbench" version="2.0.0" useFeatures="true" includeLaunchers="true">
<configIni use="default">
</configIni>
<launcherArgs>
<programArgs>-consoleLog -console -clean
<programArgs>-product org.eclipse.platform.ide -consoleLog -console --launcher.defaultAction openFile --launcher.appendVmargs
</programArgs>
<vmArgs>-Dvisit.port=5600 -DREFRESH_BUNDLES=FALSE -Xmx2048M -XX:MaxPermSize=1024M -Dmax_download_size=52428800 -Dorg.eclipse.equinox.http.jetty.http.port=8080
<vmArgs>-Dvisit.port=5600 -DREFRESH_BUNDLES=FALSE -Xmx2048M -XX:MaxPermSize=1024M -Dmax_download_size=52428800 -Dorg.eclipse.equinox.http.jetty.http.port=8080 -Dosgi.instance.area=@user.home/ICEFiles
</vmArgs>
<vmArgsLin>-Dosgi.instance.area=@user.home/ICEFiles -Dvisit.binpath=@user.home/visit/bin
<vmArgsLin>-Dvisit.binpath=@user.home/visit/bin
</vmArgsLin>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -Dosgi.instance.area=@user.home/ICEFiles -Dvisit.binpath=@user.home/visit/bin
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -Dvisit.binpath=@user.home/visit/bin
</vmArgsMac>
<vmArgsWin>-Dosgi.instance.area=@user.home\ICEFiles
-Dvisit.binpath=C:\PROGRA~1\LLNL\VISIT2~1.2&quot;\r&quot;
<vmArgsWin>-Dvisit.binpath=C:\PROGRA~1\LLNL\VISIT2~1.2&quot;\r&quot;
-Djava.library.path=C:\PROGRA~1\HDF_Group\HDFView\2.10.1\lib&quot;\r&quot;
</vmArgsWin>
</launcherArgs>
......@@ -108,6 +107,7 @@ Java and all Java-based trademarks are trademarks of Oracle Corporation in the U
<feature id="org.eclipse.equinox.p2.extras.feature"/>
<feature id="org.eclipse.equinox.p2.core.feature"/>
<feature id="org.eclipse.equinox.p2.rcp.feature"/>
<feature id="org.eclipse.platform" version="4.3.2.v20140221-1852"/>
</features>
<configurations>
......@@ -158,9 +158,19 @@ Java and all Java-based trademarks are trademarks of Oracle Corporation in the U
<plugin id="org.eclipse.osgi" autoStart="true" startLevel="-1" />
<plugin id="org.eclipse.platform" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ui.forms" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.ui.ide.application" autoStart="false" startLevel="0" />
<plugin id="org.eclipse.ui.intro" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.update.configurator" autoStart="true" startLevel="3" />
<property name="eclipse.p2.data.area" value="@config.dir/../p2" />
<property name="eclipse.p2.profile" value="epp.package.rcp" />
<property name="osgi.instance.area.default" value="@user.home/Documents/workspace" />
</configurations>
<preferencesInfo>
<targetfile overwrite="false"/>
</preferencesInfo>
<cssInfo>
</cssInfo>
</product>
......@@ -36,6 +36,7 @@ Import-Package: com.sun.jersey.api.client,
org.eclipse.swt.layout,
org.eclipse.swt.widgets,
org.eclipse.ui,
org.eclipse.ui.internal.ide.application,
org.osgi.framework;version="1.5.0",
org.osgi.util.tracker;version="1.5.0"
Require-Bundle: org.eclipse.ui;bundle-version="3.7.0",
......
bin.includes = plugin.xml,\
META-INF/,\
bin.includes = META-INF/,\
.,\
splash.bmp,\
plugin_customization.ini
output.. = bin/
src.includes = META-INF/,\
plugin.xml,\
build.properties,\
org.eclipse.ice.iceclient.application.launch,\
src/,\
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
<booleanAttribute key="append.args" value="true"/>
<booleanAttribute key="askclear" value="true"/>
<booleanAttribute key="automaticAdd" value="false"/>
<booleanAttribute key="automaticValidate" value="false"/>
<stringAttribute key="bootstrap" value=""/>
<stringAttribute key="checked" value="[NONE]"/>
<booleanAttribute key="clearConfig" value="true"/>
<booleanAttribute key="clearws" value="false"/>
<booleanAttribute key="clearwslog" value="false"/>
<booleanAttribute key="com.ibm.debug.breakpoints.java.appendFile" value="false"/>
<stringAttribute key="com.ibm.debug.breakpoints.java.traceFilename" value="${workspace_loc}/${launch_config_name}_${launch_timestamp}.log"/>
<booleanAttribute key="com.ibm.debug.breakpoints.java.traceToConsole" value="true"/>
<booleanAttribute key="com.ibm.debug.breakpoints.java.traceToFile" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/org.eclipse.ice.client.rcp.application"/>
<booleanAttribute key="default" value="false"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value=""/>
<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
<mapEntry key="[debug]" value="org.eclipse.pde.ui.RuntimeWorkbench"/>
<mapEntry key="[run]" value="org.eclipse.pde.ui.RuntimeWorkbench"/>
</mapAttribute>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console -clean"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dorg.osgi.service.http.port=8080 -Dosgi.instance.area=@user.home/ICEFiles -DREFRESH_BUNDLES=FALSE -Dcom.sun.jersey.config.property.packages=org.eclipse.ice.core.iCore;"/>
<booleanAttribute key="pde.generated.config" value="false"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.ice.client.rcp.product"/>
<stringAttribute key="selected_target_plugins" value="com.google.gson@default:default,com.ibm.icu@default:default,com.jcraft.jsch@default:default,com.springsource.snakeyaml@default:default,com.sun.jersey@default:default,javax.annotation@default:default,javax.el@default:default,javax.inject@default:default,javax.servlet.jsp@default:default,javax.servlet@default:true,javax.ws.rs@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.batik.css@default:default,org.apache.batik.util.gui@default:default,org.apache.batik.util@default:default,org.apache.commons.codec@default:default,org.apache.commons.net@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.apache.log4j@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.apache.mina.core@default:default,org.apache.sshd.core@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.codehaus.jackson.core@default:default,org.codehaus.jackson.jaxrs@default:default,org.codehaus.jackson.mapper@default:default,org.eclipse.ant.core@default:default,org.eclipse.cdt.core.linux.x86_64@default:false,org.eclipse.cdt.core.linux@default:false,org.eclipse.cdt.core@default:default,org.eclipse.cdt.debug.core@default:default,org.eclipse.cdt.debug.ui@default:default,org.eclipse.cdt.launch@default:default,org.eclipse.cdt.make.core@default:default,org.eclipse.cdt.managedbuilder.core@default:default,org.eclipse.cdt.ui@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.debug.core@default:default,org.eclipse.debug.ui@default:default,org.eclipse.draw2d@default:default,org.eclipse.dstore.core@default:default,org.eclipse.dstore.extra@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.console.jaas.fragment@default:false,org.eclipse.equinox.console.ssh@default:default,org.eclipse.equinox.console@default:default,org.eclipse.equinox.ds@2:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.http.jetty@6:true,org.eclipse.equinox.http.registry@default:true,org.eclipse.equinox.http.servlet@default:true,org.eclipse.equinox.launcher.gtk.linux.x86_64@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security@default:default,org.eclipse.equinox.servletbridge@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.transforms.hook@default:false,org.eclipse.equinox.util@default:default,org.eclipse.equinox.weaving.hook@default:false,org.eclipse.gef@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.jdt.core@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.jem.util@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.jsch.core@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.nebula.visualization.widgets@default:default,org.eclipse.nebula.visualization.xygraph@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.eclipse.platform@default:default,org.eclipse.ptp.aix@default:false,org.eclipse.ptp.cdt.compilers.core@default:default,org.eclipse.ptp.core@default:default,org.eclipse.ptp.debug.core@default:default,org.eclipse.ptp.debug.ui@default:default,org.eclipse.ptp.doc.user@default:default,org.eclipse.ptp.ems.core@default:default,org.eclipse.ptp.ems.ui@default:default,org.eclipse.ptp.launch@default:default,org.eclipse.ptp.linux@default:false,org.eclipse.ptp.macosx@default:false,org.eclipse.ptp.proxy.protocol@default:default,org.eclipse.ptp.proxy@default:default,org.eclipse.ptp.remote.core@default:default,org.eclipse.ptp.remote.remotetools.core@default:default,org.eclipse.ptp.remote.remotetools.ui@default:default,org.eclipse.ptp.remote.server.core@default:default,org.eclipse.ptp.remote.ui@default:default,org.eclipse.ptp.remotetools.core@default:default,org.eclipse.ptp.remotetools.environment.core@default:default,org.eclipse.ptp.remotetools.environment.generichost@default:default,org.eclipse.ptp.remotetools.environment.ui@default:default,org.eclipse.ptp.remotetools.preferences@default:default,org.eclipse.ptp.remotetools.utils@default:default,org.eclipse.ptp.rm.jaxb.configs@default:default,org.eclipse.ptp.rm.jaxb.contrib@default:default,org.eclipse.ptp.rm.jaxb.control.core@default:default,org.eclipse.ptp.rm.jaxb.control.ui@default:default,org.eclipse.ptp.rm.jaxb.core@default:default,org.eclipse.ptp.rm.jaxb.doc.user@default:default,org.eclipse.ptp.rm.jaxb.ui@default:default,org.eclipse.ptp.rm.lml.core@default:default,org.eclipse.ptp.rm.lml.da.server@default:default,org.eclipse.ptp.rm.lml.da@default:default,org.eclipse.ptp.rm.lml.monitor.core@default:default,org.eclipse.ptp.rm.lml.ui@default:default,org.eclipse.ptp.services.core@default:default,org.eclipse.ptp.services.ui@default:default,org.eclipse.ptp.ui@default:default,org.eclipse.ptp.utils@default:default,org.eclipse.ptp@default:default,org.eclipse.rcp@default:default,org.eclipse.rse.connectorservice.dstore@default:default,org.eclipse.rse.connectorservice.local@default:default,org.eclipse.rse.connectorservice.ssh@default:default,org.eclipse.rse.connectorservice.telnet@default:default,org.eclipse.rse.core@default:default,org.eclipse.rse.dstore.security@default:default,org.eclipse.rse.efs@default:default,org.eclipse.rse.files.ui@default:default,org.eclipse.rse.importexport@default:default,org.eclipse.rse.services.dstore@default:default,org.eclipse.rse.services.files.ftp@default:default,org.eclipse.rse.services.local@default:default,org.eclipse.rse.services.ssh@default:default,org.eclipse.rse.services.telnet@default:default,org.eclipse.rse.services@default:default,org.eclipse.rse.subsystems.files.core@default:default,org.eclipse.rse.subsystems.shells.core@default:default,org.eclipse.rse.ui@default:default,org.eclipse.sdk@default:default,org.eclipse.search@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.console@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.trace@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.update.configurator@3:true,org.eclipse.wst.common.core@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.wst.common.frameworks.ui@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.wst.common.ui@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.wst.sse.ui@default:default,org.eclipse.wst.validation.ui@default:default,org.eclipse.wst.validation@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.wst.xml.ui@default:default,org.eclipse.wst.xsd.core@default:default,org.eclipse.wst.xsd.ui@default:default,org.eclipse.xsd.edit@default:default,org.eclipse.xsd@default:default,org.hamcrest.core@default:default,org.junit@default:default,org.objectweb.asm@default:default,org.slf4j.api@default:default,org.w3c.css.sac@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="gov.lbnl.visit.swt@default:default,org.eclipse.ice.analysistool@default:true,org.eclipse.ice.caebat@default:true,org.eclipse.ice.client.compatibility@default:true,org.eclipse.ice.client.rcp@default:true,org.eclipse.ice.client.widgets.moose@default:true,org.eclipse.ice.client.widgets.rcp@default:false,org.eclipse.ice.client.widgets.reactoreditor.grid@default:true,org.eclipse.ice.client.widgets.reactoreditor.lwr@default:true,org.eclipse.ice.client.widgets.reactoreditor.sfr@default:true,org.eclipse.ice.client.widgets.reactoreditor@default:true,org.eclipse.ice.client.widgets@default:true,org.eclipse.ice.client@default:true,org.eclipse.ice.core@5:true,org.eclipse.ice.datastructures@default:default,org.eclipse.ice.io@default:true,org.eclipse.ice.item@default:true,org.eclipse.ice.kdd@default:true,org.eclipse.ice.mesh@default:true,org.eclipse.ice.nek5000@default:true,org.eclipse.ice.persistence.xml@5:true,org.eclipse.ice.proteus@default:true,org.eclipse.ice.reactor.perspective@default:true,org.eclipse.ice.reactor.plant@default:true,org.eclipse.ice.reactor.sfr@default:default,org.eclipse.ice.reactor@default:default,org.eclipse.ice.reactorAnalyzer.test@default:false,org.eclipse.ice.reactorAnalyzer@default:true,org.eclipse.ice.reflectivity@default:true,org.eclipse.ice.viz@default:true,org.eclipse.ice.xolotl@default:true"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="timestamp" value="1346254209051"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
<booleanAttribute key="useDefaultConfigArea" value="true"/>
<booleanAttribute key="useProduct" value="true"/>
<booleanAttribute key="usefeatures" value="false"/>
</launchConfiguration>
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<!-- RCP Entry point -->
<!-- <extension
id="application"
point="org.eclipse.core.runtime.applications">
<application>
<run
class="org.eclipse.ice.client.rcp.EclipseClient">
</run>
</application>
</extension> -->
<extension
id="product"
point="org.eclipse.core.runtime.products">
<product
application="org.eclipse.ui.ide.workbench"
description="The Eclipse Integrated Computational Environment"
name="ICE">
<property
name="appName"
value="ICE">
</property>
<property name="preferenceCustomization" value="plugin_customization.ini"/>
<!-- <property
name="applicationXMI"
value="org.eclipse.platform/LegacyIDE.e4xmi">
</property>
-->
<property
name="cssTheme"
value="org.eclipse.e4.ui.css.theme.e4_default">
</property>
</product>
</extension>
<extension
point="org.eclipse.ui.actionSets">
<actionSet
id="org.eclipse.ice.client.rcp.fileActionSet"
label="FileActionSet"
visible="true">
<menu
id="file"
label="&amp;FileMenu">
<separator
name="fileGroup">
</separator>
</menu>
<action
class="org.eclipse.ice.client.rcp.actions.SwitchWorkspaceActionDelegate"
id="org.eclipse.ice.client.rcp.actions.SwitchWorkspaceAction"
label="&amp;Switch Workspace"
menubarPath="File/"
tooltip="Switch to a new Workspace location...">
</action>
</actionSet>
</extension>
</plugin>
/*******************************************************************************
* Copyright (c) 2011, 2014 UT-Battelle, LLC.
* 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:
* Initial API and implementation and/or initial documentation - Jay Jay Billings,
* Jordan H. Deyton, Dasha Gorin, Alexander J. McCaskey, Taylor Patterson,
* Claire Saunders, Matthew Wang, Anna Wojtowicz
*******************************************************************************/
package org.eclipse.ice.client.rcp;
import java.net.URL;
import org.eclipse.ice.client.rcp.actions.ChooseWorkspaceDialog;
import org.eclipse.ice.iclient.IClient;
import org.eclipse.ice.iclient.uiwidgets.IWidgetFactory;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.util.BundleUtility;
import org.osgi.framework.Bundle;
import org.osgi.framework.FrameworkUtil;
/**
* This class controls all aspects of the application's execution
*/
public class EclipseClient implements IApplication {
/**
* A reference to the SWT display.
*/
private Display display;
/**
* A reference to the EclipseUIWidgetFactory that creates Eclipse widgets
* for the Client.
*/
private IWidgetFactory widgetFactory;
/**
* A reference to the IClient used by the application
*/
private static IClient client;
/*
* (non-Javadoc)
*
* @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.
* IApplicationContext)
*/
public Object start(IApplicationContext context) throws Exception {
// Local Declarations
String separator = System.getProperty("file.separator");
// Create the display
display = PlatformUI.createDisplay();
try {
// Create and run the workbench
int returnCode = PlatformUI.createAndRunWorkbench(display,
new EclipseClientWorkbenchAdvisor());
// Figure out which return code needs to be set
if (returnCode == PlatformUI.RETURN_RESTART) {
return IApplication.EXIT_RESTART;
} else {
return IApplication.EXIT_OK;
}
} finally {
// Kill the display
display.dispose();
}
}
/**
* (non-Javadoc)
*
* @see org.eclipse.equinox.app.IApplication#stop()
*/
public void stop() {
if (!PlatformUI.isWorkbenchRunning()) {
return;
}
final IWorkbench workbench = PlatformUI.getWorkbench();
final Display display = workbench.getDisplay();
display.syncExec(new Runnable() {
public void run() {
if (!display.isDisposed()) {
workbench.close();
}
}
});
}
/**
* Prompt the user for a new workspace location, or set the workspace
* location as the last directory the user set.
*/
private String showWorkspaceDialog(String defaultWorkspaceLoc)
throws Exception {
// Local Declarations
String workspaceLoc = defaultWorkspaceLoc;
// Get whether the user selected the remember checkbox last time ICE
// was run
boolean remembered = ChooseWorkspaceDialog.isRemembered();
// Get the last workspace selected
String lastUsedWS = ChooseWorkspaceDialog.getLastWorkspace();
workspaceLoc = lastUsedWS;
// If remember was true but the last workspace is invalid, we should set
// remembered to false so we can ask the user for a new workspace
if (remembered && (lastUsedWS == null || lastUsedWS.length() == 0)) {
remembered = false;
}
// If there is no workspace remembered...
if (!remembered) {
// Open a choose workspace dialog, false indicates its not a switch
// workspace dialog
// but instead the default initial one
// Get workspace dialog icon in a user file system agnostic manner
Bundle bundle = FrameworkUtil.getBundle(getClass());
URL fullPath = BundleUtility.find(bundle,
"icons/iceLogo_small_20110729.png");
ImageDescriptor descriptor = ImageDescriptor
.createFromURL(fullPath);
Image icon = descriptor.createImage();
ChooseWorkspaceDialog dialog = new ChooseWorkspaceDialog(false,
icon);
// Open it and get the integer indicating whether user selected ok
// or cancel
int click = dialog.open();
// if cancel...
if (click == Window.CANCEL) {
// Close the workbench and exit the application
try {
PlatformUI.getWorkbench().close();
} catch (Exception e) {
e.printStackTrace();
}
System.exit(0);
} else { // If they selected ok...
// Change the applications workspace location to the
// selected workspace directory
workspaceLoc = dialog.getWorkspacePath();
}
}
return workspaceLoc;
}
}
/*******************************************************************************
* Copyright (c) 2012, 2014 UT-Battelle, LLC.
* 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:
* Initial API and implementation and/or initial documentation - Jay Jay Billings,
* Jordan H. Deyton, Dasha Gorin, Alexander J. McCaskey, Taylor Patterson,
* Claire Saunders, Matthew Wang, Anna Wojtowicz
*******************************************************************************/
package org.eclipse.ice.client.rcp.actions;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.prefs.Preferences;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.DirectoryDialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
public class ChooseWorkspaceDialog extends TitleAreaDialog {
// Preference Keys needed
private static final String key_workspaceRootDir = "WSRoot";
private static final String key_rememberWS = "WSRemember";
private static final String key_lastUsedWorkspaces = "WSLastUsed";
// Preference Store
private static Preferences prefs = Preferences
.userNodeForPackage(ChooseWorkspaceDialog.class);
// Dialog Messages
private static final String message = "Your workspace is where project settings and important files will be stored.";
private static final String info = "Please select a directory that will be your workspace.";
private static final String error = "You must set a directory.";
// Widgets needed
private Combo wsPath;
private Button rememberButton;
private Composite comp;
// List of previous workspaces
private List<String> lastUsed;
// Eventual User response, the desired workspace
private String workspaceDirectoryPath;
private String reason;
// The number of last selected workspaces in the Combo box
private static final int MaxHistory = 5;
// Boolean to indicate whether we are setting an initial workspace
// or switching from a current one.
private boolean switchWorkspace;
// The Constructor
public ChooseWorkspaceDialog(boolean switchWS, Image image) {
super(Display.getDefault().getActiveShell());
this.switchWorkspace = switchWS;
if (image != null) {
this.setTitleImage(image);
}
}
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
// Set different shell titles depending on whether we are
// creating a new workspace or switching from a current one
if (switchWorkspace) {
newShell.setText("Switch Workspace");
} else {
newShell.setText("Workspace Selection");
}
}
// Returns users selection in the "Remember Workspace" check box
public static boolean isRemembered() {
return prefs.getBoolean(key_rememberWS, false);
}
public void setRemembered(boolean value) {
prefs.putBoolean(key_rememberWS, value);
return;
}
// Returns the most recent set workspace directory
public static String getLastWorkspace() {
return prefs.get(key_lastUsedWorkspaces, null);
}
@Override
// Creates the SWT widgets needed to get user information
protected Control createDialogArea(Composite parent) {
// Set the title and message of this TitleAreaDialog
this.setTitle("Pick a Workspace");
this.setMessage(message);
// Create the underlying composite
comp = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
// Give it 3 columns and allow the widgets to fill available horizontal
// space
layout.numColumns = 3;
GridData data = new GridData(GridData.FILL_HORIZONTAL
| GridData.GRAB_HORIZONTAL | GridData.FILL_VERTICAL
| GridData.VERTICAL_ALIGN_END);
// Set the composites layout and layout data
comp.setLayout(layout);
comp.setLayoutData(data);
// Create a workspace label
CLabel wsLabel = new CLabel(comp, SWT.NONE);
wsLabel.setText("Workspace Root Path");
// Create the workspace combo box, it lists the selected workspace
// and any previous workspaces
wsPath = new Combo(comp, SWT.BORDER);
// Get what default directory should be in the box upon opening
String wsRoot = prefs.get(key_workspaceRootDir, "");
if (wsRoot == null || wsRoot.length() == 0) {
wsRoot = getWorkspaceSuggestion();
}
wsPath.setText(wsRoot == null ? "" : wsRoot);
wsPath.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
| GridData.GRAB_HORIZONTAL));
// Create the browse button as a SWT.Push variety
Button browseButton = new Button(comp, SWT.PUSH);
browseButton.setText("Browse");
// Add an event listener that displays a Directory Dialog prompt
browseButton.addListener(SWT.Selection, new Listener() {
@Override
public void handleEvent(Event event) {
// Create the DirectoryDialog and set its text and info
DirectoryDialog dialog = new DirectoryDialog(new Shell(Display
.getCurrent()));
dialog.setText("Select Workspace Directory");
dialog.setMessage(info);
dialog.setFilterPath(wsPath.getText());
// Open the dialog and get the user's selection
String userSelection = dialog.open();
// Check the selections validity
if (userSelection == null && wsPath.getText().length() == 0) {
setMessage(error, IMessageProvider.ERROR);
} else {
// If valid set the selection in the combo box
setMessage(message);
wsPath.setText(userSelection);
}
}
});
// Create a remember workspace check button
rememberButton = new Button(comp, SWT.CHECK);
rememberButton.setText("Remember Workspace");
rememberButton.setSelection(prefs.getBoolean(key_rememberWS, false));
// Populate the list of previous workspace selections for the combo box
String lastUsedWS = prefs.get(key_lastUsedWorkspaces, "");
lastUsed = new ArrayList<String>();