Compare commits

...

129 Commits
2.1.0 ... 2.6.1

Author SHA1 Message Date
45c23564b5 Merge branch 'release/2.6.1' 2020-06-21 16:04:29 +02:00
ab975eadd1 udate version numbers 2020-06-21 16:04:22 +02:00
7ad70411f3 fix preference handling 2020-06-21 15:37:38 +02:00
24720340be update feature definition 2020-06-21 12:23:34 +02:00
ad51066f1c add tycho settings 2020-06-21 09:25:24 +02:00
95e2db60b6 cleanup build and imports 2020-06-20 18:04:57 +02:00
db1d377da6 fix redraw issues 2020-06-20 17:58:26 +02:00
230e8dcc7a update status bar handling 2020-06-14 21:59:42 +02:00
ab2146102f fix startup 2020-06-14 15:27:27 +02:00
b1148922d8 implement feature-based product definition 2020-06-11 14:34:14 +02:00
e4de765da9 Merge branch 'develop' 2020-06-11 11:04:08 +02:00
47120c66b7 Merge branch 'feature/feature_base_product' into develop 2020-06-11 10:53:51 +02:00
35ccc71f10 fix TransactionDetails handling of attributes 2020-06-11 10:51:59 +02:00
688a6abd99 add set of features 2020-06-11 10:49:34 +02:00
97693cd0c4 [WIP ]reorganized dir structure 2020-06-01 22:01:00 +02:00
3e5ab7b0ac cleanup use of org.equinox.ds 2020-06-01 12:39:20 +02:00
ad80671dd2 fxi start issues 2020-06-01 12:38:51 +02:00
4ab3000b69 fix left-overs 2020-06-01 12:06:33 +02:00
572e999a5b remove version constraint on groovy bundle 2020-06-01 11:10:07 +02:00
e5bcb25d24 update RCP to 2019-12 2020-05-09 14:20:29 +02:00
19ea1f0b6d fix #33 2020-05-09 12:52:48 +02:00
e88014ebba fix reference to org.eclipse.equinox.util 2020-05-09 12:52:48 +02:00
10a0608fd3 Revert "update to Eclipse 2020-03 RCP base"
This reverts commit 077a6f8011.
2020-05-09 12:52:47 +02:00
60abfb7afd update to Eclipse 2020-03 RCP base 2020-05-09 12:52:47 +02:00
6b9e3c0e70 add performance improvement fixes 2020-05-09 12:52:47 +02:00
19065cdbb7 remove fixed color assignment 2020-05-09 12:52:46 +02:00
a7afeb1f7c change database interface 2020-05-09 12:52:44 +02:00
150c404cdb fix #33 2020-05-09 12:50:28 +02:00
5fe8b261ec fix reference to org.eclipse.equinox.util 2020-05-08 13:22:14 +02:00
f8a177c9e0 Revert "update to Eclipse 2020-03 RCP base"
This reverts commit 077a6f8011.
2020-05-08 10:39:43 +02:00
077a6f8011 update to Eclipse 2020-03 RCP base 2020-05-08 09:53:36 +02:00
8b84f1341b add performance improvement fixes 2020-05-08 08:38:43 +02:00
20824e75c1 remove fixed color assignment 2020-04-02 14:17:44 +02:00
fb283ab668 change database interface 2020-04-02 14:17:44 +02:00
dc3df60716 Merge branch 'release/2.5' into develop 2020-03-30 11:36:07 +02:00
47b58ed770 Merge branch 'release/2.5' 2020-03-30 11:36:06 +02:00
1cebc2da0a update version numbers 2020-03-30 11:34:26 +02:00
414030cbd2 fix behavior of FileBrowserDialog 2020-03-30 11:31:51 +02:00
8011585113 add globbing selection and tool bar to file dialog 2020-03-29 17:16:14 +02:00
270a004037 fix file detection 2020-03-29 16:10:36 +02:00
2aa4160400 Initial version of custom file selection dialog 2020-03-29 16:05:48 +02:00
c8e416966b Merge branch 'release/2.4.2' into develop 2020-03-27 20:05:55 +01:00
20cb208719 Merge branch 'release/2.4.2' 2020-03-27 20:05:54 +01:00
e30aff82ee set version numbers 2020-03-27 20:05:46 +01:00
ad2937c332 Merge branch 'master' into develop
Conflicts:
	com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/parts/WaveformViewer.java
	com.minres.scviewer.e4.application/src/com/minres/scviewer/e4/application/preferences/DefaultValuesInitializer.java
	com.opcoach.e4.preferences/src/com/opcoach/e4/preferences/internal/E4PreferenceRegistry.java
2020-03-25 23:20:15 +01:00
0e8a757d6e fix settings handling
for this a common workspace is being created. To allow for multiple
instances the work space is being unlocked as soon as the application is
initialized
2020-03-25 23:01:28 +01:00
220eaea73c move to opcoach repository at https://www.opcoach.com/repository/2018-12 2020-03-25 22:52:39 +01:00
24d6085ded update version
this release contains for #31 and #14
2020-03-24 08:09:52 +00:00
8a66734279 fix #32 2020-03-24 08:09:52 +00:00
f6e2224651 fix preferences storage 2020-03-24 08:09:52 +00:00
5d85c12bb8 Merge branch 'release/2.4.1' into develop 2020-03-24 08:06:10 +00:00
2b1cb7856f update version
this release contains for #31 and #14
2020-03-24 08:05:55 +00:00
f1d080983a fix #32 2020-03-24 06:43:10 +00:00
767b083a22 fix preferences storage 2020-03-21 15:17:34 +01:00
348ffe20d6 Merge branch 'release/2.4.0' into develop 2020-03-21 11:35:52 +01:00
f3494e7562 Merge branch 'release/2.4.0' 2020-03-21 11:35:51 +01:00
9b6908f193 update product version and removed leveldb 2020-03-21 11:35:29 +01:00
0cfcc8c118 fix identification of SQLite file 2020-03-21 11:31:59 +01:00
ec5cd209c6 Merge branch 'feature/add_hover_to_transaction' into develop 2020-03-21 11:31:16 +01:00
5933bcd512 configure the hover visibility from UI 2020-03-21 11:30:30 +01:00
14ac6654b9 refactor ToolTipHandler to allow more control over content 2020-03-21 08:42:35 +01:00
cea11743eb clean up of ToolTip handler 2020-03-21 07:31:14 +01:00
210d925987 add initial implementation of TX hover 2020-03-21 06:28:28 +01:00
ffbffd88f1 fix typos 2020-03-17 13:42:18 +01:00
ec8d54dca3 add multi file feature 2020-03-17 12:54:38 +01:00
e8682e446b Merge branch 'release/2.2.0' 2020-03-14 15:56:36 +01:00
e87e1791c3 fix drag-zoom visual 2020-03-14 15:31:51 +01:00
f5a4e3c39e cleanup of code 2020-03-13 22:26:53 +01:00
306e20d14f fix compiler warnings 2020-03-13 22:25:42 +01:00
c76805d133 Merge branch 'release/2.2.0' into develop 2020-03-13 22:12:10 +01:00
8ebb2dc3a6 Merge branch 'release/2.2.0' 2020-03-13 22:12:09 +01:00
669fd6a881 update version numbers 2020-03-13 22:11:39 +01:00
8e66e5fe0b add a select-all key stroke to design browsers stream table 2020-03-13 22:06:55 +01:00
674aa7d3ce add initial version of drag-zoom 2020-03-13 21:06:53 +01:00
2b7c9a240f add drag area to wavefrom view 2020-03-13 19:52:55 +01:00
18f2a110f0 add shortcuts for zoom 2020-03-13 18:51:35 +01:00
27f1e8ca6a Merge branch 'hotfix/#28_add_filter' 2020-03-13 16:03:22 +01:00
3565a6a05b Merge branch 'hotfix/#28_add_filter' into develop 2020-03-13 16:03:22 +01:00
aef4901b2b bug fix for #28
the filter for the treeviewer did not work properly and needed to be
re-implemented
2020-03-13 16:03:16 +01:00
d77aaa3865 Merge branch 'hotfix/#29_cannot_delete_signals' into develop 2020-03-13 16:01:30 +01:00
b398a07fd7 Merge branch 'hotfix/#29_cannot_delete_signals' 2020-03-13 16:01:29 +01:00
732bd82034 fix #29 cannot delete VCD signals
comparison of objects were done by idendity not .equals()
2020-03-13 16:01:16 +01:00
2ccc5274aa Merge branch 'hotfix/#27_add_filter' into develop 2020-03-12 21:59:01 +01:00
9f4f71046d Merge branch 'hotfix/#27_add_filter' 2020-03-12 21:59:01 +01:00
d73b01f77d fix #27 'Add filter to hierarchy viewer' 2020-03-12 18:17:47 +01:00
77302521b2 add another fix for #27 'parser doesn't handle truncated input files' 2020-03-11 23:11:42 +01:00
f89471e14b Merge branch 'release/2.1.6' 2020-03-11 07:51:54 +01:00
0634556256 Merge branch 'release/2.1.6' into develop 2020-03-11 07:51:54 +01:00
4f097e7f59 update version numbers 2020-03-11 07:51:09 +01:00
f1abc645c3 Merge branch 'hotfix/#27_truncated_input' 2020-03-11 07:37:21 +01:00
2c8b7129e9 add fix for #27 'parser doesn't handle truncated input files' 2020-03-11 07:37:14 +01:00
2f81529f93 Merge branch 'hotfix/#26_incomplete_regex_throws_exception' into develop 2020-03-11 07:35:43 +01:00
8f76d816f1 Merge branch 'hotfix/#26_incomplete_regex_throws_exception' 2020-03-11 07:35:42 +01:00
594a71a9ba add try-catch to filter application 2020-03-11 07:35:31 +01:00
0fa0d4a5b8 Merge branch 'hotfix/#27_truncated_input' into develop 2020-03-11 07:27:16 +01:00
97443c6cd8 Merge branch 'release/2.1.4' 2020-03-09 18:02:19 +01:00
c3486eb6c8 Updated version numbers 2020-03-09 18:00:15 +01:00
8a286a8eac Merge branch 'release/2.1.4' 2020-03-09 17:58:47 +01:00
e4329213fa Fixed missing version number 2020-03-09 17:55:50 +01:00
857bbe17d7 Merge branch 'release/2.1.3' 2020-03-09 17:55:05 +01:00
091cb1cf7f Fixed missing version number 2020-03-09 17:53:35 +01:00
0623b8de4a Fixed #25 - TransactionDetails vanish when setting filter for streamlist 2020-02-28 21:19:40 +01:00
8b55548cca Fixed #16 - Setting and deleting filter removes properties 2020-02-17 19:43:27 +01:00
a0a4ea1f53 Merge branch 'release/2.1.3'
Conflicts:
	com.minres.scviewer.e4.application/META-INF/MANIFEST.MF
