- fixed tests

- added missing functions
- added launch configs
This commit is contained in:
Eyck Jentzsch 2015-10-24 23:15:07 +02:00
parent c8e98b3d60
commit 31af3b4c94
21 changed files with 366 additions and 166 deletions

View File

@ -1,12 +1,12 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2015 MINRES Technologies GmbH and others. * Copyright (c) 2011 Google, Inc.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* MINRES Technologies GmbH - initial API and implementation * Google, Inc. - initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.wb.swt; package org.eclipse.wb.swt;

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
<booleanAttribute key="append.args" value="true"/>
<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
<booleanAttribute key="askclear" value="false"/>
<booleanAttribute key="automaticAdd" value="true"/>
<booleanAttribute key="automaticValidate" value="false"/>
<stringAttribute key="bootstrap" value=""/>
<stringAttribute key="checked" value="[NONE]"/>
<booleanAttribute key="clearConfig" value="true"/>
<booleanAttribute key="clearws" value="true"/>
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
<booleanAttribute key="default" value="false"/>
<stringAttribute key="deselected_workspace_plugins" value="com.minres.scviewer.database.swt,com.minres.scviewer.e4.application,com.minres.scviewer.ui"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/com.minres.scviewer.database.test/src/com/minres/scviewer/database/test/DatabaseServicesTest.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<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.MAIN_TYPE" value="com.minres.scviewer.database.test.DatabaseServicesTest"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.minres.scviewer.database.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="com.minres.scviewer.e4.product"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
<stringAttribute key="selected_target_plugins" value="com.google.guava*10.0.1.v201203051515@default:default,com.google.guava*15.0.0.v201403281430@default:default,com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet*3.0.0.v201112011016@default:default,javax.servlet*3.1.0.v201410161800@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.jxpath@default:default,org.apache.commons.logging@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.codehaus.groovy*2.4.3.xx-201508121448-e45@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@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.filesystem.java7@default:false,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@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.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.annotations@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.emf.xpath@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.cocoa@default:false,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.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.console@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface@default:default,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.ui.trace@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.hamcrest.core@default:default,org.junit@default:default,org.mozilla.javascript@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="com.minres.scviewer.database.sqlite@default:true,com.minres.scviewer.database.test@default:default,com.minres.scviewer.database.text@default:true,com.minres.scviewer.database.vcd@default:default,com.minres.scviewer.database@default:true"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
<booleanAttribute key="useDefaultConfigArea" value="false"/>
<booleanAttribute key="useProduct" value="false"/>
</launchConfiguration>

View File

@ -11,3 +11,4 @@ Require-Bundle: org.junit,
com.minres.scviewer.database.text;bundle-version="1.0.0", com.minres.scviewer.database.text;bundle-version="1.0.0",
com.minres.scviewer.database.vcd;bundle-version="1.0.0" com.minres.scviewer.database.vcd;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy
Service-Component: OSGI-INF/component.xml

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="com.minres.scviewer.database.test">
<implementation class="com.minres.scviewer.database.test.DatabaseServicesTest"/>
<reference bind="setFactory" cardinality="1..1" interface="com.minres.scviewer.database.IWaveformDbFactory" name="IWaveformDbFactory" policy="static" unbind="unsetFactory"/>
</scr:component>

View File

@ -1,13 +1,4 @@
###############################################################################
# Copyright (c) 2014, 2015 MINRES Technologies GmbH 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:
# MINRES Technologies GmbH - initial API and implementation
###############################################################################
bin.includes = META-INF/,\ bin.includes = META-INF/,\
. .,\
OSGI-INF/component.xml
source.. = src/ source.. = src/

View File