2020-02-10 07:04:54 +01:00
e034d1faad Updated version numbers 2020-02-10 07:03:24 +01:00
68660d0892 Merge branch 'release/2.1.2' 2020-02-10 06:50:07 +01:00
a0f0b55045 Updated application bundle version number 2020-02-10 06:46:55 +01:00
3d20b6961e Updated groovy compiler level 2020-02-10 02:25:40 +01:00
ca02c92a18 Fixed #23 - Fix sync of properties 2020-02-03 21:30:44 +01:00
347dbf134b removed javax.xml.bind dependency 2020-01-28 23:23:15 +01:00
44ac32359f Fixed #19 - Fixed sync of streamlist 2020-01-27 20:37:53 +01:00
48c7d81b8a Merge branch 'develop' of VP-Tools/SCViewer into master 2020-01-13 12:26:56 +00:00
e945a3acbe Fixed NP and updated build infrastructure and target platform 2020-01-13 12:26:56 +00:00
145dfbd74d Fixed NP and updated build infrastructure and target platform 2020-01-13 12:26:56 +00:00
b7646dc29e Extended data type for text database 2020-01-13 12:26:56 +00:00
475181c8df Fixed #21 - IllegalStateException when closing SCViewer 2020-01-13 12:26:56 +00:00
3d043ce1b7 Fixed #20 - NPE gets caught when opening a damaged file and info popup
is shown
2020-01-13 12:26:56 +00:00
7e2869b7ee Fixed # 18 - Fixed tree view and stream list after last tab is closed 2020-01-13 12:26:56 +00:00
51d9d7e25c Fixed NP and updated build infrastructure and target platform 2020-01-13 13:17:27 +01:00
ed665ac032 Fixed NP and updated build infrastructure and target platform 2020-01-13 13:14:34 +01:00
689d7874f4 Extended data type for text database 2020-01-07 12:43:39 +01:00
c7c1f97b0c Fixed #21 - IllegalStateException when closing SCViewer 2019-12-18 17:16:20 +01:00
7b2db09585 Fixed #20 - NPE gets caught when opening a damaged file and info popup
is shown
2019-12-03 22:19:56 +01:00
52f3f7b348 Fixed # 18 - Fixed tree view and stream list after last tab is closed 2019-11-25 17:46:28 +01:00
429ea37080 Merge branch 'release/2.1.2' 2019-09-11 13:08:52 +02:00
04f011e82f Fixed array out of bounds error 2019-09-11 13:05:26 +02:00
3a6ed3ce7e Fixed 'Save Settings' #4 2019-09-04 20:50:34 +02:00
79eb8073d8 Merge branch 'release/2.1.1' 2019-07-08 18:44:47 +02:00
4ea841cc7b Fixed Part Stack issue and updated About Dialog 2019-07-08 18:38:53 +02:00
418 changed files with 3759 additions and 2899 deletions

73
.project Normal file
View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.minres.scviewer.parent</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
<filteredResources>
<filter>
<id>0</id>
<name></name>
<type>10</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-features</arguments>
</matcher>
</filter>
<filter>
<id>0</id>
<name></name>
<type>10</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-plugins</arguments>
</matcher>
</filter>
<filter>
<id>0</id>
<name></name>
<type>10</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-com.minres.*</arguments>
</matcher>
</filter>
<filter>
<id>0</id>
<name></name>
<type>10</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-product</arguments>
</matcher>
</filter>
<filter>
<id>0</id>
<name></name>
<type>10</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-tests</arguments>
</matcher>
</filter>
<filter>
<id>0</id>
<name></name>
<type>10</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-p2repositories</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>

View File

@ -1,46 +0,0 @@
<?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="true"/>
<stringAttribute key="deselected_workspace_plugins" value="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"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=com.minres.scviewer.database.test"/>
<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.8"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
<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"/>
<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@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,org.apache.ant@default:default,org.apache.commons.jxpath@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.codehaus.groovy@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.expressions@default:default,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@default:true,org.eclipse.core.variables@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.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.emf.common@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.ds@1:true,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.util@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.hamcrest.core@default:default,org.junit@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.ui.swt@default:default,com.minres.scviewer.database.ui@default:default,com.minres.scviewer.database.vcd@default:default,com.minres.scviewer.database@default:true,com.opcoach.e4.preferences@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="false"/>
<booleanAttribute key="useProduct" value="false"/>
</launchConfiguration>

View File

@ -1,2 +0,0 @@
/.scviewer.*
/.my_db.txlog*

View File

@ -1,2 +0,0 @@
eclipse.preferences.version=1
groovy.compiler.level=26

View File

@ -1,9 +0,0 @@
package com.minres.scviewer.database.swt;
public class Constants {
public final static String[] unitString={"fs", "ps", "ns", "us", "ms"};//, "s"};
public final static int[] unitMultiplier={1, 3, 10, 30, 100, 300};
}

View File

@ -1,38 +0,0 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true
Bundle-Version: 2.0.5.qualifier
Bundle-Vendor: %Bundle-Vendor
Require-Bundle: javax.inject;bundle-version="1.0.0",
org.eclipse.core.runtime;bundle-version="3.11.1",
org.eclipse.swt;bundle-version="3.104.1",
org.eclipse.e4.ui.model.workbench;bundle-version="1.1.100",
org.eclipse.jface;bundle-version="3.11.0",
org.eclipse.e4.ui.services;bundle-version="1.2.0",
org.eclipse.e4.ui.workbench;bundle-version="1.3.0",
org.eclipse.e4.core.di;bundle-version="1.5.0",
org.eclipse.e4.ui.di;bundle-version="1.1.0",
org.eclipse.e4.core.contexts;bundle-version="1.4.0",
com.minres.scviewer.database.ui.swt;bundle-version="1.0.0",
com.minres.scviewer.database.ui,
com.minres.scviewer.database;bundle-version="1.0.0",
org.eclipse.equinox.ds;bundle-version="1.4.300",
org.eclipse.equinox.util;bundle-version="1.0.500",
org.eclipse.osgi.services;bundle-version="3.5.0",
org.eclipse.e4.core.services;bundle-version="2.0.0",
org.eclipse.osgi.services;bundle-version="3.5.0",
org.eclipse.core.jobs,
org.eclipse.osgi,
com.google.guava,
org.eclipse.equinox.preferences,
org.eclipse.core.expressions,
org.eclipse.e4.core.commands;bundle-version="0.11.0",
org.eclipse.e4.ui.workbench.addons.swt,
com.opcoach.e4.preferences,
org.eclipse.e4.core.di.extensions,
org.eclipse.e4.ui.css.swt.theme;bundle-version="0.10.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: com.minres.scviewer.database,
javax.inject;version="1.0.0"
Automatic-Module-Name: com.minres.scviewer.e4.application

View File

@ -1,23 +0,0 @@
/*******************************************************************************
* Copyright (c) 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
*******************************************************************************/
package com.minres.scviewer.e4.application.handlers;
import org.eclipse.e4.core.di.annotations.Execute;
public class SelectAllHandler {
@Execute
public void execute() {
}
}

View File

@ -7,10 +7,10 @@
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../com.minres.scviewer.parent</relativePath>
<relativePath>..</relativePath>
</parent>
<artifactId>com.minres.scviewer.e4.product</artifactId>
<version>2.0.5-SNAPSHOT</version>
<version>2.6.1-SNAPSHOT</version>
<packaging>eclipse-repository</packaging>
<groupId>com.minres.scviewer</groupId>
<build>

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="SCViewer" uid="scviewer" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.0.5.qualifier" useFeatures="false" includeLaunchers="true">
<product name="SCViewer" uid="scviewer" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.6.1.qualifier" useFeatures="true" includeLaunchers="true">
<configIni use="default">
</configIni>
<launcherArgs>
<programArgs>-clearPersistedState -data @none
<programArgs>-clearPersistedState
</programArgs>
<vmArgs>-Xmx2G
<vmArgs>-Xmx2G -Dosgi.instance.area=@user.home/.scviewer -Dosgi.instance.area.default=@user.home/.scviewer
</vmArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
</vmArgsMac>
@ -17,6 +17,7 @@
<windowImages/>
<launcher name="scviewer">
<linux icon="icons/SCViewer_512x512.xpm"/>
<macosx icon="icons/SCViewer.icns"/>
@ -44,101 +45,30 @@
</license>
<plugins>
<plugin id="com.google.guava"/>
<plugin id="com.ibm.icu"/>
<plugin id="com.minres.scviewer.database"/>
<plugin id="com.minres.scviewer.database.leveldb"/>
<plugin id="com.minres.scviewer.database.sqlite"/>
<plugin id="com.minres.scviewer.database.text"/>
<plugin id="com.minres.scviewer.database.ui"/>
<plugin id="com.minres.scviewer.database.ui.swt"/>
<plugin id="com.minres.scviewer.database.vcd"/>
<plugin id="com.minres.scviewer.e4.application"/>
<plugin id="com.opcoach.e4.preferences"/>
<plugin id="javax.annotation"/>
<plugin id="javax.inject"/>
<plugin id="org.apache.batik.constants"/>
<plugin id="org.apache.batik.css"/>
<plugin id="org.apache.batik.i18n"/>
<plugin id="org.apache.batik.util"/>
<plugin id="org.apache.commons.io"/>
<plugin id="org.apache.commons.jxpath"/>
<plugin id="org.apache.commons.logging"/>
<plugin id="org.apache.felix.scr"/>
<plugin id="org.apache.xmlgraphics"/>
<plugin id="org.codehaus.groovy"/>
<plugin id="org.eclipse.core.commands"/>
<plugin id="org.eclipse.core.contenttype"/>
<plugin id="org.eclipse.core.databinding"/>
<plugin id="org.eclipse.core.databinding.beans"/>
<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.filesystem"/>
<plugin id="org.eclipse.core.filesystem.linux.x86_64" fragment="true"/>
<plugin id="org.eclipse.core.filesystem.macosx" fragment="true"/>
<plugin id="org.eclipse.core.filesystem.win32.x86_64" fragment="true"/>
<plugin id="org.eclipse.core.jobs"/>
<plugin id="org.eclipse.core.resources"/>
<plugin id="org.eclipse.core.resources.win32.x86_64" fragment="true"/>
<plugin id="org.eclipse.core.runtime"/>
<plugin id="org.eclipse.e4.core.commands"/>
<plugin id="org.eclipse.e4.core.contexts"/>
<plugin id="org.eclipse.e4.core.di"/>
<plugin id="org.eclipse.e4.core.di.annotations"/>
<plugin id="org.eclipse.e4.core.di.extensions"/>
<plugin id="org.eclipse.e4.core.di.extensions.supplier"/>
<plugin id="org.eclipse.e4.core.services"/>
<plugin id="org.eclipse.e4.emf.xpath"/>
<plugin id="org.eclipse.e4.ui.bindings"/>
<plugin id="org.eclipse.e4.ui.css.core"/>
<plugin id="org.eclipse.e4.ui.css.swt"/>
<plugin id="org.eclipse.e4.ui.css.swt.theme"/>
<plugin id="org.eclipse.e4.ui.di"/>
<plugin id="org.eclipse.e4.ui.model.workbench"/>
<plugin id="org.eclipse.e4.ui.services"/>
<plugin id="org.eclipse.e4.ui.swt.gtk" fragment="true"/>
<plugin id="org.eclipse.e4.ui.widgets"/>
<plugin id="org.eclipse.e4.ui.workbench"/>
<plugin id="org.eclipse.e4.ui.workbench.addons.swt"/>
<plugin id="org.eclipse.e4.ui.workbench.renderers.swt"/>
<plugin id="org.eclipse.e4.ui.workbench.renderers.swt.cocoa" fragment="true"/>
<plugin id="org.eclipse.e4.ui.workbench.swt"/>
<plugin id="org.eclipse.e4.ui.workbench3"/>
<plugin id="org.eclipse.emf.common"/>
<plugin id="org.eclipse.emf.ecore"/>
<plugin id="org.eclipse.emf.ecore.change"/>
<plugin id="org.eclipse.emf.ecore.xmi"/>
<plugin id="org.eclipse.equinox.app"/>
<plugin id="org.eclipse.equinox.common"/>
<plugin id="org.eclipse.equinox.concurrent"/>
<plugin id="org.eclipse.equinox.ds"/>
<plugin id="org.eclipse.equinox.event"/>
<plugin id="org.eclipse.equinox.preferences"/>
<plugin id="org.eclipse.equinox.registry"/>
<plugin id="org.eclipse.equinox.util"/>
<plugin id="org.eclipse.jface"/>
<plugin id="org.eclipse.jface.databinding"/>
<plugin id="org.eclipse.osgi"/>
<plugin id="org.eclipse.osgi.compatibility.state" fragment="true"/>
<plugin id="org.eclipse.osgi.services"/>
<plugin id="org.eclipse.osgi.util"/>
<plugin id="org.eclipse.pde.ds.lib"/>
<plugin id="org.eclipse.swt"/>
<plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
<plugin id="org.eclipse.swt.gtk.linux.x86_64" fragment="true"/>
<plugin id="org.eclipse.swt.win32.win32.x86_64" fragment="true"/>
<plugin id="org.w3c.css.sac"/>
<plugin id="org.w3c.dom.events"/>
<plugin id="org.w3c.dom.smil"/>
<plugin id="org.w3c.dom.svg"/>
</plugins>
<features>
<feature id="com.minres.scviewer.e4.feature" installMode="root"/>
<feature id="com.minres.scviewer.e4.platform.feature" installMode="root"/>
</features>
<configurations>
<plugin id="com.minres.scviewer.database.text" autoStart="true" startLevel="2" />
<plugin id="com.minres.scviewer.database.vcd" autoStart="true" startLevel="2" />
<plugin id="org.apache.felix.scr" autoStart="true" startLevel="1" />
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
<plugin id="org.eclipse.osgi" autoStart="true" startLevel="-1" />
</configurations>
<preferencesInfo>
<targetfile overwrite="false"/>
</preferencesInfo>
<cssInfo>
<file path="/com.minres.scviewer.e4.application/css/default.css"/>
</cssInfo>
</product>

View File

@ -1 +0,0 @@
/workspace/

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="com.minres.scviewer.target" sequenceNumber="138">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="http://download.eclipse.org/releases/2020-03/"/>
<unit id="org.eclipse.equinox.executable.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.p2.sdk.feature.jar" version="0.0.0"/> <!-- needed by Linux exectable-->
<unit id="org.eclipse.equinox.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.platform.sdk" version="0.0.0"/>
<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/> <!-- org.eclipse.equinox.p2.iu -->
<unit id="org.eclipse.rcptt.core.feature.group" version="0.0.0"/><!-- com.google.guave-->
<unit id="org.eclipse.pde.feature.group" version="0.0.0"/> <!-- org.junit for testing -->
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="https://www.opcoach.com/repository/2020-03/"/>
<unit id="com.opcoach.e4.preferences.feature.feature.group" version="0.0.0"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="http://dist.springsource.org/snapshot/GRECLIPSE/e4.15/"/>
<unit id="org.codehaus.groovy25.feature.feature.group" version="0.0.0"/>
</location>
</locations>
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<launcherArgs>
<vmArgs>-Xms40m -Xmx2G</vmArgs>
</launcherArgs>
</target>

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="Neon Platform" sequenceNumber="138">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.equinox.executable.feature.group" version="3.6.300.v20161122-1740"/>
<unit id="org.eclipse.platform.sdk" version="4.6.2.M20161124-1400"/>
<unit id="org.eclipse.rcp.sdk.id" version="4.6.2.M20161124-1400"/>
<unit id="org.eclipse.rcptt.core.feature.group" version="2.1.0.201604261352"/>
<repository location="http://download.eclipse.org/releases/neon"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.codehaus.groovy24.feature.feature.group" version="2.9.3.xx-201806261157-e46"/>
<repository location="http://dist.springsource.org/snapshot/GRECLIPSE/e4.6"/>
</location>
</locations>
<environment>
<arch>x86_64</arch>
<nl>de_DE</nl>
</environment>
<launcherArgs>
<vmArgs>-Dosgi.requiredJavaVersion=1.7 -XX:MaxPermSize=256 -Xms40m -Xmx2G </vmArgs>
</launcherArgs>
</target>

View File

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="Photon Platform" sequenceNumber="138">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.equinox.executable.feature.group" version="0.0.0"/>
<unit id="org.eclipse.platform.sdk" version="0.0.0"/>
<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.rcp.sdk.id" version="0.0.0"/>
<unit id="org.eclipse.rcptt.core.feature.group" version="0.0.0"/>
<unit id="org.eclipse.e4.rcp.feature.group" version="0.0.0"/>
<unit id="org.eclipse.platform.feature.group" version="0.0.0"/>
<repository location="http://download.eclipse.org/releases/photon"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.codehaus.groovy24.feature.feature.group" version="0.0.0"/>
<repository location="http://dist.springsource.org/snapshot/GRECLIPSE/e4.8/"/>
</location>
</locations>
<environment>
<arch>x86_64</arch>
<nl>de_DE</nl>
</environment>
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/Java SE 7 [1.7.0_45]"/>
<launcherArgs>
<vmArgs>-Dosgi.requiredJavaVersion=1.6 -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -Xdock:icon=../Resources/Eclipse.icns -Xms40m -Xmx2G</vmArgs>
</launcherArgs>
</target>

View File

@ -4,7 +4,7 @@
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<artifactId>photon</artifactId>
<artifactId>com.minres.scviewer.target</artifactId>
<packaging>eclipse-target-definition</packaging>
<name>SCViewer Target Definition</name>
@ -13,7 +13,7 @@
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../com.minres.scviewer.parent</relativePath>
<relativePath>..</relativePath>
</parent>
</project>

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.opcoach.e4.preferences</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>

View File

@ -1,12 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8

View File

@ -1,19 +0,0 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Preferences
Bundle-SymbolicName: com.opcoach.e4.preferences;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: OPCOACH
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: javax.inject,
org.eclipse.core.runtime;bundle-version="3.9.0",
org.eclipse.jface;bundle-version="3.9.0",
org.eclipse.e4.core.di;bundle-version="1.3.0",
org.eclipse.e4.ui.model.workbench;bundle-version="1.0.0",
org.eclipse.e4.core.services;bundle-version="1.1.0",
org.eclipse.e4.core.contexts;bundle-version="1.3.0",
org.eclipse.e4.ui.services;bundle-version="1.0.0"
Export-Package: com.opcoach.e4.preferences,
com.opcoach.e4.preferences.handlers
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: com.opcoach.e4.preferences

View File

@ -1,5 +0,0 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension-point id="e4PreferencePages" name="e4PreferencePages" schema="schema/e4PreferencePages.exsd"/>
<extension-point id="e4PreferenceStoreProvider" name="e4PreferenceStoreProvider" schema="schema/e4PreferenceStoreProvider.exsd"/>
</plugin>

View File