@ -21,19 +21,35 @@ import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import com.minres.scviewer.database.IWaveformDb; import com.minres.scviewer.database.IWaveformDb;
import com.minres.scviewer.database.internal.WaveformDb; import com.minres.scviewer.database.IWaveformDbFactory;
public class DatabaseServicesTest { public class DatabaseServicesTest {
private static IWaveformDbFactory waveformDbFactory;
private IWaveformDb waveformDb;
public synchronized void setFactory(IWaveformDbFactory service) {
waveformDbFactory = service;
}
public synchronized void unsetFactory(IWaveformDbFactory service) {
if (waveformDbFactory == service) {
waveformDbFactory = null;
}
}
@Before @Before
public void setUp() throws Exception { public void setUp() throws Exception {
waveformDb=waveformDbFactory.getDatabase();
// Wait for OSGi dependencies // Wait for OSGi dependencies
for (int i = 0; i < 10; i++) { // for (int i = 0; i < 10; i++) {
if (WaveformDb.getLoaders().size() == 3) // Dependencies fulfilled // if (waveformDb.size() == 3) // Dependencies fulfilled
return; // return;
Thread.sleep(1000); // Thread.sleep(1000);
} // }
assertEquals("OSGi dependencies unfulfilled", 3, WaveformDb.getLoaders().size()); // assertEquals("OSGi dependencies unfulfilled", 3, WaveformDb.getLoaders().size());
} }
@After @After
@ -44,33 +60,30 @@ public class DatabaseServicesTest {
public void testVCD() throws Exception { public void testVCD() throws Exception {
File f = new File("inputs/my_db.vcd").getAbsoluteFile(); File f = new File("inputs/my_db.vcd").getAbsoluteFile();
assertTrue(f.exists()); assertTrue(f.exists());
IWaveformDb database=new WaveformDb(); waveformDb.load(f);
database.load(f); assertNotNull(waveformDb);
assertNotNull(database); assertEquals(14, waveformDb.getAllWaves().size());
assertEquals(14, database.getAllWaves().size()); assertEquals(2, waveformDb.getChildNodes().size());
assertEquals(2, database.getChildNodes().size());
} }
@Test @Test
public void testTxSQLite() throws Exception { public void testTxSQLite() throws Exception {
File f = new File("inputs/my_db.txdb").getAbsoluteFile(); File f = new File("inputs/my_db.txdb").getAbsoluteFile();
assertTrue(f.exists()); assertTrue(f.exists());
IWaveformDb database=new WaveformDb(); waveformDb.load(f);
database.load(f); assertNotNull(waveformDb);
assertNotNull(database); assertEquals(3, waveformDb.getAllWaves().size());
assertEquals(3, database.getAllWaves().size()); assertEquals(1, waveformDb.getChildNodes().size());
assertEquals(1, database.getChildNodes().size());
} }
@Test @Test
public void testTxText() throws Exception { public void testTxText() throws Exception {
File f = new File("inputs/my_db.txlog").getAbsoluteFile(); File f = new File("inputs/my_db.txlog").getAbsoluteFile();
assertTrue(f.exists()); assertTrue(f.exists());
IWaveformDb database=new WaveformDb(); waveformDb.load(f);
database.load(f); assertNotNull(waveformDb);
assertNotNull(database); assertEquals(3, waveformDb.getAllWaves().size());
assertEquals(3, database.getAllWaves().size()); assertEquals(1, waveformDb.getChildNodes().size());
assertEquals(1, database.getChildNodes().size());
} }

View File

@ -98,15 +98,13 @@
</children> </children>
</trimBars> </trimBars>
<trimBars xmi:id="_JHMt8HS8EeWBq8z1Dv39LA" elementId="org.eclipse.ui.trim.status" side="Bottom"> <trimBars xmi:id="_JHMt8HS8EeWBq8z1Dv39LA" elementId="org.eclipse.ui.trim.status" side="Bottom">
<persistedState key="height" value="50"/> <children xsi:type="menu:ToolControl" xmi:id="_YsBi8HfLEeWwZ-9vrAR2UQ" elementId="org.eclipse.ui.StatusLine" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.internal.WaveStatusBarControl">
<children xsi:type="menu:ToolControl" xmi:id="_YsBi8HfLEeWwZ-9vrAR2UQ" elementId="org.eclipse.ui.StatusLine" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.internal.WaveStatusBarControl"/> <tags>stretch</tags>
<children xsi:type="menu:ToolControl" xmi:id="_76uUAF9tEeO-yojH_y4TJA" elementId="Spacer Glue" contributionURI="bundleclass://org.eclipse.e4.ui.workbench.renderers.swt/org.eclipse.e4.ui.workbench.renderers.swt.LayoutModifierToolControl">
<tags>glue</tags>
<tags>move_after:PerspectiveSpacer</tags>
<tags>SHOW_RESTORE_MENU</tags>
</children> </children>
<children xsi:type="menu:ToolControl" xmi:id="_VZzJMHdHEeWwZ-9vrAR2UQ" elementId="org.eclipse.ui.HeapStatus" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.internal.StatusBarControl"/> <children xsi:type="menu:ToolControl" xmi:id="_VZzJMHdHEeWwZ-9vrAR2UQ" elementId="org.eclipse.ui.HeapStatus" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.internal.StatusBarControl"/>
<children xsi:type="menu:ToolControl" xmi:id="_y0ZS0HfzEeWwZ-9vrAR2UQ" elementId="org.eclipse.ui.ProgressBar" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.internal.StatusBarControl"/> <children xsi:type="menu:ToolControl" xmi:id="_y0ZS0HfzEeWwZ-9vrAR2UQ" elementId="org.eclipse.ui.ProgressBar" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.internal.StatusBarControl">
<tags>Draggable</tags>
</children>
</trimBars> </trimBars>
</children> </children>
<handlers xmi:id="_95PfvXNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.handler.quitCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.QuitHandler" command="_95PfvHNmEeWBq8z1Dv39LA"/> <handlers xmi:id="_95PfvXNmEeWBq8z1Dv39LA" elementId="com.minres.scviewer.e4.application.handler.quitCommand" contributionURI="bundleclass://com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.handlers.QuitHandler" command="_95PfvHNmEeWBq8z1Dv39LA"/>

View File

@ -23,7 +23,8 @@ Require-Bundle: javax.inject;bundle-version="1.0.0",
org.eclipse.osgi.services;bundle-version="3.5.0", org.eclipse.osgi.services;bundle-version="3.5.0",
org.eclipse.core.jobs, org.eclipse.core.jobs,
org.eclipse.osgi, org.eclipse.osgi,
com.google.guava com.google.guava,
org.eclipse.equinox.preferences
Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Import-Package: com.minres.scviewer.database, Import-Package: com.minres.scviewer.database,
javax.inject;version="1.0.0" javax.inject;version="1.0.0"

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -33,6 +33,7 @@ import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.Menu;
import org.eclipse.wb.swt.ResourceManager; import org.eclipse.wb.swt.ResourceManager;
import org.osgi.service.prefs.Preferences;
/** /**
* The Heap Status control, which shows the heap usage statistics in the window trim. * The Heap Status control, which shows the heap usage statistics in the window trim.
@ -46,7 +47,7 @@ public class HeapStatus extends Composite {
private Image disabledGcImage; private Image disabledGcImage;
private Color bgCol, usedMemCol, lowMemCol, freeMemCol, topLeftCol, bottomRightCol, sepCol, textCol, markCol, armCol; private Color bgCol, usedMemCol, lowMemCol, freeMemCol, topLeftCol, bottomRightCol, sepCol, textCol, markCol, armCol;
private Canvas button; private Canvas button;
private IEclipsePreferences prefStore; private Preferences preferences;
private int updateInterval; private int updateInterval;
private boolean showMax; private boolean showMax;
private long totalMem; private long totalMem;
@ -86,10 +87,10 @@ public class HeapStatus extends Composite {
@Override @Override
public void preferenceChange(PreferenceChangeEvent event) { public void preferenceChange(PreferenceChangeEvent event) {
if (IHeapStatusConstants.PREF_UPDATE_INTERVAL.equals(event.getKey())) { if (IHeapStatusConstants.PREF_UPDATE_INTERVAL.equals(event.getKey())) {
setUpdateIntervalInMS(prefStore.getInt(IHeapStatusConstants.PREF_UPDATE_INTERVAL, 100)); setUpdateIntervalInMS(preferences.getInt(IHeapStatusConstants.PREF_UPDATE_INTERVAL, 100));
} }
else if (IHeapStatusConstants.PREF_SHOW_MAX.equals(event.getKey())) { else if (IHeapStatusConstants.PREF_SHOW_MAX.equals(event.getKey())) {
showMax = prefStore.getBoolean(IHeapStatusConstants.PREF_SHOW_MAX, true); showMax = preferences.getBoolean(IHeapStatusConstants.PREF_SHOW_MAX, true);
} }
} }
@ -103,14 +104,15 @@ public class HeapStatus extends Composite {
* @param parent the parent composite * @param parent the parent composite
* @param preferences the preference store * @param preferences the preference store
*/ */
public HeapStatus(Composite parent, IEclipsePreferences preferences) { public HeapStatus(Composite parent, Preferences preferences) {
super(parent, SWT.NONE); super(parent, SWT.NONE);
maxMem = getMaxMem(); maxMem = getMaxMem();
maxMemKnown = maxMem != Long.MAX_VALUE; maxMemKnown = maxMem != Long.MAX_VALUE;
this.prefStore = preferences; this.preferences = preferences;
preferences.addPreferenceChangeListener(prefListener); if(this.preferences instanceof IEclipsePreferences)
((IEclipsePreferences)this.preferences).addPreferenceChangeListener(prefListener);
setUpdateIntervalInMS(preferences.getInt(IHeapStatusConstants.PREF_UPDATE_INTERVAL, 100)); setUpdateIntervalInMS(preferences.getInt(IHeapStatusConstants.PREF_UPDATE_INTERVAL, 100));
showMax = preferences.getBoolean(IHeapStatusConstants.PREF_SHOW_MAX, true); showMax = preferences.getBoolean(IHeapStatusConstants.PREF_SHOW_MAX, true);
@ -263,7 +265,8 @@ public class HeapStatus extends Composite {
} }
private void doDispose() { private void doDispose() {
prefStore.removePreferenceChangeListener(prefListener); if(preferences instanceof IEclipsePreferences)
((IEclipsePreferences)preferences).removePreferenceChangeListener(prefListener);
if (gcImage != null) { if (gcImage != null) {
gcImage.dispose(); gcImage.dispose();
} }
@ -591,7 +594,7 @@ public class HeapStatus extends Composite {
@Override @Override
public void run() { public void run() {
prefStore.putBoolean(IHeapStatusConstants.PREF_SHOW_MAX, isChecked()); preferences.putBoolean(IHeapStatusConstants.PREF_SHOW_MAX, isChecked());
redraw(); redraw();
} }
} }

View File

@ -14,20 +14,23 @@ import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy; import javax.annotation.PreDestroy;
import javax.inject.Inject; import javax.inject.Inject;
import org.eclipse.core.internal.preferences.BundleDefaultPreferences;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.jobs.IJobChangeEvent; import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.Job; import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.jobs.JobChangeAdapter; import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.core.runtime.jobs.ProgressProvider; import org.eclipse.core.runtime.jobs.ProgressProvider;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.e4.core.di.annotations.Optional; import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.ui.di.UIEventTopic; import org.eclipse.e4.ui.di.UIEventTopic;
import org.eclipse.e4.ui.di.UISynchronize; import org.eclipse.e4.ui.di.UISynchronize;
import org.eclipse.e4.ui.model.application.ui.menu.MToolControl; import org.eclipse.e4.ui.model.application.ui.menu.MToolControl;
import org.eclipse.e4.ui.workbench.modeling.EModelService; import org.eclipse.e4.ui.workbench.modeling.EModelService;
import org.eclipse.jface.action.StatusLineManager; import org.eclipse.jface.action.StatusLineManager;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.ProgressBar;
import org.osgi.service.prefs.PreferencesService;
public class StatusBarControl { public class StatusBarControl {
@ -36,12 +39,15 @@ public class StatusBarControl {
public static final String CURSOR_TIME="CursorPosUpdate"; public static final String CURSOR_TIME="CursorPosUpdate";
@Inject EModelService modelService; @Inject EModelService modelService;
@Inject @Optional IEclipsePreferences preferences;
@Inject @Optional PreferencesService osgiPreverences;
private final UISynchronize sync; private final UISynchronize sync;
protected StatusLineManager manager; protected StatusLineManager manager;
private SyncedProgressMonitor monitor; private SyncedProgressMonitor monitor;
private ProgressBar progressBar;
@Inject @Inject
public StatusBarControl(UISynchronize sync) { public StatusBarControl(UISynchronize sync) {
@ -74,8 +80,11 @@ public class StatusBarControl {
* @param toolControl * @param toolControl
*/ */
private void createProgressBar(Composite parent, MToolControl toolControl) { private void createProgressBar(Composite parent, MToolControl toolControl) {
manager.createControl(parent); new Label(parent, SWT.NONE);
monitor=new SyncedProgressMonitor(manager.getProgressMonitor()); progressBar = new ProgressBar(parent, SWT.SMOOTH);
progressBar.setBounds(100, 10, 200, 20);
new Label(parent, SWT.NONE);
monitor=new SyncedProgressMonitor(progressBar);
Job.getJobManager().setProgressProvider(new ProgressProvider() { Job.getJobManager().setProgressProvider(new ProgressProvider() {
@Override @Override
public IProgressMonitor createMonitor(Job job) { public IProgressMonitor createMonitor(Job job) {
@ -89,12 +98,7 @@ public class StatusBarControl {
* @param toolControl * @param toolControl
*/ */
private void createHeapStatus(Composite parent, MToolControl toolControl) { private void createHeapStatus(Composite parent, MToolControl toolControl) {
if(preferences==null){ new HeapStatus(parent, osgiPreverences.getSystemPreferences());
preferences=new BundleDefaultPreferences();
preferences.putInt(IHeapStatusConstants.PREF_UPDATE_INTERVAL, 100);
preferences.putBoolean(IHeapStatusConstants.PREF_SHOW_MAX, true);
}
new HeapStatus(parent, preferences);
} }
/** /**
@ -113,26 +117,19 @@ public class StatusBarControl {
} }
} }
private final class SyncedProgressMonitor implements IProgressMonitor { private final class SyncedProgressMonitor extends NullProgressMonitor {
IProgressMonitor delegate; // thread-Safe via thread confinement of the UI-Thread
private boolean cancelled; // (means access only via UI-Thread)
private long runningTasks = 0L;
private ProgressBar progressBar;
SyncedProgressMonitor(IProgressMonitor delegate){ public SyncedProgressMonitor(ProgressBar progressBar) {
this.delegate=delegate; super();
} this.progressBar = progressBar;
runningTasks=0;
public IProgressMonitor addJob(Job job){ progressBar.setSelection(0);
if(job != null){ progressBar.setEnabled(false);
job.addJobChangeListener(new JobChangeAdapter() {
@Override
public void done(IJobChangeEvent event) {
// clean-up
event.getJob().removeJobChangeListener(this);
}
});
}
return this;
} }
@Override @Override
@ -140,7 +137,15 @@ public class StatusBarControl {
sync.syncExec(new Runnable() { sync.syncExec(new Runnable() {
@Override @Override
public void run() { public void run() {
delegate.beginTask(name, totalWork); if(runningTasks <= 0) { // --- no task is running at the moment ---
progressBar.setEnabled(false);
progressBar.setSelection(0);
progressBar.setMaximum(totalWork);
} else { // --- other tasks are running ---
progressBar.setMaximum(progressBar.getMaximum() + totalWork);
}
runningTasks++;
progressBar.setToolTipText("Currently running: " + runningTasks + "\nLast task: " + name);
} }
}); });
} }
@ -150,7 +155,7 @@ public class StatusBarControl {
sync.syncExec(new Runnable() { sync.syncExec(new Runnable() {
@Override @Override
public void run() { public void run() {
delegate.worked(work); progressBar.setSelection(progressBar.getSelection() + work);
} }
}); });
} }
@ -160,21 +165,13 @@ public class StatusBarControl {
sync.syncExec(new Runnable() { sync.syncExec(new Runnable() {
@Override @Override
public void run() { public void run() {
delegate.done(); progressBar.setSelection(0);
progressBar.setMaximum(1);
progressBar.setEnabled(false);
} }
}); });
} }
/*
@Override
public void internalWorked(final double work) {
sync.syncExec(new Runnable() {
@Override
public void run() {
delegate.internalWorked(work);
}
});
}
@Override @Override
public boolean isCanceled() { public boolean isCanceled() {
sync.syncExec(new Runnable() { sync.syncExec(new Runnable() {
@ -195,25 +192,30 @@ public class StatusBarControl {
} }
}); });
} }
*/
public IProgressMonitor addJob(Job job){
if(job != null){
job.addJobChangeListener(new JobChangeAdapter() {
@Override
public void done(IJobChangeEvent event) {
sync.syncExec(new Runnable() {
@Override
public void setTaskName(final String name) {
sync.syncExec(new Runnable() {
@Override @Override
public void run() { public void run() {
delegate.setTaskName(name); runningTasks--;
if (runningTasks > 0){ // --- some tasks are still running ---
progressBar.setToolTipText("Currently running: " + runningTasks);
} else { // --- all tasks are done (a reset of selection could also be done) ---
progressBar.setToolTipText("No background progress running.");
}
}
});
// clean-up
event.getJob().removeJobChangeListener(this);
} }
}); });
} }
return this;
@Override
public void subTask(final String name) {
sync.syncExec(new Runnable() {
@Override
public void run() {
delegate.subTask(name);
}
});
} }
} }
} }

View File

@ -82,8 +82,8 @@ public class WaveStatusBarControl extends StatusBarControl {
super(sync); super(sync);
zoomContribution = new TextContributionItem("Z:", 150); zoomContribution = new TextContributionItem("Z:", 150);
cursorContribution = new TextContributionItem("C:", 120); cursorContribution = new TextContributionItem("C:", 120);
manager.appendToGroup(StatusLineManager.BEGIN_GROUP,cursorContribution); manager.prependToGroup(StatusLineManager.BEGIN_GROUP,cursorContribution);
manager.appendToGroup(StatusLineManager.MIDDLE_GROUP, zoomContribution); manager.appendToGroup(StatusLineManager.BEGIN_GROUP, zoomContribution);
} }
@Inject @Inject

View File

@ -10,6 +10,8 @@
*******************************************************************************/ *******************************************************************************/
package com.minres.scviewer.e4.application.parts; package com.minres.scviewer.e4.application.parts;
import java.util.Arrays;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Named; import javax.inject.Named;
@ -18,10 +20,13 @@ import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.core.services.events.IEventBroker; import org.eclipse.e4.core.services.events.IEventBroker;
import org.eclipse.e4.ui.di.Focus; import org.eclipse.e4.ui.di.Focus;
import org.eclipse.e4.ui.di.UIEventTopic; import org.eclipse.e4.ui.di.UIEventTopic;
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
import org.eclipse.e4.ui.services.IServiceConstants; import org.eclipse.e4.ui.services.IServiceConstants;
import org.eclipse.e4.ui.workbench.modeling.EPartService;
import org.eclipse.e4.ui.workbench.modeling.ESelectionService; import org.eclipse.e4.ui.workbench.modeling.ESelectionService;
import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.TableViewer;
@ -53,8 +58,9 @@ public class WaveformListPart implements ISelectionChangedListener {
private Text nameFilter; private Text nameFilter;
private TableViewer txTableViewer; private TableViewer txTableViewer;
ToolItem appendItem, insertItem; ToolItem appendItem, insertItem, insertAllItem, appendAllItem;
WaveformAttributeFilter attributeFilter; WaveformAttributeFilter attributeFilter;
int thisSelectionCount=0, otherSelectionCount=0;
@PostConstruct @PostConstruct
public void createComposite(Composite parent) { public void createComposite(Composite parent) {
@ -66,6 +72,7 @@ public class WaveformListPart implements ISelectionChangedListener {
@Override @Override
public void modifyText(ModifyEvent e) { public void modifyText(ModifyEvent e) {
attributeFilter.setSearchText(((Text) e.widget).getText()); attributeFilter.setSearchText(((Text) e.widget).getText());
updateButtons();
txTableViewer.refresh(); txTableViewer.refresh();
} }
}); });
@ -84,9 +91,22 @@ public class WaveformListPart implements ISelectionChangedListener {
toolBar.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1)); toolBar.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
toolBar.setBounds(0, 0, 87, 20); toolBar.setBounds(0, 0, 87, 20);
appendItem = new ToolItem(toolBar, SWT.NONE);
appendItem.setToolTipText("Append selected");
appendItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/append_wave.png"));
appendItem.setEnabled(false);
appendItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
eventBroker.post(WaveformViewerPart.ADD_WAVEFORM,
((IStructuredSelection)txTableViewer.getSelection()).toList());
}
});
insertItem = new ToolItem(toolBar, SWT.NONE); insertItem = new ToolItem(toolBar, SWT.NONE);
insertItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/bullet_plus.png")); insertItem.setToolTipText("Insert selected");
insertItem.setText("Insert"); insertItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/insert_wave.png"));
insertItem.setEnabled(false); insertItem.setEnabled(false);
insertItem.addSelectionListener(new SelectionAdapter() { insertItem.addSelectionListener(new SelectionAdapter() {
@Override @Override
@ -96,15 +116,33 @@ public class WaveformListPart implements ISelectionChangedListener {
} }
}); });
appendItem = new ToolItem(toolBar, SWT.NONE); new ToolItem(toolBar, SWT.SEPARATOR);
appendItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/bullet_plus.png"));
appendItem.setText("Append"); appendAllItem = new ToolItem(toolBar, SWT.NONE);
appendItem.setEnabled(false); appendAllItem.setToolTipText("Append all");
appendItem.addSelectionListener(new SelectionAdapter() { appendAllItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/append_all_waves.png"));
appendAllItem.setEnabled(false);
new ToolItem(toolBar, SWT.SEPARATOR);
appendAllItem.addSelectionListener(new SelectionAdapter() {
@Override @Override
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {
eventBroker.post(WaveformViewerPart.ADD_WAVEFORM, Object[] all = getFilteredChildren(txTableViewer);
((IStructuredSelection)txTableViewer.getSelection()).toList()); if(all.length>0)
eventBroker.post(WaveformViewerPart.ADD_WAVEFORM, Arrays.asList(all));
}
});
insertAllItem = new ToolItem(toolBar, SWT.NONE);
insertAllItem.setToolTipText("Insert all");
insertAllItem.setImage(ResourceManager.getPluginImage("com.minres.scviewer.e4.application", "icons/insert_all_waves.png"));
insertAllItem.setEnabled(false);
insertAllItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
Object[] all = getFilteredChildren(txTableViewer);
if(all.length>0)
eventBroker.post(WaveformViewerPart.ADD_WAVEFORM, Arrays.asList(all));
} }
}); });
@ -119,6 +157,7 @@ public class WaveformListPart implements ISelectionChangedListener {
@Inject @Optional @Inject @Optional
public void getStatusEvent(@UIEventTopic(WaveformViewerPart.ACTIVE_NODE) Object o) { public void getStatusEvent(@UIEventTopic(WaveformViewerPart.ACTIVE_NODE) Object o) {
txTableViewer.setInput(o); txTableViewer.setInput(o);
updateButtons();
} }
@Override @Override
@ -131,28 +170,34 @@ public class WaveformListPart implements ISelectionChangedListener {
switch(selection.size()){ switch(selection.size()){
case 0: case 0:
appendItem.setEnabled(false); appendItem.setEnabled(false);
insertItem.setEnabled(false);
break; break;
case 1: case 1:
selectionService.setSelection(selection.getFirstElement()); selectionService.setSelection(selection.getFirstElement());
appendItem.setEnabled(true);
break; break;
default: default:
selectionService.setSelection(selection.toList()); selectionService.setSelection(selection.toList());
appendItem.setEnabled(true);
break; break;
} }
thisSelectionCount=selection.toList().size();
updateButtons();
} }
@Inject @Inject
public void setSelection(@Named(IServiceConstants.ACTIVE_SELECTION) @Optional Object object){ public void setSelection(@Named(IServiceConstants.ACTIVE_SELECTION) @Optional Object object, EPartService partService){
if(txTableViewer!=null && !insertItem.isDisposed() && !appendItem.isDisposed()) MPart part = partService.getActivePart();
if(object instanceof ITx && appendItem.isEnabled()){ if(part!=null && part.getObject() != this)
insertItem.setEnabled(true); otherSelectionCount = (object instanceof IWaveform<?> || object instanceof ITx)?1:0;
} else if(object instanceof IWaveform<?> && appendItem.isEnabled()){ updateButtons();
insertItem.setEnabled(true); }
} else {
insertItem.setEnabled(false); private void updateButtons() {
if(txTableViewer!=null && !insertItem.isDisposed() && !appendItem.isDisposed() &&
!appendAllItem.isDisposed() && !insertAllItem.isDisposed()){
Object[] all = getFilteredChildren(txTableViewer);
appendItem.setEnabled(thisSelectionCount>0);
appendAllItem.setEnabled(all.length>0);
insertItem.setEnabled(thisSelectionCount>0 && otherSelectionCount>0);
insertAllItem.setEnabled(all.length>0 && otherSelectionCount>0);
} }
} }
@ -177,4 +222,27 @@ public class WaveformListPart implements ISelectionChangedListener {
} }
} }
protected Object[] getFilteredChildren(TableViewer viewer){
Object parent = viewer.getInput();
if(parent==null) return new Object[0];
Object[] result = null;
if (parent != null) {
IStructuredContentProvider cp = (IStructuredContentProvider) viewer.getContentProvider();
if (cp != null) {
result = cp.getElements(parent);
if(result==null) return new Object[0];
for (int i = 0, n = result.length; i < n; ++i) {
if(result[i]==null) return new Object[0];
}
}
}
ViewerFilter[] filters = viewer.getFilters();
if (filters != null) {
for (ViewerFilter f:filters) {
Object[] filteredResult = f.filter(viewer, parent, result);
result = filteredResult;
}
}
return result;
}
} }

View File

@ -18,6 +18,7 @@ import java.util.ArrayList;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
@ -155,9 +156,10 @@ public class WaveformViewerPart {
protected IStatus run( IProgressMonitor monitor) { protected IStatus run( IProgressMonitor monitor) {
// convert to SubMonitor and set total number of work units // convert to SubMonitor and set total number of work units
SubMonitor subMonitor = SubMonitor.convert(monitor, filesToLoad.size()); SubMonitor subMonitor = SubMonitor.convert(monitor, filesToLoad.size());
subMonitor.setTaskName("Loading database");
try { try {
for(File file: filesToLoad){ for(File file: filesToLoad){
// TimeUnit.SECONDS.sleep(20); TimeUnit.SECONDS.sleep(2);
database.load(file); database.load(file);
database.addPropertyChangeListener(txDisplay); database.addPropertyChangeListener(txDisplay);
subMonitor.worked(1); subMonitor.worked(1);
@ -169,6 +171,8 @@ public class WaveformViewerPart {
e.printStackTrace(); e.printStackTrace();
return Status.CANCEL_STATUS; return Status.CANCEL_STATUS;
} }
subMonitor.done();
monitor.done();
return Status.OK_STATUS; return Status.OK_STATUS;
} }
}; };
@ -271,7 +275,7 @@ public class WaveformViewerPart {
@Inject @Optional @Inject @Optional
public void getAddWaveformEvent(@UIEventTopic(WaveformViewerPart.ADD_WAVEFORM) Object o) { public void getAddWaveformEvent(@UIEventTopic(WaveformViewerPart.ADD_WAVEFORM) Object o) {
Object sel = selectionService.getSelection(); Object sel = o==null?selectionService.getSelection():o;
if(sel instanceof List<?>) if(sel instanceof List<?>)
for(Object el:((List<?>)sel)){ for(Object el:((List<?>)sel)){
if(el instanceof IWaveform<?>) if(el instanceof IWaveform<?>)

View File

@ -1,12 +1,12 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2015 MINRES Technologies GmbH and others. * Copyright (c) 2011 Google, Inc.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* MINRES Technologies GmbH - initial API and implementation * Google, Inc. - initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.wb.swt; package org.eclipse.wb.swt;

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
<booleanAttribute key="append.args" value="true"/>
<stringAttribute key="application" value="org.eclipse.e4.ui.workbench.swt.E4Application"/>
<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="false"/>
<booleanAttribute key="clearws" value="false"/>
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/SCViewer (restart)"/>
<booleanAttribute key="default" value="false"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../runtime-com.minres.scviewer.e4.application.product"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<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"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="com.minres.scviewer.e4.application.product"/>
<stringAttribute key="productFile" value="/com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.product"/>
<stringAttribute key="selected_target_plugins" value="com.google.guava*15.0.0.v201403281430@default:default,com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet*3.1.0.v201410161800@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.jxpath@default:default,org.apache.commons.logging@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.codehaus.groovy*2.4.3.xx-201508121448-e45@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@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.filesystem.java7@default:false,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@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.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.annotations@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.emf.xpath@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.cocoa@default:false,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.emf.common@default:default,org.eclipse.emf.databinding@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@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@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.text@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.ui.console@default:default,org.eclipse.ui.trace@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.wb.core.lib@default:default,org.hamcrest.core@default:default,org.junit@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="com.minres.scviewer.database.sqlite@default:default,com.minres.scviewer.database.swt@default:default,com.minres.scviewer.database.text@default:default,com.minres.scviewer.database.vcd@default:default,com.minres.scviewer.database@default:default,com.minres.scviewer.e4.application@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<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>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
<booleanAttribute key="append.args" value="true"/>
<stringAttribute key="application" value="org.eclipse.e4.ui.workbench.swt.E4Application"/>
<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="false"/>
<booleanAttribute key="clearws" value="false"/>
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/SCViewer"/>
<booleanAttribute key="default" value="false"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../runtime-com.minres.scviewer.e4.application.product"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<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 -clearPersistedState"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="com.minres.scviewer.e4.application.product"/>
<stringAttribute key="productFile" value="/com.minres.scviewer.e4.application/com.minres.scviewer.e4.application.product"/>
<stringAttribute key="selected_target_plugins" value="com.google.guava*10.0.1.v201203051515@default:default,com.google.guava*15.0.0.v201403281430@default:default,com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet*3.0.0.v201112011016@default:default,javax.servlet*3.1.0.v201410161800@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.jxpath@default:default,org.apache.commons.logging@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.codehaus.groovy*1.8.6.xx-201508121448-e45@default:default,org.codehaus.groovy*2.0.7.xx-201508121448-e45@default:default,org.codehaus.groovy*2.1.8.xx-201508121448-e45@default:default,org.codehaus.groovy*2.2.2.xx-201508121448-e45@default:default,org.codehaus.groovy*2.3.10.xx-201508121448-e45@default:default,org.codehaus.groovy*2.4.3.xx-201508121448-e45@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@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.filesystem.java7@default:false,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@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.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.annotations@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.emf.xpath@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.cocoa@default:false,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.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@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@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.text@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.ui.console@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.hamcrest.core@default:default,org.junit@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="com.minres.scviewer.database.sqlite@default:default,com.minres.scviewer.database.swt@default:default,com.minres.scviewer.database.text@default:default,com.minres.scviewer.database.vcd@default:default,com.minres.scviewer.database@default:default,com.minres.scviewer.e4.application@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<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>

View File

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?><target name="Mars Platform" sequenceNumber="125"> <?pde version="3.8"?><target name="Mars Platform" sequenceNumber="130">
<locations> <locations>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit"> <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.codehaus.groovy18.feature.feature.group" version="2.9.2.xx-201508121448-e45"/>
<repository location="http://dist.springsource.org/snapshot/GRECLIPSE/e4.5"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.rcp.sdk.id" version="4.5.1.M20150904-0015"/> <unit id="org.eclipse.rcp.sdk.id" version="4.5.1.M20150904-0015"/>
<unit id="org.eclipse.equinox.executable.feature.group" version="3.6.200.v20150602-1417"/> <unit id="org.eclipse.equinox.executable.feature.group" version="3.6.200.v20150602-1417"/>
<unit id="org.eclipse.rcptt.core.feature.group" version="2.0.1.201508201020"/> <unit id="org.eclipse.rcptt.core.feature.group" version="2.0.1.201508201020"/>
<unit id="org.eclipse.platform.sdk" version="4.5.1.M20150904-0015"/> <unit id="org.eclipse.platform.sdk" version="4.5.1.M20150904-0015"/>
<repository location="http://download.eclipse.org/releases/mars"/> <repository location="http://download.eclipse.org/releases/mars"/>
</location> </location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.codehaus.groovy24.feature.feature.group" version="2.9.2.xx-201508121448-e45"/>
<repository location="http://dist.springsource.org/snapshot/GRECLIPSE/e4.5"/>
</location>
</locations> </locations>
<environment> <environment>
<arch>x86_64</arch> <arch>x86_64</arch>