@ -1,163 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="com.opcoach.e4.preferences" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<meta.schema plugin="com.opcoach.e4.preferences" id="e4PreferencePages" name="e4PreferencePages"/>
</appinfo>
<documentation>
[Enter description of this extension point.]
</documentation>
</annotation>
<element name="extension">
<annotation>
<appinfo>
<meta.element />
</appinfo>
</annotation>
<complexType>
<sequence>
<element ref="page" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
a fully qualified identifier of the target extension point
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
an optional identifier of the extension instance
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
an optional name of the extension instance
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="page">
<annotation>
<appinfo>
<meta.element labelAttribute="name"/>
</appinfo>
</annotation>
<complexType>
<sequence>
<element ref="keywordReference" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
a unique name that will be used to identify this page.
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string" use="required">
<annotation>
<documentation>
a translatable name that will be used in the UI for this page.
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
a name of the fully qualified class that implements
&lt;samp&gt;org.eclipse.jface.preference.IPreferencePage&lt;/samp&gt;.
IT IS EASYER to extend FieldEditorPreferencePage
If this class extends directly org.eclipse.jface.preference.FieldEditorPreferencePage preferenceStore is automatically set on it.
</documentation>
<appinfo>
<meta.attribute kind="java" basedOn="org.eclipse.jface.preference.FieldEditorPreferencePage:"/>
</appinfo>
</annotation>
</attribute>
<attribute name="category" type="string">
<annotation>
<documentation>
a path indicating the location of the page in the preference tree. The path may either be a parent node ID or a sequence
of IDs separated by &apos;/&apos;, representing the full path from the root node.
</documentation>
<appinfo>
<meta.attribute kind="identifier" basedOn="com.opcoach.e4.preferences.e4PreferencePages/page/@id"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="keywordReference">
<annotation>
<documentation>
A reference by a preference page to a keyword. See the keywords extension point.
</documentation>
</annotation>
<complexType>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
The id of the keyword being referred to.
</documentation>
<appinfo>
<meta.attribute kind="identifier" basedOn="org.eclipse.ui.keywords/keyword/@id"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appinfo>
<meta.section type="since"/>
</appinfo>
<documentation>
[Enter the first release in which this extension point appears.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="examples"/>
</appinfo>
<documentation>
[Enter extension point usage example here.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
[Enter API information here.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="implementation"/>
</appinfo>
<documentation>
[Enter information about supplied implementation of this extension point.]
</documentation>
</annotation>
</schema>

View File

@ -1,149 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="com.opcoach.e4.preferences" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<meta.schema plugin="com.opcoach.e4.preferences" id="e4PreferenceStoreProvider" name="e4PreferenceStoreProvider"/>
</appinfo>
<documentation>
This extension point is used to associate a preference store to a plugin.
You can choose either to implement the IPreferenceStoreProvider interface or to give the ID of the IPreferenceStore to use (stored in the workbench context of your E4 application).
If this extension point is not used, a default ScopedPreferenceStore will be used for the preference page.
</documentation>
</annotation>
<element name="extension">
<annotation>
<appinfo>
<meta.element />
</appinfo>
</annotation>
<complexType>
<sequence>
<element ref="preferenceStoreProvider" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="preferenceStoreProvider">
<complexType>
<attribute name="pluginId" type="string" use="required">
<annotation>
<documentation>
Set here the plugin Id concerned by this extension.
Must be a valid plugin ID (control will be done at runtime)
</documentation>
</annotation>
</attribute>
<attribute name="class" type="string">
<annotation>
<documentation>
Set a class to get the IPreferenceStore for the defined pluginID.
This parameter is optional if you use the contextId attribute.
</documentation>
<appinfo>
<meta.attribute kind="java" basedOn=":com.opcoach.e4.preferences.IPreferenceStoreProvider"/>
</appinfo>
</annotation>
</attribute>
<attribute name="idInWorkbenchContext" type="string">
<annotation>
<documentation>
If no class is defined, you can set here the ID of the IPreferenceStore available in the context.
This object must be set in the workbenchContext using an Addon for instance, with the following code (in addon):
@PostContextCreate
public void initMyAddon(IEclipseContext ctx)
{
IPreferenceStore ps = new ... . // The code to create your pref store
ctx.set(ID set in this extension, ps);
}
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appinfo>
<meta.section type="since"/>
</appinfo>
<documentation>
[Enter the first release in which this extension point appears.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="examples"/>
</appinfo>
<documentation>
The definition could be like the following :
pluginId=&quot;yourPluginID&quot;
provider=&quot;a class implementing IPreferenceStoreProvider&quot;
Or using the key in context (usefull to share the same preference store between plugins) :
pluginId=&quot;yourPluginID&quot;
keyInContext=&quot;the key of the IPreferenceStore stored in context&quot;
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
[Enter API information here.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="implementation"/>
</appinfo>
<documentation>
[Enter information about supplied implementation of this extension point.]
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="copyright"/>
</appinfo>
<documentation>
@OPCoach 2014
</documentation>
</annotation>
</schema>

View File

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2014 OPCoach.
* 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:
* OPCoach - initial API and implementation
*******************************************************************************/
package com.opcoach.e4.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
/** This interface can be implemented to provide a PreferenceStore for a given plugin.
* This associatino must be done in the e4PreferenceStoreProvider extension point.
* @author olivier
*
*/
public interface IPreferenceStoreProvider
{
/** Must be implemented to return a preference store */
public IPreferenceStore getPreferenceStore();
}

View File

@ -1,861 +0,0 @@
/*******************************************************************************
* Copyright (c) 2014 OPCoach.
* 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:
* Eclipse - copy of the implementation coming from jface
*******************************************************************************/
package com.opcoach.e4.preferences;
import java.io.IOException;
import org.eclipse.core.commands.common.EventManager;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.core.runtime.preferences.DefaultScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.IScopeContext;
import org.eclipse.core.runtime.preferences.IEclipsePreferences.INodeChangeListener;
import org.eclipse.core.runtime.preferences.IEclipsePreferences.NodeChangeEvent;
import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
import org.eclipse.jface.preference.IPersistentPreferenceStore;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.util.SafeRunnable;
import org.osgi.service.prefs.BackingStoreException;
/**
* The ScopedPreferenceStore is an IPreferenceStore that uses the scopes
* provided in org.eclipse.core.runtime.preferences.
* <p>
* A ScopedPreferenceStore does the lookup of a preference based on it's search
* scopes and sets the value of the preference based on its store scope.
* </p>
* <p>
* The default scope is always included in the search scopes when searching for
* preference values.
* </p>
*
* @see org.eclipse.core.runtime.preferences
* @since 3.1
*/
public class ScopedPreferenceStore extends EventManager implements
IPreferenceStore, IPersistentPreferenceStore {
/**
* The storeContext is the context where values will stored with the
* setValue methods. If there are no searchContexts this will be the search
* context. (along with the "default" context)
*/
private IScopeContext storeContext;
/**
* The searchContext is the array of contexts that will be used by the get
* methods for searching for values.
*/
private IScopeContext[] searchContexts;
/**
* A boolean to indicate the property changes should not be propagated.
*/
protected boolean silentRunning = false;
/**
* The listener on the IEclipsePreferences. This is used to forward updates
* to the property change listeners on the preference store.
*/
IEclipsePreferences.IPreferenceChangeListener preferencesListener;
/**
* The default context is the context where getDefault and setDefault
* methods will search. This context is also used in the search.
*/
private IScopeContext defaultContext = DefaultScope.INSTANCE;
/**
* The nodeQualifer is the string used to look up the node in the contexts.
*/
String nodeQualifier;
/**
* The defaultQualifier is the string used to look up the default node.
*/
String defaultQualifier;
/**
* Boolean value indicating whether or not this store has changes to be
* saved.
*/
private boolean dirty;
/**
* Create a new instance of the receiver. Store the values in context in the
* node looked up by qualifier. <strong>NOTE:</strong> Any instance of
* ScopedPreferenceStore should call
*
* @param context
* the scope to store to
* @param qualifier
* the qualifier used to look up the preference node
* @param defaultQualifierPath
* the qualifier used when looking up the defaults
*/
public ScopedPreferenceStore(IScopeContext context, String qualifier,
String defaultQualifierPath) {
this(context, qualifier);
this.defaultQualifier = defaultQualifierPath;
}
/**
* Create a new instance of the receiver. Store the values in context in the
* node looked up by qualifier.
*
* @param context
* the scope to store to
* @param qualifier
* the qualifer used to look up the preference node
*/
public ScopedPreferenceStore(IScopeContext context, String qualifier) {
storeContext = context;
this.nodeQualifier = qualifier;
this.defaultQualifier = qualifier;
((IEclipsePreferences) getStorePreferences().parent())
.addNodeChangeListener(getNodeChangeListener());
}
/**
* Return a node change listener that adds a removes the receiver when nodes
* change.
*
* @return INodeChangeListener
*/
private INodeChangeListener getNodeChangeListener() {
return new IEclipsePreferences.INodeChangeListener() {
/*
* (non-Javadoc)
*
* @see org.eclipse.core.runtime.preferences.IEclipsePreferences.INodeChangeListener#added(org.eclipse.core.runtime.preferences.IEclipsePreferences.NodeChangeEvent)
*/
public void added(NodeChangeEvent event) {
if (nodeQualifier.equals(event.getChild().name())
&& isListenerAttached()) {
getStorePreferences().addPreferenceChangeListener(
preferencesListener);
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.core.runtime.preferences.IEclipsePreferences.INodeChangeListener#removed(org.eclipse.core.runtime.preferences.IEclipsePreferences.NodeChangeEvent)
*/
public void removed(NodeChangeEvent event) {
// Do nothing as there are no events from removed node
}
};
}
/**
* Initialize the preferences listener.
*/
private void initializePreferencesListener() {
if (preferencesListener == null) {
preferencesListener = new IEclipsePreferences.IPreferenceChangeListener() {
/*
* (non-Javadoc)
*
* @see org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener#preferenceChange(org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent)
*/
public void preferenceChange(PreferenceChangeEvent event) {
if (silentRunning) {
return;
}
Object oldValue = event.getOldValue();
Object newValue = event.getNewValue();
String key = event.getKey();
if (newValue == null) {
newValue = getDefault(key, oldValue);
} else if (oldValue == null) {
oldValue = getDefault(key, newValue);
}
firePropertyChangeEvent(event.getKey(), oldValue, newValue);
}
};
getStorePreferences().addPreferenceChangeListener(
preferencesListener);
}
}
/**
* Does its best at determining the default value for the given key. Checks
* the given object's type and then looks in the list of defaults to see if
* a value exists. If not or if there is a problem converting the value, the
* default default value for that type is returned.
*
* @param key
* the key to search
* @param obj
* the object who default we are looking for
* @return Object or <code>null</code>
*/
Object getDefault(String key, Object obj) {
IEclipsePreferences defaults = getDefaultPreferences();
if (obj instanceof String) {
return defaults.get(key, STRING_DEFAULT_DEFAULT);
} else if (obj instanceof Integer) {
return new Integer(defaults.getInt(key, INT_DEFAULT_DEFAULT));
} else if (obj instanceof Double) {
return new Double(defaults.getDouble(key, DOUBLE_DEFAULT_DEFAULT));
} else if (obj instanceof Float) {
return new Float(defaults.getFloat(key, FLOAT_DEFAULT_DEFAULT));
} else if (obj instanceof Long) {
return new Long(defaults.getLong(key, LONG_DEFAULT_DEFAULT));
} else if (obj instanceof Boolean) {
return defaults.getBoolean(key, BOOLEAN_DEFAULT_DEFAULT) ? Boolean.TRUE
: Boolean.FALSE;
} else {
return null;
}
}
/**
* Return the IEclipsePreferences node associated with this store.
*
* @return the preference node for this store
*/
IEclipsePreferences getStorePreferences() {
return storeContext.getNode(nodeQualifier);
}
/**
* Return the default IEclipsePreferences for this store.
*
* @return this store's default preference node
*/
private IEclipsePreferences getDefaultPreferences() {
return defaultContext.getNode(defaultQualifier);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
*/
public void addPropertyChangeListener(IPropertyChangeListener listener) {
initializePreferencesListener();// Create the preferences listener if it
// does not exist
addListenerObject(listener);
}
/**
* Return the preference path to search preferences on. This is the list of
* preference nodes based on the scope contexts for this store. If there are
* no search contexts set, then return this store's context.
* <p>
* Whether or not the default context should be included in the resulting
* list is specified by the <code>includeDefault</code> parameter.
* </p>
*
* @param includeDefault
* <code>true</code> if the default context should be included
* and <code>false</code> otherwise
* @return IEclipsePreferences[]
* @since 3.4 public, was added in 3.1 as private method
*/
public IEclipsePreferences[] getPreferenceNodes(boolean includeDefault) {
// if the user didn't specify a search order, then return the scope that
// this store was created on. (and optionally the default)
if (searchContexts == null) {
if (includeDefault) {
return new IEclipsePreferences[] { getStorePreferences(),
getDefaultPreferences() };
}
return new IEclipsePreferences[] { getStorePreferences() };
}
// otherwise the user specified a search order so return the appropriate
// nodes based on it
int length = searchContexts.length;
if (includeDefault) {
length++;
}
IEclipsePreferences[] preferences = new IEclipsePreferences[length];
for (int i = 0; i < searchContexts.length; i++) {
preferences[i] = searchContexts[i].getNode(nodeQualifier);
}
if (includeDefault) {
preferences[length - 1] = getDefaultPreferences();
}
return preferences;
}
/**
* Set the search contexts to scopes. When searching for a value the seach
* will be done in the order of scope contexts and will not search the
* storeContext unless it is in this list.
* <p>
* If the given list is <code>null</code>, then clear this store's search
* contexts. This means that only this store's scope context and default
* scope will be used during preference value searching.
* </p>
* <p>
* The defaultContext will be added to the end of this list automatically
* and <em>MUST NOT</em> be included by the user.
* </p>
*
* @param scopes
* a list of scope contexts to use when searching, or
* <code>null</code>
*/
public void setSearchContexts(IScopeContext[] scopes) {
this.searchContexts = scopes;
if (scopes == null) {
return;
}
// Assert that the default was not included (we automatically add it to
// the end)
for (int i = 0; i < scopes.length; i++) {
if (scopes[i].equals(defaultContext)) {
Assert
.isTrue(
false,
"Do not add the default to the search contexts");
}
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#contains(java.lang.String)
*/
public boolean contains(String name) {
if (name == null) {
return false;
}
return (Platform.getPreferencesService().get(name, null,
getPreferenceNodes(true))) != null;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#firePropertyChangeEvent(java.lang.String,
* java.lang.Object, java.lang.Object)
*/
public void firePropertyChangeEvent(String name, Object oldValue,
Object newValue) {
// important: create intermediate array to protect against listeners
// being added/removed during the notification
final Object[] list = getListeners();
if (list.length == 0) {
return;
}
final PropertyChangeEvent event = new PropertyChangeEvent(this, name,
oldValue, newValue);
for (int i = 0; i < list.length; i++) {
final IPropertyChangeListener listener = (IPropertyChangeListener) list[i];
SafeRunner.run(new SafeRunnable(JFaceResources
.getString("PreferenceStore.changeError")) { //$NON-NLS-1$
public void run() {
listener.propertyChange(event);
}
});
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#getBoolean(java.lang.String)
*/
public boolean getBoolean(String name) {
String value = internalGet(name);
return value == null ? BOOLEAN_DEFAULT_DEFAULT : Boolean.valueOf(value)
.booleanValue();
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#getDefaultBoolean(java.lang.String)
*/
public boolean getDefaultBoolean(String name) {
return getDefaultPreferences()
.getBoolean(name, BOOLEAN_DEFAULT_DEFAULT);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#getDefaultDouble(java.lang.String)
*/
public double getDefaultDouble(String name) {
return getDefaultPreferences().getDouble(name, DOUBLE_DEFAULT_DEFAULT);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#getDefaultFloat(java.lang.String)
*/
public float getDefaultFloat(String name) {
return getDefaultPreferences().getFloat(name, FLOAT_DEFAULT_DEFAULT);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#getDefaultInt(java.lang.String)
*/
public int getDefaultInt(String name) {
return getDefaultPreferences().getInt(name, INT_DEFAULT_DEFAULT);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#getDefaultLong(java.lang.String)
*/
public long getDefaultLong(String name) {
return getDefaultPreferences().getLong(name, LONG_DEFAULT_DEFAULT);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#getDefaultString(java.lang.String)
*/
public String getDefaultString(String name) {
return getDefaultPreferences().get(name, STRING_DEFAULT_DEFAULT);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#getDouble(java.lang.String)
*/
public double getDouble(String name) {
String value = internalGet(name);
if (value == null) {
return DOUBLE_DEFAULT_DEFAULT;
}
try {
return Double.parseDouble(value);
} catch (NumberFormatException e) {
return DOUBLE_DEFAULT_DEFAULT;
}
}
/**
* Return the string value for the specified key. Look in the nodes which
* are specified by this object's list of search scopes. If the value does
* not exist then return <code>null</code>.
*
* @param key
* the key to search with
* @return String or <code>null</code> if the value does not exist.
*/
private String internalGet(String key) {
return Platform.getPreferencesService().get(key, null,
getPreferenceNodes(true));
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#getFloat(java.lang.String)
*/
public float getFloat(String name) {
String value = internalGet(name);
if (value == null) {
return FLOAT_DEFAULT_DEFAULT;
}
try {
return Float.parseFloat(value);
} catch (NumberFormatException e) {
return FLOAT_DEFAULT_DEFAULT;
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#getInt(java.lang.String)
*/
public int getInt(String name) {
String value = internalGet(name);
if (value == null) {
return INT_DEFAULT_DEFAULT;
}
try {
return Integer.parseInt(value);
} catch (NumberFormatException e) {
return INT_DEFAULT_DEFAULT;
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#getLong(java.lang.String)
*/
public long getLong(String name) {
String value = internalGet(name);
if (value == null) {
return LONG_DEFAULT_DEFAULT;
}
try {
return Long.parseLong(value);
} catch (NumberFormatException e) {
return LONG_DEFAULT_DEFAULT;
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#getString(java.lang.String)
*/
public String getString(String name) {
String value = internalGet(name);
return value == null ? STRING_DEFAULT_DEFAULT : value;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#isDefault(java.lang.String)
*/
public boolean isDefault(String name) {
if (name == null) {
return false;
}
return (Platform.getPreferencesService().get(name, null,
getPreferenceNodes(false))) == null;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#needsSaving()
*/
public boolean needsSaving() {
return dirty;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#putValue(java.lang.String,
* java.lang.String)
*/
public void putValue(String name, String value) {
try {
// Do not notify listeners
silentRunning = true;
getStorePreferences().put(name, value);
} finally {
// Be sure that an exception does not stop property updates
silentRunning = false;
dirty = true;
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
*/
public void removePropertyChangeListener(IPropertyChangeListener listener) {
removeListenerObject(listener);
if (!isListenerAttached()) {
disposePreferenceStoreListener();
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String,
* double)
*/
public void setDefault(String name, double value) {
getDefaultPreferences().putDouble(name, value);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String,
* float)
*/
public void setDefault(String name, float value) {
getDefaultPreferences().putFloat(name, value);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String,
* int)
*/
public void setDefault(String name, int value) {
getDefaultPreferences().putInt(name, value);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String,
* long)
*/
public void setDefault(String name, long value) {
getDefaultPreferences().putLong(name, value);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String,
* java.lang.String)
*/
public void setDefault(String name, String defaultObject) {
getDefaultPreferences().put(name, defaultObject);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#setDefault(java.lang.String,
* boolean)
*/
public void setDefault(String name, boolean value) {
getDefaultPreferences().putBoolean(name, value);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#setToDefault(java.lang.String)
*/
public void setToDefault(String name) {
String oldValue = getString(name);
String defaultValue = getDefaultString(name);
try {
silentRunning = true;// Turn off updates from the store
// removing a non-existing preference is a no-op so call the Core
// API directly
getStorePreferences().remove(name);
if (oldValue != defaultValue){
dirty = true;
firePropertyChangeEvent(name, oldValue, defaultValue);
}
} finally {
silentRunning = false;// Restart listening to preferences
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String,
* double)
*/
public void setValue(String name, double value) {
double oldValue = getDouble(name);
if (oldValue == value) {
return;
}
try {
silentRunning = true;// Turn off updates from the store
if (getDefaultDouble(name) == value) {
getStorePreferences().remove(name);
} else {
getStorePreferences().putDouble(name, value);
}
dirty = true;
firePropertyChangeEvent(name, new Double(oldValue), new Double(
value));
} finally {
silentRunning = false;// Restart listening to preferences
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String,
* float)
*/
public void setValue(String name, float value) {
float oldValue = getFloat(name);
if (oldValue == value) {
return;
}
try {
silentRunning = true;// Turn off updates from the store
if (getDefaultFloat(name) == value) {
getStorePreferences().remove(name);
} else {
getStorePreferences().putFloat(name, value);
}
dirty = true;
firePropertyChangeEvent(name, new Float(oldValue), new Float(value));
} finally {
silentRunning = false;// Restart listening to preferences
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String,
* int)
*/
public void setValue(String name, int value) {
int oldValue = getInt(name);
if (oldValue == value) {
return;
}
try {
silentRunning = true;// Turn off updates from the store
if (getDefaultInt(name) == value) {
getStorePreferences().remove(name);
} else {
getStorePreferences().putInt(name, value);
}
dirty = true;
firePropertyChangeEvent(name, new Integer(oldValue), new Integer(
value));
} finally {
silentRunning = false;// Restart listening to preferences
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String,
* long)
*/
public void setValue(String name, long value) {
long oldValue = getLong(name);
if (oldValue == value) {
return;
}
try {
silentRunning = true;// Turn off updates from the store
if (getDefaultLong(name) == value) {
getStorePreferences().remove(name);
} else {
getStorePreferences().putLong(name, value);
}
dirty = true;
firePropertyChangeEvent(name, new Long(oldValue), new Long(value));
} finally {
silentRunning = false;// Restart listening to preferences
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String,
* java.lang.String)
*/
public void setValue(String name, String value) {
// Do not turn on silent running here as Strings are propagated
if (getDefaultString(name).equals(value)) {
getStorePreferences().remove(name);
} else {
getStorePreferences().put(name, value);
}
dirty = true;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPreferenceStore#setValue(java.lang.String,
* boolean)
*/
public void setValue(String name, boolean value) {
boolean oldValue = getBoolean(name);
if (oldValue == value) {
return;
}
try {
silentRunning = true;// Turn off updates from the store
if (getDefaultBoolean(name) == value) {
getStorePreferences().remove(name);
} else {
getStorePreferences().putBoolean(name, value);
}
dirty = true;
firePropertyChangeEvent(name, oldValue ? Boolean.TRUE
: Boolean.FALSE, value ? Boolean.TRUE : Boolean.FALSE);
} finally {
silentRunning = false;// Restart listening to preferences
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.preference.IPersistentPreferenceStore#save()
*/
public void save() throws IOException {
try {
getStorePreferences().flush();
dirty = false;
} catch (BackingStoreException e) {
throw new IOException(e.getMessage());
}
}
/**
* Dispose the receiver.
*/
private void disposePreferenceStoreListener() {
IEclipsePreferences root = (IEclipsePreferences) Platform
.getPreferencesService().getRootNode().node(
Plugin.PLUGIN_PREFERENCE_SCOPE);
try {
if (!(root.nodeExists(nodeQualifier))) {
return;
}
} catch (BackingStoreException e) {
return;// No need to report here as the node won't have the
// listener
}
IEclipsePreferences preferences = getStorePreferences();
if (preferences == null) {
return;
}
if (preferencesListener != null) {
preferences.removePreferenceChangeListener(preferencesListener);
preferencesListener = null;
}
}
}

View File

@ -1,57 +0,0 @@
/*******************************************************************************
* Copyright (c) 2014 OPCoach.
* 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:
* Manumitting Technologies : Brian de Alwis for initial API and implementation
* OPCoach : O.Prouvost fix bugs on hierarchy
*******************************************************************************//*
* Handler to open up a configured preferences dialog.
* Written by Brian de Alwis, Manumitting Technologies.
* Placed in the public domain.
* This code comes from : http://www.eclipse.org/forums/index.php/fa/4347/
* and was referenced in the thread : http://www.eclipse.org/forums/index.php/m/750139/
*/
package com.opcoach.e4.preferences.handlers;
import javax.inject.Named;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.ui.services.IServiceConstants;
import org.eclipse.jface.preference.PreferenceDialog;
import org.eclipse.jface.preference.PreferenceManager;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.swt.widgets.Shell;
import com.opcoach.e4.preferences.internal.E4PreferenceRegistry;
public class E4PreferencesHandler
{
@CanExecute
public boolean canExecute()
{
return true;
}
@Execute
public void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell, E4PreferenceRegistry prefReg)
{
PreferenceManager pm = prefReg.getPreferenceManager();
PreferenceDialog dialog = new PreferenceDialog(shell, pm);
dialog.create();
dialog.getTreeViewer().setComparator(new ViewerComparator());
dialog.getTreeViewer().expandAll();
dialog.open();
}
}

View File

@ -1,321 +0,0 @@
/*******************************************************************************
* Copyright (c) 2014 OPCoach.
* 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:
* OPCoach - initial API and implementation
*******************************************************************************/
package com.opcoach.e4.preferences.internal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import javax.inject.Inject;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.e4.core.di.annotations.Creatable;
import org.eclipse.e4.core.services.contributions.IContributionFactory;
import org.eclipse.e4.core.services.log.Logger;
import org.eclipse.jface.preference.IPreferenceNode;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceManager;
import org.eclipse.jface.preference.PreferenceNode;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import com.opcoach.e4.preferences.IPreferenceStoreProvider;
import com.opcoach.e4.preferences.ScopedPreferenceStore;
@SuppressWarnings("restriction")
@Creatable
public class E4PreferenceRegistry
{
public static final String PREFS_PAGE_XP = "com.opcoach.e4.preferences.e4PreferencePages"; // $NON-NLS-1$
public static final String PREF_STORE_PROVIDER = "com.opcoach.e4.preferences.e4PreferenceStoreProvider"; // $NON-NLS-1$
protected static final String ELMT_PAGE = "page"; // $NON-NLS-1$
protected static final String ATTR_ID = "id"; // $NON-NLS-1$
protected static final String ATTR_CATEGORY = "category"; // $NON-NLS-1$
protected static final String ATTR_CLASS = "class"; // $NON-NLS-1$
protected static final String ATTR_NAME = "name"; // $NON-NLS-1$
protected static final String ATTR_PLUGIN_ID = "pluginId"; // $NON-NLS-1$
protected static final String ATTR_ID_IN_WBCONTEXT = "idInWorkbenchContext"; // $NON-NLS-1$
@Inject
protected Logger logger;
@Inject
protected IEclipseContext context;
@Inject
protected IExtensionRegistry registry;
private PreferenceManager pm = null;
// A map of (pluginId, { IPreferenceStoreProvider, or key in wbcontext }
private Map<String, Object> psProviders;
public PreferenceManager getPreferenceManager()
{
// Remember of the unbounded nodes to order parent pages.
// Map<category, list of children> (all nodes except root nodes)
Map<String, Collection<IPreferenceNode>> childrenNodes = new HashMap<String, Collection<IPreferenceNode>>();
if (pm != null)
return pm;
pm = new PreferenceManager();
IContributionFactory factory = context.get(IContributionFactory.class);
for (IConfigurationElement elmt : registry.getConfigurationElementsFor(PREFS_PAGE_XP))
{
String bundleId = elmt.getNamespaceIdentifier();
if (!elmt.getName().equals(ELMT_PAGE))
{
logger.warn("unexpected element: {0}", elmt.getName());
continue;
} else if (isEmpty(elmt.getAttribute(ATTR_ID)) || isEmpty(elmt.getAttribute(ATTR_NAME)))
{
logger.warn("missing id and/or name: {}", bundleId);
continue;
}
PreferenceNode pn = null;
if (elmt.getAttribute(ATTR_CLASS) != null)
{
PreferencePage page = null;
try
{
String prefPageURI = getClassURI(bundleId, elmt.getAttribute(ATTR_CLASS));
Object object = factory.create(prefPageURI, context);
if (!(object instanceof PreferencePage))
{
logger.error("Expected instance of PreferencePage: {0}", elmt.getAttribute(ATTR_CLASS));
continue;
}
page = (PreferencePage) object;
setPreferenceStore(bundleId, page);
} catch (ClassNotFoundException e)
{
logger.error(e);
continue;
}
ContextInjectionFactory.inject(page, context);
if ((page.getTitle() == null || page.getTitle().isEmpty()) && elmt.getAttribute(ATTR_NAME) != null)
{
page.setTitle(elmt.getAttribute(ATTR_NAME));
}
pn = new PreferenceNode(elmt.getAttribute(ATTR_ID), page);
} else
{
pn = new PreferenceNode(elmt.getAttribute(ATTR_ID), new EmptyPreferencePage(elmt.getAttribute(ATTR_NAME)));
}
// Issue 2 : Fix bug on order (see :
// https://github.com/opcoach/e4Preferences/issues/2)
// Add only pages at root level and remember of child pages for
// categories
String category = elmt.getAttribute(ATTR_CATEGORY);
if (isEmpty(category))
{
pm.addToRoot(pn);
} else
{
/*
* IPreferenceNode parent = findNode(pm, category); if (parent
* == null) { // No parent found, but may be the extension has
* not been read yet. So remember of it unboundedNodes.put(pn,
* category); } else { parent.add(pn); }
*/
// Check if this category is already registered.
Collection<IPreferenceNode> children = childrenNodes.get(category);
if (children == null)
{
children = new ArrayList<IPreferenceNode>();
childrenNodes.put(category, children);
}
children.add(pn);
}
}
// Must now bind pages that has not been added in nodes (depends on the
// preference page read order)
// Iterate on all possible categories
Collection<String> categoriesDone = new ArrayList<String>();
while (!childrenNodes.isEmpty())
{
for (String cat : Collections.unmodifiableSet(childrenNodes.keySet()))
{
// Is this category already in preference manager ? If not add
// it later...
IPreferenceNode parent = findNode(pm, cat);
if (parent != null)
{
// Can add the list of children to this parent page...
for (IPreferenceNode pn : childrenNodes.get(cat))
{
parent.add(pn);
}
// Ok This parent page is done. Can remove it from map
// outside of this loop
categoriesDone.add(cat);
}
}
for (String keyToRemove : categoriesDone)
childrenNodes.remove(keyToRemove);
categoriesDone.clear();
}
return pm;
}
private void setPreferenceStore(String bundleId, PreferencePage page)
{
// Affect preference store to this page if this is a
// PreferencePage, else, must manage it internally
// Set the issue#1 on github :
// https://github.com/opcoach/e4Preferences/issues/1
// And manage the extensions of IP
initialisePreferenceStoreProviders();
IPreferenceStore store = null;
// Get the preference store according to policy.
Object data = psProviders.get(bundleId);
if (data != null)
{
if (data instanceof IPreferenceStore)
store = (IPreferenceStore) data;
else if (data instanceof IPreferenceStoreProvider)
store = ((IPreferenceStoreProvider) data).getPreferenceStore();
else if (data instanceof String)
store = (IPreferenceStore) context.get((String) data);
} else
{
// Default behavior : create a preference store for this bundle and remember of it
store = new ScopedPreferenceStore(InstanceScope.INSTANCE, bundleId);
psProviders.put(bundleId, store);
}
if (store != null)
page.setPreferenceStore(store);
else
{
logger.warn("Unable to set the preferenceStore for page " + page.getTitle() + " defined in bundle " + bundleId);
}
}
/** Read the e4PreferenceStoreProvider extension point */
private void initialisePreferenceStoreProviders()
{
if (psProviders == null)
{
IContributionFactory factory = context.get(IContributionFactory.class);
psProviders = new HashMap<String, Object>();
// Read extensions and fill the map...
for (IConfigurationElement elmt : registry.getConfigurationElementsFor(PREF_STORE_PROVIDER))
{
String declaringBundle = elmt.getNamespaceIdentifier();
String pluginId = elmt.getAttribute(ATTR_PLUGIN_ID);
if (isEmpty(pluginId))
{
logger.warn("missing plugin Id in extension " + PREF_STORE_PROVIDER + " check the plugin " + declaringBundle);
continue;
}
String classname = elmt.getAttribute(ATTR_CLASS);
String objectId = elmt.getAttribute(ATTR_ID_IN_WBCONTEXT);
if ((isEmpty(classname) && isEmpty(objectId)) || (((classname != null) && classname.length() > 0) && ((objectId != null) && objectId.length() > 0)))
{
logger.warn("In extension " + PREF_STORE_PROVIDER + " only one of the two attributes (pluginId or idInWorkbenchContext) must be set. Check the plugin "
+ declaringBundle);
continue;
}
// Ok can now work with data...
Object data = objectId;
if (classname != null)
{
data = factory.create(classname, context);
if (!(data instanceof IPreferenceStoreProvider))
{
logger.warn("In extension " + PREF_STORE_PROVIDER + " the class must implements IPreferenceStoreProvider. Check the plugin " + declaringBundle);
continue;
}
}
psProviders.put(pluginId, data);
}
}
}
private IPreferenceNode findNode(PreferenceManager pm, String categoryId)
{
for (Object o : pm.getElements(PreferenceManager.POST_ORDER))
{
if (o instanceof IPreferenceNode && ((IPreferenceNode) o).getId().equals(categoryId))
{
return (IPreferenceNode) o;
}
}
return null;
}
private String getClassURI(String definingBundleId, String spec) throws ClassNotFoundException
{
if (spec.startsWith("platform:"))
{
return spec;
} // $NON-NLS-1$
return "bundleclass://" + definingBundleId + '/' + spec;
}
private boolean isEmpty(String value)
{
return value == null || value.trim().isEmpty();
}
static class EmptyPreferencePage extends PreferencePage
{
public EmptyPreferencePage(String title)
{
setTitle(title);
noDefaultAndApplyButton();
}
@Override
protected Control createContents(Composite parent)
{
return new Label(parent, SWT.NONE);
}
}
}

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.minres.scviewer.database.feature</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.pde.FeatureBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,102 @@
featureName=SystemC simulation results viewer
providerName=MINRES Technologies GmbH
updateSiteName=SC Viewer Database Updates
description=A viewer for SystemC Verification Library transactions and VCD signals.
licenseURL=license.html
license=\
ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
March 17, 2005\n\
\n\
Usage Of Content\n\
\n\
THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
\n\
Applicable Licenses\n\
\n\
Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
is provided to you under the terms and conditions of the Eclipse Public\n\
License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
For purposes of the EPL, "Program" will mean the Content.\n\
\n\
Content includes, but is not limited to, source code, object code,\n\
documentation and other files maintained in the Eclipse.org CVS\n\
repository ("Repository") in CVS modules ("Modules") and made available\n\
as downloadable archives ("Downloads").\n\
\n\
- Content may be structured and packaged into modules to facilitate delivering,\n\
extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
plug-in fragments ("Fragments"), and features ("Features").\n\
- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
in a directory named "plugins".\n\
- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
Each Feature may be packaged as a sub-directory in a directory named "features".\n\
Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- Features may also include other Features ("Included Features"). Within a Feature, files\n\
named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
\n\
Features may also include other Features ("Included Features"). Files named\n\
"feature.xml" may contain a list of the names and version numbers of\n\
Included Features.\n\
\n\
The terms and conditions governing Plug-ins and Fragments should be\n\
contained in files named "about.html" ("Abouts"). The terms and\n\
conditions governing Features and Included Features should be contained\n\
in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
Licenses may be located in any directory of a Download or Module\n\
including, but not limited to the following locations:\n\
\n\
- The top-level (root) directory\n\
- Plug-in and Fragment directories\n\
- Inside Plug-ins and Fragments packaged as JARs\n\
- Sub-directories of the directory named "src" of certain Plug-ins\n\
- Feature directories\n\
\n\
Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
Eclipse Update Manager, you must agree to a license ("Feature Update\n\
License") during the installation process. If the Feature contains\n\
Included Features, the Feature Update License should either provide you\n\
with the terms and conditions governing the Included Features or inform\n\
you where you can locate them. Feature Update Licenses may be found in\n\
the "license" property of files named "feature.properties". Such Abouts,\n\
Feature Licenses and Feature Update Licenses contain the terms and\n\
conditions (or references to such terms and conditions) that govern your\n\
use of the associated Content in that directory.\n\
\n\
THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
\n\
- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
\n\
IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
govern that particular Content.\n\
\n\
Cryptography\n\
\n\
Content may contain encryption software. The country in which you are\n\
currently may have restrictions on the import, possession, and use,\n\
and/or re-export to another country, of encryption software. BEFORE\n\
using any encryption software, please check the country's laws,\n\
regulations and policies concerning the import, possession, or use,\n\
and re-export of encryption software, to see if this is permitted.\n\
\n\
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="com.minres.scviewer.feature"
id="com.minres.scviewer.database.feature"
label="%featureName"
version="1.0.0.qualifier"
provider-name="%providerName">
@ -29,12 +29,12 @@ http://www.eclipse.org/legal/epl-v10.html
</url>
<requires>
<import plugin="org.eclipse.equinox.ds" version="1.4.200" match="greaterOrEqual"/>
<import plugin="org.eclipse.equinox.util" version="1.0.500" match="greaterOrEqual"/>
<import plugin="org.eclipse.osgi.services" version="3.4.0" match="greaterOrEqual"/>
<import plugin="com.minres.scviewer.database" version="1.0.0" match="greaterOrEqual"/>
<import plugin="org.codehaus.groovy" version="1.8.6" match="greaterOrEqual"/>
<import plugin="com.google.guava" version="15.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.osgi"/>
<import plugin="com.minres.scviewer.database" version="1.0.0" match="greaterOrEqual"/>
<import plugin="com.minres.scviewer.database.ui" version="1.0.0" match="greaterOrEqual"/>
<import plugin="com.minres.scviewer.database.ui.swt" version="1.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.jface.text"/>
@ -43,15 +43,12 @@ http://www.eclipse.org/legal/epl-v10.html
<import plugin="org.eclipse.ui.ide"/>
<import plugin="org.eclipse.ui.views.properties.tabbed"/>
<import plugin="org.eclipse.swt"/>
<import plugin="org.apache.ant"/>
<import plugin="com.google.guava" version="15.0.0" match="greaterOrEqual"/>
<import plugin="com.minres.scviewer.database.ui" version="1.0.0" match="greaterOrEqual"/>
<import plugin="com.minres.scviewer.database.ui.swt" version="1.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.expressions" version="3.4.600" match="greaterOrEqual"/>
<import plugin="org.eclipse.jface"/>
<import plugin="org.junit"/>
<import plugin="org.eclipse.swt" version="3.103.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.equinox.registry"/>
<import plugin="org.codehaus.groovy" version="2.5.8" match="greaterOrEqual"/>
<import plugin="org.hamcrest.core" version="1.3.0" match="greaterOrEqual"/>
</requires>
<plugin
@ -68,13 +65,6 @@ http://www.eclipse.org/legal/epl-v10.html
version="0.0.0"
unpack="false"/>
<plugin
id="com.minres.scviewer.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.minres.scviewer.database.sqlite"
download-size="0"
@ -88,20 +78,6 @@ http://www.eclipse.org/legal/epl-v10.html
install-size="0"
version="0.0.0"/>
<plugin
id="com.minres.scviewer.database.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.minres.scviewer.database.ui.swt"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.minres.scviewer.database.vcd"
download-size="0"
@ -110,13 +86,7 @@ http://www.eclipse.org/legal/epl-v10.html
unpack="false"/>
<plugin
id="org.junit"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.hamcrest.core"
id="com.google.guava"
download-size="0"
install-size="0"
version="0.0.0"

View File

@ -1,13 +1,12 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>com.opcoach.e4.preferences</artifactId>
<artifactId>com.minres.scviewer.database.feature</artifactId>
<packaging>eclipse-feature</packaging>
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../com.minres.scviewer.parent</relativePath>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
<version>1.0.0-SNAPSHOT</version>
<groupId>com.minres.scviewer</groupId>
</project>

View File

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.minres.scviewer.parent</name>
<name>com.minres.scviewer.e4.feature</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<name>org.eclipse.pde.FeatureBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1 @@
bin.includes = feature.xml

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="com.minres.scviewer.e4.feature"
label="SCViewer Feature"
version="1.0.0.qualifier"
provider-name="MINRES Technologies GmbH">
<description url="http://www.example.com/description">
[Enter Feature Description here.]
</description>
<copyright url="http://www.example.com/copyright">
[Enter Copyright Description here.]
</copyright>
<license url="http://www.example.com/license">
[Enter License Description here.]
</license>
<url>
<update label="SC Viewer Updates" url="http://www.minres.com/scviewer/update"/>
</url>
<includes
id="com.minres.scviewer.database.feature"
version="0.0.0"/>
<includes
id="com.minres.scviewer.ui.feature"
version="0.0.0"/>
<requires>
<import plugin="javax.inject" version="1.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.runtime" version="3.11.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.swt" version="3.104.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.e4.ui.model.workbench" version="1.1.100" match="greaterOrEqual"/>
<import plugin="org.eclipse.jface" version="3.11.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.e4.ui.services" version="1.2.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.e4.ui.workbench" version="1.3.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.e4.core.di" version="1.5.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.e4.ui.di" version="1.1.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.e4.core.contexts" version="1.4.0" match="greaterOrEqual"/>
<import plugin="com.minres.scviewer.database.ui.swt" version="1.0.0" match="greaterOrEqual"/>
<import plugin="com.minres.scviewer.database.ui"/>
<import plugin="com.minres.scviewer.database" version="1.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.osgi.services" version="3.5.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.e4.core.services" version="2.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.jobs"/>
<import plugin="org.eclipse.osgi"/>
<import plugin="com.google.guava"/>
<import plugin="org.eclipse.equinox.preferences"/>
<import plugin="org.eclipse.core.expressions"/>
<import plugin="org.eclipse.e4.core.commands" version="0.11.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.e4.ui.workbench.addons.swt"/>
<import plugin="com.opcoach.e4.preferences"/>
<import plugin="org.eclipse.e4.core.di.extensions"/>
<import plugin="org.eclipse.e4.ui.css.swt.theme" version="0.10.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.resources" version="3.13.0" match="greaterOrEqual"/>
<import plugin="com.opcoach.e4.preferences.mainmenu" version="1.2.0" match="greaterOrEqual"/>
<import feature="com.opcoach.e4.preferences.feature" version="1.3.0.202004072127"/>
<import feature="org.eclipse.equinox.executable" version="3.8.700.v20200207-2156"/>
<import feature="org.eclipse.equinox.sdk" version="3.20.100.v20200303-1901"/>
<import feature="org.eclipse.sdk" version="4.15.0.v20200305-0155"/>
<import feature="org.eclipse.rcptt.core" version="2.5.1.M3"/>
</requires>
<plugin
id="com.minres.scviewer.e4.application"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.opcoach.e4.preferences"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>

View File

@ -0,0 +1,12 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>com.minres.scviewer.e4.feature</artifactId>
<packaging>eclipse-feature</packaging>
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<version>1.0.0-SNAPSHOT</version>
</project>

View File

@ -0,0 +1 @@
/target/

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.minres.scviewer.e4.platform.feature</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.pde.FeatureBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1 @@
bin.includes = feature.xml

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="com.minres.scviewer.e4.platform.feature"
label="SCViewer Platform Feature"
version="1.0.0.qualifier"
provider-name="MINRES Technologies GmbH">
<description url="http://www.example.com/description">
[Enter Feature Description here.]
</description>
<copyright url="http://www.example.com/copyright">
[Enter Copyright Description here.]
</copyright>
<license url="http://www.example.com/license">
[Enter License Description here.]
</license>
<includes
id="org.eclipse.e4.rcp"
version="0.0.0"/>
<includes
id="org.eclipse.emf.ecore"
version="0.0.0"/>
<includes
id="org.eclipse.emf.common"
version="0.0.0"/>
<requires>
<import plugin="org.eclipse.core.expressions" version="3.2.0" match="compatible"/>
<import plugin="org.eclipse.core.filesystem" version="1.3.0" match="compatible"/>
<import plugin="org.eclipse.core.runtime" version="3.12.0" match="compatible"/>
</requires>
<plugin
id="org.eclipse.core.resources"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.core.filesystem"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.core.filesystem.linux.x86_64"
os="linux"
arch="x86_64"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>
<plugin
id="org.eclipse.core.filesystem.win32.x86_64"
os="win32"
arch="x86_64"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"
unpack="false"/>
</feature>

View File

@ -0,0 +1,12 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>com.minres.scviewer.e4.platform.feature</artifactId>
<packaging>eclipse-feature</packaging>
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<version>1.0.0-SNAPSHOT</version>
</project>

View File

@ -0,0 +1 @@
/target/

View File

@ -0,0 +1,2 @@
bin.includes = feature.xml,\
feature.properties

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="com.minres.scviewer.feature"
label="%featureName"
version="1.0.0.qualifier"
provider-name="%providerName">
<description>
A viewer for SystemC Verification Library transactions and VCD
signals. It supports a SQLite based recording as well as the
built-in text base recording.
</description>
<copyright>
Copyright (c) 2015 MINRES Technologies GmbH.
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
</copyright>
<license url="%licenseURL">
%license
</license>
<url>
<update label="%updateSiteName" url="http://www.minres.com/scviewer/update"/>
<discovery label="MINRES Website" url="http://www.minres.com"/>
</url>
<includes
id="com.minres.scviewer.database.feature"
version="0.0.0"/>
<includes
id="com.minres.scviewer.ui.feature"
version="0.0.0"/>
<requires>
<import plugin="com.minres.scviewer.database" version="1.0.0" match="greaterOrEqual"/>
<import plugin="com.minres.scviewer.database.ui" version="1.0.0" match="greaterOrEqual"/>
<import plugin="com.minres.scviewer.database.ui.swt" version="1.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.jface.text"/>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.ui.editors"/>
<import plugin="org.eclipse.ui.ide"/>
<import plugin="org.eclipse.ui.views.properties.tabbed"/>
<import plugin="org.eclipse.swt"/>
<import plugin="org.eclipse.osgi"/>
<import plugin="org.eclipse.core.expressions" version="3.4.600" match="greaterOrEqual"/>
<import plugin="org.eclipse.jface"/>
<import plugin="com.google.guava" version="15.0.0" match="greaterOrEqual"/>
<import plugin="org.hamcrest.core" version="1.3.0" match="greaterOrEqual"/>
</requires>
<plugin
id="org.junit"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.hamcrest.core"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.minres.scviewer.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>

View File

@ -6,7 +6,7 @@
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../com.minres.scviewer.parent</relativePath>
<relativePath>../..</relativePath>
</parent>
<version>1.0.0-SNAPSHOT</version>
</project>

View File

@ -0,0 +1 @@
/target/

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.minres.scviewer.ui.feature</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.pde.FeatureBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1 @@
bin.includes = feature.xml

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="com.minres.scviewer.ui.feature"
label="SCViewer UI"
version="1.0.0.qualifier"
provider-name="MINRES Technologies GmbH">
<description url="http://www.example.com/description">
[Enter Feature Description here.]
</description>
<copyright url="http://www.example.com/copyright">
[Enter Copyright Description here.]
</copyright>
<license url="http://www.example.com/license">
[Enter License Description here.]
</license>
<plugin
id="com.minres.scviewer.database.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="com.minres.scviewer.database.ui.swt"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>

View File

@ -0,0 +1,12 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>com.minres.scviewer.ui.feature</artifactId>
<packaging>eclipse-feature</packaging>
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<version>1.0.0-SNAPSHOT</version>
</project>

View File

@ -3,9 +3,13 @@
<feature url="features/com.minres.scviewer.feature_1.0.0.qualifier.jar" id="com.minres.scviewer.feature" version="1.0.0.qualifier">
<category name="com.minres.scviewer"/>
</feature>
<feature id="com.minres.scviewer.e4.feature">
<category name="com.minres.scviewer.e4"/>
</feature>
<category-def name="com.minres.scviewer" label="SCViewer">
<description>
Viewer for SystemC Verification (SCV) library&apos;s transaction recording
</description>
</category-def>
<category-def name="com.minres.scviewer.e4" label="SCViewer E4 application"/>
</site>

View File

@ -7,7 +7,7 @@
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../com.minres.scviewer.parent</relativePath>
<relativePath>../..</relativePath>
</parent>
<!-- <build>
<finalName>resources</finalName>

View File

@ -9,8 +9,6 @@ Import-Package: org.osgi.framework;version="1.3.0"
Automatic-Module-Name: com.minres.scviewer.database.leveldb
Service-Component: OSGI-INF/*.xml
Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0",
org.eclipse.equinox.util;bundle-version="1.0.500",
org.eclipse.equinox.ds;bundle-version="1.4.200",
org.eclipse.osgi.services;bundle-version="3.4.0"
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: leveldb-0.11-SNAPSHOT-uber.jar,

View File

@ -7,7 +7,7 @@
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../com.minres.scviewer.parent</relativePath>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
</project>

View File

@ -64,7 +64,7 @@ public class LevelDBLoader implements IWaveformDbLoader {
}
@Override
public List<IWaveform> getAllWaves() {
public Collection<IWaveform> getAllWaves() {
List<IWaveform> streams=new ArrayList<IWaveform>();
SeekingIterator<String, String> it = levelDb.iterator();
it.seek("s~");

View File

@ -5,10 +5,7 @@ Bundle-SymbolicName: com.minres.scviewer.database.sqlite
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: MINRES Technologies GmbH
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0",
org.eclipse.equinox.util;bundle-version="1.0.500",
org.eclipse.equinox.ds;bundle-version="1.4.200",
org.eclipse.osgi.services;bundle-version="3.4.0"
Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0"
Bundle-ClassPath: .,sqlite-jdbc-3.8.7.jar
Service-Component: OSGI-INF/component.xml
Bundle-ActivationPolicy: lazy

View File

@ -5,7 +5,7 @@
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<relativePath>../com.minres.scviewer.parent</relativePath>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
<dependencies>

View File

@ -14,6 +14,7 @@ import java.beans.IntrospectionException;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.ArrayList;
@ -60,7 +61,7 @@ public class SQLiteDbLoader implements IWaveformDbLoader {
}
@Override
public List<IWaveform> getAllWaves() {
public Collection<IWaveform> getAllWaves() {
SQLiteDatabaseSelectHandler<ScvStream> handler = new SQLiteDatabaseSelectHandler<ScvStream>(ScvStream.class, database);
List<IWaveform> streams=new ArrayList<IWaveform>();
try {
@ -80,6 +81,7 @@ public class SQLiteDbLoader implements IWaveformDbLoader {
@Override
public boolean load(IWaveformDb db, File file) throws Exception {
if(file.isDirectory() || !file.exists()) return false;
this.db=db;
try {
FileInputStream fis = new FileInputStream(file);
@ -91,6 +93,8 @@ public class SQLiteDbLoader implements IWaveformDbLoader {
if (buffer[i] != x[i]) return false;
} catch(FileNotFoundException e) {
return false;
} catch(IOException e) { //if an I/O error occurs
return false;
}
database=new SQLiteDatabase(file.getAbsolutePath());
database.setData("TIMERESOLUTION", 1L);

Some files were not shown because too many files have changed in this diff Show More