/bundles/*/target/
/releng/**/target/
/tests/*/target/
-/**/.polyglot.build.properties
+/**/.polyglot.*
org.eclipse.core.resources.prefs
org.eclipse.m2e.core.prefs
com.vaadin.designer.prefs
\ No newline at end of file
<extension>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-pomless</artifactId>
- <version>1.5.0</version>
+ <version>1.6.0</version>
</extension>
</extensions>
+## Headless Builds
+
+Official builds and testing of the platform are done with Maven.
+
To build the platform, run:
-mvn -s settings.xml package
+mvn package
or to run unit tests as well:
-mvn -s settings.xml verify
+mvn verify
+
+## Development
+
+### Eclipse IDE Setup
+
+It is generally recommended to using the latest Eclipse IDE release.
+
+However, use of Eclipse IDE 2020-03 (4.15) release is not recommended
+because of [JDT bug 561338](https://bugs.eclipse.org/bugs/show_bug.cgi?id=561338).
+
+Therefore the current recommended versions are
+* 2019-12 (4.14)
+* 2020-06 (4.16) Milestone builds for the adventurous, which have the mentioned bug fixed.
+
+#### Install Eclipse IDE Plug-ins
+
+Two plug-ins need to be installed into the IDE from P2 repositories:
+
+1. Eclipse Target Platform Definition DSL and Generator from the P2 repository at http://www.simantics.org/update/cbi/tpd/3.0.0-SNAPSHOT/
+ * Please read the detailed installation and basic use instructions
+ from [the tool's own GitHub site](https://github.com/eclipse-cbi/targetplatform-dsl)
+2. Simantics Graph Compiler plug-in from http://www.simantics.org/update/utils/
+ * Enables the IDE to compile `<bundle>/graph/*.pgraph` files
+ into `<bundle>/graph.tg` for installation into Simantics database.
+
+#### Install Required JDK
+
+This version of the platform requires at least JDK 11.
+
+It is recommended to download the Hotspot variant from [AdoptOpenJDK.net](https://adoptopenjdk.net/?variant=openjdk11&jvmVariant=hotspot).
+You can also use newer JDKs but 11 as an LTS version is recommended, especially for bundling with built products.
+
+1. Download and install a compatible JDK version
+ * For Windows, download the `.msi` installer and install it
+2. Open IDE preference page **Java / Installed JREs**.
+ If the previously installed JDK is not already in use, add it as a *Standard VM*
+ installation to the list and select the added JRE as the active JRE.
+3. Open IDE preference page **Java / Installed JREs / Execution Environments**
+ and ensure that your selected JDK is selected in the *Compatible JREs* for `JavaSE-1.6` - `JavaSE-11`.
+4. **Important:** Ensure that IDE preference page **Java / Compiler** has *Compiler compliance level* set to **11**.
+ Otherwise the IDE will use the JDTs compiler to produce the binary classes with the designated compliance level
+ regardless of what JRE you've installed to use for running your programs from the IDE.
+
+#### Clone Repository into Eclipse
+
+Use [Eclipse Git Integration - EGit](https://wiki.eclipse.org/EGit/User_Guide) to clone repositories.
+
+##### gerrit.simantics.org
+
+Gerrit is currently still the authoritative repository for the platform, so use the following for now
+
+Anonymous HTTP cloning without push rights:
+
+ git clone "https://gerrit.simantics.org/r/simantics/platform"
+
+Developers with push access:
+
+ git clone "ssh://lehtonen@gerrit.simantics.org:29418/simantics/platform"
+
+##### gitlab.simantics.org
+
+GitLab will become the authoritative repository for the platform in the future.
+Until then, please do not push directly to this repository.
+
+Just follow GitLab's cloning instructions at https://gitlab.simantics.org/simantics/platform.
+Use HTTP cloning for anonymous access and SSH for developer access.
+
+#### Import Projects into Workspace
+
+From the main menu, uncheck *Build Automatically* from the *Project*
+menu to prevent unnecessary build failures from happening before the
+setup is complete.
+
+From the *Git Repositories* view in Eclipse, choose *Import Projects* from the repository context menu.
+Import all projects into their own working set.
+
+#### Set Target Platform
+
+To get the platform to compile in the IDE, you will need to use one of the custom target platforms
+provided [releng/org.simantics.sdk.build.targetdefinition/](releng/org.simantics.sdk.build.targetdefinition).
+
+To use a minimal target platform, open [releng/org.simantics.sdk.build.targetdefinition/org.simantics.sdk.build.targetdefinition.tpd](releng/org.simantics.sdk.build.targetdefinition/org.simantics.sdk.build.targetdefinition.tpd)
+using the *Target Platform DSL Editor* and press `CTRL+R` in the editor to
+re-build the corresponding .target file and set it as the current platform.
+
+Re-enable *Build Automatically* from the *Project* main menu to start the build
+which should now succeed.
+
+#### Test
-If you're building the platform inside Eclipse IDE, remember to give
-the settings.xml file to the Maven / User Settings preference page
-User Settings field.
+Open [releng/org.simantics.desktop.rcp.product/simantics-desktop.product](releng/org.simantics.desktop.rcp.product/simantics-desktop.product)
+and press `Launch an Eclipse application in Debug mode`. The basic desktop product should start.
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry exported="true" kind="lib" path="jarhdf5-1.10.2.jar" sourcepath="hdf5-src.zip"/>\r
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>\r
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
- <classpathentry kind="src" path="src"/>\r
- <classpathentry kind="output" path="bin"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry exported="true" kind="lib" path="jarhdf5-1.10.2.jar" sourcepath="hdf5-src.zip"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
-eclipse.preferences.version=1\r
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled\r
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8\r
-org.eclipse.jdt.core.compiler.compliance=1.8\r
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error\r
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error\r
-org.eclipse.jdt.core.compiler.source=1.8\r
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: hdf.hdf5lib
Bundle-Version: 1.10.2
Bundle-Vendor: Semantum Oy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ClassPath: .,
jarhdf5-1.10.2.jar
Eclipse-BundleShape: dir
hdf.hdf5lib.structs
Bundle-NativeCode: hdf5_java.dll; processor=x86_64; osname=win32,
libhdf5.so.101; libhdf5_java.so; processor=x86_64; osname=linux
-Require-Bundle: org.slf4j.api;bundle-version="1.7.2"
+Require-Bundle: org.slf4j.api
Automatic-Module-Name: hdf.hdf5lib
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.backup,
org.eclipse.core.runtime;bundle-version="3.11.1",
org.simantics.db.procore,
- org.slf4j.api;bundle-version="1.7.2"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+ org.slf4j.api
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.simantics.acorn.internal.Activator
Service-Component: OSGI-INF/component.xml, OSGI-INF/org.simantics.acorn.AcornDriver.xml
this.updateSchedules = new ArrayList[CLUSTER_THREADS];
for(int i=0;i<clusterUpdateThreads.length;i++) {
clusterUpdateThreads[i] = Executors.newSingleThreadExecutor(new ClusterThreadFactory("Cluster Updater " + (i+1), false));
- updateSchedules[i] = new ArrayList<ClusterUpdateOperation>();
+ updateSchedules[i] = new ArrayList<>();
}
}
try {
+ TreeMap<ClusterUID, List<ClusterUpdateOperation>> updates = new TreeMap<>(clusterComparator);
+
main:
while(alive) {
- TreeMap<ClusterUID, List<ClusterUpdateOperation>> updates = new TreeMap<ClusterUID, List<ClusterUpdateOperation>>(clusterComparator);
-
+ if (!updates.isEmpty())
+ updates.clear();
operationQueue.pumpUpdates(updates);
if(updates.isEmpty()) {
for(int i=0;i<CLUSTER_THREADS;i++)
updateSchedules[i].clear();
+ if (updates.isEmpty())
+ return;
+
final Semaphore s = new Semaphore(0);
for(Map.Entry<ClusterUID, List<ClusterUpdateOperation>> entry : updates.entrySet()) {
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.action.ontology
Bundle-Version: 1.1.0.qualifier
Require-Bundle: org.simantics.layer0
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.action.ontology
Automatic-Module-Name: org.simantics.action.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.scenegraph.ontology;bundle-version="1.1.0",
org.simantics.selectionview.ui.ontology;bundle-version="1.1.0",
org.simantics.selectionview.ontology;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.annotation.ontology
Bundle-Vendor: VTT Technical Research Centre of Finland
Automatic-Module-Name: org.simantics.annotation.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.modeling.ui;bundle-version="1.1.1",
org.simantics.graph.db;bundle-version="1.1.9",
org.simantics.views.swt.client;bundle-version="1.0.0",
- org.slf4j.api;bundle-version="1.7.20"
+ org.slf4j.api
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Vendor: VTT Technical Research Centre of Finland
Export-Package: org.simantics.annotation.ui
Automatic-Module-Name: org.simantics.annotation.ui
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.db.common;bundle-version="0.6.2"
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.simantics.application.internal.Activator
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Import-Package: org.simantics.db.procore
Automatic-Module-Name: org.simantics.application
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
com.fasterxml.jackson.core.jackson-core,
org.slf4j.api,
javax.servlet-api,
- javax.ws.rs-api,
- org.eclipse.jetty.server,
- org.eclipse.jetty.servlet,
- org.eclipse.jetty.util,
+ jakarta.ws.rs-api,
+ org.eclipse.jetty.server;bundle-version="9.4.24",
+ org.eclipse.jetty.servlet;bundle-version="9.4.24",
+ org.eclipse.jetty.util;bundle-version="9.4.24",
org.glassfish.jersey.core.jersey-server,
org.glassfish.jersey.media.jersey-media-json-jackson,
org.glassfish.jersey.containers.jersey-container-servlet-core,
org.glassfish.jersey.core.jersey-client,
org.glassfish.jersey.core.jersey-common
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.audit.server
Automatic-Module-Name: org.simantics.auditlogging
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Require-Bundle: org.simantics,
org.simantics.backup.ontology,
org.simantics.backup
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Service-Component: OSGI-INF/component.xml
Automatic-Module-Name: org.simantics.backup.db
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Require-Bundle: org.eclipse.core.runtime,
org.simantics.layer0,
org.simantics.structural.ontology;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.backup.ontology
Automatic-Module-Name: org.simantics.backup.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.simantics.backup.Activator
Require-Bundle: org.eclipse.core.runtime
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.backup
Automatic-Module-Name: org.simantics.backup
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.compliance=11
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.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.basicexpression
Bundle-Version: 1.1.0.qualifier
Bundle-Vendor: VTT Technical Research Centre of Finland
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.basicexpression,
org.simantics.basicexpression.analysis,
org.simantics.basicexpression.lexer,
org.simantics.basicexpression.node,
org.simantics.basicexpression.parser
-Require-Bundle: org.slf4j.api;bundle-version="1.7.25"
+Require-Bundle: org.slf4j.api
Automatic-Module-Name: org.simantics.basicexpression
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Common Tree Browsing Implementations
Bundle-SymbolicName: org.simantics.browsing.ui.common;singleton:=true
Bundle-Version: 1.1.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.browsing.ui;bundle-version="[0.9.0,2.0.0)";visibility:=reexport,
org.simantics.utils;bundle-version="1.0.0",
org.eclipse.core.expressions;bundle-version="3.4.200",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Graph-based browsing Internals
Bundle-SymbolicName: org.simantics.browsing.ui.graph.impl
Bundle-Version: 1.1.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.browsing.ui.common;bundle-version="[0.9.0,2.0.0)",
org.simantics.utils.ui;bundle-version="1.0.0",
org.simantics.db.layer0;bundle-version="0.8.0",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.browsing.ui.graph.impl;bundle-version="1.0.0";visibility:=reexport,
org.simantics.db.layer0;bundle-version="0.8.0";visibility:=reexport,
org.simantics;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.browsing.ui.graph.contributor.imager,
org.simantics.browsing.ui.graph.contributor.labeler,
org.simantics.browsing.ui.graph.contributor.layer0,
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Modelled viewpoint support
Bundle-SymbolicName: org.simantics.browsing.ui.model
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.browsing.ui.common;bundle-version="1.1.0",
org.simantics.ui;bundle-version="1.0.0",
org.slf4j.api
import org.simantics.db.ReadGraph;
import org.simantics.db.RequestProcessor;
import org.simantics.db.Resource;
+import org.simantics.db.common.procedure.adapter.TransientCacheAsyncListener;
+import org.simantics.db.common.request.ResourceRead;
+import org.simantics.db.common.request.UnaryRead;
import org.simantics.db.common.utils.NameUtils;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.exception.ResourceNotFoundException;
import org.simantics.db.layer0.variable.Variable;
-import org.simantics.db.request.Read;
import org.simantics.scl.reflection.OntologyVersions;
import org.simantics.viewpoint.ontology.ViewpointResource;
import org.slf4j.Logger;
private static final Logger LOGGER = LoggerFactory.getLogger(BrowseContext.class);
public static final boolean DEBUG = false;
- NodeTypeMultiMap<ChildContribution> childContributions = new NodeTypeMultiMap<ChildContribution>();
- NodeTypeMultiMap<ChildContribution> parentContributions = new NodeTypeMultiMap<ChildContribution>();
- OrderedNodeTypeMultiMap<LabelContribution> labelContributions = new OrderedNodeTypeMultiMap<LabelContribution>();
- OrderedNodeTypeMultiMap<ImageContribution> imageContributions = new OrderedNodeTypeMultiMap<ImageContribution>();
- OrderedNodeTypeMultiMap<CheckedStateContribution> checkedStateContributions = new OrderedNodeTypeMultiMap<CheckedStateContribution>();
- OrderedNodeTypeMultiMap<LabelDecorationContribution> labelDecorationContributions = new OrderedNodeTypeMultiMap<LabelDecorationContribution>();
- OrderedNodeTypeMultiMap<ImageDecorationContribution> imageDecorationContributions = new OrderedNodeTypeMultiMap<ImageDecorationContribution>();
- OrderedNodeTypeMultiMap<ModifierContribution> modifierContributions = new OrderedNodeTypeMultiMap<ModifierContribution>();
- OrderedNodeTypeMultiMap<SorterContribution> sorterContributions = new OrderedNodeTypeMultiMap<SorterContribution>();
- OrderedNodeTypeMultiMap<FlatNodeContribution> flatNodeContributions = new OrderedNodeTypeMultiMap<FlatNodeContribution>();
+ NodeTypeMultiMap<ChildContribution> childContributions = new NodeTypeMultiMap<>();
+ NodeTypeMultiMap<ChildContribution> parentContributions = new NodeTypeMultiMap<>();
+ OrderedNodeTypeMultiMap<LabelContribution> labelContributions = new OrderedNodeTypeMultiMap<>();
+ OrderedNodeTypeMultiMap<ImageContribution> imageContributions = new OrderedNodeTypeMultiMap<>();
+ OrderedNodeTypeMultiMap<CheckedStateContribution> checkedStateContributions = new OrderedNodeTypeMultiMap<>();
+ OrderedNodeTypeMultiMap<LabelDecorationContribution> labelDecorationContributions = new OrderedNodeTypeMultiMap<>();
+ OrderedNodeTypeMultiMap<ImageDecorationContribution> imageDecorationContributions = new OrderedNodeTypeMultiMap<>();
+ OrderedNodeTypeMultiMap<ModifierContribution> modifierContributions = new OrderedNodeTypeMultiMap<>();
+ OrderedNodeTypeMultiMap<SorterContribution> sorterContributions = new OrderedNodeTypeMultiMap<>();
+ OrderedNodeTypeMultiMap<FlatNodeContribution> flatNodeContributions = new OrderedNodeTypeMultiMap<>();
OrderedNodeTypeMultiMap<TooltipContribution> tooltipContributions = new OrderedNodeTypeMultiMap<>();
private final String[] uris;
- private BrowseContext(String[] uris) {
+ private BrowseContext(String... uris) {
if (uris == null)
throw new NullPointerException("null URIs");
this.uris = uris;
return defaultContext;
}
+ private static BrowseContext loadCachedVisuals(ReadGraph g, Resource visualsContributionResource) throws DatabaseException, InvalidContribution {
+ try {
+ return g.syncRequest(new ResourceRead<BrowseContext>(visualsContributionResource) {
+ @Override
+ public BrowseContext perform(ReadGraph graph) throws DatabaseException {
+ try {
+ BrowseContext bc = new BrowseContext();
+ VisualsContribution.load(g, visualsContributionResource,
+ bc.labelContributions,
+ bc.imageContributions,
+ bc.checkedStateContributions,
+ bc.labelDecorationContributions,
+ bc.imageDecorationContributions,
+ bc.modifierContributions,
+ bc.sorterContributions,
+ bc.flatNodeContributions,
+ bc.tooltipContributions
+ );
+ return bc;
+ } catch (InvalidContribution e) {
+ throw new DatabaseException(e);
+ }
+ }
+ }, TransientCacheAsyncListener.instance());
+ } catch (DatabaseException e) {
+ Throwable c = e.getCause();
+ if (c instanceof InvalidContribution)
+ throw (InvalidContribution) c;
+ throw e;
+ }
+ }
+
/**
* Creates a new BrowseContext for the given Collection of {@link Resource}s.
*
for(Resource childContributionResource :
g.getObjects(browseContextResource, vr.BrowseContext_HasChildContribution)) {
try {
- ChildContribution contribution = ChildContribution.create(g, childContributionResource);
+ ChildContribution contribution = ChildContribution.createCached(g, childContributionResource);
browseContext.childContributions.put(contribution.getParentNodeType(), contribution);
browseContext.parentContributions.put(contribution.getChildNodeType(), contribution);
} catch (DatabaseException e) {
for(Resource visualsContributionResource :
g.getObjects(browseContextResource, vr.BrowseContext_HasVisualsContribution)) {
try {
- VisualsContribution.load(g, visualsContributionResource,
- browseContext.labelContributions,
- browseContext.imageContributions,
- browseContext.checkedStateContributions,
- browseContext.labelDecorationContributions,
- browseContext.imageDecorationContributions,
- browseContext.modifierContributions,
- browseContext.sorterContributions,
- browseContext.flatNodeContributions,
- browseContext.tooltipContributions
- );
+ BrowseContext visuals = loadCachedVisuals(g, visualsContributionResource);
+ visuals.labelContributions.appendTo(browseContext.labelContributions);
+ visuals.imageContributions.appendTo(browseContext.imageContributions);
+ visuals.checkedStateContributions.appendTo(browseContext.checkedStateContributions);
+ visuals.labelDecorationContributions.appendTo(browseContext.labelDecorationContributions);
+ visuals.imageDecorationContributions.appendTo(browseContext.imageDecorationContributions);
+ visuals.modifierContributions.appendTo(browseContext.modifierContributions);
+ visuals.sorterContributions.appendTo(browseContext.sorterContributions);
+ visuals.flatNodeContributions.appendTo(browseContext.flatNodeContributions);
+ visuals.tooltipContributions.appendTo(browseContext.tooltipContributions);
} catch (DatabaseException e) {
LOGGER.error("Failed to load visuals contribution " + NameUtils.getSafeName(g, visualsContributionResource), e);
}
}
public static Set<String> getBrowseContextClosure(RequestProcessor processor, final Set<String> browseContexts) throws DatabaseException {
- return processor.syncRequest(new Read<Set<String>>() {
+ return processor.syncRequest(new UnaryRead<Set<String>, Set<String>>(browseContexts) {
@Override
public Set<String> perform(ReadGraph graph) throws DatabaseException {
- Collection<Resource> browseContextResources = new ArrayList<Resource>(browseContexts.size());
- for (String browseContext : browseContexts) {
+ Collection<Resource> browseContextResources = new ArrayList<>(parameter.size());
+ for (String browseContext : parameter) {
try {
browseContextResources.add(graph.getResource(browseContext));
} catch (ResourceNotFoundException e) {
}
}
Collection<Resource> allBrowseContextResources = BrowseContext.findSubcontexts(graph, browseContextResources);
- Set<String> result = new HashSet<String>();
+ Set<String> result = new HashSet<>();
for (Resource r : allBrowseContextResources)
result.add(graph.getURI(r));
- return result;
+ return result;
}
- });
+ }, TransientCacheAsyncListener.instance());
}
- public static Collection<Resource> findSubcontexts(ReadGraph g,
+ public static Collection<Resource> findSubcontexts(ReadGraph g, Collection<Resource> browseContexts)
+ throws DatabaseException {
+ return g.syncRequest(new UnaryRead<Collection<Resource>, Collection<Resource>>(browseContexts) {
+ @Override
+ public Collection<Resource> perform(ReadGraph graph) throws DatabaseException {
+ return findSubcontexts0(graph, parameter);
+ }
+ }, TransientCacheAsyncListener.instance());
+ }
+
+ private static Collection<Resource> findSubcontexts0(ReadGraph g,
Collection<Resource> browseContexts) throws DatabaseException {
ViewpointResource vr = ViewpointResource.getInstance(g);
- HashSet<Resource> result = new HashSet<Resource>(browseContexts);
- ArrayList<Resource> stack = new ArrayList<Resource>(browseContexts);
+ HashSet<Resource> result = new HashSet<>(browseContexts);
+ ArrayList<Resource> stack = new ArrayList<>(browseContexts);
while(!stack.isEmpty()) {
Resource cur = stack.remove(stack.size()-1);
for(Resource sc : g.getObjects(cur, vr.BrowseContext_Includes))
}
return result;
}
-
+
/**
* Finds the possible children of the given {@link NodeContext} parameter.
*
import org.simantics.databoard.Bindings;
import org.simantics.db.ReadGraph;
import org.simantics.db.Resource;
+import org.simantics.db.common.procedure.adapter.TransientCacheAsyncListener;
+import org.simantics.db.common.request.ResourceRead;
import org.simantics.db.common.utils.NameUtils;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.exception.PendingVariableException;
this.priority = priority;
}
+ public static ChildContribution createCached(ReadGraph g, Resource childContributionResource) throws DatabaseException, InvalidContribution {
+ try {
+ return g.syncRequest(new ResourceRead<ChildContribution>(childContributionResource) {
+ @Override
+ public ChildContribution perform(ReadGraph graph) throws DatabaseException {
+ try {
+ return create(g, resource);
+ } catch (InvalidContribution e) {
+ throw new DatabaseException(e);
+ }
+ }
+ }, TransientCacheAsyncListener.instance());
+ } catch (DatabaseException e) {
+ Throwable c = e.getCause();
+ if (c instanceof InvalidContribution)
+ throw (InvalidContribution) c;
+ throw e;
+ }
+ }
+
public static ChildContribution create(ReadGraph g, Resource childContributionResource) throws DatabaseException, InvalidContribution {
ViewpointResource vr = ViewpointResource.getInstance(g);
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.browsing.ui.swt;bundle-version="1.1.0",
org.eclipse.nebula.widgets.nattable.core;bundle-version="1.4.0",
it.unimi.dsi.fastutil;bundle-version="7.0.6"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.browsing.ui.nattable
Bundle-Vendor: VTT Technical Research Centre of Finland
public GENatTableThemeConfiguration(GETreeData treeData, int style) {
super();
+ TextPainter cellTextPainter = new TextPainter();
+ cellTextPainter.setTrimText(false);
this.oddRowBgColor = GUIHelper.getColor(250, 250, 250);
this.defaultCellPainter =
new GEStyler(treeData,
new GEIconPainter(
new PaddingDecorator(
- new TextPainter(),
+ cellTextPainter,
0,
5,
0,
style.setAttributeValue(CellStyleAttributes.IMAGE, image);
wrapper.setSpecificConfigAttribute(CellConfigAttributes.CELL_STYLE, DisplayMode.NORMAL, "BODY", style);
+ wrapper.setSpecificConfigAttribute(CellConfigAttributes.CELL_STYLE, DisplayMode.SELECT, "BODY", style);
+ wrapper.setSpecificConfigAttribute(CellConfigAttributes.CELL_STYLE, DisplayMode.SELECT_HOVER, "BODY", style);
// wrapper.setSpecificConfigAttribute(CellStyleAttributes.FOREGROUND_COLOR, DisplayMode.NORMAL, "BODY", style.getAttributeValue(CellStyleAttributes.FOREGROUND_COLOR));
// wrapper.setSpecificConfigAttribute(CellStyleAttributes.BACKGROUND_COLOR, DisplayMode.NORMAL, "BODY", style.getAttributeValue(CellStyleAttributes.BACKGROUND_COLOR));
// wrapper.setSpecificConfigAttribute(CellStyleAttributes.FONT, DisplayMode.NORMAL, "BODY", style.getAttributeValue(CellStyleAttributes.FONT));
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.browsing.ui.ontology
Bundle-Version: 1.1.0.qualifier
Require-Bundle: org.simantics.layer0
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.browsing.ui.swt.stubs
Bundle-Vendor: VTT Technical Research Centre of Finland
Automatic-Module-Name: org.simantics.browsing.ui.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.utils.thread.swt;bundle-version="1.1.0",
org.eclipse.e4.core.contexts;bundle-version="1.1.0"
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.browsing.ui.platform
Bundle-Vendor: VTT Technical Research Centre of Finland
Automatic-Module-Name: org.simantics.browsing.ui.platform
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.eclipse.ui.forms;bundle-version="3.4.1",
com.lowagie.text;bundle-version="2.1.5",
org.eclipse.e4.core.contexts;bundle-version="1.4.0",
- org.slf4j.api;bundle-version="1.7.20",
+ org.slf4j.api,
org.eclipse.mylyn.wikitext;bundle-version="3.0.6",
org.eclipse.mylyn.wikitext.mediawiki;bundle-version="3.0.6"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.browsing.ui.swt,
org.simantics.browsing.ui.swt.contentassist,
org.simantics.browsing.ui.swt.inputs,
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.5.0";visibility:=reexport,
org.simantics.utils.datastructures;bundle-version="1.0.0";visibility:=reexport
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.browsing.ui,
org.simantics.browsing.ui.content,
org.simantics.browsing.ui.exception
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.image2.ontology;bundle-version="1.1.0",
org.simantics.selectionview.ontology;bundle-version="1.2.0",
org.simantics.simulation.ontology;bundle-version="1.1.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.charts.ontology
Automatic-Module-Name: org.simantics.charts.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.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.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.eclipse.e4.core.services,
com.fasterxml.jackson.core.jackson-core;bundle-version="2.8.2",
org.slf4j.api
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.simantics.charts
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_lON7gM4rEeWooO9VO0ELpg" featurename="bindingTables" parentElementId="xpath:/">
<elements xsi:type="commands:BindingTable" xmi:id="_pPSkQM4rEeWooO9VO0ELpg" elementId="org.simantics.charts.bindingtable.0" bindingContext="_dowfMM6dEeWsxN0a-I6jfA">
- <bindings xmi:id="_v6mlsM4rEeWooO9VO0ELpg" elementId="org.simantics.charts.keybinding.0" keySequence="1" command="_Cv5DgMm0EeW7xbSNBQl45w">
+ <bindings xmi:id="_v6mlsM4rEeWooO9VO0ELpg" elementId="org.simantics.charts.keybinding.1" keySequence="1" command="_Cv5DgMm0EeW7xbSNBQl45w">
<parameters xmi:id="_x6FxMM4rEeWooO9VO0ELpg" elementId="org.simantics.charts.parameter.zoomToFit" name="org.simantics.diagram.commandparameter.canvasCommandDelegateParameter" value="zoomToFit"/>
</bindings>
- <bindings xmi:id="_1IiO4M5GEeWooO9VO0ELpg" elementId="org.simantics.charts.keybinding.0" keySequence="2" command="_Cv5DgMm0EeW7xbSNBQl45w">
+ <bindings xmi:id="_1IiO4M5GEeWooO9VO0ELpg" elementId="org.simantics.charts.keybinding.2" keySequence="2" command="_Cv5DgMm0EeW7xbSNBQl45w">
<parameters xmi:id="_1IiO4c5GEeWooO9VO0ELpg" elementId="org.simantics.charts.parameter.zoomToFit" name="org.simantics.diagram.commandparameter.canvasCommandDelegateParameter" value="org.simantics.chart.zoomToFitHoriz"/>
</bindings>
- <bindings xmi:id="_1K3KIM5GEeWooO9VO0ELpg" elementId="org.simantics.charts.keybinding.0" keySequence="3" command="_Cv5DgMm0EeW7xbSNBQl45w">
+ <bindings xmi:id="_1K3KIM5GEeWooO9VO0ELpg" elementId="org.simantics.charts.keybinding.3" keySequence="3" command="_Cv5DgMm0EeW7xbSNBQl45w">
<parameters xmi:id="_1K3KIc5GEeWooO9VO0ELpg" elementId="org.simantics.charts.parameter.zoomToFit" name="org.simantics.diagram.commandparameter.canvasCommandDelegateParameter" value="org.simantics.chart.zoomToFitVert"/>
</bindings>
- <bindings xmi:id="_1M38UM5GEeWooO9VO0ELpg" elementId="org.simantics.charts.keybinding.0" keySequence="4" command="_Cv5DgMm0EeW7xbSNBQl45w">
+ <bindings xmi:id="_1M38UM5GEeWooO9VO0ELpg" elementId="org.simantics.charts.keybinding.4" keySequence="4" command="_Cv5DgMm0EeW7xbSNBQl45w">
<parameters xmi:id="_1M38Uc5GEeWooO9VO0ELpg" elementId="org.simantics.charts.parameter.zoomToFit" name="org.simantics.diagram.commandparameter.canvasCommandDelegateParameter" value="org.simantics.chart.autoscale"/>
</bindings>
- <bindings xmi:id="_1PRwEM5GEeWooO9VO0ELpg" elementId="org.simantics.charts.keybinding.0" keySequence="5" command="_txoiYM-9EeWsxN0a-I6jfA"/>
- <bindings xmi:id="_I2znsM70EeWsxN0a-I6jfA" elementId="org.simantics.charts.keybinding.1" keySequence="CTRL+W" command="_KG9A8M70EeWsxN0a-I6jfA"/>
- <bindings xmi:id="_o8Ce8M8ZEeWsxN0a-I6jfA" elementId="org.simantics.charts.keybinding.2" keySequence="F12" command="_0Gm58M8ZEeWsxN0a-I6jfA"/>
+ <bindings xmi:id="_1PRwEM5GEeWooO9VO0ELpg" elementId="org.simantics.charts.keybinding.5" keySequence="5" command="_txoiYM-9EeWsxN0a-I6jfA"/>
+ <bindings xmi:id="_I2znsM70EeWsxN0a-I6jfA" elementId="org.simantics.charts.keybinding.cw" keySequence="CTRL+W" command="_KG9A8M70EeWsxN0a-I6jfA"/>
+ <bindings xmi:id="_o8Ce8M8ZEeWsxN0a-I6jfA" elementId="org.simantics.charts.keybinding.f12" keySequence="F12" command="_0Gm58M8ZEeWsxN0a-I6jfA"/>
</elements>
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="__cnJQM9jEeWsxN0a-I6jfA" featurename="trimContributions" parentElementId="xpath:/">
/*******************************************************************************
- * Copyright (c) 2011 Association for Decentralized Information Management in
- * Industry THTH ry.
+ * Copyright (c) 2011,2020 Association for Decentralized Information Management
+ * in Industry THTH ry.
* 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
*
* Contributors:
* VTT Technical Research Centre of Finland - initial API and implementation
+ * Semantum Oy - #501
*******************************************************************************/
package org.simantics.charts.editor;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceDialog;
+import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.PreferencesUtil;
import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.ui.preferences.ScopedPreferenceStore;
import org.simantics.charts.ui.CSVProgressMonitor;
IStatusLineManager status = editor.getEditorSite().getActionBars().getStatusLineManager();
final Shell shell = HandlerUtil.getActiveShell(event);
- final AtomicBoolean result = new AtomicBoolean(false);
+ // Find a good value to use for START_TIME based on the current horizontal ruler
+ // time range and the data start time.
+ IPreferenceStore csvnode = new ScopedPreferenceStore( InstanceScope.INSTANCE, CSVPreferences.P_NODE );
+ double oldStartTime = csvnode.getDouble(CSVPreferences.P_CSV_START_TIME);
+ double timeStep = csvnode.getDouble(CSVPreferences.P_CSV_TIME_STEP);
+ double visibleChartMinTime = trendNode.horizRuler.from;
+ double dataStartTime = trendNode.horizRuler.getItemFromTime();
+ // Find the first sample time that contains data if startTime < _from
+ double n = Math.max(0, Math.ceil((visibleChartMinTime-dataStartTime) / timeStep));
+ double temporaryStartTime = dataStartTime + n*timeStep;
+ csvnode.setValue(CSVPreferences.P_CSV_START_TIME, temporaryStartTime);
+
try {
+ PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(
+ shell, "org.simantics.modeling.csv.preferences",
+ new String[] { "org.simantics.modeling.csv.preferences" },
+ null);
+ dialog.setMessage("Select Used CSV Export Settings");
+ if (dialog.open() != Window.OK)
+ return null;
+
+ AtomicBoolean result = new AtomicBoolean(false);
PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
ErrorLogger.defaultLogError(e.getCause());
} catch (InterruptedException e) {
ErrorLogger.defaultLogError(e);
+ } finally {
+ csvnode.setValue(CSVPreferences.P_CSV_START_TIME, oldStartTime);
}
return null;
for (TrendItem i : t.spec.items) {
if (i.hidden) continue;
- List<Bean> items = im.search("variableId", i.variableId);
+ List<Bean> items = im.search("groupItemId", i.groupItemId, "variableId", i.variableId);
Collections.sort(items, SamplingFormat.INTERVAL_COMPARATOR);
if (items.isEmpty()) continue;
Bean config = items.get(0);
--- /dev/null
+package org.simantics.charts.editor;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.preference.PreferenceDialog;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public class ChartPreferencesAction extends Action {
+
+ private static final String CHART_DEFAULTS_PREF_PAGE_ID = "org.simantics.charts.defaults"; //$NON-NLS-1$
+ private static final String CHART_PREF_PAGE_ID = "org.simantics.charts.pref"; //$NON-NLS-1$
+ private static final String CSV_PREF_PAGE_ID = "org.simantics.modeling.csv.preferences"; //$NON-NLS-1$
+
+ private IShellProvider shell;
+
+ public ChartPreferencesAction(IShellProvider shell) {
+ super(Messages.ChartPreferencesAction_ChartPreferences);
+ this.shell = shell;
+ }
+
+ @Override
+ public void run() {
+ PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(
+ shell.getShell(),
+ CHART_PREF_PAGE_ID,
+ new String[] {
+ CHART_PREF_PAGE_ID,
+ CHART_DEFAULTS_PREF_PAGE_ID,
+ CSV_PREF_PAGE_ID
+ },
+ null);
+ dialog.open();
+ }
+
+}
\ No newline at end of file
--- /dev/null
+package org.simantics.charts.editor;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.simantics.charts.editor.messages"; //$NON-NLS-1$
+ public static String ChartPreferencesAction_ChartPreferences;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
if (chartItem != null) {
manager.add(new HideItemsAction("Hide Item", true, Collections.singletonList(chartItem)));
manager.add(new Separator());
+ manager.add(new ChartPreferencesAction(getSite()));
+ manager.add(new Separator());
manager.add(new PropertiesAction("Item Properties", canvas, chartItem));
manager.add(new PropertiesAction("Chart Properties", canvas, chart));
}
manager.add(new SendCommandAction("Zoom to Fit Vertically", IMG_ZOOM_TO_FIT_VERT, cvsCtx, Commands.ZOOM_TO_FIT_VERT));
manager.add(new SendCommandAction("Autoscale Chart", IMG_AUTOSCALE, cvsCtx, Commands.AUTOSCALE));
manager.add(new Separator());
+ manager.add(new ChartPreferencesAction(getSite()));
+ manager.add(new Separator());
manager.add(new PropertiesAction("Chart Properties", canvas, chart));
}
}
--- /dev/null
+ChartPreferencesAction_ChartPreferences=Chart Preferences
labelBuilder.append(")");
}
- List<Bean> historyItems = im.search("variableId", item.variableReference);
+ List<Bean> historyItems = im.search("groupItemId", item.groupItemId, "variableId", item.variableReference);
Collections.sort(historyItems, SamplingFormat.INTERVAL_COMPARATOR);
if (items.isEmpty()) continue;
Bean config = historyItems.get(0);
// Output
@Optional public String subscription = "Default";
- @Optional public String unit = "";
+ @Optional public String unit;
@Optional public Double min, max, deadband, interval, gain, bias;
@Optional public DrawMode drawmode;
@Optional public Scale scale;
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
-#Mon Oct 03 15:37:46 EEST 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.color.ontology
Bundle-Version: 1.1.0.qualifier
Require-Bundle: org.simantics.layer0
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.color
Automatic-Module-Name: org.simantics.color.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.common
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Semantum Oy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.common.color,
org.simantics.common.format,
org.simantics.common.utils
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.simantics.compressions.Activator
Require-Bundle: org.eclipse.core.runtime
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.compressions,
org.simantics.compressions.impl
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="testcases"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Databoard Plug-in
Bundle-SymbolicName: org.simantics.databoard;singleton:=true
Bundle-Version: 0.6.6.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.junit;resolution:=optional,
- org.objectweb.asm;bundle-version="[5.0.0,8.0.0)";resolution:=optional;visibility:=reexport,
+ org.objectweb.asm;bundle-version="[7.0.0,8.0.0)";resolution:=optional;visibility:=reexport,
gnu.trove3;bundle-version="3.0.0",
org.eclipse.help;bundle-version="3.5.100";resolution:=optional,
org.eclipse.swt;bundle-version="3.7.1";resolution:=optional,
org.eclipse.jface;bundle-version="3.7.0";resolution:=optional,
org.eclipse.core.runtime;bundle-version="3.7.0";resolution:=optional,
- org.apache.commons.collections;bundle-version="3.2.1",
- org.slf4j.api
+ org.slf4j.api,
+ org.apache.commons.collections4;bundle-version="4.1.0"
Export-Package: org.simantics.databoard,
org.simantics.databoard.accessor,
org.simantics.databoard.accessor.binary,
import java.util.ArrayList;
import java.util.Map;
-import org.apache.commons.collections.map.ReferenceMap;
-import org.simantics.databoard.Bindings;
+import org.apache.commons.collections4.map.AbstractReferenceMap.ReferenceStrength;
+import org.apache.commons.collections4.map.ReferenceMap;
import org.simantics.databoard.Units;
import org.simantics.databoard.binding.ArrayBinding;
import org.simantics.databoard.binding.Binding;
*/
public class AdapterFactory {
- @SuppressWarnings( "unchecked" )
- Map<AdapterRequest, AbstractAdapter> cache = (Map<AdapterRequest, AbstractAdapter>) new ReferenceMap(ReferenceMap.SOFT, ReferenceMap.HARD);
-
+ Map<AdapterRequest, AbstractAdapter> cache = new ReferenceMap<>(ReferenceStrength.SOFT, ReferenceStrength.HARD);
+
public synchronized Adapter getAdapter(Binding domain, Binding range, boolean typeAdapter, boolean mustClone)
throws AdapterConstructionException
{
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Vendor: Semantum Oy
Require-Bundle: org.simantics.layer0,
org.simantics.selectionview.ontology;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.datatypes
Automatic-Module-Name: org.simantics.datatypes.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.datatypes;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Semantum Oy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.db.common;bundle-version="1.1.0",
org.simantics.datatypes.ontology;bundle-version="1.0.0",
gnu.trove3;bundle-version="3.0.0",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry excluding="org/simantics/db/common/request/ReadRequestWithResult.java" kind="src" path="src"/>
<classpathentry kind="src" path="testcases"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.db.common
Bundle-Version: 1.1.0.qualifier
Bundle-Vendor: VTT Technical Research Centre of Finland
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.db;bundle-version="1.1.0";visibility:=reexport,
gnu.trove3;bundle-version="3.0.3",
- org.apache.log4j;bundle-version="1.2.15",
org.simantics.layer0;bundle-version="1.0.0";visibility:=reexport,
org.simantics.graph;bundle-version="1.1.4",
org.simantics.scl.reflection;bundle-version="1.0.0";visibility:=reexport,
public String getHeader() {
return getType() + getRange();
}
+
+ /**
+ * Returns true when no change sets are included.
+ */
+ public boolean isEmpty() {
+ return begin == 0 && end == 0;
+ }
}
import org.simantics.db.common.procedure.wrapper.NoneToAsyncProcedure;
import org.simantics.db.common.request.ReadRequest;
import org.simantics.db.common.request.WriteRequest;
-import org.simantics.db.common.utils.Logger;
import org.simantics.db.exception.CancelTransactionException;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.procedure.AsyncListener;
import org.simantics.db.request.WriteResult;
import org.simantics.utils.DataContainer;
import org.simantics.utils.datastructures.Pair;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class MergingGraphRequestProcessor implements AsyncRequestProcessor {
+ private static final Logger LOGGER = LoggerFactory.getLogger(MergingGraphRequestProcessor.class);
+
private static class SyncWriteRequestAdapter implements Write {
private Semaphore semaphore = new Semaphore(0);
try {
semaphore.acquire();
} catch (InterruptedException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("SyncWriteRequestAdapter interrupted", e);
}
}
try {
MergingGraphRequestProcessor.this.wait(transactionKeepalivePeriod);
} catch (InterruptedException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("MergedRead interrupted", e);
}
if (requestQueue.isEmpty())
break;
} catch(Throwable t) {
- Logger.defaultLogError(t);
+ LOGGER.error("MergedRead failed", t);
// if(currentRequest.second instanceof AsyncProcedure<?>) {
// ((AsyncProcedure<?>)currentRequest.second).exception(graph, t);
} else {
- try{
+ try {
if(currentRequest.second instanceof AsyncProcedure<?>) {
if(currentRequest.first instanceof AsyncRead) {
} catch(Throwable t) {
- Logger.defaultLogError(t);
+ LOGGER.error("MergedRead failed", t);
// if(currentRequest.second instanceof AsyncProcedure<?>) {
// ((AsyncProcedure<?>)currentRequest.second).exception(graph, t);
try {
MergingGraphRequestProcessor.this.wait(transactionKeepalivePeriod);
} catch (InterruptedException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("RunnerWriteGraphRequest interrupted", e);
}
if (requestQueue.isEmpty())
break;
graph.syncRequest(adapter);
if(callback != null) callback.accept(null);
} catch(Throwable t) {
- Logger.defaultLogError(t);
+ LOGGER.error("RunnerWriteGraphRequest failed", t);
if(callback != null) callback.accept(t);
}
else if(currentRequest.first instanceof DelayedWrite) graph.syncRequest((DelayedWrite)currentRequest.first);
if(callback != null) callback.accept(null);
} catch(Throwable t) {
- Logger.defaultLogError(t);
+ LOGGER.error("RunnerWriteGraphRequest failed", t);
if(callback != null) callback.accept(t);
}
Throwable t = throwable.get();
if(t != null) {
- Logger.defaultLogError(t);
+ LOGGER.error("syncRequest(AsyncMultiRead, AsyncMultiProcedure) failed", t);
throw new RuntimeException(t.getMessage());
}
Throwable t = throwable.get();
if(t != null) {
- Logger.defaultLogError(t);
+ LOGGER.error("syncRequest(AsyncRead, AsyncProcedure) failed", t);
throw new RuntimeException(t.getMessage());
}
@Override
public void exception(Throwable t) {
- Logger.defaultLogError(t);
+ LOGGER.error("asyncRequest(AsyncRead) failed", t);
}
});
Throwable t = throwable.get();
if(t != null) {
- Logger.defaultLogError(t);
+ LOGGER.error("syncRequest(AsyncRead) failed", t);
throw new RuntimeException(t.getMessage());
}
Throwable t = throwable.get();
if(t != null) {
- Logger.defaultLogError(t);
+ LOGGER.error("syncRequest(AsyncMultiRead) failed", t);
throw new RuntimeException(t.getMessage());
}
@Override
public void exception(Throwable t) {
- Logger.defaultLogError(t);
+ LOGGER.error("asyncRequest(Read) failed", t);
}
});
throw new UnsupportedOperationException();
}
+ @Override
+ public <T> T l0() {
+ return processor.l0();
+ }
+
}
public class ProcessorBase implements AsyncRequestProcessor {
+ @Override
+ public <T> T l0() {
+ throw new UnsupportedOperationException();
+ }
+
@Override
public <T> void asyncRequest(AsyncMultiRead<T> request, AsyncMultiProcedure<T> procedure) {
throw new UnsupportedOperationException();
* @author Hannu Niemistö
*/
public class AdaptValue extends ResourceRead<Object> {
-
+
public AdaptValue(Resource resource) {
super(resource);
}
}
};
-
+
@Override
public Object perform(ReadGraph graph) throws DatabaseException {
- String uri = graph.getURI(resource);
- if(Layer0.URIs.Functions_functionApplication.equals(uri)) return functionApplication;
+ Layer0 L0 = graph.l0();
+ if (L0.Functions_functionApplication.equalsResource(resource))
+ return functionApplication;
ComputationalValue ev = graph.adapt(resource, ComputationalValue.class);
return ev.getValue(graph, resource);
-
}
}
abstract public class TransientResourceRead<R> extends BinaryRead<Object,Resource,R> implements ReadExt {
- protected static final Object WITH_PARENT = new Object();
-
- public TransientResourceRead(ReadGraph graph, Resource parameter) throws DatabaseException {
- this(graph, graph.getService(QueryControl.class), parameter);
- }
-
- public TransientResourceRead(ReadGraph graph, QueryControl qc, Resource parameter) throws DatabaseException {
- super(resolveFirstParameter(graph, qc), parameter);
- }
-
- final private static Object resolveFirstParameter(ReadGraph graph, QueryControl qc) throws DatabaseException {
- if(qc.hasParentRequest(graph)) return WITH_PARENT;
- else return graph.getModificationCounter();
- }
-
- @Override
- final public R perform(ReadGraph _graph) throws DatabaseException {
- if(parameter == WITH_PARENT) {
- return perform(_graph, parameter2);
- } else {
- QueryControl qc = _graph.getService(QueryControl.class);
- ReadGraph graph = qc.getIndependentGraph(_graph);
- return perform(graph, parameter2);
- }
- }
-
- abstract public R perform(ReadGraph graph, Resource parameter) throws DatabaseException;
-
- @Override
- public boolean isImmutable(ReadGraph graph) throws DatabaseException {
- return graph.isImmutable(parameter2);
- }
-
+ protected static final Object WITH_PARENT = new Object();
+
+ public TransientResourceRead(ReadGraph graph, Resource parameter) throws DatabaseException {
+ this(graph, graph.getService(QueryControl.class), parameter);
+ }
+
+ public TransientResourceRead(ReadGraph graph, QueryControl qc, Resource parameter) throws DatabaseException {
+ super(resolveFirstParameter(graph, qc), parameter);
+ }
+
+ final private static Object resolveFirstParameter(ReadGraph graph, QueryControl qc) throws DatabaseException {
+ if(qc.hasParentRequest(graph)) return WITH_PARENT;
+ else return graph.getModificationCounter();
+ }
+
+ @Override
+ final public R perform(ReadGraph _graph) throws DatabaseException {
+ if(parameter == WITH_PARENT) {
+ return perform(_graph, parameter2);
+ } else {
+ QueryControl qc = _graph.getService(QueryControl.class);
+ return qc.syncRequestIndependent(_graph, new UniqueRead<R>() {
+ @Override
+ public R perform(ReadGraph graph) throws DatabaseException {
+ return TransientResourceRead.this.perform(graph, parameter2);
+ }
+ });
+ }
+ }
+
+ abstract public R perform(ReadGraph graph, Resource parameter) throws DatabaseException;
+
+ @Override
+ public boolean isImmutable(ReadGraph graph) throws DatabaseException {
+ return graph.isImmutable(parameter2);
+ }
+
}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
- * in Industry THTH ry.
- * 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:
- * VTT Technical Research Centre of Finland - initial API and implementation
- *******************************************************************************/
-package org.simantics.db.common.utils;
-
-import java.util.Properties;
-
-import org.apache.log4j.Logger;
-
-/*
- *
- * @deprecated in favor of org.simantics.db.common.Logger. Will be removed in Simantics 1.2
- *
- */
-@Deprecated
-public class ErrorLogger {
- public static final boolean ECHO = false;
- public static final Properties defaultProperties = new Properties();
- static {
- defaultProperties.put("log4j.rootCategory", "ERROR, default");
- defaultProperties.put("log4j.appender.default", "org.apache.log4j.FileAppender");
- defaultProperties.put("log4j.appender.default.File", "db-client-deprecated.log");
- defaultProperties.put("log4j.appender.default.append", "false");
- defaultProperties.put("log4j.appender.default.layout", "org.apache.log4j.PatternLayout");
- defaultProperties.put("log4j.appender.default.layout.ConversionPattern", "%-6r [%15.15t] %-5p %30.30c - %m%n");
- }
- private static LogManager defaultLogManager = new LogManager(defaultProperties);
- private static final ErrorLogger defaultErrorLogger = new ErrorLogger(LogManager.class);
- private Logger logger;
- ErrorLogger(Class<?> clazz) {
- logger = defaultLogManager.getLogger(clazz);
- }
-
- /**
- * Log a trace event.
- *
- * @param message message of the trace
- * @param exception the exception, or <code>null</code>
- */
- public void logTrace(String message, Throwable exception) {
- // Errors are much more useful with a stack trace!
- if (exception == null) {
- exception = new RuntimeException();
- }
- logger.trace(message, exception);
- }
-
- /**
- * Log an info event.
- *
- * @param message message of the info
- * @param exception the exception, or <code>null</code>
- */
- public void logInfo(String message, Throwable exception) {
- // Errors are much more useful with a stack trace!
- if (exception == null) {
- exception = new RuntimeException();
- }
- logger.info(message, exception);
- }
-
- /**
- * Log an error event.
- *
- * @param message message of the error
- * @param exception the exception, or <code>null</code>
- */
- public void logError(String message, Throwable exception) {
- // Errors are much more useful with a stack trace!
- if (exception == null) {
- exception = new RuntimeException();
- }
- logger.error(message, exception);
- }
-
- public static ErrorLogger getDefault() {
- return defaultErrorLogger;
- }
-
- public static LogManager getDefaultLogManager() {
- return defaultLogManager;
- }
- public static void defaultLogError(Throwable exception) {
- getDefault().logError(exception.getLocalizedMessage(), exception);
- if(ECHO) exception.printStackTrace();
- }
- public static void defaultLogError(String message) {
- getDefault().logError(message, null);
- if(ECHO)
- System.err.println(message);
- }
- public static void defaultLogError(String message, Throwable exception) {
- getDefault().logError(message, exception);
- if(ECHO)
- System.err.println(message);
- }
- public static void defaultLogInfo(String message) {
- getDefault().logInfo(message, null);
- if(ECHO)
- System.err.println(message);
- }
- public static void defaultLogTrace(String message) {
- getDefault().logTrace(message, null);
- if(ECHO)
- System.err.println(message);
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
- * in Industry THTH ry.
- * 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:
- * VTT Technical Research Centre of Finland - initial API and implementation
- *******************************************************************************/
-package org.simantics.db.common.utils;
-
-import java.util.Properties;
-
-import org.apache.log4j.Hierarchy;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PropertyConfigurator;
-import org.apache.log4j.spi.LoggerFactory;
-import org.apache.log4j.spi.RootLogger;
-
-/**
- * This class encapsulates a Log4J Hierarchy and centralizes all Logger access.
- */
-public class LogManager {
-
- private Hierarchy hierarchy;
-
- /**
- * Creates a new LogManager. Saves the log and state location.
- * Creates a new Hierarchy and add a new EventListener to it.
- * Configure the hierarchy with the properties passed. Add this object to
- * the list of active log managers.
- *
- * @param properties log configuration properties
- */
- public LogManager(Properties properties) {
- this.hierarchy = new Hierarchy(new RootLogger(Level.DEBUG));
- new PropertyConfigurator().doConfigure(properties, this.hierarchy);
- }
-
- /**
- * Checks if this PluginLogManager is disabled for this level.
- *
- * @param level level value
- * @return boolean true if it is disabled
- */
- public boolean isDisabled(int level) {
- return this.hierarchy.isDisabled(level);
- }
-
- /**
- * Enable logging for logging requests with level l or higher. By default
- * all levels are enabled.
- *
- * @param level level object
- */
- public void setThreshold(Level level) {
- this.hierarchy.setThreshold(level);
- }
-
- /**
- * The string version of setThreshold(Level level)
- *
- * @param level level string
- */
- public void setThreshold(String level) {
- this.hierarchy.setThreshold(level);
- }
-
- /**
- * Get the repository-wide threshold.
- *
- * @return Level
- */
- public Level getThreshold() {
- return this.hierarchy.getThreshold();
- }
-
- /**
- * Returns a new logger instance named as the first parameter using the
- * default factory. If a logger of that name already exists, then it will be
- * returned. Otherwise, a new logger will be instantiated and then linked
- * with its existing ancestors as well as children.
- *
- * @param clazz the class to get the logger for
- * @return Logger
- */
- public Logger getLogger(Class<?> clazz) {
- return this.hierarchy.getLogger(clazz.getName());
- }
-
- /**
- * Returns a new logger instance named as the first parameter using the
- * default factory. If a logger of that name already exists, then it will be
- * returned. Otherwise, a new logger will be instantiated and then linked
- * with its existing ancestors as well as children.
- *
- * @param name logger name
- * @return Logger
- */
- public Logger getLogger(String name) {
- return this.hierarchy.getLogger(name);
- }
-
- /**
- * The same as getLogger(String name) but using a factory instance instead
- * of a default factory.
- *
- * @param name logger name
- * @param factory factory instance
- * @return Logger
- */
- public Logger getLogger(String name, LoggerFactory factory) {
- return this.hierarchy.getLogger(name, factory);
- }
-
- /**
- * Returns the root of this hierarchy.
- *
- * @return Logger
- */
- public Logger getRootLogger() {
- return this.hierarchy.getRootLogger();
- }
-
- /**
- * Checks if this logger exists.
- *
- * @return Logger
- */
- public Logger exists(String name) {
- return this.hierarchy.exists(name);
- }
-
- /**
- * Disposes the logger hierarchy
- */
- public void shutdown() {
- this.hierarchy.shutdown();
- }
-
- /**
- * Resets configuration values to its defaults.
- */
- public void resetConfiguration() {
- this.hierarchy.resetConfiguration();
- }
-
-}
\ No newline at end of file
}
}
+ /**
+ * Reorders elements with a minimum number of writes. The set of elements must remain the same.
+ */
+ public static void reorder(WriteGraph g, Resource l, Iterable<Resource> order) throws DatabaseException {
+ Resource newPrev = l;
+ for (Resource r : order) {
+ Resource prev = OrderedSetUtils.prev(g, l, r);
+ if (!prev.equals(newPrev)) {
+ g.deny(prev, l, r);
+ g.claim(newPrev, l, r);
+ }
+ newPrev = r;
+ }
+ Resource newLast = newPrev;
+ Resource last = OrderedSetUtils.prev(g, l, l);
+ if (!last.equals(newLast)) {
+ g.deny(last, l, l);
+ g.claim(newLast, l, l);
+ }
+ }
+
/**
* Converts ordered set into a list.
*/
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Common DB implementation
Bundle-SymbolicName: org.simantics.db.impl
Bundle-Version: 1.1.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.db.common;bundle-version="0.8.0",
org.eclipse.core.runtime;bundle-version="3.6.0",
gnu.trove3;bundle-version="3.0.0",
import org.simantics.db.impl.query.PendingTaskSupport;
import org.simantics.db.procedure.AsyncProcedure;
import org.simantics.db.request.AsyncRead;
-public class BlockingAsyncProcedure<Result> implements AsyncProcedure<Result> {
+
+public class BlockingAsyncProcedure<Result> implements AsyncProcedure<Result>, Runnable {
private static final Object NO_RESULT = new Object();
private final Object key;
private final ReadGraphImpl queryGraph;
private final ReadGraphImpl callerGraph;
+ private final AsyncReadEntry<Result> entry;
private final AsyncProcedure<Result> procedure;
private PendingTaskSupport pendingTaskSupport;
private final boolean needsToBlock;
private Object result = NO_RESULT;
private Throwable exception = null;
-
- private ReadGraphImpl queryGraph() {
- return queryGraph;
- }
public BlockingAsyncProcedure(ReadGraphImpl callerGraph, AsyncReadEntry<Result> entry, AsyncProcedure<Result> procedure, Object key, boolean needsToBlock) {
// A new graph for evaluating the query with correct parent and asyncBarrier
- queryGraph = callerGraph.withParent(entry, () -> {
-
- dispatchProcedure(queryGraph(), callerGraph, entry, procedure, needsToBlock);
-
- }, needsToBlock);
-
+ queryGraph = callerGraph.withParent(entry, this, needsToBlock);
queryGraph.asyncBarrier.inc();
+
+ // This makes sure that caller does not quit before dispatch
+ callerGraph.asyncBarrier.inc();
+ this.entry = entry;
this.procedure = procedure;
this.key = key;
this.queryGraph.asyncBarrier.inc();
return "." + procedure;
}
- private void dispatchProcedure(ReadGraphImpl queryGraph, ReadGraphImpl parentGraph, AsyncReadEntry<Result> entry, AsyncProcedure<Result> procedure_, boolean needsToBlock) {
+ @Override
+ public void run() {
- AsyncProcedure<Result> procedure = entry != null ? entry : procedure_;
+ AsyncProcedure<Result> procedure__ = entry != null ? entry : procedure;
- ReadGraphImpl executeGraph = parentGraph.withParent(parentGraph.parent, null, needsToBlock);
+ ReadGraphImpl executeGraph = callerGraph.withParent(callerGraph.parent, null, needsToBlock);
executeGraph.asyncBarrier.inc();
+
+ // This counters the inc in the constructor
+ callerGraph.asyncBarrier.dec();
+
try {
- if(procedure != null) {
- procedure.execute(executeGraph, get());
+ if(procedure__ != null) {
+ procedure__.execute(executeGraph, get());
}
} catch (DatabaseException e) {
- if(procedure != null) procedure.exception(executeGraph, e);
+ if(procedure__ != null) procedure__.exception(executeGraph, e);
exception = e;
} catch (Throwable t) {
DatabaseException dbe = new DatabaseException(t);
- if(procedure != null) procedure.exception(executeGraph, dbe);
+ if(procedure__ != null) procedure__.exception(executeGraph, dbe);
exception = dbe;
} finally {
if (entry != null) {
assert(entry.isReady());
// This does not throw
- entry.performFromCache(executeGraph, procedure_);
+ entry.performFromCache(executeGraph, procedure);
}
executeGraph.asyncBarrier.dec();
if(needsToBlock)
- executeGraph.asyncBarrier.waitBarrier(procedure, executeGraph);
+ executeGraph.asyncBarrier.waitBarrier(procedure__, executeGraph);
}
if (BarrierTracing.BOOKKEEPING) {
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
- * in Industry THTH ry.
- * 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:
- * VTT Technical Research Centre of Finland - initial API and implementation
- *******************************************************************************/
-package org.simantics.db.impl.graph;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.simantics.db.Resource;
-import org.simantics.db.impl.query.IntSet;
-import org.simantics.db.impl.query.QuerySupport;
-
-public class ArraySet implements Set<Resource> {
-
- final Resource[] set;
-
- ArraySet(IntSet intSet, QuerySupport support) {
-
- if(intSet.data == null) {
- if(intSet.sizeOrData != IntSet.NO_DATA) {
- set = new Resource[] { support.getResource(intSet.sizeOrData) };
- } else {
- set = Resource.NONE;
- }
- } else {
- set = new Resource[intSet.sizeOrData];
- for(int i=0;i<intSet.sizeOrData;i++) set[i] = support.getResource(intSet.data[i]);
- }
-
- }
-
- @Override
- public boolean add(Resource e) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean addAll(Collection<? extends Resource> c) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void clear() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean contains(Object o) {
- for(int i=0;i<set.length;i++) if(o.equals(set[i])) return true;
- return false;
- }
-
- @Override
- public boolean containsAll(Collection<?> c) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean isEmpty() {
- return set.length == 0;
- }
-
- @Override
- public Iterator<Resource> iterator() {
-
- class ArraySetIterator implements Iterator<Resource> {
-
- int next = 0;
-
- @Override
- public boolean hasNext() {
- return next < set.length;
- }
-
- @Override
- public Resource next() {
- return set[next++];
- }
-
- @Override
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- }
-
- return new ArraySetIterator();
-
- }
-
- @Override
- public boolean remove(Object o) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean removeAll(Collection<?> c) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean retainAll(Collection<?> c) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public int size() {
- return set.length;
- }
-
- @Override
- public Object[] toArray() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public <T> T[] toArray(T[] a) {
- throw new UnsupportedOperationException();
- }
-
-}
import java.util.Collection;
import java.util.concurrent.atomic.AtomicInteger;
-import org.simantics.db.common.utils.Logger;
import org.simantics.db.exception.RuntimeDatabaseException;
import org.simantics.db.impl.query.CacheEntry;
import org.simantics.db.impl.query.QueryProcessor.AsyncBarrier;
+import org.slf4j.LoggerFactory;
public class AsyncBarrierImpl extends AtomicInteger implements AsyncBarrier {
+ private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(AsyncBarrierImpl.class);
+
private static final long serialVersionUID = 4724463372850048672L;
static final int WAIT_TIME = 60000;
}
}
if (count < 0) {
- Logger.defaultLogError(
+ LOGGER.error(
"Database request processing error. The application code has performed illegal actions (probably called multiple times the execute or exception method of a single result request.",
new Exception());
}
import org.simantics.db.ExternalValueSupport;
import org.simantics.db.ReadGraph;
import org.simantics.db.RelationContext;
+import org.simantics.db.RelationInfo;
import org.simantics.db.Resource;
import org.simantics.db.Session;
import org.simantics.db.Statement;
import org.simantics.utils.Development;
import org.simantics.utils.datastructures.Pair;
import org.simantics.utils.datastructures.collections.CollectionUtils;
-import org.simantics.utils.threads.logger.ITask;
-import org.simantics.utils.threads.logger.ThreadLogger;
import org.slf4j.LoggerFactory;
import gnu.trove.map.hash.TObjectIntHashMap;
Statement stm = getSingleStatement(resource, relation);
- return adaptContextual(stm.getObject(), new RelationContextImpl(resource, stm), RelationContext.class, clazz);
+ Object o = adaptContextual(stm.getObject(), new RelationContextImpl(resource, stm), RelationContext.class, clazz);
+ if (clazz.isInstance(o))
+ return (T)o;
+ throw new AdaptionException("Returned value is not expected class , got " + o.getClass().getName()+ " , expected " + clazz.getName());
}
try {
- int result = processor.getSingleObject(this, subject, relation);
- if(result == 0) return null;
-
- return processor.querySupport.getResource(result);
+ int result = processor.getSingleObject(this, subject, relation);
+ if(result == 0) return null;
+
+ return processor.querySupport.getResource(result);
+
+ } catch (ManyObjectsForFunctionalRelationException e) {
- } catch (ManyObjectsForFunctionalRelationException e) {
+ throw new ManyObjectsForFunctionalRelationException("Many objects in " + subject + " for functional relation " + relation);
- throw new ManyObjectsForFunctionalRelationException("subject=" + subject + ", relation=" + relation, e);
-
} catch (DatabaseException e) {
throw new ServiceException(e);
try {
- Collection<Resource> objects = getObjects(subject, relation);
- return !objects.isEmpty();
+ RelationInfo rinfo = processor.getRelationInfo(this, relation);
+ Collection<Resource> predicates = getPredicates(subject);
+
+ if (rinfo.isFinal) {
+
+ return predicates.contains(relation);
+
+ } else if (rinfo.isFunctional) {
+
+ try {
+ return processor.getSingleObject(this, subject, relation) != 0;
+ } catch (ManyObjectsForFunctionalRelationException e) {
+ return true;
+ } catch (DatabaseException e) {
+ throw new ServiceException(e);
+ }
+
+ } else {
+
+ for (Resource predicate : getPredicates(subject)) {
+ if (isSubrelationOf(predicate, relation))
+ return true;
+ }
+
+ }
+
+ return false;
} catch (ServiceException e) {
throw new ServiceException(e);
+ } catch (DatabaseException e) {
+
+ throw new ServiceException(INTERNAL_ERROR_STRING, e);
+
}
}
* Implementation of the interface RequestProcessor
*/
- @Override
- public <T> T syncRequest(final Read<T> request) throws DatabaseException {
- assert (request != null);
-
- T result = (T)QueryCache.runnerReadEntry(this, request, parent, null, null, true);
- return result;
-
- }
+ @Override
+ public <T> T syncRequest(final Read<T> request) throws DatabaseException {
+ assert (request != null);
+ return (T)QueryCache.runnerReadEntry(this, request, parent, null, null, true);
+ }
@Override
public <T> T syncRequest(Read<T> request, SyncListener<T> procedure)
return syncRequest(request, new NoneToAsyncListener<T>(procedure));
}
- @Override
- public <T> T syncRequest(final Read<T> request, final AsyncProcedure<T> procedure) throws DatabaseException {
-
- assert (request != null);
-
- ListenerBase listener = procedure != null ? getListenerBase(procedure) : null;
- T result = (T)QueryCache.runnerReadEntry(this, request, parent, listener, procedure, true);
- return result;
-
- }
+ @Override
+ public <T> T syncRequest(final Read<T> request, final AsyncProcedure<T> procedure) throws DatabaseException {
+ assert (request != null);
+ ListenerBase listener = procedure != null ? getListenerBase(procedure) : null;
+ return (T)QueryCache.runnerReadEntry(this, request, parent, listener, procedure, true);
+ }
@Override
public <T> T syncRequest(final Read<T> request,
return syncRequest(request, new NoneToAsyncListener<T>(procedure));
}
- @Override
- final public <T> T syncRequest(final AsyncRead<T> request,
- final AsyncProcedure<T> procedure) throws DatabaseException {
-
- assert (request != null);
-
- ListenerBase listener = getListenerBase(procedure);
- T result = (T)QueryCache.runnerAsyncReadEntry(this, request, parent, listener, procedure, true);
- return result;
-
- }
+ @Override
+ final public <T> T syncRequest(final AsyncRead<T> request,
+ final AsyncProcedure<T> procedure) throws DatabaseException {
+ assert (request != null);
+ ListenerBase listener = getListenerBase(procedure);
+ return (T)QueryCache.runnerAsyncReadEntry(this, request, parent, listener, procedure, true);
+ }
@Override
public <T> T syncRequest(AsyncRead<T> request,
asyncRequest(request, new NoneToAsyncListener<T>(procedure));
}
- @Override
- final public <T> void asyncRequest(final AsyncRead<T> request,
- final AsyncProcedure<T> procedure) {
+ @Override
+ final public <T> void asyncRequest(final AsyncRead<T> request,
+ final AsyncProcedure<T> procedure) {
- assert (request != null);
- assert (procedure != null);
+ assert (request != null);
+ assert (procedure != null);
AsyncBarrierImpl barrier = asyncBarrier;
if(barrier != null)
barrier.inc();
- processor.scheduleNow(new SessionTask(this) {
+ processor.scheduleNow(new SessionTask(this) {
- @Override
- public void run0(int thread) {
+ @Override
+ public void run0(int thread) {
- if(barrier != null)
- barrier.inc();
+ if(barrier != null)
+ barrier.inc();
- try {
- final ListenerBase listener = getListenerBase(procedure);
- QueryCache.runnerAsyncReadEntry(ReadGraphImpl.this, request, parent, listener, new AsyncProcedure<T>() {
+ try {
+ final ListenerBase listener = getListenerBase(procedure);
+ QueryCache.runnerAsyncReadEntry(ReadGraphImpl.this, request, parent, listener, new AsyncProcedure<T>() {
- @Override
- public void execute(AsyncReadGraph graph, T result) {
- procedure.execute(graph, result);
- if(barrier != null)
- barrier.dec();
- }
+ @Override
+ public void execute(AsyncReadGraph graph, T result) {
+ procedure.execute(graph, result);
+ if(barrier != null)
+ barrier.dec();
+ }
- @Override
- public void exception(AsyncReadGraph graph, Throwable throwable) {
- procedure.exception(graph, throwable);
+ @Override
+ public void exception(AsyncReadGraph graph, Throwable throwable) {
+ procedure.exception(graph, throwable);
if(barrier != null)
barrier.dec();
- }
-
- }, false);
- if(barrier != null)
- barrier.dec();
- } catch (DatabaseException e) {
- Logger.defaultLogError(e);
- }
- }
-
- });
+ }
+
+ }, false);
+ } catch (DatabaseException e) {
+ LOGGER.error("Error while executing async request", e);
+ } finally {
+ if(barrier != null)
+ barrier.dec();
+ }
+ }
- }
+ });
+
+ }
@Override
public <T> void asyncRequest(AsyncRead<T> request,
else return getTopLevelGraphStatic(impl.parentGraph);
}
+ @SuppressWarnings("unchecked")
+ @Override
+ public <T> T l0() {
+ return (T) processor.getL0();
+ }
+
}
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
+import java.util.IdentityHashMap;
+import java.util.Map;
import java.util.TreeMap;
import java.util.function.Consumer;
import org.simantics.databoard.Bindings;
+import org.simantics.databoard.Datatypes;
import org.simantics.databoard.accessor.Accessor;
import org.simantics.databoard.binding.Binding;
import org.simantics.databoard.binding.error.BindingConstructionException;
import org.simantics.databoard.primitives.MutableString;
import org.simantics.databoard.serialization.SerializationException;
import org.simantics.databoard.serialization.Serializer;
+import org.simantics.databoard.type.ArrayType;
+import org.simantics.databoard.type.BooleanType;
+import org.simantics.databoard.type.ByteType;
import org.simantics.databoard.type.Datatype;
+import org.simantics.databoard.type.DoubleType;
+import org.simantics.databoard.type.FloatType;
+import org.simantics.databoard.type.IntegerType;
+import org.simantics.databoard.type.LongType;
+import org.simantics.databoard.type.StringType;
+import org.simantics.databoard.type.VariantType;
import org.simantics.databoard.util.binary.RandomAccessBinary;
import org.simantics.db.DevelopmentKeys;
import org.simantics.db.ExternalValueSupport;
import org.simantics.utils.Development;
import org.simantics.utils.datastructures.Pair;
-import gnu.trove.map.hash.THashMap;
-
final public class WriteGraphImpl extends ReadGraphImpl implements WriteGraph {
}
- THashMap<Class<?>, Resource> builtinValues = new THashMap<Class<?>, Resource>(32);
+ Map<Object, Resource> builtinValues = new IdentityHashMap<>(40);
private void initBuiltinValues(Layer0 b) {
builtinValues.put(MutableByte.class, b.Byte);
builtinValues.put(MutableBoolean.class, b.Boolean);
+ builtinValues.put(Datatypes.DOUBLE, b.Double);
+ builtinValues.put(Datatypes.STRING, b.String);
+ builtinValues.put(Datatypes.INTEGER, b.Integer);
+ builtinValues.put(Datatypes.LONG, b.Long);
+ builtinValues.put(Datatypes.FLOAT, b.Float);
+ builtinValues.put(Datatypes.BYTE, b.Byte);
+ builtinValues.put(Datatypes.BOOLEAN, b.Boolean);
+ builtinValues.put(Datatypes.VARIANT, b.Variant);
+
+ builtinValues.put(Datatypes.DOUBLE_ARRAY, b.DoubleArray);
+ builtinValues.put(Datatypes.STRING_ARRAY, b.StringArray);
+ builtinValues.put(Datatypes.INTEGER_ARRAY, b.IntegerArray);
+ builtinValues.put(Datatypes.LONG_ARRAY, b.LongArray);
+ builtinValues.put(Datatypes.FLOAT_ARRAY, b.FloatArray);
+ builtinValues.put(Datatypes.BYTE_ARRAY, b.ByteArray);
+ builtinValues.put(Datatypes.BOOLEAN_ARRAY, b.BooleanArray);
+ builtinValues.put(Datatypes.VARIANT_ARRAY, b.VariantArray);
+ }
+
+ private static Datatype canonicalizeToBuiltinDatatype(Datatype datatype) {
+ if (datatype instanceof ArrayType) {
+ ArrayType at = (ArrayType) datatype;
+ datatype = at.componentType();
+ if (datatype instanceof ByteType) {
+ return Datatypes.BYTE_ARRAY;
+ } else if (datatype instanceof DoubleType) {
+ return Datatypes.DOUBLE_ARRAY;
+ } else if (datatype instanceof FloatType) {
+ return Datatypes.FLOAT_ARRAY;
+ } else if (datatype instanceof IntegerType) {
+ return Datatypes.INTEGER_ARRAY;
+ } else if (datatype instanceof LongType) {
+ return Datatypes.LONG_ARRAY;
+ } else if (datatype instanceof BooleanType) {
+ return Datatypes.BOOLEAN_ARRAY;
+ } else if (datatype instanceof StringType) {
+ return Datatypes.STRING_ARRAY;
+ } else if (datatype instanceof VariantType) {
+ return Datatypes.VARIANT_ARRAY;
+ }
+ return null;
+ }
+ if (datatype instanceof ByteType) {
+ return Datatypes.BYTE;
+ } else if (datatype instanceof DoubleType) {
+ return Datatypes.DOUBLE;
+ } else if (datatype instanceof FloatType) {
+ return Datatypes.FLOAT;
+ } else if (datatype instanceof IntegerType) {
+ return Datatypes.INTEGER;
+ } else if (datatype instanceof LongType) {
+ return Datatypes.LONG;
+ } else if (datatype instanceof BooleanType) {
+ return Datatypes.BOOLEAN;
+ } else if (datatype instanceof StringType) {
+ return Datatypes.STRING;
+ } else if (datatype instanceof VariantType) {
+ return Datatypes.VARIANT;
+ }
+ return null;
+ }
+
+ private Resource resolveBuiltinResourceType(Class<?> valueClass, Datatype datatype) {
+ Resource type = builtinValues.get(valueClass);
+ return type != null ? type : builtinValues.get(datatype);
+ }
+
+ private Resource resolveBuiltinResourceTypeByCanonicalizedDatatype(Datatype datatype, Resource defaultResult) {
+ Datatype cdt = canonicalizeToBuiltinDatatype(datatype);
+ return cdt != null ? builtinValues.get(cdt) : defaultResult;
}
@Override
initBuiltinValues(b);
Resource literal = newResource();
- Class<?> clazz = value.getClass();
- Resource type = builtinValues.get(clazz);
+ Datatype dt = binding.type();
+ Resource type = resolveBuiltinResourceType(value.getClass(), dt);
if (type == null) {
- type = b.Literal;
+ type = resolveBuiltinResourceTypeByCanonicalizedDatatype(dt, b.Literal);
Resource dataType = newResource();
claim(dataType, b.InstanceOf, null, b.DataType);
- claimValue(dataType, binding.type(), DATA_TYPE_BINDING);
+ claimValue(dataType, dt, DATA_TYPE_BINDING);
claim(literal, b.HasDataType, b.HasDataType_Inverse, dataType);
}
} else {
- Class<?> clazz = value.getClass();
- Resource type = builtinValues.get(clazz);
Resource literal = newResource();
+ Datatype dt = binding.type();
+ Resource type = resolveBuiltinResourceType(value.getClass(), dt);
if (type == null) {
- type = b.Literal;
+ type = resolveBuiltinResourceTypeByCanonicalizedDatatype(dt, b.Literal);
Resource dataType = newResource();
claim(dataType, b.InstanceOf, null, b.DataType);
- claimValue(dataType, binding.type(), DATA_TYPE_BINDING);
+ claimValue(dataType, dt, DATA_TYPE_BINDING);
claim(literal, b.HasDataType, null, dataType);
}
claim(literal, b.InstanceOf, null, type);
});
}
-
+
+ @Override
+ public void serializeValue(QuerySerializer serializer) {
+ IntArray is = getResult();
+ is.serialize(serializer);
+ }
+
}
--- /dev/null
+package org.simantics.db.impl.query;
+
+import org.simantics.db.exception.DatabaseException;
+
+public class AssertedPredicatesFactory extends QueryFactoryBase {
+
+ @Override
+ public CacheEntryBase readKeyAndValue(QueryDeserializer deserializer) throws DatabaseException {
+ AssertedPredicates result = reference(deserializer);
+ IntArray ia = IntArray.deserialize(deserializer);
+ result.setResult(ia);
+ result.setReady();
+ return result;
+ }
+
+ @Override
+ public <T extends CacheEntryBase> T reference(QueryDeserializer deserializer) throws DatabaseException {
+ return (T)deserializer.readAssertedPredicates();
+ }
+
+}
--- /dev/null
+package org.simantics.db.impl.query;
+
+import org.simantics.db.exception.DatabaseException;
+
+public class AssertedStatementsFactory extends QueryFactoryBase {
+
+ @Override
+ public CacheEntryBase readKeyAndValue(QueryDeserializer deserializer) throws DatabaseException {
+ AssertedStatements result = reference(deserializer);
+ IntArray ia = IntArray.deserialize(deserializer);
+ result.setResult(ia);
+ result.setReady();
+ return result;
+ }
+
+ @Override
+ public <T extends CacheEntryBase> T reference(QueryDeserializer deserializer) throws DatabaseException {
+ return (T)deserializer.readAssertedStatements();
+ }
+
+}
return graph.processor.cache.performQuery(graph, id, this, procedure);
}
+ @Override
+ public String classId() {
+ return null;
+ }
+
}
}
}
+ @Override
+ public String classId() {
+ return null;
+ }
+
}
abstract public void removeEntry(QueryProcessor provider);
+ @Override
+ public long cluster(QueryProcessor processor) {
+ return processor.cluster(r1());
+ }
+
+ @Override
+ public void serializeKey(QuerySerializer serializer) {
+ serializer.addResource(r1());
+ serializer.addResource(r2());
+ }
+
}
*******************************************************************************/
package org.simantics.db.impl.query;
+import java.util.Collection;
+
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.impl.graph.ReadGraphImpl;
abstract Query getQuery();
abstract CacheEntry pruneFirstParents();
+ abstract void pruneParentSet();
abstract void removeParent(CacheEntry entry);
abstract void addParent(CacheEntry entry);
abstract boolean hasParents();
- abstract Iterable<CacheEntry<?>> getParents(QueryProcessor processor);
+ abstract Collection<CacheEntry<?>> getParents(QueryProcessor processor);
abstract CacheEntry getFirstParent(QueryProcessor processor);
abstract boolean moreThanOneParent(QueryProcessor processor);
abstract int parentCount(QueryProcessor processor);
package org.simantics.db.impl.query;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Iterator;
import org.simantics.databoard.Bindings;
}
}
-
+
+ @Override
+ void pruneParentSet() {
+ // First parent is discarded => look for more parents
+ if(p2OrParents instanceof QueryIdentityHashSet) {
+
+ QueryIdentityHashSet set = (QueryIdentityHashSet)p2OrParents;
+ set.removeDiscardedReally();
+ if(set.isEmpty()) p2OrParents = null;
+
+ } else if(p2OrParents instanceof CacheEntry) {
+
+ CacheEntry entry = (CacheEntry)p2OrParents;
+ if(entry.isDiscarded()) {
+ // Second entry is also discarded => all empty
+ p2OrParents = null;
+ }
+
+ } else {
+
+ // Nothing left
+
+ }
+ }
+
@Override
final public void removeParent(CacheEntry entry) {
}
@Override
- final public Iterable<CacheEntry<?>> getParents(QueryProcessor processor) {
+ final public Collection<CacheEntry<?>> getParents(QueryProcessor processor) {
ArrayList<CacheEntry<?>> result = new ArrayList<CacheEntry<?>>();
if(p1 != null) result.add(p1);
public CacheEntryBase() {
}
+
+ public String classId() {
+ return getClass().getName();
+ }
+
+ public void serializeKey(QuerySerializer serializer) {
+ throw new IllegalStateException("Cannot serialize query key for " + this);
+ }
+
+ public void serializeValue(QuerySerializer serializer) {
+ throw new IllegalStateException("Cannot serialize query value for " + this);
+ }
+
+ public void serializeParents(QuerySerializer serializer) {
+ Collection<CacheEntry<?>> ps = getParents(serializer.getQueryProcessor());
+ int sizePos = serializer.writeUnknownSize();
+ int actual = 0;
+ for(CacheEntry<?> entry : ps) {
+ CacheEntryBase b = (CacheEntryBase)entry;
+ String cid = b.classId();
+ if(cid == null)
+ continue;
+ serializer.serializeId(b.classId());
+ b.serializeKey(serializer);
+ actual++;
+ }
+ serializer.setUnknownSize(sizePos, actual);
+ }
+
+ public long cluster(QueryProcessor processor) {
+ throw new IllegalStateException("Cannot compute query cluster for " + this);
+ }
+
+ public void serialize(QuerySerializer serializer) {
+ serializer.serializeId(classId());
+ serializeKey(serializer);
+ serializeValue(serializer);
+ serializeParents(serializer);
+ }
}
}
+ @Override
+ public void serializeValue(QuerySerializer serializer) {
+ ObjectResourceIdMap<String> is = getResult();
+ serializer.writeLE(is.size());
+ for(String s : is.keySet()) {
+ serializer.addString(s);
+ serializer.addResource(is.getId(s));
+ }
+ }
+
@Override
public String toString() {
return "ChildMap[" + id + "]";
--- /dev/null
+package org.simantics.db.impl.query;
+
+import org.simantics.db.ObjectResourceIdMap;
+import org.simantics.db.exception.DatabaseException;
+
+public class ChildMapFactory extends QueryFactoryBase {
+
+ @Override
+ public CacheEntryBase readKeyAndValue(QueryDeserializer deserializer) throws DatabaseException {
+ ChildMap result = reference(deserializer);
+ ObjectResourceIdMap<String> map = deserializer.createChildMap();
+ int size = deserializer.readLE4();
+ for(int i=0;i<size;i++) {
+ String key = deserializer.readString();
+ int r2 = deserializer.readResource();
+ map.putId(key, r2);
+ }
+ result.setResult(map);
+ result.setReady();
+ return result;
+ }
+
+ @Override
+ public <T extends CacheEntryBase> T reference(QueryDeserializer deserializer) throws DatabaseException {
+ return (T)deserializer.readChildMap();
+ }
+
+}
*******************************************************************************/
package org.simantics.db.impl.query;
-
-
-
abstract public class CollectionBinaryQuery<T> extends BinaryQuery<T> {
public CollectionBinaryQuery(final int r1, final int r2) {
if(size == 0) setResult(IntArray.EMPTY);
else v.trim();
}
-
+
+ @Override
+ public void serializeValue(QuerySerializer serializer) {
+ IntArray is = getResult();
+ is.serialize(serializer);
+ }
+
}
except(throwable);
}
+ @Override
+ public void serializeValue(QuerySerializer serializer) {
+ IntArray is = getResult();
+ is.serialize(serializer);
+ }
+
}
--- /dev/null
+package org.simantics.db.impl.query;
+
+import org.simantics.db.exception.DatabaseException;
+
+public class DirectObjectsFactory extends QueryFactoryBase {
+
+ @Override
+ public CacheEntryBase readKeyAndValue(QueryDeserializer deserializer) throws DatabaseException {
+ DirectObjects result = reference(deserializer);
+ IntArray ia = IntArray.deserialize(deserializer);
+ result.setResult(ia);
+ result.setReady();
+ return result;
+ }
+
+ @Override
+ public <T extends CacheEntryBase> T reference(QueryDeserializer deserializer) throws DatabaseException {
+ return (T)deserializer.readDirectObjects();
+ }
+
+}
import org.simantics.db.impl.graph.ReadGraphImpl;
import org.simantics.db.impl.procedure.InternalProcedure;
-public final class DirectPredicates extends UnaryQueryP<IntSet> {
+public final class DirectPredicates extends UnaryQueryPIntSet {
DirectPredicates(final int resource) {
super(resource);
--- /dev/null
+package org.simantics.db.impl.query;
+
+import org.simantics.db.exception.DatabaseException;
+
+public class DirectPredicatesFactory extends QueryFactoryBase {
+
+ @Override
+ public CacheEntryBase readKeyAndValue(QueryDeserializer deserializer) throws DatabaseException {
+ DirectPredicates result = reference(deserializer);
+ IntSet is = IntSet.deserialize(deserializer);
+ result.setResult(is);
+ result.setReady();
+ return result;
+ }
+
+ @Override
+ public <T extends CacheEntryBase> T reference(QueryDeserializer deserializer) throws DatabaseException {
+ return (T)deserializer.readDirectPredicates();
+ }
+
+}
final LinkedList<T> items = new LinkedList<T>();
protected ExternalRead<T> id;
- protected ReadGraphImpl graph;
+ protected QueryProcessor processor;
protected boolean registered = false;
@Override
public void discard() {
id.unregistered();
id = null;
- graph = null;
+ processor = null;
super.discard();
}
public ExternalReadEntry(ExternalRead<T> request, ReadGraphImpl graph) {
assert request != null;
this.id = request;
- this.graph = graph;
+ this.processor = graph.processor;
}
@Override
synchronized(items) {
items.addLast(result);
- graph.processor.updatePrimitive(id);
+ processor.updatePrimitive(id);
// TODO: implement flags/logic in ExternalRead to state that all but the latest request result can be evaporated
// In some cases where data is produced really fast this might be necessary but currently this queueing will do.
}
@Override
public boolean isDisposed() {
- return registered && (isDiscarded() || !graph.processor.isBound(this));
+ return registered && (isDiscarded() || !processor.isBound(this));
}
-
+
+ @Override
+ public String classId() {
+ return null;
+ }
+
}
import java.util.Arrays;
+import org.simantics.db.exception.DatabaseException;
+
final public class IntArray {
}
return result;
}
-
+
+ public void serialize(QuerySerializer serializer) {
+ int size = size();
+ serializer.writeLE(size);
+ if(size == 1) {
+ serializer.addResource(sizeOrData);
+ } else {
+ for(int i=0;i<size;i++)
+ serializer.addResource(data[i]);
+ }
+ }
+
+ public static IntArray deserialize(QueryDeserializer deserializer) throws DatabaseException {
+ int size = deserializer.readLE4();
+ IntArray result = new IntArray();
+ for(int i=0;i<size;i++) {
+ result.add(deserializer.readResource());
+ }
+ return result;
+ }
+
@Override
public boolean equals(Object object) {
if (this == object)
public int[] data;
- /** the index after the last entry in the list */
- public int sizeOrData;
+ private int sizeOrData;
/** the default capacity for new lists */
protected static final int DEFAULT_CAPACITY = 3;
private IntSet() {
support = null;
+ data = null;
+ sizeOrData = NO_DATA;
}
public IntSet(QuerySupport support) {
}
procedure.finished(graph);
}
+
+ public void serialize(QuerySerializer serializer) {
+ serializer.writeLE(size());
+ forEach(new TIntProcedure() {
+
+ @Override
+ public boolean execute(int value) {
+ serializer.addResource(value);
+ return true;
+ }
+ });
+ }
+
+ public static IntSet deserialize(QueryDeserializer deserializer) throws DatabaseException {
+ int size = deserializer.readLE4();
+ IntSet result = new IntSet();
+ for(int i=0;i<size;i++) {
+ result.add(deserializer.readResource());
+ }
+ return result;
+ }
}
\ No newline at end of file
public final class Objects extends CollectionBinaryQuery<IntProcedure> implements IntProcedure {
- public Objects(final int r1, final int r2) {
- super(r1, r2);
- }
-
- @Override
- final public void removeEntry(QueryProcessor provider) {
- provider.cache.remove(this);
- }
-
- final static private IntArray getAssertionMap(ReadGraphImpl graph, final int r1, final int r2, final Objects entry) throws DatabaseException {
-
- class AssertionMapProc implements IntProcedure {
-
- boolean first = true;
-
- private IntArray result;
-
- public void addStatement(int s, int p, int o) {
-
- if(result.size() == 0) {
- result.add(s);
- result.add(p);
- result.add(o);
- } else {
- for(int i = 0;i < result.sizeOrData ; i+=3) {
- int existingP = result.data[i+1];
- if(p == existingP) {
- int existingO = result.data[i+2];
- if(existingO == o) return;
- }
- }
- result.add(s);
- result.add(p);
- result.add(o);
- }
-
- }
-
- @Override
- public void execute(ReadGraphImpl graph, int type) throws DatabaseException {
- if(result == null) {
- result = QueryCacheBase.resultAssertedStatements(graph, type, r2, entry, null);
- } else {
- if (first) {
- IntArray ia = result;
- result = new IntArray();
- if(ia.data != null) {
- for(int i = 0;i < ia.sizeOrData ; i+=3) addStatement(ia.data[i],ia.data[i+1],ia.data[i+2]);
- }
- first = false;
- }
- IntArray ia = QueryCacheBase.resultAssertedStatements(graph, type, r2, entry, null);
- if(ia.data != null) {
- for(int i = 0;i < ia.sizeOrData ; i+=3) addStatement(ia.data[i],ia.data[i+1],ia.data[i+2]);
- }
- }
- }
+ public Objects(final int r1, final int r2) {
+ super(r1, r2);
+ }
- @Override
- public void finished(ReadGraphImpl graph) {
- }
+ @Override
+ final public void removeEntry(QueryProcessor provider) {
+ provider.cache.remove(this);
+ }
- @Override
- public void exception(ReadGraphImpl graph, Throwable throwable) {
- }
+ final static private IntArray getAssertionMap(ReadGraphImpl graph, final int r1, final int r2, final Objects entry) throws DatabaseException {
+
+ class AssertionMapProc implements IntProcedure {
+
+ boolean first = true;
+
+ private IntArray result;
+
+ public void addStatement(int s, int p, int o) {
+
+ if(result.size() == 0) {
+ result.add(s);
+ result.add(p);
+ result.add(o);
+ } else {
+ for(int i = 0;i < result.sizeOrData ; i+=3) {
+ int existingP = result.data[i+1];
+ if(p == existingP) {
+ int existingO = result.data[i+2];
+ if(existingO == o) return;
+ }
+ }
+ result.add(s);
+ result.add(p);
+ result.add(o);
+ }
+
+ }
+
+ @Override
+ public void execute(ReadGraphImpl graph, int type) throws DatabaseException {
+ if(result == null) {
+ result = QueryCacheBase.resultAssertedStatements(graph, type, r2, entry, null);
+ } else {
+ if (first) {
+ IntArray ia = result;
+ result = new IntArray();
+ if(ia.data != null) {
+ for(int i = 0;i < ia.sizeOrData ; i+=3) addStatement(ia.data[i],ia.data[i+1],ia.data[i+2]);
+ }
+ first = false;
+ }
+ IntArray ia = QueryCacheBase.resultAssertedStatements(graph, type, r2, entry, null);
+ if(ia.data != null) {
+ for(int i = 0;i < ia.sizeOrData ; i+=3) addStatement(ia.data[i],ia.data[i+1],ia.data[i+2]);
+ }
+ }
+ }
+
+ @Override
+ public void finished(ReadGraphImpl graph) {
+ }
+
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable throwable) {
+ }
- }
+ }
- AssertionMapProc amp = new AssertionMapProc();
+ AssertionMapProc amp = new AssertionMapProc();
- // This dependency could be cut
- QueryCache.runnerPrincipalTypes(graph, r1, entry, null, amp);
+ // This dependency could be cut
+ QueryCache.runnerPrincipalTypes(graph, r1, entry, null, amp);
- return amp.result;
+ return amp.result;
- }
+ }
- final static private void forSingleAssertion(ReadGraphImpl graph, final int r1, final int r2, final Objects parent, final IntProcedure procedure) throws DatabaseException {
+ final static private void forSingleAssertion(ReadGraphImpl graph, final int r1, final int r2, final Objects parent, final IntProcedure procedure) throws DatabaseException {
- IntArray map = getAssertionMap(graph, r1, r2, parent);
- if(map == null) {
- procedure.finished(graph);
- return;
- }
+ IntArray map = getAssertionMap(graph, r1, r2, parent);
+ if(map == null) {
+ procedure.finished(graph);
+ return;
+ }
- int size = map.size();
- if(size == 3) {
- int value = map.data[2];
- procedure.execute(graph, value);
- procedure.finished(graph);
- } else if(size == 0) {
- procedure.finished(graph);
- } else {
+ int size = map.size();
+ if(size == 3) {
+ int value = map.data[2];
+ procedure.execute(graph, value);
+ procedure.finished(graph);
+ } else if(size == 0) {
+ procedure.finished(graph);
+ } else {
- int candidateS = map.data[0];
- int candidateO = map.data[2];
+ int candidateS = map.data[0];
+ int candidateO = map.data[2];
- IntSet candidateIs = null;
- try {
- candidateIs = QueryCache.resultSuperTypes(graph, candidateS, parent, null);
- } catch (DatabaseException e) {
- procedure.exception(graph, e);
- return;
- }
+ IntSet candidateIs = null;
+ try {
+ candidateIs = QueryCache.resultSuperTypes(graph, candidateS, parent, null);
+ } catch (DatabaseException e) {
+ procedure.exception(graph, e);
+ return;
+ }
- for(int i=3;i<map.size();i+=3) {
+ for(int i=3;i<map.size();i+=3) {
- int nextS = map.data[i];
- int nextO = map.data[i+2];
+ int nextS = map.data[i];
+ int nextO = map.data[i+2];
- if(nextS != candidateS) {
+ if(nextS != candidateS) {
- if(candidateIs.contains(nextS)) {
+ if(candidateIs.contains(nextS)) {
- // Next is a super type of candidate => ignore next
+ // Next is a super type of candidate => ignore next
- } else {
+ } else {
- IntSet nextIs = null;
- try {
- nextIs = QueryCache.resultSuperTypes(graph, nextS, parent, null);
- } catch (DatabaseException e) {
- procedure.exception(graph, e);
- return;
- }
+ IntSet nextIs = null;
+ try {
+ nextIs = QueryCache.resultSuperTypes(graph, nextS, parent, null);
+ } catch (DatabaseException e) {
+ procedure.exception(graph, e);
+ return;
+ }
- if(nextIs.contains(candidateS)) {
+ if(nextIs.contains(candidateS)) {
- // Candidate is a super type of next => next is the new candidate
+ // Candidate is a super type of next => next is the new candidate
- candidateS = nextS;
- candidateO = nextO;
- candidateIs = nextIs;
+ candidateS = nextS;
+ candidateO = nextO;
+ candidateIs = nextIs;
- } else {
+ } else {
- // candidate and next are unrelated => error
- ManyObjectsForFunctionalRelationException exception = new ManyObjectsForFunctionalRelationException("Functional relation has conflicting assertions " + r1 + ", " + r2 + " " + map , r1);
- procedure.exception(graph, exception);
- return;
+ // candidate and next are unrelated => error
+ ManyObjectsForFunctionalRelationException exception = new ManyObjectsForFunctionalRelationException("Functional relation has conflicting assertions " + r1 + ", " + r2 + " " + map , r1);
+ procedure.exception(graph, exception);
+ return;
- }
+ }
- }
+ }
- }
+ }
- }
+ }
- procedure.execute(graph, candidateO);
- procedure.finished(graph);
+ procedure.execute(graph, candidateO);
+ procedure.finished(graph);
- }
+ }
- }
+ }
- final static InternalProcedure<IntSet> NOP = new InternalProcedure<IntSet>() {
+ final static InternalProcedure<IntSet> NOP = new InternalProcedure<IntSet>() {
- @Override
- public void execute(ReadGraphImpl graph, IntSet result) {
- }
+ @Override
+ public void execute(ReadGraphImpl graph, IntSet result) {
+ }
- @Override
- public void exception(ReadGraphImpl graph, Throwable throwable) {
- }
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable throwable) {
+ }
- };
+ };
- final static TripleIntProcedure NOPT = new TripleIntProcedure() {
+ final static TripleIntProcedure NOPT = new TripleIntProcedure() {
- @Override
- public void exception(ReadGraphImpl graph, Throwable throwable) {
- }
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable throwable) {
+ }
- @Override
- public void execute(ReadGraphImpl graph, int s, int p, int o) {
- }
+ @Override
+ public void execute(ReadGraphImpl graph, int s, int p, int o) {
+ }
- @Override
- public void finished(ReadGraphImpl graph) {
- }
+ @Override
+ public void finished(ReadGraphImpl graph) {
+ }
- };
+ };
- // Search for one statement
- final public void computeFunctionalIndex(ReadGraphImpl graph, final QueryProcessor provider, final RelationInfo ri, final IntProcedure procedure) throws DatabaseException {
- computeFunctionalIndex(graph, r1(), r2(), this, ri, procedure);
- }
+ // Search for one statement
+ final public void computeFunctionalIndex(ReadGraphImpl graph, final QueryProcessor provider, final RelationInfo ri, final IntProcedure procedure) throws DatabaseException {
+ computeFunctionalIndex(graph, r1(), r2(), this, ri, procedure);
+ }
- // Search for one statement
- final static public void computeFunctionalIndex(ReadGraphImpl graph, final int r1, final int r2, final Objects parent, final RelationInfo ri, final IntProcedure procedure) throws DatabaseException {
+ // Search for one statement
+ final static public void computeFunctionalIndex(ReadGraphImpl graph, final int r1, final int r2, final Objects parent, final RelationInfo ri, final IntProcedure procedure) throws DatabaseException {
- if(ri.isFinal) {
+ if(ri.isFinal) {
- int result = graph.processor.querySupport.getFunctionalObject(r1, r2);
+ int result = graph.processor.querySupport.getFunctionalObject(r1, r2);
- if(result == 0) {
+ if(result == 0) {
- // Check for assertions
- forSingleAssertion(graph, r1, r2, parent, procedure);
+ // Check for assertions
+ forSingleAssertion(graph, r1, r2, parent, procedure);
- } else if (result == -1) {
+ } else if (result == -1) {
- graph.processor.querySupport.getObjects(graph, r1, r2, new IntProcedure() {
+ graph.processor.querySupport.getObjects(graph, r1, r2, new IntProcedure() {
- @Override
- public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
- procedure.execute(graph, i);
- }
+ @Override
+ public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
+ procedure.execute(graph, i);
+ }
- @Override
- public void exception(ReadGraphImpl graph, Throwable t) {
- if(DebugException.DEBUG) new DebugException(t).printStackTrace();
- }
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable t) {
+ if(DebugException.DEBUG) new DebugException(t).printStackTrace();
+ }
- @Override
- public void finished(ReadGraphImpl graph) {
- }
+ @Override
+ public void finished(ReadGraphImpl graph) {
+ }
- });
+ });
- // Check for assertions
- forSingleAssertion(graph, r1, r2, parent, procedure);
+ // Check for assertions
+ forSingleAssertion(graph, r1, r2, parent, procedure);
- } else {
+ } else {
- // If functional relation was found there is no need to check assertions
+ // If functional relation was found there is no need to check assertions
procedure.execute(graph, result);
procedure.finished(graph);
-
- }
+ }
- } else {
+ } else {
- // Note! The dependency is intentionally cut!
+ // Note! The dependency is intentionally cut!
IntSet direct = QueryCache.resultDirectPredicates(graph, r1, null, null);
direct.forEach(graph, new SyncIntProcedure() {
- boolean found = false;
-
- @Override
- public void run(ReadGraphImpl graph) throws DatabaseException {
-
- if(found) {
- procedure.finished(graph);
- } else {
-
- // Check for assertions
- forSingleAssertion(graph, r1, r2, parent, procedure);
+ /*
+ * 0 = not found
+ * 1 = found
+ * 2 = exception
+ */
+ int found = 0;
- }
+ @Override
+ public void run(ReadGraphImpl graph) throws DatabaseException {
- }
+ if(found == 1) {
- @Override
- public void execute(ReadGraphImpl graph, final int pred) throws DatabaseException {
+ procedure.finished(graph);
- if(found) return;
+ } else if(found == 0) {
- if(pred == r2) {
+ // Check for assertions
+ forSingleAssertion(graph, r1, r2, parent, procedure);
- // Note! The dependency is intentionally cut!
- QueryCache.runnerDirectObjects(graph, r1, pred, null, null, new IntProcedure() {
+ }
- @Override
- public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
+ }
- if(!found) {
+ @Override
+ public void execute(ReadGraphImpl graph, final int pred) throws DatabaseException {
- procedure.execute(graph, i);
- found = true;
+ if(found > 0)
+ return;
- } else {
+ if(pred == r2) {
- ManyObjectsForFunctionalRelationException exception = new ManyObjectsForFunctionalRelationException("Functional relation has more than one statement (r1=" + r1 + ", r2=" + r2 + ").", r1);
- procedure.exception(graph, exception);
+ // Note! The dependency is intentionally cut!
+ QueryCache.runnerDirectObjects(graph, r1, pred, null, null, new IntProcedure() {
- }
+ @Override
+ public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
- }
+ if(found == 0) {
- @Override
- public void finished(ReadGraphImpl graph) {
- }
+ procedure.execute(graph, i);
+ found = 1;
- @Override
- public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
- procedure.exception(graph, t);
- }
+ } else {
- });
+ ManyObjectsForFunctionalRelationException exception = new ManyObjectsForFunctionalRelationException("Functional relation has more than one statement (r1=" + r1 + ", r2=" + r2 + ").", r1);
+ procedure.exception(graph, exception);
+ found = 2;
- } else {
+ }
- QueryCache.runnerSuperRelations(graph, pred, parent, null, new InternalProcedure<IntSet>() {
+ }
- @Override
- public void execute(ReadGraphImpl graph, IntSet result) throws DatabaseException {
+ @Override
+ public void finished(ReadGraphImpl graph) {
+ }
- if(found) return;
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
- if(result.contains(r2)) {
+ procedure.exception(graph, t);
+ found = 2;
- // Note! The dependency is intentionally cut!
- QueryCache.runnerDirectObjects(graph, r1, pred, null, null, new IntProcedure() {
+ }
- @Override
- public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
+ });
- if(!found) {
+ } else {
- procedure.execute(graph, i);
- found = true;
+ QueryCache.runnerSuperRelations(graph, pred, parent, null, new InternalProcedure<IntSet>() {
- } else {
+ @Override
+ public void execute(ReadGraphImpl graph, IntSet result) throws DatabaseException {
- ManyObjectsForFunctionalRelationException exception = new ManyObjectsForFunctionalRelationException("Functional relation has more than one statement (r1=" + r1 + ", r2=" + r2 + ").", r1);
- procedure.exception(graph, exception);
+ if(found > 0)
+ return;
- }
+ if(result.contains(r2)) {
- }
+ // Note! The dependency is intentionally cut!
+ QueryCache.runnerDirectObjects(graph, r1, pred, null, null, new IntProcedure() {
- @Override
- public void finished(ReadGraphImpl graph) {
- }
+ @Override
+ public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
- @Override
- public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
- procedure.exception(graph, t);
- }
+ if(found == 0) {
- });
+ procedure.execute(graph, i);
+ found = 1;
- }
+ } else {
- }
+ ManyObjectsForFunctionalRelationException exception = new ManyObjectsForFunctionalRelationException("Functional relation has more than one statement (r1=" + r1 + ", r2=" + r2 + ").", r1);
+ procedure.exception(graph, exception);
+ found = 2;
- @Override
- public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
- procedure.exception(graph, t);
- }
+ }
- });
+ }
- }
+ @Override
+ public void finished(ReadGraphImpl graph) {
+ }
- }
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
+ procedure.exception(graph, t);
+ found = 2;
+ }
- @Override
- public void finished(ReadGraphImpl graph) throws DatabaseException {
+ });
- dec(graph);
+ }
- }
+ }
- });
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
+ procedure.exception(graph, t);
+ found = 2;
+ }
+ });
- }
+ }
- }
+ }
- final static private void forAssertions(ReadGraphImpl graph, final int r1, final int r2, final Objects parent, final IntProcedure procedure) throws DatabaseException {
+ @Override
+ public void finished(ReadGraphImpl graph) throws DatabaseException {
+ dec(graph);
+ }
- // Note! The dependency is intentionally cut!
- QueryCache.runnerPrincipalTypes(graph, r1, null, null, new SyncIntProcedure() {
+ });
- @Override
- public void run(ReadGraphImpl graph) throws DatabaseException {
- procedure.finished(graph);
- }
- TripleIntProcedure proc = new TripleIntProcedure() {
+ }
- @Override
- public void execute(ReadGraphImpl graph, int s, int p, int o) throws DatabaseException {
- procedure.execute(graph, o);
- }
+ }
- @Override
- public void finished(ReadGraphImpl graph) throws DatabaseException {
- dec(graph);
- }
+ final static private void forAssertions(ReadGraphImpl graph, final int r1, final int r2, final Objects parent, final IntProcedure procedure) throws DatabaseException {
- @Override
- public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
- if(DebugException.DEBUG) new DebugException(t).printStackTrace();
- procedure.exception(graph, t);
- dec(graph);
- }
+ // Note! The dependency is intentionally cut!
+ QueryCache.runnerPrincipalTypes(graph, r1, null, null, new SyncIntProcedure() {
- };
+ @Override
+ public void run(ReadGraphImpl graph) throws DatabaseException {
+ procedure.finished(graph);
+ }
- @Override
- public void execute(ReadGraphImpl graph, int type) throws DatabaseException {
+ TripleIntProcedure proc = new TripleIntProcedure() {
- inc();
- QueryCache.runnerAssertedStatements(graph, type, r2, parent, null, proc);
+ @Override
+ public void execute(ReadGraphImpl graph, int s, int p, int o) throws DatabaseException {
+ procedure.execute(graph, o);
+ }
- }
+ @Override
+ public void finished(ReadGraphImpl graph) throws DatabaseException {
+ dec(graph);
+ }
- @Override
- public void finished(ReadGraphImpl graph) throws DatabaseException {
- dec(graph);
- }
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
+ if(DebugException.DEBUG) new DebugException(t).printStackTrace();
+ procedure.exception(graph, t);
+ dec(graph);
+ }
- });
+ };
+ @Override
+ public void execute(ReadGraphImpl graph, int type) throws DatabaseException {
- }
+ inc();
+ QueryCache.runnerAssertedStatements(graph, type, r2, parent, null, proc);
- final public static void computeNotFunctionalFinalIndex(ReadGraphImpl graph, final int r1, final int r2, final QueryProcessor provider, RelationInfo ri, AsyncMultiProcedure<Resource> procedure) {
- throw new Error();
- }
+ }
- final public void computeNotFunctionalIndex(ReadGraphImpl graph, RelationInfo ri, final IntProcedure procedure) throws DatabaseException {
- computeNotFunctionalIndex(graph, r1(), r2(), this, ri, procedure);
- }
+ @Override
+ public void finished(ReadGraphImpl graph) throws DatabaseException {
+ dec(graph);
+ }
- final static public void computeNotFunctionalIndex(ReadGraphImpl graph, final int r1, final int r2, final Objects parent, RelationInfo ri, final IntProcedure procedure) throws DatabaseException {
+ });
- if(ri.isFinal) {
- graph.processor.querySupport.getObjects(graph, r1, r2, new IntProcedure() {
+ }
- @Override
- public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
- procedure.execute(graph, i);
- }
+ final public static void computeNotFunctionalFinalIndex(ReadGraphImpl graph, final int r1, final int r2, final QueryProcessor provider, RelationInfo ri, AsyncMultiProcedure<Resource> procedure) {
+ throw new Error();
+ }
- @Override
- public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
- if(DebugException.DEBUG) new DebugException(t).printStackTrace();
- procedure.exception(graph, t);
- }
+ final public void computeNotFunctionalIndex(ReadGraphImpl graph, RelationInfo ri, final IntProcedure procedure) throws DatabaseException {
+ computeNotFunctionalIndex(graph, r1(), r2(), this, ri, procedure);
+ }
- @Override
- public void finished(ReadGraphImpl graph) {
- }
+ final static public void computeNotFunctionalIndex(ReadGraphImpl graph, final int r1, final int r2, final Objects parent, RelationInfo ri, final IntProcedure procedure) throws DatabaseException {
- });
+ if(ri.isFinal) {
- if(ri.isAsserted) {
- forAssertions(graph, r1, r2, parent, procedure);
- } else {
- procedure.finished(graph);
- }
+ graph.processor.querySupport.getObjects(graph, r1, r2, new IntProcedure() {
- } else {
+ @Override
+ public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
+ procedure.execute(graph, i);
+ }
- // Note! The dependency is intentionally cut!
- IntSet direct = QueryCache.resultDirectPredicates(graph, r1, null, null);
- direct.forEach(graph, new SyncIntProcedure() {
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
+ if(DebugException.DEBUG) new DebugException(t).printStackTrace();
+ procedure.exception(graph, t);
+ }
- @Override
- public void run(ReadGraphImpl graph) throws DatabaseException {
- forAssertions(graph, r1, r2, parent, procedure);
- }
+ @Override
+ public void finished(ReadGraphImpl graph) {
+ }
- @Override
- public void execute(ReadGraphImpl graph, final int pred) throws DatabaseException {
+ });
- if(pred == r2) {
+ if(ri.isAsserted) {
+ forAssertions(graph, r1, r2, parent, procedure);
+ } else {
+ procedure.finished(graph);
+ }
- inc();
+ } else {
- // Note! The dependency is intentionally cut!
- QueryCache.runnerDirectObjects(graph, r1, pred, null, null, new IntProcedure() {
+ // Note! The dependency is intentionally cut!
+ IntSet direct = QueryCache.resultDirectPredicates(graph, r1, null, null);
+ direct.forEach(graph, new SyncIntProcedure() {
- @Override
- public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
- procedure.execute(graph, i);
- }
+ @Override
+ public void run(ReadGraphImpl graph) throws DatabaseException {
+ forAssertions(graph, r1, r2, parent, procedure);
+ }
- @Override
- public void finished(ReadGraphImpl graph) throws DatabaseException {
- dec(graph);
- }
+ @Override
+ public void execute(ReadGraphImpl graph, final int pred) throws DatabaseException {
- @Override
- public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
- procedure.exception(graph, t);
- dec(graph);
- }
+ if(pred == r2) {
- });
+ // Note! The dependency is intentionally cut!
+ QueryCache.runnerDirectObjects(graph, r1, pred, null, null, new IntProcedure() {
- } else {
+ @Override
+ public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
+ procedure.execute(graph, i);
+ }
- inc();
+ @Override
+ public void finished(ReadGraphImpl graph) throws DatabaseException {
+ }
- QueryCache.runnerSuperRelations(graph, pred, parent, null, new InternalProcedure<IntSet>() {
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
+ procedure.exception(graph, t);
+ }
- @Override
- public void execute(ReadGraphImpl graph, IntSet result) throws DatabaseException {
+ });
- if(result.contains(r2)) {
+ } else {
- inc();
+ try {
- // Note! The dependency is intentionally cut!
- QueryCache.runnerDirectObjects(graph, r1, pred, null, null, new IntProcedure() {
+ IntSet result = QueryCache.resultSuperRelations(graph, pred, parent, null);
+ if(result.contains(r2)) {
- @Override
- public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
- procedure.execute(graph, i);
- }
+ inc();
- @Override
- public void finished(ReadGraphImpl graph) throws DatabaseException {
- dec(graph);
- }
+ // Note! The dependency is intentionally cut!
+ QueryCache.runnerDirectObjects(graph, r1, pred, null, null, new IntProcedure() {
- @Override
- public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
- if(DebugException.DEBUG) new DebugException(t).printStackTrace();
- procedure.exception(graph, t);
- dec(graph);
- }
+ @Override
+ public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
+ procedure.execute(graph, i);
+ }
- });
+ @Override
+ public void finished(ReadGraphImpl graph) throws DatabaseException {
+ dec(graph);
+ }
- }
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
+ if(DebugException.DEBUG) new DebugException(t).printStackTrace();
+ procedure.exception(graph, t);
+ dec(graph);
+ }
- dec(graph);
+ });
- }
+ }
- @Override
- public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
- procedure.exception(graph, t);
- dec(graph);
- }
+ } catch (Throwable e) {
+ procedure.exception(graph, e);
+ }
- });
+ }
- }
+ }
- }
+ @Override
+ public void finished(ReadGraphImpl graph) throws DatabaseException {
+ dec(graph);
+ }
- @Override
- public void finished(ReadGraphImpl graph) throws DatabaseException {
- dec(graph);
- }
+ });
- });
+ }
- }
+ }
- }
+ public Object compute(ReadGraphImpl graph, final IntProcedure procedure) throws DatabaseException {
+ computeForEach(graph, r1(), r2(), this, procedure);
+ return getResult();
+ }
- public Object compute(ReadGraphImpl graph, final IntProcedure procedure) throws DatabaseException {
- computeForEach(graph, r1(), r2(), this, procedure);
- return getResult();
- }
+ public static void computeForEach(ReadGraphImpl graph, final int r1, final int r2, final Objects entry, final IntProcedure procedure_) throws DatabaseException {
- public static void computeForEach(ReadGraphImpl graph, final int r1, final int r2, final Objects entry, final IntProcedure procedure_) throws DatabaseException {
+ IntProcedure procedure = entry != null ? entry : procedure_;
- IntProcedure procedure = entry != null ? entry : procedure_;
-
RelationInfo ri = QueryCache.resultRelationInfoQuery(graph, r2, entry, null);
graph.ensureLoaded(r1, r2);
if(ri.isFunctional) {
} else {
computeNotFunctionalIndex(graph, r1, r2, entry, ri, procedure);
}
-
- if(entry != null) entry.performFromCache(graph, procedure_);
- }
+ if(entry != null) entry.performFromCache(graph, procedure_);
+
+ }
+
+ @Override
+ public String toString() {
+ return "Objects[" + r1() + " - " + r2() + "]";
+ }
- @Override
- public String toString() {
- return "Objects[" + r1() + " - " + r2() + "]";
- }
+ @Override
+ public Object performFromCache(ReadGraphImpl graph, final IntProcedure procedure) throws DatabaseException {
- @Override
- public Object performFromCache(ReadGraphImpl graph, final IntProcedure procedure) throws DatabaseException {
+ assert(isReady());
- assert(isReady());
+ if(handleException(graph, procedure)) return getResult();
- if(handleException(graph, procedure)) return getResult();
+ final IntArray value = (IntArray)getResult();
+ if(value.data == null) {
+ if(value.sizeOrData != IntArray.NO_DATA) procedure.execute(graph, value.sizeOrData);
+ } else {
+ for(int i = 0;i < value.sizeOrData ; i++) procedure.execute(graph, value.data[i]);
+ }
- final IntArray value = (IntArray)getResult();
- if(value.data == null) {
- if(value.sizeOrData != IntArray.NO_DATA) procedure.execute(graph, value.sizeOrData);
- } else {
- for(int i = 0;i < value.sizeOrData ; i++) procedure.execute(graph, value.data[i]);
- }
+ procedure.finished(graph);
- procedure.finished(graph);
-
- return value;
+ return value;
- }
+ }
- @Override
- public void recompute(ReadGraphImpl graph) throws DatabaseException {
+ @Override
+ public void recompute(ReadGraphImpl graph) throws DatabaseException {
- compute(graph, new IntProcedureAdapter() {
+ compute(graph, new IntProcedureAdapter() {
- @Override
- public void finished(ReadGraphImpl graph) {
- }
+ @Override
+ public void finished(ReadGraphImpl graph) {
+ }
- @Override
- public void exception(ReadGraphImpl graph, Throwable t) {
- new Error("Error in recompute.", t).printStackTrace();
- }
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable t) {
+ new Error("Error in recompute.", t).printStackTrace();
+ }
- });
+ });
- }
+ }
- @Override
- public int type() {
- return RequestFlags.IMMEDIATE_UPDATE;
- }
+ @Override
+ public int type() {
+ return RequestFlags.IMMEDIATE_UPDATE;
+ }
- @Override
- boolean isImmutable(ReadGraphImpl graph) {
- return graph.processor.isImmutable(r1());
- }
+ @Override
+ boolean isImmutable(ReadGraphImpl graph) {
+ return graph.processor.isImmutable(r1());
+ }
@Override
public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
except(throwable);
}
+ @Override
+ public void serializeValue(QuerySerializer serializer) {
+ IntArray is = getResult();
+ is.serialize(serializer);
+ }
+
}
--- /dev/null
+package org.simantics.db.impl.query;
+
+import org.simantics.db.exception.DatabaseException;
+
+public class ObjectsFactory extends QueryFactoryBase {
+
+ @Override
+ public CacheEntryBase readKeyAndValue(QueryDeserializer deserializer) throws DatabaseException {
+ Objects result = reference(deserializer);
+ IntArray ia = IntArray.deserialize(deserializer);
+ result.setResult(ia);
+ result.setReady();
+ return result;
+ }
+
+ @Override
+ public <T extends CacheEntryBase> T reference(QueryDeserializer deserializer) throws DatabaseException {
+ return (T)deserializer.readObjects();
+ }
+
+}
--- /dev/null
+package org.simantics.db.impl.query;
+
+import org.simantics.db.exception.DatabaseException;
+
+public class OrderedSetFactory extends QueryFactoryBase {
+
+ @Override
+ public CacheEntryBase readKeyAndValue(QueryDeserializer deserializer) throws DatabaseException {
+ OrderedSet result = reference(deserializer);
+ IntArray ia = IntArray.deserialize(deserializer);
+ result.setResult(ia);
+ result.setReady();
+ return result;
+ }
+
+ @Override
+ public <T extends CacheEntryBase> T reference(QueryDeserializer deserializer) throws DatabaseException {
+ return (T)deserializer.readOrderedSet();
+ }
+
+}
import gnu.trove.procedure.TIntProcedure;
-final public class Predicates extends UnaryQueryP<IntSet> {
+final public class Predicates extends UnaryQueryPIntSet {
Predicates(final int r) {
super(r);
--- /dev/null
+package org.simantics.db.impl.query;
+
+import org.simantics.db.exception.DatabaseException;
+
+public class PredicatesFactory extends QueryFactoryBase {
+
+ @Override
+ public CacheEntryBase readKeyAndValue(QueryDeserializer deserializer) throws DatabaseException {
+ Predicates result = reference(deserializer);
+ IntSet ia = IntSet.deserialize(deserializer);
+ result.setResult(ia);
+ result.setReady();
+ return result;
+ }
+
+ @Override
+ public <T extends CacheEntryBase> T reference(QueryDeserializer deserializer) throws DatabaseException {
+ return (T)deserializer.readPredicates();
+ }
+
+}
--- /dev/null
+package org.simantics.db.impl.query;
+
+import org.simantics.db.exception.DatabaseException;
+
+public class PrincipalTypesFactory extends QueryFactoryBase {
+
+ @Override
+ public CacheEntryBase readKeyAndValue(QueryDeserializer deserializer) throws DatabaseException {
+ PrincipalTypes result = reference(deserializer);
+ IntArray ia = IntArray.deserialize(deserializer);
+ result.setResult(ia);
+ result.setReady();
+ return result;
+ }
+
+ @Override
+ public <T extends CacheEntryBase> T reference(QueryDeserializer deserializer) throws DatabaseException {
+ return (T)deserializer.readPrincipalTypes();
+ }
+
+}
import java.util.Collection;
import java.util.concurrent.Semaphore;
-import org.simantics.databoard.Bindings;
import org.simantics.db.AsyncReadGraph;
-import org.simantics.db.DevelopmentKeys;
import org.simantics.db.ObjectResourceIdMap;
import org.simantics.db.ReadGraph;
import org.simantics.db.RelationInfo;
-import org.simantics.db.common.utils.Logger;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.impl.graph.ReadGraphImpl;
import org.simantics.db.impl.procedure.InternalProcedure;
import org.simantics.db.request.ExternalRead;
import org.simantics.db.request.MultiRead;
import org.simantics.db.request.Read;
-import org.simantics.utils.Development;
import gnu.trove.map.hash.THashMap;
import gnu.trove.map.hash.TObjectIntHashMap;
static boolean shouldCache(QueryProcessor processor, Object o) {
return false;
}
+
+ AssertedPredicates getOrCreateAssertedPredicates(int r) {
+ AssertedPredicates entry = (AssertedPredicates)assertedPredicatesMap.get(r);
+ if(entry == null) {
+ entry = new AssertedPredicates(r);
+ assertedPredicatesMap.put(keyR(r), entry);
+ }
+ return entry;
+ }
+ AssertedStatements getOrCreateAssertedStatements(int r1, int r2) {
+ AssertedStatements entry = (AssertedStatements)assertedStatementsMap.get(r1, r2);
+ if(entry == null) {
+ entry = new AssertedStatements(r1, r2);
+ assertedStatementsMap.put(keyR2(r1, r2), entry);
+ }
+ return entry;
+ }
+
+ ChildMap getOrCreateChildMap(int r) {
+ ChildMap entry = (ChildMap)childMapMap.get(r);
+ if(entry == null) {
+ entry = new ChildMap(r);
+ childMapMap.put(keyR(r), entry);
+ }
+ return entry;
+ }
+
+ DirectObjects getOrCreateDirectObjects(int r1, int r2) {
+ DirectObjects entry = (DirectObjects)directObjectsMap.get(r1, r2);
+ if(entry == null) {
+ entry = new DirectObjects(r1, r2);
+ directObjectsMap.put(keyR2(r1, r2), entry);
+ }
+ return entry;
+ }
+
+ DirectPredicates getOrCreateDirectPredicates(int r) {
+ DirectPredicates entry = (DirectPredicates)directPredicatesMap.get(r);
+ if(entry == null) {
+ entry = new DirectPredicates(r);
+ directPredicatesMap.put(keyR(r), entry);
+ }
+ return entry;
+ }
+
+ Objects getOrCreateObjects(int r1, int r2) {
+ Objects entry = (Objects)objectsMap.get(r1, r2);
+ if(entry == null) {
+ entry = new Objects(r1, r2);
+ objectsMap.put(keyR2(r1, r2), entry);
+ }
+ return entry;
+ }
+
+ OrderedSet getOrCreateOrderedSet(int r) {
+ OrderedSet entry = (OrderedSet)orderedSetMap.get(r);
+ if(entry == null) {
+ entry = new OrderedSet(r);
+ orderedSetMap.put(keyR(r), entry);
+ }
+ return entry;
+ }
+
+ Predicates getOrCreatePredicates(int r) {
+ Predicates entry = (Predicates)predicatesMap.get(r);
+ if(entry == null) {
+ entry = new Predicates(r);
+ predicatesMap.put(keyR(r), entry);
+ }
+ return entry;
+ }
+
+ PrincipalTypes getOrCreatePrincipalTypes(int r) {
+ PrincipalTypes entry = (PrincipalTypes)principalTypesMap.get(r);
+ if(entry == null) {
+ entry = new PrincipalTypes(r);
+ principalTypesMap.put(keyR(r), entry);
+ }
+ return entry;
+ }
+
+ RelationInfoQuery getOrCreateRelationInfoQuery(int r) {
+ RelationInfoQuery entry = (RelationInfoQuery)relationInfoQueryMap.get(r);
+ if(entry == null) {
+ entry = new RelationInfoQuery(r);
+ relationInfoQueryMap.put(keyR(r), entry);
+ }
+ return entry;
+ }
+
+ Statements getOrCreateStatements(int r1, int r2) {
+ Statements entry = (Statements)statementsMap.get(r1, r2);
+ if(entry == null) {
+ entry = new Statements(r1, r2);
+ statementsMap.put(keyR2(r1, r2), entry);
+ }
+ return entry;
+ }
+
+ SuperRelations getOrCreateSuperRelations(int r) {
+ SuperRelations entry = (SuperRelations)superRelationsMap.get(r);
+ if(entry == null) {
+ entry = new SuperRelations(r);
+ superRelationsMap.put(keyR(r), entry);
+ }
+ return entry;
+ }
+
+ SuperTypes getOrCreateSuperTypes(int r) {
+ SuperTypes entry = (SuperTypes)superTypesMap.get(r);
+ if(entry == null) {
+ entry = new SuperTypes(r);
+ superTypesMap.put(keyR(r), entry);
+ }
+ return entry;
+ }
+
+ TypeHierarchy getOrCreateTypeHierarchy(int r) {
+ TypeHierarchy entry = (TypeHierarchy)typeHierarchyMap.get(r);
+ if(entry == null) {
+ entry = new TypeHierarchy(r);
+ typeHierarchyMap.put(keyR(r), entry);
+ }
+ return entry;
+ }
+
+ Types getOrCreateTypes(int r) {
+ Types entry = (Types)typesMap.get(r);
+ if(entry == null) {
+ entry = new Types(r);
+ typesMap.put(keyR(r), entry);
+ }
+ return entry;
+ }
+
+ URIToResource getOrCreateURIToResource(String s) {
+ URIToResource entry = (URIToResource)uRIToResourceMap.get(s);
+ if(entry == null) {
+ entry = new URIToResource(s);
+ uRIToResourceMap.put(keyID(s), entry);
+ }
+ return entry;
+ }
+
+ ValueQuery getOrCreateValueQuery(int r) {
+ ValueQuery entry = (ValueQuery)valueQueryMap.get(r);
+ if(entry == null) {
+ entry = new ValueQuery(r);
+ valueQueryMap.put(keyR(r), entry);
+ }
+ return entry;
+ }
+
}
\ No newline at end of file
@Override
public void collect(int youngTarget, int allowedTimeInMs) {
+ // Flush listener registrations to prevent the collector from trashing
+ // listeners that are still queued up waiting to be registered.
+ queryProcessor.listening.sync();
+
long start = System.nanoTime();
// Refresh current size
} else {
+ entry.pruneParentSet();
support.setLevel(entry, parent.getLevel() + 1);
}
--- /dev/null
+package org.simantics.db.impl.query;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.simantics.db.ObjectResourceIdMap;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.impl.ClusterBase;
+import org.simantics.db.impl.ClusterSupport;
+import org.simantics.db.impl.ClusterTraitsBase;
+import org.simantics.db.service.Bytes;
+import org.slf4j.LoggerFactory;
+
+import gnu.trove.map.hash.TIntLongHashMap;
+
+public class QueryDeserializer {
+
+ private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(QueryDeserializer.class);
+
+ QueryCache qc;
+ QuerySupport qs;
+ ClusterSupport cs;
+
+ private byte[] bytes;
+ private int byteIndex;
+
+ private TIntLongHashMap clusterKeys = new TIntLongHashMap();
+ private Map<Integer,QueryFactory> ids = new HashMap<Integer,QueryFactory>();
+
+ public QueryDeserializer(QueryProcessor qp, byte[] bytes) {
+ this.qc = qp.cache;
+ this.qs = qp.querySupport;
+ this.cs = qs.getClusterSupport();;
+ this.bytes = bytes;
+ }
+
+ public byte readByte() {
+ return bytes[byteIndex++];
+ }
+
+ public int readLE4() {
+ int result = Bytes.readLE4(bytes, byteIndex);
+ byteIndex += 4;
+ return result;
+ }
+
+ public long readLE8() {
+ long result = Bytes.readLE8(bytes, byteIndex);
+ byteIndex += 8;
+ return result;
+ }
+
+ public byte[] readBytes(int len) {
+ byte[] result = Arrays.copyOfRange(bytes, byteIndex, byteIndex+len);
+ byteIndex += len;
+ return result;
+ }
+
+ public void readHeaders() {
+ int idsSize = readLE4();
+ for(int i=0;i<idsSize;i++) {
+ int size = readLE4();
+ byte[] data = readBytes(size);
+ String id = new String(data);
+ int key = readLE4();
+ try {
+ Class<QueryFactory> clazz = (Class<QueryFactory>)getClass().getClassLoader().loadClass(id + "Factory");
+ QueryFactory qf = clazz.getDeclaredConstructor().newInstance();
+ ids.put(key, qf);
+ } catch (ClassNotFoundException e) {
+ LOGGER.error("Error while resolving QueryFactory", e);
+ } catch (InstantiationException e) {
+ LOGGER.error("Error while resolving QueryFactory", e);
+ } catch (IllegalAccessException e) {
+ LOGGER.error("Error while resolving QueryFactory", e);
+ } catch (IllegalArgumentException e) {
+ LOGGER.error("Error while resolving QueryFactory", e);
+ } catch (InvocationTargetException e) {
+ LOGGER.error("Error while resolving QueryFactory", e);
+ } catch (NoSuchMethodException e) {
+ LOGGER.error("Error while resolving QueryFactory", e);
+ } catch (SecurityException e) {
+ LOGGER.error("Error while resolving QueryFactory", e);
+ }
+ }
+ int clusterKeysSize = readLE4();
+ for(int i=0;i<clusterKeysSize;i++) {
+ long cluster = readLE8();
+ int key = readLE4();
+ clusterKeys.put(key, cluster);
+ }
+ }
+
+ public QueryFactory readFactory() {
+ int key = readLE4();
+ return ids.get(key);
+ }
+
+ public void readQueries() {
+ int count = readLE4();
+ for(int i=0;i<count;i++) {
+ QueryFactory qf = readFactory();
+ try {
+ qf.read(this);
+ } catch (DatabaseException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ public int readResource() throws DatabaseException {
+ int key = readLE4();
+ if(key < 0)
+ return key;
+ int clusterKey = ClusterTraitsBase.getClusterKeyFromResourceKey(key);
+ long cluster = clusterKeys.get(clusterKey);
+ ClusterBase cb = cs.getClusterByClusterId(cluster);
+ return ClusterTraitsBase.createResourceKey(cb.getClusterKey(), ClusterTraitsBase.getResourceIndexFromResourceKey(key));
+ }
+
+ public byte[] readByteArray() {
+ int len = readLE4();
+ if(len == -1)
+ return null;
+ return readBytes(len);
+ }
+
+ public String readString() {
+ return new String(readByteArray());
+ }
+
+ public ObjectResourceIdMap<String> createChildMap() {
+ return qs.createChildMap();
+ }
+
+ AssertedPredicates readAssertedPredicates() throws DatabaseException {
+ int r = readResource();
+ return qc.getOrCreateAssertedPredicates(r);
+ }
+
+ AssertedStatements readAssertedStatements() throws DatabaseException {
+ int r1 = readResource();
+ int r2 = readResource();
+ return qc.getOrCreateAssertedStatements(r1, r2);
+ }
+
+ ChildMap readChildMap() throws DatabaseException {
+ int r = readResource();
+ return qc.getOrCreateChildMap(r);
+ }
+
+ DirectObjects readDirectObjects() throws DatabaseException {
+ int r1 = readResource();
+ int r2 = readResource();
+ return qc.getOrCreateDirectObjects(r1, r2);
+ }
+
+ DirectPredicates readDirectPredicates() throws DatabaseException {
+ int r = readResource();
+ return qc.getOrCreateDirectPredicates(r);
+ }
+
+ Objects readObjects() throws DatabaseException {
+ int r1 = readResource();
+ int r2 = readResource();
+ return qc.getOrCreateObjects(r1, r2);
+ }
+
+ OrderedSet readOrderedSet() throws DatabaseException {
+ int r = readResource();
+ return qc.getOrCreateOrderedSet(r);
+ }
+
+ Predicates readPredicates() throws DatabaseException {
+ int r = readResource();
+ return qc.getOrCreatePredicates(r);
+ }
+
+ PrincipalTypes readPrincipalTypes() throws DatabaseException {
+ int r = readResource();
+ return qc.getOrCreatePrincipalTypes(r);
+ }
+
+ RelationInfoQuery readRelationInfoQuery() throws DatabaseException {
+ int r = readResource();
+ return qc.getOrCreateRelationInfoQuery(r);
+ }
+
+ Statements readStatements() throws DatabaseException {
+ int r1 = readResource();
+ int r2 = readResource();
+ return qc.getOrCreateStatements(r1, r2);
+ }
+
+ SuperRelations readSuperRelations() throws DatabaseException {
+ int r = readResource();
+ return qc.getOrCreateSuperRelations(r);
+ }
+
+ SuperTypes readSuperTypes() throws DatabaseException {
+ int r = readResource();
+ return qc.getOrCreateSuperTypes(r);
+ }
+
+ TypeHierarchy readTypeHierarchy() throws DatabaseException {
+ int r = readResource();
+ return qc.getOrCreateTypeHierarchy(r);
+ }
+
+ Types readTypes() throws DatabaseException {
+ int r = readResource();
+ return qc.getOrCreateTypes(r);
+ }
+
+ URIToResource readURIToResource() throws DatabaseException {
+ String s = readString();
+ return qc.getOrCreateURIToResource(s);
+ }
+
+ ValueQuery readValueQuery() throws DatabaseException {
+ int r = readResource();
+ return qc.getOrCreateValueQuery(r);
+ }
+
+}
--- /dev/null
+package org.simantics.db.impl.query;
+
+import org.simantics.db.exception.DatabaseException;
+
+public interface QueryFactory {
+ public CacheEntryBase read(QueryDeserializer deserializer) throws DatabaseException;
+ public <T extends CacheEntryBase> T reference(QueryDeserializer deserializer) throws DatabaseException;
+}
--- /dev/null
+package org.simantics.db.impl.query;
+
+import org.simantics.db.exception.DatabaseException;
+
+abstract public class QueryFactoryBase implements QueryFactory {
+
+ abstract protected CacheEntryBase readKeyAndValue(QueryDeserializer deserializer) throws DatabaseException;
+
+ public void readParents(QueryDeserializer deserializer, CacheEntryBase entry) throws DatabaseException {
+ int ps = deserializer.readLE4();
+ for(int i=0;i<ps;i++) {
+ QueryFactory qf = deserializer.readFactory();
+ CacheEntryBase ceb = qf.reference(deserializer);
+ entry.addParent(ceb);
+ }
+ }
+
+ @Override
+ final public CacheEntryBase read(QueryDeserializer deserializer) throws DatabaseException {
+ CacheEntryBase entry = readKeyAndValue(deserializer);
+ readParents(deserializer, entry);
+ return entry;
+ }
+
+}
*******************************************************************************/
package org.simantics.db.impl.query;
-import gnu.trove.impl.hash.THash;
+import java.util.Collection;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.impl.graph.ReadGraphImpl;
+import gnu.trove.impl.hash.THash;
+
/**
* An open addressed hashing implementation for Object types.
}
@Override
- public Iterable<CacheEntry> getParents(QueryProcessor processor) {
+ public Collection<CacheEntry> getParents(QueryProcessor processor) {
// TODO Auto-generated method stub
return null;
}
// TODO Auto-generated method stub
return null;
}
-
+
+ @Override
+ void pruneParentSet() {
+ }
+
};
/**
}
}
-
+
+ final public void removeDiscardedReally() {
+
+ tempDisableAutoCompaction();
+ try {
+
+ for(int i=0;i<_set.length;i++) {
+ CacheEntry entry = _set[i];
+ if(entry != null && REMOVED != entry) {
+ if(entry.isDiscarded()) removeAt(i);
+ }
+ }
+
+ } finally {
+ reenableAutoCompaction(false);
+ }
+
+ }
+
/**
* Creates an iterator over the values of the set. The iterator
* supports element deletion.
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.concurrent.Semaphore;
-import java.util.function.Consumer;
import org.simantics.databoard.Bindings;
import org.simantics.db.DevelopmentKeys;
import org.simantics.db.debug.ListenerReport;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.impl.graph.ReadGraphImpl;
-import org.simantics.db.impl.graph.WriteGraphImpl;
import org.simantics.db.procedure.ListenerBase;
import org.simantics.utils.Development;
import org.simantics.utils.datastructures.Pair;
public class QueryListening {
- private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(QueryListening.class);
+ static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(QueryListening.class);
private final QueryProcessor processor;
private final Scheduler scheduler;
- private final Consumer<Runnable> consumer;
private final Map<ListenerBase,ListenerEntry> addedEntries = new HashMap<>();
private THashSet<ListenerEntry> scheduledListeners = new THashSet<ListenerEntry>();
final THashMap<CacheEntry, ArrayList<ListenerEntry>> listeners = new THashMap<CacheEntry, ArrayList<ListenerEntry>>(10, 0.75f);
- private static class ThreadQueue extends ThreadLocal<ArrayList<Runnable>> {
-
- private final Map<Thread,ArrayList<Runnable>> allQueues = new HashMap<>();
-
- private ArrayList<ArrayList<Runnable>> dispatchedQueues = new ArrayList<>();
-
- @Override
- protected synchronized ArrayList<Runnable> initialValue() {
- ArrayList<Runnable> result = new ArrayList<>();
- allQueues.put(Thread.currentThread(), result);
- return result;
- }
-
- synchronized void sendToExecution() {
- ArrayList<Runnable> rs = allQueues.remove(Thread.currentThread());
- dispatchedQueues.add(rs);
- notify();
- }
-
- synchronized ArrayList<ArrayList<Runnable>> getDispatchedQueues() {
- ArrayList<ArrayList<Runnable>> result = dispatchedQueues;
- dispatchedQueues = new ArrayList<>();
- return result;
- }
-
- }
-
- private static class Scheduler {
-
- private static final int BUFFER_SIZE = 100;
-
- private final QueryProcessor processor;
-
- private final ThreadQueue queues = new ThreadQueue();
-
- /*
- * Access to this field is synchronized using the monitor of 'queues'
- * The method flush() shall be called by the single writing thread and the field has been nulled before the
- * method can exit. Thus it is not possible for multiple instances of flush Semaphore to exist at the same time.
- */
- private Semaphore flush = null;
-
- Scheduler(QueryProcessor processor) {
- this.processor = processor;
- }
-
- private boolean isTerminated() {
- return processor.isDisposed();
- }
-
- Consumer<Runnable> newConsumer() {
- return (task) -> {
-
- ArrayList<Runnable> l = queues.get();
- l.add(task);
- if(l.size() == BUFFER_SIZE) {
- queues.remove();
- queues.sendToExecution();
- }
-
- };
- }
-
- void start() {
-
- Thread thread = new Thread() {
-
- public void run() {
-
- synchronized(queues) {
- while(!isTerminated()) {
- try {
- ArrayList<ArrayList<Runnable>> qs = queues.getDispatchedQueues();
- for(ArrayList<Runnable> queue : qs) {
- for(Runnable r : queue)
- r.run();
- }
- if(flush != null) {
- for(ArrayList<Runnable> queue : queues.allQueues.values()) {
- for(Runnable r : queue) {
- r.run();
- }
- queue.clear();
- }
- Semaphore s = flush;
- flush = null;
- s.release();
- }
- queues.wait(1000);
- } catch (InterruptedException e) {
- LOGGER.error("Unexpected interrupt", e);
- }
- }
- }
-
- };
-
- };
-
- thread.setName("QueryListening");
- thread.start();
-
- }
-
- private Semaphore createFlush() {
- synchronized(queues) {
- flush = new Semaphore(0);
- queues.notify();
- return flush;
- }
- }
-
- void flush() {
- try {
- createFlush().acquire();
- } catch (InterruptedException e) {
- LOGGER.error("Unexpected interrupt", e);
- }
- }
-
- }
-
- private static class RegisterParentRunnable implements Runnable {
-
- private final CacheEntry parent;
- private final CacheEntry child;
-
- public RegisterParentRunnable(CacheEntry parent, CacheEntry child) {
- this.parent = parent;
- this.child = child;
- }
-
- @Override
- public void run() {
- child.addParent(parent);
- if (Development.DEVELOPMENT) {
- if(Development.<Boolean>getProperty(DevelopmentKeys.QUERYPROCESSOR_DEPENDENCIES, Bindings.BOOLEAN)) {
- System.out.println(child + " -> " + parent);
- }
- }
- }
-
- }
-
- private static class RegisterListenerRunnable implements Runnable {
-
- private final QueryListening queryListening;
- private final ListenerBase base;
- private final Object procedure;
- private final CacheEntry parent;
- private final CacheEntry entry;
-
- public RegisterListenerRunnable(QueryListening queryListening, ListenerBase base, Object procedure, CacheEntry parent, CacheEntry entry) {
- this.queryListening = queryListening;
- this.base = base;
- this.procedure = procedure;
- this.parent = parent;
- this.entry = entry;
- }
-
- @Override
- public void run() {
-
- assert (entry != null);
- assert (procedure != null);
-
- ArrayList<ListenerEntry> list = queryListening.listeners.get(entry);
- if (list == null) {
- list = new ArrayList<>(1);
- queryListening.listeners.put(entry, list);
- }
-
- ListenerEntry result = new ListenerEntry(entry, base, procedure);
- // Equals is here based on base
- int currentIndex = list.indexOf(result);
- // There was already a listener
- if(currentIndex > -1) {
- ListenerEntry current = list.get(currentIndex);
- if(!current.base.isDisposed())
- return;
- list.set(currentIndex, result);
- } else {
- list.add(result);
- }
-
- if (Development.DEVELOPMENT) {
- if(Development.<Boolean>getProperty(DevelopmentKeys.QUERYPROCESSOR_LISTENERS, Bindings.BOOLEAN)) {
- new Exception().printStackTrace();
- System.err.println("addListener -> " + list.size() + " " + entry + " " + base + " " + procedure);
- }
- }
-
- queryListening.addedEntries.put(base, result);
-
- }
-
-
- }
QueryListening(QueryProcessor processor) {
this.processor = processor;
scheduler = new Scheduler(processor);
- consumer = scheduler.newConsumer();
scheduler.start();
}
void sync() {
try {
- scheduler.flush();
+ scheduler.sync();
} catch (Throwable t) {
LOGGER.error("Error while waiting for query dependency management", t);
}
if(parent != null) {
try {
if(!child.isImmutable(graph))
- consumer.accept(new RegisterParentRunnable(parent, child));
+ scheduler.accept(new RegisterParentRunnable(parent, child));
} catch (DatabaseException e) {
LOGGER.error("Error while registering query dependencies", e);
}
if(listener != null)
if(!listener.isDisposed())
- consumer.accept(new RegisterListenerRunnable(this, listener, procedure, parent, child));
+ scheduler.accept(new RegisterListenerRunnable(this, listener, procedure, parent, child));
}
if(base == null) return;
- consumer.accept(() -> {
- ListenerEntry entry = addedEntries.get(base);
- if(entry != null) entry.setLastKnown(result);
- });
+ scheduler.accept(new RegisterFirstKnownRunnable(addedEntries, base, result));
}
}
- public void fireListeners(WriteGraphImpl graph) {
+ public void fireListeners(ReadGraphImpl graph) {
assert (!processor.updating);
assert (!processor.cache.collecting);
else
return Collections.emptyList();
}
-
+
+ private static class RegisterParentRunnable implements Runnable {
+
+ private final CacheEntry parent;
+ private final CacheEntry child;
+
+ public RegisterParentRunnable(CacheEntry parent, CacheEntry child) {
+ this.parent = parent;
+ this.child = child;
+ }
+
+ @Override
+ public void run() {
+ child.addParent(parent);
+ if (Development.DEVELOPMENT) {
+ if(Development.<Boolean>getProperty(DevelopmentKeys.QUERYPROCESSOR_DEPENDENCIES, Bindings.BOOLEAN)) {
+ System.out.println(child + " -> " + parent);
+ }
+ }
+ }
+
+ }
+
+ private static class RegisterListenerRunnable implements Runnable {
+
+ private final QueryListening queryListening;
+ private final ListenerBase base;
+ private final Object procedure;
+ private final CacheEntry parent;
+ private final CacheEntry entry;
+
+ public RegisterListenerRunnable(QueryListening queryListening, ListenerBase base, Object procedure, CacheEntry parent, CacheEntry entry) {
+ this.queryListening = queryListening;
+ this.base = base;
+ this.procedure = procedure;
+ this.parent = parent;
+ this.entry = entry;
+ }
+
+ @Override
+ public void run() {
+
+ assert (entry != null);
+ assert (procedure != null);
+
+ ArrayList<ListenerEntry> list = queryListening.listeners.get(entry);
+ if (list == null) {
+ list = new ArrayList<>(1);
+ queryListening.listeners.put(entry, list);
+ }
+
+ ListenerEntry result = new ListenerEntry(entry, base, procedure);
+ // Equals is here based on base
+ int currentIndex = list.indexOf(result);
+ // There was already a listener
+ if(currentIndex > -1) {
+ ListenerEntry current = list.get(currentIndex);
+ if(!current.base.isDisposed())
+ return;
+ list.set(currentIndex, result);
+ } else {
+ list.add(result);
+ }
+
+ if (Development.DEVELOPMENT) {
+ if(Development.<Boolean>getProperty(DevelopmentKeys.QUERYPROCESSOR_LISTENERS, Bindings.BOOLEAN)) {
+ new Exception().printStackTrace();
+ System.err.println("addListener -> " + list.size() + " " + entry + " " + base + " " + procedure);
+ }
+ }
+
+ queryListening.addedEntries.put(base, result);
+
+ }
+
+
+ }
+
+ private static class RegisterFirstKnownRunnable implements Runnable {
+
+ private final Map<ListenerBase,ListenerEntry> addedEntries;
+ private final ListenerBase base;
+ private final Object result;
+
+ public RegisterFirstKnownRunnable(Map<ListenerBase,ListenerEntry> addedEntries, ListenerBase base, Object result) {
+ this.addedEntries = addedEntries;
+ this.base = base;
+ this.result = result;
+ }
+
+ @Override
+ public void run() {
+ ListenerEntry entry = addedEntries.remove(base);
+ if(entry != null) entry.setLastKnown(result);
+ }
+
+ }
+
}
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
+import org.eclipse.core.runtime.Platform;
import org.simantics.databoard.Bindings;
import org.simantics.db.AsyncReadGraph;
import org.simantics.db.DevelopmentKeys;
import org.simantics.db.Session;
import org.simantics.db.Statement;
import org.simantics.db.VirtualGraph;
+import org.simantics.db.common.ByteFileReader;
import org.simantics.db.common.procedure.adapter.AsyncMultiProcedureAdapter;
import org.simantics.db.common.utils.Logger;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.request.ExternalRead;
import org.simantics.db.request.MultiRead;
import org.simantics.db.request.RequestFlags;
+import org.simantics.db.service.Bytes;
import org.simantics.layer0.Layer0;
import org.simantics.utils.DataContainer;
import org.simantics.utils.Development;
+import org.simantics.utils.FileUtils;
import org.simantics.utils.datastructures.Pair;
import org.simantics.utils.datastructures.collections.CollectionUtils;
import org.simantics.utils.datastructures.disposable.AbstractDisposable;
}
+ public synchronized void save() throws IOException {
+
+ long start = System.nanoTime();
+
+ Collection<CacheEntryBase> caches = allCaches(new CacheCollectionResult()).toCollection();
+ Map<Long,List<CacheEntryBase>> cachesByCluster = new HashMap<>();
+ for(CacheEntryBase entry : caches) {
+ String clazz = entry.classId();
+ if(clazz == null)
+ continue;
+ long cluster = entry.cluster(this);
+ List<CacheEntryBase> queries = cachesByCluster.get(cluster);
+ if(queries == null) {
+ queries = new ArrayList<>();
+ cachesByCluster.put(cluster, queries);
+ }
+ queries.add(entry);
+ }
+
+ File workspace = Platform.getLocation().toFile();
+ File dir = new File(workspace, "queryData");
+ FileUtils.deleteAll(dir);
+
+ dir.mkdir();
+
+ for(Long cluster : cachesByCluster.keySet()) {
+
+ List<CacheEntryBase> queries = cachesByCluster.get(cluster);
+ QuerySerializer serializer = new QuerySerializer(this);
+ int count = 0;
+ int pos = serializer.writeUnknownSize();
+ for(CacheEntryBase entry : queries) {
+ String clazz = entry.classId();
+ if(clazz == null)
+ continue;
+ try {
+ entry.serialize(serializer);
+ count++;
+ } catch (IllegalStateException e) {
+ System.err.println(e.getMessage());
+ }
+ }
+ serializer.setUnknownSize(pos, count);
+
+ System.err.println(serializer.bytes().length + " bytes for cluster " + cluster);
+ FileUtils.writeFile(new File(dir, "" + cluster + ".queryData"), serializer.bytes());
+
+ }
+
+ long end = System.nanoTime();
+
+ System.err.println("saved queries in " + 1e-6*(end-start) + "ms.");
+
+ }
+
+ public void restore() throws IOException {
+
+ long start = System.nanoTime();
+
+ File workspace = Platform.getLocation().toFile();
+ File dir = new File(workspace, "queryData");
+ dir.mkdir();
+
+ for(File f : FileUtils.listFilesByExtension(dir, "queryData")) {
+ byte[] bytes = FileUtils.readFile(f);
+ QueryDeserializer qd = new QueryDeserializer(this, bytes);
+ qd.readHeaders();
+ qd.readQueries();
+ }
+
+ long end = System.nanoTime();
+
+ System.err.println("restored queries in " + 1e-6*(end-start) + "ms.");
+
+ }
+
boolean removeQuery(CacheEntry entry) {
// This entry has been removed before. No need to do anything here.
entry.prepareRecompute(querySupport);
ReadGraphImpl parentGraph = graph.forRecompute(entry);
-
+ parentGraph.asyncBarrier.inc();
query.recompute(parentGraph);
+ parentGraph.asyncBarrier.dec();
if(entry.isExcepted()) return ListenerEntry.NO_VALUE;
}
return result;
}
+
+ public long cluster(int resource) {
+ if(resource <= 0)
+ return 0;
+ return querySupport.getClusterId(resource);
+ }
public void assertDone() {
}
return L0;
}
+ public Layer0 getL0() {
+ return L0;
+ }
+
public static ThreadLocal<Integer> thread = new ThreadLocal<Integer>() {
protected Integer initialValue() {
return -1;
--- /dev/null
+package org.simantics.db.impl.query;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.simantics.db.impl.ClusterTraitsBase;
+
+import gnu.trove.list.array.TByteArrayList;
+import gnu.trove.map.hash.TLongIntHashMap;
+import gnu.trove.procedure.TLongIntProcedure;
+
+public class QuerySerializer {
+
+ private QueryProcessor processor;
+ private QuerySupport querySupport;
+ private TByteArrayList bytes = new TByteArrayList();
+ private TLongIntHashMap clusterKeys = new TLongIntHashMap();
+ private Map<String,Integer> ids = new HashMap<String,Integer>();
+
+ public QuerySerializer(QueryProcessor processor) {
+ this.processor = processor;
+ this.querySupport = processor.querySupport;
+ }
+
+ public int writeUnknownSize() {
+ int pos = bytes.size();
+ bytes.add((byte)0);
+ bytes.add((byte)0);
+ bytes.add((byte)0);
+ bytes.add((byte)0);
+ return pos;
+ }
+
+ public void setUnknownSize(int pos, int value) {
+ bytes.set(pos, (byte) (value & 0xFF));
+ bytes.set(pos+1, (byte) ((value >>> 8) & 0xFF));
+ bytes.set(pos+2, (byte) ((value >>> 16) & 0xFF));
+ bytes.set(pos+3, (byte) ((value >>> 24) & 0xFF));
+ }
+
+ public void serializeId(String classId) {
+ Integer id = ids.get(classId);
+ if(id == null) {
+ id = ids.size() + 1;
+ ids.put(classId, id);
+ }
+ writeLE(id);
+ }
+
+ public void addResource(int r) {
+ if(r < 0) {
+ writeLE(r);
+ } else {
+ long clusterId = querySupport.getClusterId(r);
+ int clusterKey = clusterKeys.get(clusterId);
+ if(clusterKey == 0) {
+ clusterKey = clusterKeys.size() + 1;
+ clusterKeys.put(clusterId, clusterKey);
+ }
+ int i = ClusterTraitsBase.createResourceKeyNoThrow(clusterKey, ClusterTraitsBase.getResourceIndexFromResourceKeyNoThrow(r));
+ writeLE(i);
+ }
+ }
+
+ public void addString(String s) {
+ byte[] b = s.getBytes();
+ writeLE(b.length);
+ bytes.add(b);
+ }
+
+ public void add(byte b) {
+ bytes.add(b);
+ }
+
+ public void add(byte[] bs) {
+ bytes.add(bs);
+ }
+
+ public byte[] bytes() {
+ TByteArrayList header = new TByteArrayList();
+ writeLE(header, ids.size());
+ for(Entry<String,Integer> entry : ids.entrySet()) {
+ String id = entry.getKey();
+ writeLE(header, id.length());
+ header.add(id.getBytes());
+ writeLE(header, entry.getValue());
+ }
+
+ writeLE(header, clusterKeys.size());
+ clusterKeys.forEachEntry(new TLongIntProcedure() {
+
+ @Override
+ public boolean execute(long a, int b) {
+ writeLE(header, a);
+ writeLE(header, b);
+ return true;
+ }
+
+ });
+
+ header.add(bytes.toArray());
+ return header.toArray();
+ }
+
+ public void writeLE(int value) {
+ writeLE(bytes, value);
+ }
+
+ public static void writeLE(TByteArrayList bytes, int value) {
+ bytes.add((byte) (value & 0xFF));
+ bytes.add((byte) ((value >>> 8) & 0xFF));
+ bytes.add((byte) ((value >>> 16) & 0xFF));
+ bytes.add((byte) ((value >>> 24) & 0xFF));
+ }
+
+ public void writeLE(long value) {
+ writeLE(bytes, value);
+ }
+
+ public static void writeLE(TByteArrayList bytes, long value) {
+ bytes.add((byte) (value & 0xFF));
+ bytes.add((byte) ((value >>> 8) & 0xFF));
+ bytes.add((byte) ((value >>> 16) & 0xFF));
+ bytes.add((byte) ((value >>> 24) & 0xFF));
+ bytes.add((byte) ((value >>> 32) & 0xFF));
+ bytes.add((byte) ((value >>> 40) & 0xFF));
+ bytes.add((byte) ((value >>> 48) & 0xFF));
+ bytes.add((byte) ((value >>> 56) & 0xFF));
+ }
+
+ public QueryProcessor getQueryProcessor() {
+ return processor;
+ }
+
+}
import java.io.InputStream;
+import org.simantics.db.ObjectResourceIdMap;
import org.simantics.db.Resource;
import org.simantics.db.Session;
import org.simantics.db.VirtualGraph;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.exception.ResourceNotFoundException;
+import org.simantics.db.impl.ClusterSupport;
import org.simantics.db.impl.graph.ReadGraphImpl;
public interface QuerySupport extends ResourceTranslator {
Session getSession();
-
+
+ ClusterSupport getClusterSupport();
+
+ ObjectResourceIdMap<String> createChildMap();
+
boolean isImmutable(int id);
long getClusterId(int id);
int getId(Resource resource);
except(throwable);
}
+ @Override
+ public String classId() {
+ return null;
+ }
+
}
return RequestFlags.IMMEDIATE_UPDATE;
}
+ @Override
+ public void serializeValue(QuerySerializer serializer) {
+ RelationInfo ri = getResult();
+ serializer.addResource(ri.predicate);
+ serializer.add(ri.isFunctional ? (byte)1 : 0);
+ serializer.add(ri.isFinal ? (byte)1 : 0);
+ serializer.add(ri.isAsserted ? (byte)1 : 0);
+ }
+
}
--- /dev/null
+package org.simantics.db.impl.query;
+
+import org.simantics.db.RelationInfo;
+import org.simantics.db.exception.DatabaseException;
+
+public class RelationInfoQueryFactory extends QueryFactoryBase {
+
+ @Override
+ public CacheEntryBase readKeyAndValue(QueryDeserializer deserializer) throws DatabaseException {
+ RelationInfoQuery result = reference(deserializer);
+ int r = deserializer.readResource();
+ int isFunctional = deserializer.readByte();
+ int isFinal = deserializer.readByte();
+ int isAsserted = deserializer.readByte();
+ RelationInfo ri = new RelationInfo(r, isFunctional == 1, isFinal == 1, isAsserted == 1);
+ result.setResult(ri);
+ result.setReady();
+ return result;
+ }
+
+ @Override
+ public <T extends CacheEntryBase> T reference(QueryDeserializer deserializer) throws DatabaseException {
+ return (T)deserializer.readRelationInfoQuery();
+ }
+
+}
--- /dev/null
+package org.simantics.db.impl.query;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.Semaphore;
+
+class Scheduler extends ThreadLocal<TaskList> {
+
+ private final QueryProcessor processor;
+
+ private static final int MAX_TASKLIST_SIZE = 1<<8;
+
+ /*
+ * New TaskList objects shall be assigned this size.
+ * This shall grow exponentially upon task list creation to max size and shall reset to 1 when a write synchronizes the tasks.
+ * The intention is to make sure that upon frequent syncs the tasks shall be scheduled
+ */
+ private int currentTaskListSize = 1;
+
+ /*
+ * Anyone wishing to execute any tasks needs to hold this monitor
+ */
+ private Object taskExecutionMonitor = new Object();
+
+ /*
+ * Anyone wishing to manipulate the list of dispatched tasks needs to hold this monitor
+ */
+ private Object taskDispatchMonitor = new Object();
+
+ /*
+ * When a thread-specific TaskList becomes full it is added into this list for execution.
+ * The executor thread takes TaskLists from this list.
+ * The sync operation can also execute remaining tasks.
+ */
+ private ArrayList<TaskList> dispatchedTaskLists;
+
+ /*
+ * This replicates the ThreadLocal map of TaskList objects to enable listing of tasks active queues
+ */
+ private final Map<Thread,TaskList> activeTaskLists = new HashMap<>();
+
+ /*
+ * This semaphore is incremented each time s task list gets dispatched. The execution thread waits for the semaphore.
+ */
+ private final Semaphore taskDispatchNotifications = new Semaphore(0);
+
+ Scheduler(QueryProcessor processor) {
+ this.processor = processor;
+ }
+
+ /*
+ * This gets called by multiple query threads
+ */
+ void accept(Runnable task) {
+ TaskList l = get();
+ l.add(task);
+ if(l.shouldSchedule()) {
+ remove();
+ sendToExecution();
+ }
+ }
+
+ /*
+ * A task list has reached full size and is moved into execution by the execution thread
+ */
+ void sendToExecution() {
+ synchronized(activeTaskLists) {
+ // This is dispatched so it should not anymore be in list of active TaskList objects.
+ TaskList l = activeTaskLists.remove(Thread.currentThread());
+ synchronized(taskDispatchMonitor) {
+ if(dispatchedTaskLists == null)
+ dispatchedTaskLists = new ArrayList<TaskList>();
+ dispatchedTaskLists.add(l);
+ }
+ if(currentTaskListSize < MAX_TASKLIST_SIZE)
+ currentTaskListSize = currentTaskListSize<<1;
+ }
+ // Release the execution thread
+ taskDispatchNotifications.release();
+ }
+
+ /*
+ * Gets dispatched TaskList objects for execution.
+ * Returns null when there's nothing to execute (and thread shall go to sleep).
+ */
+ ArrayList<TaskList> getDispatchedQueues() {
+ synchronized(taskDispatchMonitor) {
+ if(dispatchedTaskLists == null)
+ return null;
+ ArrayList<TaskList> result = dispatchedTaskLists;
+ dispatchedTaskLists = null;
+ return result;
+ }
+ }
+
+ void start() {
+
+ Thread thread = new Thread() {
+
+ public void run() {
+
+ // We execute tasks as long as the query processor is alive
+ while(!processor.isDisposed()) {
+
+ try {
+
+ // This is a mutex between this place and sync()
+ synchronized(taskExecutionMonitor) {
+
+ // Execute busily while there is something to execute
+ while(true) {
+
+ ArrayList<TaskList> qs = getDispatchedQueues();
+ if(qs == null) {
+ // No tasks - go to sleep
+ break;
+ }
+
+ // Execute everything we got
+ for(TaskList queue : qs) {
+ for(Runnable r : queue) {
+ r.run();
+ }
+ }
+
+ }
+
+ }
+
+ // sendToExecution shall release this
+ taskDispatchNotifications.acquire();
+
+ } catch (InterruptedException e) {
+ QueryListening.LOGGER.error("Unexpected interrupt", e);
+ }
+
+ }
+
+ };
+
+ };
+
+ thread.setName("QueryListening");
+ thread.start();
+
+ }
+
+ /*
+ * ThreadLocal calls this to create a TaskList.
+ * Called with first list per thread and also when accepting next task after sendToExecution.
+ */
+ @Override
+ protected TaskList initialValue() {
+ TaskList result = new TaskList(currentTaskListSize);
+ synchronized(activeTaskLists) {
+ activeTaskLists.put(Thread.currentThread(), result);
+ }
+ return result;
+ }
+
+ /*
+ * This makes sure that all tasks have been executed upon return.
+ * It takes the taskExecutionMonitor from the thread and executes possible dispatched work and
+ * also executes anything in active task lists. It resets the dispatch sizes of current and
+ * subsequently created task lists to 1.
+ */
+ void sync() {
+
+ // This is a mutex between this place and execution thread
+ synchronized(taskExecutionMonitor) {
+
+ currentTaskListSize = 1;
+
+ // Perform all dispatched work
+ ArrayList<TaskList> qs = getDispatchedQueues();
+ if(qs != null) {
+ for(TaskList queue : qs) {
+ for(Runnable r : queue) {
+ r.run();
+ }
+ }
+ }
+
+ // Also perform any tasks in active queues.
+ // This assumes that all query threads that send new tasks are now parked and shall not interfere.
+ synchronized(activeTaskLists) {
+ for(TaskList queue : activeTaskLists.values()) {
+ // Run all tasks
+ for(Runnable r : queue) {
+ if(r != null)
+ r.run();
+ }
+ // Remove the tasks from list and reset the max size to 1.
+ queue.reset();
+ }
+ }
+
+ }
+
+ }
+
+}
\ No newline at end of file
*******************************************************************************/
package org.simantics.db.impl.query;
-import java.util.concurrent.atomic.AtomicBoolean;
-
import org.simantics.db.RelationInfo;
import org.simantics.db.common.exception.DebugException;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.request.RequestFlags;
public final class Statements extends CollectionBinaryQuery<TripleIntProcedure> implements TripleIntProcedure {
-
+
public Statements(final int r1, final int r2) {
super(r1, r2);
}
-
+
final public static void queryEach(ReadGraphImpl graph, final int r1, final int r2, final QueryProcessor provider, final CacheEntry parent, final ListenerBase listener, final TripleIntProcedure procedure) throws DatabaseException {
-
- assert(r1 != 0);
- assert(r2 != 0);
-
+
+ assert(r1 != 0);
+ assert(r2 != 0);
+
if(parent == null && listener == null) {
- Statements.computeForEach(graph, r1, r2, null, procedure);
- return;
+ Statements.computeForEach(graph, r1, r2, null, procedure);
+ return;
}
-
+
QueryCache.runnerStatements(graph, r1, r2, parent, listener, procedure);
-
+
}
- @Override
- final public void removeEntry(QueryProcessor provider) {
+ @Override
+ final public void removeEntry(QueryProcessor provider) {
provider.cache.remove(this);
- }
-
+ }
+
final static TripleIntProcedure NOPT = new TripleIntProcedure() {
- @Override
- public void exception(ReadGraphImpl graph, Throwable throwable) {
- }
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable throwable) {
+ }
- @Override
- public void execute(ReadGraphImpl graph, int s, int p, int o) {
- }
+ @Override
+ public void execute(ReadGraphImpl graph, int s, int p, int o) {
+ }
+
+ @Override
+ public void finished(ReadGraphImpl graph) {
+ }
- @Override
- public void finished(ReadGraphImpl graph) {
- }
-
};
-
+
final static private IntArray getAssertionMap(ReadGraphImpl graph, final int r1, final int r2, final Statements entry) throws DatabaseException {
-
+
class AssertionMapProc implements IntProcedure {
-
- boolean first = true;
-
- private IntArray result;
-
- public void addStatement(int s, int p, int o) {
-
- if(result.size() == 0) {
- result.add(s);
- result.add(p);
- result.add(o);
- } else {
- for(int i = 0;i < result.sizeOrData ; i+=3) {
- int existingP = result.data[i+1];
- if(p == existingP) {
- int existingO = result.data[i+2];
- if(existingO == o) return;
- }
- }
- result.add(s);
- result.add(p);
- result.add(o);
- }
-
- }
-
+
+ boolean first = true;
+
+ private IntArray result;
+
+ public void addStatement(int s, int p, int o) {
+
+ if(result.size() == 0) {
+ result.add(s);
+ result.add(p);
+ result.add(o);
+ } else {
+ for(int i = 0;i < result.sizeOrData ; i+=3) {
+ int existingP = result.data[i+1];
+ if(p == existingP) {
+ int existingO = result.data[i+2];
+ if(existingO == o) return;
+ }
+ }
+ result.add(s);
+ result.add(p);
+ result.add(o);
+ }
+
+ }
+
@Override
public void execute(ReadGraphImpl graph, int type) throws DatabaseException {
if(result == null) {
- result = QueryCache.resultAssertedStatements(graph, type, r2, entry, null);
+ result = QueryCache.resultAssertedStatements(graph, type, r2, entry, null);
} else {
- if (first) {
- IntArray ia = result;
- result = new IntArray();
- if(ia.data != null) {
- for(int i = 0;i < ia.sizeOrData ; i+=3) addStatement(ia.data[i],ia.data[i+1],ia.data[i+2]);
- }
- first = false;
- }
- IntArray ia = QueryCache.resultAssertedStatements(graph, type, r2, entry, null);
- if(ia.data != null) {
- for(int i = 0;i < ia.sizeOrData ; i+=3) addStatement(ia.data[i],ia.data[i+1],ia.data[i+2]);
- }
+ if (first) {
+ IntArray ia = result;
+ result = new IntArray();
+ if(ia.data != null) {
+ for(int i = 0;i < ia.sizeOrData ; i+=3) addStatement(ia.data[i],ia.data[i+1],ia.data[i+2]);
+ }
+ first = false;
+ }
+ IntArray ia = QueryCache.resultAssertedStatements(graph, type, r2, entry, null);
+ if(ia.data != null) {
+ for(int i = 0;i < ia.sizeOrData ; i+=3) addStatement(ia.data[i],ia.data[i+1],ia.data[i+2]);
+ }
}
}
public void finished(ReadGraphImpl graph) {
}
- @Override
- public void exception(ReadGraphImpl graph, Throwable throwable) {
- }
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable throwable) {
+ }
}
-
+
AssertionMapProc amp = new AssertionMapProc();
// This dependency could be cut
QueryCache.runnerPrincipalTypes(graph, r1, entry, null, amp);
-
+
return amp.result;
-
+
}
-
+
final static private void forSingleAssertion(ReadGraphImpl graph, final int r1, final int r2, final Statements parent, final TripleIntProcedure procedure) throws DatabaseException {
-
- IntArray map = getAssertionMap(graph, r1, r2, parent);
- if(map == null) {
- procedure.finished(graph);
+
+ IntArray map = getAssertionMap(graph, r1, r2, parent);
+ if(map == null) {
+ procedure.finished(graph);
return;
- }
-
+ }
+
int size = map.size();
if(size == 3) {
- int s = map.data[0];
- int p = map.data[1];
- int o = map.data[2];
-
- procedure.execute(graph, s,p,o);
- procedure.finished(graph);
+ int s = map.data[0];
+ int p = map.data[1];
+ int o = map.data[2];
+
+ procedure.execute(graph, s,p,o);
+ procedure.finished(graph);
} else if(size == 0) {
- procedure.finished(graph);
-
+ procedure.finished(graph);
+
} else {
- int candidateS = map.data[0];
- int candidateP = map.data[1];
- int candidateO = map.data[2];
-
- IntSet candidateIs = null;
- try {
- candidateIs = QueryCache.resultSuperTypes(graph, candidateS, parent, null);
- } catch (DatabaseException e) {
- procedure.exception(graph, e);
- return;
- }
-
- for(int i=3;i<map.size();i+=3) {
-
- int nextS = map.data[i];
- int nextP = map.data[i+1];
- int nextO = map.data[i+2];
-
- if(nextS != candidateS) {
-
- if(candidateIs.contains(nextS)) {
-
- // Next is a super type of candidate => ignore next
-
- } else {
-
- IntSet nextIs = null;
- try {
- nextIs = QueryCache.resultSuperTypes(graph, nextS, parent, null);
- } catch (DatabaseException e) {
- procedure.exception(graph, e);
- return;
- }
-
- if(nextIs.contains(candidateS)) {
-
- // Candidate is a super type of next => next is the new candidate
-
- candidateS = nextS;
- candidateP = nextP;
- candidateO = nextO;
- candidateIs = nextIs;
-
- } else {
- // candidate and next are unrelated => error
- ManyObjectsForFunctionalRelationException exception = new ManyObjectsForFunctionalRelationException("Functional relation has conflicting assertions.", r1);
- procedure.exception(graph, exception);
- return;
- }
-
- }
-
- }
-
- }
-
+ int candidateS = map.data[0];
+ int candidateP = map.data[1];
+ int candidateO = map.data[2];
+
+ IntSet candidateIs = null;
+ try {
+ candidateIs = QueryCache.resultSuperTypes(graph, candidateS, parent, null);
+ } catch (DatabaseException e) {
+ procedure.exception(graph, e);
+ return;
+ }
+
+ for(int i=3;i<map.size();i+=3) {
+
+ int nextS = map.data[i];
+ int nextP = map.data[i+1];
+ int nextO = map.data[i+2];
+
+ if(nextS != candidateS) {
+
+ if(candidateIs.contains(nextS)) {
+
+ // Next is a super type of candidate => ignore next
+
+ } else {
+
+ IntSet nextIs = null;
+ try {
+ nextIs = QueryCache.resultSuperTypes(graph, nextS, parent, null);
+ } catch (DatabaseException e) {
+ procedure.exception(graph, e);
+ return;
+ }
+
+ if(nextIs.contains(candidateS)) {
+
+ // Candidate is a super type of next => next is the new candidate
+
+ candidateS = nextS;
+ candidateP = nextP;
+ candidateO = nextO;
+ candidateIs = nextIs;
+
+ } else {
+ // candidate and next are unrelated => error
+ ManyObjectsForFunctionalRelationException exception = new ManyObjectsForFunctionalRelationException("Functional relation has conflicting assertions.", r1);
+ procedure.exception(graph, exception);
+ return;
+ }
+
+ }
+
+ }
+
+ }
+
procedure.execute(graph, candidateS, candidateP, candidateO);
procedure.finished(graph);
-
+
}
-
+
}
-
+
final static InternalProcedure<IntSet> NOP = new InternalProcedure<IntSet>() {
- @Override
- public void execute(ReadGraphImpl graph, IntSet result) {
- }
+ @Override
+ public void execute(ReadGraphImpl graph, IntSet result) {
+ }
+
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable throwable) {
+ }
- @Override
- public void exception(ReadGraphImpl graph, Throwable throwable) {
- }
-
};
-
- // Search for one statement
- final static public void computeFunctionalIndex(ReadGraphImpl graph, final int r1, final int r2, final Statements parent, final RelationInfo ri, final TripleIntProcedure procedure) throws DatabaseException {
-
+
+ // Search for one statement
+ final static public void computeFunctionalIndex(ReadGraphImpl graph, final int r1, final int r2, final Statements parent, final RelationInfo ri, final TripleIntProcedure procedure) throws DatabaseException {
+
if(ri.isFinal) {
-
- int result = graph.processor.querySupport.getFunctionalObject(r1, r2);
- if(result == 0) {
+ int result = graph.processor.querySupport.getFunctionalObject(r1, r2);
- // Check for assertions
- forSingleAssertion(graph, r1, r2, parent, procedure);
+ if(result == 0) {
- } else if(result == -1) {
+ // Check for assertions
+ forSingleAssertion(graph, r1, r2, parent, procedure);
- graph.processor.querySupport.getObjects(graph, r1, r2, new IntProcedure() {
+ } else if(result == -1) {
+
+ graph.processor.querySupport.getObjects(graph, r1, r2, new IntProcedure() {
+
+ @Override
+ public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
+ procedure.execute(graph, r1, r2, i);
+ }
- @Override
- public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
- procedure.execute(graph, r1, r2, i);
- }
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable t) {
+ if(DebugException.DEBUG) new DebugException(t).printStackTrace();
+ }
- @Override
- public void exception(ReadGraphImpl graph, Throwable t) {
- if(DebugException.DEBUG) new DebugException(t).printStackTrace();
- }
+ @Override
+ public void finished(ReadGraphImpl graph) {
+ }
- @Override
- public void finished(ReadGraphImpl graph) {
- }
+ });
- });
+ // Check for assertions
+ forSingleAssertion(graph, r1, r2, parent, procedure);
- // Check for assertions
- forSingleAssertion(graph, r1, r2, parent, procedure);
-
- } else {
+ } else {
- // If functional relation was found there is no need to check assertions
+ // If functional relation was found there is no need to check assertions
procedure.execute(graph, r1, r2, result);
procedure.finished(graph);
-
- }
-
+ }
+
+
} else {
-
- final AtomicBoolean found = new AtomicBoolean(false);
-
+
// Note! The dependency is intentionally cut!
IntSet direct = QueryCache.resultDirectPredicates(graph, r1, null, null);
direct.forEach(graph, new SyncIntProcedure() {
-
+
+ /*
+ * 0 = not found
+ * 1 = found
+ * 2 = exception
+ */
+ int found = 0;
+
@Override
public void run(ReadGraphImpl graph) throws DatabaseException {
-
- if(found.get()) {
- procedure.finished(graph);
- } else {
+
+ if(found == 1) {
+
+ procedure.finished(graph);
+
+ } else if(found == 0) {
+
// Check for assertions
forSingleAssertion(graph, r1, r2, parent, procedure);
+
}
-
+
}
@Override
public void execute(ReadGraphImpl graph, final int pred) throws DatabaseException {
-
- if(found.get()) return;
+
+ if(found > 0)
+ return;
if(pred == r2) {
-
- inc();
-
+
// Note! The dependency is intentionally cut!
QueryCache.runnerDirectObjects(graph, r1, pred, null, null, new IntProcedure() {
@Override
public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
-
- if(found.compareAndSet(false, true)) {
+
+ if(found == 0) {
+
procedure.execute(graph, r1, pred, i);
- } else {
- ManyObjectsForFunctionalRelationException exception = new ManyObjectsForFunctionalRelationException("Functional relation has more than one statement.", r1);
- procedure.exception(graph, exception);
- }
+ found = 1;
+
+ } else {
+
+ ManyObjectsForFunctionalRelationException exception = new ManyObjectsForFunctionalRelationException("Functional relation has more than one statement.", r1);
+ procedure.exception(graph, exception);
+ found = 2;
+
+ }
}
@Override
public void finished(ReadGraphImpl graph) throws DatabaseException {
- dec(graph);
}
-
- @Override
- public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
- procedure.exception(graph, t);
- dec(graph);
- }
+
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
+
+ procedure.exception(graph, t);
+ found = 2;
+
+ }
});
} else {
-
- inc();
-
+
QueryCache.runnerSuperRelations(graph, pred, parent, null, new InternalProcedure<IntSet>() {
-
+
@Override
public void execute(ReadGraphImpl graph, IntSet result) throws DatabaseException {
-
- if(found.get()) {
- dec(graph);
+
+ if(found > 0)
return;
- }
if(result.contains(r2)) {
-
+
inc();
-
+
// Note! The dependency is intentionally cut!
QueryCache.runnerDirectObjects(graph, r1, pred, null, null, new IntProcedure() {
-
+
@Override
public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
-
- if(found.compareAndSet(false, true)) {
- procedure.execute(graph, r1, pred, i);
- } else {
- ManyObjectsForFunctionalRelationException exception = new ManyObjectsForFunctionalRelationException("Functional relation has more than one statement.", r1);
- procedure.exception(graph, exception);
- }
-
+
+ if(found == 0) {
+
+ procedure.execute(graph, r1, pred, i);
+ found = 1;
+
+ } else {
+
+ ManyObjectsForFunctionalRelationException exception = new ManyObjectsForFunctionalRelationException("Functional relation has more than one statement (r1=" + r1 + ", r2=" + r2 + ").", r1);
+ procedure.exception(graph, exception);
+ found = 2;
+
+ }
+
}
-
+
@Override
public void finished(ReadGraphImpl graph) throws DatabaseException {
- dec(graph);
}
-
- @Override
- public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
- procedure.exception(graph, t);
- dec(graph);
- }
+
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
+ procedure.exception(graph, t);
+ found = 2;
+ }
});
-
+
}
-
- dec(graph);
-
+
+ }
+
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
+ procedure.exception(graph, t);
+ found = 2;
}
-
- @Override
- public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
- procedure.exception(graph, t);
- dec(graph);
- }
});
-
+
}
-
+
}
@Override
public void finished(ReadGraphImpl graph) throws DatabaseException {
dec(graph);
}
-
+
});
-
+
}
- }
-
+ }
+
final static private void forAssertions(ReadGraphImpl graph, final int r1, final int r2, final Statements parent, final TripleIntProcedure procedure) throws DatabaseException {
- QueryCache.runnerPrincipalTypes(graph, r1, parent, null, new SyncIntProcedure() {
-
+ QueryCache.runnerPrincipalTypes(graph, r1, parent, null, new SyncIntProcedure() {
+
@Override
public void run(ReadGraphImpl graph) throws DatabaseException {
procedure.finished(graph);
}
-
+
TripleIntProcedure proc = new TripleIntProcedureAdapter() {
@Override
public void execute(ReadGraphImpl graph, int s, int p, int o) throws DatabaseException {
- procedure.execute(graph, s, p, o);
+ procedure.execute(graph, s, p, o);
}
@Override
public void finished(ReadGraphImpl graph) throws DatabaseException {
dec(graph);
}
-
- @Override
- public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
+
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
dec(graph);
- procedure.exception(graph, t);
- }
+ procedure.exception(graph, t);
+ }
};
inc();
QueryCache.runnerAssertedStatements(graph, type, r2, parent, null, proc);
}
-
+
@Override
public void finished(ReadGraphImpl graph) throws DatabaseException {
dec(graph);
}
-
+
@Override
public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
dec(graph);
}
-
+
});
-
+
}
- final static public void computeNotFunctionalIndex(ReadGraphImpl graph, final int r1, final int r2, final Statements parent, final RelationInfo ri, final TripleIntProcedure procedure) throws DatabaseException {
+ final static public void computeNotFunctionalIndex(ReadGraphImpl graph, final int r1, final int r2, final Statements parent, final RelationInfo ri, final TripleIntProcedure procedure) throws DatabaseException {
- if(ri.isFinal) {
+ if(ri.isFinal) {
- graph.processor.querySupport.getObjects(graph, r1, r2, new IntProcedure() {
+ graph.processor.querySupport.getObjects(graph, r1, r2, new IntProcedure() {
- @Override
- public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
- procedure.execute(graph, r1, r2, i);
- }
+ @Override
+ public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
+ procedure.execute(graph, r1, r2, i);
+ }
- @Override
- public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
- if(DebugException.DEBUG) new DebugException(t).printStackTrace();
- procedure.exception(graph, t);
- }
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
+ if(DebugException.DEBUG) new DebugException(t).printStackTrace();
+ procedure.exception(graph, t);
+ }
- @Override
- public void finished(ReadGraphImpl graph) {
- }
+ @Override
+ public void finished(ReadGraphImpl graph) {
+ }
- });
+ });
- if(ri.isAsserted) {
- forAssertions(graph, r1, r2, parent, procedure);
- } else {
- procedure.finished(graph);
- }
+ if(ri.isAsserted) {
+ forAssertions(graph, r1, r2, parent, procedure);
+ } else {
+ procedure.finished(graph);
+ }
} else {
// Note! The dependency is intentionally cut!
IntSet direct = QueryCache.resultDirectPredicates(graph, r1, null, null);
direct.forEach(graph, new SyncIntProcedure() {
-
+
@Override
public void run(ReadGraphImpl graph) throws DatabaseException {
forAssertions(graph, r1, r2, parent, procedure);
public void execute(ReadGraphImpl graph, final int pred2) throws DatabaseException {
if(pred2 == r2) {
-
- inc();
-
+
// Note! The dependency is intentionally cut!
QueryCache.runnerDirectObjects(graph, r1, pred2, null, null, new IntProcedure() {
@Override
public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
- procedure.execute(graph, r1, pred2, i);
+ procedure.execute(graph, r1, pred2, i);
}
@Override
public void finished(ReadGraphImpl graph) throws DatabaseException {
- dec(graph);
}
-
- @Override
- public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
- procedure.exception(graph, t);
- dec(graph);
- }
+
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable t) throws DatabaseException {
+ procedure.exception(graph, t);
+ }
});
} else {
-
-// inc();
try {
-
+
IntSet result = QueryCache.resultSuperRelations(graph, pred2, parent, null);
if(result.contains(r2)) {
});
}
-
+
} catch (Throwable e) {
procedure.exception(graph, e);
}
}
-
+
}
@Override
public void finished(ReadGraphImpl graph) throws DatabaseException {
dec(graph);
}
-
+
});
-
+
}
-
+
}
-
+
public static void computeForEach(ReadGraphImpl graph, final int r1, final int r2, final Statements entry, final TripleIntProcedure procedure_) throws DatabaseException {
-
+
TripleIntProcedure procedure = entry != null ? entry : procedure_;
-
+
RelationInfo ri = QueryCache.resultRelationInfoQuery(graph, r2, entry, null);
graph.ensureLoaded(r1, r2);
if(ri.isFunctional) {
}
if(entry != null) entry.performFromCache(graph, procedure_);
-
+
}
-
+
@Override
public String toString() {
- return "Statements[" + r1() + " - " + r2() + "]";
+ return "Statements[" + r1() + " - " + r2() + "]";
}
final private void finish(ReadGraphImpl graph, TripleIntProcedure procedure) throws DatabaseException {
-
+
assert(assertPending());
synchronized(this) {
final IntArray value = (IntArray)getResult();
for(int i=0;i<value.size();i+=3) {
- procedure.execute(graph, value.data[i], value.data[i+1], value.data[i+2]);
+ procedure.execute(graph, value.data[i], value.data[i+1], value.data[i+2]);
}
-
+
procedure.finished(graph);
-
+
}
synchronized public void addOrSet(int s, int p, int o) {
-
- assert(assertPending());
-
- IntArray value = (IntArray)getResult();
+
+ assert(assertPending());
+
+ IntArray value = (IntArray)getResult();
value.add(s);
value.add(p);
value.add(o);
-
+
}
final static public int r1(long id) {
return (int)(id>>>32);
}
-
+
final static public int r2(long id) {
return (int)id;
}
-
+
final public void addOrSetFunctional(int s, long po) {
-
- addOrSetFunctional(s, r1(po), r2(po));
-
+
+ addOrSetFunctional(s, r1(po), r2(po));
+
}
final public void addOrSetFunctional(int s, int p, int o) {
-
- assert(assertPending());
-
- IntArray value = (IntArray)getResult();
+
+ assert(assertPending());
+
+ IntArray value = (IntArray)getResult();
value.add(s);
value.add(p);
value.add(o);
-
+
}
-
+
@Override
public Object performFromCache(ReadGraphImpl graph, final TripleIntProcedure procedure) throws DatabaseException {
- assert(isReady());
+ assert(isReady());
final IntArray value = (IntArray)getResult();
- if(handleException(graph, procedure)) return value;
-
+ if(handleException(graph, procedure)) return value;
+
for(int i=0;i<value.size();i+=3) {
- procedure.execute(graph, value.data[i], value.data[i+1], value.data[i+2]);
+ procedure.execute(graph, value.data[i], value.data[i+1], value.data[i+2]);
}
procedure.finished(graph);
-
+
return value;
-
+
}
-
+
@Override
public void recompute(ReadGraphImpl graph) throws DatabaseException {
-
+
computeForEach(graph, r1(), r2(), this, new TripleIntProcedureAdapter() {
@Override
public void finished(ReadGraphImpl graph) {
}
-
- @Override
- public void exception(ReadGraphImpl graph, Throwable t) {
- new Error("Error in recompute.", t).printStackTrace();
+
+ @Override
+ public void exception(ReadGraphImpl graph, Throwable t) {
+ new Error("Error in recompute.", t).printStackTrace();
}
});
-
+
}
@Override
public int type() {
return RequestFlags.IMMEDIATE_UPDATE;
}
-
+
@Override
boolean isImmutable(ReadGraphImpl graph) {
- return graph.processor.isImmutable(r1());
+ return graph.processor.isImmutable(r1());
}
@Override
public void exception(ReadGraphImpl graph, Throwable throwable) throws DatabaseException {
except(throwable);
}
-
+
}
--- /dev/null
+package org.simantics.db.impl.query;
+
+import org.simantics.db.exception.DatabaseException;
+
+public class StatementsFactory extends QueryFactoryBase {
+
+ @Override
+ public CacheEntryBase readKeyAndValue(QueryDeserializer deserializer) throws DatabaseException {
+ Statements result = reference(deserializer);
+ IntArray ia = IntArray.deserialize(deserializer);
+ result.setResult(ia);
+ result.setReady();
+ return result;
+ }
+
+ @Override
+ public <T extends CacheEntryBase> T reference(QueryDeserializer deserializer) throws DatabaseException {
+ return (T)deserializer.readStatements();
+ }
+
+}
import gnu.trove.procedure.TIntProcedure;
import gnu.trove.set.hash.TIntHashSet;
-public final class SuperRelations extends UnaryQueryP<IntSet> {
+public final class SuperRelations extends UnaryQueryPIntSet {
SuperRelations(final int resource) {
super(resource);
--- /dev/null
+package org.simantics.db.impl.query;
+
+import org.simantics.db.exception.DatabaseException;
+
+public class SuperRelationsFactory extends QueryFactoryBase {
+
+ @Override
+ public CacheEntryBase readKeyAndValue(QueryDeserializer deserializer) throws DatabaseException {
+ SuperRelations result = reference(deserializer);
+ IntSet ia = IntSet.deserialize(deserializer);
+ result.setResult(ia);
+ result.setReady();
+ return result;
+ }
+
+ @Override
+ public <T extends CacheEntryBase> T reference(QueryDeserializer deserializer) throws DatabaseException {
+ return (T)deserializer.readSuperRelations();
+ }
+
+}
import gnu.trove.procedure.TIntProcedure;
-public final class SuperTypes extends UnaryQueryP<IntSet> {
+public final class SuperTypes extends UnaryQueryPIntSet {
SuperTypes(int resource) {
super(resource);
--- /dev/null
+package org.simantics.db.impl.query;
+
+import org.simantics.db.exception.DatabaseException;
+
+public class SuperTypesFactory extends QueryFactoryBase {
+
+ @Override
+ public CacheEntryBase readKeyAndValue(QueryDeserializer deserializer) throws DatabaseException {
+ SuperTypes result = reference(deserializer);
+ IntSet ia = IntSet.deserialize(deserializer);
+ result.setResult(ia);
+ result.setReady();
+ return result;
+ }
+
+ @Override
+ public <T extends CacheEntryBase> T reference(QueryDeserializer deserializer) throws DatabaseException {
+ return (T)deserializer.readSuperTypes();
+ }
+
+}
--- /dev/null
+package org.simantics.db.impl.query;
+
+import java.util.ArrayList;
+
+class TaskList extends ArrayList<Runnable> {
+
+ private static final long serialVersionUID = -8047504882681478972L;
+
+ private int maxSize;
+
+ TaskList(int maxSize) {
+ this.maxSize = maxSize;
+ }
+
+ boolean shouldSchedule() {
+ return size() == maxSize;
+ }
+
+ void reset() {
+ clear();
+ maxSize = 1;
+ }
+
+}
\ No newline at end of file
import gnu.trove.procedure.TIntProcedure;
-public final class TypeHierarchy extends UnaryQueryP<IntSet> {
+public final class TypeHierarchy extends UnaryQueryPIntSet {
TypeHierarchy(int resource) {
super(resource);
--- /dev/null
+package org.simantics.db.impl.query;
+
+import org.simantics.db.exception.DatabaseException;
+
+public class TypeHierarchyFactory extends QueryFactoryBase {
+
+ @Override
+ public CacheEntryBase readKeyAndValue(QueryDeserializer deserializer) throws DatabaseException {
+ TypeHierarchy result = reference(deserializer);
+ IntSet ia = IntSet.deserialize(deserializer);
+ result.setResult(ia);
+ result.setReady();
+ return result;
+ }
+
+ @Override
+ public <T extends CacheEntryBase> T reference(QueryDeserializer deserializer) throws DatabaseException {
+ return (T)deserializer.readTypeHierarchy();
+ }
+
+}
import gnu.trove.procedure.TIntProcedure;
-public final class Types extends UnaryQueryP<IntSet> {
+public final class Types extends UnaryQueryPIntSet {
Types(int resource) {
super(resource);
--- /dev/null
+package org.simantics.db.impl.query;
+
+import org.simantics.db.exception.DatabaseException;
+
+public class TypesFactory extends QueryFactoryBase {
+
+ @Override
+ public CacheEntryBase readKeyAndValue(QueryDeserializer deserializer) throws DatabaseException {
+ Types result = reference(deserializer);
+ IntSet ia = IntSet.deserialize(deserializer);
+ result.setResult(ia);
+ result.setReady();
+ return result;
+ }
+
+ @Override
+ public <T extends CacheEntryBase> T reference(QueryDeserializer deserializer) throws DatabaseException {
+ return (T)deserializer.readTypes();
+ }
+
+}
except(throwable);
}
+ @Override
+ public long cluster(QueryProcessor processor) {
+ return 0;
+ }
+
+ @Override
+ public void serializeKey(QuerySerializer serializer) {
+ serializer.addString(id);
+ }
+
+ @Override
+ public void serializeValue(QuerySerializer serializer) {
+ Integer value = getResult();
+ serializer.addResource(value);
+ }
+
}
--- /dev/null
+package org.simantics.db.impl.query;
+
+import org.simantics.db.exception.DatabaseException;
+
+public class URIToResourceFactory extends QueryFactoryBase {
+
+ @Override
+ public CacheEntryBase readKeyAndValue(QueryDeserializer deserializer) throws DatabaseException {
+ URIToResource result = reference(deserializer);
+ int value = deserializer.readResource();
+ result.setResult(value);
+ result.setReady();
+ return result;
+ }
+
+ @Override
+ public <T extends CacheEntryBase> T reference(QueryDeserializer deserializer) throws DatabaseException {
+ return (T)deserializer.readURIToResource();
+ }
+
+}
import org.simantics.db.impl.graph.ReadGraphImpl;
import org.simantics.db.request.RequestFlags;
+import gnu.trove.list.array.TByteArrayList;
+
public abstract class UnaryQuery<Procedure> extends CacheEntryBase<Procedure> implements Query {
final public int id;
return graph.processor.isImmutable(id);
}
+ @Override
+ public long cluster(QueryProcessor processor) {
+ return processor.cluster(id);
+ }
+
+ @Override
+ public void serializeKey(QuerySerializer serializer) {
+ serializer.addResource(id);
+ }
+
}
--- /dev/null
+package org.simantics.db.impl.query;
+
+abstract public class UnaryQueryPIntSet extends UnaryQueryP<IntSet> {
+
+ public UnaryQueryPIntSet(int r) {
+ super(r);
+ }
+
+ @Override
+ public void serializeValue(QuerySerializer serializer) {
+ IntSet is = getResult();
+ is.serialize(serializer);
+ }
+
+}
return value;
}
+
+ @Override
+ public void serializeValue(QuerySerializer serializer) {
+ byte[] result = getResult();
+ if(result == null) {
+ serializer.writeLE(-1);
+ } else {
+ serializer.writeLE(result.length);
+ serializer.add(result);
+ }
+ }
@Override
public String toString() {
--- /dev/null
+package org.simantics.db.impl.query;
+
+import org.simantics.db.exception.DatabaseException;
+
+public class ValueQueryFactory extends QueryFactoryBase {
+
+ @Override
+ public CacheEntryBase readKeyAndValue(QueryDeserializer deserializer) throws DatabaseException {
+ ValueQuery result = reference(deserializer);
+ byte[] bytes = deserializer.readByteArray();
+ result.setResult(bytes);
+ result.setReady();
+ return result;
+ }
+
+ @Override
+ public <T extends CacheEntryBase> T reference(QueryDeserializer deserializer) throws DatabaseException {
+ return (T)deserializer.readValueQuery();
+ }
+
+}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.apache.lucene4.queryparser;bundle-version="4.9.0",
org.apache.lucene4.analyzers-common;bundle-version="4.9.0",
org.simantics.db.services;bundle-version="0.8.0",
- org.slf4j.api;bundle-version="1.7.25"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+ org.slf4j.api
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.db.indexing
Bundle-Activator: org.simantics.db.indexing.Activator
Bundle-ActivationPolicy: lazy
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Layer0 Database Utils
Bundle-SymbolicName: org.simantics.db.layer0;singleton:=true
Bundle-Version: 1.1.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: gnu.trove3;bundle-version="3.0.3",
org.eclipse.core.runtime;bundle-version="3.5.0",
org.simantics.databoard;bundle-version="0.6.2";visibility:=reexport,
org.simantics.db.services;bundle-version="1.1.0";visibility:=reexport,
org.simantics.db.management;bundle-version="1.1.0",
- org.apache.log4j;bundle-version="1.2.15",
org.apache.commons.io;bundle-version="1.4.0",
org.simantics.layer0;bundle-version="1.0.0";visibility:=reexport,
org.simantics.graph.db;bundle-version="1.1.5";visibility:=reexport,
*/
public abstract class ContextualRelatedValue implements ConverterComputationalValue {
- @SuppressWarnings("unchecked")
- @Override
- public <T> T getValue(ReadGraph graph, Resource resource) throws DatabaseException {
- return (T) new FunctionImpl3<ReadGraph, Resource, Object, Object>() {
- @Override
- public Object apply(ReadGraph graph, Resource converter, Object context) {
- SCLContext sclContext = SCLContext.getCurrent();
- Object oldGraph = sclContext.get("graph");
- try {
- if (context instanceof Variable) {
- Variable variable = (Variable)context;
- try {
- Function1<Object,Object> fn = getFunction(graph, variable.getParent(graph).getRepresents(graph), variable.getRepresents(graph), variable.getPredicateResource(graph));
- sclContext.put("graph", graph);
- return fn.apply(variable);
- } catch (DatabaseException e) {
- throw new RuntimeDatabaseException(e);
- }
- } if (context instanceof Resource) {
- Resource resource = (Resource)context;
- try {
- // Here converter is the object and context is the subject
- Function1<Object,Object> fn = getFunction(graph, resource, converter, null);
- return fn.apply(resource);
- } catch (DatabaseException e) {
- throw new RuntimeDatabaseException(e);
- }
- } else {
- throw new IllegalStateException("Unknown context " + context);
+ private final FunctionImpl3<ReadGraph, Resource, Object, Object> function = new FunctionImpl3<ReadGraph, Resource, Object, Object>() {
+ @Override
+ public Object apply(ReadGraph graph, Resource converter, Object context) {
+ SCLContext sclContext = SCLContext.getCurrent();
+ Object oldGraph = sclContext.get("graph");
+ try {
+ if (context instanceof Variable) {
+ Variable variable = (Variable)context;
+ try {
+ Function1<Object,Object> fn = getFunction(graph, variable.getParent(graph).getRepresents(graph), variable.getRepresents(graph), variable.getPredicateResource(graph));
+ sclContext.put("graph", graph);
+ return fn.apply(variable);
+ } catch (DatabaseException e) {
+ throw new RuntimeDatabaseException(e);
+ }
+ } if (context instanceof Resource) {
+ Resource resource = (Resource)context;
+ try {
+ // Here converter is the object and context is the subject
+ Function1<Object,Object> fn = getFunction(graph, resource, converter, null);
+ return fn.apply(resource);
+ } catch (DatabaseException e) {
+ throw new RuntimeDatabaseException(e);
}
- } finally {
- sclContext.put("graph", oldGraph);
+ } else {
+ throw new IllegalStateException("Unknown context " + context);
}
+ } finally {
+ sclContext.put("graph", oldGraph);
}
- };
+ }
+ };
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public <T> T getValue(ReadGraph graph, Resource resource) throws DatabaseException {
+ return (T) function;
}
}
import org.simantics.db.common.utils.CommonDBUtils;
import org.simantics.db.common.utils.Functions;
import org.simantics.db.common.utils.ListUtils;
-import org.simantics.db.common.utils.Logger;
import org.simantics.db.common.utils.NameUtils;
import org.simantics.db.common.utils.NearestOwnerFinder;
import org.simantics.db.common.validation.L0Validations;
import org.simantics.utils.Development;
import org.simantics.utils.datastructures.Pair;
import org.simantics.utils.strings.StringInputValidator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import gnu.trove.map.hash.THashMap;
import gnu.trove.set.hash.THashSet;
public class All {
- public static Object standardGetValue1(ReadGraph graph, Variable context) throws DatabaseException {
+ private static final Logger LOGGER = LoggerFactory.getLogger(All.class);
- StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)context;
+ public static Object standardGetValue1(ReadGraph graph, Variable context) throws DatabaseException {
+
+ StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)context;
// First from node
if(variable.node != null) {
if(Variables.PENDING_NODE_VALUE == value) throw new PendingVariableException("");
return value.getValue();
}
-
- try {
+
+ try {
if(variable.property.hasEnumerationRange) {
- Resource object = variable.getRepresents(graph);
- if(graph.sync(new IsEnumeratedValue(object))) {
- Layer0 L0 = Layer0.getInstance(graph);
- if(graph.isInstanceOf(object, L0.Literal)) {
- return graph.getValue(object);
- } else {
- String label = graph.getPossibleRelatedValue2(variable.getRepresents(graph), L0.HasLabel, Bindings.STRING);
- if(label == null) label = graph.getPossibleRelatedValue(variable.getRepresents(graph), L0.HasName, Bindings.STRING);
- if(label == null) label = "<no label>";
- return label;
- }
- }
+ Resource object = variable.getRepresents(graph);
+ if(graph.sync(new IsEnumeratedValue(object))) {
+ Layer0 L0 = Layer0.getInstance(graph);
+ if(graph.isInstanceOf(object, L0.Literal)) {
+ return graph.getValue(object);
+ } else {
+ String label = graph.getPossibleRelatedValue2(variable.getRepresents(graph), L0.HasLabel, Bindings.STRING);
+ if(label == null) label = graph.getPossibleRelatedValue(variable.getRepresents(graph), L0.HasName, Bindings.STRING);
+ if(label == null) label = "<no label>";
+ return label;
+ }
+ }
}
-
+
if (variable.isAsserted()) {
- if (variable.parentResource != null) {
- Map<String, Pair<PropertyInfo, Resource>> assertions = graph.syncRequest(
- new UnescapedAssertedPropertyMapOfResource(variable.parentResource),
- TransientCacheAsyncListener.instance());
-
- // NOTE: This optimization assumes the property
- // variable's representation is the asserted object.
- Resource object = variable.getPossibleRepresents(graph);
- if (object != null) {
- return graph.getValue2(object, variable);
- } else {
- for (Pair<PropertyInfo, Resource> assertion : assertions.values()) {
- if (assertion.first.predicate.equals(variable.property.predicate)) {
- return graph.getValue2(assertion.second, variable);
- }
- }
- }
- }
+ if (variable.parentResource != null) {
+ Map<String, Pair<PropertyInfo, Resource>> assertions = graph.syncRequest(
+ new UnescapedAssertedPropertyMapOfResource(variable.parentResource),
+ TransientCacheAsyncListener.instance());
+
+ // NOTE: This optimization assumes the property
+ // variable's representation is the asserted object.
+ Resource object = variable.getPossibleRepresents(graph);
+ if (object != null) {
+ return graph.getValue2(object, variable);
+ } else {
+ for (Pair<PropertyInfo, Resource> assertion : assertions.values()) {
+ if (assertion.first.predicate.equals(variable.getPossiblePredicateResource(graph))) {
+ return graph.getValue2(assertion.second, variable);
+ }
+ }
+ }
+ }
}
-
- return graph.getValue2(variable.getRepresents(graph), variable);
-
- } catch (NoSingleResultException e) {
- throw new MissingVariableValueException(variable.getPossibleURI(graph), e);
- } catch (DoesNotContainValueException e) {
- throw new MissingVariableValueException(variable.getPossibleURI(graph), e);
- } catch (DatabaseException e) {
- throw new MissingVariableValueException(variable.getPossibleURI(graph), e);
- }
-
- }
-
- public static Object standardGetValue2(ReadGraph graph, Variable context, Binding binding) throws DatabaseException {
- StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)context;
+
+ return graph.getValue2(variable.getRepresents(graph), variable);
+
+ } catch (PendingVariableException e) {
+ throw e;
+ } catch (NoSingleResultException e) {
+ throw new MissingVariableValueException(variable.getPossibleURI(graph), e);
+ } catch (DoesNotContainValueException e) {
+ throw new MissingVariableValueException(variable.getPossibleURI(graph), e);
+ } catch (DatabaseException e) {
+ throw new MissingVariableValueException(variable.getPossibleURI(graph), e);
+ }
+
+ }
+
+ public static Object standardGetValue2(ReadGraph graph, Variable context, Binding binding) throws DatabaseException {
+ StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)context;
// First from node
if(variable.node != null) {
throw new AdaptionException("Could not get value for " + context.getURI(graph), e);
}
}
-
- try {
-
- if(variable.property.hasEnumerationRange) {
- Resource object = variable.getRepresents(graph);
- if(graph.sync(new IsEnumeratedValue(object))) {
- Layer0 L0 = Layer0.getInstance(graph);
- if(graph.isInstanceOf(object, L0.Literal)) {
- return graph.getValue(object, binding);
- } else {
- return graph.getRelatedValue2(variable.getRepresents(graph), L0.HasLabel, binding);
- }
- }
+
+ try {
+
+ if(variable.property.hasEnumerationRange) {
+ Resource object = variable.getRepresents(graph);
+ if(graph.sync(new IsEnumeratedValue(object))) {
+ Layer0 L0 = Layer0.getInstance(graph);
+ if(graph.isInstanceOf(object, L0.Literal)) {
+ return graph.getValue(object, binding);
+ } else {
+ return graph.getRelatedValue2(variable.getRepresents(graph), L0.HasLabel, binding);
+ }
+ }
}
-
- if (variable.isAsserted()) {
- if (variable.parentResource != null) {
- Map<String, Pair<PropertyInfo, Resource>> assertions = graph.syncRequest(
- new UnescapedAssertedPropertyMapOfResource(variable.parentResource),
- TransientCacheAsyncListener.instance());
-
- // NOTE: This optimization assumes the property
- // variable's representation is the asserted object.
- Resource object = variable.getPossibleRepresents(graph);
- if (object != null) {
- return graph.getValue2(object, variable, binding);
- } else {
- for (Pair<PropertyInfo, Resource> assertion : assertions.values()) {
- if (assertion.first.predicate.equals(variable.property.predicate)) {
- return graph.getValue2(assertion.second, variable, binding);
- }
- }
- }
- }
- }
-
- return graph.getValue2(variable.getRepresents(graph), context, binding);
-
- } catch (NoSingleResultException e) {
- throw new MissingVariableValueException(variable.getPossibleURI(graph));
- } catch (DoesNotContainValueException e) {
- throw new MissingVariableValueException(variable.getPossibleURI(graph));
- } catch (DatabaseException e) {
- throw new MissingVariableValueException(variable.getPossibleURI(graph), e);
- }
-
- }
-
- public static void standardSetValue2(WriteGraph graph, Variable context, final Object value) throws DatabaseException {
-
- if(context instanceof StandardGraphPropertyVariable) {
-
- final StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)context;
-
- // First from node
+
+ if (variable.isAsserted()) {
+ if (variable.parentResource != null) {
+ Map<String, Pair<PropertyInfo, Resource>> assertions = graph.syncRequest(
+ new UnescapedAssertedPropertyMapOfResource(variable.parentResource),
+ TransientCacheAsyncListener.instance());
+
+ // NOTE: This optimization assumes the property
+ // variable's representation is the asserted object.
+ Resource object = variable.getPossibleRepresents(graph);
+ if (object != null) {
+ return graph.getValue2(object, variable, binding);
+ } else {
+ for (Pair<PropertyInfo, Resource> assertion : assertions.values()) {
+ if (assertion.first.predicate.equals(variable.getPossiblePredicateResource(graph))) {
+ return graph.getValue2(assertion.second, variable, binding);
+ }
+ }
+ }
+ }
+ }
+
+ return graph.getValue2(variable.getRepresents(graph), context, binding);
+
+ } catch (NoSingleResultException e) {
+ throw new MissingVariableValueException(variable.getPossibleURI(graph));
+ } catch (DoesNotContainValueException e) {
+ throw new MissingVariableValueException(variable.getPossibleURI(graph));
+ } catch (DatabaseException e) {
+ throw new MissingVariableValueException(variable.getPossibleURI(graph), e);
+ }
+
+ }
+
+ public static void standardSetValue2(WriteGraph graph, Variable context, final Object value) throws DatabaseException {
+
+ if(context instanceof StandardGraphPropertyVariable) {
+
+ final StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)context;
+
+ // First from node
if(variable.node != null) {
final Binding binding = Layer0Utils.getDefaultBinding(graph, variable);
} catch (NodeManagerException e) {
throw new RuntimeException(e);
} catch (BindingException e) {
- throw new RuntimeException(e);
- }
+ throw new RuntimeException(e);
+ }
}
});
} catch(RuntimeException e) {
return;
}
-
- }
-
- Function4<WriteGraph, Variable, Object, Object, String> modifier = context.getPossiblePropertyValue(graph, Variables.INPUT_MODIFIER);
- if(modifier == null) modifier = VariableUtils.defaultInputModifier;
- try {
- modifier.apply(graph, context, value, Bindings.getBinding(value.getClass()));
- } catch (BindingConstructionException e) {
- throw new org.simantics.db.exception.BindingException("",e);
- }
- }
+ }
+
+ Function4<WriteGraph, Variable, Object, Object, String> modifier = context.getPossiblePropertyValue(graph, Variables.INPUT_MODIFIER);
+ if(modifier == null) modifier = VariableUtils.defaultInputModifier;
+ try {
+ modifier.apply(graph, context, value, Bindings.getBinding(value.getClass()));
+ } catch (BindingConstructionException e) {
+ throw new org.simantics.db.exception.BindingException("",e);
+ }
+
+ }
- public static void standardSetValue3(final WriteGraph graph, Variable context, final Object value, final Binding binding) throws DatabaseException {
+ public static void standardSetValue3(final WriteGraph graph, Variable context, final Object value, final Binding binding) throws DatabaseException {
// First from node
if(context instanceof StandardGraphPropertyVariable) {
final StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)context;
-
+
// First from node
if(variable.node != null) {
-
+
try {
-
+
variable.node.support.manager.getRealm().syncExec(new Runnable() {
@Override
ExternalSetValue ext = new ExternalSetValue(variable.node.support.manager, variable.node.node, oldValue, value, binding);
graph.getService(UndoRedoSupport.class).addExternalOperation(graph, ext);
} catch (NodeManagerException | BindingException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("Error setting value", e);
}
}
-
+
});
-
+
return;
-
+
} catch (InterruptedException e) {
throw new DatabaseException(e);
}
-
+
}
-
+
}
-
- Function4<WriteGraph, Variable, Object, Object, String> modifier = context.getPossiblePropertyValue(graph, Variables.INPUT_MODIFIER);
- if(modifier == null) modifier = VariableUtils.defaultInputModifier;
- modifier.apply(graph, context, value, binding);
-
- }
-
- public static Datatype getDatatypeFromValue(ReadGraph graph, Variable context) throws DatabaseException {
- if (context instanceof AbstractVariable) {
- Binding defaultBinding = ((AbstractVariable)context).getPossibleDefaultBinding(graph);
- if (defaultBinding != null)
- return defaultBinding.type();
- }
-
- Variant value = context.getVariantValue(graph);
- if (value.getBinding() == null)
- throw new DatabaseException("No value binding for " + context.getURI(graph));
-
- return value.getBinding().type();
- }
+
+ Function4<WriteGraph, Variable, Object, Object, String> modifier = context.getPossiblePropertyValue(graph, Variables.INPUT_MODIFIER);
+ if(modifier == null) modifier = VariableUtils.defaultInputModifier;
+ modifier.apply(graph, context, value, binding);
+
+ }
+
+ public static Datatype getDatatypeFromValue(ReadGraph graph, Variable context) throws DatabaseException {
+ if (context instanceof AbstractVariable) {
+ Binding defaultBinding = ((AbstractVariable)context).getPossibleDefaultBinding(graph);
+ if (defaultBinding != null)
+ return defaultBinding.type();
+ }
+
+ Variant value = context.getVariantValue(graph);
+ if (value.getBinding() == null)
+ throw new DatabaseException("No value binding for " + context.getURI(graph));
+
+ return value.getBinding().type();
+ }
@SuppressWarnings("rawtypes")
private static class DatatypeGetter implements VariableNodeReadRunnable {
}
public static Datatype standardGetDatatype(ReadGraph graph, Variable context) throws DatabaseException {
- if (context instanceof AbstractVariable) {
- final AbstractVariable variable = (AbstractVariable)context;
- if (variable.node != null) {
- try {
- DatatypeGetter request = new DatatypeGetter(variable.node);
-
- variable.node.support.manager.getRealm().syncExec(request);
-
- if (request.exception != null)
- throw new DatabaseException(request.exception);
-
- return request.type;
- } catch (InterruptedException e) {
- }
- }
- }
-
- return getDatatypeFromValue(graph, context);
- }
+ if (context instanceof AbstractVariable) {
+ final AbstractVariable variable = (AbstractVariable)context;
+ if (variable.node != null) {
+ try {
+ DatatypeGetter request = new DatatypeGetter(variable.node);
+
+ variable.node.support.manager.getRealm().syncExec(request);
+
+ if (request.exception != null)
+ throw new DatabaseException(request.exception);
+
+ return request.type;
+ } catch (InterruptedException e) {
+ }
+ }
+ }
+
+ return getDatatypeFromValue(graph, context);
+ }
// @SCLValue(type = "ValueAccessor")
// public static ValueAccessor standardValueAccessor = new ValueAccessor() {
// }
//
// };
-
- @SCLValue(type = "ValueAccessor")
- public static ValueAccessor standardValueAccessor = new ValueAccessor() {
-
- @Override
- public Object getValue(ReadGraph graph, Variable context) throws DatabaseException {
- ValueAccessor accessor = getPossibleValueValueAccessor(graph, context);
- if(accessor != null) return accessor.getValue(graph, context);
- else
- return standardGetValue1(graph, context);
- }
-
- @Override
- public Object getValue(ReadGraph graph, Variable context, Binding binding) throws DatabaseException {
- ValueAccessor accessor = getPossibleValueValueAccessor(graph, context);
- if(accessor != null) return accessor.getValue(graph, context, binding);
- else
- return standardGetValue2(graph, context, binding);
- }
-
- @Override
- public void setValue(WriteGraph graph, Variable context, Object value) throws DatabaseException {
- ValueAccessor accessor = getPossibleValueValueAccessor(graph, context);
- if(accessor != null) accessor.setValue(graph, context, value);
- else
- standardSetValue2(graph, context, value);
- }
-
- @Override
- public void setValue(WriteGraph graph, Variable context, Object value, Binding binding) throws DatabaseException {
- ValueAccessor accessor = getPossibleValueValueAccessor(graph, context);
- if(accessor != null) accessor.setValue(graph, context, value, binding);
- else
- standardSetValue3(graph, context, value, binding);
- }
-
- @Override
- public Datatype getDatatype(ReadGraph graph, Variable context)
- throws DatabaseException {
- ValueAccessor accessor = getPossibleValueValueAccessor(graph, context);
- if(accessor != null) return accessor.getDatatype(graph, context);
- else
- return standardGetDatatype(graph, context);
- }
-
- };
-
- public static Variable getStandardChildDomainPropertyVariable(ReadGraph graph, Variable context, String name) throws DatabaseException {
+
+ @SCLValue(type = "ValueAccessor")
+ public static ValueAccessor standardValueAccessor = new ValueAccessor() {
+
+ @Override
+ public Object getValue(ReadGraph graph, Variable context) throws DatabaseException {
+ ValueAccessor accessor = getPossibleValueValueAccessor(graph, context);
+ if(accessor != null) return accessor.getValue(graph, context);
+ else
+ return standardGetValue1(graph, context);
+ }
+
+ @Override
+ public Object getValue(ReadGraph graph, Variable context, Binding binding) throws DatabaseException {
+ ValueAccessor accessor = getPossibleValueValueAccessor(graph, context);
+ if(accessor != null) return accessor.getValue(graph, context, binding);
+ else
+ return standardGetValue2(graph, context, binding);
+ }
+
+ @Override
+ public void setValue(WriteGraph graph, Variable context, Object value) throws DatabaseException {
+ ValueAccessor accessor = getPossibleValueValueAccessor(graph, context);
+ if(accessor != null) accessor.setValue(graph, context, value);
+ else
+ standardSetValue2(graph, context, value);
+ }
+
+ @Override
+ public void setValue(WriteGraph graph, Variable context, Object value, Binding binding) throws DatabaseException {
+ ValueAccessor accessor = getPossibleValueValueAccessor(graph, context);
+ if(accessor != null) accessor.setValue(graph, context, value, binding);
+ else
+ standardSetValue3(graph, context, value, binding);
+ }
+
+ @Override
+ public Datatype getDatatype(ReadGraph graph, Variable context)
+ throws DatabaseException {
+ ValueAccessor accessor = getPossibleValueValueAccessor(graph, context);
+ if(accessor != null) return accessor.getDatatype(graph, context);
+ else
+ return standardGetDatatype(graph, context);
+ }
+
+ };
+
+ public static Variable getStandardChildDomainPropertyVariable(ReadGraph graph, Variable context, String name) throws DatabaseException {
StandardGraphChildVariable variable = (StandardGraphChildVariable)context;
PropertyInfo graphProperty = getPossiblePropertyInfoFromContext(graph, variable, variable.resource, name);
return getStandardChildDomainPropertyVariable(graph, context, graphProperty, name);
return null;
}
- public static Variable getStandardChildDomainPropertyVariable(ReadGraph graph, Variable context, PropertyInfo graphProperty, String name) throws DatabaseException {
+ public static Variable getStandardChildDomainPropertyVariable(ReadGraph graph, Variable context, PropertyInfo graphProperty, String name) throws DatabaseException {
StandardGraphChildVariable variable = (StandardGraphChildVariable)context;
Object propertyNode = getPossibleNodeProperty(graph, variable, name, true);
if(graphProperty != null && graphProperty.builder != null)
}
public static Map<String, Variable> getStandardChildDomainPropertyVariables(ReadGraph graph, Variable context, Map<String, Variable> map) throws DatabaseException {
- // Get properties with null identification
+ // Get properties with null identification
return getStandardChildDomainPropertyVariables(graph, context, null, map);
}
public static Map<String, Variable> getStandardChildDomainPropertyVariables(ReadGraph graph, Variable context, String classification, Map<String, Variable> map) throws DatabaseException {
-
+
StandardGraphChildVariable variable = (StandardGraphChildVariable)context;
-
+
Collection<Object> nodeProperties = getPossibleNodeProperties(graph, variable);
if(!nodeProperties.isEmpty()) {
// Get variables for properties read from the graph
Map<String,PropertyInfo> graphProperties = collectPropertyInfosFromContext(graph, variable, variable.resource);
-
+
Set<String> used = new THashSet<String>(nodeProperties.size());
-
+
map = ensureVariableMap(map, graphProperties.size() + nodeProperties.size());
-
+
// Process NodeManager property nodes
for(Object nodeProperty : nodeProperties) {
- String name = getNodeName(variable, nodeProperty);
+ String name = getNodeName(variable, nodeProperty);
used.add(name);
-
+
PropertyInfo graphProperty = graphProperties.get(name);
if(graphProperty != null && graphProperty.builder != null) {
if (classification != null && !graphProperty.hasClassification(classification)) continue;
-
+
// Combine with identically named graph property
map.put(name, buildPropertyVariable(graph, variable, variable.resource, graphProperty, nodeProperty));
continue;
}
-
+
map.put(name, createStandardGraphPropertyVariable(graph, variable, nodeProperty));
}
-
+
// Process graph properties
for(PropertyInfo info : graphProperties.values()) {
String name = info.name;
}
}
return map;
-
+
} else {
- if(variable.resource == null) return map;
+ if(variable.resource == null) return map;
+
+ // Only graph properties
+ Collection<Resource> predicates = graph.getPredicates(variable.resource);
+ if(predicates.isEmpty()) return map;
+
+ map = ensureVariableMap(map, predicates.size());
- // Only graph properties
- Collection<Resource> predicates = graph.getPredicates(variable.resource);
- if(predicates.isEmpty()) return map;
-
- map = ensureVariableMap(map, predicates.size());
-
// Process graph properties
for(Resource predicate : predicates) {
-
- PropertyInfo info = //graph.isImmutable(predicate) ?
- graph.syncRequest(new PropertyInfoRequest(predicate), TransientCacheAsyncListener.<PropertyInfo>instance());// :
- //graph.syncRequest(new PropertyInfoRequest(predicate));
- if(!info.isHasProperty) continue;
-
+ PropertyInfo info = //graph.isImmutable(predicate) ?
+ graph.syncRequest(new PropertyInfoRequest(predicate), TransientCacheAsyncListener.<PropertyInfo>instance());// :
+ //graph.syncRequest(new PropertyInfoRequest(predicate));
+
+ if(!info.isHasProperty) continue;
+
if (classification != null && !info.hasClassification(classification)) continue;
if (info.builder != null) {
map.put(info.name, buildPropertyVariable(graph, variable, variable.resource, info, null));
}
-
+
}
-
+
return map;
-
+
}
-
- }
-
+
+ }
+
@SCLValue(type = "VariableMap")
- public static VariableMap standardChildDomainProperties = new VariableMapImpl() {
-
- @Override
- public Variable getVariable(ReadGraph graph, Variable context, String name) throws DatabaseException {
- return getStandardChildDomainPropertyVariable(graph, context, name);
- }
-
- @Override
- public Map<String, Variable> getVariables(ReadGraph graph, Variable context, Map<String, Variable> map) throws DatabaseException {
- return getStandardChildDomainPropertyVariables(graph, context, map);
- }
-
- };
-
+ public static VariableMap standardChildDomainProperties = new VariableMapImpl() {
+
+ @Override
+ public Variable getVariable(ReadGraph graph, Variable context, String name) throws DatabaseException {
+ return getStandardChildDomainPropertyVariable(graph, context, name);
+ }
+
+ @Override
+ public Map<String, Variable> getVariables(ReadGraph graph, Variable context, Map<String, Variable> map) throws DatabaseException {
+ return getStandardChildDomainPropertyVariables(graph, context, map);
+ }
+
+ };
+
@SCLValue(type = "VariableMap")
- public static VariableMap methodsPropertyDomainProperties = new VariableMapImpl() {
-
- @Override
- public Variable getVariable(ReadGraph graph, Variable context, String name) throws DatabaseException {
- Variable parent = context.getParent(graph);
- Resource container = parent.getPossibleRepresents(graph);
- if(container == null)
- return null;
- Map<String,Resource> methods = graph.syncRequest(new UnescapedMethodMapOfResource(container));
- Resource predicate = methods.get(name);
- if(predicate != null) {
- Layer0 L0 = Layer0.getInstance(graph);
- PropertyInfo info = graph.syncRequest(new PropertyInfoRequest(L0.Entity_method));
- Resource value = graph.getSingleObject(container, predicate);
- return new StandardGraphPropertyVariable(context, null, container, info, value);
- }
- return null;
- }
-
- @Override
- public Map<String, Variable> getVariables(ReadGraph graph, Variable context, Map<String, Variable> map) throws DatabaseException {
- Variable parent = context.getParent(graph);
- Resource container = parent.getPossibleRepresents(graph);
- if(container == null)
- return Collections.emptyMap();
- Map<String,Resource> methods = graph.syncRequest(new UnescapedMethodMapOfResource(container));
- for(Map.Entry<String, Resource> entry : methods.entrySet()) {
- String name = entry.getKey();
- Resource predicate = entry.getValue();
- Layer0 L0 = Layer0.getInstance(graph);
- PropertyInfo info = graph.syncRequest(new PropertyInfoRequest(L0.Entity_method));
- Resource value = graph.getSingleObject(container, predicate);
- if(map == null) map = new HashMap<>();
- map.put(name, new StandardGraphPropertyVariable(context, null, container, info, value));
- }
- return map;
- }
-
- };
-
- public static Variable getStandardPropertyDomainPropertyVariableFromValue(ReadGraph graph, Variable context, String name) throws DatabaseException {
-
- if(context instanceof StandardGraphPropertyVariable) {
- StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)context;
- Resource literal = variable.getPossibleRepresents(graph);
- Object propertyNode = getPossibleNodeProperty(graph, variable, name, false);
-
- if(literal != null) {
- Variable result = getPossiblePropertyFromContext(graph, variable, literal, name, propertyNode);
- if(result != null) return result;
- }
-
- Variable result = getPossibleSubliteralPropertyFromContext(graph, variable, name);
- if(result != null) return result;
- result = getPossiblePropertyFromContext(graph, variable, variable.property.predicate, name, propertyNode);
- if (result != null) return result;
-
- // Get possible property from NodeManager
- if (propertyNode != null)
- return createStandardGraphPropertyVariable(graph, variable, propertyNode);
- return null;
- } else if (context instanceof StandardGraphChildVariable) {
- return standardChildDomainProperties.getVariable(graph, context, name);
- } else {
- throw new DatabaseException("Unknown variable implementation " + context.getClass().getCanonicalName());
- }
-
- }
-
- public static Map<String, Variable> getStandardPropertyDomainPropertyVariablesFromValue(ReadGraph graph, Variable context, Map<String, Variable> map) throws DatabaseException {
-
- if(context instanceof StandardGraphPropertyVariable) {
- StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)context;
- map = collectPropertiesFromContext(graph, variable, variable.property.predicate, map);
- if (variable.parentResource != null) {
- Resource literal = graph.getPossibleObject(variable.parentResource, variable.property.predicate);
- if(literal != null) map=collectPropertiesFromContext(graph, variable, literal, map);
- map=collectSubliteralProperties(graph, variable, map);
- }
-
- // Get properties from VariableNode
- map = getStandardNodePropertyVariables(graph, context, map);
- return map;
- } else if (context instanceof StandardGraphChildVariable) {
- return standardChildDomainProperties.getVariables(graph, context, map);
- } else {
- throw new DatabaseException("Unknown variable implementation " + context.getClass().getCanonicalName());
- }
-
- }
-
- public static Map<String, Variable> getStandardPropertyDomainPropertyVariablesFromValue(ReadGraph graph, Variable context, String classification, Map<String, Variable> map) throws DatabaseException {
-
- if(context instanceof StandardGraphPropertyVariable) {
- StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)context;
- map = collectPropertiesFromContext(graph, variable, variable.property.predicate, classification, map);
- if (variable.parentResource != null) {
- Resource literal = graph.getPossibleObject(variable.parentResource, variable.property.predicate);
- if(literal != null) map=collectPropertiesFromContext(graph, variable, literal, classification, map);
- }
-
- // Get properties from VariableNode
- map = getStandardNodePropertyVariables(graph, context, map);
- return map;
- } else if (context instanceof StandardGraphChildVariable) {
- return standardChildDomainProperties.getVariables(graph, context, map);
- } else {
- throw new DatabaseException("Unknown variable implementation " + context.getClass().getCanonicalName());
- }
-
- }
-
+ public static VariableMap methodsPropertyDomainProperties = new VariableMapImpl() {
+
+ @Override
+ public Variable getVariable(ReadGraph graph, Variable context, String name) throws DatabaseException {
+ Variable parent = context.getParent(graph);
+ Resource container = parent.getPossibleRepresents(graph);
+ if(container == null)
+ return null;
+ Map<String,Resource> methods = graph.syncRequest(new UnescapedMethodMapOfResource(container));
+ Resource predicate = methods.get(name);
+ if(predicate != null) {
+ Layer0 L0 = Layer0.getInstance(graph);
+ PropertyInfo info = graph.syncRequest(new PropertyInfoRequest(L0.Entity_method));
+ Resource value = graph.getSingleObject(container, predicate);
+ return new StandardGraphPropertyVariable(context, null, container, info, value);
+ }
+ return null;
+ }
+
+ @Override
+ public Map<String, Variable> getVariables(ReadGraph graph, Variable context, Map<String, Variable> map) throws DatabaseException {
+ Variable parent = context.getParent(graph);
+ Resource container = parent.getPossibleRepresents(graph);
+ if(container == null)
+ return Collections.emptyMap();
+ Map<String,Resource> methods = graph.syncRequest(new UnescapedMethodMapOfResource(container));
+ for(Map.Entry<String, Resource> entry : methods.entrySet()) {
+ String name = entry.getKey();
+ Resource predicate = entry.getValue();
+ Layer0 L0 = Layer0.getInstance(graph);
+ PropertyInfo info = graph.syncRequest(new PropertyInfoRequest(L0.Entity_method));
+ Resource value = graph.getSingleObject(container, predicate);
+ if(map == null) map = new HashMap<>();
+ map.put(name, new StandardGraphPropertyVariable(context, null, container, info, value));
+ }
+ return map;
+ }
+
+ };
+
+ public static Variable getStandardPropertyDomainPropertyVariableFromValue(ReadGraph graph, Variable context, String name) throws DatabaseException {
+
+ if(context instanceof StandardGraphPropertyVariable) {
+ StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)context;
+ Resource literal = variable.getPossibleRepresents(graph);
+ Object propertyNode = getPossibleNodeProperty(graph, variable, name, false);
+
+ if(literal != null) {
+ Variable result = getPossiblePropertyFromContext(graph, variable, literal, name, propertyNode);
+ if(result != null) return result;
+ }
+
+ Variable result = getPossibleSubliteralPropertyFromContext(graph, variable, name);
+ if(result != null) return result;
+ result = getPossiblePropertyFromContext(graph, variable, variable.property.predicate, name, propertyNode);
+ if (result != null) return result;
+
+ // Get possible property from NodeManager
+ if (propertyNode != null)
+ return createStandardGraphPropertyVariable(graph, variable, propertyNode);
+ return null;
+ } else if (context instanceof StandardGraphChildVariable) {
+ return standardChildDomainProperties.getVariable(graph, context, name);
+ } else {
+ throw new DatabaseException("Unknown variable implementation " + context.getClass().getCanonicalName());
+ }
+
+ }
+
+ public static Map<String, Variable> getStandardPropertyDomainPropertyVariablesFromValue(ReadGraph graph, Variable context, Map<String, Variable> map) throws DatabaseException {
+
+ if(context instanceof StandardGraphPropertyVariable) {
+ StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)context;
+ map = collectPropertiesFromContext(graph, variable, variable.property.predicate, map);
+ if (variable.parentResource != null) {
+ Resource literal = graph.getPossibleObject(variable.parentResource, variable.property.predicate);
+ if(literal != null) map=collectPropertiesFromContext(graph, variable, literal, map);
+ map=collectSubliteralProperties(graph, variable, map);
+ }
+
+ // Get properties from VariableNode
+ map = getStandardNodePropertyVariables(graph, context, map);
+ return map;
+ } else if (context instanceof StandardGraphChildVariable) {
+ return standardChildDomainProperties.getVariables(graph, context, map);
+ } else {
+ throw new DatabaseException("Unknown variable implementation " + context.getClass().getCanonicalName());
+ }
+
+ }
+
+ public static Map<String, Variable> getStandardPropertyDomainPropertyVariablesFromValue(ReadGraph graph, Variable context, String classification, Map<String, Variable> map) throws DatabaseException {
+
+ if(context instanceof StandardGraphPropertyVariable) {
+ StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)context;
+ map = collectPropertiesFromContext(graph, variable, variable.property.predicate, classification, map);
+ if (variable.parentResource != null) {
+ Resource literal = graph.getPossibleObject(variable.parentResource, variable.property.predicate);
+ if(literal != null) map=collectPropertiesFromContext(graph, variable, literal, classification, map);
+ }
+
+ // Get properties from VariableNode
+ map = getStandardNodePropertyVariables(graph, context, map);
+ return map;
+ } else if (context instanceof StandardGraphChildVariable) {
+ return standardChildDomainProperties.getVariables(graph, context, map);
+ } else {
+ throw new DatabaseException("Unknown variable implementation " + context.getClass().getCanonicalName());
+ }
+
+ }
+
@SCLValue(type = "VariableMap")
- public static VariableMap standardPropertyDomainProperties = new VariableMapImpl() {
-
- VariableMap getValueVariableMap(ReadGraph graph, Variable context) throws DatabaseException {
- Resource represents = context.getPossibleRepresents(graph);
- if(represents == null) return null;
-
- VariableMap map = graph.isImmutable(represents) ?
- graph.syncRequest(new PropertyVariableMapRequest(represents), TransientCacheListener.<VariableMap>instance()) :
- (VariableMap)graph.getPossibleRelatedValue2(represents, Layer0.getInstance(graph).domainProperties, represents);
-
- if(map == standardPropertyDomainProperties) return null;
- else return map;
-
- }
-
- @Override
- public Variable getVariable(ReadGraph graph, Variable context, String name) throws DatabaseException {
- VariableMap valueMap = getValueVariableMap(graph, context);
- if(valueMap != null) return valueMap.getVariable(graph, context, name);
- return getStandardPropertyDomainPropertyVariableFromValue(graph, context, name);
- }
-
- @Override
- public Map<String, Variable> getVariables(ReadGraph graph, Variable context, Map<String, Variable> map) throws DatabaseException {
- VariableMap valueMap = getValueVariableMap(graph, context);
- if(valueMap != null) return valueMap.getVariables(graph, context, map);
- else return getStandardPropertyDomainPropertyVariablesFromValue(graph, context, map);
- }
-
- @Override
- public Map<String, Variable> getVariables(ReadGraph graph, Variable context, String classification, Map<String, Variable> map) throws DatabaseException {
- VariableMap valueMap = getValueVariableMap(graph, context);
- if(valueMap != null) return valueMap.getVariables(graph, context, classification, map);
- else return getStandardPropertyDomainPropertyVariablesFromValue(graph, context, classification, map);
- }
-
- };
+ public static VariableMap standardPropertyDomainProperties = new VariableMapImpl() {
+
+ VariableMap getValueVariableMap(ReadGraph graph, Variable context) throws DatabaseException {
+ Resource represents = context.getPossibleRepresents(graph);
+ if(represents == null) return null;
+
+ VariableMap map = graph.isImmutable(represents) ?
+ graph.syncRequest(new PropertyVariableMapRequest(represents), TransientCacheListener.<VariableMap>instance()) :
+ (VariableMap)graph.getPossibleRelatedValue2(represents, Layer0.getInstance(graph).domainProperties, represents);
+
+ if(map == standardPropertyDomainProperties) return null;
+ else return map;
+
+ }
+
+ @Override
+ public Variable getVariable(ReadGraph graph, Variable context, String name) throws DatabaseException {
+ VariableMap valueMap = getValueVariableMap(graph, context);
+ if(valueMap != null) return valueMap.getVariable(graph, context, name);
+ return getStandardPropertyDomainPropertyVariableFromValue(graph, context, name);
+ }
+
+ @Override
+ public Map<String, Variable> getVariables(ReadGraph graph, Variable context, Map<String, Variable> map) throws DatabaseException {
+ VariableMap valueMap = getValueVariableMap(graph, context);
+ if(valueMap != null) return valueMap.getVariables(graph, context, map);
+ else return getStandardPropertyDomainPropertyVariablesFromValue(graph, context, map);
+ }
+
+ @Override
+ public Map<String, Variable> getVariables(ReadGraph graph, Variable context, String classification, Map<String, Variable> map) throws DatabaseException {
+ VariableMap valueMap = getValueVariableMap(graph, context);
+ if(valueMap != null) return valueMap.getVariables(graph, context, classification, map);
+ else return getStandardPropertyDomainPropertyVariablesFromValue(graph, context, classification, map);
+ }
+
+ };
public static Resource getPossibleGraphChild(ReadGraph graph, Variable variable, String name) throws DatabaseException {
- Resource resource = variable.getPossibleRepresents(graph);
+ Resource resource = variable.getPossibleRepresents(graph);
if(resource == null) return null;
Map<String, Resource> graphChildren = graph.syncRequest(new UnescapedChildMapOfResource(resource));
return graphChildren.get(name);
}
public static Map<String,Resource> getPossibleGraphChildren(ReadGraph graph, Variable variable) throws DatabaseException {
- Resource resource = variable.getPossibleRepresents(graph);
+ Resource resource = variable.getPossibleRepresents(graph);
if(resource == null) return Collections.emptyMap();
return graph.syncRequest(new UnescapedChildMapOfResource(resource));
}
public static Object getPossibleNodeChild(ReadGraph graph, Variable variable, String name) throws DatabaseException {
- if (!(variable instanceof AbstractVariable)) return null;
- VariableNode<?> node = ((AbstractVariable)variable).node;
+ if (!(variable instanceof AbstractVariable)) return null;
+ VariableNode<?> node = ((AbstractVariable)variable).node;
if(node == null) return null;
NodeStructure structure = Variables.requestNodeStructure(graph, node);
if(Variables.PENDING_NODE_STRUCTURE == structure) throw new PendingVariableException("");
return structure.children.get(name);
- }
-
+ }
+
public static Collection<Object> getPossibleNodeChildren(ReadGraph graph, Variable variable) throws DatabaseException {
- if (!(variable instanceof AbstractVariable)) return null;
- VariableNode<?> node = ((AbstractVariable)variable).node;
+ if (!(variable instanceof AbstractVariable)) return null;
+ VariableNode<?> node = ((AbstractVariable)variable).node;
if(node == null) return Collections.emptyList();
NodeStructure structure = Variables.requestNodeStructure(graph, node);
if(Variables.PENDING_NODE_STRUCTURE == structure) throw new PendingVariableException("");
return structure.children.values();
}
-
+
public static Object getPossibleNodeProperty(ReadGraph graph, Variable variable, String name, boolean throwPending) throws DatabaseException {
- if (!(variable instanceof AbstractVariable)) return null;
- VariableNode<?> node = ((AbstractVariable)variable).node;
+ if (!(variable instanceof AbstractVariable)) return null;
+ VariableNode<?> node = ((AbstractVariable)variable).node;
if(node == null) return null;
NodeStructure structure = Variables.requestNodeStructure(graph, node);
if(throwPending && Variables.PENDING_NODE_STRUCTURE == structure) throw new PendingVariableException("");
return structure.properties.get(name);
}
-
+
public static Collection<Object> getPossibleNodeProperties(ReadGraph graph, Variable variable) throws DatabaseException {
- if (!(variable instanceof AbstractVariable)) return null;
- VariableNode<?> node = ((AbstractVariable)variable).node;
+ if (!(variable instanceof AbstractVariable)) return null;
+ VariableNode<?> node = ((AbstractVariable)variable).node;
if(node == null) return Collections.emptyList();
NodeStructure structure = Variables.requestNodeStructure(graph, node);
if(Variables.PENDING_NODE_STRUCTURE == structure) throw new PendingVariableException("");
@Deprecated
public static Variable getStandardChildDomainChildVariable(ReadGraph graph, Variable context, String name) throws DatabaseException {
- return StandardChildDomainChildren.getStandardChildDomainChildVariable(graph, context, name);
+ return StandardChildDomainChildren.getStandardChildDomainChildVariable(graph, context, name);
}
@Deprecated
public static Variable getStandardChildDomainChildVariable(ReadGraph graph, Variable context, Resource graphChild, String name) throws DatabaseException {
- return StandardChildDomainChildren.getStandardChildDomainChildVariable(graph, context, graphChild, name);
+ return StandardChildDomainChildren.getStandardChildDomainChildVariable(graph, context, graphChild, name);
}
-
+
@Deprecated
public static Map<String, Variable> getStandardChildDomainChildVariables(ReadGraph graph, Variable context, Map<String, Variable> map) throws DatabaseException {
- return StandardChildDomainChildren.getStandardChildDomainChildVariables(graph, context, map);
+ return StandardChildDomainChildren.getStandardChildDomainChildVariables(graph, context, map);
}
@Deprecated
public static Map<String, Variable> getStandardChildDomainChildVariables(ReadGraph graph, Variable context, Map<String,Resource> graphChildren, Map<String, Variable> map) throws DatabaseException {
- return StandardChildDomainChildren.getStandardChildDomainChildVariables(graph, context, graphChildren, map);
+ return StandardChildDomainChildren.getStandardChildDomainChildVariables(graph, context, graphChildren, map);
}
-
+
/**
* Get a map of child Variables from a node manager-based Variable, combined with the existing variables in #map.
* @param graph The read graph.
* @throws DatabaseException
*/
public static Map<String, Variable> getStandardNodeChildVariables(ReadGraph graph, Variable context, Map<String, Variable> map) throws DatabaseException {
- AbstractVariable variable = (AbstractVariable)context;
- if (variable.node == null) return map;
-
+ AbstractVariable variable = (AbstractVariable)context;
+ if (variable.node == null) return map;
+
Collection<Object> nodeChildren = getPossibleNodeChildren(graph, variable);
if (nodeChildren.isEmpty()) return map;
-
+
map = ensureVariableMap(map, nodeChildren.size());
for(Object nodeChild : nodeChildren) {
String name = getNodeName(variable, nodeChild);
if (!map.containsKey(name))
- map.put(name, createStandardGraphChildVariable(variable, nodeChild));
+ map.put(name, createStandardGraphChildVariable(variable, nodeChild));
}
return map;
* @throws DatabaseException
*/
public static Map<String, Variable> getStandardNodePropertyVariables(ReadGraph graph, Variable context, Map<String, Variable> map) throws DatabaseException {
- AbstractVariable variable = (AbstractVariable)context;
- if (variable.node == null) return map;
-
+ AbstractVariable variable = (AbstractVariable)context;
+ if (variable.node == null) return map;
+
Collection<Object> nodeProperties = getPossibleNodeProperties(graph, variable);
if (nodeProperties.isEmpty()) return map;
-
+
map = ensureVariableMap(map, nodeProperties.size());
for(Object nodeProperty : nodeProperties) {
String name = getNodeName(variable, nodeProperty);
if (!map.containsKey(name)) {
- map.put(name, createStandardGraphPropertyVariable(graph, variable, nodeProperty));
+ map.put(name, createStandardGraphPropertyVariable(graph, variable, nodeProperty));
}
}
return map;
}
- @SCLValue(type = "VariableMap")
- public static VariableMap standardChildDomainChildren = new VariableMapImpl() {
+ @SCLValue(type = "VariableMap")
+ public static VariableMap standardChildDomainChildren = new VariableMapImpl() {
- @Override
- public Variable getVariable(ReadGraph graph, Variable context, String name) throws DatabaseException {
- return StandardChildDomainChildren.getStandardChildDomainChildVariable(graph, context, name);
- }
+ @Override
+ public Variable getVariable(ReadGraph graph, Variable context, String name) throws DatabaseException {
+ return StandardChildDomainChildren.getStandardChildDomainChildVariable(graph, context, name);
+ }
+
+ @Override
+ public Map<String, Variable> getVariables(ReadGraph graph, Variable context, Map<String, Variable> map) throws DatabaseException {
+ return StandardChildDomainChildren.getStandardChildDomainChildVariables(graph, context, map);
+ }
- @Override
- public Map<String, Variable> getVariables(ReadGraph graph, Variable context, Map<String, Variable> map) throws DatabaseException {
- return StandardChildDomainChildren.getStandardChildDomainChildVariables(graph, context, map);
- }
-
- };
+ };
@SCLValue(type = "VariableMap")
- public static VariableMap standardPropertyDomainChildren = new VariableMapImpl() {
-
- /**
- * Get a possible non-standard VariableMap defined in the graph.
- * @param graph The graph
- * @param context The context node
- * @return A non-standard VariableMap instance for the context node,
- * or null, if not defined or defined as this instance.
- * @throws DatabaseException
- */
- VariableMap getValueVariableMap(ReadGraph graph, Variable context) throws DatabaseException {
- Resource represents = context.getPossibleRepresents(graph);
- if(represents == null) return null;
- VariableMap map = graph.syncRequest(new ChildVariableMapRequest(represents));
- if(map == standardPropertyDomainChildren) return null;
- else return map;
- }
-
- @Override
- public Variable getVariable(ReadGraph graph, Variable context, String name) throws DatabaseException {
- // Delegate call to a non-standard variable map?
- VariableMap valueMap = getValueVariableMap(graph, context);
- if(valueMap != null) return valueMap.getVariable(graph, context, name);
-
- if(context instanceof StandardGraphPropertyVariable) {
- StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)context;
- Datatype dt = variable.getDatatype(graph);
- if (dt instanceof ArrayType) {
- ChildReference ref = getPossibleIndexReference(name);
- if (ref != null)
- return new SubliteralPropertyVariableDeprecated(variable, ref);
- }
-
- // Check for a child node provided by the NodeManager
- if (variable.node != null) {
- Object childNode = getPossibleNodeChild(graph, variable, name);
- if (childNode != null)
- return createStandardGraphChildVariable(variable, childNode);
- }
- return standardChildDomainChildren.getVariable(graph, context, name);
- } else if (context instanceof StandardGraphChildVariable) {
- return standardChildDomainChildren.getVariable(graph, context, name);
- } else {
- throw new DatabaseException("Unknown variable implementation " + context.getClass().getCanonicalName());
- }
- }
-
- @Override
- public Map<String, Variable> getVariables(ReadGraph graph, Variable context, Map<String, Variable> map) throws DatabaseException {
- // Delegate call to a non-standard variable map?
- VariableMap valueMap = getValueVariableMap(graph, context);
- if(valueMap != null) return valueMap.getVariables(graph, context, map);
-
- if(context instanceof StandardGraphPropertyVariable) {
- // Get child variables provided by the NodeManager
- Map<String, Variable> result = getStandardNodeChildVariables(graph, context, map);
- return standardChildDomainChildren.getVariables(graph, context, result);
- } else if (context instanceof StandardGraphChildVariable) {
- return standardChildDomainChildren.getVariables(graph, context, map);
- } else {
- throw new DatabaseException("Unknown variable implementation " + context.getClass().getCanonicalName());
- }
- }
-
- };
-
- protected static ChildReference getPossibleIndexReference(String name) {
- if (name.startsWith("i-")) {
- try {
- int index = Integer.parseInt(name.substring(2));
- return new IndexReference(index);
- } catch (NumberFormatException e) {}
- }
- return null;
- }
-
- protected static ValueAccessor getPossiblePropertyValueAccessor(ReadGraph graph, StandardGraphPropertyVariable variable) throws DatabaseException {
- if(variable.property == null) return null;
- return variable.property.valueAccessor;
+ public static VariableMap standardPropertyDomainChildren = new VariableMapImpl() {
+
+ /**
+ * Get a possible non-standard VariableMap defined in the graph.
+ * @param graph The graph
+ * @param context The context node
+ * @return A non-standard VariableMap instance for the context node,
+ * or null, if not defined or defined as this instance.
+ * @throws DatabaseException
+ */
+ VariableMap getValueVariableMap(ReadGraph graph, Variable context) throws DatabaseException {
+ Resource represents = context.getPossibleRepresents(graph);
+ if(represents == null) return null;
+ VariableMap map = graph.syncRequest(new ChildVariableMapRequest(represents));
+ if(map == standardPropertyDomainChildren) return null;
+ else return map;
+ }
+
+ @Override
+ public Variable getVariable(ReadGraph graph, Variable context, String name) throws DatabaseException {
+ // Delegate call to a non-standard variable map?
+ VariableMap valueMap = getValueVariableMap(graph, context);
+ if(valueMap != null) return valueMap.getVariable(graph, context, name);
+
+ if(context instanceof StandardGraphPropertyVariable) {
+ StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)context;
+ Datatype dt = variable.getDatatype(graph);
+ if (dt instanceof ArrayType) {
+ ChildReference ref = getPossibleIndexReference(name);
+ if (ref != null)
+ return new SubliteralPropertyVariableDeprecated(variable, ref);
+ }
+
+ // Check for a child node provided by the NodeManager
+ if (variable.node != null) {
+ Object childNode = getPossibleNodeChild(graph, variable, name);
+ if (childNode != null)
+ return createStandardGraphChildVariable(variable, childNode);
+ }
+ return standardChildDomainChildren.getVariable(graph, context, name);
+ } else if (context instanceof StandardGraphChildVariable) {
+ return standardChildDomainChildren.getVariable(graph, context, name);
+ } else {
+ throw new DatabaseException("Unknown variable implementation " + context.getClass().getCanonicalName());
+ }
+ }
+
+ @Override
+ public Map<String, Variable> getVariables(ReadGraph graph, Variable context, Map<String, Variable> map) throws DatabaseException {
+ // Delegate call to a non-standard variable map?
+ VariableMap valueMap = getValueVariableMap(graph, context);
+ if(valueMap != null) return valueMap.getVariables(graph, context, map);
+
+ if(context instanceof StandardGraphPropertyVariable) {
+ // Get child variables provided by the NodeManager
+ Map<String, Variable> result = getStandardNodeChildVariables(graph, context, map);
+ return standardChildDomainChildren.getVariables(graph, context, result);
+ } else if (context instanceof StandardGraphChildVariable) {
+ return standardChildDomainChildren.getVariables(graph, context, map);
+ } else {
+ throw new DatabaseException("Unknown variable implementation " + context.getClass().getCanonicalName());
+ }
+ }
+
+ };
+
+ protected static ChildReference getPossibleIndexReference(String name) {
+ if (name.startsWith("i-")) {
+ try {
+ int index = Integer.parseInt(name.substring(2));
+ return new IndexReference(index);
+ } catch (NumberFormatException e) {}
+ }
+ return null;
+ }
+
+ protected static ValueAccessor getPossiblePropertyValueAccessor(ReadGraph graph, StandardGraphPropertyVariable variable) throws DatabaseException {
+ if(variable.property == null) return null;
+ return variable.property.valueAccessor;
// return graph.syncRequest(new PropertyValueAccessorRequest(variable.property), TransientCacheAsyncListener.<ValueAccessor>instance());
// return graph.syncRequest(new PossibleRelatedValueImplied2<ValueAccessor>(variable.property, Layer0.getInstance(graph).valueAccessor));
- }
-
- public static ValueAccessor getPossibleValueValueAccessor(ReadGraph graph, Variable variable) throws DatabaseException {
- Resource value = variable.getPossibleRepresents(graph);
- if(value == null) return null;
- //return graph.syncRequest(new PropertyValueAccessorRequest(value));
- return graph.syncRequest(new PossibleRelatedValueImplied2<ValueAccessor>(value, Layer0.getInstance(graph).valueAccessor));
- }
-
- public static PropertyInfo getPossiblePropertyInfoFromContext(ReadGraph graph, Variable variable, Resource context, String name) throws DatabaseException {
- if(context == null) return null;
- Map<String, PropertyInfo> predicates = graph.syncRequest(new UnescapedPropertyMapOfResource(context), TransientCacheListener.instance());
- return predicates.get(name);
- }
+ }
+
+ public static ValueAccessor getPossibleValueValueAccessor(ReadGraph graph, Variable variable) throws DatabaseException {
+ Resource value = variable.getPossibleRepresents(graph);
+ if(value == null) return null;
+ //return graph.syncRequest(new PropertyValueAccessorRequest(value));
+ return graph.syncRequest(new PossibleRelatedValueImplied2<ValueAccessor>(value, Layer0.getInstance(graph).valueAccessor));
+ }
+
+ public static PropertyInfo getPossiblePropertyInfoFromContext(ReadGraph graph, Variable variable, Resource context, String name) throws DatabaseException {
+ if(context == null) return null;
+ Map<String, PropertyInfo> predicates = graph.syncRequest(new UnescapedPropertyMapOfResource(context), TransientCacheListener.instance());
+ return predicates.get(name);
+ }
public static Variable getPossiblePropertyFromContext(ReadGraph graph, Variable variable, Resource context, String name, Object propertyNode) throws DatabaseException {
PropertyInfo info = getPossiblePropertyInfoFromContext(graph, variable, context, name);
if(info == null || info.builder == null) return null;
return buildPropertyVariable(graph, variable, context, info, propertyNode);
}
-
+
public static Variable getPossibleSubliteralPropertyFromContext(ReadGraph graph, StandardGraphPropertyVariable variable, String name) throws DatabaseException {
-
- Resource predicate = variable.property.predicate;
- if(predicate == null) return null;
- PropertyInfo info = getPropertyInfo(graph, predicate);
- Pair<Resource, ChildReference> p = info.subliteralPredicates.get(name);
- if(p == null) return null;
-
- return new SubliteralPropertyVariable(graph, variable, p.first, p.second);
-
+ Resource predicate = variable.property.predicate;
+ if(predicate == null) return null;
+
+ PropertyInfo info = getPropertyInfo(graph, predicate);
+ Pair<Resource, ChildReference> p = info.subliteralPredicates.get(name);
+ if(p == null) return null;
+
+ return new SubliteralPropertyVariable(graph, variable, p.first, p.second);
+
}
public static Map<String, PropertyInfo> collectPropertyInfosFromContext(ReadGraph graph, Variable variable, Resource context) throws DatabaseException {
if(context == null) return Collections.emptyMap();
- return graph.isImmutable(context) ?
- graph.syncRequest(new UnescapedPropertyMapOfResource(context), TransientCacheAsyncListener.<Map<String,PropertyInfo>>instance()) :
- graph.syncRequest(new UnescapedPropertyMapOfResource(context));
- }
-
- public static Map<String, Variable> collectPropertiesFromContext(ReadGraph graph, Variable variable, Resource context, Map<String, Variable> map) throws DatabaseException {
-
- Map<String,PropertyInfo> properties = graph.isImmutable(context) ?
- graph.syncRequest(new UnescapedPropertyMapOfResource(context), TransientCacheAsyncListener.<Map<String,PropertyInfo>>instance()) :
- graph.syncRequest(new UnescapedPropertyMapOfResource(context));
-
- if(properties.isEmpty()) return map;
-
- map = ensureVariableMap(map, properties.size());
-
- for(PropertyInfo info : properties.values()) {
- String name = info.name;
- if (info.builder != null) {
- Variable v = info.builder.buildProperty(graph, variable, null, context, info.predicate);
- map.put(name, v);
- }
- }
-
- return map;
-
- }
-
- public static Map<String, Variable> collectSubliteralProperties(ReadGraph graph, StandardGraphPropertyVariable variable, Map<String, Variable> map) throws DatabaseException {
-
- Resource predicate = variable.property.predicate;
- if(predicate == null) return map;
-
- PropertyInfo info = getPropertyInfo(graph, predicate);
- if(info.subliteralPredicates.isEmpty()) return map;
-
- map = ensureVariableMap(map, info.subliteralPredicates.size());
-
- for(Map.Entry<String, Pair<Resource, ChildReference>> entry : info.subliteralPredicates.entrySet()) {
- String key = entry.getKey();
- Pair<Resource, ChildReference> p = entry.getValue();
- if(map == null) map = new THashMap<String,Variable>();
- map.put(key, new SubliteralPropertyVariable(graph, variable, p.first, p.second));
- }
-
- return map;
-
- }
-
- public static Map<String, Variable> collectPropertiesFromContext(ReadGraph graph, Variable variable, Resource context, String classification, Map<String, Variable> map) throws DatabaseException {
-
- if(graph.isImmutable(context)) {
-
- Map<String,PropertyInfo> properties = graph.syncRequest(new UnescapedPropertyMapOfResource(context), TransientCacheAsyncListener.<Map<String,PropertyInfo>>instance());
- for(PropertyInfo info : properties.values()) {
-
- if(info.classifications.contains(classification) && info.builder != null) {
- String name = info.name;
- Variable v = info.builder.buildProperty(graph, variable, null, context, info.predicate);
- if(map == null) map = new THashMap<String,Variable>();
- map.put(name, v);
- }
-
- }
-
- } else {
-
- Collection<Resource> predicates = graph.getPredicates(context);
-
- if(predicates.isEmpty()) return map;
-
- map = ensureVariableMap(map, predicates.size());
-
- for(Resource predicate : predicates) {
-
- PropertyInfo info = graph.isImmutable(predicate) ?
- graph.syncRequest(new PropertyInfoRequest(predicate), TransientCacheAsyncListener.<PropertyInfo>instance()) :
- graph.syncRequest(new PropertyInfoRequest(predicate));
-
- if(!info.isHasProperty) continue;
-
- if(info.classifications.contains(classification) && info.builder != null) {
- String name = info.name;
- Variable v = info.builder.buildProperty(graph, variable, null, context, info.predicate);
- if(map == null) map = new THashMap<String,Variable>();
- map.put(name, v);
- }
-
- }
-
- }
-
- return map;
-
- }
-
+ return graph.isImmutable(context) ?
+ graph.syncRequest(new UnescapedPropertyMapOfResource(context), TransientCacheAsyncListener.<Map<String,PropertyInfo>>instance()) :
+ graph.syncRequest(new UnescapedPropertyMapOfResource(context));
+ }
+
+ public static Map<String, Variable> collectPropertiesFromContext(ReadGraph graph, Variable variable, Resource context, Map<String, Variable> map) throws DatabaseException {
+
+ Map<String,PropertyInfo> properties = graph.isImmutable(context) ?
+ graph.syncRequest(new UnescapedPropertyMapOfResource(context), TransientCacheAsyncListener.<Map<String,PropertyInfo>>instance()) :
+ graph.syncRequest(new UnescapedPropertyMapOfResource(context));
+
+ if(properties.isEmpty()) return map;
+
+ map = ensureVariableMap(map, properties.size());
+
+ for(PropertyInfo info : properties.values()) {
+ String name = info.name;
+ if (info.builder != null) {
+ Variable v = info.builder.buildProperty(graph, variable, null, context, info.predicate);
+ map.put(name, v);
+ }
+ }
+
+ return map;
+
+ }
+
+ public static Map<String, Variable> collectSubliteralProperties(ReadGraph graph, StandardGraphPropertyVariable variable, Map<String, Variable> map) throws DatabaseException {
+
+ Resource predicate = variable.property.predicate;
+ if(predicate == null) return map;
+
+ PropertyInfo info = getPropertyInfo(graph, predicate);
+ if(info.subliteralPredicates.isEmpty()) return map;
+
+ map = ensureVariableMap(map, info.subliteralPredicates.size());
+
+ for(Map.Entry<String, Pair<Resource, ChildReference>> entry : info.subliteralPredicates.entrySet()) {
+ String key = entry.getKey();
+ Pair<Resource, ChildReference> p = entry.getValue();
+ if(map == null) map = new THashMap<String,Variable>();
+ map.put(key, new SubliteralPropertyVariable(graph, variable, p.first, p.second));
+ }
+
+ return map;
+
+ }
+
+ public static Map<String, Variable> collectPropertiesFromContext(ReadGraph graph, Variable variable, Resource context, String classification, Map<String, Variable> map) throws DatabaseException {
+
+ if(graph.isImmutable(context)) {
+
+ Map<String,PropertyInfo> properties = graph.syncRequest(new UnescapedPropertyMapOfResource(context), TransientCacheAsyncListener.<Map<String,PropertyInfo>>instance());
+ for(PropertyInfo info : properties.values()) {
+
+ if(info.classifications.contains(classification) && info.builder != null) {
+ String name = info.name;
+ Variable v = info.builder.buildProperty(graph, variable, null, context, info.predicate);
+ if(map == null) map = new THashMap<String,Variable>();
+ map.put(name, v);
+ }
+
+ }
+
+ } else {
+
+ Collection<Resource> predicates = graph.getPredicates(context);
+
+ if(predicates.isEmpty()) return map;
+
+ map = ensureVariableMap(map, predicates.size());
+
+ for(Resource predicate : predicates) {
+
+ PropertyInfo info = graph.isImmutable(predicate) ?
+ graph.syncRequest(new PropertyInfoRequest(predicate), TransientCacheAsyncListener.<PropertyInfo>instance()) :
+ graph.syncRequest(new PropertyInfoRequest(predicate));
+
+ if(!info.isHasProperty) continue;
+
+ if(info.classifications.contains(classification) && info.builder != null) {
+ String name = info.name;
+ Variable v = info.builder.buildProperty(graph, variable, null, context, info.predicate);
+ if(map == null) map = new THashMap<String,Variable>();
+ map.put(name, v);
+ }
+
+ }
+
+ }
+
+ return map;
+
+ }
+
@SCLValue(type = "ReadGraph -> Resource -> a -> String")
public static String entityLabel(ReadGraph graph, Resource resource, Object context) throws DatabaseException {
- if(context instanceof Resource) {
- return NameUtils.getSafeLabel(graph, ((Resource)context));
- } else if (context instanceof Variable) {
- Variable parent = ((Variable)context).getParent(graph);
- Resource represents = parent.getRepresents(graph);
- return NameUtils.getSafeLabel(graph, represents);
- } else {
- throw new DatabaseException("Unknown context " + context);
- }
+ if(context instanceof Resource) {
+ return NameUtils.getSafeLabel(graph, ((Resource)context));
+ } else if (context instanceof Variable) {
+ Variable parent = ((Variable)context).getParent(graph);
+ Resource represents = parent.getRepresents(graph);
+ return NameUtils.getSafeLabel(graph, represents);
+ } else {
+ throw new DatabaseException("Unknown context " + context);
+ }
}
@SCLValue(type = "ReadGraph -> Resource -> a -> b")
public static Object listResources(ReadGraph graph, Resource resource, Object context) throws DatabaseException {
- return ListUtils.toList(graph, resource);
+ return ListUtils.toList(graph, resource);
}
@SCLValue(type = "ReadGraph -> Resource -> Variable -> [String]")
public static List<String> standardClassifications(ReadGraph graph, Resource resource, Variable context) throws DatabaseException {
- ArrayList<String> result = new ArrayList<String>();
- Resource predicate = context.getParent(graph).getPossiblePredicateResource(graph);
- if(predicate != null) {
- for(Resource type : graph.getTypes(predicate)) {
- String uri = graph.getPossibleURI(type);
- if(uri != null) result.add(uri);
- }
- }
- return result;
+ ArrayList<String> result = new ArrayList<String>();
+ Resource predicate = context.getParent(graph).getPossiblePredicateResource(graph);
+ if(predicate != null) {
+ for(Resource type : graph.getTypes(predicate)) {
+ String uri = graph.getPossibleURI(type);
+ if(uri != null) result.add(uri);
+ }
+ }
+ return result;
}
@SCLValue(type = "ReadGraph -> Resource -> a -> Boolean")
public static Boolean standardValidValue(ReadGraph graph, Resource resource, Object context) throws DatabaseException {
- return Boolean.TRUE;
+ return Boolean.TRUE;
}
@SCLValue(type = "ReadGraph -> Resource -> a -> StringInputValidator")
public static StringInputValidator standardValidator(ReadGraph graph, Resource resource, Object context) throws DatabaseException {
- return StringInputValidator.PASS;
+ return StringInputValidator.PASS;
}
@SCLValue(type = "ReadGraph -> Resource -> a -> Boolean")
public static Boolean standardRequiredValue(ReadGraph graph, Resource resource, Object context) throws DatabaseException {
- return Boolean.FALSE;
+ return Boolean.FALSE;
}
@SCLValue(type = "ReadGraph -> Resource -> Variable -> Boolean")
public static Boolean standardDefaultValue(ReadGraph graph, Resource resource, Variable context) throws DatabaseException {
- Variable property = context.getParent(graph);
- if(property instanceof StandardGraphPropertyVariable) {
- StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)property;
- if (variable.parentResource != null) {
- Statement stm = graph.getPossibleStatement(variable.parentResource, variable.property.predicate);
- return stm != null && stm.isAsserted(variable.parentResource);
- }
- }
- return Boolean.FALSE;
+ Variable property = context.getParent(graph);
+ if(property instanceof StandardGraphPropertyVariable) {
+ StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)property;
+ if (variable.parentResource != null) {
+ Resource predicate = variable.getPossiblePredicateResource(graph);
+ if (predicate != null) {
+ Statement stm = graph.getPossibleStatement(variable.parentResource, predicate);
+ return stm != null && stm.isAsserted(variable.parentResource);
+ }
+ }
+ }
+ return Boolean.FALSE;
}
@SCLValue(type = "ReadGraph -> Resource -> a -> Boolean")
public static Boolean standardReadOnlyValue(ReadGraph graph, Resource resource, Object context) throws DatabaseException {
- return Boolean.FALSE;
+ return Boolean.FALSE;
}
@SCLValue(type = "ReadGraph -> Resource -> a -> b")
public static Object resourceAsValue(ReadGraph graph, Resource resource, Object context) throws DatabaseException {
- return resource;
+ return resource;
}
-
+
@SCLValue(type = "ReadGraph -> Resource -> a -> b")
public static Object functionApplication(ReadGraph graph, Resource resource, Object context) throws DatabaseException {
- return Functions.exec(graph, resource, graph, resource, context);
+ return Functions.exec(graph, resource, graph, resource, context);
}
@SCLValue(type = "ReadGraph -> Resource -> a -> b")
public static Object computeExpression(ReadGraph graph, Resource converter, Object context) throws DatabaseException {
- if(context instanceof Variable) {
+ if(context instanceof Variable) {
return CompileValueRequest.compileAndEvaluate(graph, (Variable)context);
- } if (context instanceof Resource) {
+ } if (context instanceof Resource) {
return CompileResourceValueRequest.compileAndEvaluate(graph, (Resource)converter);
- } else {
- throw new IllegalStateException("Unknown context " + context);
- }
+ } else {
+ throw new IllegalStateException("Unknown context " + context);
+ }
}
@SCLValue(type = "ReadGraph -> Resource -> a -> b")
public static Object composedPropertyValue(ReadGraph graph, Resource converter, Object context) throws DatabaseException {
- if(context instanceof Variable) {
- return new StandardComposedProperty();
- } if (context instanceof Resource) {
- return new StandardComposedProperty();
- } else {
- throw new IllegalStateException("Unknown context " + context);
- }
- }
-
+ if(context instanceof Variable) {
+ return new StandardComposedProperty();
+ } if (context instanceof Resource) {
+ return new StandardComposedProperty();
+ } else {
+ throw new IllegalStateException("Unknown context " + context);
+ }
+ }
+
@SCLValue(type = "ReadGraph -> Resource -> a -> b")
public static Object numberInputValidator(ReadGraph graph, Resource resource, Object context) throws DatabaseException {
-
+
class Validator extends FunctionImpl1<String, String> {
private final Datatype datatype;
-
+
public Validator(Datatype datatype) {
this.datatype = datatype;
}
-
+
@Override
public String apply(String input) {
-
+
if(datatype == null) return null;
-
+
try {
if(datatype instanceof NumberType) {
-
+
Number number = (Number)PrimitiveValueParser.parse(input, datatype);
NumberType nt = (NumberType)datatype;
Range r = nt.getRange();
}
}
return null;
-
+
} catch (NumberFormatException e) {
return "Not a valid floating-point number";
} catch (IllegalArgumentException e) {
return "Not a valid floating-point number";
}
-
+
}
-
+
}
if(context instanceof Variable) {
-
+
Variable variable = (Variable)context;
Variable property = variable.getParent(graph);
Datatype datatype = property.getPossibleDatatype(graph);
return new Validator(datatype);
-
+
} else if (context instanceof Resource) {
Layer0 L0 = Layer0.getInstance(graph);
Resource literal = (Resource)context;
Datatype datatype = graph.getRelatedValue(literal, L0.HasDataType, Bindings.getBindingUnchecked(Datatype.class));
return new Validator(datatype);
-
+
} else {
-
+
return new Validator(null);
-
+
}
-
+
}
-
+
@SCLValue(type = "ReadGraph -> Resource -> a -> b")
public static Object booleanInputValidator(ReadGraph graph, Resource resource, Object context) throws DatabaseException {
-
+
return new FunctionImpl1<String, String>() {
@Override
public String apply(String input) {
-
- String lower = input.toLowerCase();
- if("true".equals(lower) || "false".equals(lower)) return null;
- return "Not a valid boolean: " + input;
-
+ String lower = input.toLowerCase();
+ if("true".equals(lower) || "false".equals(lower)) return null;
+
+ return "Not a valid boolean: " + input;
+
}
-
+
};
-
+
}
@SCLValue(type = "ReadGraph -> Resource -> Variable -> Resource")
public static Resource hasStandardResource(ReadGraph graph, Resource resource, Variable context) throws DatabaseException {
- Variable parent = context.getParent(graph);
- if(parent instanceof StandardGraphChildVariable) {
- StandardGraphChildVariable variable = (StandardGraphChildVariable)parent;
- return variable.resource;
- }
- return null;
+ Variable parent = context.getParent(graph);
+ if(parent instanceof StandardGraphChildVariable) {
+ StandardGraphChildVariable variable = (StandardGraphChildVariable)parent;
+ return variable.resource;
+ }
+ return null;
}
@SCLValue(type = "ReadGraph -> Resource -> Variable -> a")
- public static Object valueWithoutBinding(ReadGraph graph, Resource converter, Variable context) throws DatabaseException {
-
- StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)context;
-
- if(graph.sync(new IsEnumeratedValue(variable.getRepresents(graph)))) {
- Layer0 L0 = Layer0.getInstance(graph);
- return graph.getRelatedValue2(variable.getRepresents(graph), L0.HasLabel);
- }
-
- if (variable.parentResource == null)
- throw new InvalidVariableException("Variable is not represented by any resource (URI=" + variable.getPossibleURI(graph) + ").");
-
- try {
- return graph.getRelatedValue2(variable.parentResource, variable.property.predicate, variable);
- } catch (NoSingleResultException e) {
- throw new MissingVariableValueException(variable.getPossibleURI(graph), e);
- } catch (DoesNotContainValueException e) {
- throw new MissingVariableValueException(variable.getPossibleURI(graph), e);
- }
-
- }
+ public static Object valueWithoutBinding(ReadGraph graph, Resource converter, Variable context) throws DatabaseException {
+
+ StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)context;
+
+ if(graph.sync(new IsEnumeratedValue(variable.getRepresents(graph)))) {
+ Layer0 L0 = Layer0.getInstance(graph);
+ return graph.getRelatedValue2(variable.getRepresents(graph), L0.HasLabel);
+ }
+
+ if (variable.parentResource == null)
+ throw new InvalidVariableException("Variable is not represented by any resource (URI=" + variable.getPossibleURI(graph) + ").");
+
+ try {
+ return graph.getRelatedValue2(variable.parentResource, variable.getPredicateResource(graph), variable);
+ } catch (NoSingleResultException e) {
+ throw new MissingVariableValueException(variable.getPossibleURI(graph), e);
+ } catch (DoesNotContainValueException e) {
+ throw new MissingVariableValueException(variable.getPossibleURI(graph), e);
+ }
+
+ }
@SCLValue(type = "ReadGraph -> Variable -> Binding -> a")
- public static Object valueWithBinding(ReadGraph graph, Variable context, Binding binding) throws DatabaseException {
-
- StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)context;
-
- if(graph.sync(new IsEnumeratedValue(variable.getRepresents(graph)))) {
- Layer0 L0 = Layer0.getInstance(graph);
- return graph.getRelatedValue2(variable.getRepresents(graph), L0.HasLabel, binding);
- }
-
- if (variable.parentResource == null)
- throw new MissingVariableException("Variable is not represented by any resource (URI=" + variable.getPossibleURI(graph) + ").", context.getPossibleRepresents(graph));
-
- try {
- return graph.getRelatedValue2(variable.parentResource, variable.property.predicate, variable);
- } catch (NoSingleResultException e) {
- throw new MissingVariableValueException(variable.getPossibleURI(graph), e);
- } catch (DoesNotContainValueException e) {
- throw new MissingVariableValueException(variable.getPossibleURI(graph), e);
- }
-
- }
+ public static Object valueWithBinding(ReadGraph graph, Variable context, Binding binding) throws DatabaseException {
+
+ StandardGraphPropertyVariable variable = (StandardGraphPropertyVariable)context;
+
+ if(graph.sync(new IsEnumeratedValue(variable.getRepresents(graph)))) {
+ Layer0 L0 = Layer0.getInstance(graph);
+ return graph.getRelatedValue2(variable.getRepresents(graph), L0.HasLabel, binding);
+ }
+
+ if (variable.parentResource == null)
+ throw new MissingVariableException("Variable is not represented by any resource (URI=" + variable.getPossibleURI(graph) + ").", context.getPossibleRepresents(graph));
+
+
+ try {
+ return graph.getRelatedValue2(variable.parentResource, variable.getPredicateResource(graph), variable);
+ } catch (NoSingleResultException e) {
+ throw new MissingVariableValueException(variable.getPossibleURI(graph), e);
+ } catch (DoesNotContainValueException e) {
+ throw new MissingVariableValueException(variable.getPossibleURI(graph), e);
+ }
+
+ }
@SCLValue(type = "WriteGraph -> Variable -> a -> Binding -> b")
- public static Object valueSetterWithBinding(WriteGraph graph, Variable variable, Object value, Binding binding) throws DatabaseException {
-
- Function4<WriteGraph, Variable, Object, Object, String> modifier = variable.getPossiblePropertyValue(graph, Variables.INPUT_MODIFIER);
- if(modifier == null) modifier = VariableUtils.defaultInputModifier;
- modifier.apply(graph, variable, value, binding);
- return null;
-
- }
-
+ public static Object valueSetterWithBinding(WriteGraph graph, Variable variable, Object value, Binding binding) throws DatabaseException {
+
+ Function4<WriteGraph, Variable, Object, Object, String> modifier = variable.getPossiblePropertyValue(graph, Variables.INPUT_MODIFIER);
+ if(modifier == null) modifier = VariableUtils.defaultInputModifier;
+ modifier.apply(graph, variable, value, binding);
+ return null;
+
+ }
+
static class L0Issue extends StandardIssue {
-
+
private final String description;
-
+
public L0Issue(String description, Resource type, Resource ... contexts) {
super(type, contexts);
this.description = description;
graph.addLiteral(issue, L0.HasDescription, L0.HasDescription_Inverse, description, Bindings.STRING);
return issue;
}
-
- }
-
- private static List<Issue> reportInconsistency(ReadGraph graph, Resource subject, String description, List<Issue> issues) throws DatabaseException {
- if(issues == null) issues = new ArrayList<Issue>();
- System.err.println("Change set validation reports the following issue: " + NameUtils.getSafeName(graph, subject, true) + ": " + description);
- IssueResource IR = IssueResource.getInstance(graph);
- issues.add(new L0Issue(description, IR.Issue, subject));
- return issues;
- }
-
+
+ }
+
+ private static List<Issue> reportInconsistency(ReadGraph graph, Resource subject, String description, List<Issue> issues) throws DatabaseException {
+ if(issues == null) issues = new ArrayList<Issue>();
+ System.err.println("Change set validation reports the following issue: " + NameUtils.getSafeName(graph, subject, true) + ": " + description);
+ IssueResource IR = IssueResource.getInstance(graph);
+ issues.add(new L0Issue(description, IR.Issue, subject));
+ return issues;
+ }
+
@SCLValue(type = "ReadGraph -> Resource -> [Issue]")
public static List<Issue> relationValidator(ReadGraph graph, Resource resource) throws DatabaseException {
- Layer0 L0 = Layer0.getInstance(graph);
-
- List<Issue> issues = null;
-
- for(Statement stm : graph.getStatements(resource, L0.IsWeaklyRelatedTo)) {
- Resource predicate = stm.getPredicate();
- Resource object = stm.getObject();
- if(!isRelation(graph, L0, predicate)) {
- issues = reportInconsistency(graph, resource, "The predicate of a statement must be a relation: " + NameUtils.toString(graph, stm), issues);
- }
- if(graph.isInstanceOf(predicate, L0.FunctionalRelation)) {
- if(graph.getObjects(resource, predicate).size() > 1)
- issues = reportInconsistency(graph, resource,
- "Relation " +
- NameUtils.getSafeName(graph, predicate)
- + " is functional.", issues);
- }
- {
- Collection<Resource> domain = graph.getObjects(predicate, L0.HasDomain);
- if (!isInstanceOfAny(graph, resource, domain, true)) {
- StringBuilder sb = new StringBuilder()
- .append("The domain of ")
- .append(NameUtils.getSafeName(graph, predicate))
- .append(" relation is ");
- orString(graph, sb, domain).append(".");
- issues = reportInconsistency(graph, resource, sb.toString(), issues);
- }
- }
- {
- Collection<Resource> range = graph.getObjects(predicate, L0.HasRange);
- if (!isInstanceOfAny(graph, object, range, true) && !graph.isInstanceOf(object, L0.SCLValue)) {
- StringBuilder sb = new StringBuilder()
- .append("The range of ")
- .append(NameUtils.getSafeName(graph, predicate))
- .append(" relation is ");
- orString(graph, sb, range).append(" but current object is ")
- .append(NameUtils.getSafeName(graph, object)).append(".");
- issues = reportInconsistency(graph, resource, sb.toString(), issues);
- }
- }
- }
-
- return issues != null ? issues : Collections.<Issue>emptyList();
+ Layer0 L0 = Layer0.getInstance(graph);
+
+ List<Issue> issues = null;
+
+ for(Statement stm : graph.getStatements(resource, L0.IsWeaklyRelatedTo)) {
+ Resource predicate = stm.getPredicate();
+ Resource object = stm.getObject();
+ if(!isRelation(graph, L0, predicate)) {
+ issues = reportInconsistency(graph, resource, "The predicate of a statement must be a relation: " + NameUtils.toString(graph, stm), issues);
+ }
+ if(graph.isInstanceOf(predicate, L0.FunctionalRelation)) {
+ if(graph.getObjects(resource, predicate).size() > 1)
+ issues = reportInconsistency(graph, resource,
+ "Relation " +
+ NameUtils.getSafeName(graph, predicate)
+ + " is functional.", issues);
+ }
+ {
+ Collection<Resource> domain = graph.getObjects(predicate, L0.HasDomain);
+ if (!isInstanceOfAny(graph, resource, domain, true)) {
+ StringBuilder sb = new StringBuilder()
+ .append("The domain of ")
+ .append(NameUtils.getSafeName(graph, predicate))
+ .append(" relation is ");
+ orString(graph, sb, domain).append(".");
+ issues = reportInconsistency(graph, resource, sb.toString(), issues);
+ }
+ }
+ {
+ Collection<Resource> range = graph.getObjects(predicate, L0.HasRange);
+ if (!isInstanceOfAny(graph, object, range, true) && !graph.isInstanceOf(object, L0.SCLValue)) {
+ StringBuilder sb = new StringBuilder()
+ .append("The range of ")
+ .append(NameUtils.getSafeName(graph, predicate))
+ .append(" relation is ");
+ orString(graph, sb, range).append(" but current object is ")
+ .append(NameUtils.getSafeName(graph, object)).append(".");
+ issues = reportInconsistency(graph, resource, sb.toString(), issues);
+ }
+ }
+ }
+
+ return issues != null ? issues : Collections.<Issue>emptyList();
}
List<Issue> issues = null;
Layer0 L0 = Layer0.getInstance(graph);
- for(Statement stm : graph.getStatements(resource, L0.HasProperty)) {
- Resource subject = stm.getSubject();
- Resource predicate = stm.getPredicate();
- String error = L0Validations.checkValueType(graph, subject, predicate);
- if(error != null) issues = reportInconsistency(graph, subject, error, issues);
- }
-
+ for(Statement stm : graph.getStatements(resource, L0.HasProperty)) {
+ Resource subject = stm.getSubject();
+ Resource predicate = stm.getPredicate();
+ String error = L0Validations.checkValueType(graph, subject, predicate);
+ if(error != null) issues = reportInconsistency(graph, subject, error, issues);
+ }
+
return issues != null ? issues : Collections.<Issue>emptyList();
}
-
-
+
+
@SCLValue(type = "ReadGraph -> Resource -> [Issue]")
public static List<Issue> valueValidator(ReadGraph graph, Resource resource) throws DatabaseException {
List<Issue> issues = null;
Layer0 L0 = Layer0.getInstance(graph);
- if(graph.hasValue(resource)) {
- if(!graph.isInstanceOf(resource, L0.Literal)) {
- issues = reportInconsistency(graph, resource,
- "Resource has a value but it is not a literal.", issues);
- }
- else {
- // TODO check that the value is valid for the data type
- }
- }
- else {
- if(graph.isInstanceOf(resource, L0.Literal)) {
- issues = reportInconsistency(graph, resource,
- "Resource is a literal but it does not have a value.", issues);
- }
- }
-
+ if(graph.hasValue(resource)) {
+ if(!graph.isInstanceOf(resource, L0.Literal)) {
+ issues = reportInconsistency(graph, resource,
+ "Resource has a value but it is not a literal.", issues);
+ }
+ else {
+ // TODO check that the value is valid for the data type
+ }
+ }
+ else {
+ if(graph.isInstanceOf(resource, L0.Literal)) {
+ issues = reportInconsistency(graph, resource,
+ "Resource is a literal but it does not have a value.", issues);
+ }
+ }
+
return issues != null ? issues : Collections.<Issue>emptyList();
-
+
}
-
+
@SCLValue(type = "ReadGraph -> Resource -> [Issue]")
public static List<Issue> uriValidator(ReadGraph graph, Resource resource) throws DatabaseException {
-
+
List<Issue> issues = null;
Layer0 L0 = Layer0.getInstance(graph);
Resource parent = graph.getPossibleObject(resource, L0.PartOf);
- if(parent != null) {
- String parentURI = graph.syncRequest(new PossibleURI(parent));
- if(parentURI != null) {
- String name = graph.getPossibleRelatedValue(resource, L0.HasName);
- if(name == null) {
- issues = reportInconsistency(graph, resource, "Resource has a parent with URI but has no valid HasName.", issues);
- }
- }
- }
+ if(parent != null) {
+ String parentURI = graph.syncRequest(new PossibleURI(parent));
+ if(parentURI != null) {
+ String name = graph.getPossibleRelatedValue(resource, L0.HasName);
+ if(name == null) {
+ issues = reportInconsistency(graph, resource, "Resource has a parent with URI but has no valid HasName.", issues);
+ }
+ }
+ }
return issues != null ? issues : Collections.<Issue>emptyList();
-
+
}
-
+
private static Resource getPossibleNearestClusterSet(ReadGraph graph, Resource base, Resource resource) throws DatabaseException {
ClusteringSupport cs = graph.getService(ClusteringSupport.class);
if(cs.isClusterSet(resource) && !base.equals(resource)) return resource;
-
+
Resource nearest = NearestOwnerFinder.getNearestOwner(graph, resource);
if(nearest == null) return null;
-
+
return getPossibleNearestClusterSet(graph, base, nearest);
}
private static boolean quirks(ReadGraph graph, Resource resource) throws DatabaseException {
- if(!resource.isPersistent()) return true;
- if(graph.isImmutable(resource)) return true;
- if(resource.getResourceId() < 0x2000) return true;
+ if(!resource.isPersistent()) return true;
+ if(graph.isImmutable(resource)) return true;
+ if(resource.getResourceId() < 0x2000) return true;
+
+ return false;
- return false;
-
}
-
+
@SCLValue(type = "ReadGraph -> Resource -> [Issue]")
public static List<Issue> clusterValidator(ReadGraph graph, Resource resource) throws DatabaseException {
- if(!Development.DEVELOPMENT) return Collections.<Issue>emptyList();
-
- if(quirks(graph, resource)) return Collections.<Issue>emptyList();
-
+ if(!Development.DEVELOPMENT) return Collections.<Issue>emptyList();
+
+ if(quirks(graph, resource)) return Collections.<Issue>emptyList();
+
List<Issue> issues = null;
ClusteringSupport cs = graph.getService(ClusteringSupport.class);
Resource set = cs.getClusterSetOfCluster(resource);
-
+
if(set == null) return reportInconsistency(graph, resource, "Resource cluster is not part of any cluster set", issues);
-
+
Resource nearestSet = getPossibleNearestClusterSet(graph, resource, resource);
if(nearestSet == null) {
- // This means that there is no owner since RootLibrary is a cluster set
- return Collections.<Issue>emptyList();
+ // This means that there is no owner since RootLibrary is a cluster set
+ return Collections.<Issue>emptyList();
}
-
+
if(!set.equals(nearestSet)) return reportInconsistency(graph, resource, "The cluster set of a resource is not the nearest owner set", issues);
return Collections.<Issue>emptyList();
-
+
}
private static boolean isInstanceOfAny(ReadGraph graph, Resource r, Collection<Resource> types, boolean ifEmpty) throws DatabaseException {
- if (types.isEmpty())
- return ifEmpty;
- for (Resource type : types) {
- if (graph.isInstanceOf(r, type)) {
- return true;
- }
- }
- return false;
- }
-
- private static StringBuilder orString(ReadGraph graph, StringBuilder sb, Collection<Resource> rs) throws DatabaseException {
- sb.append("(");
- boolean first = true;
- for (Resource r : rs) {
- if (!first)
- sb.append(" | ");
- first = false;
- sb.append(NameUtils.getSafeName(graph, r));
- }
- sb.append(")");
- return sb;
- }
+ if (types.isEmpty())
+ return ifEmpty;
+ for (Resource type : types) {
+ if (graph.isInstanceOf(r, type)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private static StringBuilder orString(ReadGraph graph, StringBuilder sb, Collection<Resource> rs) throws DatabaseException {
+ sb.append("(");
+ boolean first = true;
+ for (Resource r : rs) {
+ if (!first)
+ sb.append(" | ");
+ first = false;
+ sb.append(NameUtils.getSafeName(graph, r));
+ }
+ sb.append(")");
+ return sb;
+ }
public static boolean isRelation(ReadGraph g, Layer0 l0, Resource relation) throws DatabaseException {
- return g.hasStatement(relation, l0.SubrelationOf) || relation == l0.IsWeaklyRelatedTo;
- }
-
- public static boolean isType(ReadGraph g, Layer0 l0, Resource type) throws DatabaseException {
- return g.hasStatement(type, l0.Inherits) || type == l0.Entity;
- }
-
+ return g.hasStatement(relation, l0.SubrelationOf) || relation == l0.IsWeaklyRelatedTo;
+ }
+
+ public static boolean isType(ReadGraph g, Layer0 l0, Resource type) throws DatabaseException {
+ return g.hasStatement(type, l0.Inherits) || type == l0.Entity;
+ }
+
public static Variable buildChildVariable(ReadGraph graph, Variable context, Resource graphChild, Object nodeChild) throws DatabaseException {
VariableBuilder builder = graph.adapt(graphChild, VariableBuilder.class);
- return builder.buildChild(graph, context, build(((AbstractVariable)context).node, nodeChild), graphChild);
- }
-
- private static Variable buildPropertyVariable(ReadGraph graph, Variable variable, Resource parentResource, PropertyInfo graphProperty, Object propertyNode) throws DatabaseException {
- VariableNode<?> node = variable instanceof AbstractVariable ? build(((AbstractVariable)variable).node, propertyNode) : null;
- return graphProperty.builder.buildProperty(graph, variable, node, parentResource, graphProperty.predicate);
- }
-
- static StandardGraphChildVariable createStandardGraphChildVariable(
- AbstractVariable parent, Object child) {
- return new StandardGraphChildVariable(parent, build(parent.node, child), null);
- }
-
- private static StandardGraphPropertyVariable createStandardGraphPropertyVariable(
- ReadGraph graph, AbstractVariable variable, Object nodeProperty) throws DatabaseException {
+ return builder.buildChild(graph, context, build(((AbstractVariable)context).node, nodeChild), graphChild);
+ }
+
+ private static Variable buildPropertyVariable(ReadGraph graph, Variable variable, Resource parentResource, PropertyInfo graphProperty, Object propertyNode) throws DatabaseException {
+ VariableNode<?> node = variable instanceof AbstractVariable ? build(((AbstractVariable)variable).node, propertyNode) : null;
+ return graphProperty.builder.buildProperty(graph, variable, node, parentResource, graphProperty.predicate);
+ }
+
+ static StandardGraphChildVariable createStandardGraphChildVariable(
+ AbstractVariable parent, Object child) {
+ return new StandardGraphChildVariable(parent, build(parent.node, child), null);
+ }
+
+ private static StandardGraphPropertyVariable createStandardGraphPropertyVariable(
+ ReadGraph graph, AbstractVariable variable, Object nodeProperty) throws DatabaseException {
Resource propertyResource = getPossiblePropertyResource(graph, variable, nodeProperty);
return new StandardGraphPropertyVariable(graph, variable, build(variable.node, nodeProperty), null, propertyResource);
- }
-
- static Map<String, Variable> ensureVariableMap(
- Map<String, Variable> map, int size) {
- if(map == null) map = new THashMap<String,Variable>(size);
- return map;
- }
-
- private static PropertyInfo getPropertyInfo(ReadGraph graph, Resource predicate) throws DatabaseException {
- return graph.syncRequest(new PropertyInfoRequest(predicate));
- }
-
- @SuppressWarnings("unchecked")
- static String getNodeName(AbstractVariable parent, Object child) {
- return parent.node.support.manager.getName(child);
- }
-
- @SuppressWarnings("unchecked")
- private static Object getNodeValue(final AbstractVariable variable, final Binding binding) throws NodeManagerException, BindingException {
- return variable.node.support.manager.getValue(variable.node.node, binding);
- }
-
- @SuppressWarnings("unchecked")
- private static void setNodeValue(final AbstractVariable variable, final Object value, final Binding binding) throws NodeManagerException, BindingException {
- variable.node.support.manager.setValue(variable.node.node, value, binding);
- }
-
- @SuppressWarnings("unchecked")
- private static String getPossiblePropertyURI(AbstractVariable parent, Object node) {
- return parent.node.support.manager.getPropertyURI(parent.node.node, node);
- }
-
+ }
+
+ static Map<String, Variable> ensureVariableMap(
+ Map<String, Variable> map, int size) {
+ if(map == null) map = new THashMap<String,Variable>(size);
+ return map;
+ }
+
+ private static PropertyInfo getPropertyInfo(ReadGraph graph, Resource predicate) throws DatabaseException {
+ return graph.syncRequest(new PropertyInfoRequest(predicate));
+ }
+
+ @SuppressWarnings("unchecked")
+ static String getNodeName(AbstractVariable parent, Object child) {
+ return parent.node.support.manager.getName(child);
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Object getNodeValue(final AbstractVariable variable, final Binding binding) throws NodeManagerException, BindingException {
+ return variable.node.support.manager.getValue(variable.node.node, binding);
+ }
+
+ @SuppressWarnings("unchecked")
+ private static void setNodeValue(final AbstractVariable variable, final Object value, final Binding binding) throws NodeManagerException, BindingException {
+ variable.node.support.manager.setValue(variable.node.node, value, binding);
+ }
+
+ @SuppressWarnings("unchecked")
+ private static String getPossiblePropertyURI(AbstractVariable parent, Object node) {
+ return parent.node.support.manager.getPropertyURI(parent.node.node, node);
+ }
+
@SCLValue(type = "ReadGraph -> Resource -> Variable -> a")
public static Object defaultInstantiateUnder(ReadGraph graph, Resource converter, Variable context) throws DatabaseException {
import org.simantics.db.ReadGraph;
import org.simantics.db.Resource;
-import org.simantics.db.common.utils.Logger;
+import org.simantics.db.common.request.UniqueRead;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.adapter.GenericRelationIndex;
import org.simantics.db.service.QueryControl;
import org.simantics.operation.Layer0X;
import org.simantics.scl.runtime.function.FunctionImpl4;
import org.simantics.scl.runtime.function.UnsaturatedFunction2;
+import org.slf4j.LoggerFactory;
/**
* dependencies:
*/
public class Dependencies extends FunctionImpl4<ReadGraph, Resource, String, Integer, Object> {
+ private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(Dependencies.class);
+
public static final String FIELD_MODEL = "Model";
public static final String FIELD_PARENT = "Parent";
public static final String FIELD_RESOURCE = "Resource";
final int maxResults = _maxResults != null ? _maxResults : Integer.MAX_VALUE;
QueryControl qc = graph.getService(QueryControl.class);
- return index.query(qc.getIndependentGraph(graph), query, getBindingPattern(), new Object[] { model }, maxResults);
+ return qc.syncRequestIndependent(graph, new UniqueRead<Object>() {
+ @Override
+ public Object perform(ReadGraph graph) throws DatabaseException {
+ return index.query(graph, query, getBindingPattern(), new Object[] { model }, maxResults);
+ }
+ });
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("Error while performing index query", e);
return null;
}
}
import org.simantics.db.ReadGraph;
import org.simantics.db.Resource;
-import org.simantics.db.common.utils.Logger;
+import org.simantics.db.common.request.UniqueRead;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.adapter.GenericRelationIndex;
import org.simantics.db.service.QueryControl;
import org.simantics.operation.Layer0X;
import org.simantics.scl.runtime.function.FunctionImpl4;
import org.simantics.scl.runtime.function.UnsaturatedFunction2;
+import org.slf4j.LoggerFactory;
/**
* dependencyResources:
*/
public class DependencyResources extends FunctionImpl4<ReadGraph, Resource, String, Integer, Object> {
+ private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(DependencyResources.class);
+
protected Resource getIndexRelation(ReadGraph graph) {
return Layer0X.getInstance(graph).DependenciesRelation;
}
final int maxResults = _maxResults != null ? _maxResults : Integer.MAX_VALUE;
QueryControl qc = graph.getService(QueryControl.class);
- return index.queryResources(qc.getIndependentGraph(graph), query, getBindingPattern(), new Object[] { model }, maxResults);
+ return qc.syncRequestIndependent(graph, new UniqueRead<Object>() {
+ @Override
+ public Object perform(ReadGraph graph) throws DatabaseException {
+ return index.queryResources(graph, query, getBindingPattern(), new Object[] { model }, maxResults);
+ }
+ });
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("Error while performing index query", e);
return null;
}
}
b2.append('\n');
}
SCLDatabaseException exception = new SCLDatabaseException(b.toString()+b2.toString(), b2.toString(), e.getErrors());
- LOGGER.info(exception.getMessage(), exception);
throw exception;
} catch(Throwable e) {
// Should not happen!
bs.add(b);
cache = null;
}
-
+
+ /**
+ * Appends the contents of the specified map to this map.
+ *
+ * @param from the map to append contents from
+ */
+ public void append(HierarchyMultiMap<A,B> from) {
+ from.appendTo(this);
+ }
+
+ /**
+ * Appends the contents of this map to the specified map.
+ *
+ * @param to the map to append to
+ */
+ public void appendTo(HierarchyMultiMap<A,B> to) {
+ map.forEachEntry((a, bl) -> {
+ bl.forEach(b -> to.put(a, b));
+ return true;
+ });
+ }
+
/**
* Gets the values stored into the map for the key {@code a} or
* its superelements.
}
+ public static boolean isMarkedReadOnly(ReadGraph graph, Resource r) throws DatabaseException {
+ return Boolean.TRUE.equals( graph.getPossibleRelatedValue(r, graph.<Layer0>l0().readOnly, Bindings.BOOLEAN) );
+ }
+
private static TransferableGraph1 makeTG(ReadGraph graph, Resource r) throws DatabaseException {
SimanticsClipboardImpl cp = new SimanticsClipboardImpl();
QueryControl qc = graph.getService(QueryControl.class);
ClusterControl cc = graph.getService(ClusterControl.class);
_monitor.beginTask("Collect clusters", IProgressMonitor.UNKNOWN);
- cc.gc(graph, clusterTarget);
+ //cc.gc(graph, clusterTarget);
+ if(clusterTarget == -1) {
+ int used = cc.used();
+ //System.err.println("session gc, cluster use = " + used);
+ int baseline = 32*(1<<20);
+ if(used > baseline) {
+ int dynamicTarget = (int)(0.95 * (used-baseline)) + baseline;
+ cc.gc(graph, dynamicTarget);
+ }
+ } else {
+ cc.gc(graph, clusterTarget);
+ }
_monitor.beginTask("Collect queries", IProgressMonitor.UNKNOWN);
qc.gc(graph, allowedTimeInMs);
}
--- /dev/null
+package org.simantics.db.layer0.variable;
+
+import org.simantics.db.Resource;
+import org.simantics.db.exception.AssumptionException;
+
+public class NoPredicateResourceException extends AssumptionException {
+
+ private static final long serialVersionUID = -374051341908276908L;
+
+ public NoPredicateResourceException(Throwable cause) {
+ super(cause);
+ }
+
+ public NoPredicateResourceException(String message, Throwable cause, Resource... rs) {
+ super(message, cause, rs);
+ }
+
+ public NoPredicateResourceException(String message, Resource... resources) {
+ super(message, resources);
+ }
+
+ public NoPredicateResourceException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public NoPredicateResourceException(String message, int... args) {
+ super(message, args);
+ }
+
+ public NoPredicateResourceException(String message) {
+ super(message);
+ }
+
+}
import org.simantics.databoard.util.ObjectUtils;
import org.simantics.db.ReadGraph;
import org.simantics.db.common.request.ParametrizedPrimitiveRead;
-import org.simantics.db.common.utils.Logger;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.variable.Variables.NodeStructure;
import org.simantics.db.procedure.Listener;
import org.simantics.simulator.variable.exceptions.NodeManagerException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import gnu.trove.map.hash.THashMap;
@SuppressWarnings("rawtypes")
class NodeStructureRequest extends ParametrizedPrimitiveRead<VariableNode, NodeStructure> implements VariableNodeReadRunnable {
- private Listener<NodeStructure> listener = null;
- private NodeStructure value = Variables.PENDING_NODE_STRUCTURE;
- private boolean wasRun = false;
-
- static class Probe implements Runnable {
-
- private VariableNode node;
- public NodeStructure result;
-
- public Probe(VariableNode node) {
- this.node = node;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void run() {
- try {
- result = NodeStructureRequest.get(node);
- node.support.structureCache.put(node.node, result, 1000000000L);
- } catch (NodeManagerException e) {
- e.printStackTrace();
- }
- }
-
- }
-
- public NodeStructureRequest(VariableNode node) {
- super(node);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void register(ReadGraph graph, final Listener<NodeStructure> procedure) {
-
- if(procedure.isDisposed()) {
-
- // We are not listening
- NodeStructure result = (NodeStructure)parameter.support.structureCache.get(parameter.node);
-
- if(result != null) {
- // Return cached value immediately
- procedure.execute(result);
- } else {
- NodeStructureRequest.Probe probe = new Probe(parameter);
- parameter.support.manager.getRealm().asyncExec(probe);
- if(probe.result != null) {
- procedure.execute(probe.result);
- } else {
- procedure.execute(Variables.PENDING_NODE_STRUCTURE);
- }
- }
-
- return;
-
- }
-
- // We need to listen
- listener = procedure;
- // Register listening
- parameter.support.manager.addNodeListener(parameter.node, this);
- synchronized(this) {
- if(wasRun) {
- procedure.execute(value);
- } else {
- NodeStructure result = (NodeStructure)parameter.support.structureCache.get(parameter.node);
- if(result != null) {
- procedure.execute(result);
- } else {
- procedure.execute(Variables.PENDING_NODE_STRUCTURE);
- }
- }
- }
-
- }
-
- static class NodeListener implements VariableNodeReadRunnable {
-
- private VariableNode node;
- private NodeStructureRequest request;
-
- public NodeListener(VariableNode node, NodeStructureRequest request) {
- this.node = node;
- this.request = request;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void run() {
- node.support.manager.addNodeListener(node.node, request);
- }
-
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void unregistered() {
- parameter.support.manager.removeNodeListener(parameter.node, this);
- parameter.support.structureCache.removeListening(parameter.node);
- listener = null;
- }
-
- @SuppressWarnings("unchecked")
- public static NodeStructure get(VariableNode parameter) throws NodeManagerException {
- List<?> children = parameter.support.manager.getChildren(parameter.node);
- List<?> properties = parameter.support.manager.getProperties(parameter.node);
- Map<String, Object> childMap = Collections.emptyMap();
- Map<String, Object> propertyMap = childMap;
- if(!children.isEmpty()) {
- childMap = new THashMap<>(children.size());
- for(Object o : children) {
- String name = parameter.support.manager.getName(o);
- childMap.put(name, o);
- }
- }
- if(!properties.isEmpty()) {
- propertyMap = new THashMap<>(properties.size());
- for(Object o : properties) {
- String name = parameter.support.manager.getName(o);
- propertyMap.put(name, o);
- }
- }
- return new NodeStructure(childMap, propertyMap);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public synchronized void run() {
- try {
- // Cache this value with infinite cache time since we are listening
- NodeStructure newValue = get(parameter);
- if (wasRun && ObjectUtils.objectEquals(value, newValue)) {
- //System.out.println("CACHE VALUE MATCH (" + newValue + ") for " + node.node);
- return;
- }
- value = newValue;
- parameter.support.structureCache.put(parameter.node, value);
- } catch (Throwable e) {
- // Must catch everything to prevent DB client from getting stuck.
- Logger.defaultLogError(e);
- // Invoke the exception method of the listener
- Listener<NodeStructure> listener = this.listener;
- if (listener != null) listener.exception(new DatabaseException("External data access error", e));
- wasRun = true;
- return;
- }
-
- // Must always invoke an existing listener, regardless of earlier errors.
- Listener<NodeStructure> listener = this.listener;
- if (listener != null) {
- listener.execute(value);
- }
- wasRun = true;
- }
-
- @Override
- public String toString() {
- return "NodeStructureRequest.run @ " + System.identityHashCode(this);
- }
+ private static final Logger LOGGER = LoggerFactory.getLogger(NodeStructureRequest.class);
+
+ private Listener<NodeStructure> listener = null;
+ private NodeStructure value = Variables.PENDING_NODE_STRUCTURE;
+ private boolean wasRun = false;
+
+ static class Probe implements Runnable {
+
+ private VariableNode node;
+ public NodeStructure result;
+
+ public Probe(VariableNode node) {
+ this.node = node;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void run() {
+ try {
+ result = NodeStructureRequest.get(node);
+ node.support.structureCache.put(node.node, result, 1000000000L);
+ } catch (NodeManagerException e) {
+ e.printStackTrace();
+ }
+ }
+
+ }
+
+ public NodeStructureRequest(VariableNode node) {
+ super(node);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void register(ReadGraph graph, final Listener<NodeStructure> procedure) {
+
+ if(procedure.isDisposed()) {
+
+ // We are not listening
+ NodeStructure result = (NodeStructure)parameter.support.structureCache.get(parameter.node);
+
+ if(result != null) {
+ // Return cached value immediately
+ procedure.execute(result);
+ } else {
+ NodeStructureRequest.Probe probe = new Probe(parameter);
+ parameter.support.manager.getRealm().asyncExec(probe);
+ if(probe.result != null) {
+ procedure.execute(probe.result);
+ } else {
+ procedure.execute(Variables.PENDING_NODE_STRUCTURE);
+ }
+ }
+
+ return;
+
+ }
+
+ // We need to listen
+ listener = procedure;
+ // Register listening
+ parameter.support.manager.addNodeListener(parameter.node, this);
+ synchronized(this) {
+ if(!wasRun) {
+ NodeStructure result = (NodeStructure)parameter.support.structureCache.get(parameter.node);
+ if(result != null) {
+ procedure.execute(result);
+ } else {
+ procedure.execute(Variables.PENDING_NODE_STRUCTURE);
+ }
+ }
+ }
+
+ }
+
+ static class NodeListener implements VariableNodeReadRunnable {
+
+ private VariableNode node;
+ private NodeStructureRequest request;
+
+ public NodeListener(VariableNode node, NodeStructureRequest request) {
+ this.node = node;
+ this.request = request;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void run() {
+ node.support.manager.addNodeListener(node.node, request);
+ }
+
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void unregistered() {
+ parameter.support.manager.removeNodeListener(parameter.node, this);
+ parameter.support.structureCache.removeListening(parameter.node);
+ listener = null;
+ }
+
+ @SuppressWarnings("unchecked")
+ public static NodeStructure get(VariableNode parameter) throws NodeManagerException {
+ List<?> children = parameter.support.manager.getChildren(parameter.node);
+ List<?> properties = parameter.support.manager.getProperties(parameter.node);
+ Map<String, Object> childMap = Collections.emptyMap();
+ Map<String, Object> propertyMap = childMap;
+ if(!children.isEmpty()) {
+ childMap = new THashMap<>(children.size());
+ for(Object o : children) {
+ String name = parameter.support.manager.getName(o);
+ childMap.put(name, o);
+ }
+ }
+ if(!properties.isEmpty()) {
+ propertyMap = new THashMap<>(properties.size());
+ for(Object o : properties) {
+ String name = parameter.support.manager.getName(o);
+ propertyMap.put(name, o);
+ }
+ }
+ return new NodeStructure(childMap, propertyMap);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public synchronized void run() {
+ try {
+ // Cache this value with infinite cache time since we are listening
+ NodeStructure newValue = get(parameter);
+ if (wasRun && ObjectUtils.objectEquals(value, newValue)) {
+ //System.out.println("CACHE VALUE MATCH (" + newValue + ") for " + node.node);
+ return;
+ }
+ value = newValue;
+ parameter.support.structureCache.put(parameter.node, value);
+ } catch (Throwable e) {
+ // Must catch everything to prevent DB client from getting stuck.
+ LOGGER.error("Error while computing node structure", e);
+ // Invoke the exception method of the listener
+ Listener<NodeStructure> listener = this.listener;
+ if (listener != null) {
+ listener.exception(new DatabaseException("External data access error", e));
+ wasRun = true;
+ }
+ return;
+ }
+
+ // Must always invoke an existing listener, regardless of earlier errors.
+ Listener<NodeStructure> listener = this.listener;
+ if (listener != null) {
+ listener.execute(value);
+ wasRun = true;
+ }
+ }
+
+ @Override
+ public String toString() {
+ return "NodeStructureRequest.run @ " + System.identityHashCode(this);
+ }
}
\ No newline at end of file
import org.simantics.databoard.util.ObjectUtils;
import org.simantics.db.ReadGraph;
import org.simantics.db.common.request.ParametrizedPrimitiveRead;
-import org.simantics.db.common.utils.Logger;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.procedure.Listener;
+import org.simantics.simulator.variable.NodeManager;
import org.simantics.simulator.variable.exceptions.NodeIsNotValidAnymoreException;
import org.simantics.simulator.variable.exceptions.NodeManagerException;
import org.simantics.utils.datastructures.Pair;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@SuppressWarnings("rawtypes")
class NodeValueRequest extends ParametrizedPrimitiveRead<Pair<VariableNode,Binding>, Variant> implements VariableNodeReadRunnable {
+ private static final Logger LOGGER = LoggerFactory.getLogger(NodeValueRequest.class);
+
private Listener<Variant> listener = null;
private Variant value = Variables.PENDING_NODE_VALUE;
private boolean wasRun = false;
static class Probe implements Runnable {
- private Pair<VariableNode,Binding> parameter;
- public Variant result;
-
- public Probe(Pair<VariableNode,Binding> parameter) {
- this.parameter = parameter;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void run() {
- try {
- result = NodeValueRequest.get(parameter);
- parameter.first.support.valueCache.put(parameter.first.node, result, 1000000000L);
- } catch (NodeManagerException e) {
- e.printStackTrace();
- } catch (BindingException e) {
- e.printStackTrace();
- }
- }
-
+ private Pair<VariableNode,Binding> parameter;
+ public Variant result;
+
+ public Probe(Pair<VariableNode,Binding> parameter) {
+ this.parameter = parameter;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void run() {
+ try {
+ result = NodeValueRequest.get(parameter);
+ parameter.first.support.valueCache.put(parameter.first.node, result, 1000000000L);
+ } catch (NodeManagerException e) {
+ e.printStackTrace();
+ } catch (BindingException e) {
+ e.printStackTrace();
+ }
+ }
+
}
-
+
public NodeValueRequest(VariableNode node) {
super(Pair.<VariableNode, Binding>make(node, null));
}
@SuppressWarnings("unchecked")
@Override
public void register(ReadGraph graph, final Listener<Variant> procedure) {
-
- VariableNode node = parameter.first;
+
+ VariableNode node = parameter.first;
if(procedure.isDisposed()) {
-
- // We are not listening
- Variant result = (Variant)node.support.valueCache.get(node.node);
- if(result != null) {
- // Return cached value immediately
- procedure.execute(result);
- } else {
+ // We are not listening
+ Variant result = (Variant)node.support.valueCache.get(node.node);
+
+ if(result != null) {
+ // Return cached value immediately
+ procedure.execute(result);
+ } else {
//
// listener = procedure;
// }
// }
// return;
-
- NodeValueRequest.Probe probe = new Probe(parameter);
- node.support.manager.getRealm().asyncExec(probe);
- if(probe.result != null) {
- procedure.execute(probe.result);
- } else {
- procedure.execute(Variables.PENDING_NODE_VALUE);
- }
-
- }
-
- return;
+
+ NodeValueRequest.Probe probe = new Probe(parameter);
+ node.support.manager.getRealm().asyncExec(probe);
+ if(probe.result != null) {
+ procedure.execute(probe.result);
+ } else {
+ procedure.execute(Variables.PENDING_NODE_VALUE);
+ }
+
+ }
+
+ return;
}
-
- // We need to listen
+
+ // We need to listen
listener = procedure;
- // Register listening
- node.support.manager.addNodeListener(node.node, this);
- synchronized(this) {
- if(wasRun) {
- procedure.execute(value);
- } else {
- Variant result = (Variant)node.support.valueCache.get(node.node);
- if(result != null) {
- procedure.execute(result);
- } else {
- procedure.execute(Variables.PENDING_NODE_VALUE);
- }
- }
- }
-
+ // Register listening
+ node.support.manager.addNodeListener(node.node, this);
+ synchronized(this) {
+ if(!wasRun) {
+ Variant result = (Variant)node.support.valueCache.get(node.node);
+ if(result != null) {
+ procedure.execute(result);
+ } else {
+ procedure.execute(Variables.PENDING_NODE_VALUE);
+ }
+ }
+ }
+
// if(listener != null) {
// throw new UnsupportedOperationException();
// }
// parameter.support.manager.addNodeListener(parameter.node, this);
// if(value == Variables.PENDING_NODE_VALUE) procedure.execute(Variables.PENDING_NODE_VALUE);
// }
-
+
}
-
+
static class NodeListener implements VariableNodeReadRunnable {
-
- private VariableNode node;
- private NodeValueRequest request;
-
- public NodeListener(VariableNode node, NodeValueRequest request) {
- this.node = node;
- this.request = request;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void run() {
+
+ private VariableNode node;
+ private NodeValueRequest request;
+
+ public NodeListener(VariableNode node, NodeValueRequest request) {
+ this.node = node;
+ this.request = request;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void run() {
node.support.manager.addNodeListener(node.node, request);
- }
-
+ }
+
}
@SuppressWarnings("unchecked")
@Override
public void unregistered() {
- VariableNode node = parameter.first;
- node.support.manager.removeNodeListener(node.node, this);
+ VariableNode node = parameter.first;
+ node.support.manager.removeNodeListener(node.node, this);
node.support.valueCache.removeListening(node.node);
listener = null;
}
-
+
@SuppressWarnings("unchecked")
public static Variant get(Pair<VariableNode,Binding> parameter) throws NodeManagerException, BindingException {
- VariableNode node = parameter.first;
- Binding binding = parameter.second;
-
- if (binding != null) {
- Object raw = node.support.manager.getValue(node.node, binding);
- if(raw == null) return null;
- else return new Variant(binding, raw);
- } else {
- return node.support.manager.getValue(node.node);
- }
-
+ VariableNode node = parameter.first;
+ Binding binding = parameter.second;
+
+ if (binding != null) {
+ Object raw = node.support.manager.getValue(node.node, binding);
+ if(raw == null)
+ return null;
+ else if(NodeManager.PENDING_NODE_VALUE == raw)
+ return NodeManager.PENDING_NODE_VALUE;
+ else return new Variant(binding, raw);
+ } else {
+ return node.support.manager.getValue(node.node);
+ }
+
}
-
+
@SuppressWarnings("unchecked")
@Override
public synchronized void run() {
-
- VariableNode node = parameter.first;
-
+
+ VariableNode node = parameter.first;
+
try {
- Variant newValue = get(parameter);
+ Variant newValue = get(parameter);
if (wasRun && ObjectUtils.objectEquals(value, newValue)) {
//System.out.println("CACHE VALUE MATCH (" + newValue + ") for " + node.node);
return;
} catch (Throwable e) {
// Must catch everything to prevent DB client from getting stuck.
if(!(e instanceof NodeIsNotValidAnymoreException))
- Logger.defaultLogError(e);
+ LOGGER.error("Error while computing node value", e);
// Invoke the exception method of the listener
Listener<Variant> listener = this.listener;
- if (listener != null) listener.exception(new DatabaseException("External data access error", e));
- wasRun = true;
+ if (listener != null) {
+ listener.exception(new DatabaseException("External data access error", e));
+ wasRun = true;
+ }
return;
}
// Must always invoke an existing listener, regardless of earlier errors.
if (listener != null) {
//System.out.println("LISTENER " + listener + " invoked with value " + value);
listener.execute(value);
+ wasRun = true;
}
- wasRun = true;
}
@Override
import org.simantics.db.exception.DatatypeNotFoundException;
import org.simantics.db.exception.ValidationException;
import org.simantics.db.layer0.exception.InvalidVariableException;
+import org.simantics.db.layer0.exception.MissingVariableException;
import org.simantics.db.layer0.exception.MissingVariableValueException;
import org.simantics.db.layer0.exception.PendingVariableException;
import org.simantics.db.layer0.function.All;
@Override
public String getPossibleLabel(ReadGraph graph) throws DatabaseException {
+ if (property.predicate == null)
+ return null;
return graph.getPossibleRelatedValue2(property.predicate, graph.getService(Layer0.class).HasLabel, parent, Bindings.STRING);
}
@Override
public String getLabel(ReadGraph graph) throws DatabaseException {
+ if (property.predicate == null)
+ throw new NoPredicateResourceException("No predicate resource for property " + getName(graph));
return graph.getRelatedValue2(property.predicate, graph.getService(Layer0.class).HasLabel, parent, Bindings.STRING);
}
if(Development.DEVELOPMENT) {
if(Development.<Boolean>getProperty(DevelopmentKeys.L0_VALIDATION, Bindings.BOOLEAN)) {
- String error = L0Validations.checkValueType(graph, parentResource, property.predicate);
- if(error != null) {
- LOGGER.error(error);
- throw new ValidationException(error);
+ if (property.predicate != null) {
+ String error = L0Validations.checkValueType(graph, parentResource, property.predicate);
+ if(error != null) {
+ LOGGER.error(error);
+ throw new ValidationException(error);
+ }
}
}
}
if(Development.DEVELOPMENT) {
if(Development.<Boolean>getProperty(DevelopmentKeys.L0_VALIDATION, Bindings.BOOLEAN)) {
- String error = L0Validations.checkValueType(graph, parentResource, property.predicate);
- if(error != null) {
- LOGGER.error(error);
- throw new ValidationException(error);
+ if (property.predicate != null) {
+ String error = L0Validations.checkValueType(graph, parentResource, property.predicate);
+ if(error != null) {
+ LOGGER.error(error);
+ throw new ValidationException(error);
+ }
}
}
}
if(Development.DEVELOPMENT) {
if(Development.<Boolean>getProperty(DevelopmentKeys.L0_VALIDATION, Bindings.BOOLEAN)) {
- String error = L0Validations.checkValueType(graph, parentResource, property.predicate);
- if(error != null) {
- LOGGER.error(error);
- throw new ValidationException(error);
+ if (property.predicate != null) {
+ String error = L0Validations.checkValueType(graph, parentResource, property.predicate);
+ if(error != null) {
+ LOGGER.error(error);
+ throw new ValidationException(error);
+ }
}
}
}
if(Development.DEVELOPMENT) {
if(Development.<Boolean>getProperty(DevelopmentKeys.L0_VALIDATION, Bindings.BOOLEAN)) {
- String error = L0Validations.checkValueType(graph, parentResource, property.predicate);
- if(error != null) {
- LOGGER.error(error);
- throw new ValidationException(error);
+ if (property.predicate != null) {
+ String error = L0Validations.checkValueType(graph, parentResource, property.predicate);
+ if(error != null) {
+ LOGGER.error(error);
+ throw new ValidationException(error);
+ }
}
}
}
@Override
public Variable getPredicate(ReadGraph graph) throws DatabaseException {
+ if (property.predicate == null)
+ throw new MissingVariableException("No predicate for property " + getName(graph));
return Variables.getVariable(graph, graph.getURI(property.predicate));
}
@Override
public Resource getPredicateResource(ReadGraph graph) throws DatabaseException {
+ if (property.predicate == null)
+ throw new NoPredicateResourceException("No predicate for property " + getName(graph));
return property.predicate;
}
import org.simantics.db.common.request.PossibleIndexRoot;
import org.simantics.db.common.request.TernaryRead;
import org.simantics.db.common.utils.CommonDBUtils;
-import org.simantics.db.common.utils.Logger;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.exception.InvalidVariableException;
import org.simantics.db.layer0.exception.MissingVariableException;
import org.simantics.scl.runtime.function.Function2;
import org.simantics.scl.runtime.function.Function3;
import org.simantics.simulation.ontology.SimulationResource;
+import org.simantics.simulator.variable.NodeManager;
import org.simantics.simulator.variable.exceptions.NodeManagerException;
import org.simantics.utils.datastructures.Pair;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import gnu.trove.map.hash.TObjectIntHashMap;
final public class Variables {
- public static final Variant PENDING_NODE_VALUE = new Variant();
+ private static final Logger LOGGER = LoggerFactory.getLogger(Variables.class);
+
+ public static final Variant PENDING_NODE_VALUE = NodeManager.PENDING_NODE_VALUE;
public static final NodeStructure PENDING_NODE_STRUCTURE = new NodeStructure(Collections.emptyMap(), Collections.emptyMap()) {
public boolean equals(Object object) {
@Deprecated
public final static String[] builtins = {
- TYPE, RESOURCE, URI
- //, SERIALISED
+ TYPE, RESOURCE, URI
+ //, SERIALISED
};
public static Variable getPossibleVariable(ReadGraph graph, Resource resource) throws DatabaseException {
public static Variable getRootVariable(ReadGraph graph) throws DatabaseException {
return graph.adapt(graph.getRootLibrary(), Variable.class);
}
-
+
public static Resource getPossibleIndexRoot(ReadGraph graph, Variable variable) throws DatabaseException {
- return graph.syncRequest(new PossibleVariableIndexRoot(variable));
+ return graph.syncRequest(new PossibleVariableIndexRoot(variable));
}
-
+
public static Resource getIndexRoot(ReadGraph graph, Variable variable) throws DatabaseException {
- return graph.syncRequest(new VariableIndexRoot(variable));
+ return graph.syncRequest(new VariableIndexRoot(variable));
}
-
+
public static Resource getModel(ReadGraph graph, Variable variable) throws DatabaseException {
String URI = variable.getURI(graph);
return VariablesImpl.getFirst(graph, SimulationResource.getInstance(graph).Model, URI, 8);
Variable context = getConfigurationContext(graph, resource);
return context.browse(graph, RVI);
}
-
+
public static Variable getConfigurationVariable(ReadGraph graph, Variable variable) throws DatabaseException {
Variable context = getConfigurationContext(graph, variable);
RVI rvi = variable.getRVI(graph);
}
public static Variable toPossibleConfigurationVariable(ReadGraph graph, Variable variable) throws DatabaseException {
-
+
Resource represents = variable.getPossibleRepresents(graph);
if(represents == null) return null;
Resource config = getPossibleConfigurationContextResource(graph, represents);
if(config == null) return null;
- return switchPossibleContext(graph, variable, config);
+ return switchPossibleContext(graph, variable, config);
}
}
public static Variant requestNodeValue(ReadGraph graph, VariableNode<?> node, final Binding binding) throws DatabaseException {
- Variant value = graph.syncRequest(new NodeValueRequest(node, binding));
- if(PENDING_NODE_VALUE == value && graph.getSynchronous()) {
- // In this case a PENDING value was previously cached but now the value needs to be obtained for real.
-
- ValueGetter getter = new ValueGetter(node, binding);
- try {
- node.support.manager.getRealm().syncExec(getter);
- } catch (InterruptedException e) {
- Logger.defaultLogError(e);
- }
-
- if (getter.exception != null)
- throw new MissingVariableValueException("No value for node " + node, getter.exception);
-
- return getter.result;
- }
+ Variant value = graph.syncRequest(new NodeValueRequest(node, binding));
+ if(PENDING_NODE_VALUE == value && graph.getSynchronous()) {
+ // In this case a PENDING value was previously cached but now the value needs to be obtained for real.
+
+ ValueGetter getter = new ValueGetter(node, binding);
+ try {
+ node.support.manager.getRealm().syncExec(getter);
+ } catch (InterruptedException e) {
+ LOGGER.error("Error while getting node value", e);
+ throw new InvalidVariableException("External data access error " + String.valueOf(node), e);
+ }
+
+ if (getter.exception != null)
+ throw new MissingVariableValueException("No value for node " + node, getter.exception);
+
+ return getter.result;
+ }
return value;
}
-
+
public static class NodeStructure {
// Immutable but wrapped with Collections.unmodifiableMap as an optimization
public final Map<String,Object> children;
NodeStructure value = graph.syncRequest(new NodeStructureRequest(node));
if (value == null)
throw new InvalidVariableException("External data access error " + String.valueOf(node));
- if(PENDING_NODE_STRUCTURE == value && graph.getSynchronous()) {
- // In this case a PENDING value was previously cached but now the value needs to be obtained for real.
-
- StructureGetter getter = new StructureGetter(node);
- try {
- node.support.manager.getRealm().syncExec(getter);
- } catch (InterruptedException e) {
- Logger.defaultLogError(e);
- throw new InvalidVariableException("External data access error " + String.valueOf(node), e);
- }
-
- if (getter.exception != null)
- throw new InvalidVariableException("External data access error " + String.valueOf(node), getter.exception);
- if (getter.result == null)
- throw new InvalidVariableException("External data access error " + String.valueOf(node));
-
- return getter.result;
-
- }
+ if(PENDING_NODE_STRUCTURE == value && graph.getSynchronous()) {
+ // In this case a PENDING value was previously cached but now the value needs to be obtained for real.
+
+ StructureGetter getter = new StructureGetter(node);
+ try {
+ node.support.manager.getRealm().syncExec(getter);
+ } catch (InterruptedException e) {
+ LOGGER.error("Error while getting node structure", e);
+ throw new InvalidVariableException("External data access error " + String.valueOf(node), e);
+ }
+
+ if (getter.exception != null)
+ throw new InvalidVariableException("External data access error " + String.valueOf(node), getter.exception);
+ if (getter.result == null)
+ throw new InvalidVariableException("External data access error " + String.valueOf(node));
+
+ return getter.result;
+
+ }
return value;
}
-
+
public static String getPossibleUnit(ReadGraph graph, Variable variable) throws DatabaseException {
-
- try {
-
- Resource predicate = variable.getPossiblePredicateResource(graph);
- if(predicate != null) {
- PropertyInfo info = graph.syncRequest(new PropertyInfoRequest(predicate));
- if(info.definedUnit != null) return info.definedUnit;
- }
-
- Variant variant = variable.getVariantValue(graph);
- Binding binding = variant.getBinding();
- if(binding == null) return null;
- Datatype dt = binding.type();
- if(!(dt instanceof NumberType)) return null;
- NumberType nt = (NumberType)dt;
- return nt.getUnit();
-
- } catch (DatabaseException e) {
- return null;
- }
-
+
+ try {
+
+ Resource predicate = variable.getPossiblePredicateResource(graph);
+ if(predicate != null) {
+ PropertyInfo info = graph.syncRequest(new PropertyInfoRequest(predicate));
+ if(info.definedUnit != null) return info.definedUnit;
+ }
+
+ Variant variant = variable.getVariantValue(graph);
+ Binding binding = variant.getBinding();
+ if(binding == null) return null;
+ Datatype dt = binding.type();
+ if(!(dt instanceof NumberType)) return null;
+ NumberType nt = (NumberType)dt;
+ return nt.getUnit();
+
+ } catch (DatabaseException e) {
+ return null;
+ }
+
}
/**
result = new Variant(binding, n.support.manager.getValue(n.node, binding));
else
result = n.support.manager.getValue(n.node);
+ } catch (NodeManagerException e) {
+ exception = e;
} catch (Exception e) {
- Logger.defaultLogError(e);
+ LOGGER.error("Error while getting node value", e);
exception = e;
}
}
try {
result = NodeStructureRequest.get(n);
} catch (NodeManagerException e) {
- Logger.defaultLogError(e);
exception = e;
}
- }
+ }
};
Variable v = Variables.getPossibleVariable(graph, entity);
return v != null ? v.getPossibleProperty(graph, property) : null;
}
-
- public static ValueAccessor createValueAccessor(Function1<Variable, Object> getValue1, Function2<Variable, Binding, Object> getValue2,
- Function2<Variable, Object, Object> setValue2, Function3<Variable, Object, Binding, Object> setValue3,
- Function1<Variable, Datatype> getDatatype) {
- return new SCLValueAccessor(getValue1, getValue2, setValue2, setValue3, getDatatype);
- }
+
+ public static ValueAccessor createValueAccessor(Function1<Variable, Object> getValue1, Function2<Variable, Binding, Object> getValue2,
+ Function2<Variable, Object, Object> setValue2, Function3<Variable, Object, Binding, Object> setValue3,
+ Function1<Variable, Datatype> getDatatype) {
+ return new SCLValueAccessor(getValue1, getValue2, setValue2, setValue3, getDatatype);
+ }
public static void setRVIProperty(WriteGraph graph, Variable variable, RVI rvi) throws DatabaseException {
Layer0 L0 = Layer0.getInstance(graph);
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.db.management,
org.simantics.db.management.discovery
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.simantics.db.management
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.db.procore
Bundle-Version: 1.2.1.qualifier
Bundle-Vendor: VTT Technical Research Centre of Finland
-Require-Bundle: org.apache.log4j;visibility:=reexport,
- org.simantics.db;bundle-version="0.8.0";visibility:=reexport,
+Require-Bundle: org.simantics.db;bundle-version="0.8.0";visibility:=reexport,
org.simantics.db.common;bundle-version="0.8.0";visibility:=reexport,
gnu.trove3;bundle-version="3.0.0",
org.simantics.db.impl;bundle-version="0.8.0",
org.simantics.db.server,
org.simantics.fastlz,
org.simantics.graph.db
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Service-Component: OSGI-INF/org.simantics.db.procore.ProCoreDriver.xml, OSGI-INF/org.simantics.db.procore.internal.ProCoreDriverVirtual.xml
Automatic-Module-Name: org.simantics.db.procore
ArrayList<CollectorCluster> toRelease = new ArrayList<CollectorCluster>();
for (CollectorCluster cluster : support.getResidentClusters()) {
- target -= support.getClusterSize(cluster);
- if (target > 0) {
- toRelease.add(cluster);
- } else {
+ toRelease.add(cluster);
+ long clusterSize = support.getClusterSize(cluster);
+ //System.err.println("release cluster with " + (clusterSize/1024) + " kiB - " + cluster);
+ target -= clusterSize;
+ if (target <= 0) {
break;
}
}
import org.simantics.scl.runtime.function.FunctionImpl3;
import org.simantics.utils.Development;
import org.simantics.utils.FileUtils;
+import org.slf4j.LoggerFactory;
import gnu.trove.map.hash.TIntIntHashMap;
import gnu.trove.procedure.TIntIntProcedure;
public class DebugSupportImpl implements DebugSupport {
+ private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(DebugSupportImpl.class);
+
final private Map<String, Function2<WriteGraph, String, Object>> getCommands = new HashMap<String, Function2<WriteGraph, String, Object>>();
final private Map<String, Function3<WriteGraph, File, String, String>> listCommands = new HashMap<String, Function3<WriteGraph, File, String, String>>();
final private Map<String, Function2<WriteGraph, String, String>> execCommands = new HashMap<String, Function2<WriteGraph, String, String>>();
});
+ listCommands.put("queryData", new FunctionImpl3<WriteGraph, File, String, String>() {
+
+ @Override
+ public String apply(WriteGraph graph, File file, String args) {
+ try {
+ getSession(graph).queryProvider2.save();
+ return "Saved queries";
+ } catch (IOException e) {
+ LOGGER.error("Error while saving queries", e);
+ return e.getMessage();
+ }
+ }
+
+ });
+
listCommands.put("queryActivity", new FunctionImpl3<WriteGraph, File, String, String>() {
@Override
public int getId(T t) {
return backend.get(t);
}
-
+
}
\ No newline at end of file
import org.simantics.db.procedure.AsyncContextMultiProcedure;
import org.simantics.db.procedure.AsyncMultiProcedure;
import org.simantics.db.request.ExternalRead;
+import org.simantics.db.request.Read;
import org.simantics.db.service.QueryControl;
import org.simantics.utils.DataContainer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class QueryControlImpl implements QueryControl {
-
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(QueryControlImpl.class);
+
final private SessionImplSocket session;
QueryControlImpl(SessionImplSocket session) {
});
} catch (DatabaseException e) {
- e.printStackTrace();
+ LOGGER.error("query flush failed", e);
}
return result.get();
}
}
});
} catch (DatabaseException e) {
- e.printStackTrace();
+ LOGGER.error("query gc failed", e);
}
}
ReadGraphImpl impl = (ReadGraphImpl)graph;
return impl.withParent(null, null, false);
}
+
+ @Override
+ public <T> T syncRequestIndependent(ReadGraph graph, Read<T> request) throws DatabaseException {
+ ReadGraphImpl independent = ((ReadGraphImpl)graph).withParent(null, null, false);
+ independent.asyncBarrier.inc();
+ try {
+ return independent.syncRequest(request);
+ } finally {
+ independent.asyncBarrier.dec();
+ }
+ }
@Override
public boolean hasParentRequest(ReadGraph graph) {
import java.util.Collection;
import java.util.function.Consumer;
+import org.simantics.db.ObjectResourceIdMap;
import org.simantics.db.Resource;
import org.simantics.db.Session;
import org.simantics.db.Statement;
public ResourceSupport getSupport() {
return resourceSupport;
}
-
+
+ @Override
+ public ClusterSupport getClusterSupport() {
+ return clusterSupport;
+ }
+
+ @Override
+ public ObjectResourceIdMap<String> createChildMap() {
+ return new ObjectResourceMap<String>(session);
+ }
+
@Override
public Statement getStatement(int s, int p, int o) {
return getStatement(null, s, p, o);
import org.simantics.db.SessionReference;
import org.simantics.db.VirtualGraph;
import org.simantics.db.authentication.UserAuthenticationAgent;
-import org.simantics.db.common.utils.Logger;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.exception.InvalidAuthenticationException;
import org.simantics.db.exception.InvalidUserException;
import org.simantics.db.impl.query.QueryProcessor;
import org.simantics.db.impl.query.QuerySupport;
import org.simantics.db.service.ServerInformation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
final public class SessionImplDb extends SessionImplSocket {
+ private static final Logger LOGGER = LoggerFactory.getLogger(SessionImplDb.class);
+
/**
* Cached ServerInformation structure fetched from the server at connection
* time. It should never change during a single session and therefore it
try {
newId = cluster.createResource(clusterTranslator);
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("createResource failed", e);
return null;
}
return new ResourceImpl(resourceSupport, newId);
serviceLocator.registerService(QuerySupport.class, querySupport);
queryProvider2 = new QueryProcessor(getAmountOfQueryThreads(), querySupport, sessionThreads);
+
+ if("true".equals(System.getProperty("org.simantics.db.persistQueries")))
+ queryProvider2.restore();
writeSupport = new WriteSupportImpl(this);
serviceLocator.registerService(WriteSupport.class, writeSupport);
// clusterTable.dispose(); clusterTable = null;
// throw e;
} catch (Throwable e) {
- e.printStackTrace();
- Logger.defaultLogError("Unhandled error. See exception for details.", e);
+ LOGGER.error("Unhandled error. See exception for details.", e);
graphSession = null;
clusterTable.dispose(); clusterTable = null;
throw new Exception(e);
try {
getClusterTable().refresh(csid, this, clusterUID);
} catch (Throwable t) {
- Logger.defaultLogError("Refesh failed.", t);
+ LOGGER.error("refresh({}, {}) failed", thread, csid, t);
}
}
});
assert (null != writer);
-// writer.state.barrier.inc();
+ writer.asyncBarrier.inc();
try {
request.perform(writer);
assert (null != writer);
} catch (Throwable t) {
if (!(t instanceof CancelTransactionException))
- Logger.defaultLogError("Write transaction caused an unexpected error, see exception.", t);
+ LOGGER.error("Write transaction caused an unexpected error, see exception.", t);
writeState.except(t);
} finally {
-// writer.state.barrier.dec();
+ writer.asyncBarrier.dec();
// writer.waitAsync(request);
}
// Log it first, just to be safe that the error is always logged.
if (!(e instanceof CancelTransactionException))
- Logger.defaultLogError("Write transaction caused an unexpected error, see exception.", e);
+ LOGGER.error("Write transaction caused an unexpected error, see exception.", e);
// writeState.getGraph().state.barrier.dec();
// writeState.getGraph().waitAsync(request);
VirtualGraph vg = getProvider(request.getProvider());
WriteGraphImpl writer = WriteGraphImpl.create(getQueryProvider2(), writeSupport, vg);
- try {
- WriteState<T> writeStateT = new WriteState<T>(writer, request, notify, procedure);
- writeState = writeStateT;
+ WriteState<T> writeStateT = new WriteState<T>(writer, request, notify, procedure);
+ writeState = writeStateT;
+ assert (null != writer);
- assert (null != writer);
-// writer.state.barrier.inc();
+ try {
+ writer.asyncBarrier.inc();
writeStateT.setResult(request.perform(writer));
assert (null != writer);
-
-// writer.state.barrier.dec();
-// writer.waitAsync(null);
-
} catch (Throwable e) {
-
-// writer.state.barrier.dec();
-// writer.waitAsync(null);
-
writeState.except(e);
-
-// state.stopWriteTransaction(clusterStream);
-//
-// } catch (Throwable e) {
-// // Log it first, just to be safe that the error is always logged.
-// Logger.defaultLogError("Write transaction caused an unexpected error, see exception.", e);
-//
-// try {
-// // Callback is client code, we have to be prepared for it to throw unexpected exceptions.
-// // All we can do here is to log those, can't really pass them anywhere.
-// if (procedure != null) {
-// if(e instanceof DatabaseException) procedure.exception((DatabaseException)e);
-// else procedure.exception(new DatabaseException(e));
-// }
-// } catch (Throwable e2) {
-// Logger.defaultLogError("Write request callback caused an unexpected error, see exception.", e2);
-// }
-//
-// clientChanges = new ClientChangesImpl(SessionImplSocket.this);
-//
-// state.stopWriteTransaction(clusterStream);
-
} finally {
+ writer.asyncBarrier.dec();
fireSessionVariableChange(SessionVariables.QUEUED_WRITES);
}
-// if(notify != null) notify.release();
-
task.finish();
}
if (t instanceof DatabaseException) callback.accept((DatabaseException) t);
else callback.accept(new DatabaseException(t));
} else
- Logger.defaultLogError("Unhandled exception", t);
+ LOGGER.error("Unhandled exception", t);
}
};
callback.exception(new DatabaseException(e));
state.stopWriteTransaction(clusterStream);
- Logger.defaultLogError("Write transaction caused an unexpected error, see exception.", e);
+ LOGGER.error("Write transaction caused an unexpected error, see exception.", e);
} finally {
if(throwable != null) {
throwable.set(th);
} else {
- Logger.defaultLogError("Unhandled exception", th);
+ LOGGER.error("Unhandled exception", th);
}
}
if(throwable != null) {
throwable.set(t);
} else {
- Logger.defaultLogError("Unhandled exception", t);
+ LOGGER.error("Unhandled exception", t);
}
try {
if(throwable != null) {
throwable.set(t2);
} else {
- Logger.defaultLogError("Unhandled exception", t2);
+ LOGGER.error("Unhandled exception", t2);
}
}
ITask task = ThreadLogger.task(request);
final ReadGraphImpl newGraph = ReadGraphImpl.create(getQueryProvider2());
+ newGraph.asyncBarrier.inc();
try {
} finally {
+ newGraph.asyncBarrier.dec();
+
fireSessionVariableChange(SessionVariables.QUEUED_READS);
}
return;
WriteGraphImpl reactionGraph = WriteGraphImpl.create(graph.processor, writeSupport, null);
+ reactionGraph.asyncBarrier.inc();
try {
} finally {
+ reactionGraph.asyncBarrier.dec();
+
}
} catch (Throwable t) {
*/
@SuppressWarnings("unchecked")
@Override
- public synchronized <T> T peekService(Class<T> api) {
-
- if(serviceKey1 == api) {
- return (T)service1;
- } else if (serviceKey2 == api) {
- // Promote this key
- Object result = service2;
- service2 = service1;
- serviceKey2 = serviceKey1;
- service1 = result;
- serviceKey1 = api;
- return (T)result;
- }
+ public <T> T peekService(Class<T> api) {
+ if (Layer0.class == api)
+ return (T) L0;
- if (Layer0.class == api)
- return (T) L0;
- if (ServerInformation.class == api)
- return (T) getCachedServerInformation();
- else if (WriteGraphImpl.class == api)
- return (T) writeState.getGraph();
- else if (ClusterBuilder.class == api)
- return (T)new ClusterBuilderImpl(this, (WriteOnlySupport)writeState.getGraph().writeSupport);
- else if (ClusterBuilderFactory.class == api)
- return (T)new ClusterBuilderFactoryImpl(this);
+ synchronized (this) {
+ if (serviceKey1 == api) {
+ return (T) service1;
+ }
+ if (serviceKey2 == api) {
+ // Promote this key
+ Object result = service2;
+ service2 = service1;
+ serviceKey2 = serviceKey1;
+ service1 = result;
+ serviceKey1 = api;
+ return (T)result;
+ }
- service2 = service1;
- serviceKey2 = serviceKey1;
+ if (ServerInformation.class == api)
+ return (T) getCachedServerInformation();
+ else if (WriteGraphImpl.class == api)
+ return (T) writeState.getGraph();
+ else if (ClusterBuilder.class == api)
+ return (T)new ClusterBuilderImpl(this, (WriteOnlySupport)writeState.getGraph().writeSupport);
+ else if (ClusterBuilderFactory.class == api)
+ return (T)new ClusterBuilderFactoryImpl(this);
- service1 = serviceLocator.peekService(api);
- serviceKey1 = api;
+ service2 = service1;
+ serviceKey2 = serviceKey1;
- return (T)service1;
+ service1 = serviceLocator.peekService(api);
+ serviceKey1 = api;
+ return (T)service1;
+ }
}
/*
try {
h.valuesChanged(ctx);
} catch (Exception e) {
- Logger.defaultLogError("monitor handler notification produced the following exception", e);
+ LOGGER.error("monitor handler notification produced the following exception", e);
} catch (LinkageError e) {
- Logger.defaultLogError("monitor handler notification produced a linkage error", e);
+ LOGGER.error("monitor handler notification produced a linkage error", e);
}
}
}
state.setCombine(false);
}
+ @SuppressWarnings("unchecked")
+ @Override
+ public <T> T l0() {
+ return (T) L0;
+ }
+
}
import org.simantics.db.ServerI;
import org.simantics.db.VirtualGraph;
import org.simantics.db.authentication.UserAuthenticationAgent;
-import org.simantics.db.common.utils.Logger;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.exception.InvalidAuthenticationException;
import org.simantics.db.exception.InvalidUserException;
import org.simantics.db.impl.VirtualGraphImpl;
import org.simantics.db.impl.query.QueryProcessor;
import org.simantics.db.service.ServerInformation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import fi.vtt.simantics.procore.BackdoorAuthenticator;
import fi.vtt.simantics.procore.ProCoreServerReference;
import fi.vtt.simantics.procore.SessionManagerSource;
public class SessionImplVirtual extends SessionImplSocket {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(SessionImplVirtual.class);
+
protected VirtualGraphImpl virtualGraphImpl;
public SessionImplVirtual(UserAuthenticationAgent authAgent)
throws DatabaseException {
} catch (InvalidUserException e) {
throw e;
} catch (IOException e) {
- Logger.defaultLogError("I/O error. See exception for details.", e);
+ LOGGER.error("I/O error. See exception for details.", e);
graphSession = null;
throw new DatabaseException(e);
} catch (Throwable e) {
- e.printStackTrace();
- Logger.defaultLogError("Unhandled error. See exception for details.", e);
+ LOGGER.error("Unhandled error. See exception for details.", e);
graphSession = null;
throw new DatabaseException(e);
}
try {
return gs.getServerInformation();
} catch (DatabaseException e) {
- Logger.defaultLogError("Failed to get server info.", e);
+ LOGGER.error("Failed to get server info.", e);
return null;
}
}
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.exception.InternalException;
import org.simantics.db.exception.RuntimeDatabaseException;
+import org.simantics.db.impl.graph.ReadGraphImpl;
import org.simantics.db.impl.graph.WriteGraphImpl;
import org.simantics.db.impl.query.QueryProcessor;
import org.simantics.db.request.WriteOnly;
// start = System.nanoTime();
queryProvider.propagateChangesInQueryCache(graph);
- queryProvider.listening.fireListeners(graph);
+ ReadGraphImpl listenerGraph = graph.forRecompute(null);
+ listenerGraph.asyncBarrier.inc();
+ queryProvider.listening.fireListeners(listenerGraph);
+ listenerGraph.asyncBarrier.dec();
// duration = System.nanoTime() - start;
// System.out.println("performScheduledUpdates " + 1e-9*duration + "s. ");
import org.simantics.db.WriteGraph;
import org.simantics.db.common.MetadataUtils;
import org.simantics.db.common.exception.DebugException;
-import org.simantics.db.common.utils.Logger;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.exception.ImmutableException;
import org.simantics.db.exception.ServiceException;
import org.simantics.db.request.WriteResult;
import org.simantics.db.request.WriteTraits;
import org.simantics.db.service.ByteReader;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class WriteSupportImpl implements WriteSupport {
+ private static final Logger LOGGER = LoggerFactory.getLogger(WriteSupportImpl.class);
+
final private SessionImplSocket session;
final private QueryProcessor queryProcessor;
final private State state;
try {
addSetValue(((ResourceImpl) resource).id, value, value.length);
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("writeOnly setValue({}, {}, byte[{}]) failed", provider, resource, value.length, e);
}
}
} else {
try {
addSetValue(((ResourceImpl) resource).id, value, value.length);
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("setValue({}, {}, byte[{}]) failed", provider, resource, value.length, e);
}
}
queryProcessor.releaseWrite(session.writeState.getGraph());
try {
cluster.removeValue(key, session.clusterTranslator);
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("denyValue({}, {}) failed", provider, resource, e);
return;
}
queryProcessor.updateValue(key);
if (null != c && c != cluster)
session.clusterTable.replaceCluster(c);
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("claimImpl({}, {}, {}) failed", subject, predicate, object, e);
throw new RuntimeException(e);
}
queryProcessor.updateStatements(subject, predicate);
if (null != c && c != cluster)
session.clusterTable.replaceCluster(c);
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("claimImpl2({}, {}, {}) failed", subject, predicate, object, e);
}
if (cluster.isWriteOnly())
return;
try {
cluster.denyRelation(subject, predicate, object, session.clusterTranslator);
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("removeStatement({}, {}, {}) failed", subject, predicate, object, e);
return false;
}
queryProcessor.updateStatements(subject, predicate);
package fi.vtt.simantics.procore.internal;
+import java.io.IOException;
+
import org.simantics.db.Database;
import org.simantics.db.Resource;
import org.simantics.db.Session;
ClusterImpl clusterImpl = session.clusterTable.getClusterByClusterUIDOrMakeProxy(clusterUID);
return clusterImpl.isLoaded();
}
-
+
+ @Override
+ public void saveQueries() throws DatabaseException {
+ try {
+ session.queryProvider2.save();
+ } catch (IOException e) {
+ throw new DatabaseException(e);
+ }
+ }
+
}
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>\r
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
- <classpathentry kind="src" path="src"/>\r
- <classpathentry kind="output" path="bin"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
-eclipse.preferences.version=1\r
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled\r
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8\r
-org.eclipse.jdt.core.compiler.compliance=1.8\r
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error\r
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error\r
-org.eclipse.jdt.core.compiler.source=1.8\r
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Vendor: VTT Technical Research Centre of Finland
Export-Package: org.simantics.db.server,
org.simantics.db.server.internal
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Import-Package: gnu.trove.impl.hash,
gnu.trove.iterator,
gnu.trove.map.hash,
- org.apache.log4j,
- org.apache.log4j.spi,
org.eclipse.core.runtime,
org.osgi.framework;version="1.3.0",
org.simantics.db,
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.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.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Require-Bundle: org.eclipse.core.runtime,
gnu.trove3,
org.simantics.layer0x.ontology;bundle-version="1.0.0",
- org.slf4j.api;bundle-version="1.7.25",
+ org.slf4j.api,
org.simantics.utils;bundle-version="1.1.0",
org.simantics.db;bundle-version="1.1.0",
org.simantics.scl.reflection,
Bundle-ClassPath: .
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.simantics.db.services.internal.Activator
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.simantics.db.services
import org.simantics.db.adaption.Adapter;
import org.simantics.db.adaption.AdapterInstaller;
import org.simantics.db.adaption.AdaptionService;
-import org.simantics.db.common.request.ReadRequest;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.request.Read;
import org.simantics.db.services.adaption.reflection.AdaptingDynamicAdapter2;
}
private static void handleException(Exception e, String fileName) {
- System.err.println("At " + fileName);
- e.printStackTrace();
+ LOGGER.error("At {}", fileName, e);
}
private void handleException(Exception e, AdapterInstaller installer) {
String desc = installerSources.get(installer);
- if (desc != null)
- System.err.println("At " + desc);
- e.printStackTrace();
+ LOGGER.error("At {}, installer {}", desc, installer, e);
}
private void handleAdaptersDocument(Loader b, Document doc, String fileName) {
}, fileName);
} catch (Exception e) {
- e.printStackTrace();
handleException(e, fileName);
}
}
NamedNodeMap attr = n.getAttributes();
IDynamicAdapter2 da = null;
if(n.getNodeName().equals("this"))
- da = new ThisResource2();
+ da = ThisResource2.INSTANCE;
else if(n.getNodeName().equals("graph"))
- da = new GraphObject2();
+ da = GraphObject2.INSTANCE;
else if(n.getNodeName().equals("bundle")) {
String bundleId = null;
Node fc = n.getFirstChild();
public class GraphObject2 implements IDynamicAdapter2 {
+ public static final IDynamicAdapter2 INSTANCE = new GraphObject2();
+
@Override
public Class<?> getType() {
return ReadGraph.class;
public class ThisResource2 implements IDynamicAdapter2 {
+ public static IDynamicAdapter2 INSTANCE = new ThisResource2();
+
@Override
public Class<?> getType() {
return Resource.class;
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry excluding="org/simantics/db/testing/common/GenerateTest2.java" kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.db.testing
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Semantum Oy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.db.layer0;bundle-version="1.1.0",
org.simantics.graph.db;bundle-version="1.1.5";visibility:=reexport,
org.simantics.project;bundle-version="1.0.1";visibility:=reexport,
org.junit;bundle-version="4.12.0",
org.simantics.db.server,
org.apache.commons.math3,
- org.slf4j.api;bundle-version="1.7.25"
+ org.slf4j.api
Export-Package: org.simantics.db.testing.annotation,
org.simantics.db.testing.base,
org.simantics.db.testing.cases,
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.scl.runtime;bundle-version="0.1.4",
org.eclipse.osgi,
org.eclipse.core.runtime
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Activator: org.simantics.db.internal.Activator
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.simantics.db
*******************************************************************************/
package org.simantics.db;
-
-
final public class RelationInfo {
public static final RelationInfo[] NONE = new RelationInfo[0];
this.isFinal = isFinal;
this.isAsserted = isAsserted;
}
-
+
@Override
public String toString() {
return "RelationInfo[predicate=" + predicate + ", isFunctional=" + isFunctional + ", isFinal=" + isFinal + ", isAsserted=" + isAsserted + "]";
* @see MergingGraphRequestProcessor
* @see AsyncRequestProcessor
*/
-public interface RequestProcessor extends RequestProcessorSpecific, ServiceLocator {
+public interface RequestProcessor extends RequestProcessorSpecific, ServiceLocator, ResourceLocator {
Resource getRootLibrary();
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2020 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * 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:
+ * Semantum Oy - initial API and implementation
+ *******************************************************************************/
+package org.simantics.db;
+
+/**
+ * @author Tuukka Lehtonen
+ * @since 1.43.0
+ */
+public interface ResourceLocator {
+
+ /**
+ * Layer0 is an integral part of Simantics database modelling and for performance
+ * reasons deserves simplest possible access to its resource class.
+ *
+ * @return returns the internally cached
+ * <code>org.simantics.layer0.Layer0</code> instance
+ */
+ public <T> T l0();
+
+}
import org.simantics.db.ReadGraph;
import org.simantics.db.Resource;
import org.simantics.db.WriteGraph;
+import org.simantics.db.exception.DatabaseException;
import org.simantics.db.procedure.AsyncContextMultiProcedure;
import org.simantics.db.procedure.AsyncMultiProcedure;
import org.simantics.db.request.ExternalRead;
+import org.simantics.db.request.Read;
/**
* performed with the specified ReadGraph. DB listeners are therefore not
* triggered by anything that is performed with the returned ReadGraph.
*
+ * @Deprecated In favor of syncRequestIndependent
* @param graph read transaction handle to clone for listener-independent
* use
* @return read transaction handle that is independent of the requests
* performed with the parameter
*/
ReadGraph getIndependentGraph(ReadGraph graph);
+
+ /**
+ * Performs the given request without accumulating query dependencies.
+ * DB listeners are therefore not triggered by anything that is performed within the request.
+ *
+ * @param graph read transaction handle to clone for listener-independent
+ * use
+ * @param request the request to perform
+ * @return the result of the request evaluation
+ */
+ <T> T syncRequestIndependent(ReadGraph graph, Read<T> request) throws DatabaseException;
+
boolean hasParentRequest(ReadGraph graph);
}
public boolean rolledback();
public boolean isClusterLoaded(ClusterUID clusterUID) throws DatabaseException;
-
+
+ public void saveQueries() throws DatabaseException;
+
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.utils.ui;bundle-version="1.1.0",
org.simantics.db;bundle-version="1.1.0",
org.simantics.db.layer0;bundle-version="1.1.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Bundle-Vendor: Association for Decentralized Information Management in Industry THTH ry
Import-Package: org.eclipse.core.expressions,
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Activator: org.simantics.debug.browser.internal.Activator
Require-Bundle: org.simantics;bundle-version="1.0.0",
gnu.trove3;bundle-version="3.0.3",
- org.eclipse.jetty.server,
- org.eclipse.jetty.servlet,
- org.eclipse.jetty.http;bundle-version="9.2.13",
- org.eclipse.jetty.util;bundle-version="9.2.13"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+ org.eclipse.jetty.server;bundle-version="9.4.24",
+ org.eclipse.jetty.servlet;bundle-version="9.4.24",
+ org.eclipse.jetty.http;bundle-version="9.4.24",
+ org.eclipse.jetty.util;bundle-version="9.4.24",
+ javax.servlet-api;bundle-version="3.1.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.debug.browser.content,
org.simantics.debug.browser.internal;x-friends:="org.simantics.debug.browser.ui",
org.simantics.debug.browser.sections,
org.simantics.debug.browser.utils
-Import-Package: javax.servlet;version="2.5.0",
- javax.servlet.http;version="2.5.0"
Bundle-Vendor: Association for Decentralized Information Management in Industry THTH ry
Automatic-Module-Name: org.simantics.debug.browser
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Graphical
Bundle-SymbolicName: org.simantics.debug.graphical;singleton:=true
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.db;bundle-version="1.1.0",
org.eclipse.core.runtime;bundle-version="3.6.0",
org.eclipse.ui;bundle-version="3.6.0",
org.simantics.ui;bundle-version="1.0.0",
com.fasterxml.jackson.core.jackson-core;bundle-version="2.8.8",
- org.slf4j.api;bundle-version="1.7.25",
+ org.slf4j.api,
com.fasterxml.jackson.core.jackson-databind;bundle-version="2.8.8"
Automatic-Module-Name: org.simantics.debug.graphical
import "Simantics/DB"
-importJava "org.simantics.debug.graphical.DebuggerCanvas" where
+importJava "org.simantics.debug.graphical.DebuggerCanvasProxy" where
data GraphDebugger
setStatementFilter :: GraphDebugger -> (Statement -> <ReadGraph,Proc> Boolean) -> <Proc> ()
--- /dev/null
+package org.simantics.debug.graphical;
+
+import org.simantics.db.Resource;
+import org.simantics.scl.runtime.function.Function;
+
+/**
+ * <code>Simantics/GraphicalDebugger</code> SCL API to avoid undesired AWT
+ * toolkit initialization.
+ *
+ * @author Tuukka Lehtonen
+ */
+public class DebuggerCanvasProxy {
+
+ DebuggerCanvas canvas;
+
+ public void setStatementFilter(@SuppressWarnings("rawtypes") Function statementFilter) {
+ canvas.setStatementFilter(statementFilter);
+ }
+
+ public void removeStatementFilter() {
+ canvas.removeStatementFilter();
+ }
+
+ public void addResource(Resource resource) {
+ canvas.addResource(resource);
+ }
+
+ public DebuggerCanvasProxy(DebuggerCanvas canvas) {
+ this.canvas = canvas;
+ }
+
+}
public class GraphicalDebugger {
- public static DebuggerCanvas newGraphDebugger() {
+ public static DebuggerCanvasProxy newGraphDebugger() {
final JFrame frame = new JFrame();
frame.setTitle("Graph debugger");
Toolkit tk = Toolkit.getDefaultToolkit();
});
frame.setVisible(true);
- return canvas;
+ return new DebuggerCanvasProxy(canvas);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.modeling.ontology,
org.slf4j.api
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.debug.ui
Automatic-Module-Name: org.simantics.debug.ui
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.desktop.product;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Semantum Oy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.simantics.desktop.product
id="tspan6235"
x="4.0821486"
y="291.79337"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.6444446px;font-family:'Cascadia Code';-inkscape-font-specification:'Cascadia Code, Normal';fill:#ffffff;fill-opacity:1;stroke-width:0.26458335px;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;">1.43.0</tspan></text>
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.6444446px;font-family:'Cascadia Code';-inkscape-font-specification:'Cascadia Code, Normal';fill:#ffffff;fill-opacity:1;stroke-width:0.26458335px;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;">1.44.0</tspan></text>
<circle
style="opacity:0.92900002;fill:#5d6b91;fill-opacity:1;stroke:none;stroke-width:1.27400005;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter6809)"
id="path6231"
id="tspan6894-5">DESKTOP</tspan></text>
<circle
style="opacity:1;fill:#215c9a;fill-opacity:1;stroke:#8b9de6;stroke-width:0.172755;stroke-miterlimit:4;stroke-dasharray:0.0863775, 0.0863775;stroke-dashoffset:1.26999998;stroke-opacity:0.96208532"
- id="path6231-43-0"
+ id="path6231.44.0"
cx="93.574448"
cy="279.01871"
r="1.4401269" />
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.silk.ontology;bundle-version="1.1.0",
org.simantics.viewpoint.ontology;bundle-version="1.2.0",
org.simantics.modeling.ontology;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.simantics.desktop.ui.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.spreadsheet.graph,
org.simantics.spreadsheet;bundle-version="1.1.0",
org.eclipse.ui.intro;bundle-version="3.5.100",
- org.eclipse.ui.intro.quicklinks;bundle-version="1.0.100"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+ org.eclipse.ui.intro.quicklinks;bundle-version="1.0.100",
+ org.simantics.views.swt;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.simantics.desktop.ui
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="tests"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Diagram connections
Bundle-SymbolicName: org.simantics.diagram.connection
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: gnu.trove3;bundle-version="3.0.0",
org.junit;bundle-version="4.12.0";resolution:=optional
Export-Package: org.simantics.diagram.connection,
transientLines.clear();
}
+ protected void removeRouteTerminalsFromRouteLines() {
+ for(RouteLine line : lines) {
+ line.removeRouteTerminals();
+ }
+ }
+
/**
* Rotates given terminal clockwise by given amount
* (also negative numbers are allowed).
public void update() {
needsUpdate = false;
removeTransientRouteLines();
+ removeRouteTerminalsFromRouteLines();
//print();
out.print(" HOR");
else
out.print(" VER");
+ if (hidden)
+ out.print(" HIDDEN");
+ out.print(" @ " + position);
for(RoutePoint point : points) {
out.print(" ("+point.x+","+point.y+")");
}
out.print(" (data=" + data + ")");
+ if (nextTransient != null)
+ out.print(" (next transient line=" + nextTransient.getData() + ")");
+ if (terminal != null)
+ out.print(" (terminal=" + terminal.getData() + ")");
out.println();
}
return lines;
}
+ public void removeRouteTerminals() {
+ points.removeIf(p -> p instanceof RouteTerminal);
+ }
+
public RouteTerminal getTerminal() {
return terminal;
}
boolean routeLineDoesNotIntersectTerminal;
double linePosition = line.position;
if(line.isHorizontal) {
+ if (linePosition == y) {
+ // direct route to terminal
+ line.addPoint(this);
+ return;
+ }
lineDir = linePosition < y ? 3 : 1;
routeLineDoesNotIntersectTerminal = linePosition <= minY || linePosition >= maxY
|| boundingBoxesIntersect /* we ignore intersection in this case */;
}
else {
+ if (linePosition == x) {
+ // direct route to terminal
+ line.addPoint(this);
+ return;
+ }
lineDir = linePosition < x ? 2 : 0;
routeLineDoesNotIntersectTerminal = linePosition <= minX || linePosition >= maxX
|| boundingBoxesIntersect /* we ignore intersection in this case */;
}
// We can route the connection directly to the right direction
- if(routeLineDoesNotIntersectTerminal &&
+ if((routeLineDoesNotIntersectTerminal ||
+ (line.isHorizontal && (x == minX || x == maxX)) || // already on the top/bottom edge
+ (!line.isHorizontal && (y == minY || y == maxY)) // already on the left/right edge
+ ) &&
Directions.isAllowed(allowedDirections, lineDir)) {
RouteLine line0 = createLine0(lineDir);
new RouteLink(line0, line);
return MORE_BENDS_BBS_DONT_INTERSECT;
}
- private static int simpleConnectionCaseRouteToBounds(RouteTerminal a,
+ public static int simpleConnectionCaseRouteToBounds(RouteTerminal a,
RouteTerminal b) {
double aX = 0.5*(a.getMinX() + a.getMaxX());
double aY = 0.5*(a.getMinY() + a.getMaxY());
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2020 Association for Decentralized Information Management in
+ * Industry THTH ry.
+ * 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:
+ * Semantum Oy - initial API and implementation
+ *******************************************************************************/
+package org.simantics.diagram.connection.rendering;
+
+import java.awt.Graphics2D;
+import java.awt.geom.Path2D;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+public class AggregateConnectionStyle implements ConnectionStyle, Serializable{
+
+ private static final long serialVersionUID = 5888959070127628457L;
+ private List<ConnectionStyle> styles = new ArrayList<>();
+
+ public void addStyle(ConnectionStyle style) {
+ styles.add(style);
+ }
+
+ @Override
+ public void drawBranchPoint(Graphics2D g, double x, double y) {
+ for (ConnectionStyle style : styles) {
+ style.drawBranchPoint(g, x, y);
+ }
+ }
+
+ @Override
+ public void drawLine(Graphics2D g, double x1, double y1, double x2, double y2, boolean isTransient) {
+ for (ConnectionStyle style : styles) {
+ style.drawLine(g, x1, y1, x2, y2, isTransient);
+ }
+ }
+
+ @Override
+ public void drawPath(Graphics2D g, Path2D path, boolean isTransient) {
+ for (ConnectionStyle style : styles) {
+ style.drawPath(g, path, isTransient);
+ }
+ }
+
+ @Override
+ public void drawDegeneratedLine(Graphics2D g, double x, double y, boolean isHorizontal, boolean isTransient) {
+ for (ConnectionStyle style : styles) {
+ style.drawDegeneratedLine(g, x, y, isHorizontal, isTransient);
+ }
+ }
+
+ @Override
+ public double getDegeneratedLineLength() {
+ double max = 0;
+ for (ConnectionStyle style : styles) {
+ max = Math.max(max, style.getDegeneratedLineLength());
+ }
+ return max;
+ }
+
+}
import java.awt.Stroke;
import java.awt.geom.AffineTransform;
import java.awt.geom.Ellipse2D;
+import java.awt.geom.FlatteningPathIterator;
import java.awt.geom.Line2D;
import java.awt.geom.Path2D;
import java.awt.geom.PathIterator;
+import java.awt.geom.Point2D;
import java.io.Serializable;
/**
final Stroke routeLineStroke;
final double degenerateLineLength;
final double rounding;
+ final double offset;
transient Line2D line = new Line2D.Double();
transient Ellipse2D ellipse = new Ellipse2D.Double();
public BasicConnectionStyle(Color lineColor, Color branchPointColor, double branchPointRadius, Stroke lineStroke, Stroke routeLineStroke, double degenerateLineLength,
- double rounding) {
+ double rounding, double offset) {
this.lineColor = lineColor;
this.branchPointColor = branchPointColor;
this.branchPointRadius = branchPointRadius;
this.routeLineStroke = routeLineStroke;
this.degenerateLineLength = degenerateLineLength;
this.rounding = rounding;
+ this.offset = offset;
+ }
+
+ public BasicConnectionStyle(Color lineColor, Color branchPointColor, double branchPointRadius, Stroke lineStroke, Stroke routeLineStroke, double degenerateLineLength,
+ double rounding) {
+ this(lineColor, branchPointColor, branchPointRadius, lineStroke, routeLineStroke, degenerateLineLength, rounding, 0.0);
}
public BasicConnectionStyle(Color lineColor, Color branchPointColor, double branchPointRadius, Stroke lineStroke, Stroke routeLineStroke, double degenerateLineLength) {
- this(lineColor, branchPointColor, branchPointRadius, lineStroke, routeLineStroke, degenerateLineLength, 0.0);
+ this(lineColor, branchPointColor, branchPointRadius, lineStroke, routeLineStroke, degenerateLineLength, 0.0, 0.0);
}
public Color getLineColor() {
if(rounding > 0.0) {
Object oldRenderingHint = g.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g.draw(round(path));
+ path = round(path);
+ if (offset != 0) {
+ path = offsetPath(path, offset);
+ }
+ g.draw(path);
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, oldRenderingHint);
}
- else
+ else {
+ if (offset != 0) {
+ path = offsetPath(path, offset);
+ }
g.draw(path);
+ }
+ }
+
+ private static Point2D getNormal(Point2D dir) {
+ return new Point2D.Double(-dir.getY(), dir.getX());
+ }
+
+ private static Point2D normalize(Point2D v) {
+ double d = Math.sqrt(v.getX() * v.getX() + v.getY() * v.getY());
+ v.setLocation(v.getX() / d, v.getY() / d);
+ return v;
+ }
+
+ private static Path2D offsetPath(Path2D path, double offset) {
+ Path2D result = new Path2D.Double();
+ PathIterator iter = new FlatteningPathIterator(path.getPathIterator(null), 0.05, 10);
+
+ double c[] = new double[6];
+ double initialX = 0;
+ double initialY = 0;
+ boolean first = true;
+ Point2D prevDir = null;
+ Point2D prevPos = null;
+
+ while (!iter.isDone()) {
+ int i = iter.currentSegment(c);
+ switch (i) {
+ case PathIterator.SEG_MOVETO:
+ if (first) {
+ initialX = c[0];
+ initialY = c[1];
+ first = false;
+ }
+ if (prevDir != null) {
+ Point2D N = normalize(getNormal(prevDir));
+ result.lineTo(prevPos.getX() + N.getX() * offset , prevPos.getY() + N.getY() * offset);
+ }
+ prevPos = new Point2D.Double(c[0], c[1]);
+ prevDir = null;
+ break;
+ case PathIterator.SEG_LINETO:
+ case PathIterator.SEG_CLOSE:
+ if (i == PathIterator.SEG_CLOSE) {
+ c[0] = initialX;
+ c[1] = initialY;
+ }
+ Point2D currentDir = new Point2D.Double(c[0] - prevPos.getX(), c[1] - prevPos.getY());
+ if (currentDir.getX() == 0.0 && currentDir.getY() == 0) break;
+
+ if (prevDir == null) {
+ Point2D N = normalize(getNormal(currentDir));
+ result.moveTo(prevPos.getX() + N.getX() * offset, prevPos.getY() + N.getY() * offset);
+ prevPos = new Point2D.Double(c[0], c[i]);
+ prevDir = currentDir;
+ } else {
+ Point2D N1 = normalize(getNormal(prevDir));
+ Point2D N2 = normalize(getNormal(currentDir));
+ Point2D N = normalize(new Point2D.Double(N1.getX() + N2.getX(), N1.getY() + N2.getY()));
+ double dot = N1.getX() * N.getX() + N1.getY() * N.getY();
+
+ if (!Double.isFinite(dot) || Math.abs(dot) < 0.1) {
+ result.lineTo(prevPos.getX() + (N1.getX() + N1.getY()) * offset, prevPos.getY() + (N1.getY() - N1.getX()) * offset);
+ result.lineTo(prevPos.getX() + (N2.getX() + N1.getY()) * offset, prevPos.getY() + (N2.getY() - N1.getX()) * offset);
+ prevPos = new Point2D.Double(c[0], c[i]);
+ prevDir = currentDir;
+ } else {
+ double Nx = N.getX() * offset / dot;
+ double Ny = N.getY() * offset / dot;
+ result.lineTo(prevPos.getX() + Nx, prevPos.getY() + Ny);
+ prevPos = new Point2D.Double(c[0], c[i]);
+ prevDir = currentDir;
+ }
+ }
+
+ break;
+ }
+ iter.next();
+ }
+ if (prevDir != null) {
+ Point2D N = normalize(getNormal(prevDir));
+ result.lineTo(prevPos.getX() + N.getX() * offset , prevPos.getY() + N.getY() * offset);
+ }
+ return result;
}
private Path2D round(Path2D path) {
double dy1 = curY-oldY;
double dx2 = curX-newX;
double dy2 = curY-newY;
- double maxRadius = 0.5 * Math.min(Math.sqrt(dx1*dx1 + dy1*dy1), Math.sqrt(dx2*dx2 + dy2*dy2));
+ double r1 = Math.sqrt(dx1*dx1 + dy1*dy1);
+ double r2 = Math.sqrt(dx2*dx2 + dy2*dy2);
+ double maxRadius = 0.5 * Math.min(r1, r2);
double radius = Math.min(rounding, maxRadius);
- newPath.lineTo(curX + radius*Math.signum(oldX-curX), curY + radius*Math.signum(oldY-curY));
+ double dx1Normalized = r1 > 0 ? dx1 / r1 : 0;
+ double dy1Normalized = r1 > 0 ? dy1 / r1 : 0;
+ double dx2Normalized = r2 > 0 ? dx2 / r2 : 0;
+ double dy2Normalized = r2 > 0 ? dy2 / r2 : 0;
+ newPath.lineTo(curX - radius*dx1Normalized, curY - radius*dy1Normalized);
newPath.curveTo(curX, curY,
curX, curY,
- curX + radius*Math.signum(newX-curX), curY + radius*Math.signum(newY-curY));
-
- //newPath.lineTo(curX + round*Math.signum(oldX-curX), curY + round*Math.signum(oldY-curY));
- //newPath.lineTo(curX + round*Math.signum(newX-curX), curY + round*Math.signum(newY-curY));
- //newPath.lineTo(curX, curY);
+ curX - radius*dx2Normalized, curY - radius*dy2Normalized);
}
else
++state;
result = prime * result + (int) (temp ^ (temp >>> 32));
result = prime * result + ((lineColor == null) ? 0 : lineColor.hashCode());
result = prime * result + ((lineStroke == null) ? 0 : lineStroke.hashCode());
+ temp = Double.doubleToLongBits(rounding);
+ result = prime * result + (int) (temp ^ (temp >>> 32));
result = prime * result + ((routeLineStroke == null) ? 0 : routeLineStroke.hashCode());
return result;
}
return false;
} else if (!lineStroke.equals(other.lineStroke))
return false;
+ if (Double.doubleToLongBits(rounding) != Double.doubleToLongBits(other.rounding))
+ return false;
if (routeLineStroke == null) {
if (other.routeLineStroke != null)
return false;
return rounding;
}
+ public double getOffset() {
+ return offset;
+ }
}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2020 Association for Decentralized Information Management in
+ * Industry THTH ry.
+ * 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:
+ * Semantum Oy - initial API and implementation
+ *******************************************************************************/
+package org.simantics.diagram.connection.rendering;
+
+import java.awt.geom.Arc2D;
+import java.awt.geom.Path2D;
+import java.awt.geom.PathIterator;
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public class ConnectionCrossings implements PathModifier {
+ public enum Type {
+ NONE,
+ GAP,
+ ARC,
+ SQUARE
+ }
+
+ private List<Segment> segments = new ArrayList<>();
+ private double width;
+ private Type type;
+
+ public void setWidth(double gapWidth) {
+ this.width = gapWidth;
+ }
+
+ public double getWidth() {
+ return width;
+ }
+
+ public void setType(Type type) {
+ this.type = type;
+ }
+
+ public Type getType() {
+ return type;
+ }
+
+ static class Segment {
+ public double x1, y1, x2, y2;
+
+ public Segment(double x1, double y1, double x2, double y2) {
+ this.x1 = x1;
+ this.y1 = y1;
+ this.x2 = x2;
+ this.y2 = y2;
+ }
+ };
+
+ public void reset() {
+ segments.clear();
+ }
+
+ static Double lineLineIntersection(Segment l1, Segment l2) {
+ double epsilon = 0.001;
+
+ double d = (l1.x1 - l1.x2) * (l2.y1 - l2.y2) - (l1.y1 - l1.y2) * (l2.x1 - l2.x2);
+ if (d == 0.0) return null;
+ double s = ((l1.x1 - l2.x1) * (l2.y1 - l2.y2) - (l1.y1 - l2.y1) * (l2.x1 - l2.x2)) / d;
+ if ((s > epsilon) && (s < 1 - epsilon)) {
+ double t = -((l1.x1 - l1.x2) * (l1.y1 - l2.y1) - (l1.y1 - l1.y2) * (l1.x1 - l2.x1)) / d;
+ if ((t > epsilon) && (t < 1 - epsilon)) {
+ return t;
+ }
+ }
+ return null;
+ }
+
+ public Path2D modify(Path2D path) {
+ Path2D.Double path2 = new Path2D.Double();
+ PathIterator iter = path.getPathIterator(null);
+
+ while (!iter.isDone()) {
+
+ double c[] = new double[6];
+ int i = iter.currentSegment(c);
+ switch (i) {
+ case PathIterator.SEG_MOVETO:
+ path2.moveTo(c[0], c[1]);
+ break;
+ case PathIterator.SEG_LINETO:
+ Segment l = new Segment(path2.getCurrentPoint().getX(), path2.getCurrentPoint().getY(), c[0], c[1]);
+
+ List<Double> gaps = new ArrayList<>();
+ for (Segment old : segments) {
+ Double t = lineLineIntersection(old, l);
+ if (t != null) {
+ gaps.add(t);
+ }
+ }
+
+ if (gaps.isEmpty()) {
+ path2.lineTo(c[0], c[1]);
+ } else {
+ Collections.sort(gaps);
+ double dx = l.x2 - l.x1;
+ double dy = l.y2 - l.y1;
+
+ double pos = 0.0;
+ double len = Math.sqrt(dx*dx + dy*dy);
+
+ boolean finish = true;
+ Point2D prevGapEnd = null;
+ for (Double gapCenter : gaps) {
+ double pos2 = gapCenter - width / 2 / len;
+ double pos3 = gapCenter + width / 2 / len;
+ if (pos2 > pos) {
+ handleGap(path2, prevGapEnd);
+ prevGapEnd = null;
+ path2.lineTo(l.x1 + pos2 * dx, l.y1 + pos2 * dy);
+ }
+ if (pos3 < 1.0) {
+ double x = l.x1 + pos3 * dx;
+ double y = l.y1 + pos3 * dy;
+ prevGapEnd = new Point2D.Double(x, y);
+ } else {
+ finish = false;
+ }
+ pos = pos3;
+ }
+
+ if (finish) {
+ handleGap(path2, prevGapEnd);
+ path2.lineTo(l.x2, l.y2);
+ } else {
+ prevGapEnd = new Point2D.Double(l.x2, l.y2);
+ handleGap(path2, prevGapEnd);
+ }
+ }
+ segments.add(l);
+
+ break;
+ case PathIterator.SEG_QUADTO:
+ // TODO: implement gaps
+ path2.quadTo(c[0], c[1], c[2], c[3]);
+ break;
+ case PathIterator.SEG_CUBICTO:
+ // TODO: implement gaps
+ path2.curveTo(c[0], c[1], c[2], c[3], c[4], c[5]);
+ break;
+ case PathIterator.SEG_CLOSE:
+ // TODO: implement gaps
+ path2.closePath();
+ break;
+ default:
+ throw new RuntimeException("Unexpected segment type " + i);
+ }
+ iter.next();
+ }
+ return path2;
+ }
+
+ private void handleGap(Path2D path, Point2D prevGapEnd) {
+ if (prevGapEnd != null) {
+ switch (type) {
+ case ARC:
+ arcTo(path, prevGapEnd.getX(), prevGapEnd.getY());
+ break;
+ case SQUARE:
+ squareTo(path, prevGapEnd.getX(), prevGapEnd.getY(), width);
+ break;
+ case GAP:
+ path.moveTo(prevGapEnd.getX(), prevGapEnd.getY());
+ break;
+ case NONE:
+ break;
+ }
+ }
+ }
+
+ private static void arcTo(Path2D path, double x2, double y2) {
+ Arc2D arc = new Arc2D.Double();
+ double x1 = path.getCurrentPoint().getX();
+ double y1 = path.getCurrentPoint().getY();
+ double dx = x2 - x1;
+ double dy = y2 - y1;
+ double r = Math.sqrt(dx * dx + dy * dy) / 2;
+ double angle = Math.atan2(dx, dy) * 180 / Math.PI + 90;
+ double span = (angle > 225 || angle < 45) ? 180 : -180;
+ arc.setArcByCenter((x1 + x2) / 2, (y1 + y2) / 2, r, angle, span, Arc2D.OPEN);
+ path.append(arc, true);
+ }
+
+ private static void squareTo(Path2D path, double x2, double y2, double width) {
+ double x1 = path.getCurrentPoint().getX();
+ double y1 = path.getCurrentPoint().getY();
+ double dx = x2 - x1;
+ double dy = y2 - y1;
+ double l = Math.sqrt(dx * dx + dy* dy);
+ if (l > 0) {
+ double nx = -dy / l;
+ double ny = dx / l;
+ if (nx - ny < 0) {
+ nx = -nx;
+ ny = -ny;
+ }
+ path.lineTo(x1 + nx * width / 2, y1 + ny * width / 2);
+ path.lineTo(x2 + nx * width / 2, y2 + ny * width / 2);
+ path.lineTo(x2, y2);
+ }
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2020 Association for Decentralized Information Management in
+ * Industry THTH ry.
+ * 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:
+ * Semantum Oy - initial API and implementation
+ *******************************************************************************/
+package org.simantics.diagram.connection.rendering;
+
+import java.awt.RenderingHints.Key;
+
+public final class ConnectionRenderingHints {
+
+ public static final Key KEY_PATH_MODIFIER = new Key(0) {
+ @Override
+ public boolean isCompatibleValue(Object val) {
+ return val == null || val instanceof PathModifier;
+ }
+ };
+}
\ No newline at end of file
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2020 Association for Decentralized Information Management in
+ * Industry THTH ry.
+ * 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:
+ * Semantum Oy - initial API and implementation
+ *******************************************************************************/
+package org.simantics.diagram.connection.rendering;
+
+import java.awt.geom.Path2D;
+
+public interface PathModifier {
+ public Path2D modify(Path2D source);
+}
path.reset();
rg.getPath2D(path);
+ PathModifier pm = (PathModifier) g.getRenderingHint(ConnectionRenderingHints.KEY_PATH_MODIFIER);
+ if (pm != null) {
+ path = pm.modify(path);
+ }
style.drawPath(g, path, false);
branchPoints.clear();
public boolean isDegenerated() {
return p1.getX() == p2.getX() && p1.getY() == p2.getY();
}
+
+ @Override
+ public String toString() {
+ return String.format("(%f, %f) (%f, %f)", p1.getX(), p1.getY(), p2.getX(), p2.getY());
+ }
}
package org.simantics.diagram.connection.splitting;
-import gnu.trove.set.hash.THashSet;
-
+import java.awt.geom.Line2D;
import java.awt.geom.Point2D;
+import java.util.ArrayList;
import org.simantics.diagram.connection.RouteGraph;
import org.simantics.diagram.connection.RouteLine;
import org.simantics.diagram.connection.RouteNode;
+import org.simantics.diagram.connection.RoutePoint;
import org.simantics.diagram.connection.RouteTerminal;
+import org.simantics.diagram.connection.segments.Segment;
+
+import gnu.trove.set.hash.THashSet;
public class SplittedRouteGraph {
public final RouteLine splitLine;
}
}
- /**
+ public static final class PickResult {
+ /**
+ * The connection route line nearest to {@link #pickPoint}.
+ */
+ public final RouteLine nearestLine;
+ /**
+ * Original pick point in canvas coordinates.
+ */
+ public final Point2D pickPoint;
+ /**
+ * Intersection point in canvas coordinates of {@link #nearestLine} and
+ * perpendicular line from {@link #pickPoint} to {@link #nearestLine}.
+ */
+ public final Point2D intersectionPoint;
+
+ public PickResult(RouteLine nearestLine, Point2D pickPoint, Point2D intersectionPoint) {
+ this.nearestLine = nearestLine;
+ this.pickPoint = pickPoint;
+ this.intersectionPoint = intersectionPoint;
+ }
+ }
+
+ public static PickResult pickNearestLine(RouteGraph rg, double x, double y) {
+ Segment nearestSegment = null;
+ RouteLine nearestLine = null;
+
+ ArrayList<Segment> segments = new ArrayList<>();
+ double minDistanceSq = Double.MAX_VALUE;
+ for (RouteLine line : rg.getAllLines()) {
+ segments.clear();
+ line.collectSegments(segments);
+ for (Segment segment : segments) {
+ RoutePoint p1 = segment.p1;
+ RoutePoint p2 = segment.p2;
+ double distanceSq = Line2D.ptSegDistSq(p1.getX(), p1.getY(), p2.getX(), p2.getY(), x, y);
+ if (distanceSq < minDistanceSq) {
+ minDistanceSq = distanceSq;
+ nearestSegment = segment;
+ nearestLine = line;
+ }
+ }
+ }
+
+ if (nearestSegment == null)
+ return null;
+
+ RoutePoint p1 = nearestSegment.p1;
+ RoutePoint p2 = nearestSegment.p2;
+ Point2D p = pointToLineIntersection(p1.getX(), p1.getY(), p2.getX(), p2.getY(), x, y);
+ return new PickResult(nearestLine, new Point2D.Double(x, y), p);
+ }
+
+ private static Point2D pointToLineIntersection(double x1, double y1, double x2, double y2, double px, double py) {
+ double d = Math.pow(x2 - x1, 2.0) + Math.pow(y2 - y1, 2.0);
+ if (d == 0) {
+ return new Point2D.Double(x1, y1);
+ } else {
+ double u = ((px - x1) * (x2 - x1) + (py - y1) * (y2 - y1)) / d;
+ if (u > 1.0) {
+ return new Point2D.Double(x2, y2);
+ } else if (u <= 0.0) {
+ return new Point2D.Double(x1, y1);
+ } else {
+ return new Point2D.Double(x2 * u + x1 * (1.0-u), (y2 * u + y1 * (1.0- u)));
+ }
+ }
+ }
+
+ /**
* @param point
* @param line
* @return the specified point instance snapped to the specified line
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.scenegraph.ontology;bundle-version="1.0.0",
org.simantics.selectionview.ontology;bundle-version="1.1.0",
org.simantics.datatypes.ontology;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.diagram.stubs
Bundle-Vendor: VTT Technical Research Centre of Finland
Automatic-Module-Name: org.simantics.diagram.ontology
DIA.Diagram <T DIA.Composite
>-- DIA.Diagram.IOTableRenaming --> DIA.IOTableRename <T L0.DependsOn
@L0.optionalProperty DIA.HasModCount
+ @L0.assert DIA.ConnectionCrossingStyle ""
+ @L0.assert DIA.ConnectionCrossingStyle.Width 0.0
+ @L0.assert DIA.ConnectionCrossingStyle.HasType DIA.ConnectionCrossingStyle.Type.None
DIA.HasModCount <R L0.HasProperty : L0.FunctionalRelation
L0.HasLabel "Modification Counter"
DIA.ProfileEntryContribution <T L0.Entity
--> DIA.ProfileEntryContribution.HasEntry --> DIA.ProfileEntry <R L0.IsRelatedTo
-
\ No newline at end of file
+
+DIA.ConnectionCrossingStyle <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
+ L0.HasLabel "Connection Crossing Style"
+ SEL.HasDisplayValue ""
+ L0.readOnly true
+ SEL.canBeLifted false
+
+DIA.ConnectionCrossingStyle.Width <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
+ L0.HasLabel "Width"
+ L0.HasDescription "Width of connection crossings."
+ L0.HasDomain DIA.Diagram
+ L0.HasRange L0.Double
+ SEL.IsShownUnder DIA.ConnectionCrossingStyle
+
+DIA.ConnectionCrossingStyle.HasType <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
+ L0.HasLabel "Type"
+ L0.HasDescription "Type of connection crossings."
+ L0.HasDomain DIA.Diagram
+ L0.HasRange DIA.ConnectionCrossingStyle.Type
+ SEL.IsShownUnder DIA.ConnectionCrossingStyle
+
+DIA.ConnectionCrossingStyle.Type <T L0.Value
+ @L0.tag L0.Enumeration
+
+DIA.ConnectionCrossingStyle.Type.Arc : DIA.ConnectionCrossingStyle.Type
+DIA.ConnectionCrossingStyle.Type.Square : DIA.ConnectionCrossingStyle.Type
+DIA.ConnectionCrossingStyle.Type.Gap : DIA.ConnectionCrossingStyle.Type
+DIA.ConnectionCrossingStyle.Type.None : DIA.ConnectionCrossingStyle.Type
+
+DIA.ConnectionStyle <T L0.Entity
+DIA.ConnectionLineStyle <T L0.Entity
+
+DIA.HasConnectionStyle <R L0.IsRelatedTo : L0.FunctionalRelation
+ L0.HasRange DIA.ConnectionStyle
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Diagram Visualization Profiles Support
Bundle-SymbolicName: org.simantics.diagram.profile;singleton:=true
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.browsing.ui.swt;bundle-version="1.1.0",
org.simantics.diagram.ontology;bundle-version="1.1.1",
org.simantics.diagram;bundle-version="1.1.1",
org.simantics.views.swt;bundle-version="1.0.0",
org.simantics.views.swt.client;bundle-version="1.0.0",
org.simantics.views.ontology;bundle-version="1.0.0",
- org.simantics.selectionview;bundle-version="1.0.0"
+ org.simantics.selectionview;bundle-version="1.0.0",
+ org.slf4j.api
Import-Package: org.simantics.views
Bundle-Vendor: Semantum Oy
Export-Package: org.simantics.diagram.profile.request
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.management.ISessionContext;
import org.simantics.db.procedure.Procedure;
+import org.simantics.diagram.runtime.RuntimeDiagramManager;
import org.simantics.diagram.stubs.DiagramResource;
import org.simantics.utils.ObjectUtils;
import org.simantics.utils.ui.SWTUtils;
}
protected void editorActivated(IEditorPart part) {
- Resource resource = part.getAdapter(Resource.class);
+ RuntimeDiagramManager rdm = part.getAdapter(RuntimeDiagramManager.class);
+ Resource resource = null;
+ if (rdm != null)
+ resource = rdm.getRuntimeDiagram();
+ if (resource == null)
+ resource = part.getAdapter(Resource.class);
lastInputResource = resource;
if (ownerIsVisible) {
testAndChangeInput(resource);
import org.simantics.db.common.request.WriteRequest;
import org.simantics.db.common.utils.NameUtils;
import org.simantics.db.exception.DatabaseException;
-import org.simantics.diagram.Logger;
import org.simantics.diagram.stubs.DiagramResource;
import org.simantics.layer0.Layer0;
import org.simantics.operation.Layer0X;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class CreateGroupAction extends ModelledActionImpl<Resource> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(CreateGroupAction.class);
+
public CreateGroupAction(Resource configuration) {
super(configuration);
}
});
} catch (DatabaseException e) {
-
- Logger.defaultLogError(e);
-
+ LOGGER.error("CreateGroupAction failed", e);
}
}
import org.simantics.db.common.utils.NameUtils;
import org.simantics.db.common.utils.OrderedSetUtils;
import org.simantics.db.exception.DatabaseException;
-import org.simantics.diagram.Logger;
import org.simantics.diagram.stubs.DiagramResource;
import org.simantics.layer0.Layer0;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class CreateProfileAction extends ModelledActionImpl<Resource> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(CreateProfileAction.class);
+
public CreateProfileAction(Resource configuration) {
super(configuration);
}
});
} catch (DatabaseException e) {
-
- Logger.defaultLogError(e);
-
+ LOGGER.error("CreateProfileAction failed", e);
}
}
import org.simantics.db.common.request.WriteRequest;
import org.simantics.db.common.utils.NameUtils;
import org.simantics.db.exception.DatabaseException;
-import org.simantics.diagram.Logger;
import org.simantics.diagram.stubs.DiagramResource;
import org.simantics.layer0.Layer0;
import org.simantics.operation.Layer0X;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class CreateStyleAction extends ModelledActionImpl<Resource> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(CreateStyleAction.class);
+
public CreateStyleAction(Resource configuration) {
super(configuration);
}
});
} catch (DatabaseException e) {
-
- Logger.defaultLogError(e);
-
+ LOGGER.error("CreateStyleAction failed", e);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.db.management;bundle-version="1.1.0",
org.simantics.structural.ontology;bundle-version="1.2.0",
org.simantics.structural2;bundle-version="1.1.1",
- org.apache.batik;bundle-version="1.8.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+ org.apache.batik;bundle-version="1.12.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.diagram.svg.export
Automatic-Module-Name: org.simantics.diagram.svg
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.diagram.ontology;bundle-version="1.0.0";visibility:=reexport,
org.simantics.structural.ontology;bundle-version="1.0.0",
org.simantics.layer0.utils;bundle-version="[1.0.0,2.0.0)",
- org.apache.log4j;bundle-version="1.2.15",
org.simantics.threadlog;bundle-version="1.0.0";resolution:=optional,
org.simantics.graph;bundle-version="1.1.5",
org.simantics.graph.db;bundle-version="1.1.5",
org.eclipse.e4.ui.services,
org.eclipse.e4.core.contexts,
org.eclipse.e4.ui.workbench,
- org.slf4j.api;bundle-version="1.7.20",
+ org.slf4j.api,
org.simantics.browsing.ui
Export-Package: org.simantics.diagram,
org.simantics.diagram.adapter,
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.simantics.diagram.internal.Activator
Bundle-Vendor: VTT Technical Research Center of Finland
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.simantics.diagram
</with>
</activeWhen>
</handler>
+ <handler
+ class="org.simantics.diagram.handler.CanvasCommandDelegate"
+ commandId="copyAsSVG">
+ <activeWhen>
+ <reference definitionId="org.simantics.modeling.ui.diagram.active" />
+ </activeWhen>
+ </handler>
<handler
class="org.simantics.diagram.handler.CanvasCommandDelegate"
commandId="org.eclipse.ui.edit.rename">
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
- * in Industry THTH ry.
- * 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:
- * VTT Technical Research Centre of Finland - initial API and implementation
- *******************************************************************************/
-package org.simantics.diagram;
-
-import java.util.Properties;
-
-import org.apache.log4j.Hierarchy;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PropertyConfigurator;
-import org.apache.log4j.spi.LoggerFactory;
-import org.apache.log4j.spi.RootLogger;
-
-/**
- * This class encapsulates a Log4J Hierarchy and centralizes all Logger access.
- */
-public class LogManager {
-
- private Hierarchy hierarchy;
-
- /**
- * Creates a new LogManager. Saves the log and state location.
- * Creates a new Hierarchy and add a new EventListener to it.
- * Configure the hierarchy with the properties passed. Add this object to
- * the list of active log managers.
- *
- * @param properties log configuration properties
- */
- public LogManager(Properties properties) {
- this.hierarchy = new Hierarchy(new RootLogger(Level.DEBUG));
- new PropertyConfigurator().doConfigure(properties, this.hierarchy);
- }
-
- /**
- * Checks if this PluginLogManager is disabled for this level.
- *
- * @param level level value
- * @return boolean true if it is disabled
- */
- public boolean isDisabled(int level) {
- return this.hierarchy.isDisabled(level);
- }
-
- /**
- * Enable logging for logging requests with level l or higher. By default
- * all levels are enabled.
- *
- * @param level level object
- */
- public void setThreshold(Level level) {
- this.hierarchy.setThreshold(level);
- }
-
- /**
- * The string version of setThreshold(Level level)
- *
- * @param level level string
- */
- public void setThreshold(String level) {
- this.hierarchy.setThreshold(level);
- }
-
- /**
- * Get the repository-wide threshold.
- *
- * @return Level
- */
- public Level getThreshold() {
- return this.hierarchy.getThreshold();
- }
-
- /**
- * Returns a new logger instance named as the first parameter using the
- * default factory. If a logger of that name already exists, then it will be
- * returned. Otherwise, a new logger will be instantiated and then linked
- * with its existing ancestors as well as children.
- *
- * @param clazz the class to get the logger for
- * @return Logger
- */
- public Logger getLogger(Class<?> clazz) {
- return this.hierarchy.getLogger(clazz.getName());
- }
-
- /**
- * Returns a new logger instance named as the first parameter using the
- * default factory. If a logger of that name already exists, then it will be
- * returned. Otherwise, a new logger will be instantiated and then linked
- * with its existing ancestors as well as children.
- *
- * @param name logger name
- * @return Logger
- */
- public Logger getLogger(String name) {
- return this.hierarchy.getLogger(name);
- }
-
- /**
- * The same as getLogger(String name) but using a factory instance instead
- * of a default factory.
- *
- * @param name logger name
- * @param factory factory instance
- * @return Logger
- */
- public Logger getLogger(String name, LoggerFactory factory) {
- return this.hierarchy.getLogger(name, factory);
- }
-
- /**
- * Returns the root of this hierarchy.
- *
- * @return Logger
- */
- public Logger getRootLogger() {
- return this.hierarchy.getRootLogger();
- }
-
- /**
- * Checks if this logger exists.
- *
- * @return Logger
- */
- public Logger exists(String name) {
- return this.hierarchy.exists(name);
- }
-
- /**
- * Disposes the logger hierarchy
- */
- public void shutdown() {
- this.hierarchy.shutdown();
- }
-
- /**
- * Resets configuration values to its defaults.
- */
- public void resetConfiguration() {
- this.hierarchy.resetConfiguration();
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
- * in Industry THTH ry.
- * 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:
- * VTT Technical Research Centre of Finland - initial API and implementation
- *******************************************************************************/
-package org.simantics.diagram;
-
-import java.util.Properties;
-
-public class Logger {
- public static final boolean ECHO = false;
- public static final Properties defaultProperties = new Properties();
- static {
- defaultProperties.put("log4j.rootCategory", "ERROR, default");
- defaultProperties.put("log4j.appender.default", "org.apache.log4j.FileAppender");
- defaultProperties.put("log4j.appender.default.File", "diagram.log");
- defaultProperties.put("log4j.appender.default.append", "false");
- defaultProperties.put("log4j.appender.default.layout", "org.apache.log4j.PatternLayout");
- defaultProperties.put("log4j.appender.default.layout.ConversionPattern", "%-6r [%15.15t] %-5p %30.30c - %m%n");
- }
- private static LogManager defaultLogManager = new LogManager(defaultProperties);
- private static final Logger defaultErrorLogger = new Logger(LogManager.class);
- private org.apache.log4j.Logger logger;
- Logger(Class<?> clazz) {
- logger = defaultLogManager.getLogger(clazz);
- }
-
- /**
- * Log a trace event.
- *
- * @param message message of the trace
- * @param exception the exception, or <code>null</code>
- */
- public void logTrace(String message, Throwable exception) {
- // Errors are much more useful with a stack trace!
- if (exception == null) {
- exception = new RuntimeException();
- }
- logger.trace(message, exception);
- }
-
- /**
- * Log an info event.
- *
- * @param message message of the info
- * @param exception the exception, or <code>null</code>
- */
- public void logInfo(String message, Throwable exception) {
- // Errors are much more useful with a stack trace!
- if (exception == null) {
- exception = new RuntimeException();
- }
- logger.info(message, exception);
- }
-
- /**
- * Log an error event.
- *
- * @param message message of the error
- * @param exception the exception, or <code>null</code>
- */
- public void logError(String message, Throwable exception) {
- // Errors are much more useful with a stack trace!
- if (exception == null) {
- exception = new RuntimeException();
- }
- logger.error(message, exception);
- }
-
- public static Logger getDefault() {
- return defaultErrorLogger;
- }
-
- public static LogManager getDefaultLogManager() {
- return defaultLogManager;
- }
- public static void defaultLogError(Throwable exception) {
- getDefault().logError(exception.getLocalizedMessage(), exception);
- if(ECHO) exception.printStackTrace();
- }
- public static void defaultLogError(String message) {
- getDefault().logError(message, null);
- if(ECHO)
- System.err.println(message);
- }
- public static void defaultLogError(String message, Throwable exception) {
- getDefault().logError(message, exception);
- if(ECHO)
- System.err.println(message);
- }
- public static void defaultLogInfo(String message) {
- getDefault().logInfo(message, null);
- if(ECHO)
- System.err.println(message);
- }
- public static void defaultLogTrace(String message) {
- getDefault().logTrace(message, null);
- if(ECHO)
- System.err.println(message);
- }
-}
else this.priority = 0;
GroupStyleProfileEntry.this.style = graph.adapt(style, Style.class);
+ GroupStyleProfileEntry.this.style.setPriority(this.priority);
GroupStyleProfileEntry.this.group = graph.adapt(group, Group.class);
}
RouteGraph rg = RouteGraphUtils.load(graph, diagramRuntime, connection, canvas, diagram, element, modelingRules, backendConnections);
// Load connection line style.
- ConnectionStyle style = RouteGraphUtils.readConnectionStyle(graph, modelingRules, connection, STR);
+ ConnectionStyle style = RouteGraphUtils.readConnectionStyle(graph, modelingRules, connection, STR, DIA);
StyledRouteGraphRenderer renderer = RouteGraphUtils.getRenderer(graph, style);
// Finish element load
import java.awt.geom.Rectangle2D;
import java.util.Collection;
import java.util.Collections;
+import java.util.List;
import java.util.Map;
import java.util.Set;
import org.simantics.db.common.procedure.adapter.TransientCacheListener;
import org.simantics.db.common.request.ResourceRead2;
import org.simantics.db.common.request.UnaryRead;
+import org.simantics.db.common.utils.ListUtils;
import org.simantics.db.common.utils.NameUtils;
import org.simantics.db.exception.DatabaseException;
import org.simantics.diagram.connection.ConnectionVisuals;
import org.simantics.diagram.connection.RouteNode;
import org.simantics.diagram.connection.RouteTerminal;
import org.simantics.diagram.connection.RouteTerminalPosition;
+import org.simantics.diagram.connection.rendering.AggregateConnectionStyle;
import org.simantics.diagram.connection.rendering.BasicConnectionStyle;
import org.simantics.diagram.connection.rendering.ConnectionStyle;
import org.simantics.diagram.connection.rendering.ExampleConnectionStyle;
import org.simantics.g2d.element.IElement;
import org.simantics.g2d.element.handler.EdgeVisuals.EdgeEnd;
import org.simantics.g2d.element.handler.TerminalLayout;
-import org.simantics.g2d.elementclass.RouteGraphConnectionClass;
import org.simantics.g2d.elementclass.FlagClass.Type;
+import org.simantics.g2d.elementclass.RouteGraphConnectionClass;
import org.simantics.layer0.Layer0;
import org.simantics.scenegraph.g2d.nodes.connection.RouteGraphChangeEvent;
import org.simantics.scenegraph.utils.GeometryUtils;
* @return
* @throws DatabaseException
*/
- protected static ConnectionStyle readConnectionStyle(ReadGraph graph, IModelingRules modelingRules, Resource connection, StructuralResource2 STR) throws DatabaseException {
+ protected static ConnectionStyle readConnectionStyle(ReadGraph graph, IModelingRules modelingRules, Resource connection, StructuralResource2 STR, DiagramResource DIA) throws DatabaseException {
+ Resource connectionStyle = graph.getPossibleObject(connection, DIA.HasConnectionStyle);
Resource connectionType = null;
- if (modelingRules != null)
- connectionType = modelingRules.getConnectionType(graph, connection);
- if (connectionType == null)
- connectionType = graph.getPossibleObject(connection, STR.HasConnectionType);
- return connectionType != null ? readConnectionStyleFromConnectionType(graph, connectionType) : DEFAULT_CONNECTION_STYLE;
+ if (connectionStyle == null) {
+ if (modelingRules != null)
+ connectionType = modelingRules.getConnectionType(graph, connection);
+ if (connectionType == null)
+ connectionType = graph.getPossibleObject(connection, STR.HasConnectionType);
+ connectionStyle = graph.getPossibleObject(connectionType, DIA.HasConnectionStyle);
+ }
+ if (connectionStyle != null) {
+ List<Resource> lineStyles = ListUtils.toList(graph, connectionStyle);
+ if (lineStyles.size() != 1) {
+ AggregateConnectionStyle aggregate = new AggregateConnectionStyle();
+ for (Resource connectionLine : ListUtils.toList(graph, connectionStyle)) {
+ aggregate.addStyle(readConnectionStyleFromConnectionType(graph, connectionLine));
+ }
+ return aggregate;
+ } else {
+ return readConnectionStyleFromConnectionType(graph, lineStyles.get(0));
+ }
+ } else {
+ return connectionType != null ? readConnectionStyleFromConnectionType(graph, connectionType) : DEFAULT_CONNECTION_STYLE;
+ }
}
protected static ConnectionStyle readConnectionStyleFromConnectionType(ReadGraph graph, Resource connectionType) throws DatabaseException {
lineStroke = new BasicStroke(0.1f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 10, null, 0);
Stroke routeLineStroke = GeometryUtils.scaleStrokeWidth(lineStroke, 2);
double rounding = cv.rounding == null ? 0.0 : cv.rounding;
+ double offset = cv.offset == null ? 0.0 : cv.offset;
return new BasicConnectionStyle(
lineColor,
lineStroke,
routeLineStroke,
degenerateLineLength,
- rounding);
+ rounding,
+ offset);
}
public static void scheduleSynchronize(Session session, Resource connection, RouteGraphChangeEvent event) {
public final Stroke stroke;
public final Double branchPointRadius;
public final Double rounding;
+ public final Double offset;
public ConnectionVisuals(float[] color, StrokeType strokeType, Stroke stroke, Double rounding) {
this(color, strokeType, stroke, null, rounding);
}
public ConnectionVisuals(float[] color, StrokeType strokeType, Stroke stroke, Double branchPointRadius, Double rounding) {
+ this(color, strokeType, stroke, null, rounding, null);
+ }
+
+ public ConnectionVisuals(float[] color, StrokeType strokeType, Stroke stroke, Double branchPointRadius, Double rounding, Double offset) {
if (color != null && color.length < 3)
throw new IllegalArgumentException("colors must have at least 3 components (rgb), got " + color.length);
this.color = color;
this.stroke = stroke;
this.branchPointRadius = branchPointRadius;
this.rounding = rounding;
+ this.offset = offset;
}
public Color toColor() {
result = prime * result + ((branchPointRadius == null) ? 0 : branchPointRadius.hashCode());
result = prime * result + Arrays.hashCode(color);
result = prime * result + ((rounding == null) ? 0 : rounding.hashCode());
+ result = prime * result + ((offset == null) ? 0 : offset.hashCode());
result = prime * result + ((stroke == null) ? 0 : stroke.hashCode());
result = prime * result + ((strokeType == null) ? 0 : strokeType.hashCode());
return result;
return false;
} else if (!rounding.equals(other.rounding))
return false;
+ if (offset == null) {
+ if (other.offset != null)
+ return false;
+ } else if (!offset.equals(other.offset))
+ return false;
if (stroke == null) {
if (other.stroke != null)
return false;
if (hasState(STATE_EDITING))
return;
- this.text = new String(text != null ? text : "");
+ this.text = text;
this.font = font;
this.color = color;
this.scale = scale;
this.scaleRecip = 1.0 / scale;
this.caret = 0;
this.selectionTail = 0;
+
resetCaches();
}
// no value => value
if(this.text == null && text != null) NodeUtil.decreasePending(this);
- this.text = text != null ? text : "";
- caret = Math.min(caret, this.text.length());
+ this.text = text;
+ caret = text != null ? Math.min(caret, text.length()) : 0;
selectionTail = caret;
resetCaches();
y += line.layout.getDescent() + line.layout.getLeading() + line.layout.getAscent();
Rectangle2D bbox = line.layout.getLogicalHighlightShape(0, lineText.length()).getBounds2D();
+ // HighlightShape is not large enough, if font is italic.
+ Rectangle2D bbox2 = line.layout.getBounds();
+ bbox.add(bbox2);
bbox.setFrame(bbox.getX(), bbox.getY() + line.drawPosY, bbox.getWidth(), bbox.getHeight());
line.bbox = bbox;
}
ThreadUtils.syncExec(workerThread, new Runnable() {
@Override
public void run() {
- try {
+ try {
cctx.getDefaultHintContext().setHint(Hints.KEY_PAGE_DESC, _marginaaliViiva);
+ if (!fitDiagramContentsToPageMargins) {
+ // Prevent PDF printing from drawing page borders if the
+ // print area is fitted directly to the page size.
+ // This avoids unwanted black half-visible edges.
+ cctx.getDefaultHintContext().setHint(Hints.KEY_DISPLAY_PAGE, false);
+ }
String bottomLabel = diagramName;
if ( drawingTemplate != null && activeProfileEntries.contains(TMPL.DrawingTemplate) ) bottomLabel = null;
* @throws DatabaseException
*/
public static Resource join(WriteGraph g, Resource flag, Resource otherFlag) throws DatabaseException {
+ return join(g, flag, otherFlag, true);
+ }
+
+ /**
+ * @param g
+ * @param flag
+ * @param otherFlag
+ * @return the created DIA.ConnectionJoin instance
+ * @throws DatabaseException
+ */
+ public static Resource join(WriteGraph g, Resource flag, Resource otherFlag, boolean activateDiagramMapping) throws DatabaseException {
DiagramResource DIA = DiagramResource.getInstance(g);
StructuralResource2 STR = StructuralResource2.getInstance(g);
Resource connectionJoin = g.newResource();
g.claim(connectionJoin, DIA.JoinsFlag, flag);
g.claim(connectionJoin, DIA.JoinsFlag, otherFlag);
- IActivationManager manager = g.getService(IActivationManager.class);
- for(Resource diagram : OrderedSetUtils.getSubjects(g, flag))
- manager.activateOnce(g, diagram);
- for(Resource diagram : OrderedSetUtils.getSubjects(g, otherFlag))
- manager.activateOnce(g, diagram);
+ if (activateDiagramMapping) {
+ activateMappingForParentDiagramsOf(g, flag, otherFlag);
+ }
+
return connectionJoin;
}
+ public static void activateMappingForParentDiagramsOf(WriteGraph graph, Resource... elements) throws DatabaseException {
+ IActivationManager manager = graph.getService(IActivationManager.class);
+ Set<Resource> diagrams = new HashSet<>(elements.length);
+ for (Resource e : elements) {
+ diagrams.addAll(OrderedSetUtils.getSubjects(graph, e));
+ }
+ for (Resource diagram : diagrams) {
+ manager.activateOnce(graph, diagram);
+ }
+ }
+
public static void disconnectFlag(WriteGraph graph, Resource flag) throws DatabaseException {
// Remove any :ConnectionJoin's this flag is joined by
// if there's less than two flags joined by the join.
return flags;
}
-
-}
+}
\ No newline at end of file
package org.simantics.diagram.flag;
-import gnu.trove.map.hash.TObjectIntHashMap;
-
import java.awt.geom.AffineTransform;
import java.awt.geom.Point2D;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.List;
import org.simantics.databoard.Bindings;
import org.simantics.db.ReadGraph;
import org.simantics.diagram.connection.RoutePoint;
import org.simantics.diagram.connection.RouteTerminal;
import org.simantics.diagram.connection.splitting.SplittedRouteGraph;
+import org.simantics.diagram.connection.splitting.SplittedRouteGraph.PickResult;
import org.simantics.diagram.content.ConnectionUtil;
import org.simantics.diagram.stubs.DiagramResource;
import org.simantics.diagram.synchronization.graph.AddElement;
+import org.simantics.diagram.synchronization.graph.BasicResources;
import org.simantics.diagram.synchronization.graph.DiagramGraphUtil;
import org.simantics.diagram.synchronization.graph.RouteGraphModification;
import org.simantics.g2d.elementclass.FlagClass;
import org.simantics.modeling.ModelingResources;
import org.simantics.structural.stubs.StructuralResource2;
+import gnu.trove.map.hash.TObjectIntHashMap;
+
/**
* A class that handles splitting a route graph connection in two with diagram
* local flags.
RouteGraphModification modis = new RouteGraphModification(ss, rg);
TObjectIntHashMap<RouteNode> idMap = modis.getIdMap();
+ if (DEBUG) {
+ System.out.println("Split canvas position: " + splitCanvasPos);
+ rg.print();
+ }
+
// Find the edge to disconnect in the graph.
// Bisect the nearest route line.
- RouteLine line = SplittedRouteGraph.findNearestLine(rg, splitCanvasPos);
- if (DEBUG)
- rg.print();
- if (line == null)
+ PickResult picked = SplittedRouteGraph.pickNearestLine(rg, splitCanvasPos.getX(), splitCanvasPos.getY());
+ if (picked == null)
return;
+
+ RouteLine line = picked.nearestLine;
+
if (DEBUG) {
+ System.out.println("picked nearest line:");
line.print(System.out);
for (RoutePoint rp : line.getPoints())
System.out.println("RP: " + rp.getX() + ", " + rp.getY());
}
// Get exact intersection point on the line
- double isectX = splitCanvasPos.getX();
- double isectY = splitCanvasPos.getY();
- SplittedRouteGraph srg;
- if (line.isHorizontal()) {
- isectY = line.getPosition();
- srg = rg.splitGraph(line, isectX);
- }
- else {
- isectX = line.getPosition();
- srg = rg.splitGraph(line, isectY);
- }
+ double isectX = picked.intersectionPoint.getX();
+ double isectY = picked.intersectionPoint.getY();
+ SplittedRouteGraph srg = rg.splitGraph(line, line.isHorizontal() ? isectX : isectY);
if (DEBUG)
System.out.println(srg);
-
+
// Disconnect
if(rg.isSimpleConnection()) {
RouteNode na = srg.terminals1.iterator().next();
idMap.get(srg.splitLine)
));
}
-
- ArrayList<Resource> interfaceNodes1Resources = new ArrayList<Resource>(srg.interfaceNodes1.size());
- for(RouteNode n : srg.interfaceNodes1)
- interfaceNodes1Resources.add(ss.getResource((Long)n.getData()));
- ArrayList<Resource> interfaceNodes2Resources = new ArrayList<Resource>(srg.interfaceNodes2.size());
- for(RouteNode n : srg.interfaceNodes2)
- interfaceNodes2Resources.add(ss.getResource((Long)n.getData()));
-
- ArrayList<Resource> lines2Resources = new ArrayList<Resource>(srg.lines2.size());
- for(RouteLine n : srg.lines2)
- lines2Resources.add(ss.getResource((Long)n.getData()));
-
- ArrayList<Resource> terminals1Resources = new ArrayList<Resource>(srg.terminals1.size());
- for(RouteTerminal n : srg.terminals1)
- terminals1Resources.add(ss.getResource((Long)n.getData()));
- ArrayList<Resource> terminals2Resources = new ArrayList<Resource>(srg.terminals2.size());
- for(RouteTerminal n : srg.terminals2)
- terminals2Resources.add(ss.getResource((Long)n.getData()));
+ ArrayList<Resource> terminals1Resources = toResources(srg.terminals1);
+ ArrayList<Resource> terminals2Resources = toResources(srg.terminals2);
+
+ boolean mustFlip = analyzePartInputs(graph, terminals1Resources, terminals2Resources);
+
+ ArrayList<Resource> interfaceNodes1 = toResources(mustFlip ? srg.interfaceNodes2 : srg.interfaceNodes1);
+ ArrayList<Resource> interfaceNodes2 = toResources(mustFlip ? srg.interfaceNodes1 : srg.interfaceNodes2);
+
+ ArrayList<Resource> lines2 = toResources(mustFlip ? srg.lines1 : srg.lines2);
+ ArrayList<Resource> terminals1 = mustFlip ? terminals2Resources : terminals1Resources;
+ ArrayList<Resource> terminals2 = mustFlip ? terminals1Resources : terminals2Resources;
+
doSplit(graph, connection,
- interfaceNodes1Resources,
- interfaceNodes2Resources,
- lines2Resources,
- terminals1Resources,
- terminals2Resources,
+ interfaceNodes1,
+ interfaceNodes2,
+ lines2,
+ terminals1,
+ terminals2,
line.isHorizontal(),
+ mustFlip,
isectX, isectY);
modis.addModi(new RouteGraphModification.Split(
- modis.toIds(interfaceNodes1Resources),
- modis.toIds(interfaceNodes2Resources),
- modis.toIds(lines2Resources),
- modis.toIds(terminals1Resources),
- modis.toIds(terminals2Resources),
+ modis.toIds(interfaceNodes1),
+ modis.toIds(interfaceNodes2),
+ modis.toIds(lines2),
+ modis.toIds(terminals1),
+ modis.toIds(terminals2),
line.isHorizontal(),
+ mustFlip,
isectX, isectY
));
-
}
-
+
+ private ArrayList<Resource> toResources(Collection<? extends RouteNode> nodes) throws DatabaseException {
+ ArrayList<Resource> result = new ArrayList<>(nodes.size());
+ for (RouteNode n : nodes)
+ result.add(ss.getResource((Long)n.getData()));
+ return result;
+ }
+
+ /**
+ * @param graph
+ * @param terminals1
+ * @param terminals2
+ * @return <code>true</code> if inputs need to be flipped, i.e. if terminals2
+ * contains the output terminals and terminals1 doesn't.
+ * @throws DatabaseException
+ */
+ private boolean analyzePartInputs(ReadGraph graph, List<Resource> terminals1, List<Resource> terminals2) throws DatabaseException {
+ @SuppressWarnings("unused")
+ int inputs1 = 0, outputs1 = 0;
+ for(Resource connector : terminals1) {
+ if(graph.hasStatement(connector, DIA.IsHeadConnectorOf))
+ ++inputs1;
+ else
+ ++outputs1;
+ }
+ @SuppressWarnings("unused")
+ int inputs2 = 0, outputs2 = 0;
+ for(Resource connector : terminals2) {
+ if(graph.hasStatement(connector, DIA.IsHeadConnectorOf))
+ ++inputs2;
+ else
+ ++outputs2;
+ }
+
+ boolean mustFlip = outputs1 == 0;
+
+ if (DEBUG) {
+ System.out.println("inputs1: " + inputs1);
+ System.out.println("outputs1: " + outputs1);
+ System.out.println("inputs2: " + inputs2);
+ System.out.println("outputs2: " + outputs2);
+ System.out.println("=> type1: " + (mustFlip ? FlagClass.Type.In : FlagClass.Type.Out));
+ System.out.println("=> type2: " + (mustFlip ? FlagClass.Type.Out : FlagClass.Type.In));
+ System.out.println("=> must flip route graph parts to split: " + mustFlip);
+ }
+
+ return mustFlip;
+ }
+
+ private static String routeNodeDebugInfo(ReadGraph graph, Resource c) throws DatabaseException {
+ BasicResources BR = BasicResources.getInstance(graph);
+ String ctr = NameUtils.getSafeName(graph, c, true);
+ for (Resource e : graph.getObjects(c, BR.STR.Connects)) {
+ ctr += " --> " + NameUtils.getSafeName(graph, e);
+ }
+ for (Resource e : graph.getObjects(c, BR.DIA.AreConnected)) {
+ ctr += " <-> " + NameUtils.getSafeName(graph, e);
+ }
+ return ctr;
+ }
+
+ /**
+ * Internal routine that is only public because
+ * {@link RouteGraphModification#runUpdates(WriteGraph)} needs to invoke it.
+ *
+ * Assumes that #1 parameters will stay with the existing connection and #2
+ * parameters will go to the newly created connection.
+ */
public void doSplit(WriteGraph graph,
Resource connection,
ArrayList<Resource> interfaceNodes1Resources,
ArrayList<Resource> lines2Resources,
ArrayList<Resource> terminals1Resources,
ArrayList<Resource> terminals2Resources,
- boolean isHorizontal,
+ boolean isHorizontal,
+ boolean invertFlagRotation,
double isectX, double isectY) throws DatabaseException {
+ // 1 = output, 2 = input
+ FlagClass.Type
+ type1 = FlagClass.Type.Out,
+ type2 = FlagClass.Type.In;
+
if (DEBUG) {
System.out.println("doSplit:");
System.out.println(NameUtils.getSafeName(graph, connection, true));
for (Resource i : interfaceNodes1Resources)
- System.out.println("i1: " + NameUtils.getSafeName(graph, i, true));
+ System.out.println("i1: " + routeNodeDebugInfo(graph, i));
for (Resource i : interfaceNodes2Resources)
- System.out.println("i2: " + NameUtils.getSafeName(graph, i, true));
+ System.out.println("i2: " + routeNodeDebugInfo(graph, i));
for (Resource l : lines2Resources)
- System.out.println("l2r: " + NameUtils.getSafeName(graph, l, true));
+ System.out.println("l2r: " + routeNodeDebugInfo(graph, l));
for (Resource t : terminals1Resources)
- System.out.println("t1: " + NameUtils.getSafeName(graph, t, true));
+ System.out.println("t1: " + routeNodeDebugInfo(graph, t));
for (Resource t : terminals2Resources)
- System.out.println("t2: " + NameUtils.getSafeName(graph, t, true));
+ System.out.println("t2: " + routeNodeDebugInfo(graph, t));
System.out.println("is horizontal: " + isHorizontal);
System.out.println("@(x,y): " + isectX + ", " + isectY);
}
ConnectionUtil cu = new ConnectionUtil(graph);
Resource diagram = OrderedSetUtils.getSingleOwnerList(graph, connection, DIA.Diagram);
- Resource connectionType = graph.getSingleType(connection, DIA.Connection);
+ Resource diagramConnectionType = graph.getSingleType(connection, DIA.Connection);
Resource hasConnectionType = graph.getPossibleObject(connection, STR.HasConnectionType);
- Resource newConnection = cu.newConnection(diagram, connectionType);
+ Resource newConnection = cu.newConnection(diagram, diagramConnectionType);
if (hasConnectionType != null)
graph.claim(newConnection, STR.HasConnectionType, null, hasConnectionType);
// Give running name to connection increment the counter attached to the diagram.
AddElement.claimFreshElementName(graph, diagram, newConnection);
+ String commonLabel = DiagramFlagPreferences
+ .getActiveFlagLabelingScheme(graph)
+ .generateLabel(graph, diagram);
+
+ Point2D pos1, pos2;
+ double theta;
+ double flagDist = 3.0;
+ if(isHorizontal) {
+ theta = 0.0;
+ pos1 = new Point2D.Double(isectX-flagDist, isectY);
+ pos2 = new Point2D.Double(isectX+flagDist, isectY);
+ } else {
+ theta = Math.PI*0.5;
+ pos1 = new Point2D.Double(isectX, isectY-flagDist);
+ pos2 = new Point2D.Double(isectX, isectY+flagDist);
+ }
+
+ if (invertFlagRotation) {
+ theta += Math.PI;
+ Point2D p = pos1;
+ pos1 = pos2;
+ pos2 = p;
+ }
+
// WORKAROUND for mapping problems:
// If any terminal of the split connection contains a flag, make sure their STR.Joins relations are all removed
// to give mapping a chance to fix them properly.
graph.claim(rn, predicate, newConnection);
}
- // 1 = output, 2 = input
- FlagClass.Type type1, type2;
-
- FlagLabelingScheme scheme = DiagramFlagPreferences.getActiveFlagLabelingScheme(graph);
- String commonLabel = scheme.generateLabel(graph, diagram);
-
// Create flags and connect both disconnected ends to them.
- Point2D pos1, pos2;
- double theta;
- double flagDist = 3.0;
- if(isHorizontal) {
- theta = 0.0;
- pos1 = new Point2D.Double(isectX-flagDist, isectY);
- pos2 = new Point2D.Double(isectX+flagDist, isectY);
- }
- else {
- theta = Math.PI*0.5;
- pos1 = new Point2D.Double(isectX, isectY-flagDist);
- pos2 = new Point2D.Double(isectX, isectY+flagDist);
- }
-
- // Chooses flag directions
- {
- @SuppressWarnings("unused")
- int inputs1 = 0, outputs1 = 0;
- for(Resource connector : terminals1Resources) {
- if(graph.hasStatement(connector, DIA.IsHeadConnectorOf))
- ++inputs1;
- else
- ++outputs1;
- }
- @SuppressWarnings("unused")
- int inputs2 = 0, outputs2 = 0;
- for(Resource connector : terminals2Resources) {
- if(graph.hasStatement(connector, DIA.IsHeadConnectorOf))
- ++inputs2;
- else
- ++outputs2;
- }
-
- if(outputs1 == 0) {
- type1 = FlagClass.Type.In;
- type2 = FlagClass.Type.Out;
- theta += Math.PI;
- }
- else {
- type1 = FlagClass.Type.Out;
- type2 = FlagClass.Type.In;
- }
- if (DEBUG) {
- System.out.println("inputs1: " + inputs1);
- System.out.println("outputs1: " + outputs1);
- System.out.println("=> type1: " + type1);
- System.out.println("inputs2: " + inputs2);
- System.out.println("outputs2: " + outputs2);
- System.out.println("=> type2: " + type2);
- }
- }
Resource flag1 = createFlag(graph, diagram, getFlagTransform(pos1, theta), type1, commonLabel);
Resource flag2 = createFlag(graph, diagram, getFlagTransform(pos2, theta), type2, commonLabel);
+
if (DEBUG) {
+ System.out.println("LABEL FOR NEW FLAGS: " + commonLabel);
System.out.println("FLAG1: " + NameUtils.getSafeName(graph, flag1, true));
System.out.println("FLAG2: " + NameUtils.getSafeName(graph, flag2, true));
}
-// System.out.println("conn1: " + NameUtils.getSafeLabel(graph, type1 == FlagClass.Type.In ? DIA.HasPlainConnector : DIA.HasArrowConnector));
-// System.out.println("conn2: " + NameUtils.getSafeLabel(graph, type2 == FlagClass.Type.In ? DIA.HasPlainConnector : DIA.HasArrowConnector));
- Resource flagConnector1 = cu.newConnector(connection,
- type1 == FlagClass.Type.In ? DIA.HasPlainConnector : DIA.HasArrowConnector);
- Resource flagConnector2 = cu.newConnector(newConnection,
- type2 == FlagClass.Type.In ? DIA.HasPlainConnector : DIA.HasArrowConnector);
+ Resource flagConnector1 = cu.newConnector(connection, DIA.HasArrowConnector);
+ Resource flagConnector2 = cu.newConnector(newConnection, DIA.HasPlainConnector);
graph.claim(flag1, DIA.Flag_ConnectionPoint, flagConnector1);
graph.claim(flag2, DIA.Flag_ConnectionPoint, flagConnector2);
double position = isHorizontal ? isectY : isectX;
- connectFlag(graph, isHorizontal, position, connection, flagConnector1,
- interfaceNodes1Resources);
- connectFlag(graph, isHorizontal, position, newConnection, flagConnector2,
- interfaceNodes2Resources);
-
- FlagUtil.join(graph, flag1, flag2);
-
- // Move mapping relations to new connection if necessary
- if(type1 == FlagClass.Type.In) {
- moveStatements(graph, connection, newConnection, MOD.ElementToComponent);
- moveStatements(graph, connection, newConnection, MOD.DiagramConnectionToConnection);
- moveStatements(graph, connection, newConnection, MOD.DiagramConnectionToConnectionSpecial);
- FlagUtil.fixBindsStatements(graph, graph.getPossibleObject(newConnection, MOD.DiagramConnectionToConnection));
- }
- else
- FlagUtil.fixBindsStatements(graph, graph.getPossibleObject(connection, MOD.DiagramConnectionToConnection));
+ connectFlag(graph, isHorizontal, position, connection, flagConnector1, interfaceNodes1Resources);
+ connectFlag(graph, isHorizontal, position, newConnection, flagConnector2, interfaceNodes2Resources);
+
+ // Join the flags without activatingn diagram mapping at this point
+ FlagUtil.join(graph, flag1, flag2, false);
+ FlagUtil.fixBindsStatements(graph, graph.getPossibleObject(connection, MOD.DiagramConnectionToConnection));
+
+ // Finally ensure that all the diagrams related to the operation are mapped properly in one go
+ FlagUtil.activateMappingForParentDiagramsOf(graph, flag1, flag2);
}
/**
}
}
- private static void moveStatements(WriteGraph graph, Resource from, Resource to, Resource relation) throws DatabaseException {
- if(from.equals(to))
- return;
- for(Statement stat : graph.getStatements(from, relation))
- if(stat.getSubject().equals(from))
- graph.claim(to, stat.getPredicate(), stat.getObject());
- graph.deny(from, relation);
- }
-
private void connectFlag(WriteGraph graph, boolean isHorizontal, double position, Resource connection, Resource flagConnector, Collection<Resource> interfaceNodes)
throws DatabaseException {
if(interfaceNodes.size() > 1) {
}
public static void splitConnection(WriteGraph graph, Resource connection, double x, double y) throws DatabaseException {
+ // TODO: provide a proper runtimeDiagram parameter to load to support also connections attached to flags attached to diagram template flag tables
RouteGraph rg = RouteGraphUtils.load(graph, null, connection);
new RouteGraphConnectionSplitter(graph).split(graph, connection, rg, new Point2D.Double(x, y));
}
Resource flag = context.element;
Resource runtimeDiagram = context.runtime;
+ if (runtimeDiagram == null)
+ return flagTransformImpl(graph, converter, context);
Resource diagram = graph.getPossibleObject(runtimeDiagram, DIA.RuntimeDiagram_HasConfiguration);
if (diagram == null)
import org.simantics.db.layer0.variable.Variable;
import org.simantics.db.layer0.variable.Variables;
import org.simantics.db.request.Read;
-import org.simantics.diagram.Logger;
import org.simantics.diagram.content.Change;
import org.simantics.diagram.content.ConnectionUtil;
import org.simantics.diagram.content.DiagramContentChanges;
import org.simantics.utils.threads.ThreadUtils;
import org.simantics.utils.ui.ErrorLogger;
import org.simantics.utils.ui.SWTUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* CopyPasteHandler is a canvas handler for Commands.CUT, Commands.COPY and
*/
public class CopyPasteHandler extends AbstractDiagramParticipant {
+ private static final Logger LOGGER = LoggerFactory.getLogger(CopyPasteHandler.class);
+
public static final Key KEY_CUT_SELECTION_FRAME_COLOR = new KeyOf(Color.class, "CUT_SELECTION_FRAME_COLOR");
public static final Key KEY_CUT_SELECTION_CONTENT_COLOR = new KeyOf(Color.class, "CUT_SELECTION_CONTENT_COLOR");
public static final Key KEY_COPIED_SELECTION_FRAME_COLOR = new KeyOf(Color.class, "COPY_SELECTION_FRAME_COLOR");
});
}
} catch (DatabaseException e1) {
- Logger.defaultLogError(e1);
+ LOGGER.error("Monitor paste failed", e1);
}
}
return true;
System.out.println("Lp: " + p);
localAt.setTransform(
- localAt.getScaleX(), localAt.getShearX(),
- localAt.getShearY(), localAt.getScaleY(),
+ localAt.getScaleX(), localAt.getShearY(),
+ localAt.getShearX(), localAt.getScaleY(),
p.getX(), p.getY());
if (DEBUG)
import org.simantics.db.layer0.variable.Variable;
import org.simantics.db.layer0.variable.Variables;
import org.simantics.db.request.Read;
-import org.simantics.diagram.Logger;
import org.simantics.diagram.content.Change;
import org.simantics.diagram.content.ConnectionUtil;
import org.simantics.diagram.content.DiagramContentChanges;
import org.simantics.utils.threads.ThreadUtils;
import org.simantics.utils.ui.ErrorLogger;
import org.simantics.utils.ui.SWTUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* CopyPasteHandler is a canvas handler for Commands.CUT, Commands.COPY and
*/
public class CopyPasteHandler extends AbstractDiagramParticipant {
+ private static final Logger LOGGER = LoggerFactory.getLogger(CopyPasteHandler.class);
+
public static final Key KEY_CUT_SELECTION_FRAME_COLOR = new KeyOf(Color.class, "CUT_SELECTION_FRAME_COLOR");
public static final Key KEY_CUT_SELECTION_CONTENT_COLOR = new KeyOf(Color.class, "CUT_SELECTION_CONTENT_COLOR");
public static final Key KEY_COPIED_SELECTION_FRAME_COLOR = new KeyOf(Color.class, "COPY_SELECTION_FRAME_COLOR");
});
}
} catch (DatabaseException e1) {
- Logger.defaultLogError(e1);
+ LOGGER.error("Monitor paste failed", e1);
}
}
return true;
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2020 Association for Decentralized Information Management in
+ * Industry THTH ry.
+ * 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:
+ * Semantum Oy - initial API and implementation
+ *******************************************************************************/
+package org.simantics.diagram.participant;
+
+import org.simantics.Simantics;
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.common.request.UnaryRead;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.procedure.Listener;
+import org.simantics.diagram.connection.rendering.ConnectionCrossings;
+import org.simantics.diagram.stubs.DiagramResource;
+import org.simantics.g2d.canvas.ICanvasContext;
+import org.simantics.g2d.canvas.SGDesignation;
+import org.simantics.g2d.canvas.impl.SGNodeReflection.SGCleanup;
+import org.simantics.g2d.canvas.impl.SGNodeReflection.SGInit;
+import org.simantics.g2d.diagram.participant.AbstractDiagramParticipant;
+import org.simantics.scenegraph.g2d.G2DParentNode;
+import org.simantics.scenegraph.g2d.nodes.ConnectionCrossingsNode;
+import org.simantics.utils.datastructures.Pair;
+import org.simantics.utils.ui.ErrorLogger;
+
+public class ConnectionCrossingsParticipant extends AbstractDiagramParticipant {
+ public static final String CONNECTION_CROSSINGS_NODE_KEY = "connection-crossings";
+
+ private ConnectionCrossingsNode ccNode;
+ private final ConnectionCrossings crossings = new ConnectionCrossings();
+ private ConnectionCrossingStyleListener listener;
+ private Resource diagram;
+
+ public ConnectionCrossingsParticipant(Resource diagram) {
+ this.diagram = diagram;
+ }
+ public ConnectionCrossingsParticipant(double width, ConnectionCrossings.Type type) {
+ crossings.setWidth(width);
+ crossings.setType(type);
+ }
+
+ @SGInit(designation = SGDesignation.CONTROL)
+ public void initSG(G2DParentNode parent) {
+ ccNode = parent.addNode(CONNECTION_CROSSINGS_NODE_KEY, ConnectionCrossingsNode.class);
+ ccNode.setCrossings(crossings);
+ ccNode.setZIndex(Integer.MIN_VALUE / 4);
+ }
+
+ @SGCleanup
+ public void cleanupSG() {
+ if (ccNode != null) {
+ ccNode.remove();
+ ccNode = null;
+ }
+ }
+
+ @Override
+ public void addedToContext(ICanvasContext ctx) {
+ super.addedToContext(ctx);
+
+ if (diagram != null) {
+ listener = new ConnectionCrossingStyleListener(ctx);
+ Simantics.getSession().async(new UnaryRead<Resource, Pair<Double, ConnectionCrossings.Type>>(diagram){
+
+ @Override
+ public Pair<Double, ConnectionCrossings.Type> perform(ReadGraph graph) throws DatabaseException {
+ DiagramResource DIA = DiagramResource.getInstance(graph);
+ Double gap = graph.getPossibleRelatedValue(diagram, DIA.ConnectionCrossingStyle_Width);
+ Resource typeRes = graph.getPossibleObject(diagram, DIA.ConnectionCrossingStyle_HasType);
+ ConnectionCrossings.Type type;
+ if (DIA.ConnectionCrossingStyle_Type_Gap.equals(typeRes)) {
+ type = ConnectionCrossings.Type.GAP;
+ } else if (DIA.ConnectionCrossingStyle_Type_Arc.equals(typeRes)) {
+ type = ConnectionCrossings.Type.ARC;
+ } else if (DIA.ConnectionCrossingStyle_Type_Square.equals(typeRes)) {
+ type = ConnectionCrossings.Type.SQUARE;
+ } else {
+ type = ConnectionCrossings.Type.NONE;
+ }
+ return new Pair<>(gap, type);
+ }
+
+ }, listener);
+ }
+ }
+
+ @Override
+ public void removedFromContext(ICanvasContext ctx) {
+ if (listener != null) {
+ listener.dispose();
+ listener = null;
+ }
+ super.removedFromContext(ctx);
+ }
+
+ class ConnectionCrossingStyleListener implements Listener<Pair<Double, ConnectionCrossings.Type>> {
+ ICanvasContext context;
+ public ConnectionCrossingStyleListener(ICanvasContext context) {
+ this.context = context;
+ }
+ @Override
+ public void execute(final Pair<Double, ConnectionCrossings.Type> result) {
+ context.getThreadAccess().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ ICanvasContext ctx = context;
+ if (ctx == null)
+ return;
+ if (ctx.isDisposed())
+ return;
+ crossings.setWidth(result.first != null ? result.first : 0.0);
+ crossings.setType(result.second);
+ ccNode.repaint();
+ }
+ });
+ }
+ public void dispose() {
+ context = null;
+ }
+ @Override
+ public boolean isDisposed() {
+ return context == null || context.isDisposed();
+ }
+ @Override
+ public void exception(Throwable t) {
+ ErrorLogger.defaultLogError(t);
+ }
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2007 VTT Technical Research Centre of Finland 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:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.diagram.participant;
+
+import java.awt.Font;
+import java.awt.RenderingHints;
+import java.awt.geom.Rectangle2D;
+import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.batik.dom.GenericDOMImplementation;
+import org.apache.batik.svggen.SVGGeneratorContext;
+import org.apache.batik.svggen.SVGGeneratorContext.GraphicContextDefaults;
+import org.apache.batik.svggen.SVGGraphics2D;
+import org.apache.batik.svggen.SVGGraphics2DIOException;
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.widgets.Display;
+import org.simantics.diagram.elements.TextNode;
+import org.simantics.g2d.canvas.ICanvasContext;
+import org.simantics.g2d.canvas.impl.DependencyReflection.Dependency;
+import org.simantics.g2d.diagram.participant.AbstractDiagramParticipant;
+import org.simantics.g2d.diagram.participant.Selection;
+import org.simantics.g2d.element.ElementHints;
+import org.simantics.g2d.element.ElementUtils;
+import org.simantics.g2d.element.IElement;
+import org.simantics.scenegraph.INode;
+import org.simantics.scenegraph.g2d.G2DNode;
+import org.simantics.scenegraph.g2d.G2DSceneGraph;
+import org.simantics.scenegraph.g2d.events.EventHandlerReflection.EventHandler;
+import org.simantics.scenegraph.g2d.events.command.CommandEvent;
+import org.simantics.scenegraph.g2d.events.command.Commands;
+import org.simantics.scenegraph.g2d.nodes.LinkNode;
+import org.simantics.scenegraph.g2d.nodes.SelectionNode;
+import org.simantics.scenegraph.g2d.nodes.SingleElementNode;
+import org.simantics.scenegraph.g2d.nodes.connection.RouteGraphNode;
+import org.simantics.scenegraph.utils.NodeMapper;
+import org.simantics.scenegraph.utils.NodeUtil;
+import org.simantics.utils.ui.ErrorLogger;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+public class CopyAsSVGParticipant extends AbstractDiagramParticipant {
+
+ @Dependency
+ protected Selection sel;
+
+ @EventHandler(priority = 0)
+ public boolean handleCommand(CommandEvent e) {
+ if (e.command.equals(Commands.COPY_AS_SVG)) {
+ Set<IElement> ss = sel.getSelection(0);
+ copyAsSVG(getContext(), ss);
+ return true;
+ }
+ return false;
+ }
+
+ private static void copyAsSVG(ICanvasContext canvasContext, Set<IElement> elements) {
+ G2DSceneGraph sg = canvasContext.getSceneGraph();
+ NodeMapper clipboardNodeMapper = new NodeMapper();
+ List<G2DNode> selectionRenderingDisabledNodes = new ArrayList<G2DNode>();
+ SingleElementNode clipboardNode = sg.addNode("svg-clipboard-temp", SingleElementNode.class);
+
+ try {
+ for (IElement e : elements) {
+ INode node = e.getHint(ElementHints.KEY_SG_NODE);
+ if (node != null) {
+ // Don't render selection. Selection rendering could be a global rendering hint that is adhered by nodes!
+ for(RouteGraphNode n : NodeUtil.collectNodes(node, RouteGraphNode.class)) {
+ n.setIgnoreSelection(true);
+ selectionRenderingDisabledNodes.add(n);
+ }
+ for(SelectionNode n : NodeUtil.collectNodes(node, SelectionNode.class)) {
+ n.setIgnore(true);
+ selectionRenderingDisabledNodes.add(n);
+ }
+ for(TextNode n : NodeUtil.collectNodes(node, TextNode.class)) {
+ n.setShowSelection(false);
+ selectionRenderingDisabledNodes.add(n);
+ }
+
+ String nodeId = clipboardNodeMapper.add(node);
+ LinkNode delegate = clipboardNode.addNode(ElementUtils.generateNodeId(e), LinkNode.class);
+ delegate.setDelegateId( nodeId );
+ }
+ }
+
+ DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();
+
+ String svgNS = "http://www.w3.org/2000/svg";
+ Document document = domImpl.createDocument(svgNS, "svg", null);
+
+ GraphicContextDefaults gcDefaults = new GraphicContextDefaults();
+ SVGGeneratorContext ctx = SVGGeneratorContext.createDefault(document);
+ Map<java.awt.RenderingHints.Key, Object> hintMap = new HashMap<java.awt.RenderingHints.Key, Object>();
+
+ hintMap.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+ hintMap.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ hintMap.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
+ hintMap.put(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ hintMap.put(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
+
+ gcDefaults.setRenderingHints(new RenderingHints(hintMap));
+ gcDefaults.setFont(Font.decode(null));
+ ctx.setGraphicContextDefaults(gcDefaults);
+
+ SVGGraphics2D svgG2D = new SVGGraphics2D(ctx, false);
+
+ StringWriter writer = new StringWriter();
+
+ // Track connection crossings manually since we will render only the clipboard node.
+ sg.getNode(ConnectionCrossingsParticipant.CONNECTION_CROSSINGS_NODE_KEY).render(svgG2D);
+ clipboardNode.render(svgG2D);
+
+ Element root = svgG2D.getRoot();
+
+ Rectangle2D bounds = clipboardNode.getBoundsInLocal(true);
+ if (bounds != null) {
+ root.setAttributeNS(null, "viewBox", bounds.getMinX() + " " + bounds.getMinY() + " " + bounds.getWidth() + " " + bounds.getHeight());
+ root.setAttributeNS(null, "height", Double.toString(bounds.getHeight()));
+ root.setAttributeNS(null, "width", Double.toString(bounds.getWidth()));
+ }
+
+ try {
+ svgG2D.stream(root, writer, false, false);
+ } catch (SVGGraphics2DIOException e1) {
+ ErrorLogger.defaultLogError("Failed to copy the diagram selection as SVG." , e1);
+ }
+
+ byte[] svgContent = writer.toString().getBytes(StandardCharsets.UTF_8);
+
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ Clipboard cb = new Clipboard(Display.getCurrent());
+ cb.setContents(new byte[][] {svgContent},
+ new Transfer[] {
+ SVGTransfer.getInstance()
+ }
+ );
+ }
+ });
+
+ } finally {
+ clipboardNode.removeNodes();
+ clipboardNodeMapper.clear();
+ clipboardNode.remove();
+
+ // Restore the selection rendering state for changed nodes.
+ for (G2DNode n : selectionRenderingDisabledNodes) {
+ if (n instanceof RouteGraphNode) {
+ ((RouteGraphNode) n).setIgnoreSelection(false);
+ } else if (n instanceof SelectionNode) {
+ ((SelectionNode)n).setIgnore(false);
+ } else if (n instanceof TextNode) {
+ ((TextNode)n).setShowSelection(true);
+ }
+ }
+ }
+ }
+}
import org.eclipse.jface.viewers.IStructuredSelection;
import org.simantics.db.Session;
import org.simantics.db.exception.DatabaseException;
-import org.simantics.diagram.Logger;
import org.simantics.diagram.adapter.GraphToDiagramSynchronizer;
import org.simantics.g2d.diagram.DiagramHints;
-import org.simantics.g2d.diagram.DiagramMutator;
import org.simantics.g2d.diagram.DiagramUtils;
import org.simantics.g2d.diagram.IDiagram;
import org.simantics.g2d.diagram.participant.AbstractDiagramParticipant;
import org.simantics.scenegraph.g2d.snap.ISnapAdvisor;
import org.simantics.ui.dnd.LocalObjectTransfer;
import org.simantics.ui.dnd.LocalObjectTransferable;
-import org.simantics.utils.datastructures.Callback;
import org.simantics.utils.logging.TimeLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
abstract public class PopulateSelectionDropParticipant extends AbstractDiagramParticipant implements IDropTargetParticipant {
+ private static final Logger LOGGER = LoggerFactory.getLogger(PopulateSelectionDropParticipant.class);
+
public abstract List<ElementClassDragItem> getElements(Session session, IStructuredSelection selection) throws DatabaseException;
protected GraphToDiagramSynchronizer synchronizer;
}
- } catch (UnsupportedFlavorException e) {
- Logger.defaultLogError(e);
- } catch (IOException e) {
- Logger.defaultLogError(e);
- } catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ } catch (DatabaseException | IOException | UnsupportedFlavorException e) {
+ LOGGER.error("Unexpected failure", e);
}
}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2020 Association for Decentralized Information Management in
+ * Industry THTH ry.
+ * 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:
+ * Semantum Oy - initial API and implementation
+ *******************************************************************************/
+package org.simantics.diagram.participant;
+
+import java.nio.charset.StandardCharsets;
+
+import org.eclipse.swt.dnd.ByteArrayTransfer;
+
+public class SVGTransfer extends ByteArrayTransfer {
+ private static SVGTransfer instance = new SVGTransfer();
+ private static final String TYPE_NAME = "image/svg+xml";
+ private static final int TYPE_ID = registerType(TYPE_NAME);
+
+ public static byte[] formatContent(String svg) {
+ return svg.getBytes(StandardCharsets.UTF_8);
+ }
+
+ public static SVGTransfer getInstance () {
+ return instance;
+ }
+
+ @Override
+ protected int[] getTypeIds(){
+ return new int[] {TYPE_ID};
+ }
+
+ @Override
+ protected String[] getTypeNames(){
+ return new String[] {TYPE_NAME};
+ }
+}
\ No newline at end of file
abstract protected String getNodePrefix();
abstract protected Class<?> getNodeClass();
-
+
+ public IconButtonStyleBase(Object identity) {
+ super(identity);
+ }
+
+ public IconButtonStyleBase() {
+ super();
+ }
+
private AffineTransform translateAndScaleIfNeeded(AffineTransform tr, Vec2d offset, boolean relativeTransform) {
if(relativeTransform) {
if(!offset.isZero()) {
}
public void register(INode node) {
- // We use ths size of this map to determine whether updates are needed, this is done in AWT thread
+ // We use the size of this map to determine whether updates are needed, this is done in AWT thread
synchronized(requesters) {
if(requesters.size() == 0) {
if(state.compareAndSet(false, true)) {
- ThreadUtils.getNonBlockingWorkExecutor().scheduleAtFixedRate(this, 0, 500, TimeUnit.MILLISECONDS);
+ ThreadUtils.getNonBlockingWorkExecutor().scheduleWithFixedDelay(this, 0, 500, TimeUnit.MILLISECONDS);
}
}
ICanvasContext context = DiagramNodeUtil.getPossibleCanvasContext((G2DNode)node);
Stroke stroke = G2DUtils.getStroke(g, g.getPossibleObject(structuralConnectionType, g2d.HasStroke));
Double branchPointRadius = g.getPossibleRelatedValue(structuralConnectionType, g2d.HasBranchPointRadius, Bindings.DOUBLE);
Double rounding = g.getPossibleRelatedValue(structuralConnectionType, g2d.HasRounding, Bindings.DOUBLE);
+ Double offset = g.getPossibleRelatedValue(structuralConnectionType, g2d.HasOffset, Bindings.DOUBLE);
- return new ConnectionVisuals(color, strokeType, stroke, branchPointRadius, rounding);
+ return new ConnectionVisuals(color, strokeType, stroke, branchPointRadius, rounding, offset);
}
StrokeType toStrokeType(Resource strokeType) {
Resource composite = graph.getPossibleObject(diagram, ModelingResources.getInstance(graph).DiagramToComposite);
if (composite != null) {
variable = Variables.getPossibleVariable(graph, composite);
+ } else {
+ variable = Variables.getPossibleVariable(graph, diagram);
}
}
this.group = group;
}
+ public ISymbolItem getSubject() {
+ return proxy;
+ }
+
@Override
public String getName() {
return proxy.getName();
import org.simantics.diagram.symbolcontribution.CompositeSymbolGroup;
import org.simantics.diagram.symbolcontribution.IIdentifiedObject;
import org.simantics.diagram.symbolcontribution.ISymbolProvider;
-import org.simantics.diagram.symbolcontribution.IdentifiedObject;
import org.simantics.diagram.symbolcontribution.SymbolProviderFactory;
import org.simantics.diagram.symbollibrary.IModifiableSymbolGroup;
import org.simantics.diagram.symbollibrary.ISymbolGroup;
json.append(" \"res\" : [");
int pos = 0;
for(int i=0;i<res.length;i++) {
- if(pos > 0) json.append(",");
- Object r = res[i];
- if(r instanceof IdentifiedObject) {
- Object id = ((IdentifiedObject) r).getId();
- if(id instanceof IAdaptable) {
- Object resource = ((IAdaptable) id).getAdapter(Resource.class);
- if(resource != null) {
- long rid = ((Resource)resource).getResourceId();
- json.append(Long.toString(rid));
- pos++;
- }
- }
- }
+ if(pos > 0) json.append(",");
+ Object r = res[i];
+ if(r instanceof IAdaptable) {
+ Resource resource = ((IAdaptable) r).getAdapter(Resource.class);
+ if(resource != null) {
+ long rid = resource.getResourceId();
+ json.append(Long.toString(rid));
+ pos++;
+ }
+ }
}
json.append("] }");
- StringSelection text = new StringSelection(json.toString());
- PlaintextTransfer plainText = new PlaintextTransfer(json.toString());
+ String jsonText = json.toString();
+ StringSelection text = new StringSelection(jsonText);
+ PlaintextTransfer plainText = new PlaintextTransfer(jsonText);
return new MultiTransferable(local, text, plainText);
*******************************************************************************/
package org.simantics.diagram.synchronization.graph;
-import gnu.trove.map.hash.THashMap;
-
import java.util.Map;
import java.util.Set;
import java.util.function.BiFunction;
import org.simantics.graph.db.TransferableGraphs;
import org.simantics.graph.representation.TransferableGraph1;
import org.simantics.layer0.Layer0;
+import org.simantics.utils.datastructures.BinaryFunction;
+
+import gnu.trove.map.hash.THashMap;
+import gnu.trove.set.hash.THashSet;
/**
* This class contains utility methods for the basic cut/copy operations
public static final boolean DEBUG_COPY = DebugPolicy.DEBUG_COPY_PASTE;
+ private static class Statement4 {
+ public final Statement stm;
+ public final Resource inverse;
+ public Statement4(Statement stm, Resource inverse) {
+ this.stm = stm;
+ this.inverse = inverse;
+ }
+ }
+
/**
* @param context a synchronization context instance, such as
* {@link GraphToDiagramSynchronizer}
* @throws DatabaseException
*/
public static Resource copy2(WriteGraph graph, Resource source,
- BiFunction<ReadGraph, Statement, StatementEvaluation> advisor) throws DatabaseException {
- return copy2(graph, source, 0, advisor, new THashMap<Object, Object>());
+ BiFunction<ReadGraph, Statement, StatementEvaluation> advisor)
+ throws DatabaseException
+ {
+ return copy2(graph, source, advisor, new THashMap<>());
}
/**
* @throws DatabaseException
*/
public static Resource copy2(WriteGraph graph, Resource source,
- BiFunction<ReadGraph, Statement, StatementEvaluation> advisor, Map<Object, Object> copyMap)
- throws DatabaseException {
- return copy2(graph, source, 0, advisor, copyMap);
+ BiFunction<ReadGraph, Statement, StatementEvaluation> advisor,
+ Map<Object, Object> copyMap)
+ throws DatabaseException
+ {
+ Set<Statement4> pendingStatements = new THashSet<>();
+ Resource result = copy2(graph, source, 0, advisor, copyMap, pendingStatements);
+ postProcessStatements(graph, copyMap, pendingStatements);
+ return result;
+ }
+
+ /**
+ * Post-process pending statement
+ *
+ * Rule: If both the subject and object of a pending source statement have
+ * been copied, then the pending statement should also be copied.
+ */
+ private static void postProcessStatements(
+ WriteGraph graph,
+ Map<Object, Object> copyMap,
+ Set<Statement4> pendingStatements)
+ throws DatabaseException
+ {
+ if (pendingStatements.isEmpty())
+ return;
+
+ if (DEBUG_COPY)
+ System.out.println("post processing " + pendingStatements.size() + " pending statements");
+ for (Statement4 srcStm : pendingStatements) {
+ // At this point, it is certain that srcStm subject has been copied
+ // but test it anyway.
+ Resource subjectCopy = (Resource) copyMap.get(srcStm.stm.getSubject());
+ Resource objectCopy = (Resource) copyMap.get(srcStm.stm.getObject());
+ if (subjectCopy == null || objectCopy == null) {
+ if (DEBUG_COPY)
+ System.out.println("skipping pending statement: " + NameUtils.toString(graph, srcStm.stm));
+ continue;
+ }
+ if (DEBUG_COPY)
+ System.out.println("copying pending statement: " + NameUtils.toString(graph, srcStm.stm));
+ graph.claim(subjectCopy, srcStm.stm.getPredicate(), srcStm.inverse, objectCopy);
+ }
}
private static Resource copy2(final WriteGraph graph, final Resource source, final int level,
- BiFunction<ReadGraph, Statement, StatementEvaluation> advisor, Map<Object, Object> copyMap)
+ BiFunction<ReadGraph, Statement, StatementEvaluation> advisor, Map<Object, Object> copyMap,
+ Set<Statement4> pendingSourceStatements)
throws DatabaseException {
if (DEBUG_COPY)
System.out.println("[" + level + "] CopyAdvisorUtil.copy(" + NameUtils.getSafeName(graph, source) + ", advisor=" + advisor + ")");
if (DEBUG_COPY)
System.out.println("[" + level + "]\t\tcopy whole object");
- Resource clone = copy2(graph, obj, level + 1, advisor, copyMap);
+ Resource clone = copy2(graph, obj, level + 1, advisor, copyMap, pendingSourceStatements);
graph.claim(copy, relation, inverse, clone);
}
} else {
- if (DEBUG_COPY)
- System.out.println("[" + level + "]\t\tskipping statement");
+ if (graph.isSubrelationOf(relation, L0.IsRelatedTo)) {
+ if (DEBUG_COPY)
+ System.out.println("[" + level + "]\t\tmarking statement as pending for post-processing");
+ pendingSourceStatements.add(new Statement4(stm, inverse));
+ } else {
+ if (DEBUG_COPY)
+ System.out.println("[" + level + "]\t\tskipping weak statement");
+ }
}
}
}
List<Resource> graphOrder = OrderedSetUtils.toList(g, l);
Set<Resource> graphContents = new HashSet<Resource>(graphOrder);
- List<Resource> diagramOrder = new ArrayList<Resource>(order.size());
- Map<Resource, Integer> diagramOrderIndex = new HashMap<Resource, Integer>(order.size());
- int i = 0;
+ List<Resource> newGraphOrder = new ArrayList<>();
for (IElement e : order) {
Object obj = ElementUtils.getObject(e);
if (obj instanceof Resource) {
// This prevents errors in situations where #order contains
// elements that no longer exist in the diagram.
if (graphContents.contains(r)) {
- diagramOrder.add(r);
- diagramOrderIndex.put(r, Integer.valueOf(i));
- ++i;
+ newGraphOrder.add(r);
}
}
}
- // Reorder the backend list according to diagramOrder
- i = 0;
- for (Resource r : graphOrder) {
- Integer di = diagramOrderIndex.get(r);
- if (di != null) {
- int targetIndex = di;
- int graphIndex = i++;
- if (graphIndex != targetIndex) {
- // Check if the predecessor of r is already correct.
- // If it is, we don't have to do anything for r.
- Resource graphPrev = OrderedSetUtils.prev(g, l, r);
- Resource after = null;
- if (targetIndex == 0) {
- after = l;
- if (l.equals(graphPrev))
- continue;
- } else {
- after = diagramOrder.get(targetIndex - 1);
- if (after.equals(graphPrev))
- continue;
- }
-
- // r needs to be repositioned.
- OrderedSetUtils.remove(g, l, r);
- OrderedSetUtils.addAfter(g, l, after, r);
+ // Safety measure for possible missing elements
+ if (graphOrder.size() != newGraphOrder.size()) {
+ Set<Resource> added = new HashSet<Resource>(newGraphOrder);
+ for (Resource r : graphOrder) {
+ if (!added.contains(r)) {
+ newGraphOrder.add(r);
}
}
}
+
+ OrderedSetUtils.reorder(g, l, newGraphOrder);
}
}
int[] lines2;
int[] terminals1;
int[] terminals2;
- boolean isHorizontal;
+ boolean isHorizontal;
+ boolean invertFlagRotation;
double isectX;
double isectY;
public Split(int[] interface1, int[] interface2, int[] lines2,
int[] terminals1, int[] terminals2, boolean isHorizontal,
+ boolean invertFlagRotation,
double isectX, double isectY) {
this.interface1 = interface1;
this.interface2 = interface2;
this.terminals1 = terminals1;
this.terminals2 = terminals2;
this.isHorizontal = isHorizontal;
+ this.invertFlagRotation = invertFlagRotation;
this.isectX = isectX;
this.isectY = isectY;
}
this.terminals1 = readInts(it);
this.terminals2 = readInts(it);
this.isHorizontal = Boolean.parseBoolean(it.next());
+ this.invertFlagRotation = Boolean.parseBoolean(it.next());
this.isectX = Double.parseDouble(it.next());
this.isectY = Double.parseDouble(it.next());
}
b.append("$");
b.append(isHorizontal);
b.append("$");
+ b.append(invertFlagRotation);
+ b.append("$");
b.append(isectX);
b.append("$");
b.append(isectY);
toResources(modi.terminals1),
toResources(modi.terminals2),
modi.isHorizontal,
+ modi.invertFlagRotation,
modi.isectX,
modi.isectY
);
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.views.ontology;bundle-version="1.1.0",
org.simantics.user.ontology;bundle-version="1.0.0",
org.simantics.simulation.ontology;bundle-version="1.1.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.document.base.ontology
Automatic-Module-Name: org.simantics.document.base.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.image2.ontology;bundle-version="1.2.0",
org.simantics.silk.ontology;bundle-version="1.1.0",
org.simantics.workbench.ontology;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.document.linking.ontology
Automatic-Module-Name: org.simantics.document.linking.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.editors;bundle-version="1.0.0",
org.simantics.scl.osgi;bundle-version="1.0.4",
org.simantics.objmap2;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.document.linking.actions,
org.simantics.document.linking.report,
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.selectionview.ontology;bundle-version="1.1.0",
org.simantics.graphfile.ontology;bundle-version="0.1.0",
org.simantics.action.ontology;bundle-version="1.1.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.document
Automatic-Module-Name: org.simantics.document.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Activator: org.simantics.document.server.io.Activator
Bundle-Vendor: Semantum Oy
Require-Bundle: org.eclipse.core.runtime
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.document.server.io
Automatic-Module-Name: org.simantics.document.server.io
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.document.server;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Semantum Oy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle:
org.simantics;bundle-version="1.0.0",
org.simantics.structural2;bundle-version="1.1.1",
StandardAssertedGraphPropertyVariable ass = (StandardAssertedGraphPropertyVariable)property;
if("dataDefinitions".equals(ass.property.name) || "commands".equals(ass.property.name) || "pollingFunction".equals(ass.property.name)) {
storePropertyValueAndExceptions(graph, parent, ass.property.name, property, map);
+ continue;
}
- continue;
}
Resource predicate = property.getPossiblePredicateResource(graph);
if(predicate != null) {
StandardAssertedGraphPropertyVariable ass = (StandardAssertedGraphPropertyVariable)property;
if("dataDefinitions".equals(ass.property.name) || "commands".equals(ass.property.name) || "pollingFunction".equals(ass.property.name)) {
result.add(ass.property.name);
+ continue;
}
- continue;
}
Resource predicate = property.getPossiblePredicateResource(graph);
if(predicate != null) {
package org.simantics.document.server.request;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import org.simantics.db.AsyncReadGraph;
import org.simantics.db.ReadGraph;
import org.simantics.db.common.procedure.adapter.TransientCacheAsyncListener;
-import org.simantics.db.common.request.AsyncReadRequest;
+import org.simantics.db.common.request.UnaryAsyncRead;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.request.VariableRead;
import org.simantics.db.layer0.variable.Variable;
super(var);
}
- @Override
- public List<JSONObject> perform(ReadGraph graph) throws DatabaseException {
-
- long s = System.nanoTime();
-
- Set<Variable> nodes = graph.syncRequest(new NodesRequest(variable), TransientCacheAsyncListener.<Set<Variable>>instance());
- HashSet<JSONObject> rs = new HashSet<JSONObject>(); // result
- if(nodes.isEmpty()) {
- return Collections.emptyList();
- }
+ static class CollectNodesRequest extends UnaryAsyncRead<Collection<Variable>, Collection<JSONObject>> {
- if(PROFILE) {
- long dura = System.nanoTime()-s;
- System.err.println("DocumentRequest1 " + System.identityHashCode(this) + " in " + 1e-6*dura + "ms. " + variable.getURI(graph));
+ public CollectNodesRequest(Collection<Variable> nodes) {
+ super(nodes);
}
- graph.syncRequest(new AsyncReadRequest() {
+ @Override
+ public void perform(AsyncReadGraph graph, AsyncProcedure<Collection<JSONObject>> procedure) {
+ HashSet<JSONObject> rs = new HashSet<JSONObject>(); // result
- @Override
- public void run(AsyncReadGraph graph) throws DatabaseException {
+ for(Variable node : parameter) {
+ graph.asyncRequest(new NodeRequest(node), new AsyncProcedure<JSONObject> () {
- for(Variable node : nodes) {
- graph.asyncRequest(new NodeRequest(node), new AsyncProcedure<JSONObject> () {
-
- @Override
- public void execute(AsyncReadGraph graph, JSONObject result) {
- synchronized (rs) {
- rs.add(result);
- }
+ @Override
+ public void execute(AsyncReadGraph graph, JSONObject result) {
+ synchronized(rs) {
+ rs.add(result);
}
+ }
- @Override
- public void exception(AsyncReadGraph graph, Throwable throwable) {
- }
+ @Override
+ public void exception(AsyncReadGraph graph, Throwable throwable) {
+ }
+
+ });
- });
-
- }
-
}
-
- });
+ procedure.execute(graph, rs);
+
+ }
+
+ }
+
+ @Override
+ public List<JSONObject> perform(ReadGraph graph) throws DatabaseException {
+
+ long s = System.nanoTime();
+
+ Set<Variable> nodes = graph.syncRequest(new NodesRequest(variable), TransientCacheAsyncListener.<Set<Variable>>instance());
+ if(nodes.isEmpty()) {
+ return Collections.emptyList();
+ }
+
+ if(PROFILE) {
+ long dura = System.nanoTime()-s;
+ System.err.println("DocumentRequest1 " + System.identityHashCode(this) + " in " + 1e-6*dura + "ms. " + variable.getURI(graph));
+ }
+ Collection<JSONObject> rs = graph.syncRequest(new CollectNodesRequest(nodes));
if(PROFILE) {
long dura = System.nanoTime()-s;
package org.simantics.document.server.request;
import org.simantics.db.ReadGraph;
+import org.simantics.db.common.request.UnaryRead;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.variable.Variable;
import org.simantics.db.layer0.variable.Variables;
-import org.simantics.db.request.Read;
import org.simantics.document.server.handler.AbstractEventHandler;
import org.simantics.structural.stubs.StructuralResource2;
-public class HandleEventRequest implements Read<AbstractEventHandler> {
-
- final String id;
+public class HandleEventRequest extends UnaryRead<String, AbstractEventHandler> {
public HandleEventRequest(String id) {
- this.id = id;
+ super(id);
}
@Override
StructuralResource2.getInstance(graph);
- Variable variable = Variables.getPossibleVariable(graph, id);
+ Variable variable = Variables.getPossibleVariable(graph, parameter);
if(variable == null) return null;
// System.err.println("EVENT " + variable.getURI(graph));
if(handler instanceof AbstractEventHandler)
return (AbstractEventHandler) handler;
else
- throw new DatabaseException("Handler for " + id + " is not instance of AbstractEventHandler (it is instance of " + (handler != null ? handler.getClass() : null) + ")");
+ throw new DatabaseException("Handler for " + parameter + " is not instance of AbstractEventHandler (it is instance of " + (handler != null ? handler.getClass() : null) + ")");
}
}
\ No newline at end of file
import java.util.Collection;
import java.util.Collections;
+import java.util.HashSet;
import java.util.Set;
import org.simantics.db.AsyncReadGraph;
import org.simantics.db.ReadGraph;
-import org.simantics.db.common.request.AsyncReadRequest;
+import org.simantics.db.common.request.UnaryAsyncRead;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.request.VariableChildren;
import org.simantics.db.layer0.request.VariableRead;
import org.simantics.utils.threads.logger.ITask;
import org.simantics.utils.threads.logger.ThreadLogger;
-import gnu.trove.set.hash.THashSet;
-
public class NodesRequest extends VariableRead<Set<Variable>> {
public NodesRequest(Variable var) {
super(var);
}
- @Override
- public Set<Variable> perform(ReadGraph graph) throws DatabaseException {
+ static class CollectNodesRequest2 extends UnaryAsyncRead<Collection<Variable>, Set<Variable>> {
- ITask task = DocumentRequest.PROFILE ? ThreadLogger.task(this) : null;
+ public CollectNodesRequest2(Collection<Variable> nodes) {
+ super(nodes);
+ }
- StructuralResource2.getInstance(graph);
- if(variable == null)
- return Collections.emptySet();
+ @Override
+ public void perform(AsyncReadGraph graph, AsyncProcedure<Set<Variable>> procedure) {
+ HashSet<Variable> rs = new HashSet<Variable>(); // result
- Set<Variable> nodes = new THashSet<Variable>();
+ for(Variable node : parameter) {
+ graph.asyncRequest(new NodesRequest2(node), new AsyncProcedure<Set<Variable>> () {
- Collection<Variable> children = graph.syncRequest(new VariableChildren(variable));
+ @Override
+ public void execute(AsyncReadGraph graph, Set<Variable> result) {
+ synchronized(rs) {
+ rs.addAll(result);
+ }
+ }
- graph.syncRequest(new AsyncReadRequest() {
+ @Override
+ public void exception(AsyncReadGraph graph, Throwable throwable) {
+ }
- @Override
- public void run(AsyncReadGraph graph) throws DatabaseException {
+ });
- for(Variable child : children) {
- graph.asyncRequest(new NodesRequest2(child), new AsyncProcedure<Set<Variable>>() {
+ }
+ procedure.execute(graph, rs);
- @Override
- public void execute(AsyncReadGraph graph, Set<Variable> result) {
- synchronized(nodes) {
- nodes.addAll(result);
- }
- }
+ }
- @Override
- public void exception(AsyncReadGraph graph, Throwable throwable) {
- }
-
- });
- }
+ }
- }
+ @Override
+ public Set<Variable> perform(ReadGraph graph) throws DatabaseException {
+
+ ITask task = DocumentRequest.PROFILE ? ThreadLogger.task(this) : null;
+
+ StructuralResource2.getInstance(graph);
+ if(variable == null)
+ return Collections.emptySet();
+
+ Collection<Variable> children = graph.syncRequest(new VariableChildren(variable));
- });
+ Set<Variable> nodes = graph.syncRequest(new CollectNodesRequest2(children));
if(DocumentRequest.PROFILE) task.finish();
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.scl.db;bundle-version="0.1.3",
org.simantics.scl.ui;bundle-version="0.5.0",
org.eclipse.jface.text;bundle-version="3.7.1"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.document.swt.core,
org.simantics.document.swt.core.base,
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.datatypes.ontology;bundle-version="1.0.0",
org.simantics.structural.ontology;bundle-version="1.2.0",
org.simantics.document.base.ontology;bundle-version="1.1.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.document.swt.ontology
Automatic-Module-Name: org.simantics.document.swt.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.simulation.ontology;bundle-version="1.0.0",
org.simantics.selectionview.ui.ontology;bundle-version="1.1.0",
org.simantics.workbench.ontology;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.document.ui
Automatic-Module-Name: org.simantics.document.ui.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.annotation.ui;bundle-version="1.0.0",
org.eclipse.ui.editors;bundle-version="3.9.0",
org.eclipse.jface.text,
- org.slf4j.api;bundle-version="1.7.2"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+ org.slf4j.api
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.document.ui,
org.simantics.document.ui.actions,
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Semantum Oy
Bundle-Activator: org.simantics.document.Activator
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics;bundle-version="1.0.0",
org.simantics.scenegraph.loader;bundle-version="1.0.0",
org.simantics.views;bundle-version="1.1.0",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.dublincore.ontology
Bundle-Version: 1.1.0.qualifier
Require-Bundle: org.simantics.layer0
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.layer0
Automatic-Module-Name: org.simantics.dublincore.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Reusable Editors for Windows
Bundle-SymbolicName: org.simantics.editors.win32;singleton:=true
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.4.0",
org.eclipse.ui;bundle-version="3.4.0",
org.eclipse.core.resources;bundle-version="3.4.0",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.utils.ui;bundle-version="1.0.0",
org.simantics.utils.ui.workbench;bundle-version="1.0.0",
org.eclipse.ui.ide;bundle-version="3.7.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.editors,
org.simantics.editors.internal;x-friends:="org.simantics.editors.win32"
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.equation.solver,
org.simantics.equation.stubs
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.simantics.equation
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.project.ontology;bundle-version="1.0.0",
org.simantics.viewpoint.ontology;bundle-version="1.0.0",
org.simantics.silk.ontology;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.event.ontology
Bundle-Vendor: Semantum Oy
Automatic-Module-Name: org.simantics.event.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.browsing.ui.model;bundle-version="1.0.0",
org.simantics.views.swt;bundle-version="1.0.0",
org.simantics.selectionview;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.event,
org.simantics.event.util,
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
-#Wed Sep 30 09:11:05 EEST 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Require-Bundle: org.eclipse.core.runtime,
org.simantics.utils;bundle-version="1.0.0",
org.eclipse.core.resources;bundle-version="3.6.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.excel
Automatic-Module-Name: org.simantics.excel
output.. = bin/
bin.includes = META-INF/,\
.,\
- SimanticsExcel.dll
+ SimanticsExcel.dll,\
+ scl/
-//#include "stdafx.h"
-
-//#ifndef _UNICODE
-//#define _UNICODE
-//#endif
-
#include <sstream>
#include <map>
-//#include <cmath>
-//#include <TCHAR.H>
+#include <stdio.h>
+#include <tchar.h>
+#include <cstring>
+#include <atlstr.h>
using namespace std;
-#import "c:/program files (x86)/common files/microsoft shared/office12/mso.dll" \
- rename( "RGB", "MSORGB" )
-
-using namespace Office;
-
-#import "c:/program files (x86)/common files/microsoft shared/vba/vba6/vbe6ext.olb" \
-
-using namespace VBIDE;
+// mso.dll
+#import "libid:{2df8d04c-5bfa-101b-bde5-00aa0044de52}" auto_rename
+// vb6ext.olb
+#import "libid:{0002e157-0000-0000-c000-000000000046}" auto_rename
+// excel.exe
+#import "libid:{00020813-0000-0000-c000-000000000046}" auto_rename
-#import "c:/program files (x86)/microsoft office/office12/excel.exe" \
- rename( "DialogBox", "ExcelDialogBox" ) \
- rename( "RGB", "ExcelRGB" ) \
- rename( "CopyFile", "ExcelCopyFile" ) \
- rename( "ReplaceText", "ExcelReplaceText" )
+using namespace Excel;
#include "jni2.h"
#define SIMANTICS_DEBUG(...)
-using namespace std;
-using namespace Excel;
+//using namespace std;
+//using namespace Office;
-map<int, Excel::_WorksheetPtr> handles;
+map<int, _WorksheetPtr> handles;
static int handleCounter = 1;
void replace(std::string &s, const std::string &s1, const std::string &s2) {
}
-/**
+
JNIEXPORT jdouble JNICALL Java_org_simantics_excel_Excel_getDouble(JNIEnv *env, jobject, jint handle, jint row, jint column) {
SIMANTICS_DEBUG("getDouble(%d, %d)\r\n", row, column);
}
JNIEXPORT jstring JNICALL Java_org_simantics_excel_Excel_getString(JNIEnv *env, jobject, jint handle, jint row, jint column) {
-
+ USES_CONVERSION;
//string val = getString(env, value);
SIMANTICS_DEBUG("getString(%d, %d)\r\n", row, column);
Excel::RangePtr range = sheet->Cells;
if(!range) return NULL;
- variant_t val = range->Item[row+1][column+1];
- if (val.vt != VT_NULL) { // val.vt seems to be always VT_DISPATCH.
- try {
+ _bstr_t val = _bstr_t(range->Item[row + 1][column + 1]);
+ //if (val.vt != VT_NULL) { // val.vt seems to be always VT_DISPATCH.
+ //try {
//this call will crash the application, if the cell is empty!
- _bstr_t bstrt = val;
- TCHAR text[1024];
+ //_bstr_t bstrt = val;
+ //std::string text(val);
+ //CString text(val);
+ //text.
+ //TCHAR text[1024];
// TODO: this uses wide character (16-bit) while NewStringUTF expext regular character (8-bit), hence Java gets only the fisrt charater of the whole string.
- _stprintf(text, _T("%s"), (LPCTSTR)bstrt);
+ //_stprintf(text, _T("%s"), (LPCTSTR)bstrt);
//const char *text = bstrt;
SIMANTICS_DEBUG("%s\r\n",text);
-
- // this code returns "??" for all cells.
- //BSTR bstr = val.bstrVal;
- //const char *text = _com_util::ConvertBSTRToString(bstr);
- jstring ret = env->NewStringUTF((const char*)text);
- delete[] text;
- return ret;
- } catch (...) {
- return NULL;
- }
- }
- SIMANTICS_DEBUG("%d\r\n",val.vt);
- return NULL;
+ string text(val);
+
+
+ return env->NewStringUTF(text.c_str());
+
+ //} catch (...) {
+ // return NULL;
+ //}
+ //}
+ //SIMANTICS_DEBUG("%d\r\n",val.vt);
+ //return NULL;
}
-*/
\ No newline at end of file

-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimanticsExcel", "SimanticsExcel.vcproj", "{E106958A-412F-4782-81CD-DF380D66BA6B}"
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.40629.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimanticsExcel", "SimanticsExcel.vcxproj", "{E106958A-412F-4782-81CD-DF380D66BA6B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E106958A-412F-4782-81CD-DF380D66BA6B}.Debug|Win32.ActiveCfg = Debug|Win32
{E106958A-412F-4782-81CD-DF380D66BA6B}.Debug|Win32.Build.0 = Debug|Win32
- {E106958A-412F-4782-81CD-DF380D66BA6B}.Release|Win32.ActiveCfg = Release|Win32
- {E106958A-412F-4782-81CD-DF380D66BA6B}.Release|Win32.Build.0 = Release|Win32
+ {E106958A-412F-4782-81CD-DF380D66BA6B}.Release|Win32.ActiveCfg = Release|x64
+ {E106958A-412F-4782-81CD-DF380D66BA6B}.Release|Win32.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{E106958A-412F-4782-81CD-DF380D66BA6B}</ProjectGuid>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir>$(Configuration)\</IntDir>
+ <LinkIncremental>true</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir>$(Configuration)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ <GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<FloatingPointExceptions>true</FloatingPointExceptions>
- <PrecompiledHeader>
- </PrecompiledHeader>
+ <PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>false</MkTypLibCompatible>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <FloatingPointExceptions>true</FloatingPointExceptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <ShowProgress>LinkVerboseLib</ShowProgress>
+ <ModuleDefinitionFile>.\SimanticsExcel.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>false</MkTypLibCompatible>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader />
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <ModuleDefinitionFile>.\SimanticsExcel.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>false</MkTypLibCompatible>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
- <TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="SimanticsExcel.cpp" />
</ItemGroup>
<ItemGroup>
- <None Include="SimanticsExcel.def" />
- <None Include="res\SimanticsExcel.rc2" />
<None Include="Debug\excel.tlh" />
<None Include="Debug\mso.tlh" />
- <None Include="ReadMe.txt" />
<None Include="Debug\vbe6ext.tlh" />
+ <None Include="res\SimanticsExcel.rc2" />
+ <None Include="SimanticsExcel.def" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="jni2.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
</ItemGroup>
+ <ItemGroup>
+ <Text Include="ReadMe.txt" />
+ </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
JNIEXPORT jint JNICALL Java_org_simantics_excel_Excel_setName(JNIEnv *env, jobject, jint handle, jint row, jint column, jstring value);
JNIEXPORT jint JNICALL Java_org_simantics_excel_Excel_setVisible(JNIEnv *env, jobject, jint handle, jboolean value);
JNIEXPORT jint JNICALL Java_org_simantics_excel_Excel_close(JNIEnv *env, jobject, jint handle);
-
-//JNIEXPORT jstring JNICALL Java_org_simantics_excel_Excel_getString(JNIEnv *env, jobject, jint handle, jint row, jint column);
-//JNIEXPORT jdouble JNICALL Java_org_simantics_excel_Excel_getDouble(JNIEnv *env, jobject, jint handle, jint row, jint column);
+JNIEXPORT jstring JNICALL Java_org_simantics_excel_Excel_getString(JNIEnv *env, jobject, jint handle, jint row, jint column);
+JNIEXPORT jdouble JNICALL Java_org_simantics_excel_Excel_getDouble(JNIEnv *env, jobject, jint handle, jint row, jint column);
#ifdef __cplusplus
}
--- /dev/null
+importJava "org.simantics.excel.Excel" where
+
+ data Excel
+
+ @JavaName "getInstance"
+ excelInstance :: () -> <Proc> Excel
+
+ @JavaName "open2_"
+ openExcelSheet :: Excel -> String -> String -> <Proc> Integer
+ @JavaName "close_"
+ closeExcelSheet :: Excel -> Integer -> <Proc> ()
+ @JavaName "setString_"
+ setExcelString :: Excel -> Integer -> Integer -> Integer -> String -> <Proc> Integer
+ @JavaName "getString_"
+ getExcelString :: Excel -> Integer -> Integer -> Integer -> <Proc> String
+ @JavaName "setDouble_"
+ setExcelDouble :: Excel -> Integer -> Integer -> Integer -> Double -> <Proc> Integer
+ @JavaName "getDouble_"
+ getExcelDouble :: Excel -> Integer -> Integer -> Integer -> <Proc> Double
private static Excel instance;
+ public static Excel getInstance() throws ExcelException {
+ return getInstance(System.out);
+ }
+
public static Excel getInstance(PrintStream out) throws ExcelException {
if(instance == null) {
File extractDir = context.getDataFile("");
if (extractDir == null)
- throw new IOException("Bundle '" + Activator.PLUGIN_ID + " context has no file system support. Cannot extract server executables.");
+ throw new IOException("Bundle '" + Activator.PLUGIN_ID + " context has no file system support. Cannot extract DLLs.");
if (!extractDir.exists())
if (!extractDir.mkdir())
- throw new IOException("Could not create directory '" + extractDir.getCanonicalPath() + "' for storing Balas solver data.");
+ throw new IOException("Could not create directory '" + extractDir.getCanonicalPath() + "' for communicating with Excel.");
return extractDir;
if (!extractDir.exists())
if (!extractDir.mkdir())
- throw new IOException("Could not create directory '" + extractDir.getCanonicalPath() + "' for storing Balas solver data.");
+ throw new IOException("Could not create directory '" + extractDir.getCanonicalPath() + "' for communicating with Excel.");
String asd = "";
ExecEnvironment env = ExecEnvironment.calculate();
private native int setVisible(int handle, boolean value);
private native int close(int handle);
-// private native double getDouble(int handle, int row, int column);
-// private native String getString(int handle, int row, int column);
+ private native double getDouble(int handle, int row, int column);
+ private native String getString(int handle, int row, int column);
final ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();
});
}
+ public int open2_(final String fileName, final String sheetName) {
+ try {
+ return scheduler.submit(new Callable<Integer>() {
+ @Override
+ public Integer call() throws Exception {
+ return Integer.parseInt(open(fileName, sheetName));
+ }
+ }).get();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return -1;
+ }
+ }
+
public String open_(final String fileName, final String sheetName) {
try {
return scheduler.submit(new Callable<String>() {
}
}
-// public double getDouble_(final int handle, final int row, final int column) {
-// try {
-// return scheduler.submit(new Callable<Double>() {
-// @Override
-// public Double call() throws Exception {
-// return getDouble(handle, row, column);
-// }
-// }).get();
-// } catch (Exception e) {
-// e.printStackTrace();
-// return Double.NaN;
-// }
-// }
-//
-// public String getString_(final int handle, final int row, final int column) {
-// try {
-// return scheduler.submit(new Callable<String>() {
-// @Override
-// public String call() throws Exception {
-// return getString(handle, row, column);
-// }
-// }).get();
-// } catch (Exception e) {
-// e.printStackTrace();
-// return null;
-// }
-// }
+ public double getDouble_(final int handle, final int row, final int column) {
+ try {
+ return scheduler.submit(new Callable<Double>() {
+ @Override
+ public Double call() throws Exception {
+ return getDouble(handle, row, column);
+ }
+ }).get();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return Double.NaN;
+ }
+ }
+
+ public String getString_(final int handle, final int row, final int column) {
+ try {
+ return scheduler.submit(new Callable<String>() {
+ @Override
+ public String call() throws Exception {
+ return getString(handle, row, column);
+ }
+ }).get();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="scratch"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics;bundle-version="1.0.0",
com.lowagie.text;bundle-version="2.1.7";resolution:=optional,
org.slf4j.api
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.export.core,
org.simantics.export.core.error,
org.simantics.export.core.impl,
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.db.layer0;bundle-version="1.1.0",
org.simantics.utils.ui;bundle-version="1.1.0",
org.simantics.ui;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.simantics.export.ui
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="testcases"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Compression Codecs
Bundle-SymbolicName: org.simantics.fastlz
Bundle-Version: 1.2.1.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Activator: org.simantics.fastlz.bundle.Activator
Require-Bundle: org.eclipse.core.runtime,
org.junit;bundle-version="4.12.0";resolution:=optional,
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.fileimport;bundle-version="1.0.0",
org.slf4j.api,
org.simantics.db
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Import-Package: javax.inject;version="1.0.0"
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.simantics.fileimport.ui
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.simantics.fileimport.Activator
Require-Bundle: org.eclipse.core.runtime,
- org.apache.log4j,
org.simantics.db,
org.simantics,
org.simantics.graphfile;bundle-version="0.1.0",
org.simantics.graphfile.ontology;bundle-version="0.1.0",
org.simantics.modeling;bundle-version="1.1.1",
org.slf4j.api
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.fileimport
Service-Component: OSGI-INF/FileReferenceFileImport.xml,
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>\r
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
- <classpathentry kind="src" path="src"/>\r
- <classpathentry kind="output" path="bin"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
-eclipse.preferences.version=1\r
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled\r
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8\r
-org.eclipse.jdt.core.compiler.compliance=1.8\r
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error\r
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error\r
-org.eclipse.jdt.core.compiler.source=1.8\r
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.eclipse.osgi.services,
org.simantics.utils.datastructures,
org.slf4j.api
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Bundle-Vendor: Semantum Oy
Export-Package: org.simantics.filesystem.services.sizetracker
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Version: 1.1.0.qualifier
Require-Bundle: org.simantics.layer0,
org.simantics.selectionview.ontology;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.diagram.stubs
Automatic-Module-Name: org.simantics.g2d.ontology
G2D.StrokeType.Nonscaling : G2D.StrokeType
G2D.HasRounding <R L0.HasProperty : L0.FunctionalRelation
--> L0.Double
+G2D.HasOffset <R L0.HasProperty : L0.FunctionalRelation
+ --> L0.Double
G2D.HasBranchPointRadius <R L0.HasProperty : L0.FunctionalRelation
--> L0.Double
G2D.LineEnd <T L0.Property
G2D.Color <T L0.Literal
@L0.assert L0.HasDataType $(Float[4])
+ @L0.assert L0.HasValueType "Vector Float"
L0.HasDescription "A 4-component BGRA color as floats."
+
G2D.HasColor <R L0.HasProperty : L0.FunctionalRelation
L0.HasLabel "Color"
--> G2D.Color
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.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.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.utils.thread,
org.simantics.utils.thread.swt,
org.simantics.utils.ui;bundle-version="1.0.0",
- org.apache.commons.collections;bundle-version="3.2.1",
org.apache.commons.math3,
gnu.trove3;bundle-version="3.0.0",
org.simantics.scenegraph;bundle-version="1.1.1";visibility:=reexport,
org.simantics.db;bundle-version="1.1.0",
org.simantics.ui;bundle-version="1.0.0",
org.slf4j.api,
- org.eclipse.collections.eclipse-collections-api,
- org.eclipse.collections.eclipse-collections
+ org.eclipse.collections
Export-Package: org.simantics.g2d.canvas,
org.simantics.g2d.canvas.impl,
org.simantics.g2d.chassis,
org.simantics.g2d.tooltip,
org.simantics.g2d.utils,
org.simantics.g2d.utils.geom
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ClassPath: .
Automatic-Module-Name: org.simantics.g2d
return result;
}
+
+ /**
+ * We need to have separate class for SelectionNode, so that SCLSceneGraph can handle this properly.
+ *
+ */
+ public static class SelectionShapeNode extends ShapeNode {
+
+ private static final long serialVersionUID = -5393630944240940166L;
+
+ }
+
public void paintSelectionFrame(int selectionId, G2DParentNode elementNode, G2DParentNode selectionNode, final IElement e, Color color) {
// The element node already has the correct transform.
AffineTransform selectionTransform = ElementUtils.getTransform(e);// no it doesnt ... new AffineTransform();
Outline outline = (Outline) es.getAdapter(Outline.class);
if (outline == null || outline.getElementShape(e) == null)
continue;
- ShapeNode shapenode = shapeholder.getOrCreateNode(getNodeId("outline", e, es), ShapeNode.class);
+ ShapeNode shapenode = shapeholder.getOrCreateNode(getNodeId("outline", e, es), SelectionShapeNode.class);
// shapenode.setShape(es.getSelectionShape(e));
// shapenode.setStroke(SELECTION_STROKE);
// shapenode.setScaleStroke(true);
G2DParentNode shapeholder = selectionNode.getOrCreateNode(getNodeId("outlines", e), G2DParentNode.class);
for (SelectionOutline es : shapeHandlers) {
- ShapeNode shapenode = shapeholder.getOrCreateNode(getNodeId("outline", e, es), ShapeNode.class);
+ ShapeNode shapenode = shapeholder.getOrCreateNode(getNodeId("outline", e, es), SelectionShapeNode.class);
// shapenode.setShape(es.getSelectionShape(e));
// shapenode.setStroke(SELECTION_STROKE);
// shapenode.setScaleStroke(true);
int index = elements.indexOf(e);
if (index != -1 && selectedElements.contains(e)) {
changed |= diagram.moveTo(e, nextPos);
- nextPos = index;
}
+ nextPos = index;
}
if (changed) {
notifyZOrderListeners(diagram);
int index = elements.indexOf(e);
if (index != -1 && selectedElements.contains(e)) {
changed |= diagram.moveTo(e, nextPos);
- nextPos = index;
}
+ nextPos = index;
}
if (changed) {
notifyZOrderListeners(diagram);
pickRect = s.getBounds2D();
Shape es = ElementUtils.getElementShapeOrBounds(e);
+ // getElementShapeOrBounds returns shape or bounds in local coords!
+ es = ElementUtils.getTransform(e).createTransformedShape(es);
PathIterator iter = es.getPathIterator(null);
Collection<double[]> segments = new ArrayList<double[]>();
PathUtils.toLineSegments(iter, segments);
for (double[] seg : segments) {
if (pickRect.intersectsLine(seg[0], seg[1], seg[2], seg[3]))
return true;
+ if (pickRect.contains(seg[0], seg[1]))
+ return true;
+ if (pickRect.contains(seg[2], seg[3]))
+ return true;
}
+
return false;
}
ctx.getThreadAccess().asyncExec(() -> {
//System.out.println(Thread.currentThread() + ": update scene graph(" + el + ")");
// Update scene graph and repaint.
- el.getElementClass().getSingleItem(GalleryItemSGNode.class).update(el);
- ctx.getContentContext().setDirty();
+ if (!ctx.isDisposed()) {
+ el.getElementClass().getSingleItem(GalleryItemSGNode.class).update(el);
+ ctx.getContentContext().setDirty();
+ }
});
break;
}
import org.simantics.g2d.image.Image;
import org.simantics.scenegraph.Node;
import org.simantics.scenegraph.g2d.G2DParentNode;
-import org.simantics.scenegraph.g2d.nodes.ShapeNode;
+import org.simantics.scenegraph.g2d.nodes.ShapeNode2;
/**
* @author Tuukka Lehtonen
private static final EnumSet<Feature> defaultFeats = VECTOR;
Shape shape;
- Paint paint;
+ Paint fillPaint;
+ Paint strokePaint;
Stroke stroke;
EnumSet<Feature> feats;
boolean scaleStroke = false;
}
public ShapeImage(Shape shape, Paint fill, Stroke stroke, boolean scaleStroke) {
- this(shape, fill, stroke, scaleStroke, defaultFeats);
+ this(shape, fill, stroke, fill, scaleStroke, defaultFeats);
}
public ShapeImage(Shape shape, Paint fill, Stroke stroke, EnumSet<Feature> features) {
- this(shape, fill, stroke, false, features);
+ this(shape, fill, stroke, fill, false, features);
+ }
+ public ShapeImage(Shape shape, Paint fill, Stroke stroke, Paint strokeColor, boolean scaleStroke) {
+ this(shape, fill, stroke, strokeColor, scaleStroke, defaultFeats);
}
- public ShapeImage(Shape shape, Paint fill, Stroke stroke, boolean scaleStroke, EnumSet<Feature> features) {
+ public ShapeImage(Shape shape, Paint fill, Stroke stroke, Paint strokeColor, boolean scaleStroke, EnumSet<Feature> features) {
this.shape = shape;
- this.paint = fill;
+ this.fillPaint = fill;
+ this.strokePaint = strokeColor;
this.stroke = stroke;
this.scaleStroke = scaleStroke;
this.feats = features;
@Override
public Node init(G2DParentNode parent) {
- ShapeNode shapeNode = parent.getOrCreateNode("ShapeImage", ShapeNode.class);
+ ShapeNode2 shapeNode = parent.getOrCreateNode("ShapeImage", ShapeNode2.class);
shapeNode.setShape(shape);
shapeNode.setStroke(stroke);
- shapeNode.setFill(paint != null);
- shapeNode.setColor(paint != null ? paint : Color.BLACK);
+ shapeNode.setFillColor(fillPaint);
+ shapeNode.setStrokeColor(strokePaint != null ? strokePaint : Color.BLACK);
shapeNode.setScaleStroke(scaleStroke);
return shapeNode;
}
// long delay = 1000 / 25; this sounds quite frequent
long delay = 1000 / 10;
lastTrigger = System.currentTimeMillis();
- timer.scheduleAtFixedRate(task, delay, delay, TimeUnit.MILLISECONDS);
+ timer.scheduleWithFixedDelay(task, delay, delay, TimeUnit.MILLISECONDS);
}
@HintListener(Class = Hints.class, Field = "KEY_CANVAS_BOUNDS")
return;
long interval = getInterval();
- future = ThreadUtils.getNonBlockingWorkExecutor().scheduleAtFixedRate(onTimer, DEFAULT_INTERVAL, interval, TimeUnit.MILLISECONDS);
+ future = ThreadUtils.getNonBlockingWorkExecutor().scheduleWithFixedDelay(onTimer, DEFAULT_INTERVAL, interval, TimeUnit.MILLISECONDS);
}
private void cancelTimer() {
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.gnuplot
Bundle-Version: 0.0.1.qualifier
Bundle-Vendor: Semantum Oy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.gnuplot
Bundle-ClassPath: .
Automatic-Module-Name: org.simantics.gnuplot
<!-- common settings for all modules -->
<properties>
+ <maven.compiler.source>11</maven.compiler.source>
+ <maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <tycho-version>1.5.0</tycho-version>
+ <tycho-version>1.6.0</tycho-version>
</properties>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>versions-maven-plugin</artifactId>
+ <version>2.7</version>
+ <configuration>
+ <generateBackupPoms>false</generateBackupPoms>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.3</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
- <version>2.6</version>
+ <version>3.2.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="tests"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Compiler
Bundle-SymbolicName: org.simantics.graph.compiler;singleton:=true
Bundle-Version: 1.1.18.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.graph;bundle-version="1.1.15";visibility:=reexport,
org.simantics.databoard;bundle-version="0.6.6",
freemarker;bundle-version="2.3.23",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Transferable Graph Database Binding
Bundle-SymbolicName: org.simantics.graph.db
Bundle-Version: 1.1.9.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.graph;bundle-version="1.0.0";visibility:=reexport,
org.simantics.db.common;bundle-version="0.8.0",
gnu.trove3;bundle-version="3.0.3",
org.simantics.layer0;bundle-version="1.0.0",
- org.slf4j.api;bundle-version="1.7.2"
+ org.slf4j.api
Export-Package: org.simantics.graph.db
Bundle-Vendor: VTT Technical Research Centre of Finland
Automatic-Module-Name: org.simantics.graph.db
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="tests"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Transferable Graph Runtime
Bundle-SymbolicName: org.simantics.graph
Bundle-Version: 1.1.15.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.databoard;bundle-version="0.6.6",
gnu.trove3;bundle-version="3.0.0";visibility:=reexport,
org.junit;bundle-version="4.12.0";resolution:=optional
private static Path replaceExtension(Path p, String newExtension) {
String newName = p.getFileName().toString();
- if (newName.contains("."))
- newName = newName.split("\\.")[0];
+ int lastDot = newName.lastIndexOf('.');
+ if (lastDot > -1)
+ newName = newName.substring(0, lastDot);
return p.resolveSibling(newName + newExtension);
}
}
Identity consistsOf = findExternal(tg, "http://www.simantics.org/Layer0-1.1/ConsistsOf");
Identity hasName = findExternal(tg, "http://www.simantics.org/Layer0-1.1/HasName");
- for (int i = 0; i < tg.statements.length; i += 4) {
- if (tg.statements[i] == parentResource) {
- if (tg.statements[i + 1] == consistsOf.resource) {
- Identity identity = getIdentity(tg, tg.statements[i + 3]);
- if (identity != null) {
- if (identity.definition instanceof Internal) {
- Internal internal = (Internal) identity.definition;
- result.put(internal.name, identity);
- }
- } else {
- int possibleNameResource = getPossibleObject2(tg, tg.statements[i + 3], hasName);
- if (possibleNameResource != NOT_FOUND) {
- Value value = findValue(tg, possibleNameResource);
- if (value != null) {
- try {
- String name = (String) value.value.getValue(Bindings.STRING);
- result.put(name, new Identity(tg.statements[i + 3], new Internal(tg.statements[i], name)));
- } catch (AdaptException e) {
- e.printStackTrace();
+ if(consistsOf != null && hasName != null) {
+ for (int i = 0; i < tg.statements.length; i += 4) {
+ if (tg.statements[i] == parentResource) {
+ if (tg.statements[i + 1] == consistsOf.resource) {
+ Identity identity = getIdentity(tg, tg.statements[i + 3]);
+ if (identity != null) {
+ if (identity.definition instanceof Internal) {
+ Internal internal = (Internal) identity.definition;
+ result.put(internal.name, identity);
+ }
+ } else {
+ int possibleNameResource = getPossibleObject2(tg, tg.statements[i + 3], hasName);
+ if (possibleNameResource != NOT_FOUND) {
+ Value value = findValue(tg, possibleNameResource);
+ if (value != null) {
+ try {
+ String name = (String) value.value.getValue(Bindings.STRING);
+ result.put(name, new Identity(tg.statements[i + 3], new Internal(tg.statements[i], name)));
+ } catch (AdaptException e) {
+ e.printStackTrace();
+ }
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Version: 0.1.0.qualifier
Bundle-Vendor: VTT Technical Research Centre of Finland
Require-Bundle: org.simantics.layer0;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.graphfile.ontology
Automatic-Module-Name: org.simantics.graphfile.ontology
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.simantics.graphfile.ui.ontology</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.simantics.graph.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <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>
+ <nature>org.simantics.graph.nature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: http://www.simantics.org/GraphFileUI
+Bundle-SymbolicName: org.simantics.graphfile.ui.ontology
+Bundle-Version: 1.0.0.qualifier
+Automatic-Module-Name: org.simantics.graphfile.ui.ontology
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Require-Bundle: org.simantics.modeling.ontology;bundle-version="1.2.0",
+ org.simantics.silk.ontology;bundle-version="1.1.0",
+ org.simantics.layer0;bundle-version="1.1.0",
+ org.simantics.viewpoint.ontology;bundle-version="1.2.0",
+ org.simantics.action.ontology;bundle-version="1.1.0",
+ org.simantics.graphfile.ontology;bundle-version="0.1.0"
--- /dev/null
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ graph.tg
--- /dev/null
+L0 = <http://www.simantics.org/Layer0-1.1>
+MOD = <http://www.simantics.org/Modeling-1.2>
+SILK = <http://www.simantics.org/Silk-1.1>
+VP = <http://www.simantics.org/Viewpoint-1.2>
+ACT = <http://www.simantics.org/Action-1.1>
+GF = <http://www.simantics.org/GraphFile-0.1>
+
+GFUI = <http://www.simantics.org/GraphFileUI-1.0> : L0.Ontology
+ @L0.new
+ L0.HasResourceClass "org.simantics.graphfile.ui.ontology.GraphFileUIResource" : L0.String
+
+GFUI.BrowseContext : VP.BrowseContext
+
+ACTIONS = GFUI.BrowseContext.Actions : L0.Library
+
+ACTIONS.ImportFileDocument : ACT.Action
+ACTIONS.ImportDocumentFolder : ACT.Action
+ACTIONS.NewFileDocument : ACT.Action
+ACTIONS.NewDocumentFolder : ACT.Action
+ACTIONS.ExportFileDocument : ACT.Action
+ACTIONS.ExportDocumentFolder : ACT.Action
+
+GFUI.ModelingBrowseContext : VP.BrowseContext
+ VP.BrowseContext.IsIncludedIn MOD.ModelingBrowseContext
+ @VP.relationChildRule L0.Library L0.ConsistsOf GF.Folder
+ @VP.relationChildRule L0.Library L0.ConsistsOf GF.File
+ @VP.relationChildRule GF.Folder L0.ConsistsOf GF.File
+ @VP.relationChildRule GF.Folder L0.ConsistsOf GF.Folder
+
+ @VP.constantImageRule GF.Folder SILK.folder_page
+ @VP.constantImageRule GF.File SILK.page_white
+ @VP.customLabelRule GF.File VP.ResourceNameLabelRule
+
+GFUI.ModelingActionContext : VP.BrowseContext
+ VP.BrowseContext.IsIncludedIn MOD.ModelingActionContext
+ @VP.actionContribution "Folder" L0.Library SILK.folder_page VP.NewActionCategory ACTIONS.NewDocumentFolder
+ @VP.actionContribution "Folder" GF.Folder SILK.folder_page VP.NewActionCategory ACTIONS.NewDocumentFolder
+ @VP.actionContribution "File" L0.Library SILK.page_white VP.NewActionCategory ACTIONS.NewFileDocument
+ @VP.actionContribution "File" GF.Folder SILK.page_white VP.NewActionCategory ACTIONS.NewFileDocument
+
+ @VP.actionContribution "Files" L0.Library SILK.page_white VP.ImportActionCategory ACTIONS.ImportFileDocument
+ @VP.actionContribution "Files" GF.Folder SILK.page_white VP.ImportActionCategory ACTIONS.ImportFileDocument
+
+ @VP.actionContribution "Folder" L0.Library SILK.folder_page VP.ImportActionCategory ACTIONS.ImportDocumentFolder
+ @VP.actionContribution "Folder" GF.Folder SILK.folder_page VP.ImportActionCategory ACTIONS.ImportDocumentFolder
+
+ @VP.actionContribution "File" GF.File SILK.page_white VP.ExportActionCategory ACTIONS.ExportFileDocument
+ @VP.actionContribution "Folder" GF.Folder SILK.folder_page VP.ExportActionCategory ACTIONS.ExportDocumentFolder
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.simantics.graphfile.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: GraphfileUI
+Bundle-SymbolicName: org.simantics.graphfile.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Automatic-Module-Name: org.simantics.graphfile.ui
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Require-Bundle: org.eclipse.ui.editors,
+ org.simantics.ui,
+ org.eclipse.jface.text;bundle-version="3.12.0",
+ org.simantics.graphfile.ontology,
+ org.slf4j.api;bundle-version="1.7.25",
+ org.simantics.document.ui;bundle-version="1.0.0"
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2013, 2014 Association for Decentralized
+ Information Management in Industry THTH ry.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the THTH Simantics
+ Division Member Component License which accompanies this
+ distribution, and is available at
+ http://www.simantics.org/legal/sdmcl-v10.html
+
+ Contributors:
+ Semantum Oy - initial API and implementation
+ -->
+
+<adapters>
+ <target interface="org.simantics.db.layer0.adapter.ActionFactory">
+ <resource uri="http://www.simantics.org/GraphFileUI-1.0/BrowseContext/Actions/ImportFileDocument"
+ class="org.simantics.document.ui.actions.ImportDocument">
+ <graph/>
+ <string>http://www.simantics.org/Layer0-0.0/ConsistsOf</string>
+ </resource>
+ <resource uri="http://www.simantics.org/GraphFileUI-1.0/BrowseContext/Actions/ImportDocumentFolder"
+ class="org.simantics.document.ui.actions.ImportDocumentFolder">
+ <graph/>
+ <string>http://www.simantics.org/GraphFile-0.0/Folder</string>
+ <string>http://www.simantics.org/Layer0-0.0/ConsistsOf</string>
+ </resource>
+ <resource uri="http://www.simantics.org/GraphFileUI-1.0/BrowseContext/Actions/NewFileDocument"
+ class="org.simantics.document.ui.actions.NewFileDocument">
+ <graph/>
+ <string>http://www.simantics.org/Layer0-0.0/ConsistsOf</string>
+ <string>File</string>
+ </resource>
+ <resource uri="http://www.simantics.org/GraphFileUI-1.0/BrowseContext/Actions/NewDocumentFolder"
+ class="org.simantics.document.ui.actions.NewDocumentFolder">
+ <graph/>
+ <string>http://www.simantics.org/GraphFile-0.0/Folder</string>
+ <string>http://www.simantics.org/Layer0-0.0/ConsistsOf</string>
+ </resource>
+ <resource uri="http://www.simantics.org/GraphFileUI-1.0/BrowseContext/Actions/ExportFileDocument"
+ class="org.simantics.document.ui.actions.ExportDocumentFile" />
+ <resource uri="http://www.simantics.org/GraphFileUI-1.0/BrowseContext/Actions/ExportDocumentFolder"
+ class="org.simantics.document.ui.actions.ExportDocumentFolder">
+ <graph/>
+ <string>http://www.simantics.org/Layer0-0.0/ConsistsOf</string>
+ <string>false</string>
+ </resource>
+ </target>
+
+</adapters>
\ No newline at end of file
--- /dev/null
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ adapters.xml
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ default="false"
+ name="Text Editor"
+ icon="platform:/plugin/com.famfamfam.silk/icons/page_white.png"
+ class="org.simantics.graphfile.ui.editor.PlainTextEditor"
+ id="org.simantics.graphfile.ui.editor.plaintexteditor">
+ </editor>
+ </extension>
+
+ <extension
+ point="org.simantics.ui.resourceEditorAdapter">
+ <adapter
+ label="Text Editor"
+ priority="11"
+ editorId="org.simantics.graphfile.ui.editor.plaintexteditor"
+ type_uris="http://www.simantics.org/Document-0.0/FileDocument">
+ </adapter>
+ </extension>
+</plugin>
--- /dev/null
+package org.simantics.graphfile.ui.editor;
+
+import java.util.function.Supplier;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.editors.text.TextEditor;
+import org.simantics.Simantics;
+import org.simantics.db.Session;
+import org.simantics.db.common.request.ParametrizedRead;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.layer0.request.combinations.Combinators;
+import org.simantics.ui.workbench.IResourceEditorInput;
+import org.simantics.ui.workbench.ResourceEditorSupport;
+import org.simantics.ui.workbench.TitleRequest;
+import org.simantics.ui.workbench.TitleUpdater;
+import org.simantics.ui.workbench.ToolTipRequest;
+import org.simantics.ui.workbench.editor.input.InputValidationCombinators;
+
+/**
+ * @author Antti Villberg
+ */
+public class PlainTextEditor extends TextEditor {
+
+ boolean isDisposed = false;
+
+ ParametrizedRead<IResourceEditorInput, Boolean> INPUT_VALIDATOR =
+ Combinators.compose(
+ InputValidationCombinators.hasURI(),
+ InputValidationCombinators.extractInputResource()
+ );
+
+ ResourceEditorSupport support;
+
+ public PlainTextEditor() {
+ super();
+ setDocumentProvider(new PlainTextEditorDocumentProvider());
+ //setSourceViewerConfiguration(new QueueTextEditorViewerConfiguration(new QueueTextEditorColorManager()));
+ }
+
+ @Override
+ public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+ super.init(site, input);
+
+ support = new ResourceEditorSupport(this, INPUT_VALIDATOR);
+ support.activateValidation();
+ try {
+ getResourceEditorInput().init(null);
+ } catch (DatabaseException e) {
+ throw new PartInitException("Failed to initialize " + input, e);
+ }
+ }
+
+ protected IResourceEditorInput getResourceEditorInput() {
+ return (IResourceEditorInput) getEditorInput();
+ }
+
+ @Override
+ public void createPartControl(Composite parent) {
+ super.createPartControl(parent);
+ updatePartName();
+ }
+
+ private void updatePartName() {
+ setPartName(getEditorInput().getName());
+
+ Session session = Simantics.peekSession();
+ if (session != null) {
+ Supplier<Boolean> disposedCallback = () -> isDisposed;
+ session.asyncRequest(
+ new TitleRequest(null, getResourceEditorInput()),
+ new TitleUpdater(getSite().getShell().getDisplay(), this::setPartName, disposedCallback));
+ session.asyncRequest(
+ new ToolTipRequest(getSite().getId(), getResourceEditorInput()),
+ new TitleUpdater(getSite().getShell().getDisplay(), this::setTitleToolTip, disposedCallback));
+ }
+
+ }
+
+ @Override
+ public void dispose() {
+ isDisposed = true;
+ if (support != null) {
+ support.dispose();
+ support = null;
+ }
+ super.dispose();
+ }
+
+}
--- /dev/null
+package org.simantics.graphfile.ui.editor;
+
+import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.source.AnnotationModel;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.ui.texteditor.AbstractDocumentProvider;
+import org.simantics.Simantics;
+import org.simantics.databoard.Bindings;
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.WriteGraph;
+import org.simantics.db.common.request.UniqueRead;
+import org.simantics.db.common.request.WriteRequest;
+import org.simantics.db.common.utils.NameUtils;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.document.DocumentResource;
+import org.simantics.graphfile.ontology.GraphFileResource;
+import org.simantics.ui.workbench.ResourceEditorInput;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class PlainTextEditorDocumentProvider extends AbstractDocumentProvider {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(PlainTextEditor.class);
+
+ protected String currentText;
+
+ @Override
+ protected IDocument createDocument(Object element) throws CoreException {
+ ResourceEditorInput input = (ResourceEditorInput)element;
+ final Resource resource = input.getResource();
+ try {
+ return Simantics.getSession().syncRequest(new UniqueRead<Document>() {
+ @Override
+ public Document perform(ReadGraph graph) throws DatabaseException {
+
+ GraphFileResource GF = GraphFileResource.getInstance(graph);
+ DocumentResource DOC = DocumentResource.getInstance(graph);
+ if (!graph.isInstanceOf(resource, DOC.FileDocument))
+ throw new DatabaseException("Invalid input resource for PlainTextEditor: " + NameUtils.getSafeName(graph, resource));
+
+ byte[] bytes = graph.getPossibleRelatedValue(resource, GF.HasFiledata, Bindings.BYTE_ARRAY);
+
+ currentText = bytes != null ? new String(bytes, StandardCharsets.UTF_8) : "";
+
+ return new Document(currentText);
+
+ }
+ });
+ } catch (DatabaseException e) {
+ StringWriter sw = new StringWriter();
+ LOGGER.error("Failed to create document", e);
+ return new Document(sw.toString());
+ }
+ }
+
+ @Override
+ protected IAnnotationModel createAnnotationModel(Object element)
+ throws CoreException {
+ return new AnnotationModel();
+ }
+
+ @Override
+ protected void doSaveDocument(IProgressMonitor monitor, Object element,
+ IDocument document, boolean overwrite) throws CoreException {
+ ResourceEditorInput input = (ResourceEditorInput)element;
+ final Resource resource = input.getResource();
+ final String text = document.get();
+ currentText = text;
+ Simantics.getSession().asyncRequest(new WriteRequest() {
+ @Override
+ public void perform(WriteGraph graph) throws DatabaseException {
+ graph.markUndoPoint();
+ GraphFileResource GF = GraphFileResource.getInstance(graph);
+ graph.claimLiteral(resource, GF.HasFiledata, text.getBytes(StandardCharsets.UTF_8));
+ graph.claimLiteral(resource, GF.LastModified, System.currentTimeMillis());
+ }
+ });
+ }
+
+ @Override
+ protected IRunnableContext getOperationRunner(IProgressMonitor monitor) {
+ return null;
+ }
+
+ @Override
+ public boolean isModifiable(Object element) {
+ return true;
+ }
+
+ @Override
+ public boolean isReadOnly(Object element) {
+ return false;
+ }
+
+ @Override
+ public boolean canSaveDocument(Object element) {
+ return !getDocument(element).get().equals(currentText);
+ }
+
+}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.eclipse.ui.ide;bundle-version="3.7.0",
org.eclipse.jface;bundle-version="3.7.0",
org.simantics.utils.ui;bundle-version="1.1.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.graphfile.adapters,
org.simantics.graphfile.hack,
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="examples"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Graphviz UI
Bundle-SymbolicName: org.simantics.graphviz.ui
Bundle-Version: 1.1.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.eclipse.ui;bundle-version="3.5.0",
org.simantics.graphviz;bundle-version="1.0.0",
org.eclipse.core.runtime;bundle-version="3.5.0",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="examples"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.simantics.graphviz.Activator
Require-Bundle: org.eclipse.core.runtime,
- org.slf4j.api;bundle-version="1.7.25"
+ org.slf4j.api
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.graphviz,
org.simantics.graphviz.continuation,
org.simantics.graphviz.drawable,
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.help.base,
org.apache.commons.logging;bundle-version="1.0.4",
- org.apache.pdfbox;bundle-version="2.0.2",
- org.apache.pdfbox.fontbox;bundle-version="2.0.2"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+ org.apache.pdfbox;bundle-version="[2.0.2,2.1.0)",
+ org.apache.pdfbox.fontbox;bundle-version="[2.0.2,2.1.0)"
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Automatic-Module-Name: org.simantics.help.base
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.document.base.ontology,
org.eclipse.mylyn.wikitext;bundle-version="3.0.6",
org.eclipse.mylyn.wikitext.mediawiki;bundle-version="3.0.6"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.help.core
Bundle-Vendor: Semantum Oy
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.viewpoint.ontology;bundle-version="1.2.0",
org.simantics.modeling.ontology;bundle-version="1.2.0",
org.simantics.silk.ontology;bundle-version="1.1.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.help
Bundle-Vendor: Semantum Oy
Automatic-Module-Name: org.simantics.help.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.eclipse.core.resources;bundle-version="3.10.1",
org.simantics.help.core,
org.slf4j.api
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Bundle-Vendor: Semantum Oy
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Semantum Oy
Automatic-Module-Name: org.simantics.history.rest
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.history;bundle-version="1.0.0",
org.eclipse.core.runtime;bundle-version="3.13.0",
org.glassfish.jersey.core.jersey-server,
- javax.ws.rs-api,
+ jakarta.ws.rs-api,
org.simantics.scl.compiler,
org.simantics.scl.osgi,
org.eclipse.jetty.servlet,
org.glassfish.jersey.containers.jersey-container-servlet-core,
javax.servlet-api,
- org.eclipse.jetty.server,
- org.eclipse.jetty.util,
- org.eclipse.jetty.io,
- org.eclipse.jetty.servlets,
+ org.eclipse.jetty.server;bundle-version="9.4.24",
+ org.eclipse.jetty.util;bundle-version="9.4.24",
+ org.eclipse.jetty.io;bundle-version="9.4.24",
+ org.eclipse.jetty.servlets;bundle-version="9.4.24",
com.fasterxml.jackson.core.jackson-core;bundle-version="2.8.8",
com.fasterxml.jackson.core.jackson-annotations;bundle-version="2.8.0",
com.fasterxml.jackson.core.jackson-databind;bundle-version="2.8.8",
org.simantics.db;bundle-version="1.1.0",
org.simantics.db.common;bundle-version="1.1.0",
org.simantics.db.layer0;bundle-version="1.1.0",
- org.simantics;bundle-version="1.0.0",
- org.eclipse.jetty.servlets
+ org.simantics;bundle-version="1.0.0"
Bundle-ClassPath: .
Export-Package: org.simantics.history.rest
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="test"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: History
Bundle-SymbolicName: org.simantics.history;singleton:=true
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.databoard;bundle-version="0.6.2",
org.junit;bundle-version="4.8.1";resolution:=optional,
org.simantics.utils;bundle-version="1.1.0";resolution:=optional,
*/
public class CSVFormatter {
+ /**
+ * This is the tolerance used to decide whether or not the last data point of
+ * the exported items is included in the exported material or not. If
+ * <code>0 <= (t - t(lastDataPoint) < {@value #RESAMPLING_END_TIMESTAMP_INCLUSION_TOLERANCE}</code>
+ * is true, then the last exported data point will be
+ * <code>lastDataPoint</code>, with timestamp <code>t(lastDataPoint)</code> even
+ * if <code>t > t(lastDataPoint)</code>.
+ *
+ * <p>
+ * This works around problems where floating point inaccuracy causes a data
+ * point to be left out from the the export when it would be fair for the user
+ * to expect the data to be exported would contain a point with time stamp
+ * <code>9.999999999999996</code> when sampling with time-step <code>1.0</code>
+ * starting from time <code>0.0</code>.
+ */
+ private static final double RESAMPLING_END_TIMESTAMP_INCLUSION_TOLERANCE = 1e-13;
+
List<Item> items = new ArrayList<Item>();
double from = -Double.MAX_VALUE;
double end = Double.MAX_VALUE;
// Sampling based on given startTime and timeStep
if(timeStep > 0) {
- // Find the first sample time that contains data
+ // Find the first sample time that contains data if startTime < _from
double n = Math.max(0, Math.ceil((_from-startTime) / timeStep));
time = startTime + n*timeStep;
BigDecimal bigTime = new BigDecimal(String.valueOf(time));
BigDecimal bigTimeStep = new BigDecimal(String.valueOf(timeStep));
+ // Loop kill-switch for the case where timeStep > 0
+ boolean breakAfterNextWrite = false;
+
+// System.out.println("time: " + time);
+// System.out.println("timeStep: " + timeStep);
+// System.out.println("_end: " + Double.toString(_end));
+
for (Item i : items) i.iter.gotoTime(time);
do {
if ( monitor!=null && monitor.isCanceled() ) return;
sb.append( lineFeed );
- // Read next values, and the following times
- if ( timeStep>0.0 ) {
- bigTime = bigTime.add(bigTimeStep);
- time = bigTime.doubleValue();
+ if (breakAfterNextWrite)
+ break;
+
+ // Read next values, and the following times
+ if ( timeStep>0.0 ) {
+ bigTime = bigTime.add(bigTimeStep);
+ time = bigTime.doubleValue();
+
+ // gitlab #529: prevent last data point from getting dropped
+ // due to small imprecisions in re-sampling mode.
+ double diff = time - _end;
+ if (diff > 0 && diff <= RESAMPLING_END_TIMESTAMP_INCLUSION_TOLERANCE) {
+ time = _end;
+ breakAfterNextWrite = true;
+ // Take floating point inaccuracy into account when re-sampling
+ // to prevent the last data point from being left out if there
+ // is small-enough imprecision in the last data point time stamp
+ // to be considered negligible compared to expected stepped time.
+ }
+
} else {
// Get smallest end time that is larger than current time
Double nextTime = null;
if(contains(i, time)) hasMore = true;
}
+ //System.out.println("hasMore @ " + time + " (" + bigTime + ") = " + hasMore);
if(!hasMore) break;
} while (time<=_end);
private Formatter evaluateFormatter(Format format, DecimalSeparator target) {
// Probe decimal separator
String onePointTwo = format.format(1.2);
- System.out.println("formatted zeroPointOne: " + onePointTwo);
+ //System.out.println("formatted zeroPointOne: " + onePointTwo);
DecimalSeparator formatSeparator;
if (onePointTwo.indexOf('.') != -1) {
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.image.ontology
Bundle-Version: 1.1.0.qualifier
Require-Bundle: org.simantics.layer0
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.diagram.stubs
Automatic-Module-Name: org.simantics.image.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.image2.ontology;bundle-version="1.0.0",
org.simantics.scenegraph;bundle-version="1.1.1"
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.image.ui,
org.simantics.image.ui.modelBrowser
Bundle-Vendor: Semantum Oy
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.image2.ontology
Bundle-Version: 1.2.0.qualifier
Require-Bundle: org.simantics.layer0
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.image2.ontology
Automatic-Module-Name: org.simantics.image2.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Issue Framework Common Parts
Bundle-SymbolicName: org.simantics.issues.common;singleton:=true
Bundle-Version: 1.1.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.issues;bundle-version="1.1.0",
org.simantics.layer0;bundle-version="1.0.0",
org.simantics.issues.ontology;bundle-version="1.1.0";visibility:=reexport,
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.layer0x.ontology;bundle-version="1.0.0",
org.simantics.views.ontology;bundle-version="1.1.0",
org.simantics.scenegraph.ontology;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.issues.ontology
Automatic-Module-Name: org.simantics.issues.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.viewpoint.ontology;bundle-version="1.1.0",
org.simantics.simulation.ontology;bundle-version="1.0.0",
org.simantics.modeling.ontology;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.issues.ui.ontology
Automatic-Module-Name: org.simantics.issues.ui.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Issue Framework UI
Bundle-SymbolicName: org.simantics.issues.ui;singleton:=true
Bundle-Version: 1.1.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.issues;bundle-version="1.0.0",
org.simantics.issues.ontology;bundle-version="1.1.0",
org.simantics.diagram.ontology;bundle-version="1.1.1",
Bundle-Activator: org.simantics.issues.ui.internal.Activator
Export-Package: org.simantics.issues.ui,
org.simantics.issues.ui.contribution,
- org.simantics.issues.ui.handler
+ org.simantics.issues.ui.handler,
+ org.simantics.issues.ui.property
Bundle-Vendor: VTT Technical Research Centre of Finland
Automatic-Module-Name: org.simantics.issues.ui
--- /dev/null
+package org.simantics.issues.ui.property;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.viewers.CellLabelProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbenchSite;
+import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport;
+import org.simantics.databoard.Bindings;
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.common.procedure.adapter.TransientCacheListener;
+import org.simantics.db.common.request.ResourceRead;
+import org.simantics.db.common.utils.NameUtils;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.management.ISessionContext;
+import org.simantics.db.request.Read;
+import org.simantics.issues.Severity;
+import org.simantics.issues.common.IssueResourceContexts;
+import org.simantics.issues.common.ListModelIssuesBySeverity;
+import org.simantics.issues.common.SimpleIssue;
+import org.simantics.layer0.Layer0;
+import org.simantics.modeling.ModelingResources;
+import org.simantics.selectionview.PropertyTabContributorImpl;
+
+/**
+ * A very simple property tab for listing issues of a selected object.
+ *
+ * @author luukkainen
+ *
+ */
+public class IssuesTab extends PropertyTabContributorImpl{
+
+
+ private TableViewer viewer;
+ private Resource model;
+ private Resource element;
+
+ private List<SimpleIssue> result;
+
+ public IssuesTab(ReadGraph graph, Resource model, Resource element) throws DatabaseException {
+ this.model = model;
+ this.element = element;
+
+ Layer0 L0 = Layer0.getInstance(graph);
+ List<Resource> contexts = getContexts(graph, element);
+ Map<Severity, List<Resource>> issuesBySeverity = graph.syncRequest(
+ new ListModelIssuesBySeverity(model, true, true, Severity.NOTE),
+ TransientCacheListener.<Map<Severity, List<Resource>>>instance());
+
+ result = new ArrayList<>();
+ for (Severity severity : Severity.values()) {
+ List<Resource> issues = issuesBySeverity.get(severity);
+ if (issues != null) {
+ for (Resource issue : issues) {
+ Set<Resource> issueContexts = graph.syncRequest(new IssueResourceContexts(issue));
+ if (!Collections.disjoint(issueContexts, contexts)) {
+ SimpleIssue si = new SimpleIssue((String) graph.getRelatedValue(issue, L0.HasLabel, Bindings.STRING),
+ severity, issue);
+ result.add(si);
+ System.out.println(si.label + " " + si.severity);
+ }
+ }
+ }
+ }
+ }
+
+
+ /**
+ * @see org.simantics.modeling.ui.diagram.style.IssueDecorationStyle
+ *
+ * @param graph
+ * @param element
+ * @return
+ * @throws DatabaseException
+ */
+ protected List<Resource> getContexts(ReadGraph graph, Resource element) throws DatabaseException {
+
+ ModelingResources MOD = ModelingResources.getInstance(graph);
+ List<Resource> result = new ArrayList<Resource>(3);
+ result.add(element);
+ Resource config = graph.getPossibleObject(element, MOD.ElementToComponent);
+ if (config != null && result.indexOf(config) == -1) result.add(config);
+ config = graph.getPossibleObject(element, MOD.DiagramConnectionToConnection);
+ if (config != null && result.indexOf(config) == -1) result.add(config);
+ // For diagram reference element support
+ config = graph.getPossibleObject(element, MOD.HasParentComponent);
+ if (config != null && result.indexOf(config) == -1) result.add(config);
+ return result;
+
+ }
+
+
+ @Override
+ public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {
+ GridLayoutFactory.fillDefaults().numColumns(2).spacing(0, 0).applyTo(body);
+
+ viewer = new TableViewer(body);
+
+ TableViewerColumn issueColumn = new TableViewerColumn(viewer, SWT.LEFT);
+ TableViewerColumn severityColumn = new TableViewerColumn(viewer, SWT.LEFT);
+
+ issueColumn.setLabelProvider(new CellLabelProvider() {
+
+ @Override
+ public void update(ViewerCell cell) {
+ SimpleIssue issue = (SimpleIssue)cell.getElement();
+ cell.setText(issue.label);
+
+ }
+ });
+ severityColumn.setLabelProvider(new CellLabelProvider() {
+
+ @Override
+ public void update(ViewerCell cell) {
+ SimpleIssue issue = (SimpleIssue)cell.getElement();
+ cell.setText(issue.severity.name());
+ }
+ });
+
+ issueColumn.getColumn().setWidth(300);
+ issueColumn.getColumn().setText("Issue");
+
+ severityColumn.getColumn().setWidth(100);
+ severityColumn.getColumn().setText("Severity");
+
+ viewer.getTable().setHeaderVisible(true);
+ viewer.getTable().setLinesVisible(true);
+
+ viewer.setContentProvider(new IStructuredContentProvider() {
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ List<SimpleIssue> list = (List<SimpleIssue>)inputElement;
+ return list.toArray();
+ }
+ });
+
+ viewer.setInput(result);
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(viewer.getControl());
+
+ }
+
+ @Override
+ public Read<String> getPartNameReadRequest(ISelection forSelection) {
+ return new ObjectTitleRead(element);
+ }
+
+ public static class ObjectTitleRead extends ResourceRead<String> {
+ public ObjectTitleRead(Resource resource) {
+ super(resource);
+ }
+
+ @Override
+ public String perform(ReadGraph graph) throws DatabaseException {
+ return NameUtils.getSafeName(graph, resource);
+ }
+ }
+
+}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Issue Framework
Bundle-SymbolicName: org.simantics.issues;singleton:=true
Bundle-Version: 1.1.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.issues,
org.simantics.issues.preferences
Require-Bundle: org.simantics.utils.datastructures;bundle-version="1.0.0",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Require-Bundle: org.eclipse.core.runtime,
org.simantics.layer0,
org.simantics.selectionview.ontology;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.jdbc.ontology
Automatic-Module-Name: org.simantics.jdbc.ontology
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>\r
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
- <classpathentry kind="src" path="src"/>\r
- <classpathentry kind="output" path="bin"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Simantics JDBC support
Bundle-SymbolicName: org.simantics.jdbc
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ClassPath: .
Require-Bundle: org.eclipse.osgi,
org.simantics.simulator.toolkit,
org.simantics.databoard,
gnu.trove3;bundle-version="3.0.3",
- org.slf4j.api;bundle-version="1.7.25",
+ org.slf4j.api,
org.simantics.db.layer0,
org.simantics.simulator.toolkit.db,
org.simantics,
io.netty.common;bundle-version="4.1.27",
io.netty.handler;bundle-version="4.1.27",
io.netty.transport;bundle-version="4.1.27",
- pgjdbc-ng;bundle-version="0.7.1"
+ com.impossibl.pgjdbc-ng;bundle-version="0.8.3"
Export-Package: org.simantics.jdbc,
org.simantics.jdbc.variable
Automatic-Module-Name: org.simantics.jdbc
dataSource = new PGDataSource();
dataSource.setHost(host);
dataSource.setPort(portNumber);
- dataSource.setDatabase(database);
+ dataSource.setDatabaseName(database);
dataSource.setUser(user);
dataSource.setPassword(password);
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.db.common;bundle-version="1.1.0"
Bundle-Vendor: VTT Technical Research Centre of Finland
Bundle-ClassPath: .
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.simantics.layer0.utils
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Version: 1.1.0.qualifier
Require-Bundle: org.simantics.db;visibility:=reexport
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.layer0
Bundle-Vendor: VTT Technical Research Centre of Finland
Automatic-Module-Name: org.simantics.layer0
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.layer0x.ontology
Bundle-Version: 1.1.0.qualifier
Require-Bundle: org.simantics.layer0
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.layer0,
org.simantics.operation
Automatic-Module-Name: org.simantics.layer0x.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.logback.configuration
Bundle-Version: 1.0.0.qualifier
Fragment-Host: ch.qos.logback.classic;bundle-version="1.1.7"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: ch.qos.logback.core;bundle-version="1.1.7"
Bundle-Vendor: Semantum Oy
Eclipse-BundleShape: dir
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.eclipse.core.runtime,
org.slf4j.api,
org.simantics.logging,
- org.simantics.utils.ui
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: javax.annotation;version="1.2.0"
+ org.simantics.utils.ui,
+ jakarta.annotation-api;bundle-version="1.3.5"
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.simantics.logging.ui
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
ch.qos.logback.classic,
ch.qos.logback.core,
org.simantics.utils
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Service-Component: logbackLogProvider.xml,
dbAndMetadataLogProvider.xml
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<accessrules>
<accessrule kind="accessible" pattern="sun/misc/Unsafe"/>
</accessrules>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: LZ4
Bundle-SymbolicName: org.simantics.lz4
Bundle-Version: 1.3.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ClassPath: .
Export-Package: net.jpountz.lz4,
org.simantics.lz4
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.mapping.rule,
org.simantics.mapping.rule.instructions
Bundle-Vendor: VTT Technical Research Centre of Finland
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.simantics.mapping
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.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.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.db.common;bundle-version="[1.0.0,2.0.0)",
org.simantics.ui;bundle-version="[1.0.0,2.0.0)",
org.simantics.editors;bundle-version="[1.0.0,2.0.0)"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.simantics.message.ui
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Require-Bundle: org.eclipse.core.runtime,
org.simantics.db;bundle-version="[1.0.0,2.0.0)",
org.slf4j.api
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.message,
org.simantics.message.internal;x-friends:="org.simantics.message.ui",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Version Migration UI
Bundle-SymbolicName: org.simantics.migration.ui
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: gnu.trove3;bundle-version="3.0.0",
org.simantics.browsing.ui.model;bundle-version="1.0.0",
org.eclipse.ui;bundle-version="3.6.0",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.selectionview.ontology;bundle-version="1.2.0",
org.simantics.spreadsheet.ontology;bundle-version="1.2.0",
org.simantics.graphfile.ontology;bundle-version="0.1.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.modeling
Automatic-Module-Name: org.simantics.modeling.ontology
//##########################################################################
MOD.ChangeInformation <T L0.Literal
+ @L0.assert L0.HasValueType "ChangeInformation"
@L0.assert L0.HasDataType ${ createdBy : String, createdAt : Long, modifiedBy : String, modifiedAt : Long }
MOD.Functions.modificationTimeTextLong : L0.Function
MOD.StructuralComponentContentDumpFunction
@L0.sclValue "structuralComponentContentDump" "Resource -> <ReadGraph> Vector Byte"
+STR.ComponentType
+ MOD.contentDumpFunction
+ MOD.StructuralComponentTypeContentDumpFunction
+ @L0.sclValue "structuralComponentTypeContentDump" "Resource -> <ReadGraph> Vector Byte"
+
SEL.GenericParameterType
MOD.contentDumpFunction
MOD.GenericParameterTypeContentDumpFunction
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.silk.ontology;bundle-version="1.0.0",
org.simantics.image2.ontology;bundle-version="1.1.0",
org.simantics.annotation.ontology;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.modeling.template2d.ontology
Automatic-Module-Name: org.simantics.modeling.template2d.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.export.core;bundle-version="1.0.0",
org.slf4j.api
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.modeling.template2d.ui.function
Automatic-Module-Name: org.simantics.modeling.template2d.ui
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
-#Fri May 04 09:08:52 EEST 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.modeling.tests
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Semantum Oy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.modeling;bundle-version="1.1.1",
org.simantics;bundle-version="1.0.0",
org.simantics.db.testing;bundle-version="1.0.0",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.modeling.ui.workbench;singleton:=true
Bundle-Version: 1.26.0.qualifier
Bundle-Vendor: Semantum Oy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.eclipse.ui
Automatic-Module-Name: org.simantics.modeling.ui.workbench
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: General Modelling UI
Bundle-SymbolicName: org.simantics.modeling.ui;singleton:=true
Bundle-Version: 1.1.1.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: org.simantics.project;bundle-version="1.0.0",
- org.eclipse.ui.views;bundle-version="3.3.0",
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Require-Bundle: org.eclipse.ui.views;bundle-version="3.3.0",
org.simantics.ui;bundle-version="1.0.0";visibility:=reexport,
- org.simantics.structural.ontology;bundle-version="1.0.0";visibility:=reexport,
org.simantics.spreadsheet.ontology;bundle-version="1.0.0",
- org.simantics.structural2;bundle-version="1.0.0",
org.simantics.modeling;bundle-version="1.0.0";visibility:=reexport,
org.simantics.utils.thread.swt;bundle-version="1.0.0",
org.simantics.simulation;bundle-version="1.0.0",
org.simantics.browsing.ui.platform;bundle-version="1.0.0";visibility:=reexport,
org.simantics.structural.ui;bundle-version="1.0.0",
org.eclipse.ui.forms;bundle-version="3.4.1",
- org.simantics.basicexpression;bundle-version="1.0.0",
org.simantics.layer0.utils;bundle-version="0.8.0",
org.simantics.browsing.ui.model;bundle-version="1.0.0",
org.simantics.scenegraph.swing;bundle-version="1.0.0",
org.simantics.selectionview;bundle-version="1.0.0",
- org.simantics.trend;bundle-version="1.0.0",
org.simantics.history;bundle-version="1.0.0",
- com.famfamfam.silk;bundle-version="1.3.0",
- org.simantics.issues.ontology;bundle-version="1.1.0",
org.simantics.issues.common;bundle-version="1.1.0",
+ org.simantics.image.ui,
org.eclipse.help;bundle-version="3.5.0",
org.simantics.scenegraph.profile;bundle-version="1.0.0",
org.simantics.issues;bundle-version="1.1.0",
org.simantics.document;bundle-version="1.0.0",
- org.simantics.graph.db;bundle-version="1.1.9",
+ org.simantics.views,
org.bouncycastle.bcprov-jdk14;bundle-version="1.38.0",
- org.simantics.image2.ontology;bundle-version="1.1.0",
- org.simantics.scl.compiler;bundle-version="0.4.0",
org.simantics.scl.osgi;bundle-version="1.0.4",
org.eclipse.jface.text;bundle-version="3.7.1",
org.simantics.graphviz,
org.eclipse.nebula.widgets.cdatetime;bundle-version="0.14.0",
org.eclipse.ui.editors;bundle-version="3.7.0",
org.eclipse.ui.ide;bundle-version="3.7.0",
- org.eclipse.core.resources;bundle-version="3.7.100",
- org.eclipse.text,
org.simantics.scl.db;bundle-version="0.1.3",
org.simantics.scl.ui;bundle-version="0.5.0",
org.simantics.graph.compiler;bundle-version="1.1.11",
org.eclipse.e4.ui.model.workbench;bundle-version="1.1.100.v20150407-1430",
org.eclipse.e4.ui.services;bundle-version="1.2.0",
org.eclipse.e4.ui.workbench,
- org.eclipse.swt,
- org.simantics.db.layer0,
- org.simantics.silk.ontology;bundle-version="1.1.0",
- org.simantics.image.ui;bundle-version="1.0.0",
org.simantics.export.core;bundle-version="1.0.0",
org.slf4j.api,
- org.simantics.graphfile.ontology,
- org.eclipse.e4.core.services,
- org.eclipse.mylyn.wikitext;bundle-version="3.0.6",
- org.eclipse.mylyn.wikitext.markdown;bundle-version="3.0.6",
- org.eclipse.mylyn.wikitext.ui;bundle-version="3.0.6"
+ org.eclipse.mylyn.wikitext.markdown,
+ org.eclipse.mylyn.wikitext.ui,
+ org.eclipse.mylyn.wikitext,
+ jakarta.annotation-api;bundle-version="1.3.5"
Export-Package: org.simantics.modeling.ui,
org.simantics.modeling.ui.actions,
org.simantics.modeling.ui.chart.property,
Bundle-Activator: org.simantics.modeling.ui.Activator
Bundle-ActivationPolicy: lazy
Bundle-Vendor: VTT Technical Research Centre of Finland
-Import-Package: org.osgi.service.event,
- org.simantics.views,
- javax.inject
+Import-Package: javax.inject,
+ org.osgi.service.event
Automatic-Module-Name: org.simantics.modeling.ui
import org.simantics.db.Resource;
import org.simantics.db.Statement;
import org.simantics.db.common.adaption.SimpleContextualAdapter;
+import org.simantics.db.exception.AdaptionException;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.property.OrderedResource;
import org.simantics.operation.Layer0X;
return result;
}
- return null;
+ throw new AdaptionException("No obtained double available");
}
}
import org.simantics.db.common.request.UniqueRead;
import org.simantics.db.common.request.WriteRequest;
import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.layer0.util.Layer0Utils;
import org.simantics.db.procedure.Listener;
import org.simantics.db.request.Read;
import org.simantics.modeling.ComponentTypeScriptRequest;
StructuralResource2 STR = StructuralResource2.getInstance(graph);
currentText = graph.getRelatedValue(resource, STR.ComponentTypeScript_code, Bindings.STRING);
Resource owner = graph.getPossibleObject(resource, STR.ComponentType_hasScript_Inverse);
- immutable = owner != null && StructuralUtils.isImmutable(graph, owner);
+ immutable = Layer0Utils.isMarkedReadOnly(graph, resource)
+ || owner != null && StructuralUtils.isImmutable(graph, owner);
errorHappened = false;
return new Document(currentText != null ? currentText : ""); //$NON-NLS-1$
}
import org.simantics.db.common.request.UniqueRead;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.request.combinations.Combinators;
-import org.simantics.db.request.Read;
import org.simantics.layer0.Layer0;
import org.simantics.scl.ui.editor.SCLSourceViewerConfigurationNew;
import org.simantics.structural.stubs.StructuralResource2;
import org.simantics.ui.workbench.IResourceEditorInput;
import org.simantics.ui.workbench.TitleUpdater;
import org.simantics.ui.workbench.ToolTipRequest;
+import org.simantics.utils.ui.ExceptionUtils;
/**
* @author Hannu Niemistö
*/
public class ComponentTypeScriptEditor extends SCLModuleEditor {
+ protected ComponentTypeScriptDocumentProvider docProvider;
+ protected String scriptType = "";
+ protected int scriptTypeIndex = 0;
+
public ComponentTypeScriptEditor() {
super();
}
@Override
protected void preInitialize() {
- setDocumentProvider(new ComponentTypeScriptDocumentProvider(this));
+ docProvider = new ComponentTypeScriptDocumentProvider(this);
+ setDocumentProvider(docProvider);
SCLSourceViewerConfigurationNew sourceViewerConfiguration = new SCLSourceViewerConfigurationNew(resourceManager);
setSourceViewerConfiguration(sourceViewerConfiguration);
-
}
protected ParametrizedRead<IResourceEditorInput, Boolean> getInputValidator() {
- return new ParametrizedRead<IResourceEditorInput, Boolean>() {
- @Override
- public Read<Boolean> get(IResourceEditorInput parameter) {
- return Combinators.constant(Boolean.TRUE);
- }
- };
+ // No-op validator that always returns true
+ return param -> Combinators.constant(Boolean.TRUE);
}
@Override
@Override
public void run(ReadGraph graph) throws DatabaseException {
StructuralResource2 STR = StructuralResource2.getInstance(graph);
- final String type = graph.getPossibleRelatedValue(script, STR.ComponentTypeScript_type);
+ String type = graph.getPossibleRelatedValue(script, STR.ComponentTypeScript_type);
if(type != null)
+ scriptType = type;
combo.getDisplay().asyncExec(() -> {
for(int i=0;i<EXECUTION_PHASES.length;++i)
if(EXECUTION_PHASES[i].equals(type)) {
combo.select(i);
+ scriptTypeIndex = i;
return;
}
});
}
combo.addSelectionListener(org.eclipse.swt.events.SelectionListener.widgetSelectedAdapter(e -> {
int id = combo.getSelectionIndex();
+ if (id == scriptTypeIndex)
+ return;
+ if (docProvider.isReadOnly(getEditorInput())) {
+ // Return configured selection
+ combo.select(scriptTypeIndex);
+ return;
+ }
+ String newType = EXECUTION_PHASES[id];
Simantics.getSession().asyncRequest((WriteGraph graph) -> {
StructuralResource2 STR = StructuralResource2.getInstance(graph);
String currentType = graph.getPossibleRelatedValue(script, STR.ComponentTypeScript_type);
- String newType = EXECUTION_PHASES[id];
if(!newType.equals(currentType))
graph.claimLiteral(script, STR.ComponentTypeScript_type, newType, Bindings.STRING);
+ }, exc -> {
+ if (exc == null) {
+ scriptType = newType;
+ scriptTypeIndex = id;
+ } else {
+ ExceptionUtils.logError(exc);
+ }
});
}));
GridDataFactory.fillDefaults().grab(true, false).applyTo(combo);
import org.simantics.scl.ui.editor.TextAndErrors;
import org.simantics.structural2.scl.procedural.CompileProceduralComponentTypeRequest;
import org.simantics.structural2.scl.procedural.ProceduralComponentTypeCompilationException;
+import org.simantics.structural2.utils.StructuralUtils;
import org.simantics.ui.workbench.ResourceEditorInput;
import org.simantics.utils.logging.TimeLogger;
import org.simantics.utils.ui.SWTUtils;
@Override
public Document perform(ReadGraph graph) throws DatabaseException {
currentText = graph.getValue(resource, Bindings.STRING);
+ immutable = StructuralUtils.isImmutable(graph, resource);
errorHappened = false;
return new Document(currentText != null ? currentText : ""); //$NON-NLS-1$
}
import org.simantics.db.Resource;
import org.simantics.db.Statement;
import org.simantics.db.common.adaption.SimpleContextualAdapter;
+import org.simantics.db.exception.AdaptionException;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.property.OrderedResource;
import org.simantics.diagram.stubs.DiagramResource;
if(result != null) return result;
}
- return null;
+ throw new AdaptionException("No obtained color available");
}
import org.simantics.db.Resource;
import org.simantics.db.Statement;
import org.simantics.db.common.adaption.SimpleContextualAdapter;
+import org.simantics.db.exception.AdaptionException;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.property.OrderedResource;
import org.simantics.operation.Layer0X;
if(result != null) return result;
}
- return null;
+ throw new AdaptionException("No obtained expression available");
}
import org.simantics.db.Resource;
import org.simantics.db.Statement;
import org.simantics.db.common.adaption.SimpleContextualAdapter;
+import org.simantics.db.exception.AdaptionException;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.property.OrderedResource;
import org.simantics.diagram.stubs.DiagramResource;
if(result != null) return result;
}
- return null;
+ throw new AdaptionException("No obtained font available");
}
import org.simantics.db.Resource;
import org.simantics.db.Statement;
import org.simantics.db.common.adaption.SimpleContextualAdapter;
+import org.simantics.db.exception.AdaptionException;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.property.OrderedResource;
import org.simantics.diagram.stubs.DiagramResource;
if(result != null) return result;
}
- return null;
+ throw new AdaptionException("No obtained formatter available");
}
private static final String DECORATION_NODE_NAME = "issueDecorations"; //$NON-NLS-1$
- private List<Resource> getContexts(ReadGraph graph, Resource element) throws DatabaseException {
+ protected List<Resource> getContexts(ReadGraph graph, Resource element) throws DatabaseException {
ModelingResources MOD = ModelingResources.getInstance(graph);
List<Resource> result = new ArrayList<Resource>(3);
import org.simantics.diagram.handler.ExpandSelectionHandler;
import org.simantics.diagram.handler.SimpleElementTransformHandler;
import org.simantics.diagram.layer.ILayersViewPage;
+import org.simantics.diagram.participant.ConnectionCrossingsParticipant;
import org.simantics.diagram.participant.ContextUtil;
+import org.simantics.diagram.participant.CopyAsSVGParticipant;
import org.simantics.diagram.participant.PointerInteractor2;
import org.simantics.diagram.participant.SGFocusParticipant;
import org.simantics.diagram.query.DiagramRequests;
//ctx.add(new ZoomTransitionParticipant(TransitionFunction.SIGMOID));
//ctx.add(new TooltipParticipant());
ctx.add(new TerminalTooltipParticipant());
+ ctx.add(new ConnectionCrossingsParticipant(getInputResource()));
+ ctx.add(new CopyAsSVGParticipant());
}
protected void addPainterParticipants(ICanvasContext ctx) {
});
END(task);
} catch (Throwable t) {
- viewer = null;
LOGGER.error("Failed to complete loading of diagram {} in the canvas thread", viewer.diagramResource, t);
+ viewer = null;
}
}
});
import org.simantics.db.layer0.request.PossibleModel;
import org.simantics.db.layer0.variable.Variable;
import org.simantics.db.layer0.variable.Variables;
-import org.simantics.diagram.Logger;
import org.simantics.diagram.flag.FlagUtil;
import org.simantics.diagram.stubs.DiagramResource;
import org.simantics.diagram.ui.DiagramModelHints;
import org.simantics.utils.DataContainer;
import org.simantics.utils.threads.IThreadWorkQueue;
import org.simantics.utils.ui.ErrorLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Antti Villberg
protected static class SelectionElement extends AdaptableHintContext {
+ private static final Logger LOGGER = LoggerFactory.getLogger(SelectionElement.class);
+
final public Resource runtime;
final public Resource element;
}
});
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("WorkbenchSelectionElement.getContent failed for type AnyVariable", e);
}
}
else if(contentType instanceof ParentVariable) {
return (T) type.processor.sync(new ResourceRead2<Variable>(runtime, element) {
@Override
public Variable perform(ReadGraph graph) throws DatabaseException {
-
DiagramResource DIA = DiagramResource.getInstance(graph);
- ModelingResources MOD = ModelingResources.getInstance(graph);
- Layer0 L0 = Layer0.getInstance(graph);
String uri = graph.getPossibleRelatedValue(resource, DIA.RuntimeDiagram_HasVariable);
if (uri == null)
}
});
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("WorkbenchSelectionElement.getContent failed for type ParentVariable", e);
}
}
/*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * Copyright (c) 2007, 2020 Association for Decentralized Information Management
* in Industry THTH ry.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
import org.simantics.db.layer0.request.IsLinkedTo;
import org.simantics.db.layer0.util.Layer0Utils;
import org.simantics.db.service.SerialisationSupport;
-import org.simantics.diagram.Logger;
import org.simantics.diagram.adapter.GraphToDiagramSynchronizer;
import org.simantics.diagram.content.Change;
import org.simantics.diagram.content.DiagramContentChanges;
import org.simantics.ui.selection.WorkbenchSelectionElement;
import org.simantics.ui.workbench.e4.E4WorkbenchUtils;
import org.simantics.utils.logging.TimeLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* This participant populates Elements from ElementClass-resources drops
*/
public class PopulateElementDropParticipant extends AbstractDiagramParticipant implements IDropTargetParticipant {
+ private static final Logger LOGGER = LoggerFactory.getLogger(PopulateElementDropParticipant.class);
+
@Dependency PickContext pickContext;
@Dependency TransformUtil transformUtil;
});
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("symbolDropHandler invocation failed", e);
}
return;
package org.simantics.modeling.ui.expression;
-import java.util.Stack;
-
-import org.simantics.basicexpression.analysis.DepthFirstAdapter;
-import org.simantics.basicexpression.node.AConstantValue;
-import org.simantics.basicexpression.node.ADivMultiplicative;
-import org.simantics.basicexpression.node.AMultMultiplicative;
-import org.simantics.basicexpression.node.APlusExpression;
import org.simantics.basicexpression.node.AStringValue;
+import org.simantics.modeling.InvertBasicExpressionVisitorBase;
import org.simantics.utils.datastructures.Triple;
-public class InvertBasicExpressionVisitor extends DepthFirstAdapter {
-
- Stack<Object> stack = new Stack<Object>();
-
- public Object getResult() {
- return stack.pop();
- }
-
- public void outAConstantValue(AConstantValue node) {
- stack.push(Double.valueOf(node.toString()));
- }
+public class InvertBasicExpressionVisitor extends InvertBasicExpressionVisitorBase {
+ @Override
public void outAStringValue(AStringValue node) {
String value = node.toString();
stack.push(Triple.make(1.0, 0.0, value.substring(1, value.length() - 2).trim()));
}
- @SuppressWarnings("unchecked")
- public void outAPlusExpression(APlusExpression node) {
-
- final Object o1 = stack.pop();
- final Object o2 = stack.pop();
-
- if(o1 instanceof Double && o2 instanceof Triple) {
- Triple<Double, Double, String> p = (Triple<Double, Double, String>)o2;
- stack.push(Triple.make(p.first, p.second + (Double)o1, p.third));
- } else if (o2 instanceof Double && o1 instanceof Triple) {
- Triple<Double, Double, String> p = (Triple<Double, Double, String>)o1;
- stack.push(Triple.make(p.first, p.second + (Double)o2, p.third));
- } else if (o2 instanceof Double && o1 instanceof Double) {
- stack.push((Double)o1 + (Double)o2);
- } else {
- stack.push(Double.NaN);
- }
-
- }
-
- @SuppressWarnings("unchecked")
- public void outAMinusExpression(APlusExpression node) {
-
- final Object o1 = stack.pop();
- final Object o2 = stack.pop();
-
- if(o1 instanceof Double && o2 instanceof Triple) {
- Triple<Double, Double, String> p = (Triple<Double, Double, String>)o2;
- stack.push(Triple.make(-p.first, (Double)o1 - p.second, p.third ));
- } else if (o2 instanceof Double && o1 instanceof Triple) {
- Triple<Double, Double, String> p = (Triple<Double, Double, String>)o1;
- stack.push(Triple.make(p.first, p.second - (Double)o2, p.third));
- } else if (o2 instanceof Double && o1 instanceof Double) {
- stack.push((Double)o1 - (Double)o2);
- } else {
- stack.push(Double.NaN);
- }
-
- }
-
- @SuppressWarnings("unchecked")
- public void outAMultMultiplicative(AMultMultiplicative node) {
-
- final Object o1 = stack.pop();
- final Object o2 = stack.pop();
-
- if(o1 instanceof Double && o2 instanceof Triple) {
- Triple<Double, Double, String> p = (Triple<Double, Double, String>)o2;
- stack.push(Triple.make(p.first * (Double)o1, p.second * (Double)o1, p.third));
- } else if (o2 instanceof Double && o1 instanceof Triple) {
- Triple<Double, Double, String> p = (Triple<Double, Double, String>)o1;
- stack.push(Triple.make(p.first * (Double)o2, p.second * (Double)o2, p.third));
- } else if (o2 instanceof Double && o1 instanceof Double) {
- stack.push((Double)o1 * (Double)o2);
- } else {
- stack.push(Double.NaN);
- }
-
- }
-
- @SuppressWarnings("unchecked")
- public void outADivMultiplicative(ADivMultiplicative node) {
-
- final Object o1 = stack.pop();
- final Object o2 = stack.pop();
-
- if(o1 instanceof Double && o2 instanceof Triple) {
- stack.push(Double.NaN);
- } else if (o2 instanceof Double && o1 instanceof Triple) {
- Triple<Double, Double, String> p = (Triple<Double,Double, String>)o1;
- stack.push(Triple.make(p.first / (Double)o2, p.second / (Double)o2, p.third));
- } else if (o2 instanceof Double && o1 instanceof Double) {
- stack.push((Double)o1 / (Double)o2);
- } else {
- stack.push(Double.NaN);
- }
-
- }
-
}
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.HandlerUtil;
import org.simantics.Simantics;
-import org.simantics.databoard.Bindings;
import org.simantics.db.ReadGraph;
import org.simantics.db.Resource;
import org.simantics.db.common.request.UniqueRead;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.variable.Variable;
-import org.simantics.modeling.ModelingResources;
-import org.simantics.modeling.PropertyVariables;
+import org.simantics.modeling.help.HelpContexts;
import org.simantics.ui.selection.WorkbenchSelectionUtils;
-import org.simantics.utils.ui.AdaptionUtils;
import org.slf4j.LoggerFactory;
public class ContextualHelp extends AbstractHandler {
return Simantics.getSession().syncRequest(new UniqueRead<String>() {
@Override
public String perform(ReadGraph graph) throws DatabaseException {
- return getPossibleId(graph, resource, variable, sel);
+ return HelpContexts.getPossibleId(graph, resource, variable, sel);
}
});
} catch (DatabaseException e) {
return null;
}
+ /**
+ * @deprecated use {@link HelpContexts#getPossibleId(ReadGraph, Resource, Variable, Object)} instead
+ */
+ @Deprecated
public static String getPossibleId(ReadGraph graph, Resource resource, Variable variable, ISelection sel) throws DatabaseException {
- ModelingResources MOD = ModelingResources.getInstance(graph);
- if (resource != null) {
- Resource component = graph.getPossibleObject(resource, MOD.ElementToComponent);
- String id = component != null ? graph.getPossibleRelatedValue2(component, MOD.contextualHelpId, Bindings.STRING) : null;
- if (id != null)
- return id;
- id = graph.getPossibleRelatedValue2(resource, MOD.contextualHelpId, Bindings.STRING);
- if (id != null)
- return id;
- }
-
- if (variable != null) {
- String id = variable.getPossiblePropertyValue(graph, MOD.contextualHelpId, Bindings.STRING);
- if (id != null)
- return id;
- }
-
- // TODO: consider removing this block
- if (sel != null) {
- PropertyVariables vars = AdaptionUtils.adaptToSingle(sel, PropertyVariables.class);
- Variable var = vars != null ? vars.getConfiguration() : null;
- String id = var != null ? var.getPossiblePropertyValue(graph, MOD.contextualHelpId, Bindings.STRING) : null;
- if (id != null)
- return id;
- }
-
- return null;
+ return HelpContexts.getPossibleId(graph, resource, variable, sel);
}
}
ThreadUtils.asyncExec(thread, () -> {
try {
- PDFBuilder chassis = new PDFBuilder(writer, mapper, pageSize, pageDesc, fitDiagramContentsToPageMargins || isSymbol);
+ boolean fitToContent = fitDiagramContentsToPageMargins || isSymbol;
+ if (!fitToContent) {
+ // Prevent PDF printing from drawing page borders if the
+ // print area is fitted directly to the page size.
+ // This avoids unwanted black half-visible edges.
+ ctx.getDefaultHintContext().setHint(Hints.KEY_DISPLAY_PAGE, false);
+ }
+
+ PDFBuilder chassis = new PDFBuilder(writer, mapper, pageSize, pageDesc, fitToContent);
chassis.paint(ctx, true);
} catch (Throwable e) {
exception[0] = new DatabaseException(e);
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.preferences.ScopedPreferenceStore;
fExtensionEditor = new StringFieldEditor(CSVPreferences.P_CSV_FILE_EXTENSION, "File extension", getFieldEditorParent());
addField(fExtensionEditor);
- fResamplingEditor = new BooleanFieldEditor(CSVPreferences.P_CSV_RESAMPLE, "Resampling", getFieldEditorParent());
+ fResamplingEditor = new BooleanFieldEditor(CSVPreferences.P_CSV_RESAMPLE, "&Resample", getFieldEditorParent());
+ fResamplingEditor.getDescriptionControl(getFieldEditorParent()).setToolTipText("Resample exported data from raw data");
addField(fResamplingEditor);
fSamplingModeEditor = new ComboFieldEditor(CSVPreferences.P_CSV_SAMPLING_MODE, "Sampling mode",
return true;
}
try {
+ @SuppressWarnings("unused")
double number = Double.parseDouble(text);
- return number>0;
+ return true;
} catch (NumberFormatException e1) {
return false;
}
};
fStartEditor.setEmptyStringAllowed(true);
fStartEditor.setErrorMessage("Enter valid start time value (s)");
+ fStartEditor.getTextControl(getFieldEditorParent()).setToolTipText("Time to start resampling from");
+ addField(fStartEditor);
fStepEditor = new StringFieldEditor(CSVPreferences.P_CSV_TIME_STEP, "Step size (s)", getFieldEditorParent()) {
protected boolean doCheckState() {
};
fStepEditor.setEmptyStringAllowed(true);
fStepEditor.setErrorMessage("Enter valid time step value (s)");
+ fStepEditor.getTextControl(getFieldEditorParent()).setToolTipText("Time step to use when resampling");
addField(fStepEditor);
Group significantDigitsGroup = new Group(getFieldEditorParent(), SWT.NONE);
addField(fDoubleDigitsEditor);
GridLayoutFactory.swtDefaults().numColumns(2).applyTo(significantDigitsGroup);
+
+ updateSampling(getPreferenceStore().getBoolean(CSVPreferences.P_CSV_RESAMPLE));
}
/**
} else if (source == fColumnSeparatorEditor) {
columnSeparatorValue = (String) event.getNewValue();
validate = true;
+ } else if (source == fResamplingEditor) {
+ updateSampling();
}
if (validate) {
if (decimalSeparatorValue.equals(columnSeparatorValue)) {
super.propertyChange(event);
}
+ private void updateSampling() {
+ updateSampling(fResamplingEditor.getBooleanValue());
+ }
+
+ private void updateSampling(boolean resample) {
+ Label fStartLabel = fStartEditor.getLabelControl(getFieldEditorParent());
+ Label fStepLabel = fStepEditor.getLabelControl(getFieldEditorParent());
+ Color gray = fStartLabel.getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY);
+ fStartLabel.setForeground(resample ? null : gray);
+ fStepLabel.setForeground(resample ? null : gray);
+ }
+
}
import org.simantics.db.exception.NoSingleResultException;
import org.simantics.db.exception.ServiceException;
import org.simantics.db.management.ISessionContext;
+import org.simantics.db.procedure.Listener;
import org.simantics.db.request.Read;
import org.simantics.diagram.adapter.DefaultConnectionClassFactory;
import org.simantics.diagram.adapter.FlagClassFactory;
import org.simantics.diagram.handler.DefaultCopyPasteStrategy;
import org.simantics.diagram.handler.DeleteHandler;
import org.simantics.diagram.handler.SimpleElementTransformHandler;
+import org.simantics.diagram.participant.ConnectionCrossingsParticipant;
import org.simantics.diagram.query.DiagramRequests;
import org.simantics.diagram.runtime.RuntimeDiagramManager;
import org.simantics.diagram.stubs.DiagramResource;
import org.simantics.utils.page.PageOrientation;
import org.simantics.utils.threads.AWTThread;
import org.simantics.utils.threads.IThreadWorkQueue;
+import org.simantics.utils.threads.ThreadUtils;
import org.simantics.utils.ui.ErrorLogger;
ctx.add( new Selection() );
ctx.add( new DiagramParticipant() );
ctx.add( new ElementPainter(true) );
+ ctx.add( new ConnectionCrossingsParticipant(resource));
//ctx.add( new ElementHeartbeater() );
ctx.add( new ZOrderHandler() );
DiagramDesc diagramDesc = Simantics.getSession().syncRequest(DiagramRequests.getDiagramDesc(diagramResource));
if (diagramDesc != null)
setDiagramDesc(ctx, diagramDesc);
+
+ // Create a listener to react to page setting changes.
+ Simantics.getSession().asyncRequest(DiagramRequests.getDiagramDesc(diagramResource), new Listener<DiagramDesc>() {
+ @Override
+ public void execute(DiagramDesc result) {
+ if (result != null && ctx != null) {
+ ThreadUtils.asyncExec(ctx.getThreadAccess(), () -> {
+ if (ctx != null) {
+ setDiagramDesc(ctx, result);
+ }
+ });
+ }
+ }
+
+ @Override
+ public void exception(Throwable t) {
+ ErrorLogger.defaultLogError(t);
+ }
+
+ @Override
+ public boolean isDisposed() {
+ return DiagramSceneGraphProvider.this.ctx == null;
+ }
+ });
} catch (DatabaseException e) {
ErrorLogger.defaultLogError(e);
}
protected void setDiagramDesc(ICanvasContext ctx, DiagramDesc diagramDesc) {
IHintContext hints = ctx.getDefaultHintContext();
hints.setHint(Hints.KEY_PAGE_DESC, diagramDesc.getPageDesc());
- //hints.setHint(Hints.KEY_DISPLAY_PAGE, diagramDesc.isPageBordersVisible());
+ hints.setHint(Hints.KEY_DISPLAY_PAGE, diagramDesc.isPageBordersVisible());
hints.setHint(Hints.KEY_DISPLAY_MARGINS, diagramDesc.isMarginsVisible());
}
}
try {
-
- IModelingRules modelingRules = Simantics.getSession().syncRequest(DiagramRequests.getModelingRules(resource, null));
- if (modelingRules != null) {
- initialHints.setHint(DiagramModelHints.KEY_MODELING_RULES, modelingRules);
- }
-
- initialHints.setHint(SynchronizationHints.COPY_ADVISOR, getCopyAdvisor());
+ fillInitialDiagramHints(initialHints);
final RuntimeDiagramManager runtimeDiagramManager = RuntimeDiagramManager.create(Simantics.getSession(), resource, modelURI, RVI);
return ctx.getSceneGraph();
}
+ protected void fillInitialDiagramHints(IHintContext initialHints) throws DatabaseException {
+ IModelingRules modelingRules = Simantics.getSession().syncRequest(DiagramRequests.getModelingRules(resource, null));
+ if (modelingRules != null) {
+ initialHints.setHint(DiagramModelHints.KEY_MODELING_RULES, modelingRules);
+ }
+
+ initialHints.setHint(SynchronizationHints.COPY_ADVISOR, getCopyAdvisor());
+ }
+
protected IElementClassProvider createElementClassProvider(ReadGraph graph) throws DatabaseException {
DiagramResource dr = DiagramResource.getInstance(graph);
return ElementClassProviders.mappedProvider(
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Structural Modeling Plug-in
Bundle-SymbolicName: org.simantics.modeling;singleton:=true
Bundle-Version: 1.1.1.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.simulation;bundle-version="1.0.0",
org.simantics.mapping;bundle-version="1.0.0",
org.simantics.diagram;bundle-version="0.9.4";visibility:=reexport,
org.simantics.scl.ui;bundle-version="0.5.0",
org.slf4j.api,
org.simantics.graphfile.ontology,
- org.apache.batik,
+ org.apache.batik;bundle-version="1.12.0",
org.simantics.graph.compiler,
org.simantics.browsing.ui;bundle-version="1.1.0"
Export-Package: org.simantics.modeling,
org.simantics.modeling.adapters,
org.simantics.modeling.export,
org.simantics.modeling.flags,
+ org.simantics.modeling.help,
org.simantics.modeling.mapping,
org.simantics.modeling.migration,
org.simantics.modeling.preferences,
--- /dev/null
+importJava "org.simantics.modeling.adapters.ChangeInformation" where
+ data ChangeInformation
pgraphContentDump :: Resource -> <ReadGraph> Vector Byte
graphFileContentDump :: Resource -> <ReadGraph> Vector Byte
structuralComponentContentDump :: Resource -> <ReadGraph> Vector Byte
+ structuralComponentTypeContentDump :: Resource -> <ReadGraph> Vector Byte
genericParameterTypeContentDump :: Resource -> <ReadGraph> Vector Byte
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
+import java.util.Collection;
+import java.util.Map;
import java.util.TreeMap;
import java.util.TreeSet;
import org.simantics.db.ReadGraph;
import org.simantics.db.Resource;
import org.simantics.db.common.utils.CommonDBUtils;
+import org.simantics.db.common.utils.NameUtils;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.variable.Variable;
import org.simantics.db.layer0.variable.Variables;
return graph.getRelatedValue(resource, GF.HasFiledata, Bindings.BYTE_ARRAY);
}
- public static byte[] structuralComponentContentDump(ReadGraph graph, Resource resource) throws DatabaseException {
-
- StringBuilder dump = new StringBuilder();
+ private static StringBuilder structuralComponentContentDump(ReadGraph graph, Resource resource, StringBuilder dump) throws DatabaseException {
Variable v = Variables.getVariable(graph, resource);
-
+
TreeSet<String> types = new TreeSet<>();
for(Resource t : graph.getPrincipalTypes(resource)) {
types.add(graph.getURI(t));
dump.append("\n");
}
}
+
+ return dump;
+ }
+
+ public static byte[] structuralComponentContentDump(ReadGraph graph, Resource resource) throws DatabaseException {
+ return structuralComponentContentDump(graph, resource, new StringBuilder()).toString().getBytes(UTF8);
+ }
+
+ public static byte[] structuralComponentTypeContentDump(ReadGraph graph, Resource resource) throws DatabaseException {
+ StringBuilder dump = structuralComponentContentDump(graph, resource, new StringBuilder());
+
+ StructuralResource2 STR = StructuralResource2.getInstance(graph);
+
+ // Dump procedural component type code if present
+ String proceduralCode = graph.getPossibleRelatedValue(resource, STR.ProceduralComponentType_code, Bindings.STRING);
+ if (proceduralCode != null) {
+ dump
+ .append("\n---- ProceduralComponentType.code begins ----\n")
+ .append(proceduralCode)
+ .append("---- ProceduralComponentType.code ends ----\n");
+ }
+
+ // Dump component type SCL scripts
+ Collection<Resource> scripts = graph.getObjects(resource, STR.ComponentType_hasScript);
+ if (!scripts.isEmpty()) {
+ dump.append("\nComponentType.hasScript (").append(scripts.size()).append(")\n");
+ TreeMap<String,Resource> sortedScripts = new TreeMap<>();
+ for (Resource script : scripts)
+ sortedScripts.put(NameUtils.getSafeName(graph, script), script);
+ for (Map.Entry<String, Resource> entry : sortedScripts.entrySet()) {
+ String name = entry.getKey();
+ Resource script = entry.getValue();
+ String type = graph.getPossibleRelatedValue(script, STR.ComponentTypeScript_type, Bindings.STRING);
+ String code = graph.getPossibleRelatedValue(script, STR.ComponentTypeScript_code, Bindings.STRING);
+ dump
+ .append("---- script `").append(name).append("` of type `").append(type).append("` begins ----\n")
+ .append(code)
+ .append("\n---- script `").append(name).append("` of type `").append(type).append("` ends ----\n");
+ }
+ }
+
return dump.toString().getBytes(UTF8);
}
package org.simantics.modeling;
-import java.util.Stack;
-
import org.simantics.basicexpression.Expressions;
-import org.simantics.basicexpression.analysis.DepthFirstAdapter;
-import org.simantics.basicexpression.node.AConstantValue;
-import org.simantics.basicexpression.node.ADivMultiplicative;
-import org.simantics.basicexpression.node.AMultMultiplicative;
-import org.simantics.basicexpression.node.APlusExpression;
-import org.simantics.basicexpression.node.AVariablePrimary;
import org.simantics.db.ReadGraph;
import org.simantics.db.Resource;
import org.simantics.db.WriteGraph;
import org.simantics.utils.datastructures.Pair;
import org.simantics.utils.datastructures.Triple;
-public class InvertBasicExpressionVisitor extends DepthFirstAdapter {
-
- Stack<Object> stack = new Stack<Object>();
-
- public Object getResult() {
- if(stack.size() != 1) return null;
- return stack.pop();
- }
-
- public void outAConstantValue(AConstantValue node) {
- stack.push(Double.valueOf(node.toString()));
- }
-
- @Override
- public void outAVariablePrimary(AVariablePrimary node) {
- String value = node.toString().trim();
- stack.push(Triple.make(1.0, 0.0, value));
- }
-
- @SuppressWarnings("unchecked")
- public void outAPlusExpression(APlusExpression node) {
-
- final Object o1 = stack.pop();
- final Object o2 = stack.pop();
-
- if(o1 instanceof Double && o2 instanceof Triple) {
- Triple<Double, Double, String> p = (Triple<Double, Double, String>)o2;
- stack.push(Triple.make(p.first, p.second + (Double)o1, p.third));
- } else if (o2 instanceof Double && o1 instanceof Triple) {
- Triple<Double, Double, String> p = (Triple<Double, Double, String>)o1;
- stack.push(Triple.make(p.first, p.second + (Double)o2, p.third));
- } else if (o2 instanceof Double && o1 instanceof Double) {
- stack.push((Double)o1 + (Double)o2);
- } else {
- stack.push(Double.NaN);
- }
-
- }
-
- @SuppressWarnings("unchecked")
- public void outAMinusExpression(APlusExpression node) {
-
- final Object o1 = stack.pop();
- final Object o2 = stack.pop();
-
- if(o1 instanceof Double && o2 instanceof Triple) {
- Triple<Double, Double, String> p = (Triple<Double, Double, String>)o2;
- stack.push(Triple.make(-p.first, (Double)o1 - p.second, p.third ));
- } else if (o2 instanceof Double && o1 instanceof Triple) {
- Triple<Double, Double, String> p = (Triple<Double, Double, String>)o1;
- stack.push(Triple.make(p.first, p.second - (Double)o2, p.third));
- } else if (o2 instanceof Double && o1 instanceof Double) {
- stack.push((Double)o1 - (Double)o2);
- } else {
- stack.push(Double.NaN);
- }
-
- }
-
- @SuppressWarnings("unchecked")
- public void outAMultMultiplicative(AMultMultiplicative node) {
-
- final Object o1 = stack.pop();
- final Object o2 = stack.pop();
-
- if(o1 instanceof Double && o2 instanceof Triple) {
- Triple<Double, Double, String> p = (Triple<Double, Double, String>)o2;
- stack.push(Triple.make(p.first * (Double)o1, p.second * (Double)o1, p.third));
- } else if (o2 instanceof Double && o1 instanceof Triple) {
- Triple<Double, Double, String> p = (Triple<Double, Double, String>)o1;
- stack.push(Triple.make(p.first * (Double)o2, p.second * (Double)o2, p.third));
- } else if (o2 instanceof Double && o1 instanceof Double) {
- stack.push((Double)o1 * (Double)o2);
- } else {
- stack.push(Double.NaN);
- }
-
- }
-
- @SuppressWarnings("unchecked")
- public void outADivMultiplicative(ADivMultiplicative node) {
-
- final Object o1 = stack.pop();
- final Object o2 = stack.pop();
-
- if(o1 instanceof Double && o2 instanceof Triple) {
- stack.push(Double.NaN);
- } else if (o2 instanceof Double && o1 instanceof Triple) {
- Triple<Double, Double, String> p = (Triple<Double,Double, String>)o1;
- stack.push(Triple.make(p.first / (Double)o2, p.second / (Double)o2, p.third));
- } else if (o2 instanceof Double && o1 instanceof Double) {
- stack.push((Double)o1 / (Double)o2);
- } else {
- stack.push(Double.NaN);
- }
-
- }
+public class InvertBasicExpressionVisitor extends InvertBasicExpressionVisitorBase {
private static final String MAGIC = "_111_";
-
+
private static String replaced(String expression) {
return expression.replaceAll("\\.([A-Za-z])", MAGIC + "$1");
}
-
+
public static void invert(WriteGraph graph, Variable base, String expression, Object value) throws DatabaseException {
InvertBasicExpressionVisitor visitor = new InvertBasicExpressionVisitor();
Expressions.evaluate(replaced(expression), visitor);
}
- public static Variable possibleInvertibleExpressionReferencedProperty(ReadGraph graph, Variable base, String expression) throws DatabaseException {
+ @SuppressWarnings("unchecked")
+ private static Triple<Double, Double, String> possibleInvertibleExpression(ReadGraph graph, Variable base, String expression) throws DatabaseException {
if (base == null || expression == null || expression.isEmpty())
return null;
InvertBasicExpressionVisitor visitor = new InvertBasicExpressionVisitor();
//System.out.println("invert : " + expression + " -> " + replaced(expression) + " for " + base.getURI(graph));
Expressions.evaluate(replaced(expression), visitor);
- Object pair = visitor.getResult();
- if(pair == null)
- return null;
- if(pair instanceof Triple) {
- @SuppressWarnings("unchecked")
- Triple<Double, Double, String> data = (Triple<Double, Double, String>)pair;
- String key = data.third.replace(MAGIC,".");
- String path = getVariablePath(graph, base, key);
- if (path == null)
- return null;
- Variable targetVariable = base.browsePossible(graph, path);
- return targetVariable;
- }
+ Object result = visitor.getResult();
+ if (result instanceof Triple)
+ return (Triple<Double, Double, String>) result;
return null;
}
+ public static Variable possibleInvertibleExpressionReferencedProperty(ReadGraph graph, Variable base, String expression) throws DatabaseException {
+ Triple<Double, Double, String> data = possibleInvertibleExpression(graph, base, expression);
+ if (data == null)
+ return null;
+ String path = getVariablePath(graph, base, data.third.replace(MAGIC, "."));
+ return path != null ? base.browsePossible(graph, path) : null;
+ }
+
+ public static Triple<Double, Double, Variable> possibleInvertibleExpressionReferencedTransformedProperty(ReadGraph graph, Variable base, String expression) throws DatabaseException {
+ Triple<Double, Double, String> data = possibleInvertibleExpression(graph, base, expression);
+ if (data == null)
+ return null;
+ String path = getVariablePath(graph, base, data.third.replace(MAGIC, "."));
+ if (path == null)
+ return null;
+ Variable targetVariable = base.browsePossible(graph, path);
+ return targetVariable != null ? Triple.make(data.first, data.second, targetVariable) : null;
+ }
+
}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2020 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * 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:
+ * Semantum Oy - initial API and implementation
+ *******************************************************************************/
+package org.simantics.modeling;
+
+import java.util.Stack;
+
+import org.simantics.basicexpression.analysis.DepthFirstAdapter;
+import org.simantics.basicexpression.node.AConstantValue;
+import org.simantics.basicexpression.node.ADivMultiplicative;
+import org.simantics.basicexpression.node.AMinusExpression;
+import org.simantics.basicexpression.node.AMultMultiplicative;
+import org.simantics.basicexpression.node.APlusExpression;
+import org.simantics.basicexpression.node.AVariablePrimary;
+import org.simantics.utils.datastructures.Triple;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public class InvertBasicExpressionVisitorBase extends DepthFirstAdapter {
+
+ protected Stack<Object> stack = new Stack<>();
+
+ public InvertBasicExpressionVisitorBase() {
+ super();
+ }
+
+ public Object getResult() {
+ if(stack.size() != 1) return null;
+ return stack.pop();
+ }
+
+ @Override
+ public void outAConstantValue(AConstantValue node) {
+ stack.push(Double.valueOf(node.toString()));
+ }
+
+ @Override
+ public void outAVariablePrimary(AVariablePrimary node) {
+ String value = node.toString().trim();
+ stack.push(Triple.make(1.0, 0.0, value));
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void outAPlusExpression(APlusExpression node) {
+
+ final Object o1 = stack.pop();
+ final Object o2 = stack.pop();
+
+ if(o1 instanceof Double && o2 instanceof Triple) {
+ Triple<Double, Double, String> p = (Triple<Double, Double, String>)o2;
+ stack.push(Triple.make(p.first, p.second + (Double)o1, p.third));
+ } else if (o2 instanceof Double && o1 instanceof Triple) {
+ Triple<Double, Double, String> p = (Triple<Double, Double, String>)o1;
+ stack.push(Triple.make(p.first, p.second + (Double)o2, p.third));
+ } else if (o2 instanceof Double && o1 instanceof Double) {
+ stack.push((Double)o1 + (Double)o2);
+ } else {
+ stack.push(Double.NaN);
+ }
+
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void outAMinusExpression(AMinusExpression node) {
+
+ final Object o1 = stack.pop();
+ final Object o2 = stack.pop();
+
+ // o2 - o1
+ if(o1 instanceof Double && o2 instanceof Triple) {
+ // <triple> o2 - double o1
+ Triple<Double, Double, String> p = (Triple<Double, Double, String>)o2;
+ stack.push(Triple.make(p.first, p.second - (Double)o1, p.third));
+ } else if (o2 instanceof Double && o1 instanceof Triple) {
+ // double o2 - <triple> o1
+ Triple<Double, Double, String> p = (Triple<Double, Double, String>)o1;
+ stack.push(Triple.make(-p.first, (Double)o2 - p.second, p.third));
+ } else if (o2 instanceof Double && o1 instanceof Double) {
+ stack.push((Double)o2 - (Double)o1);
+ } else {
+ stack.push(Double.NaN);
+ }
+
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void outAMultMultiplicative(AMultMultiplicative node) {
+
+ final Object o1 = stack.pop();
+ final Object o2 = stack.pop();
+
+ if(o1 instanceof Double && o2 instanceof Triple) {
+ Triple<Double, Double, String> p = (Triple<Double, Double, String>)o2;
+ stack.push(Triple.make(p.first * (Double)o1, p.second * (Double)o1, p.third));
+ } else if (o2 instanceof Double && o1 instanceof Triple) {
+ Triple<Double, Double, String> p = (Triple<Double, Double, String>)o1;
+ stack.push(Triple.make(p.first * (Double)o2, p.second * (Double)o2, p.third));
+ } else if (o2 instanceof Double && o1 instanceof Double) {
+ stack.push((Double)o1 * (Double)o2);
+ } else {
+ stack.push(Double.NaN);
+ }
+
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void outADivMultiplicative(ADivMultiplicative node) {
+
+ final Object o1 = stack.pop();
+ final Object o2 = stack.pop();
+
+ // o2 / o1
+ if(o1 instanceof Double && o2 instanceof Triple) {
+ // <triple> o2 / double o1
+ Triple<Double, Double, String> p = (Triple<Double,Double, String>)o2;
+ stack.push(Triple.make(p.first / (Double)o1, p.second / (Double)o1, p.third));
+ } else if (o2 instanceof Double && o1 instanceof Triple) {
+ // double o2 / <triple> o1
+ stack.push(Double.NaN);
+ } else if (o2 instanceof Double && o1 instanceof Double) {
+ stack.push((Double)o2 / (Double)o1);
+ } else {
+ stack.push(Double.NaN);
+ }
+
+ }
+
+}
\ No newline at end of file
import org.simantics.db.Statement;
import org.simantics.db.VirtualGraph;
import org.simantics.db.WriteGraph;
+import org.simantics.db.WriteOnlyGraph;
import org.simantics.db.common.Indexing;
import org.simantics.db.common.NamedResource;
import org.simantics.db.common.QueryMemoryWatcher;
import org.simantics.db.common.request.PossibleIndexRoot;
import org.simantics.db.common.request.ReadRequest;
import org.simantics.db.common.request.ResourceRead2;
+import org.simantics.db.common.request.WriteOnlyRequest;
import org.simantics.db.common.request.WriteRequest;
import org.simantics.db.common.request.WriteResultRequest;
import org.simantics.db.common.utils.ListUtils;
-import org.simantics.db.common.utils.Logger;
import org.simantics.db.common.utils.NameUtils;
import org.simantics.db.common.utils.OrderedSetUtils;
import org.simantics.db.common.utils.VersionInfo;
import org.simantics.db.layer0.util.TransferableGraphConfiguration2;
import org.simantics.db.layer0.variable.Variable;
import org.simantics.db.layer0.variable.Variables;
-import org.simantics.db.request.Read;
import org.simantics.db.service.ClusterControl;
import org.simantics.db.service.CollectionSupport;
import org.simantics.db.service.GraphChangeListenerSupport;
import org.simantics.utils.datastructures.Triple;
import org.simantics.utils.datastructures.hints.HintContext;
import org.simantics.utils.ui.dialogs.ListDialog;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Hannu Niemistö
*/
public class ModelingUtils {
+ private static final Logger LOGGER = LoggerFactory.getLogger(ModelingUtils.class);
+
private ReadGraph g;
private WriteGraph wg;
public Layer0 b;
} catch (Exception e) {
- Logger.defaultLogError(e);
+ LOGGER.error("Model import failed", e);
}
}
}
public static void untrackDependencies() {
- untrackDependencies(Simantics.getSession());
+ Session s = Simantics.peekSession();
+ if (s != null)
+ untrackDependencies(s);
}
public static void untrackDependencies(RequestProcessor processor) {
});
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("untrackDependenices failed", e);
}
}
});
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("trackDependenices failed", e);
}
}
return advisor.getRoot();
} catch (Throwable t) {
- Logger.defaultLogError("Unexpected exception while importing diagram template.", t);
+ LOGGER.error("Unexpected exception while importing diagram template.", t);
} finally {
}
Variant draftStatus = dc.metadata.get(DraftStatusBean.EXTENSION_KEY);
return MigrationUtils.importSharedOntology(Simantics.getSession(), tg, draftStatus == null);
} catch (Exception e) {
- Logger.defaultLogError(e);
+ LOGGER.error("importSharedOntologyWithResult failed", e);
throw e;
}
}
return DiagramGraphUtil.getModelingRules(graph, diagramResource, null);
}
+ //-------------------------------------------------------------------------
+
+ private static final String VG_CHANGE_INFORMATION = "changeInformation"; //$NON-NLS-1$
+
public static void markChanged(WriteGraph graph, Resource r) throws DatabaseException {
- VirtualGraphSupport support = Simantics.getSession().getService(VirtualGraphSupport.class);
- VirtualGraph vg = support.getWorkspacePersistent("changeInformation");
- graph.syncRequest(new WriteRequest(vg) {
+ VirtualGraph vg = Simantics.getSession().getService(VirtualGraphSupport.class)
+ .getWorkspacePersistent(VG_CHANGE_INFORMATION);
+ ModelingResources MOD = ModelingResources.getInstance(graph);
+ graph.syncRequest(new WriteOnlyRequest(vg) {
@Override
- public void perform(WriteGraph graph) throws DatabaseException {
- ModelingResources MOD = ModelingResources.getInstance(graph);
+ public void perform(WriteOnlyGraph graph) throws DatabaseException {
graph.claim(r, MOD.changed, MOD.changed, r);
}
});
}
-
+
+ public static void markChanged(RequestProcessor processor, Iterable<Resource> rs) throws DatabaseException {
+ VirtualGraph vg = Simantics.getSession().getService(VirtualGraphSupport.class)
+ .getWorkspacePersistent(VG_CHANGE_INFORMATION);
+ ModelingResources MOD = ModelingResources.getInstance(processor);
+ processor.syncRequest(new WriteOnlyRequest(vg) {
+ @Override
+ public void perform(WriteOnlyGraph graph) throws DatabaseException {
+ for (Resource r : rs) {
+ graph.claim(r, MOD.changed, MOD.changed, r);
+ }
+ }
+ });
+ }
+
}
import gnu.trove.map.hash.THashMap;
import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.request.PropertyInfo;
import org.simantics.db.layer0.request.PropertyInfoRequest;
public THashMap<String, Pair<String,Type>> perform(ReadGraph graph) throws DatabaseException {
THashMap<String, Pair<String,Type>> propertyMap = new THashMap<String, Pair<String,Type>>();
for(Variable child : variable.getChildren(graph)) {
- for(Variable property : child.getProperties(graph)) {
- PropertyInfo propertyInfo = graph.syncRequest(new PropertyInfoRequest(property.getPredicateResource(graph)));
+ for(Variable property : child.getProperties(graph)) {
+ Resource predicate = property.getPossiblePredicateResource(graph);
+ if (predicate == null)
+ continue;
+
+ PropertyInfo propertyInfo = graph.syncRequest(new PropertyInfoRequest(predicate));
propertyMap.put(child.getName(graph) + "." + propertyInfo.name,
Pair.make("/" + child.getName(graph) + "#" + propertyInfo.name,
SCLTypeUtils.getType(propertyInfo)));
- }
+ }
}
- for(Variable property : variable.getProperties(graph)) {
- PropertyInfo propertyInfo = graph.syncRequest(new PropertyInfoRequest(property.getPredicateResource(graph)));
+ for(Variable property : variable.getProperties(graph)) {
+ Resource predicate = property.getPossiblePredicateResource(graph);
+ if (predicate == null)
+ continue;
+
+ PropertyInfo propertyInfo = graph.syncRequest(new PropertyInfoRequest(predicate));
propertyMap.put(propertyInfo.name,
Pair.make("#" + propertyInfo.name,
SCLTypeUtils.getType(propertyInfo)));
- }
+ }
+
return propertyMap;
}
import org.simantics.db.layer0.adapter.ActionFactory;
import org.simantics.db.layer0.variable.Variable;
import org.simantics.db.layer0.variable.Variables;
-import org.simantics.diagram.Logger;
import org.simantics.scl.runtime.function.Function1;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class SCLAction implements ActionFactory {
+ private static final Logger LOGGER = LoggerFactory.getLogger(SCLAction.class);
+
final private Resource rule;
public SCLAction(ReadGraph graph, Resource rule) throws DatabaseException {
Function1<Resource, Object> function = Simantics.getSession().syncRequest(new RuleFunctionRequest(rule));
function.apply(resource);
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("SCLActionRunnable failed to request/apply RuleFunction {}", rule, e);
}
}
import org.simantics.db.layer0.adapter.DropActionFactory;
import org.simantics.db.layer0.variable.Variable;
import org.simantics.db.layer0.variable.Variables;
-import org.simantics.diagram.Logger;
import org.simantics.scl.runtime.function.Function3;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class SCLDropAction implements DropActionFactory {
+ private static final Logger LOGGER = LoggerFactory.getLogger(SCLDropAction.class);
+
final private Resource rule;
public SCLDropAction(ReadGraph graph, Resource rule) throws DatabaseException {
Function3<Resource, Object, Integer, Object> function = Simantics.getSession().syncRequest(new RuleFunctionRequest(rule));
function.apply(target, source, operation);
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("SCLDropActionRunnable failed to request/apply RuleFunction {}", rule, e);
}
}
import org.simantics.g2d.diagram.DiagramHints;
import org.simantics.g2d.diagram.IDiagram;
import org.simantics.g2d.diagram.handler.DataElementMap;
+import org.simantics.g2d.diagram.participant.ElementPainter.SelectionShapeNode;
import org.simantics.g2d.diagram.participant.Selection;
import org.simantics.g2d.element.IElement;
import org.simantics.g2d.scenegraph.ICanvasSceneGraphProvider;
parentBuilder.append(ALL_SECTIONS, "\n<g transform=\"" + m + "\">");
}
}
+ } else if (node instanceof TextNode) {
+ TextNode text = (TextNode)node;
+
+ SingleElementNode parentSEN = (SingleElementNode)NodeUtil.getNearestParentOfType(node, SingleElementNode.class);
+ if(parentSEN != null) {
+
+ text.setShowSelection(false);
+ Element doc = renderSVGNode(svgGenerator, (IG2DNode)node);
+ String svg = printSVGDocument(doc);
+ parentBuilder.append(MAIN_SECTION, svg);
+
+ RenderSVGContext parentBuilder2 = getParentBuilder(parentSEN);
+
+ String key = getKey(parentSEN);
+ text.setShowSelection(true);
+ doc = renderSVGNode(svgGenerator, (IG2DNode)node);
+ svg = printSVGDocument(doc);
+
+ parentBuilder2.append(SELECTION_SECTION, "\n<g style=\"visibility:hidden\" class=\"selection\" id=\"" + key + "\">");
+ parentBuilder2.append(SELECTION_SECTION, svg);
+ parentBuilder2.append(SELECTION_SECTION, "\n</g>");
+ parentBuilder2.append(SELECTION_MASK_SECTION, "\n<g class=\"selectionMask\" id=\"" + key /*+ "\" transform=\"" + matrixString + "\"*/+ "\">");
+ Rectangle2D rect = text.getBounds();
+ // NaN
+ if(rect.getHeight() == rect.getHeight() && rect.getWidth() == rect.getWidth()) {
+ parentBuilder2.append(SELECTION_MASK_SECTION,"<rect style=\"fill:#fff\" opacity=\"" + OPACITY + "\"");
+ parentBuilder2.append(SELECTION_MASK_SECTION," x=\"" + rect.getX() + "\" y=\"" + rect.getY() + "\"");
+ parentBuilder2.append(SELECTION_MASK_SECTION," width=\"" + rect.getWidth() + "\" height=\"" + rect.getHeight() + "\"");
+ parentBuilder2.append(SELECTION_MASK_SECTION,"></rect>");
+ }
+ parentBuilder2.append(SELECTION_MASK_SECTION,"\n</g>");
+
+ }
} else if (!(node instanceof RouteGraphNode) && !(node instanceof LinkNode)){
try {
Element doc = renderSVGNode(svgGenerator, (IG2DNode)node);
if (!hasContent)
return;
String svg = printSVGDocument(doc);
- parentBuilder.append(MAIN_SECTION, "<g class=\"" +node.getSimpleClassName() +"\">");
- parentBuilder.append(MAIN_SECTION, svg);
- parentBuilder.append(MAIN_SECTION, "\n</g>");
+ if (node instanceof SelectionShapeNode) {
+ SingleElementNode parentSEN = (SingleElementNode)NodeUtil.getNearestParentOfType(node, SingleElementNode.class);
+ if(parentSEN != null) {
+ String key = getKey(parentSEN);
+ RenderSVGContext parentBuilder2 = getParentBuilder(parentSEN);
+ parentBuilder2.append(SELECTION_SECTION, "\n<g style=\"visibility:hidden\" class=\"selection\" id=\"" + key + "\">");
+ parentBuilder2.append(SELECTION_SECTION, svg);
+ parentBuilder2.append(SELECTION_SECTION, "\n</g>");
+
+ parentBuilder2.append(SELECTION_MASK_SECTION, "\n<g class=\"selectionMask\" id=\"" + key /*+ "\" transform=\"" + matrixString + "\"*/+ "\">");
+ Rectangle2D rect = node.getBounds();
+ // NaN
+ if(rect.getHeight() == rect.getHeight() && rect.getWidth() == rect.getWidth()) {
+ parentBuilder2.append(SELECTION_MASK_SECTION,"<rect style=\"fill:#fff\" opacity=\"" + OPACITY + "\"");
+ parentBuilder2.append(SELECTION_MASK_SECTION," x=\"" + rect.getX() + "\" y=\"" + rect.getY() + "\"");
+ parentBuilder2.append(SELECTION_MASK_SECTION," width=\"" + rect.getWidth() + "\" height=\"" + rect.getHeight() + "\"");
+ parentBuilder2.append(SELECTION_MASK_SECTION,"></rect>");
+ }
+ parentBuilder2.append(SELECTION_MASK_SECTION,"\n</g>");
+ }
+ } else {
+ parentBuilder.append(MAIN_SECTION, "<g class=\"" +node.getSimpleClassName() +"\">");
+ parentBuilder.append(MAIN_SECTION, svg);
+ parentBuilder.append(MAIN_SECTION, "\n</g>");
+ }
} catch (Exception e) {
// TODO: There are nodes that do not behave well when rendered to SVG. For backwards compatibility, we don't handle the exceptions.
}
import org.simantics.databoard.type.StringType;
import org.simantics.db.layer0.request.PropertyInfo;
import org.simantics.scl.compiler.types.TCon;
+import org.simantics.scl.compiler.types.TVar;
import org.simantics.scl.compiler.types.Type;
import org.simantics.scl.compiler.types.Types;
import org.simantics.scl.compiler.types.kinds.Kinds;
private static final Logger LOGGER = LoggerFactory.getLogger(SCLTypeUtils.class);
private static final THashMap<String, Type> TYPE_MAP = new THashMap<String, Type>();
+ private static final TVar STAR = Types.var(Kinds.STAR);
+
private static void add(TCon type) {
TYPE_MAP.put(type.name, type);
}
Types.functionE(new Type[] {variable, Types.RESOURCE}, Types.READ_GRAPH, Types.RESOURCE));
add((TCon)Types.RESOURCE);
+ add(Types.con("Simantics/ChangeInformation", "ChangeInformation")); // MOD.ChangeInformation
add(Types.con("Simantics/GUID", "GUID")); // L0.GUID
add(Types.con("Simantics/Variables", "StructuredProperty")); // L0.methods
add(Types.con("Simantics/Variables", "ValueAccessor")); // L0.ValueAccessor
Type type = TYPE_MAP.get(typeText);
if(type == null) {
LOGGER.warn("SCLTypeUtils.getType cannot transform '" + typeText + "' to type. Returns a as default.");
- return Types.var(Kinds.STAR);
+ return STAR;
}
return type;
}
return Types.list(getType(((ArrayType)dataType).componentType));
else {
LOGGER.warn("SCLTypeUtils.getType cannot transform data type '" + dataType + "' to type. Returns a as default.");
- return Types.var(Kinds.STAR);
+ return STAR;
}
}
- public static Type getType(PropertyInfo propertyInfo) {
+ public static Type getType(PropertyInfo propertyInfo, boolean warnOfNoTypeInformation) {
if(propertyInfo.requiredValueType != null)
return getType(propertyInfo.requiredValueType);
else if(propertyInfo.requiredDatatype != null)
return getType(propertyInfo.requiredDatatype);
else {
- LOGGER.warn(propertyInfo.name + " doesn't have type information. Returns a as default.");
- return Types.var(Kinds.STAR);
+ if (warnOfNoTypeInformation)
+ LOGGER.warn(propertyInfo.name + " doesn't have type information. Returns a as default.");
+ return STAR;
}
}
+
+ public static Type getType(PropertyInfo propertyInfo) {
+ return getType(propertyInfo, propertyInfo.isHasProperty);
+ }
}
import org.simantics.databoard.Bindings;
import org.simantics.db.Resource;
import org.simantics.db.common.primitiverequest.PossibleRelatedValue2;
-import org.simantics.db.common.utils.Logger;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.adapter.ActionFactory;
import org.simantics.modeling.ModelingResources;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class Help implements ActionFactory {
+ private static final Logger LOGGER = LoggerFactory.getLogger(Help.class);
+
@Override
public Runnable create(Object target) {
-
- if(!(target instanceof Resource))
+ if (!(target instanceof Resource))
return null;
- final Resource resource = (Resource)target;
-
- return new Runnable() {
- @Override
- public void run() {
-
- try {
- ModelingResources MOD = ModelingResources.getInstance(Simantics.getSession());
- String id = Simantics.sync(new PossibleRelatedValue2<String>(resource, MOD.contextualHelpId, Bindings.STRING));
- if(id == null) {
- PlatformUI.getWorkbench().getHelpSystem().displayDynamicHelp();
- return;
- }
- PlatformUI.getWorkbench().getHelpSystem().displayHelp(id);
- } catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ final Resource resource = (Resource) target;
+
+ return () -> {
+ try {
+ ModelingResources MOD = ModelingResources.getInstance(Simantics.getSession());
+ String id = Simantics.sync(new PossibleRelatedValue2<String>(resource, MOD.contextualHelpId, Bindings.STRING));
+ if (id == null) {
+ PlatformUI.getWorkbench().getHelpSystem().displayDynamicHelp();
+ return;
}
-
+ PlatformUI.getWorkbench().getHelpSystem().displayHelp(id);
+ } catch (DatabaseException e) {
+ LOGGER.error("Failed to display help for resource {}", resource, e);
}
};
}
+
}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2020 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * 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:
+ * Semantum Oy- initial API and implementation
+ *******************************************************************************/
+package org.simantics.modeling.help;
+
+import org.simantics.databoard.Bindings;
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.layer0.variable.Variable;
+import org.simantics.modeling.ModelingResources;
+import org.simantics.modeling.PropertyVariables;
+import org.simantics.utils.ui.AdaptionUtils;
+
+/**
+ * @author Tuukka Lehtonen
+ * @since 1.46.0
+ */
+public class HelpContexts {
+
+ /**
+ * @param graph
+ * @param resource
+ * @param variable
+ * @param selection optional <code>ISelection</code>
+ * @return
+ * @throws DatabaseException
+ */
+ public static String getPossibleId(ReadGraph graph, Resource resource, Variable variable, Object selection) throws DatabaseException {
+ ModelingResources MOD = ModelingResources.getInstance(graph);
+ if (resource != null) {
+ Resource component = graph.getPossibleObject(resource, MOD.ElementToComponent);
+ String id = component != null ? graph.getPossibleRelatedValue2(component, MOD.contextualHelpId, Bindings.STRING) : null;
+ if (id != null)
+ return id;
+ id = graph.getPossibleRelatedValue2(resource, MOD.contextualHelpId, Bindings.STRING);
+ if (id != null)
+ return id;
+ }
+
+ if (variable != null) {
+ String id = variable.getPossiblePropertyValue(graph, MOD.contextualHelpId, Bindings.STRING);
+ if (id != null)
+ return id;
+ }
+
+ // TODO: consider removing this block
+ if (selection != null) {
+ PropertyVariables vars = AdaptionUtils.adaptToSingle(selection, PropertyVariables.class);
+ Variable var = vars != null ? vars.getConfiguration() : null;
+ String id = var != null ? var.getPossiblePropertyValue(graph, MOD.contextualHelpId, Bindings.STRING) : null;
+ if (id != null)
+ return id;
+ }
+
+ return null;
+ }
+
+ public static String getPossibleId(ReadGraph graph, Variable variable, String property) throws DatabaseException {
+ ModelingResources MOD = ModelingResources.getInstance(graph);
+ Variable prop = variable != null ? variable.getPossibleProperty(graph, property) : null;
+ return prop != null ? prop.getPossiblePropertyValue(graph, MOD.contextualHelpId, Bindings.STRING) : null;
+ }
+
+}
import org.simantics.modeling.services.ComponentNamingUtil;
import org.simantics.modeling.services.NamingException;
import org.simantics.project.IProject;
-import org.simantics.structural.stubs.StructuralResource2;
import gnu.trove.map.hash.THashMap;
@Override
public Object copy(ISynchronizationContext context, WriteGraph graph, Resource source, Resource sourceContainer,
Resource targetContainer, Map<Object, Object> map) throws DatabaseException {
- StructuralResource2 STR = StructuralResource2.getInstance(graph);
Resource copy = CopyAdvisorUtil.copy2(graph, source, null, map);
Layer0 L0 = Layer0.getInstance(graph);
import org.simantics.db.layer0.request.VariableRead;
import org.simantics.db.layer0.scl.AbstractExpressionCompilationContext;
import org.simantics.db.layer0.scl.AbstractExpressionCompilationRequest;
-import org.simantics.db.layer0.util.RuntimeEnvironmentRequest;
+import org.simantics.db.layer0.util.RuntimeEnvironmentRequest2;
import org.simantics.db.layer0.variable.Variable;
import org.simantics.layer0.Layer0;
import org.simantics.modeling.ProceduralSubstructureMapRequest;
public CompilationContext perform(ReadGraph graph)
throws DatabaseException {
Resource indexRoot = graph.syncRequest(new IndexRoot(componentType));
- RuntimeEnvironment runtimeEnvironment = graph.syncRequest(new RuntimeEnvironmentRequest(indexRoot));
+ RuntimeEnvironment runtimeEnvironment = graph.syncRequest(new RuntimeEnvironmentRequest2(componentType, indexRoot));
THashMap<String, Pair<String,Type>> propertyMap =
graph.sync(new ProceduralSubstructureMapRequest(componentVariable));
return new CompilationContext(runtimeEnvironment, propertyMap);
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.scl.AbstractExpressionCompilationContext;
import org.simantics.db.layer0.scl.AbstractExpressionCompilationRequest;
-import org.simantics.db.layer0.util.RuntimeEnvironmentRequest;
+import org.simantics.db.layer0.util.RuntimeEnvironmentRequest2;
import org.simantics.db.layer0.variable.Variable;
import org.simantics.layer0.Layer0;
import org.simantics.modeling.ComponentTypeSubstructure;
public CompilationContext perform(ReadGraph graph)
throws DatabaseException {
Resource indexRoot = graph.syncRequest(new IndexRoot(resource));
- RuntimeEnvironment runtimeEnvironment = graph.syncRequest(new RuntimeEnvironmentRequest(indexRoot));
+ RuntimeEnvironment runtimeEnvironment = graph.syncRequest(new RuntimeEnvironmentRequest2(resource, indexRoot));
return new CompilationContext(runtimeEnvironment, ComponentTypeSubstructure.forType(graph, resource));
}
});
import org.simantics.db.common.procedure.adapter.TransientCacheListener;
import org.simantics.db.common.request.IndexRoot;
import org.simantics.db.common.request.ResourceRead2;
+import org.simantics.db.common.request.RuntimeEnvironmentRequest;
import org.simantics.db.exception.DatabaseException;
-import org.simantics.db.layer0.util.RuntimeEnvironmentRequest;
import org.simantics.db.layer0.variable.Variable;
import org.simantics.layer0.Layer0;
import org.simantics.scl.compiler.common.names.Name;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.procedure.SyncListener;
import org.simantics.db.request.Read;
+import org.simantics.db.request.ReadExt;
+import org.simantics.db.request.RequestFlags;
import org.simantics.layer0.Layer0;
import org.simantics.modeling.ModelingUtils;
import org.simantics.modeling.internal.Activator;
}
}
+ static class PossibleResourceIU extends UnaryRead<String,Resource> implements ReadExt {
+
+ public PossibleResourceIU(String parameter) {
+ super(parameter);
+ }
+
+ @Override
+ public Resource perform(ReadGraph graph) throws DatabaseException {
+ return graph.getPossibleResource(parameter);
+ }
+
+ @Override
+ public boolean isImmutable(ReadGraph graph) throws DatabaseException {
+ return false;
+ }
+
+ @Override
+ public int getType() {
+ return RequestFlags.IMMEDIATE_UPDATE;
+ }
+
+ }
+
static class ReadModuleSource extends UnaryRead<String, ModuleSource> {
public ReadModuleSource(String moduleName) {
super(moduleName);
@Override
public ModuleSource perform(ReadGraph graph) throws DatabaseException {
- Resource moduleResource = graph.getPossibleResource(parameter);
+ Resource moduleResource = graph.syncRequest(new PossibleResourceIU(parameter));
if(moduleResource == null)
return null;
Layer0 L0 = Layer0.getInstance(graph);
import java.nio.charset.StandardCharsets;
import java.util.Collection;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Map;
+import java.util.Set;
import java.util.TreeMap;
import org.simantics.Simantics;
private Resource ontology;
private Map<Resource, String> names = new HashMap<>();
- private Map<Resource,Resource> parents = new HashMap<>();
+ private Map<Resource,Resource> parents = new TreeMap<>();
private Map<Resource, File> libraryFolders = new HashMap<>();
private Map<Resource, byte[]> contentDumps = new HashMap<>();
private void readNameAndParent(ReadGraph graph, Resource container, Resource r) throws DatabaseException {
+ String name = NameUtils.getSafeName(graph, r);
parents.put(r, container);
- names.put(r, NameUtils.getSafeName(graph, r));
+ names.put(r, FileUtils.escapeFileName(name));
}
- private Collection<Resource> containers() {
- return parents.values();
+ /*
+ * This shall return containers sorted by full path.
+ * This makes processing order stable and ensures that
+ * directories are processed before their contents.
+ */
+ private Collection<Resource> sortedContainers(File rootFolder) {
+ Set<Resource> parentSet = new HashSet<Resource>(parents.values());
+ TreeMap<String,Resource> result = new TreeMap<>();
+ for(Resource r : parentSet) {
+ File f = getFolder(rootFolder, r);
+ result.put(f.getAbsolutePath(), r);
+ }
+ return result.values();
+ }
+
+ private Collection<Resource> sortedResources(File rootFolder) {
+ TreeMap<String,Resource> result = new TreeMap<>();
+ for(Resource r : parents.keySet()) {
+ byte[] dump = contentDumps.get(r);
+ if(dump == null)
+ dump = "".getBytes(StandardCharsets.UTF_8);
+ if(isParent(r)) {
+ if(dump.length > 0) {
+ File f = new File(getFolder(rootFolder, r), "__contents__");
+ result.put(f.getAbsolutePath(), r);
+ }
+ } else {
+ File f = getFile(rootFolder, r);
+ result.put(f.getAbsolutePath(), r);
+ }
+ }
+ return result.values();
}
private void readHierarchy(ReadGraph graph, Resource container) throws DatabaseException {
public void write(File unsafeFolder) throws IOException {
File folder = escapeFile(unsafeFolder);
FileUtils.delete(folder.toPath());
- folder.mkdirs();
+ folder.getParentFile().mkdirs();
writeDirectories(folder);
writeResources(folder);
}
+ Resource getParent(Resource r) {
+ return parents.get(r);
+ }
+
private File getFolder(File root, Resource library) {
if(ontology.equals(library))
return root;
- Resource parent = parents.get(library);
+ Resource parent = getParent(library);
if(parent == null)
throw new IllegalStateException("null parent for " + library);
File parentFolder = getFolder(root, parent);
- return new File(parentFolder, FileUtils.escapeFileName(names.get(library)));
+ return new File(parentFolder, names.get(library));
}
private File getFile(File rootFolder, Resource r) {
- Resource parent = parents.get(r);
+ Resource parent = getParent(r);
File folder = getFolder(rootFolder, parent);
- return new File(folder, FileUtils.escapeFileName(names.get(r)));
+ return new File(folder, names.get(r));
}
+ private File makeUnique(File original, Resource r) {
+ int counter = 2;
+ File file = new File(original.getParent(), original.getName());
+ File test = file;
+ while(test.exists()) {
+ // Here we have a name clash with small and big letters! (windows)
+ test = new File(file.getParent(), file.getName() + "____" + (counter++));
+ }
+ // Enforce this renaming in future operations also
+ names.put(r, test.getName());
+ return test;
+ }
+
private void writeDirectories(File rootFolder) {
- for(Resource library : containers()) {
- File folder = getFolder(rootFolder, library);
+ // Here stuff shall be returned in alphabetical order
+ for(Resource library : sortedContainers(rootFolder)) {
+ File folder = makeUnique(getFolder(rootFolder, library), library);
folder.mkdirs();
libraryFolders.put(library, folder);
}
}
private void writeResources(File rootFolder) throws IOException {
- for(Resource r : parents.keySet()) {
+ // Here stuff shall be returned in alphabetical order
+ for(Resource r : sortedResources(rootFolder)) {
writeResource(rootFolder, r);
}
}
}
private void write(File rootFolder, Resource resource, byte[] bytes) throws IOException {
- FileUtils.writeFile(getFile(rootFolder, resource), bytes);
+ FileUtils.writeFile(makeUnique(getFile(rootFolder, resource), resource), bytes);
}
}
\ No newline at end of file
*/
public class OntologicalRequirementEnforceRequest extends WriteRequest {
+ private static final String PROP_WRITE_CHANGED_TAGS = "org.simantics.modeling.writeChangedTags"; //$NON-NLS-1$
+
private Collection<Resource> creates;
private Collection<Resource> modis;
private Collection<Resource> ids;
private String author;
private long time;
+ private static String getAuthor() {
+ return System.getProperty("user.name", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ private static boolean writeChangedTags() {
+ return !System.getProperty(PROP_WRITE_CHANGED_TAGS, "") //$NON-NLS-1$
+ .equalsIgnoreCase("false"); //$NON-NLS-1$
+ }
+
public OntologicalRequirementEnforceRequest(Collection<Resource> creates, Collection<Resource> modis, Collection<Resource> ids) {
this(creates,
modis,
ids,
- System.getProperty("user.name", ""),
+ getAuthor(),
System.currentTimeMillis());
}
@Override
public void perform(WriteGraph graph) throws DatabaseException {
- update(graph, creates, modis, ids, true, author, time, true);
+ update(graph, creates, modis, ids, true, author, time, true, writeChangedTags());
}
public static void update(
modis,
ids,
addComment,
- System.getProperty("user.name", ""),
+ getAuthor(),
System.currentTimeMillis(),
disableDependencyIndexing);
String author,
long time,
boolean disableDependencyIndexing) throws DatabaseException
+ {
+ update(graph, creates, modis, ids, addComment, author, time, disableDependencyIndexing, writeChangedTags());
+ }
+
+ public static void update(
+ WriteGraph graph,
+ Collection<Resource> creates,
+ Collection<Resource> modis,
+ Collection<Resource> ids,
+ boolean addComment,
+ String author,
+ long time,
+ boolean disableDependencyIndexing,
+ boolean writeChangedTags) throws DatabaseException
{
if (disableDependencyIndexing)
Layer0Utils.setDependenciesIndexingDisabled(graph, true);
-
+
ModelingResources MOD = ModelingResources.getInstance(graph);
Layer0 L0 = Layer0.getInstance(graph);
for (Resource c : creates) {
CommonDBUtils.selectClusterSet(graph, c);
graph.claimLiteral(c, MOD.changeInformation, MOD.changeInformation_Inverse, MOD.ChangeInformation, info, ChangeInformation.BINDING);
- ModelingUtils.markChanged(graph, c);
}
+ if (writeChangedTags)
+ ModelingUtils.markChanged(graph, creates);
}
for (Resource m : modis) {
info.modifiedBy = author;
CommonDBUtils.selectClusterSet(graph, m);
graph.claimLiteral(m, MOD.changeInformation, MOD.changeInformation_Inverse, MOD.ChangeInformation, info, ChangeInformation.BINDING);
- ModelingUtils.markChanged(graph, m);
}
-
+ if (writeChangedTags)
+ ModelingUtils.markChanged(graph, modis);
+
for (Resource r : ids) {
if (!graph.hasStatement(r, L0.identifier)) {
CommonDBUtils.selectClusterSet(graph, r);
}
}
- graph.addMetadata( graph.getMetadata(CommentMetadata.class).add("Updated change information") );
-
+ graph.addMetadata( graph.getMetadata(CommentMetadata.class).add("Updated change information") ); //$NON-NLS-1$
graph.addMetadata( graph.getMetadata(ChangeHistoryUpdated.class) );
-
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Version: 10.0.40219.qualifier
Bundle-Vendor: Semantum Oy
Fragment-Host: org.simantics.msvc.runtime
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Eclipse-PlatformFilter: (& (osgi.os=win32) (osgi.arch=x86_64))
Bundle-NativeCode: msvcr100.dll; msvcp100.dll; processor=x86_64
Automatic-Module-Name: org.simantics.msvc.runtime.x86_64
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Activator: org.simantics.msvc.runtime.Activator
Bundle-Vendor: Semantum Oy
Require-Bundle: org.eclipse.core.runtime
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.msvc.runtime
Automatic-Module-Name: org.simantics.msvc.runtime
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>\r
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
- <classpathentry kind="src" path="src"/>\r
- <classpathentry kind="output" path="bin"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.nativemem
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Semantum Oy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ClassPath: .
Export-Package: org.simantics.nativemem
Require-Bundle: com.sun.jna;bundle-version="4.3.0",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Objmap2
Bundle-SymbolicName: org.simantics.objmap2
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.db;bundle-version="1.1.0",
gnu.trove3;bundle-version="3.0.0",
org.eclipse.core.runtime;bundle-version="3.7.0",
import org.simantics.objmap.exceptions.MappingException;
public interface IForwardMappingRule<Domain, Range> {
+ /**
+ * Check whether a range element needs to be updated due to a change in the range element, without modifying the range element.
+ */
+ boolean checkChanges(ReadGraph graph, IForwardMapping<Domain, Range> mapping, Domain domainElement, Range rangeElement) throws MappingException;
+
/**
* Modifies the range element so that it corresponds to the domain element.
* @param g read transaction
* @return true if the rule made some modifications
* @throws MappingException
*/
- boolean updateRange(ReadGraph graph, IForwardMapping<Domain, Range> mapping, Domain domainElement, Range rangeElement) throws MappingException;
+ boolean updateRange(ReadGraph graph, IForwardMapping<Domain, Range> mapping, Domain domainElement, Range rangeElement) throws MappingException;
void createRange(ReadGraph graph, IForwardMapping<Domain, Range> mapping, Domain domainElement, Range rangeElement) throws MappingException;
}
return false;
}
+ @Override
+ public boolean checkChanges(ReadGraph g, IForwardMapping<Domain, Range> map, Domain domainElement,
+ Range rangeElement) throws MappingException {
+ return false;
+ }
+
public void createDomain(WriteGraph g, IBackwardMapping<Domain,Range> map, Domain domainElement, Range rangeElement) throws MappingException {
updateDomain(g, map, domainElement, rangeElement);
};
package org.simantics.objmap.graph.impl;
-import gnu.trove.map.hash.THashMap;
-
import java.util.AbstractSet;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.simantics.db.ReadGraph;
import org.simantics.db.WriteGraph;
import org.simantics.db.exception.DatabaseException;
-
import org.simantics.objmap.backward.IBackwardMapping;
import org.simantics.objmap.exceptions.MappingException;
import org.simantics.objmap.forward.IForwardMapping;
import org.simantics.objmap.graph.IMappingListener;
import org.simantics.objmap.graph.schema.ILinkType;
import org.simantics.objmap.graph.schema.IMappingSchema;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import gnu.trove.map.hash.THashMap;
/**
* An implementation of IMapping. The class should not be created
link.type = type;
link.domainElement = domainElement;
domain.put(domainElement, link);
- type.createDomain(g, new RangeToDomain(g), domainElement, link.rangeElement);
+ type.createDomain(g, new RangeToDomain(), domainElement, link.rangeElement);
// TODO Should we do this only if the mapping is listening?
domainModified(link);
link.type = type;
link.rangeElement = rangeElement;
range.put(rangeElement, link);
- type.createRange(g, new DomainToRange(g), link.domainElement, rangeElement);
+ type.createRange(g, new DomainToRange(), link.domainElement, rangeElement);
}
Set<Domain> domainSet = new AbstractSet<Domain>() {
class DomainToRange implements IForwardMapping<Domain, Range> {
- ReadGraph g;
-
- public DomainToRange(ReadGraph g) {
- this.g = g;
+ public DomainToRange() {
}
@Override
link.domainModified = true;
modifiedDomainLinks.add(link);
domain.put(element, link);
- createRange(g, link);
+ createRange(graph, link);
}
else if(link.type == null)
- createRange(g, link);
+ createRange(graph, link);
return link.rangeElement;
}
class RangeToDomain extends DomainToRange implements IBackwardMapping<Domain, Range> {
- WriteGraph g;
-
- public RangeToDomain(WriteGraph g) {
- super(g);
- this.g = g;
+ public RangeToDomain() {
+ super();
}
+
@Override
public Domain inverseGet(Range element) {
link.rangeModified = true;
modifiedRangeLinks.add(link);
range.put(element, link);
- createDomain(g, link);
+ createDomain(graph, link);
}
else if(link.type == null)
- createDomain(g, link);
+ createDomain(graph, link);
return link.domainElement;
}
@Override
public synchronized Collection<Domain> updateDomain(WriteGraph g) throws MappingException {
LOGGER.trace("Mapping.updateDomain");
- RangeToDomain map = new RangeToDomain(g);
+ RangeToDomain map = new RangeToDomain();
ArrayList<Domain> updated = new ArrayList<Domain>();
while(!modifiedRangeLinks.isEmpty()) {
LOGGER.trace(" modifiedRangeLinks.size() = " + modifiedRangeLinks.size());
@Override
public synchronized Collection<Range> updateRange(ReadGraph g) throws MappingException {
LOGGER.trace("Mapping.updateRange");
- DomainToRange map = new DomainToRange(g);
+ DomainToRange map = new DomainToRange();
ArrayList<Range> updated = new ArrayList<Range>();
while(!modifiedDomainLinks.isEmpty()) {
LOGGER.trace(" modifiedDomainLinks.size() = " + modifiedDomainLinks.size());
if(listensDomain) {
RangeUpdateRequest<Domain,Range> request = new RangeUpdateRequest<Domain,Range>(link, map, this);
+ boolean changes;
try {
- g.syncRequest(request, request);
+ changes = g.syncRequest(request, request) > 0;
} catch (DatabaseException e) {
throw new MappingException(e);
}
- // TODO check if really modified
- updated.add(link.rangeElement);
+
+ if (changes)
+ updated.add(link.rangeElement);
}
else
if(link.type.updateRange(g, map, link.domainElement, link.rangeElement))
import org.simantics.objmap.graph.impl.Link;
-public class RangeUpdateRequest<Domain,Range> implements Read<Boolean>, SyncListener<Boolean> {
+public class RangeUpdateRequest<Domain,Range> implements Read<Integer>, SyncListener<Integer> {
Link<Domain,Range> link;
/*
*/
IForwardMapping<Domain, Range> map; // map==null is used to flag that request is performed once
Mapping<Domain, Range> mapping; // mapping==null is used as a flag the request disposed
+ int counter;
public RangeUpdateRequest(Link<Domain,Range> link, IForwardMapping<Domain,Range> map, Mapping<Domain,Range> mapping) {
this.link = link;
this.map = map;
this.mapping = mapping;
+ this.counter = 0;
}
@Override
- public Boolean perform(ReadGraph g) throws DatabaseException {
- if(map != null) {
- link.type.updateRange(g, map, link.domainElement, link.rangeElement);
- map = null;
- return Boolean.TRUE;
- }
- else if(mapping != null) {
- mapping.domainModified(link);
- mapping = null;
- return Boolean.FALSE;
- }
- else
- return null;
+ public Integer perform(ReadGraph g) throws DatabaseException {
+ boolean changed = false;
+ if (map != null)
+ changed = link.type.checkChanges(g, map, link.domainElement, link.rangeElement);
+ else if (mapping != null)
+ changed = link.type.checkChanges(g, mapping, link.domainElement, link.rangeElement);
+
+ return changed ? counter + 1 : counter;
}
@Override
}
@Override
- public void execute(ReadGraph graph, Boolean result)
- throws DatabaseException {
+ public void execute(ReadGraph graph, Integer result)
+ throws DatabaseException {
+ boolean changed = result != counter;
+ counter = result;
+
+ if (map != null) {
+ if (changed)
+ link.type.updateRange(graph, map, link.domainElement, link.rangeElement);
+ map = null;
+ }
+ else if (mapping != null && changed) {
+ mapping.domainModified(link);
+ mapping = null;
+ }
}
@Override
public boolean isDisposed() {
return mapping == null || link.removed || mapping.isDisposed();
}
-
-
-
}
*******************************************************************************/
package org.simantics.objmap.graph.rules;
+import java.util.Objects;
+
import org.simantics.db.ReadGraph;
import org.simantics.db.WriteGraph;
import org.simantics.objmap.backward.IBackwardMapping;
return rangeAccessor.set(rangeElement, mappedValue);
}
+ @Override
+ public boolean checkChanges(ReadGraph g, IForwardMapping<Domain, Range> map, Domain domainElement, Range rangeElement) throws MappingException {
+ Domain value = domainAccessor.get(g, domainElement);
+ Range mappedValue = value == null ? null : map.map(g, value);
+ return mappedValue != rangeAccessor.get(rangeElement);
+ }
+
+ @Override
public void createDomain(WriteGraph g, IBackwardMapping<Domain,Range> map, Domain domainElement, Range rangeElement) throws MappingException {
updateDomain(g, map, domainElement, rangeElement);
};
+ @Override
public void createRange(ReadGraph g, IForwardMapping<Domain,Range> map, Domain domainElement, Range rangeElement) throws MappingException {
updateRange(g, map, domainElement, rangeElement);
};
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Objects;
import org.simantics.db.ReadGraph;
import org.simantics.db.WriteGraph;
Domain domainElement, Range rangeElement)
throws MappingException {
LOGGER.trace(" MappedElementsRule.updateRange");
- Collection<Domain> value = domainAccessor.get(g, domainElement);
+ ArrayList<Range> mappedValue = getMappedValue(g, map, domainElement);
+ return rangeAccessor.set(rangeElement, mappedValue);
+ }
+
+ @Override
+ public boolean checkChanges(ReadGraph g, IForwardMapping<Domain, Range> map, Domain domainElement, Range rangeElement) throws MappingException {
+ LOGGER.trace(" MappedElementsRule.updateRange");
+ ArrayList<Range> mappedValue = getMappedValue(g, map, domainElement);
+ return !Objects.equals(mappedValue, rangeAccessor.get(rangeElement));
+ }
+
+ private ArrayList<Range> getMappedValue(ReadGraph g, IForwardMapping<Domain, Range> map, Domain domainElement)
+ throws MappingException {
+ Collection<Domain> value = domainAccessor.get(g, domainElement);
ArrayList<Range> mappedValue = new ArrayList<Range>(value.size());
for(Domain r : value)
mappedValue.add(map.map(g, r));//map.get(r));
- return rangeAccessor.set(rangeElement, mappedValue);
- }
+ return mappedValue;
+ }
public void createDomain(WriteGraph g, IBackwardMapping<Domain,Range> map, Domain domainElement, Range rangeElement) throws MappingException {
updateDomain(g, map, domainElement, rangeElement);
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+
+import java.util.Objects;
+
import org.simantics.db.ReadGraph;
import org.simantics.db.WriteGraph;
import org.simantics.objmap.backward.IBackwardMapping;
LOGGER.trace(" ValueRule.updateRange");
Object value = domainAccessor.get(g, domainElement);
return rangeAccessor.set(rangeElement, value);
- }
+ }
+
+ @Override
+ public boolean checkChanges(ReadGraph g, IForwardMapping<Domain, Range> map, Domain domainElement,
+ Range rangeElement) throws MappingException {
+ Object value = rangeAccessor.get(rangeElement);
+ return !Objects.equals(value, domainAccessor.get(g, domainElement));
+ }
public void createDomain(WriteGraph g, IBackwardMapping<Domain,Range> map, Domain domainElement, Range rangeElement) throws MappingException {
updateDomain(g, map, domainElement, rangeElement);
}
}
+ @Override
public void createDomain(WriteGraph graph, IBackwardMapping<Resource,Range> mapping, Resource domainElement, Range rangeElement) throws MappingException {
};
+ @Override
public void createRange(ReadGraph graph, org.simantics.objmap.forward.IForwardMapping<Resource,Range> mapping, Resource domainElement, Range rangeElement) throws MappingException {
};
+ @Override
+ public boolean checkChanges(ReadGraph g, IForwardMapping<Resource, Range> map, Resource domainElement, Range rangeElement) throws MappingException {
+ return false;
+ }
+
+ @Override
public boolean updateDomain(WriteGraph g, IBackwardMapping<Resource,Range> map, Resource domainElement, Range rangeElement) throws MappingException {
return false;
}
+ @Override
public boolean updateRange(ReadGraph g, IForwardMapping<Resource,Range> map, Resource domainElement, Range rangeElement) throws MappingException {
return false;
}
updateRange(graph, mapping, domainElement, rangeElement);
};
+ @Override
+ public boolean checkChanges(ReadGraph g, IForwardMapping<Resource, Range> map, Resource domainElement,
+ Range rangeElement) throws MappingException {
+ boolean updated = false;
+ for(IBidirectionalMappingRule<Resource, Range> rule : rules)
+ updated |= rule.checkChanges(g, map, domainElement, rangeElement);
+ return updated;
+ }
+
public boolean updateDomain(WriteGraph g, IBackwardMapping<Resource,Range> map, Resource domainElement, Range rangeElement) throws MappingException {
if(LOGGER.isTraceEnabled())
try {
return false;
}
+ @Override
+ public boolean checkChanges(ReadGraph g, IForwardMapping<Domain, Range> map, Domain domainElement,
+ Range rangeElement) throws MappingException {
+ return false;
+ }
+
public void createDomain(WriteGraph g, IBackwardMapping<Domain,Range> map, Domain domainElement, Range rangeElement) throws MappingException {
updateDomain(g, map, domainElement, rangeElement);
};
}
}
+ @Override
public void createDomain(WriteGraph graph, IBackwardMapping<StructuralResource, IStructuralObject> mapping, StructuralResource domainElement, IStructuralObject rangeElement) throws MappingException {
};
+ @Override
public void createRange(ReadGraph graph, org.simantics.objmap.forward.IForwardMapping<StructuralResource, IStructuralObject> mapping, StructuralResource domainElement, IStructuralObject rangeElement) throws MappingException {
};
+ @Override
+ public boolean checkChanges(ReadGraph graph, IForwardMapping<StructuralResource, IStructuralObject> mapping, StructuralResource domainElement, IStructuralObject rangeElement) throws MappingException {
+ return false;
+ }
+
+ @Override
public boolean updateDomain(WriteGraph g, IBackwardMapping<StructuralResource, IStructuralObject> map, StructuralResource domainElement, IStructuralObject rangeElement) throws MappingException {
return false;
}
+ @Override
public boolean updateRange(ReadGraph g, IForwardMapping<StructuralResource, IStructuralObject> map, StructuralResource domainElement, IStructuralObject rangeElement) throws MappingException {
return false;
}
updateRange(graph, mapping, domainElement, rangeElement);
}
+ @Override
+ public boolean checkChanges(ReadGraph g, IForwardMapping<StructuralResource, IStructuralObject> map,
+ StructuralResource domainElement, IStructuralObject rangeElement) throws MappingException {
+ boolean updated = false;
+ for(IBidirectionalMappingRule<StructuralResource, IStructuralObject> rule : rules)
+ updated |= rule.checkChanges(g, map, domainElement, rangeElement);
+ return updated;
+ }
+
public boolean updateDomain(WriteGraph g, IBackwardMapping<StructuralResource,IStructuralObject> map, StructuralResource domainElement, IStructuralObject rangeElement) throws MappingException {
if(LOGGER.isTraceEnabled())
try {
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.selectionview.ui.ontology;bundle-version="1.1.0",
org.simantics.diagram.ontology;bundle-version="2.2.0",
org.simantics.issues.ontology;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.platform.ui
Automatic-Module-Name: org.simantics.platform.ui.ontology
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>\r
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
- <classpathentry kind="src" path="src"/>\r
- <classpathentry kind="output" path="bin"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Semantum Oy
Automatic-Module-Name: org.simantics.platform.ui
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.eclipse.ui.console;bundle-version="3.7.0",
org.eclipse.ui;bundle-version="3.109.0",
org.eclipse.core.jobs;bundle-version="3.9.0",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.layer0x.ontology;bundle-version="1.0.0",
org.simantics.image2.ontology;bundle-version="1.0.0",
org.simantics.action.ontology;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.project.ontology
Automatic-Module-Name: org.simantics.project.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.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.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.project;singleton:=true
Bundle-Version: 1.0.1.qualifier
Bundle-Vendor: Semantum Oy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.db.layer0;bundle-version="[0.8.0,2.0.0)",
org.simantics.layer0;bundle-version="[1.0.0,2.0.0)",
org.eclipse.core.runtime;bundle-version="3.4.0",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.scenegraph.loader;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Semantum Oy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics;bundle-version="1.0.0",
org.simantics.scenegraph;bundle-version="1.1.1";visibility:=reexport,
org.simantics.scenegraph.ontology;bundle-version="1.0.0",
import org.simantics.db.common.procedure.adapter.ListenerSupport;
import org.simantics.db.common.request.TernaryRead;
import org.simantics.db.common.request.UnaryRead;
-import org.simantics.db.common.utils.Logger;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.request.ResourceVariable;
import org.simantics.db.layer0.variable.Variable;
import org.simantics.scenegraph.INode;
import org.simantics.scenegraph.ParentNode;
import org.simantics.utils.datastructures.Pair;
+import org.slf4j.LoggerFactory;
import gnu.trove.set.hash.THashSet;
public class ScenegraphLoaderProcess implements Disposable, ListenerSupport {
+ private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(ScenegraphLoaderProcess.class);
+
final private String name;
final Class<?> loaderClass;
@Override
public void exception(Throwable t) {
- Logger.defaultLogError(t);
+ LOGGER.error("Unexpected problem encountered", t);
}
@Override
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Version: 1.1.0.qualifier
Bundle-Vendor: Semantum Oy
Require-Bundle: org.simantics.layer0
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.scenegraph.ontology
Automatic-Module-Name: org.simantics.scenegraph.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.scenegraph.profile
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Semantum Oy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.scenegraph.profile,
org.simantics.scenegraph.profile.common,
org.simantics.scenegraph.profile.impl;x-friends:="org.simantics.diagram",
org.simantics.scenegraph;bundle-version="1.1.1",
org.eclipse.core.runtime;bundle-version="3.6.0",
org.simantics.diagram.ontology;bundle-version="1.1.1",
- org.simantics.db.common
+ org.slf4j.api
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.simantics.scenegraph.profile.impl.Activator
Import-Package: org.simantics
public void add(Resource item) {
//System.out.println("Add to group(" + this + "): " + item);
items.put(item, item);
- observer.update();
+ observer.update(style, item);
}
@Override
// new Exception().printStackTrace();
//System.out.println("Remove from group(" + this + "): " + item);
items.remove(item);
- observer.update();
+ observer.update(style, item);
}
@Override
import org.simantics.db.Resource;
import org.simantics.db.Session;
import org.simantics.db.common.session.SessionEventListenerAdapter;
-import org.simantics.db.common.utils.Logger;
import org.simantics.db.procedure.Procedure;
+import org.simantics.db.service.QueryControl;
import org.simantics.db.service.SessionEventSupport;
import org.simantics.scenegraph.INode;
import org.simantics.scenegraph.g2d.G2DSceneGraph;
import org.simantics.utils.datastructures.disposable.IDisposable;
import org.simantics.utils.threads.IThreadWorkQueue;
import org.simantics.utils.threads.ThreadUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class ProfileObserver implements EvaluationContext {
+ private static final Logger LOGGER = LoggerFactory.getLogger(ProfileObserver.class);
+
private final Session session;
/**
private volatile boolean dirty = true;
private volatile boolean disposed = false;
+ private boolean needSynchronizedUpdates = false;
private List<Pair<Style, Object>> updates = new ArrayList<>();
private boolean updateAll;
this.sceneGraph = sceneGraph;
this.constants.putAll(constants);
this.notification = notification;
+ this.needSynchronizedUpdates = session.getService(QueryControl.class).getAmountOfQueryThreads() > 1;
attachSessionListener();
public void update(Style style, Object item) {
if (DebugPolicy.DEBUG_PROFILE_OBSERVER_UPDATE)
System.out.println("Profile observer marked dirty.");
-
- updates.add(Pair.make(style, item));
+
+ if (needSynchronizedUpdates) {
+ synchronized (updates) {
+ updates.add(Pair.make(style, item));
+ }
+ } else {
+ updates.add(Pair.make(style, item));
+ }
//updateAll = true;
dirty = true;
}
e.apply(ProfileObserver.this);
}
updateAll = false;
- updates.clear();
+ if (needSynchronizedUpdates) {
+ synchronized (updates) {
+ updates.clear();
+ }
+ } else {
+ updates.clear();
+ }
} else {
- List<Pair<Style, Object>> updatesCopy = new ArrayList<>(updates);
- updates.clear();
+ List<Pair<Style, Object>> updatesCopy;
+ if (needSynchronizedUpdates) {
+ synchronized (updates) {
+ updatesCopy = new ArrayList<>(updates);
+ updates.clear();
+ }
+ } else {
+ updatesCopy = new ArrayList<>(updates);
+ updates.clear();
+ }
+
for (Pair<Style, Object> update : updatesCopy) {
Style style = update.first;
Object item = update.second;
@Override
public void exception(Throwable t) {
- Logger.defaultLogError(t);
+ LOGGER.error("RuntimeProfileActiveEntries request failed", t);
}
});
}
@Override
public void exception(Throwable throwable) {
- Logger.defaultLogError(throwable);
+ LOGGER.error("Exception occurred during diagram profile observation", throwable);
}
@SuppressWarnings("unchecked")
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.scenegraph.swing
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Semantum Oy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.scenegraph;bundle-version="1.1.1",
- org.jfree.jcommon;bundle-version="1.0.16",
org.jfree.jchart;bundle-version="1.0.13",
org.eclipse.core.runtime;bundle-version="3.6.0",
org.eclipse.ui;bundle-version="3.6.2",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.scenegraph.ui;singleton:=true
Bundle-Version: 1.1.1.qualifier
Bundle-Vendor: Semantum Oy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.5.0",
org.eclipse.core.expressions;bundle-version="3.4.100",
org.eclipse.ui;bundle-version="3.5.0",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry exported="true" kind="lib" path="lib/batik-awt-util-1.8.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/batik-util-1.8.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/batik-parser-1.8.jar"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="testcases"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.utils.thread;bundle-version="1.0.0",
org.simantics.utils.datastructures;bundle-version="1.1.0",
org.jfree.jchart;bundle-version="1.0.12",
- org.jfree.jcommon;bundle-version="1.0.15",
org.junit;resolution:=optional,
org.simantics.scl.runtime;bundle-version="0.1.4",
org.simantics.databoard;bundle-version="0.6.3",
com.lowagie.text;bundle-version="2.1.7";resolution:=optional,
org.simantics.utils;bundle-version="1.1.0",
- org.slf4j.api
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+ org.slf4j.api,
+ org.apache.batik;bundle-version="1.12.0";visibility:=reexport
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ClassPath: .,
- lib/svgSalamander-tiny.jar,
- lib/batik-parser-1.8.jar,
- lib/batik-awt-util-1.8.jar,
- lib/batik-util-1.8.jar
+ lib/svgSalamander-tiny.jar
Export-Package: com.kitfox.svg,
com.kitfox.svg.animation,
com.kitfox.svg.xml,
- org.apache.batik.ext.awt.geom,
- org.apache.batik.parser,
org.simantics.scenegraph,
org.simantics.scenegraph.adapters,
org.simantics.scenegraph.g2d,
TROVE-README-license.txt,\
TROVE-LICENSE.txt,\
README.txt,\
- JSI-LICENSE.txt,\
- lib/batik-parser-1.8.jar,\
- lib/batik-awt-util-1.8.jar,\
- lib/batik-util-1.8.jar
+ JSI-LICENSE.txt
Rectangle2D bounds = null;
while(it.hasNext()) {
IG2DNode node = it.next();
- Rectangle2D b = node.getBounds();
+ Rectangle2D b = node.getBoundsInLocal(ignoreNulls);
if(b == null && !ignoreNulls)
return null;
if(b != null) {
if(!GeometryUtils.isUndefinedRectangle(b)) {
+ b = node.localToParent(b);
if(bounds == null) {
bounds = b.getFrame();
} else {
public static final Command FOCUS_TOOLTIP = new Command("focusTooltip");
+ public static final Command COPY_AS_SVG = new Command("copyAsSVG");
public static Command showPopup(Point2D atControlPosition) {
return new ShowPopup(atControlPosition);
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2020 Association for Decentralized Information Management in
+ * Industry THTH ry.
+ * 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:
+ * Semantum Oy - initial API and implementation
+ *******************************************************************************/
+package org.simantics.scenegraph.g2d.nodes;
+
+import java.awt.Graphics2D;
+import java.awt.geom.Rectangle2D;
+
+import org.simantics.diagram.connection.rendering.ConnectionCrossings;
+import org.simantics.diagram.connection.rendering.ConnectionRenderingHints;
+import org.simantics.scenegraph.g2d.G2DNode;
+
+public class ConnectionCrossingsNode extends G2DNode {
+
+ private static final long serialVersionUID = -696142275610396889L;
+
+ private ConnectionCrossings crossings;
+
+ @Override
+ public void render(Graphics2D g) {
+ crossings.reset();
+ if (crossings.getWidth() > 0 && crossings.getType() != ConnectionCrossings.Type.NONE) {
+ g.setRenderingHint(ConnectionRenderingHints.KEY_PATH_MODIFIER, crossings);
+ } else {
+ g.setRenderingHint(ConnectionRenderingHints.KEY_PATH_MODIFIER, null);
+ }
+ }
+
+ public void setCrossings(ConnectionCrossings crossings) {
+ this.crossings = crossings;
+ }
+
+ @Override
+ public Rectangle2D getBoundsInLocal() {
+ return null;
+ }
+
+ public ConnectionCrossings getConnectionCrossings() {
+ return crossings;
+ }
+}
@Override
public Rectangle2D getBoundsInLocal() {
+ return getBoundsInLocal(false);
+ }
+
+ @Override
+ public Rectangle2D getBoundsInLocal(boolean ignoreNulls) {
// Safety against cyclic cases.
if (hasFlags(IN_GET_BOUNDS))
return new Rectangle2D.Double();
setFlags(IN_GET_BOUNDS);
try {
- Rectangle2D bounds = n.getBoundsInLocal();
+ Rectangle2D bounds = n.getBoundsInLocal(ignoreNulls);
if (transform != null && !transform.isIdentity())
bounds = transform.createTransformedShape(bounds).getBounds2D();
return bounds;
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * 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:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.scenegraph.g2d.nodes;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.Paint;
+import java.awt.Shape;
+import java.awt.Stroke;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Rectangle2D;
+
+import org.simantics.scenegraph.g2d.G2DNode;
+import org.simantics.scenegraph.utils.GeometryUtils;
+import org.simantics.scenegraph.utils.InitValueSupport;
+
+/**
+ * A scene graph node that renders a specified AWT {@link Shape} by optionally
+ * filling or drawing it.
+ *
+ * This is similar to ShapeNode, but allows separate stroke and fill colors.
+ * Due to API changes, I've done separate implementation. -MLuu
+ *
+ *
+ * @author luukkainen
+ * @author J-P Laine
+ * @author Tuukka Lehtonen
+ *
+ */
+public class ShapeNode2 extends G2DNode implements InitValueSupport {
+
+ private static final long serialVersionUID = -5700299566608619380L;
+
+ protected static final Stroke DEFAULT_STROKE = new BasicStroke(2);
+
+ protected Shape shape = null;
+ protected Stroke stroke = DEFAULT_STROKE;
+ protected Paint strokeColor = Color.BLACK;
+ protected Paint fillColor = null;
+ protected boolean scaleStroke = false;
+ protected boolean scaleShape = false;
+
+ protected transient Shape dynamicShape = null;
+ protected transient Stroke dynamicStroke = null;
+ protected transient Paint dynamicStrokeColor = null;
+ protected transient Paint dynamicFillColor = null;
+ protected transient Boolean dynamicScaleStroke = null;
+ protected transient Boolean dynamicScaleShape = null;
+
+ @PropertySetter("shape")
+ @SyncField("shape")
+ public void setShape(Shape shape) {
+ this.shape = shape;
+ repaint();
+ }
+
+ @PropertySetter("stroke")
+ @SyncField("stroke")
+ public void setStroke(Stroke stroke) {
+ this.stroke = stroke;
+ }
+
+ @PropertySetter("strokeColor")
+ @SyncField("strokeColor")
+ public void setStrokeColor(Paint color) {
+ this.strokeColor = color;
+ }
+
+ @PropertySetter("fillColor")
+ @SyncField("fillColor")
+ public void setFillColor(Paint color) {
+ this.fillColor = color;
+ }
+
+
+ @SyncField("scaleStroke")
+ public void setScaleStroke(boolean scaleStroke) {
+ this.scaleStroke = scaleStroke;
+ }
+
+ @SyncField("scaleShape")
+ public void setScaleShape(boolean scaleShape) {
+ this.scaleShape = scaleShape;
+ }
+
+ @Override
+ public void render(Graphics2D g2d) {
+ Shape shape = dynamicShape != null ? dynamicShape : this.shape;
+ if (shape == null)
+ return;
+
+ AffineTransform ot = setupRender(g2d);
+ renderShape(g2d, shape);
+ if (ot != null)
+ g2d.setTransform(ot);
+ }
+
+ /**
+ * @param g2d
+ * @return current transform
+ */
+ protected AffineTransform setupRender(Graphics2D g2d) {
+ AffineTransform old = null;
+ if (!transform.isIdentity()) {
+ old = g2d.getTransform();
+ g2d.transform(transform);
+ }
+
+
+ boolean scaleShape = Boolean.TRUE.equals(dynamicScaleShape) ? true : this.scaleShape;
+ if (scaleShape) {
+ double xs = g2d.getTransform().getScaleX();
+ double ys = g2d.getTransform().getScaleY();
+ g2d.scale(1/xs, 1/ys);
+ }
+
+ return old;
+ }
+
+ protected void renderShape(Graphics2D g2d, Shape s) {
+ Paint color = dynamicFillColor != null ? dynamicFillColor : this.fillColor;
+ if (color != null) {
+ g2d.setPaint(color);
+ g2d.fill(s);
+ }
+
+ Stroke stroke = dynamicStroke != null ? dynamicStroke : this.stroke;
+ if (stroke != null) {
+ color = dynamicStrokeColor != null ? dynamicStrokeColor : this.strokeColor;
+ if (color != null) g2d.setPaint(color);
+
+ boolean scaleStroke = Boolean.TRUE.equals(dynamicScaleStroke) ? true : this.scaleStroke;
+ if (scaleStroke && stroke instanceof BasicStroke) {
+ BasicStroke bs = GeometryUtils.scaleStroke(stroke, (float) (1.0 / GeometryUtils.getScale(g2d.getTransform())));
+ g2d.setStroke(bs);
+ } else {
+ g2d.setStroke(stroke);
+ }
+
+ g2d.draw(s);
+ }
+ }
+
+ @Override
+ public Rectangle2D getBoundsInLocal() {
+ if(shape == null) return null;
+ return shape.getBounds2D();
+ }
+
+ public void setValue(String key, Object value) {
+ if ("shape".equals(key))
+ dynamicShape = (Shape) value;
+ else if ("stroke".equals(key))
+ dynamicStroke = (Stroke) value;
+ else if ("strokeColor".equals(key))
+ dynamicStrokeColor = (Paint) value;
+ else if ("fillColor".equals(key))
+ dynamicFillColor = (Paint) value;
+ else if ("scaleStroke".equals(key))
+ dynamicScaleStroke = (Boolean) value;
+ else if ("scaleShape".equals(key))
+ dynamicScaleShape = (Boolean) value;
+// else super.setValue(key, value);
+ }
+
+ @Override
+ public void initValues() {
+ dynamicShape = null;
+ dynamicStroke = null;
+ dynamicStrokeColor = null;
+ dynamicFillColor = null;
+ dynamicScaleStroke = null;
+ dynamicScaleShape = null;
+ }
+
+ @Override
+ public String toString() {
+ return super.toString() + " [shape=" + shape + ",color=" + strokeColor + ",fill=" + fillColor +"]";
+ }
+
+}
selectionStroke = new BasicStroke(width, BasicStroke.CAP_BUTT, stroke.getLineJoin());
}
} else {
+ // TODO: support AggregateConnectionStyle
selectionStroke = SELECTION_STROKE;
}
}
if(dynamicColor != null || dynamicStroke != null) {
BasicConnectionStyle baseStyle = (BasicConnectionStyle)tryGetStyle(baseRenderer);
- try {
- Constructor<? extends BasicConnectionStyle> c = baseStyle.getClass().getConstructor(Color.class, Color.class, double.class, Stroke.class, Stroke.class, double.class, double.class);
- renderer = new StyledRouteGraphRenderer(c.newInstance(
- dynamicColor != null ? dynamicColor : baseStyle.getLineColor(),
- baseStyle.getBranchPointColor(), baseStyle.getBranchPointRadius(),
- dynamicStroke != null ? dynamicStroke : baseStyle.getLineStroke(),
- dynamicStroke != null ? dynamicStroke : baseStyle.getRouteLineStroke(),
- baseStyle.getDegeneratedLineLength(), baseStyle.getRounding()));
- } catch (Exception e) {
- renderer = new StyledRouteGraphRenderer(new BasicConnectionStyle(
- dynamicColor != null ? dynamicColor : baseStyle.getLineColor(),
- baseStyle.getBranchPointColor(), baseStyle.getBranchPointRadius(),
- dynamicStroke != null ? dynamicStroke : baseStyle.getLineStroke(),
- dynamicStroke != null ? dynamicStroke : baseStyle.getRouteLineStroke(),
- baseStyle.getDegeneratedLineLength(), baseStyle.getRounding()));
+ if (baseStyle != null) {
+ try {
+ Constructor<? extends BasicConnectionStyle> c = baseStyle.getClass().getConstructor(Color.class, Color.class, double.class, Stroke.class, Stroke.class, double.class, double.class, double.class);
+ renderer = new StyledRouteGraphRenderer(c.newInstance(
+ dynamicColor != null ? dynamicColor : baseStyle.getLineColor(),
+ baseStyle.getBranchPointColor(), baseStyle.getBranchPointRadius(),
+ dynamicStroke != null ? dynamicStroke : baseStyle.getLineStroke(),
+ dynamicStroke != null ? dynamicStroke : baseStyle.getRouteLineStroke(),
+ baseStyle.getDegeneratedLineLength(), baseStyle.getRounding(), baseStyle.getOffset()));
+ } catch (Exception e) {
+ renderer = new StyledRouteGraphRenderer(new BasicConnectionStyle(
+ dynamicColor != null ? dynamicColor : baseStyle.getLineColor(),
+ baseStyle.getBranchPointColor(), baseStyle.getBranchPointRadius(),
+ dynamicStroke != null ? dynamicStroke : baseStyle.getLineStroke(),
+ dynamicStroke != null ? dynamicStroke : baseStyle.getRouteLineStroke(),
+ baseStyle.getDegeneratedLineLength(), baseStyle.getRounding(), baseStyle.getOffset()));
+ }
+ } else {
+ // TODO: support AggregateConnectionStyle
+ renderer = baseRenderer;
}
-
} else {
renderer = baseRenderer;
}
import java.util.List;
import java.util.Map;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import com.kitfox.svg.SVGDiagram;
/**
*/
public class MipMapBufferedImage extends BufferedImage {
+ private static final Logger LOGGER = LoggerFactory.getLogger(MipMapBufferedImage.class);
+
/** Extra margin to the bounds reported by batik */
public static final double MARGIN_PERCENT = 3;
}
private void initializeRasters() {
+ if (LOGGER.isDebugEnabled())
+ LOGGER.debug("initializeRasters({}): diagram={}, referenceSize={}, imageBounds={}, maxres={}, minres={}", this.toString(), source, referenceSize, imageBounds, maxResolution(), minResolution());
List<Double> resolutions = new ArrayList<Double>();
if (referenceSize != null && !imageBounds.isEmpty()) {
}
}
+ if (LOGGER.isDebugEnabled())
+ LOGGER.debug("initializeRasters({}): resolutions={}", this.toString(), resolutions);
+
// arraylist -> array
this.resolutions = new double[resolutions.size()];
for (int i=0; i<resolutions.size(); i++)
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: SCL Commands
Bundle-SymbolicName: org.simantics.scl.commands
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.scl.commands
Require-Bundle: org.simantics.db;bundle-version="1.1.0",
org.simantics.scl.osgi;bundle-version="1.0.4",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.scl.compiler.decompiler
Bundle-Version: 1.0.0.qualifier
Fragment-Host: org.simantics.scl.compiler;bundle-version="0.6.1"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: org.jboss.windup.decompiler.procyon;bundle-version="4.0.0",
- org.jboss.windup.decompiler.procyon.windup-procyon-compilertools;bundle-version="1.0.0",
- org.jboss.windup.decompiler.procyon.windup-procyon-core;bundle-version="1.0.0",
- org.jboss.windup.decompiler.procyon.windup-procyon-reflection;bundle-version="1.0.0",
- org.jboss.windup.decompiler.api.forge-addon;bundle-version="4.0.0",
- org.jboss.windup.utils.windup-utils.forge-addon;bundle-version="4.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Require-Bundle: org.jboss.windup.decompiler.api.forge-addon;bundle-version="4.0.0",
+ org.bitbucket.mstrobel.procyon-compilertools;bundle-version="0.5.33",
+ org.bitbucket.mstrobel.procyon-core;bundle-version="0.5.33"
Automatic-Module-Name: org.simantics.scl.compiler.decompiler
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: SCL Compiler
Bundle-SymbolicName: org.simantics.scl.compiler
Bundle-Version: 0.6.1.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: gnu.trove3;bundle-version="3.0.0",
org.simantics.scl.runtime;bundle-version="0.1.4";visibility:=reexport,
org.junit;bundle-version="4.12.0";resolution:=optional,
org.objectweb.asm;bundle-version="[5.0.0,8.0.0)",
org.objectweb.asm.commons;bundle-version="[5.0.0,8.0.0)",
org.objectweb.asm.util;bundle-version="[5.0.0,8.0.0)",
- org.slf4j.api;bundle-version="1.7.2"
+ org.slf4j.api
Export-Package: org.cojen.classfile,
org.simantics.scl.compiler.commands,
org.simantics.scl.compiler.common.datatypes,
this.location = Locations.NO_LOCATION;
}
+ public InternalCompilerError(String message, Throwable cause) {
+ super(message, cause);
+ this.location = Locations.NO_LOCATION;
+ }
+
public InternalCompilerError(long location, String message) {
super(message);
this.location = location;
return getModule(moduleName, null);
}
+ public void update(String moduleName) {
+ getModuleEntry(moduleName, null).notifyAboutUpdate();
+ }
+
public Failable<RuntimeModule> getRuntimeModule(String moduleName, UpdateListener listener) {
return getModuleEntry(moduleName, listener).getRuntimeModule();
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Xml
Bundle-SymbolicName: org.simantics.scl.data
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.scl.runtime;bundle-version="0.4.0",
org.simantics.scl.osgi;bundle-version="1.0.4",
org.jdom2;bundle-version="2.0.6",
toJson (a, b, c, d, e) = JsonArray [toJson a, toJson b, toJson c, toJson d, toJson e]
fromJson (JsonArray [a, b, c, d, e]) = (fromJson a, fromJson b, fromJson c, fromJson d, fromJson e)
+instance (Json a, Json b, Json c, Json d, Json e, Json f) => Json (a, b, c, d, e, f) where
+ writeJson g (a, b, c, d, e, f) = do
+ writeStartArray g
+ writeJson g a
+ writeJson g b
+ writeJson g c
+ writeJson g d
+ writeJson g e
+ writeJson g f
+ writeEndArray g
+ readJson p = (a, b, c, d, e, f)
+ where
+ assertStartArray p
+ a = readNextJson p
+ b = readNextJson p
+ c = readNextJson p
+ d = readNextJson p
+ e = readNextJson p
+ f = readNextJson p
+ assertEndArray p
+ toJson (a, b, c, d, e, f) = JsonArray [toJson a, toJson b, toJson c, toJson d, toJson e, toJson f]
+ fromJson (JsonArray [a, b, c, d, e, f]) = (fromJson a, fromJson b, fromJson c, fromJson d, fromJson e, fromJson f)
+
+
data Json =
JsonString String
| JsonDouble Double
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.application,
org.simantics.db.management,
org.simantics.layer0.utils,
- org.slf4j.api;bundle-version="1.7.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+ org.slf4j.api
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Vendor: VTT Technical Research Centre of Finland
Export-Package: org.simantics.scl.db
Automatic-Module-Name: org.simantics.scl.db
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: SCL Expressions support
Bundle-SymbolicName: org.simantics.scl.expressions
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.scl.compiler;bundle-version="0.1.0",
org.simantics.databoard;bundle-version="0.6.5"
Export-Package: org.simantics.scl.expressions,
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.scl.compiler;bundle-version="0.6.0";visibility:=reexport,
org.slf4j.api
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.scl.osgi,
org.simantics.scl.osgi.internal,
org.simantics.scl.osgi.issues
try {
bundle.start();
} catch (BundleException e) {
- throw new InternalCompilerError("Couldn't activate bundle " + bundle.getSymbolicName() + ". Bundle state is " + BundleUtils.resolveBundleState(bundle));
+ throw new InternalCompilerError("Couldn't activate bundle " + bundle.getSymbolicName() + ". Bundle state is " + BundleUtils.resolveBundleState(bundle), e);
}
wiring = bundle.adapt(BundleWiring.class);
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="tests"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Reflection
Bundle-SymbolicName: org.simantics.scl.reflection;singleton:=true
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.scl.compiler;bundle-version="0.1.0";visibility:=reexport,
org.simantics.scl.runtime;bundle-version="0.1.4",
gnu.trove3;bundle-version="3.0.0",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
Bundle-SymbolicName: org.simantics.scl.rest
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.simantics.scl.rest.Activator
-Require-Bundle: org.eclipse.core.runtime,
- org.glassfish.jersey.core.jersey-server,
- javax.ws.rs-api,
+Require-Bundle: org.glassfish.jersey.core.jersey-server,
org.simantics.scl.compiler,
org.simantics.scl.osgi,
- org.eclipse.jetty.servlet,
org.glassfish.jersey.containers.jersey-container-servlet-core,
javax.servlet-api,
- org.eclipse.jetty.server,
- org.eclipse.jetty.util,
- org.eclipse.jetty.io,
+ org.eclipse.jetty.servlet;bundle-version="9.4.24",
+ org.eclipse.jetty.server;bundle-version="9.4.24",
+ org.eclipse.jetty.util;bundle-version="9.4.24",
+ org.eclipse.jetty.io;bundle-version="9.4.24",
com.fasterxml.jackson.core.jackson-core;bundle-version="2.8.8",
com.fasterxml.jackson.core.jackson-annotations;bundle-version="2.8.0",
com.fasterxml.jackson.core.jackson-databind;bundle-version="2.8.8",
org.jvnet.mimepull;bundle-version="1.9.6",
org.glassfish.jersey.core.jersey-client,
org.glassfish.jersey.core.jersey-common;bundle-version="2.25.1",
- org.simantics.scl.runtime
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+ org.simantics.scl.runtime,
+ org.eclipse.osgi;bundle-version="3.15.100",
+ jakarta.ws.rs-api;bundle-version="2.1.6"
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.simantics.scl.rest
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="generation"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: SCL Runtime
Bundle-SymbolicName: org.simantics.scl.runtime;singleton:=true
Bundle-Version: 0.4.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.scl.runtime,
org.simantics.scl.runtime.chr,
org.simantics.scl.runtime.collection,
Require-Bundle: org.junit;bundle-version="4.12.0";resolution:=optional,
gnu.trove3;bundle-version="3.0.0",
org.simantics.databoard;bundle-version="0.6.5";visibility:=reexport,
- org.slf4j.api;bundle-version="1.7.20"
+ org.slf4j.api
Automatic-Module-Name: org.simantics.scl.runtime
--- /dev/null
+package org.simantics.scl.runtime.exceptions;
+
+public class CheckedFunctionException extends RuntimeException {
+
+ private static final long serialVersionUID = 6314226787099140449L;
+
+ public CheckedFunctionException(Exception cause) {
+ super(cause);
+ }
+
+}
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>\r
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
- <classpathentry kind="output" path="bin"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
-eclipse.preferences.version=1\r
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled\r
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7\r
-org.eclipse.jdt.core.compiler.compliance=1.7\r
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error\r
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error\r
-org.eclipse.jdt.core.compiler.source=1.7\r
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Tutorial
Bundle-SymbolicName: org.simantics.scl.tutorial
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-11
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: SCL UI
Bundle-SymbolicName: org.simantics.scl.ui;singleton:=true
Bundle-Version: 0.5.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.eclipse.ui.editors;bundle-version="3.6.0",
org.eclipse.core.resources;bundle-version="3.6.0",
org.eclipse.ui;bundle-version="3.6.0",
</extension>
<extension
point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.ui.views.showView"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M2+M3+Q S">
- <parameter
- id="org.eclipse.ui.views.showView.viewId"
- value="org.simantics.scl.ui.console">
- </parameter>
- </key>
- <key
- platform="carbon"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M2+M3+Q S">
- </key>
- <key
- platform="carbon"
- commandId="org.eclipse.ui.views.showView"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M1+M3+Q S">
- <parameter
- id="org.eclipse.ui.views.showView.viewId"
- value="org.simantics.scl.ui.console">
- </parameter>
- </key>
<key
commandId="org.simantics.scl.editor.openModule"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
*******************************************************************************/
package org.simantics.scl.ui.assist;
+import org.eclipse.jface.fieldassist.ContentProposalAdapter;
import org.eclipse.jface.fieldassist.IControlContentAdapter;
import org.eclipse.jface.fieldassist.IControlContentAdapter2;
import org.eclipse.swt.custom.StyledText;
public void insertControlContents(Control control, String contents, int cursorPosition) {
StyledText text = ((StyledText)control);
cursorPosition = Math.min(cursorPosition, contents.length());
- int caretEndRange = text.getCaretOffset();
+
+ int caretOffset = text.getCaretOffset();
String currentText = text.getText();
-
- int offset = caretEndRange;
- int length = currentText.length();
- while (--offset >= 0 && (Character.isJavaIdentifierPart(currentText.charAt(offset)) && !Character.isWhitespace(currentText.charAt(offset))))
- length--;
-
- int nameSpaceBeginRange = currentText.lastIndexOf(".", caretEndRange - 1); //$NON-NLS-1$
- if (nameSpaceBeginRange > length)
- length = nameSpaceBeginRange;
- int endRange = currentText.length();
- if (caretEndRange < endRange)
- endRange = caretEndRange;
- text.setSelection(length, endRange);
+ int replacementOffset = findPrefixMatchOffset(currentText, caretOffset, contents);
+
+// System.out.println("text: " + currentText);
+// System.out.println("proposal to fill: " + contents);
+// System.out.format("longest match of proposed contents found from text @ offset %d: \"%s[%s]%s\"%n",
+// replacementOffset,
+// currentText.substring(0, replacementOffset),
+// currentText.substring(replacementOffset, caretOffset),
+// currentText.substring(caretOffset));
+
+ // The text between [replaceOffset, caretOffset) will be replaced with `contents`
+ text.setSelection(replacementOffset, caretOffset);
text.insert(contents);
- // calculate the initial count of letters that was typed when the proposal was accepted to insert the caret
- // at the right position
- int proposalFirstLettersCount = endRange - (length);
- text.setCaretOffset(caretEndRange + cursorPosition - proposalFirstLettersCount);
+ text.setSelection(replacementOffset + contents.length());
+ }
+
+ /**
+ * Find offset of longest prefix match of <code>match</code> in
+ * <code>text</code> ending at offset <code>endOffset</code>.
+ *
+ * Example:
+ * <pre>
+ * ... res (=text)
+ * resource (=match)
+ * resourc
+ * resour
+ * resou
+ * reso
+ * res match! return endOffset - 3
+ * </pre>
+ *
+ * @param text the text from which to find the match
+ * @param endOffset endOffset until which to search for the longest match
+ * @param match the text to prefix-match
+ * @return
+ */
+ private static int findPrefixMatchOffset(String text, int endOffset, String match) {
+ for (int i = match.length(); i >= 0; --i) {
+ if (text.regionMatches(true, endOffset - i, match, 0, i))
+ return endOffset - i;
+ }
+ return 0;
}
/*
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Vendor: Semantum Oy
Require-Bundle: org.simantics.layer0,
org.simantics.layer0x.ontology;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.selectionview
Automatic-Module-Name: org.simantics.selectionview.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.views.ontology;bundle-version="1.1.0",
org.simantics.viewpoint.ontology;bundle-version="1.0.0",
org.simantics.selectionview.ontology;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.simantics.selectionview.ui.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.modeling;bundle-version="1.1.1",
org.simantics.scenegraph.ontology;bundle-version="1.0.0",
org.slf4j.api
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.selectionview
Automatic-Module-Name: org.simantics.selectionview
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Vendor: Semantum Oy
Require-Bundle: org.simantics.layer0,
org.simantics.image2.ontology;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.silk
Automatic-Module-Name: org.simantics.silk.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Version: 1.1.0.qualifier
Require-Bundle: org.simantics.layer0,
org.simantics.layer0x.ontology;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.simulation.ontology
Automatic-Module-Name: org.simantics.simulation.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="tests"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Sequences
Bundle-SymbolicName: org.simantics.simulation.sequences
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.junit;bundle-version="4.12.0";resolution:=optional,
org.simantics.scl.osgi;bundle-version="1.0.4",
gnu.trove3;bundle-version="3.0.3"
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.eclipse.osgi.services,
org.eclipse.e4.core.services;bundle-version="2.0.0",
org.eclipse.e4.ui.di,
- org.eclipse.e4.core.di.extensions;bundle-version="0.13.0"
+ org.eclipse.e4.core.di.extensions;bundle-version="0.13.0",
+ jakarta.annotation-api;bundle-version="1.3.5"
Import-Package: javax.inject
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.simantics.simulation.ui
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="tests"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Simulation Plug-in
Bundle-SymbolicName: org.simantics.simulation;singleton:=true
Bundle-Version: 1.1.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.ui;bundle-version="1.0.0",
org.simantics.project;bundle-version="1.0.0",
org.simantics;bundle-version="1.0.0";visibility:=reexport,
org.simantics.fastlz;bundle-version="1.2.1",
org.apache.commons.compress;bundle-version="1.7.0",
org.simantics.lz4;bundle-version="1.3.0",
- org.slf4j.api;bundle-version="1.7.0"
+ org.slf4j.api
Export-Package: org.simantics.simulation,
org.simantics.simulation.data,
org.simantics.simulation.experiment,
import java.util.concurrent.Executor;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import org.simantics.databoard.Bindings;
import org.simantics.databoard.accessor.error.AccessorException;
import org.simantics.history.util.subscription.SubscriptionItem;
import org.simantics.simulation.data.Datasource.DatasourceListener;
import org.simantics.utils.datastructures.Triple;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* This adapter reads data from Datasource and writes to an open Subscription.
*/
public class DatasourceAdapter implements DatasourceListener {
- protected Logger logger = Logger.getLogger( DatasourceAdapter.class.toString() );
+ protected Logger logger = LoggerFactory.getLogger( DatasourceAdapter.class );
protected Collector session;
protected boolean loaded = false;
protected List<VariableHandle> handles = new ArrayList<VariableHandle>();
result.add(Triple.make(key, binding, value));
} catch (AccessorException e) {
if (failedIds.add(key))
- logger.log(Level.SEVERE, e.toString(), e);
+ logger.error(e.toString(), e);
continue;
}
}
value = handle.getValue(source);
} catch (AccessorException e) {
if (failedIds.add(key))
- logger.log(Level.SEVERE, e.toString(), e);
+ logger.error(e.toString(), e);
continue;
}
Binding binding = handle.binding();
try {
session.setValue( key, binding, value );
} catch (HistoryException e) {
- logger.log(Level.SEVERE, e.toString(), e);
+ logger.error(e.toString(), e);
}
} else {
Binding binding = bindings.get(i);
if (binding != null) {
session.setValue( key, binding, value );
- }
+ }
}
}
try {
session.endStep();
} catch (HistoryException e) {
- logger.log(Level.SEVERE, e.toString(), e);
+ logger.error(e.toString(), e);
}
}
} catch (HistoryException e) {
- logger.log(Level.SEVERE, e.toString(), e);
+ logger.error(e.toString(), e);
} finally {
stepLock.unlock();
}
public Executor getExecutor() {
return null;
}
-
}
// Resource experiment = graph.syncRequest(new PossibleExperiment(subscriptionItem));
// String runIdentifier = ""; // experiment.getIdentifier();
-
+
+ item.groupItemId = graph.getPossibleRelatedValue(subscriptionItem, L0.HasName, Bindings.STRING);
+ if (item.groupItemId == null) continue;
+
item.variableReference = rvi.toPossibleString(graph, configuration);
if (item.variableReference == null) continue;
public static class CSVItem {
public String modelUri;
public String label;
+ public String groupItemId;
public String variableReference;
public String unit;
}
labelBuilder.append(")");
}
- List<Bean> historyItems = im.search("variableId", item.variableReference);
+ List<Bean> historyItems = im.search("groupItemId", item.groupItemId, "variableId", item.variableReference);
Collections.sort(historyItems, SamplingFormat.INTERVAL_COMPARATOR);
if (items.isEmpty()) continue;
Bean config = historyItems.get(0);
*/
public static HistoryImportResult importHistoryArchive(HistoryManager history, Path path) throws IOException, HistoryException {
HistoryImportResult result = new HistoryImportResult();
- try (RandomAccessBinary rab = new BinaryFile(path.toFile())) {
+ try (RandomAccessBinary rab = new BinaryFile(path.toFile(), "r")) {
importHistoryArchive(history, rab, result);
return result;
} catch (IOException e) {
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>\r
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
- <classpathentry kind="src" path="src"/>\r
- <classpathentry kind="output" path="bin"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Bundle-Name: Simulator Toolkit for DB
Bundle-SymbolicName: org.simantics.simulator.toolkit.db
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.simulator.toolkit;bundle-version="1.0.0";visibility:=reexport,
org.simantics.db.layer0;bundle-version="1.1.0",
- org.slf4j.api;bundle-version="1.7.25"
+ org.slf4j.api
Export-Package: org.simantics.simulator.toolkit.db
Bundle-Vendor: Semantum Oy
Automatic-Module-Name: org.simantics.simulator.toolkit.db
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>\r
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
- <classpathentry kind="src" path="src"/>\r
- <classpathentry kind="output" path="bin"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Bundle-Name: Local Simulator Toolkit
Bundle-SymbolicName: org.simantics.simulator.toolkit
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.simulator.variable;bundle-version="1.0.0";visibility:=reexport,
org.simantics.simulator;bundle-version="1.0.0";visibility:=reexport,
gnu.trove3;bundle-version="3.0.3",
- org.slf4j.api;bundle-version="1.7.25",
+ org.slf4j.api,
org.simantics.simulation.sequences;bundle-version="1.0.0";visibility:=reexport,
org.eclipse.core.runtime,
org.simantics.databoard;bundle-version="0.6.6",
@Override
public Object getValue(Node node, Binding binding) throws NodeManagerException, BindingException {
try {
- return getValue(node).getValue(binding);
+ Variant value = getValue(node);
+ if(NodeManager.PENDING_NODE_VALUE == value)
+ return value;
+ return value.getValue(binding);
} catch (AdaptException e) {
throw new BindingException(e);
}
Variant variant = valueCache.get(node);
if(variant == null) {
Object value = realm.getEngine().getEngineValue(node);
+ if(NodeManager.PENDING_NODE_VALUE == value)
+ return (Variant)value;
Binding binding = realm.getEngine().getEngineBinding(node);
variant = new Variant(binding, value);
valueCache.put(node, variant);
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Simulator Variable Interface
Bundle-SymbolicName: org.simantics.simulator.variable
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.databoard;bundle-version="0.6.5"
Export-Package: org.simantics.simulator.variable,
org.simantics.simulator.variable.exceptions,
*/
public interface NodeManager<Node> {
- // --- Do not require a realm access ---
-
- /**
- * The realm of the node manager. Almost all other methods
- * of this class must be called inside this realm.
- */
- Realm getRealm();
-
- /**
- * Returns the name of the node. This method does not require
- * that caller is in realm.
- */
- String getName(Node node);
-
- /**
- * Adds a listener to a certain node. The new listener is called as
- * soon as possible (for example before simulator takes the next simulation
- * step). After the first call, it is called always the node value
- * or structure may have changed. This can be called outside of the realm.
- */
- void addNodeListener(Node node, Runnable listener);
-
- /**
- * Removes previously added listener. This can be called outside of
- * the realm.
- */
- void removeNodeListener(Node node, Runnable listener);
-
- // --- Require a realm access ---
-
- /**
- * @return {@code null} if node cannot be found, otherwise a node with the given path
- * @throws InvalidPathException if the path is not in a valid path format
- * @throws NotInRealmException if not synchronized to the realm
- */
- Node getNode(String path) throws NodeManagerException;
- /**
- * @return {@code null} if node cannot be found, otherwise a child node with the given name
- * @throws NotInRealmException if not synchronized to the realm
- */
- Node getChild(Node node, String name) throws NodeManagerException;
- Node getProperty(Node node, String name) throws NodeManagerException;
- List<String> getChildNames(Node node) throws NodeManagerException;
- List<String> getPropertyNames(Node node) throws NodeManagerException;
- List<Node> getChildren(Node node) throws NodeManagerException;
- List<Node> getProperties(Node node) throws NodeManagerException;
-
- /**
- * @throws NoValueException if the node has no value (and therefore no datatype)
- * @throws NotInRealmException if not synchronized to the realm
- */
- Datatype getDatatype(Node node) throws NodeManagerException;
- /**
- * @throws NoValueException if the node has no value
- * @throws BindingException if the value can not be bound to the given binding
- * @throws NotInRealmException if not synchronized to the realm
- */
- Object getValue(Node node, Binding binding) throws NodeManagerException, BindingException;
- /**
- * A variant of {@link #getValue(Object, Binding)} that uses
- * a binding chosen by the node manager.
- */
- Variant getValue(Node node) throws NodeManagerException;
- /**
- * @throws NoSuchNodeException if the property does not exist
- * @throws NoValueException if the property has no value
- * @throws NotInRealmException if not synchronized to the realm
- * @throws BindingException if the value can not be bound to the given binding
- */
- Object getValue(Node node, String property, Binding binding) throws NodeManagerException, BindingException;
- /**
- * A variant of {@link #getValue(Object, String, Binding)} that uses
- * a binding chosen by the node manager.
- */
- Variant getValue(Node node, String property) throws NodeManagerException;
-
- /**
- * @throws BindingException if the value can not be bound to the given binding
- * @throws NoValueException if the property has no value that could be assigned
- * @throws NotInRealmException if not synchronized to the realm
- */
- void setValue(Node node, Object value, Binding binding) throws NodeManagerException, BindingException;
- /**
- * @throws BindingException if the value can not be bound to the given binding
- * @throws NoSuchNodeException if the property does not exist
- * @throws NoValueException if the property has no value that could be assigned
- * @throws NotInRealmException if not synchronized to the realm
- */
- void setValue(Node node, String property, Object value, Binding binding) throws NodeManagerException, BindingException;
-
- /**
- * Asks the full URI of a property node. The parent of the property is also given as a parameter.
- * This is an optional method, NodeManager does not have to implement it for all nodes.
- */
+ public static final Variant PENDING_NODE_VALUE = new Variant();
+
+ // --- Do not require a realm access ---
+
+ /**
+ * The realm of the node manager. Almost all other methods
+ * of this class must be called inside this realm.
+ */
+ Realm getRealm();
+
+ /**
+ * Returns the name of the node. This method does not require
+ * that caller is in realm.
+ */
+ String getName(Node node);
+
+ /**
+ * Adds a listener to a certain node. The new listener is called as
+ * soon as possible (for example before simulator takes the next simulation
+ * step). After the first call, it is called always the node value
+ * or structure may have changed. This can be called outside of the realm.
+ */
+ void addNodeListener(Node node, Runnable listener);
+
+ /**
+ * Removes previously added listener. This can be called outside of
+ * the realm.
+ */
+ void removeNodeListener(Node node, Runnable listener);
+
+ // --- Require a realm access ---
+
+ /**
+ * @return {@code null} if node cannot be found, otherwise a node with the given path
+ * @throws InvalidPathException if the path is not in a valid path format
+ * @throws NotInRealmException if not synchronized to the realm
+ */
+ Node getNode(String path) throws NodeManagerException;
+ /**
+ * @return {@code null} if node cannot be found, otherwise a child node with the given name
+ * @throws NotInRealmException if not synchronized to the realm
+ */
+ Node getChild(Node node, String name) throws NodeManagerException;
+ Node getProperty(Node node, String name) throws NodeManagerException;
+ List<String> getChildNames(Node node) throws NodeManagerException;
+ List<String> getPropertyNames(Node node) throws NodeManagerException;
+ List<Node> getChildren(Node node) throws NodeManagerException;
+ List<Node> getProperties(Node node) throws NodeManagerException;
+
+ /**
+ * @throws NoValueException if the node has no value (and therefore no datatype)
+ * @throws NotInRealmException if not synchronized to the realm
+ */
+ Datatype getDatatype(Node node) throws NodeManagerException;
+ /**
+ * @throws NoValueException if the node has no value
+ * @throws BindingException if the value can not be bound to the given binding
+ * @throws NotInRealmException if not synchronized to the realm
+ */
+ Object getValue(Node node, Binding binding) throws NodeManagerException, BindingException;
+ /**
+ * A variant of {@link #getValue(Object, Binding)} that uses
+ * a binding chosen by the node manager.
+ */
+ Variant getValue(Node node) throws NodeManagerException;
+ /**
+ * @throws NoSuchNodeException if the property does not exist
+ * @throws NoValueException if the property has no value
+ * @throws NotInRealmException if not synchronized to the realm
+ * @throws BindingException if the value can not be bound to the given binding
+ */
+ Object getValue(Node node, String property, Binding binding) throws NodeManagerException, BindingException;
+ /**
+ * A variant of {@link #getValue(Object, String, Binding)} that uses
+ * a binding chosen by the node manager.
+ */
+ Variant getValue(Node node, String property) throws NodeManagerException;
+
+ /**
+ * @throws BindingException if the value can not be bound to the given binding
+ * @throws NoValueException if the property has no value that could be assigned
+ * @throws NotInRealmException if not synchronized to the realm
+ */
+ void setValue(Node node, Object value, Binding binding) throws NodeManagerException, BindingException;
+ /**
+ * @throws BindingException if the value can not be bound to the given binding
+ * @throws NoSuchNodeException if the property does not exist
+ * @throws NoValueException if the property has no value that could be assigned
+ * @throws NotInRealmException if not synchronized to the realm
+ */
+ void setValue(Node node, String property, Object value, Binding binding) throws NodeManagerException, BindingException;
+
+ /**
+ * Asks the full URI of a property node. The parent of the property is also given as a parameter.
+ * This is an optional method, NodeManager does not have to implement it for all nodes.
+ */
String getPropertyURI(Node parent, Node property);
- /**
- * Asks for the classifications of a property node.
- * This is an optional method, NodeManager does not have to implement it for all nodes.
- * A default implementation should just return {@link Collections#emptySet()}.
- * Classifications can be any strings, however a recommended interpretation is to return
- * the URIs of the primary ontological types that this node corresponds to.
- *
- * @param node the node to classify
- * @return classifications of the node, empty set if the node has no classifications
- */
- Set<String> getClassifications(Node node) throws NodeManagerException;
+ /**
+ * Asks for the classifications of a property node.
+ * This is an optional method, NodeManager does not have to implement it for all nodes.
+ * A default implementation should just return {@link Collections#emptySet()}.
+ * Classifications can be any strings, however a recommended interpretation is to return
+ * the URIs of the primary ontological types that this node corresponds to.
+ *
+ * @param node the node to classify
+ * @return classifications of the node, empty set if the node has no classifications
+ */
+ Set<String> getClassifications(Node node) throws NodeManagerException;
}
\ No newline at end of file
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>\r
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
- <classpathentry kind="src" path="src"/>\r
- <classpathentry kind="output" path="bin"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Bundle-Name: Simulator
Bundle-SymbolicName: org.simantics.simulator
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: org.slf4j.api;bundle-version="1.7.25",
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Require-Bundle: org.slf4j.api,
org.eclipse.core.runtime,
org.simantics.databoard;bundle-version="0.6.6"
Export-Package: org.simantics.simulator
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Version: 1.1.0.qualifier
Require-Bundle: org.simantics.layer0,
org.simantics.action.ontology;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.layer0
Automatic-Module-Name: org.simantics.softwareconfiguration.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Spreadsheet Common
Bundle-SymbolicName: org.simantics.spreadsheet.common
Bundle-Version: 1.1.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.utils.datastructures;bundle-version="1.0.0",
org.simantics.utils.ui;bundle-version="1.0.0",
- org.apache.log4j;bundle-version="1.2.15",
org.simantics.spreadsheet;bundle-version="1.1.0",
org.simantics.db.layer0;bundle-version="1.1.0",
org.simantics.scl.runtime;bundle-version="0.1.2",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.db,
org.simantics.spreadsheet.graph,
org.simantics
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Service-Component: OSGI-INF/component.xml
Bundle-Vendor: Semantum Oy
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="commons-math3-3.6.1.jar"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Spreadsheet Database Binding
Bundle-SymbolicName: org.simantics.spreadsheet.graph;singleton:=true
Bundle-Version: 1.1.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.layer0.utils,
org.simantics.ui;bundle-version="1.0.0",
org.simantics.layer0;bundle-version="1.0.0",
org.eclipse.e4.core.contexts,
org.eclipse.e4.ui.di,
org.simantics.browsing.ui.swt,
- org.slf4j.api;bundle-version="1.7.20",
+ org.slf4j.api,
org.simantics.simulator.toolkit;bundle-version="1.0.0",
org.simantics.simulator.toolkit.db;bundle-version="1.0.0"
Export-Package: org.apache.commons.math3.stat.regression,
import java.util.List;
import java.util.Map;
-import javax.xml.soap.Node;
-
import org.simantics.Simantics;
import org.simantics.databoard.Bindings;
import org.simantics.databoard.binding.mutable.Variant;
public static SpreadsheetBook spreadsheetBook(Variable variable) {
if(variable instanceof StandardGraphChildVariable) {
- VariableNode<Node> node = ((StandardGraphChildVariable)variable).node;
+ VariableNode<?> node = ((StandardGraphChildVariable)variable).node;
if(node != null) {
if(node.node instanceof SpreadsheetBook)
return (SpreadsheetBook) node.node;
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.simulation.ontology;bundle-version="1.1.0",
org.simantics.datatypes.ontology;bundle-version="1.1.0",
org.simantics.selectionview.ontology;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.spreadsheet.resource
Automatic-Module-Name: org.simantics.spreadsheet.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.eclipse.e4.core.contexts,
org.eclipse.e4.ui.di
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.spreadsheet.ui,
org.simantics.spreadsheet.ui.editor
Bundle-Vendor: Semantum Oy
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>\r
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
- <classpathentry kind="src" path="src"/>\r
- <classpathentry kind="output" path="bin"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Spreadsheet
Bundle-SymbolicName: org.simantics.spreadsheet
Bundle-Version: 1.1.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.spreadsheet,
org.simantics.spreadsheet.cell.handler,
org.simantics.spreadsheet.event.model,
org.simantics.simulator.toolkit;bundle-version="1.0.0",
org.simantics.structural.synchronization;bundle-version="1.0.0",
org.apache.poi,
- org.slf4j.api;bundle-version="1.7.25"
+ org.slf4j.api
Bundle-Vendor: VTT Technical Research Centre of Finland
Automatic-Module-Name: org.simantics.spreadsheet
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.simulation.ontology;bundle-version="1.1.0",
org.simantics.issues.ontology;bundle-version="1.2.0",
org.simantics.datatypes.ontology;bundle-version="1.1.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.structural.stubs
Bundle-Vendor: VTT Technical Research Centre of Finland
Automatic-Module-Name: org.simantics.structural.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Synchronization Client
Bundle-SymbolicName: org.simantics.structural.synchronization.client
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.databoard;bundle-version="0.6.5",
org.simantics.db.layer0;bundle-version="1.1.0",
org.simantics.structural.ontology;bundle-version="1.2.0",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Synchronization
Bundle-SymbolicName: org.simantics.structural.synchronization;singleton:=true
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.structural.synchronization.base,
org.simantics.structural.synchronization.protocol,
org.simantics.structural.synchronization.utils
*/
THashSet<T> potentiallyUpdatedComponents = new THashSet<>();
+ /**
+ * Is this potentially an undo/redo-related synchronization?
+ *
+ * Default is true for backwards compatibility.
+ */
+ protected boolean isUndo = true;
+
public SynchronizationEventHandlerBase(Solver solver, ReferenceResolverBase<T> resolver, SolverNameUtil nameUtil,
ComponentFactory<T> componentFactory, ModuleUpdaterFactoryBase<T> moduleUpdaterFactory, MappingBase<T> mapping) {
this.solver = solver;
this.resolver = resolver;
}
+ /**
+ * Mark the undo/redo status of this handler.
+ *
+ * Set 'isUndo' to false when processing a normal synchronization and true when
+ * processing an undo/redo.
+ *
+ * When 'isUndo' is false, loading of component solver state from the state undo context
+ * is skipped for added components.
+ */
+ public void setAsUndo(boolean isUndo) {
+ this.isUndo = isUndo;
+ }
+
@Override
public void beginSynchronization() {
if(TRACE_EVENTS) {
else {
component.attached = false;
context.setModuleName(nameUtil.getFreshName(parentSolverComponentName, name));
- context.addPostUpdateAction(new Runnable() {
- @Override
- public void run() {
- context.stateLoadedFromUndo = mapping.undoContext.loadState(solver,
- context.component.componentId,
- context.component.uid);
- }
- });
+ if (isUndo) {
+ context.addPostUpdateAction(new Runnable() {
+ @Override
+ public void run() {
+ context.stateLoadedFromUndo = mapping.undoContext.loadState(solver,
+ context.component.componentId,
+ context.component.uid);
+ }
+ });
+ }
updater.create(context, properties, connections);
solverComponentNameToComponent.put(context.getModuleName(), component);
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.browsing.ui.platform;bundle-version="1.1.0",
org.simantics.modeling.ontology;bundle-version="1.0.0";visibility:=reexport
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.structural.ui.menuContributions,
org.simantics.structural.ui.modelBrowser,
org.simantics.structural.ui.modelBrowser.contributions,
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Structural Modeling vol 2
Bundle-SymbolicName: org.simantics.structural2;singleton:=true
Bundle-Version: 1.1.1.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.structural.ontology;bundle-version="1.0.0",
org.simantics.modeling.ontology;bundle-version="1.2.0",
org.simantics.layer0.utils;bundle-version="0.8.0",
org.simantics.simulator.variable;bundle-version="1.0.0",
org.simantics.scl.osgi;bundle-version="1.0.0",
org.simantics;bundle-version="1.0.0",
- org.slf4j.api;bundle-version="1.7.25"
+ org.slf4j.api
Export-Package: org.simantics.structural2,
org.simantics.structural2.modelingRules,
org.simantics.structural2.procedural,
@Override
public Map<String, Variable> getVariables(ReadGraph graph, Variable context, Map<String, Variable> map) throws DatabaseException {
-
- Resource type = context.getPossibleType(graph);
+ StructuralResource2 STR = StructuralResource2.getInstance(graph);
+ Resource type = context.getPossibleType(graph, STR.Component);
if(type == null) return null;
StructuralComponentClass clazz = StructuralComponentClass.get(graph, type);
}
return map;
} else if (StructuralComponentClass.DEFINED.equals(clazz)) {
- StructuralResource2 STR = StructuralResource2.getInstance(graph);
Resource def = graph.getSingleObject(type, STR.IsDefinedBy);
Map<String, Resource> children = graph.syncRequest(new UnescapedChildMapOfResource(def), TransientCacheListener.instance());
return StandardChildDomainChildren.getStandardChildDomainChildVariables(graph, context, children, map);
Variable firstRepresentedParent = findFirstParentWithRepresentation(graph, parameter, STR);
if (firstRepresentedParent == null)
return null;
- Resource realParentComposite = graph.getPossibleObject(firstRepresentedParent.getRepresents(graph), L0.PartOf);
- if (realParentComposite == null)
- return null;
- isInsideStructure = graph.hasStatement(realParentComposite, STR.Defines);
+ Resource representedParent = firstRepresentedParent.getRepresents(graph);
+ Resource representedParentType = graph.getPossibleType(representedParent, STR.Component);
+ if (representedParentType != null && graph.isInstanceOf(representedParentType, STR.ProceduralComponentType)) {
+ isInsideStructure = !parameter.equals(firstRepresentedParent);
+ } else {
+ Resource realParentComposite = graph.getPossibleObject(representedParent, L0.PartOf);
+ if (realParentComposite == null)
+ return null;
+ isInsideStructure = graph.hasStatement(realParentComposite, STR.Defines);
+ }
Variable firstParentComposite = findFirstParentComposite(graph, firstRepresentedParent, STR);
if (firstParentComposite != null) {
import org.simantics.db.common.procedure.adapter.TransientCacheListener;
import org.simantics.db.common.request.PossibleIndexRoot;
import org.simantics.db.common.request.ResourceRead2;
+import org.simantics.db.common.request.RuntimeEnvironmentRequest;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.scl.AbstractExpressionCompilationContext;
import org.simantics.db.layer0.scl.AbstractExpressionCompilationRequest;
-import org.simantics.db.layer0.util.RuntimeEnvironmentRequest;
import org.simantics.db.layer0.util.RuntimeEnvironmentRequest2;
import org.simantics.layer0.Layer0;
import org.simantics.scl.compiler.elaboration.expressions.EApply;
import org.simantics.db.common.request.IndexRoot;
import org.simantics.db.common.request.UnaryRead;
import org.simantics.db.exception.DatabaseException;
-import org.simantics.db.layer0.util.RuntimeEnvironmentRequest;
+import org.simantics.db.layer0.util.RuntimeEnvironmentRequest2;
import org.simantics.scl.compiler.environment.specification.EnvironmentSpecification;
import org.simantics.scl.compiler.runtime.RuntimeEnvironment;
import org.simantics.structural2.scl.ComponentTypeProperty;
public ProceduralComponentTypeCompilationContext perform(ReadGraph graph)
throws DatabaseException {
Resource indexRoot = graph.syncRequest(new IndexRoot(parameter));
- RuntimeEnvironment runtimeEnvironment = graph.syncRequest(new RuntimeEnvironmentRequest(indexRoot) {
+ RuntimeEnvironment runtimeEnvironment = graph.syncRequest(new RuntimeEnvironmentRequest2(parameter, indexRoot) {
@Override
protected void fillEnvironmentSpecification(
EnvironmentSpecification environmentSpecification) {
}
public static boolean isImmutable(ReadGraph graph, Resource r) throws DatabaseException {
+ // Marking a resource L0.readOnly also makes it immutable
+ if (graph.isImmutable(r) || Layer0Utils.isMarkedReadOnly(graph, r))
+ return true;
StructuralResource2 STR = StructuralResource2.getInstance(graph);
Resource uc = graph.syncRequest(new PossibleTypedParent(r, STR.ComponentType));
- return graph.isImmutable(r)
- // Anything under a published or locked user component is published as well
- || (uc != null && (Layer0Utils.isPublished(graph, uc)
+ return // Anything under a published or locked user component is published as well
+ (uc != null && (Layer0Utils.isPublished(graph, uc)
|| graph.hasStatement(uc, STR.ComponentType_Locked)))
// Anything under a published container (shared library) is published as well
|| Layer0Utils.isContainerPublished(graph, r)
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.eclipse.equinox.frameworkadmin.equinox;bundle-version="1.0.300",
org.simantics.application;bundle-version="1.1.0"
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Vendor: VTT Technical Research Centre of Finland
Automatic-Module-Name: org.simantics.team.ui
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Require-Bundle: org.simantics.layer0,
org.simantics.selectionview.ontology;bundle-version="1.2.0",
org.simantics.modeling.ontology;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.tests.modelled.ontology
Bundle-Vendor: Semantum Oy
Automatic-Module-Name: org.simantics.tests.modelled.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.modeling.ontology;bundle-version="1.2.0",
org.simantics.silk.ontology;bundle-version="1.1.0",
org.simantics.image2.ontology;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Vendor: Semantum Oy
Export-Package: org.simantics.tests.modelled.ui.ontology
Automatic-Module-Name: org.simantics.tests.modelled.ui.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.eclipse.e4.ui.model.workbench,
org.simantics.scl.osgi,
org.simantics.browsing.ui.model,
- org.slf4j.api
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+ org.slf4j.api,
+ jakarta.annotation-api;bundle-version="1.3.5"
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Bundle-Vendor: Semantum Oy
Automatic-Module-Name: org.simantics.tests.modelled.ui
importJava "org.simantics.tests.modelled.ui.TestsUIUtils" where
runSTSTestAction :: Resource -> <Proc> ()
- ignoreSTSTestAction :: [Resource] -> <Proc> ()
+ ignoreSTSTestAction :: Resource -> <Proc> ()
createSTSSuiteAction :: Resource -> <Proc> ()
createSTSSuiteAction res = do
package org.simantics.tests.modelled.ui;
import java.io.IOException;
-import java.util.List;
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
import org.simantics.Simantics;
view.execute();
}
- public static void ignoreSTSTestAction(List<Resource> tests) throws DatabaseException {
+ public static void ignoreSTSTestAction(Resource test) throws DatabaseException {
Simantics.getSession().syncRequest(new Write() {
@Override
public void perform(WriteGraph graph) throws DatabaseException {
TestsResource TESTS = TestsResource.getInstance(graph);
- for (Resource test : tests) {
- graph.claimLiteral(test, TESTS.ignore, true, Bindings.BOOLEAN);
- }
+ graph.claimLiteral(test, TESTS.ignore, true, Bindings.BOOLEAN);
}
});
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.slf4j.api,
org.simantics.db.testing,
org.simantics.debug.browser;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.tests.modelled,
org.simantics.tests.modelled.junit,
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="examples"/>
-#Fri Oct 30 22:48:46 EET 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Require-Bundle: org.eclipse.core.runtime,
gnu.trove3
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.threadlog
Automatic-Module-Name: org.simantics.threadlog
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="example"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
com.lowagie.text;bundle-version="2.1.5";resolution:=optional,
org.slf4j.api
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.trend,
org.simantics.trend.configuration,
org.simantics.trend.impl,
return (end-from) / getWidth();
}
+ /**
+ * @return the current starting sample time calculated from all visible chart
+ * items.
+ */
+ public double getItemFromTime() {
+ return iFrom;
+ }
+
/**
* @return the current ending sample time calculated from all visible chart
* items.
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>\r
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
- <classpathentry kind="src" path="src"/>\r
- <classpathentry kind="output" path="bin"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
-eclipse.preferences.version=1\r
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled\r
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8\r
-org.eclipse.jdt.core.compiler.compliance=1.8\r
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error\r
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error\r
-org.eclipse.jdt.core.compiler.source=1.8\r
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.filesystem.services,
org.slf4j.api,
org.eclipse.e4.ui.model.workbench,
+ org.eclipse.e4.ui.workbench,
org.eclipse.ui.workbench,
org.eclipse.ui,
- org.eclipse.e4.core.contexts
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: javax.annotation;version="1.2.0",
- javax.inject;version="1.0.0",
- org.eclipse.e4.ui.workbench.modeling
+ org.eclipse.e4.core.contexts,
+ jakarta.annotation-api
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Import-Package: javax.inject
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.ui.workspace.tracker
Automatic-Module-Name: org.simantics.ui.workspace.tracker
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<accessrules>
<accessrule kind="accessible" pattern="sun/awt/datatransfer/DataTransferer"/>
</accessrules>
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.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.eclipse.e4.ui.di,
org.eclipse.e4.ui.bindings,
org.simantics.modeling.ontology;bundle-version="1.2.0",
- org.slf4j.api
+ org.slf4j.api,
+ jakarta.annotation-api;bundle-version="1.3.5"
Bundle-ActivationPolicy: lazy
Import-Package: javax.inject
Export-Package: org.simantics.ui,
org.simantics.ui.workbench.preferences
Bundle-ClassPath: .
Bundle-Activator: org.simantics.ui.internal.Activator
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.simantics.ui
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Version: 1.1.0.qualifier
Require-Bundle: org.simantics.layer0,
org.simantics.layer0x.ontology;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.user
Automatic-Module-Name: org.simantics.user.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="testcases"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.utils;bundle-version="1.0.0",
gnu.trove3;bundle-version="3.0.0",
org.simantics.databoard;bundle-version="0.6.5";resolution:=optional,
- org.slf4j.api;bundle-version="1.7.25",
- org.eclipse.collections.eclipse-collections;bundle-version="9.2.0",
- org.eclipse.collections.eclipse-collections-api;bundle-version="9.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+ org.slf4j.api,
+ org.eclipse.collections
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.simantics.utils.datastructures
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Require-Bundle: org.simantics.utils.thread;visibility:=reexport,
org.eclipse.swt
Export-Package: org.simantics.utils.threads
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.simantics.utils.thread.swt
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Export-Package: org.simantics.utils.threads,
org.simantics.utils.threads.logger
Bundle-Vendor: VTT Technical Research Centre of Finland
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.slf4j.api
Automatic-Module-Name: org.simantics.utils.thread
/*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * Copyright (c) 2007, 2020 Association for Decentralized Information Management
* in Industry THTH ry.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
*
* Contributors:
* VTT Technical Research Centre of Finland - initial API and implementation
+ * Semantum Oy - gitlab #522 - removed reflection hack
*******************************************************************************/
/*
*
package org.simantics.utils.threads;
import java.awt.EventQueue;
-import java.awt.Toolkit;
-import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.concurrent.AbstractExecutorService;
return INSTANCE;
}
- Field dispatchThread;
-
- AWTThread() {
- dispatchThread = getDispatchThreadField();
- }
-
- private Field getDispatchThreadField()
- {
- try {
- Field f = EventQueue.class.getDeclaredField("dispatchThread");
- f.setAccessible(true);
- return f;
- } catch (SecurityException e) {
- throw new RuntimeException(e);
- } catch (NoSuchFieldException e) {
- throw new RuntimeException(e);
- }
- }
-
@Override
public Thread asyncExec(Runnable runnable) {
- EventQueue eq = Toolkit.getDefaultToolkit().getSystemEventQueue();
EventQueue.invokeLater(runnable);
- try {
- return (Thread) dispatchThread.get(eq);
- } catch (IllegalArgumentException e1) {
- throw new RuntimeException(e1);
- } catch (IllegalAccessException e1) {
- throw new RuntimeException(e1);
- }
+ return null;
}
@Override
@Override
public Thread getThread() {
- EventQueue eq = Toolkit.getDefaultToolkit().getSystemEventQueue();
- try {
- return (Thread) dispatchThread.get(eq);
- } catch (IllegalArgumentException e1) {
- throw new RuntimeException(e1);
- } catch (IllegalAccessException e1) {
- throw new RuntimeException(e1);
- }
+ return null;
}
public String toString() {
public boolean awaitTermination(long timeout, TimeUnit unit)
throws InterruptedException {
return false;
- }
+ }
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.utils.ui.workbench.saving,
org.simantics.utils.ui.workbench.ui
Bundle-ClassPath: .
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.simantics.utils.ui.workbench
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="testcases"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-ClassPath: .
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.simantics.utils.ui.internal.Activator
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.simantics.utils.ui
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="testcases"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-ClassPath: .
Require-Bundle: org.junit;bundle-version="4.12.0";resolution:=optional,
org.simantics.databoard;bundle-version="0.6.2",
- org.slf4j.api;bundle-version="1.7.20"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+ org.slf4j.api
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.simantics.utils
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.color.ontology;bundle-version="1.0.0",
org.simantics.action.ontology;bundle-version="1.0.0",
org.simantics.image2.ontology;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.viewpoint.ontology
Automatic-Module-Name: org.simantics.viewpoint.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.layer0x.ontology;bundle-version="1.0.0",
org.simantics.scenegraph.ontology;bundle-version="1.0.0",
org.simantics.selectionview.ontology;bundle-version="1.1.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.views.ontology
Bundle-Vendor: Semantum Oy
Automatic-Module-Name: org.simantics.views.ontology
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.eclipse.mylyn.wikitext;bundle-version="3.0.6",
org.eclipse.mylyn.wikitext.mediawiki;bundle-version="3.0.6"
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.views.swt.client.base,
org.simantics.views.swt.client.impl
Bundle-Vendor: Semantum Oy
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Modelled SWT View Loaders
Bundle-SymbolicName: org.simantics.views.swt
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.simantics.browsing.ui.swt;bundle-version="1.1.0";visibility:=reexport,
org.simantics.db.management;bundle-version="1.1.0",
org.simantics.views.ontology;bundle-version="1.0.0",
org.simantics.scenegraph.loader;bundle-version="1.0.0";visibility:=reexport,
org.simantics.scenegraph.ontology;bundle-version="1.0.0",
org.simantics.utils.thread.swt;bundle-version="1.1.0",
- org.slf4j.api;bundle-version="1.7.25"
+ org.slf4j.api
Export-Package: org.simantics.views.swt
Bundle-Activator: org.simantics.views.swt.Activator
Bundle-Vendor: Semantum Oy
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>\r
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
- <classpathentry kind="src" path="src"/>\r
- <classpathentry kind="output" path="bin"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
-eclipse.preferences.version=1\r
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled\r
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8\r
-org.eclipse.jdt.core.compiler.compliance=1.8\r
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error\r
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error\r
-org.eclipse.jdt.core.compiler.source=1.8\r
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Vendor: Semantum Oy
Require-Bundle: org.simantics.layer0,
org.simantics.views.ontology;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.simantics.views.text.ontology
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>\r
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
- <classpathentry kind="src" path="src"/>\r
- <classpathentry kind="output" path="bin"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
-eclipse.preferences.version=1\r
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled\r
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8\r
-org.eclipse.jdt.core.compiler.compliance=1.8\r
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error\r
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error\r
-org.eclipse.jdt.core.compiler.source=1.8\r
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.eclipse.mylyn.wikitext.mediawiki;bundle-version="3.0.6",
org.eclipse.mylyn.wikitext.ui;bundle-version="3.0.6",
org.eclipse.mylyn.wikitext.mediawiki.ui;bundle-version="3.0.6"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.simantics.views.text
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-SymbolicName: org.simantics.views;singleton:=true
Bundle-Version: 1.1.0.qualifier
Bundle-Vendor: Semantum Oy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.views
Require-Bundle: org.simantics.views.ontology;bundle-version="1.0.0",
org.eclipse.core.runtime;bundle-version="3.6.0",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.eclipse.mylyn.wikitext;bundle-version="3.0.6",
org.eclipse.mylyn.wikitext.mediawiki;bundle-version="3.0.6"
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.wiki.ui,
org.simantics.wiki.ui.editor,
org.simantics.wiki.ui.language
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Require-Bundle: org.simantics.layer0,
org.simantics.project.ontology;bundle-version="1.0.0",
org.simantics.layer0x.ontology;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.workbench.ontology
Automatic-Module-Name: org.simantics.workbench.ontology
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.simantics.workbench.search.impl</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Workbench Search Service Implementation
+Bundle-SymbolicName: org.simantics.workbench.search.impl;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.simantics.workbench.search.impl.Activator
+Bundle-Vendor: Semantum Oy
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.expressions,
+ org.simantics.ui,
+ org.simantics.editors,
+ org.simantics.workbench.search,
+ org.simantics.workbench.ontology,
+ org.slf4j.api,
+ freemarker
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Automatic-Module-Name: org.simantics.workbench.search.impl
+Bundle-ActivationPolicy: lazy
--- /dev/null
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.services">
+ </extension>
+
+</plugin>
--- /dev/null
+package org.simantics.workbench.search.impl;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.simantics.workbench.search.impl"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
* Contributors:
* Semantum Oy - initial API and implementation
*******************************************************************************/
-package org.simantics.workbench.internal.contributions.search;
+package org.simantics.workbench.search.impl;
import java.util.Collection;
import java.util.HashSet;
import org.eclipse.core.runtime.Status;
import org.simantics.db.Resource;
import org.simantics.db.common.procedure.adapter.DisposableListener;
-import org.simantics.workbench.internal.Activator;
/**
* @author Tuukka Lehtonen
* VTT Technical Research Centre of Finland - initial API and implementation
* Semantum Oy
*******************************************************************************/
-package org.simantics.workbench.internal.contributions.search;
+package org.simantics.workbench.search.impl;
import java.net.URL;
-package org.simantics.workbench.internal.contributions.search;
+package org.simantics.workbench.search.impl;
import org.eclipse.core.expressions.Expression;
import org.eclipse.ui.internal.services.INestable;
-package org.simantics.workbench.internal.contributions.search;
+package org.simantics.workbench.search.impl;
import org.eclipse.core.expressions.Expression;
import org.eclipse.ui.services.IServiceLocator;
import org.simantics.workbench.search.ISearchService;
+@SuppressWarnings("restriction")
public class SearchServiceFactory extends AbstractServiceFactory {
-
@SuppressWarnings("rawtypes")
@Override
public Object create(Class serviceInterface, IServiceLocator parentLocator,
if (wb == null) {
return null;
}
-
+
+ @SuppressWarnings("unchecked")
Object parent = parentLocator.getService(serviceInterface);
if (parent == null) {
return new SearchServiceImpl();
Expression parentExp = ((SlaveSearchService) parent).getDefaultExpression();
return new NestableSearchService((ISearchService)parent, parentExp);
}
-
+
Expression exp = new ActivePartExpression(site.getPart());
return new SlaveSearchService((ISearchService)parent, exp);
}
-package org.simantics.workbench.internal.contributions.search;
+package org.simantics.workbench.search.impl;
import java.io.File;
import java.io.IOException;
import org.simantics.utils.ui.ErrorLogger;
import org.simantics.utils.ui.ExceptionUtils;
import org.simantics.utils.ui.workbench.WorkbenchUtils;
-import org.simantics.workbench.internal.Activator;
import org.simantics.workbench.ontology.WorkbenchResource;
import org.simantics.workbench.search.ISearchService;
import org.simantics.workbench.search.QueryResult;
try {
return Searching.generatePage(graph, searchEngines,query, maxResults, searchResults);
} catch (IOException e) {
- Activator.logError("I/O problem while generating search result page.", e);
+ Activator.getDefault().getLog().error("I/O problem while generating search result page.", e);
} catch (TemplateException e) {
- Activator.logError("Template definition problem in search result page generation. Please inform the developers.", e);
+ Activator.getDefault().getLog().error("Template definition problem in search result page generation. Please inform the developers.", e);
}
return null;
}
-package org.simantics.workbench.internal.contributions.search;
+package org.simantics.workbench.search.impl;
import org.eclipse.core.expressions.Expression;
import org.simantics.workbench.search.ISearchService;
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Version: 1.5.0.qualifier
Bundle-Activator: org.simantics.workbench.search.Activator
Bundle-Vendor: Semantum Oy
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.expressions;bundle-version="3.4.300",
- org.simantics.workbench.ontology;bundle-version="1.0.0",
- org.simantics.db.layer0;bundle-version="1.1.0",
- org.simantics;bundle-version="1.0.0",
- freemarker;bundle-version="2.3.16";visibility:=reexport
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Require-Bundle: org.simantics;bundle-version="1.0.0",
+ freemarker;bundle-version="2.3.16",
+ org.slf4j.api;bundle-version="1.7.30"
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.workbench.search
Automatic-Module-Name: org.simantics.workbench.search
import org.eclipse.core.runtime.IProgressMonitor;
import org.simantics.db.ReadGraph;
import org.simantics.db.Resource;
-import org.simantics.db.common.utils.Logger;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.layer0.genericrelation.Dependencies;
import org.simantics.operation.Layer0X;
import org.simantics.scl.runtime.function.FunctionImpl5;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* dependenciesSearchFunction:
*/
public class DependenciesSearchFunction extends FunctionImpl5<IProgressMonitor, ReadGraph, Resource, SearchQuery, Integer, SearchResult> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(DependenciesSearchFunction.class);
+
@Override
public SearchResult apply(IProgressMonitor monitor, ReadGraph graph, Resource model, SearchQuery query, Integer maxResults) {
try {
return Searching.generateDependenciesSearchResult(graph, results);
} catch (DatabaseException e) {
- Logger.defaultLogError(e);
+ LOGGER.error("Search query {} failed", query, e);
}
return null;
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Export-Package: org.simantics.workbench,
org.simantics.workbench.internal,
org.simantics.workbench.internal.contributions.search
-Require-Bundle: com.ibm.icu,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
+Require-Bundle: org.eclipse.core.resources,
org.eclipse.core.filesystem,
org.eclipse.core.net,
- org.eclipse.ui;visibility:=reexport,
org.eclipse.ui.ide,
org.eclipse.ui.cheatsheets,
org.simantics.application,
- org.simantics.ui,
- org.simantics.db.layer0;bundle-version="0.8.0",
- org.simantics.project;bundle-version="1.0.0",
org.simantics.db.indexing;bundle-version="0.8.0",
- org.eclipse.equinox.p2.metadata;bundle-version="2.0.0",
- org.simantics.graph;bundle-version="1.0.0",
- org.simantics.layer0;bundle-version="1.0.0",
- org.simantics.graph.db;bundle-version="1.0.0",
- org.simantics.editors;bundle-version="1.0.0",
- org.simantics;bundle-version="1.0.0";visibility:=reexport,
- org.simantics.workbench.ontology;bundle-version="1.0.0",
org.simantics.workbench.search;bundle-version="1.5.0",
- org.simantics.views.swt;bundle-version="1.0.0";visibility:=reexport,
org.simantics.modeling.ui;bundle-version="1.1.1";visibility:=reexport,
- org.simantics.issues.common;bundle-version="1.1.0";visibility:=reexport,
- org.simantics.simulation.ui;bundle-version="1.1.0";visibility:=reexport,
- org.simantics.scenegraph.profile;bundle-version="1.0.0";visibility:=reexport,
- org.simantics.browsing.ui.model;bundle-version="1.0.0";visibility:=reexport,
- org.eclipse.ui.workbench,
org.eclipse.e4.ui.workbench;bundle-version="1.3.0",
org.eclipse.e4.ui.model.workbench;bundle-version="1.1.100.v20150407-1430",
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,
org.eclipse.e4.ui.services,
- org.slf4j.api;bundle-version="1.7.20"
+ org.slf4j.api,
+ jakarta.annotation-api;bundle-version="1.3.5"
Import-Package: javax.inject
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Automatic-Module-Name: org.simantics.workbench
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.project;bundle-version="1.0.1";visibility:=reexport,
org.simantics.graph.db;bundle-version="1.1.5",
org.eclipse.equinox.p2.metadata;bundle-version="2.0.0",
- org.apache.log4j;bundle-version="1.2.15",
org.simantics.layer0.utils;bundle-version="1.1.0",
org.simantics.application;bundle-version="1.1.0",
org.simantics.db.indexing;bundle-version="1.1.0",
org.simantics.db.procore;bundle-version="1.1.0",
org.slf4j.api,
org.ini4j;bundle-version="0.5.4"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics,
org.simantics.internal;x-friends:="org.simantics.modeling,org.simantics.ui",
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
- * in Industry THTH ry.
- * 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:
- * VTT Technical Research Centre of Finland - initial API and implementation
- *******************************************************************************/
-package org.simantics;
-
-import java.util.Properties;
-
-import org.apache.log4j.Hierarchy;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PropertyConfigurator;
-import org.apache.log4j.spi.LoggerFactory;
-import org.apache.log4j.spi.RootLogger;
-
-/**
- * This class encapsulates a Log4J Hierarchy and centralizes all Logger access.
- */
-public class LogManager {
-
- private Hierarchy hierarchy;
-
- /**
- * Creates a new LogManager. Saves the log and state location.
- * Creates a new Hierarchy and add a new EventListener to it.
- * Configure the hierarchy with the properties passed. Add this object to
- * the list of active log managers.
- *
- * @param properties log configuration properties
- */
- public LogManager(Properties properties) {
- this.hierarchy = new Hierarchy(new RootLogger(Level.DEBUG));
- new PropertyConfigurator().doConfigure(properties, this.hierarchy);
- }
-
- /**
- * Checks if this PluginLogManager is disabled for this level.
- *
- * @param level level value
- * @return boolean true if it is disabled
- */
- public boolean isDisabled(int level) {
- return this.hierarchy.isDisabled(level);
- }
-
- /**
- * Enable logging for logging requests with level l or higher. By default
- * all levels are enabled.
- *
- * @param level level object
- */
- public void setThreshold(Level level) {
- this.hierarchy.setThreshold(level);
- }
-
- /**
- * The string version of setThreshold(Level level)
- *
- * @param level level string
- */
- public void setThreshold(String level) {
- this.hierarchy.setThreshold(level);
- }
-
- /**
- * Get the repository-wide threshold.
- *
- * @return Level
- */
- public Level getThreshold() {
- return this.hierarchy.getThreshold();
- }
-
- /**
- * Returns a new logger instance named as the first parameter using the
- * default factory. If a logger of that name already exists, then it will be
- * returned. Otherwise, a new logger will be instantiated and then linked
- * with its existing ancestors as well as children.
- *
- * @param clazz the class to get the logger for
- * @return Logger
- */
- public Logger getLogger(Class<?> clazz) {
- return this.hierarchy.getLogger(clazz.getName());
- }
-
- /**
- * Returns a new logger instance named as the first parameter using the
- * default factory. If a logger of that name already exists, then it will be
- * returned. Otherwise, a new logger will be instantiated and then linked
- * with its existing ancestors as well as children.
- *
- * @param name logger name
- * @return Logger
- */
- public Logger getLogger(String name) {
- return this.hierarchy.getLogger(name);
- }
-
- /**
- * The same as getLogger(String name) but using a factory instance instead
- * of a default factory.
- *
- * @param name logger name
- * @param factory factory instance
- * @return Logger
- */
- public Logger getLogger(String name, LoggerFactory factory) {
- return this.hierarchy.getLogger(name, factory);
- }
-
- /**
- * Returns the root of this hierarchy.
- *
- * @return Logger
- */
- public Logger getRootLogger() {
- return this.hierarchy.getRootLogger();
- }
-
- /**
- * Checks if this logger exists.
- *
- * @return Logger
- */
- public Logger exists(String name) {
- return this.hierarchy.exists(name);
- }
-
- /**
- * Disposes the logger hierarchy
- */
- public void shutdown() {
- this.hierarchy.shutdown();
- }
-
- /**
- * Resets configuration values to its defaults.
- */
- public void resetConfiguration() {
- this.hierarchy.resetConfiguration();
- }
-
-}
\ No newline at end of file
import org.simantics.db.management.SingleSessionContextProviderSource;
import org.simantics.db.request.ReadInterface;
import org.simantics.db.request.WriteInterface;
+import org.simantics.db.service.XSupport;
import org.simantics.internal.FileServiceImpl;
import org.simantics.layer0.Layer0;
import org.simantics.project.IProject;
}
}
+ public static void saveQueries(Session session) {
+ try {
+ XSupport xs = session.getService(XSupport.class);
+ xs.saveQueries();
+ } catch (Exception e) {
+ LOGGER.error("Saving database queries failed.", e);
+ }
+ }
@SuppressWarnings({ "unchecked", "rawtypes" })
public static <T> T applySCL(String module, String function, Object ... args) throws DatabaseException {
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
-import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
throw new PlatformException("Reinstalling Database, NOT IMPLEMENTED");
}
+ boolean serviceModeEntered = false;
+
if (ontologyPolicy == OntologyRecoveryPolicy.Merge) {
message = "Merging ontology changes";
monitor.subTask(message);
session.getService(XSupport.class).setServiceMode(true, createImmutable);
+ // Flush all queries once to allow even immutable request results to be invalidated
+ // because ontology installation affects immutable content and queries related to
+ // immutable content would not get invalidated at all otherwise.
+ if (!serviceModeEntered) {
+ serviceModeEntered = true;
+ session.getService(QueryControl.class).flush();
+ }
+
// Install TG
log.log(new Status(IStatus.INFO, Activator.PLUGIN_ID, "Installing "+tg.toString()+" - "+tg.getName()));
ImportResult result = TransferableGraphs.importGraph1(session, new TGTransferableGraphSource(tg.getGraph()), advisor, null);
}
}
session.getService(XSupport.class).setServiceMode(false, false);
+ if (serviceModeEntered) {
+ // Flush all queries to ensure that queries that should now
+ // be immutable are not left as mutable in the query cache.
+ session.getService(QueryControl.class).flush();
+ }
}
message = "Ontologies synchronized";
monitor.subTask(message);
} catch (Throwable t) {
LOGGER.error("Failed to flush index caches.", t);
}
+
+ if("true".equals(System.getProperty("org.simantics.db.persistQueries"))) {
+ progress.subTask("Saving Queries");
+ Simantics.saveQueries(s);
+ }
}
progress.subTask("Close Database Session");
<module>org.simantics.graph.db</module>
<module>org.simantics.graphfile</module>
<module>org.simantics.graphfile.ontology</module>
+ <module>org.simantics.graphfile.ui</module>
+ <module>org.simantics.graphfile.ui.ontology</module>
<module>org.simantics.graphviz</module>
<module>org.simantics.graphviz.ui</module>
<module>org.simantics.gnuplot</module>
<module>org.simantics.workbench</module>
<module>org.simantics.workbench.ontology</module>
<module>org.simantics.workbench.search</module>
+ <module>org.simantics.workbench.search.impl</module>
<module>winterwell.markdown</module>
</modules>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="lib/markdownj-1.0.2b4-0.3.0.jar"/>
org.eclipse.jface,
org.eclipse.swt,
org.eclipse.ui.workbench
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Import-Package: org.eclipse.core.internal.resources,
org.eclipse.jface.text,
<feature
id="hdf.hdf5"
label="HDF5 for Java"
- version="1.10.2"
+ version="1.10.2.b0001"
provider-name="Semantum Oy">
<description>
version="0.0.0"
unpack="false"/>
- <plugin
- id="org.jfree.jcommon"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
</feature>
unpack="false"/>
<plugin
- id="org.apache.commons.collections"
+ id="org.apache.commons.collections4"
download-size="0"
install-size="0"
version="0.0.0"
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="jakarta.annotation-api"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="jakarta.activation-api"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="jakarta.annotation-api"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="jakarta.xml.bind-api"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
id="org.jfree"
version="0.0.0"/>
+ <includes
+ id="org.eclipse.collections.feature"
+ version="0.0.0"/>
+
<plugin
id="org.simantics.scenegraph"
download-size="0"
id="com.famfamfam.silk"
download-size="0"
install-size="0"
- version="0.0.0"
- unpack="true"/>
+ version="0.0.0"/>
<plugin
id="org.simantics.scenegraph.swing"
version="0.0.0"
unpack="false"/>
- <plugin
- id="org.eclipse.collections.eclipse-collections"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.collections.eclipse-collections-api"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
</feature>
version="0.0.0"
unpack="false"/>
- <plugin
- id="javax.servlet"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
<plugin
id="javax.servlet.jsp"
download-size="0"
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="javax.servlet-api"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
unpack="false"/>
<plugin
- id="javax.ws.rs-api"
+ id="jakarta.ws.rs-api"
download-size="0"
install-size="0"
version="0.0.0"
version="0.0.0"
unpack="false"/>
- <plugin
- id="org.glassfish.jersey.bundles.repackaged.jersey-guava"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
<plugin
id="com.fasterxml.jackson.jaxrs.jackson-jaxrs-base"
download-size="0"
unpack="false"/>
<plugin
- id="javax.validation.api"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.glassfish.hk2.api"
+ id="jakarta.validation.jakarta.validation-api"
download-size="0"
install-size="0"
version="0.0.0"
version="0.0.0"
unpack="false"/>
- <plugin
- id="org.glassfish.hk2.external.aopalliance-repackaged"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.glassfish.hk2.locator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
<plugin
id="org.glassfish.hk2.osgi-resource-locator"
download-size="0"
version="0.0.0"
unpack="false"/>
- <plugin
- id="org.glassfish.hk2.utils"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
<plugin
id="org.glassfish.jersey.core.jersey-common"
download-size="0"
version="0.0.0"
unpack="false"/>
- <plugin
- id="javassist"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
<plugin
id="com.fasterxml.jackson.module.jackson-module-jaxb-annotations"
download-size="0"
unpack="false"/>
<plugin
- id="org.simantics.graphfile.ontology"
+ id="org.simantics.graphfile.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.simantics.graphfile.ui.ontology"
download-size="0"
install-size="0"
version="0.0.0"
version="0.0.0"
unpack="false"/>
- <plugin
- id="org.apache.log4j"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
<plugin
id="org.eclipse.ui.browser"
download-size="0"
unpack="false"/>
<plugin
- id="javax.ws.rs-api"
+ id="jakarta.xml.bind-api"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="jakarta.ws.rs-api"
download-size="0"
install-size="0"
version="0.0.0"
version="0.0.0"
unpack="false"/>
- <plugin
- id="org.glassfish.jersey.bundles.repackaged.jersey-guava"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
<plugin
id="com.fasterxml.jackson.jaxrs.jackson-jaxrs-base"
download-size="0"
unpack="false"/>
<plugin
- id="javax.validation.api"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.glassfish.hk2.api"
+ id="jakarta.validation.jakarta.validation-api"
download-size="0"
install-size="0"
version="0.0.0"
version="0.0.0"
unpack="false"/>
- <plugin
- id="org.glassfish.hk2.external.aopalliance-repackaged"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.glassfish.hk2.locator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
<plugin
id="org.glassfish.hk2.osgi-resource-locator"
download-size="0"
version="0.0.0"
unpack="false"/>
- <plugin
- id="org.glassfish.hk2.utils"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
<plugin
id="org.glassfish.jersey.core.jersey-common"
download-size="0"
version="0.0.0"
unpack="false"/>
- <plugin
- id="javassist"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
<plugin
id="com.fasterxml.jackson.module.jackson-module-jaxb-annotations"
download-size="0"
<feature
id="org.simantics.sdk"
label="Simantics SDK"
- version="1.43.0.qualifier"
+ version="1.44.0.qualifier"
provider-name="VTT Technical Research Centre of Finland">
<description url="http://www.example.com/description">
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.apache.log4j"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
unpack="false"/>
<plugin
- id="javax.servlet"
+ id="org.eclipse.jdt.annotation"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.jdt.annotation"
+ id="org.simantics.platform.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.simantics.platform.ui"
+ id="javax.servlet-api"
download-size="0"
install-size="0"
version="0.0.0"
[Enter License Description here.]
</license>
+ <includes
+ id="org.eclipse.collections.feature"
+ version="0.0.0"/>
+
<requires>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.core.resources"/>
<import feature="org.simantics.rcp" version="1.25.0" match="compatible"/>
</requires>
- <plugin
- id="org.apache.commons.collections"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
<plugin
id="org.apache.commons.io"
download-size="0"
unpack="false"/>
<plugin
- id="org.eclipse.collections.eclipse-collections"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.collections.eclipse-collections-api"
+ id="org.apache.commons.collections4"
download-size="0"
install-size="0"
version="0.0.0"
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.simantics.workbench.search.impl"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
<plugin
id="org.simantics.workbench"
download-size="0"
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="jakarta.annotation-api"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
<td>\r
</td></tr>\r
<tr>\r
-<td> <a rel="nofollow" class="external text" href="http://www.cs.wustl.edu/~schmidt/ACE.html">ACE - Adaptive Communications Environment</a>\r
-</td>\r
-<td> <a href="#BSD_3-Clause_License">BSD 3-Clause License</a> (<a rel="nofollow" class="external free" href="http://www.cs.wustl.edu/~schmidt/ACE-copying.html">http://www.cs.wustl.edu/~schmidt/ACE-copying.html</a>)\r
-</td>\r
-<td> <pre>Copyright (c) 2000-2005 INRIA, France Telecom</pre>\r
-</td></tr>\r
-<tr>\r
-<td> <a rel="nofollow" class="external text" href="http://www.jcraft.com/jzlib/">JZlib</a>\r
-</td>\r
-<td> <a href="#BSD_3-Clause_License">BSD 3-Clause License</a> (<a rel="nofollow" class="external free" href="http://www.jcraft.com/jzlib/LICENSE.txt">http://www.jcraft.com/jzlib/LICENSE.txt</a>)\r
-</td>\r
-<td> <pre>Copyright (c) 2000,2001,2002,2003,2004 ymnk, JCraft,Inc.</pre>\r
-</td></tr>\r
-<tr>\r
<td> <a rel="nofollow" class="external text" href="http://xmlgraphics.apache.org/batik/">Batik</a> (org.apache.batik)\r
</td>\r
<td> <a href="#Apache_Software_License_2.0">Apache Software License 2.0</a>\r
<td> 1.2.3\r
</td></tr>\r
<tr>\r
-<td> <a rel="nofollow" class="external text" href="http://www.json.org/">JSON</a> (JSON_libraries)\r
+<td> <a rel="nofollow" class="external text" href="https://github.com/google/gson">Gson</a>\r
</td>\r
<td> <a href="#Apache_Software_License_2.0">Apache Software License 2.0</a>\r
</td>\r
<td>\r
</td></tr>\r
<tr>\r
-<td> <a rel="nofollow" class="external text" href="http://www.jfree.org/jcommon/">JCommon</a>, <a rel="nofollow" class="external text" href="http://www.jfree.org/jfreechart/">JFreeChart</a>\r
+<td><a rel="nofollow" class="external text" href="http://www.jfree.org/jfreechart/">JFreeChart</a>\r
</td>\r
<td> <a href="#LGPL">LGPL</a>\r
</td>\r
<td>\r
</td></tr>\r
<tr>\r
-<td valign="top"> <a rel="nofollow" class="external text" href="http://trove4j.sourceforge.net/">GNU Trove</a> (gnu.trove2, gnu.trove3)\r
+<td valign="top"> <a rel="nofollow" class="external text" href="http://trove4j.sourceforge.net/">GNU Trove</a> (gnu.trove3)\r
</td>\r
<td valign="top"> <a href="#LGPL">LGPL</a>\r
</td>\r
</td>\r
<td> <a href="#Eclipse_Public_License">EPL</a>\r
</td>\r
-<td> 9.2.0\r
+<td> 10.2.0\r
</td></tr>\r
<tr>\r
<td> <a rel="nofollow" class="external text" href="http://fastutil.di.unimi.it/">fastutil: Fast & compact type-specific collections for Java</a>\r
<td> 21.0\r
</td></tr>\r
<tr>\r
-<td> <a rel="nofollow" class="external text" href="http://aries.apache.org/Apache">Aries</a>\r
+<td valign="top"> <a rel="nofollow" class="external text" href="http://www.antlr3.org/">ANTLR v3</a>\r
</td>\r
-<td> <a href="#Apache_Software_License_2.0">Apache Software License 2.0</a>\r
+<td> <a href="#BSD_3-Clause_License">BSD 3-Clause License</a> (<a rel="nofollow" class="external free" href="http://www.antlr3.org/license.html">http://www.antlr3.org/license.html</a>)\r
</td>\r
-<td>\r
+<td> 3.5.2\r
+<pre>Copyright (c) 2010 Terence Parr</pre>\r
</td></tr>\r
<tr>\r
<td valign="top"> <a rel="nofollow" class="external text" href="http://hc.apache.org/httpclient-3.x/">Apache Commons Codec</a>\r
<td> 3.6.1\r
</td></tr>\r
<tr>\r
-<td valign="top"> <a rel="nofollow" class="external text" href="http://hc.apache.org/httpclient-3.x/">Apache HttpClient 3</a>\r
-</td>\r
-<td> <a href="#Apache_Software_License_2.0">Apache Software License 2.0</a>\r
-</td>\r
-<td> 3.1.0\r
-</td></tr>\r
-<tr>\r
<td valign="top"> <a rel="nofollow" class="external text" href="https://poi.apache.org/">Apache POI</a>\r
</td>\r
<td> <a href="#Apache_Software_License_2.0">Apache Software License 2.0</a>\r
<td> 3.15\r
</td></tr>\r
<tr>\r
-<td valign="top"> <a rel="nofollow" class="external text" href="http://www.antlr3.org/">ANTLR v3</a>\r
-</td>\r
-<td> <a href="#BSD_3-Clause_License">BSD 3-Clause License</a> (<a rel="nofollow" class="external free" href="http://www.antlr3.org/license.html">http://www.antlr3.org/license.html</a>)\r
-</td>\r
-<td> 3.5.2\r
-<pre>Copyright (c) 2010 Terence Parr</pre>\r
-</td></tr>\r
-<tr>\r
<td valign="top"> <a rel="nofollow" class="external text" href="https://lucene.apache.org/core/">Apache Lucene Core</a>\r
</td>\r
<td> <a href="#Apache_Software_License_2.0">Apache Software License 2.0</a>\r
<td> 2.6.0, only needed by Apache POI\r
</td></tr>\r
<tr>\r
+<td> <a rel="nofollow" class="external text" href="http://aries.apache.org/">Aries</a>\r
+</td>\r
+<td> <a href="#Apache_Software_License_2.0">Apache Software License 2.0</a>\r
+</td>\r
+<td>\r
+</td></tr>\r
+<tr>\r
<td valign="top"> <a rel="nofollow" class="external text" href="https://github.com/virtuald/curvesapi">curvesapi</a>\r
</td>\r
<td> <a href="#BSD_3-Clause_License">BSD 3-Clause License</a> (<a rel="nofollow" class="external free" href="https://github.com/virtuald/curvesapi/blob/master/license.txt">https://github.com/virtuald/curvesapi/blob/master/license.txt</a>), <a href="#Apache_Software_License_2.0">Apache Software License 2.0</a>\r
<?xml version="1.0" encoding="UTF-8"?>\r
<?pde version="3.5"?>\r
\r
-<product name="Simantics Desktop" uid="Simantics-Desktop" id="org.simantics.desktop.product.desktopProduct" application="org.simantics.workbench.application" version="1.34.0" useFeatures="true" includeLaunchers="true">\r
+<product name="Simantics Desktop" uid="Simantics-Desktop" id="org.simantics.desktop.product.desktopProduct" application="org.simantics.workbench.application" version="1.44.0" useFeatures="true" includeLaunchers="true">\r
\r
<aboutInfo>\r
<image path="/org.simantics.desktop.ui/icons/simantics256.png"/>\r
</win>\r
</launcher>\r
\r
-\r
<vm>\r
<windows include="false">org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8</windows>\r
</vm>\r
</plugins>\r
\r
<features>\r
- <feature id="org.simantics.desktop.product.feature" version="1.0.0.qualifier"/>\r
+ <feature id="org.simantics.desktop.product.feature" version="1.0.0.qualifier" installMode="root"/>\r
</features>\r
\r
<configurations>\r
<properties>
<itext.version.actual>2.1.7.b1</itext.version.actual>
<antlr.version>3.5.2</antlr.version>
+ <commons-codec.version>1.14</commons-codec.version>
<lucene.version>4.9.0</lucene.version>
<lucene.version.actual>4.9.0.b0003</lucene.version.actual>
<lucene.prefix>org.apache.lucene4</lucene.prefix>
- <jaxen.version>1.1.6</jaxen.version>
+ <jaxen.version>1.2.0</jaxen.version>
<jdom.version>2.0.6</jdom.version>
<jdom.version.actual>2.0.6.b0001</jdom.version.actual>
- <jackson.version>2.8.8</jackson.version>
+ <jackson.version>2.10.2</jackson.version>
+ <jackson.version.actual>2.10.2.b0001</jackson.version.actual>
<javax.version>3.1.0</javax.version>
- <jersey.version>2.25.1</jersey.version>
- <slf4j.version>1.7.25</slf4j.version>
- <slf4j.version.actual>1.7.25.b001</slf4j.version.actual>
- <grpc.version>1.21.0</grpc.version>
- <grpc.version.actual>1.21.0</grpc.version.actual>
- <protobuf.version>3.7.1</protobuf.version>
- <zeroturnaround.version>1.10</zeroturnaround.version>
- <eclipse.collections.version>9.2.0</eclipse.collections.version>
- <caffeine.version>2.6.2</caffeine.version>
+ <jakarta.version>2.1.6</jakarta.version>
+ <jakarta.activation-api.version>1.2.1</jakarta.activation-api.version>
+ <jakarta.activation-api.version.actual>1.2.1.b0001</jakarta.activation-api.version.actual>
+ <!-- This can be removed once jakarta version is bumped -->
+ <jakarta.version.actual>2.1.6.b0005</jakarta.version.actual>
+ <jersey.version>2.30.1</jersey.version>
+ <!-- This can be removed once jersey version is bumped -->
+ <jersey.version.actual>2.30.1.b0008</jersey.version.actual>
+ <jfreechart.version>1.5.0</jfreechart.version>
+ <slf4j.version>1.7.30</slf4j.version>
+ <slf4j.version.actual>1.7.30</slf4j.version.actual>
+ <grpc.version>1.27.2</grpc.version>
+ <grpc.version.actual>1.27.2</grpc.version.actual>
+ <protobuf.version>3.11.4</protobuf.version>
+ <zeroturnaround.version>1.11</zeroturnaround.version>
+ <caffeine.version>2.8.1</caffeine.version>
+ <influxdb.client.version>1.5.0</influxdb.client.version>
+ <supercsv.version>2.4.0</supercsv.version>
+ <ini4j.version>0.5.4</ini4j.version>
+ <commons-collections.version>4.4</commons-collections.version>
+ <commons-compress.version>1.20</commons-compress.version>
+ <commons-csv.version>1.6</commons-csv.version>
+ <commons-lang.version>2.6</commons-lang.version>
+ <commons-logging.version>1.2</commons-logging.version>
+ <commons-io.version>1.4</commons-io.version>
+ <commons-math.version>3.6.1</commons-math.version>
+ <pdfbox.version>2.0.19</pdfbox.version>
+ <fontbox.version>2.0.19</fontbox.version>
+ <xmpbox.version>2.0.19</xmpbox.version>
+ <log4j.version>1.2.17</log4j.version>
+ <ucanaccess.version>3.0.7</ucanaccess.version>
+ <fastutil.version>8.3.1</fastutil.version>
+ <trove4j.version>3.0.3</trove4j.version>
+ <freemarker.version>2.3.29</freemarker.version>
+ <itext.version>2.1.7</itext.version>
+ <rhino.version>1.7.12</rhino.version>
+ <jna41.version>4.1.0</jna41.version>
+ <jna.version>4.5.2</jna.version>
+ <logback-classic.version>1.2.3</logback-classic.version>
+ <koloboke-compile.version>0.5.1</koloboke-compile.version>
+ <koloboke-impl-common-jdk8.version>1.0.0</koloboke-impl-common-jdk8.version>
+ <kryo.version>4.0.2</kryo.version>
+ <org.apache.aries.spifly.dynamic.bundle.version>1.2.3</org.apache.aries.spifly.dynamic.bundle.version>
+ <decompiler-procyon.version>4.3.0.Final</decompiler-procyon.version>
+ <jsoup.version>1.12.2</jsoup.version>
+ <snakeyaml.version>1.25</snakeyaml.version>
+ <jetty945.version>9.4.24.v20191120</jetty945.version>
+ <netty.version>4.1.45.Final</netty.version>
+ <jcip-annotations.version>1.0</jcip-annotations.version>
+ <pgjdbc-ng.version>0.8.3</pgjdbc-ng.version>
</properties>
<repositories>
</instructions>
</artifact>
<artifact>
- <id>org.jfree:jfreechart:1.0.19</id>
+ <id>org.jfree:jfreechart:${jfreechart.version}</id>
<source>true</source>
<instructions>
<Bundle-SymbolicName>org.jfree.jchart</Bundle-SymbolicName>
</artifact>
-->
<artifact>
- <id>net.sf.supercsv:super-csv:2.4.0</id>
+ <id>net.sf.supercsv:super-csv:${supercsv.version}</id>
<source>true</source>
<override>true</override>
<instructions>
</instructions>
</artifact>
<artifact>
- <id>org.ini4j:ini4j:0.5.4</id>
+ <id>org.ini4j:ini4j:${ini4j.version}</id>
<source>true</source>
</artifact>
<artifact>
<!-- Needed by Apache POI 3.15 -->
- <id>commons-codec:commons-codec:1.10</id>
- <source>true</source>
- </artifact>
- <artifact>
- <id>commons-collections:commons-collections:3.2.2</id>
+ <id>commons-codec:commons-codec:${commons-codec.version}</id>
<source>true</source>
</artifact>
<artifact>
<!-- Needed by Apache POI 3.15 -->
- <id>org.apache.commons:commons-collections4:4.1</id>
+ <id>org.apache.commons:commons-collections4:${commons-collections.version}</id>
<source>true</source>
</artifact>
<artifact>
- <id>org.apache.commons:commons-compress:1.18</id>
+ <id>org.apache.commons:commons-compress:${commons-compress.version}</id>
<source>true</source>
<override>true</override>
<instructions>
</instructions>
</artifact>
<artifact>
- <id>commons-lang:commons-lang:2.6</id>
+ <id>org.apache.commons:commons-csv:${commons-csv.version}</id>
+ <source>true</source>
+ </artifact>
+ <artifact>
+ <id>commons-lang:commons-lang:${commons-lang.version}</id>
<source>true</source>
</artifact>
<artifact>
<!-- Needed by Apache POI 3.15 -->
- <id>commons-logging:commons-logging:1.2</id>
+ <id>commons-logging:commons-logging:${commons-logging.version}</id>
<source>true</source>
</artifact>
<artifact>
- <id>commons-io:commons-io:1.4</id>
+ <id>commons-io:commons-io:${commons-io.version}</id>
<source>true</source>
</artifact>
<artifact>
- <id>org.apache.commons:commons-math3:3.6.1</id>
+ <id>org.apache.commons:commons-math3:${commons-math.version}</id>
<source>true</source>
</artifact>
<artifact>
- <id>org.apache.pdfbox:pdfbox:2.0.3</id>
+ <id>org.apache.pdfbox:pdfbox:${pdfbox.version}</id>
<source>true</source>
</artifact>
<artifact>
- <id>org.apache.pdfbox:fontbox:2.0.3</id>
+ <id>org.apache.pdfbox:fontbox:${fontbox.version}</id>
<source>true</source>
</artifact>
<artifact>
- <id>org.apache.pdfbox:xmpbox:2.0.3</id>
+ <id>org.apache.pdfbox:xmpbox:${xmpbox.version}</id>
<source>true</source>
</artifact>
<!-- Needed by Apache POI 3.15, however these are included in third-party repository manually -->
</artifact>
-->
<artifact>
- <id>log4j:log4j:1.2.17</id>
+ <id>log4j:log4j:${log4j.version}</id>
<source>true</source>
<override>true</override>
<instructions>
</instructions>
</artifact>
<artifact>
- <id>net.sf.ucanaccess:ucanaccess:3.0.7</id>
+ <id>net.sf.ucanaccess:ucanaccess:${ucanaccess.version}</id>
<source>true</source>
<instructions>
<Bundle-SymbolicName>net.ucanaccess</Bundle-SymbolicName>
</instructions>
</artifact>
<artifact>
- <id>it.unimi.dsi:fastutil:7.2.1</id>
+ <id>it.unimi.dsi:fastutil:${fastutil.version}</id>
<source>true</source>
</artifact>
<artifact>
- <id>org.eclipse.collections:eclipse-collections-api:${eclipse.collections.version}</id>
- <override>true</override>
- <source>true</source>
- <instructions>
- <Export-Package>org.eclipse.collections.*</Export-Package>
- </instructions>
- </artifact>
- <artifact>
- <id>org.eclipse.collections:eclipse-collections:${eclipse.collections.version}</id>
- <source>true</source>
- <instructions>
- <Require-Bundle>org.eclipse.collections.eclipse-collections-api;bundle-version="${eclipse.collections.version}"</Require-Bundle>
- <Import-Package>!org.eclipse.*,!sun.misc.*,*;resolution:=optional</Import-Package>
- </instructions>
- </artifact>
- <artifact>
- <id>net.sf.trove4j:trove4j:3.0.3</id>
+ <id>net.sf.trove4j:trove4j:${trove4j.version}</id>
<source>true</source>
<instructions>
<Bundle-Name>GNU Trove 3</Bundle-Name>
</instructions>
</artifact>
<artifact>
- <id>org.freemarker:freemarker:2.3.23</id>
+ <id>org.freemarker:freemarker:${freemarker.version}</id>
<source>true</source>
<override>true</override>
<instructions>
</instructions>
</artifact>
<artifact>
- <id>com.lowagie:itext:2.1.7</id>
+ <id>com.lowagie:itext:${itext.version}</id>
<source>true</source>
<instructions>
<Bundle-SymbolicName>com.lowagie.text</Bundle-SymbolicName>
</instructions>
</artifact>
<artifact>
- <id>org.mozilla:rhino:1.7.7.1</id>
- <source>true</source>
- </artifact>
- <!-- org.eclipse.epp.mpc.core.win32 plug-in requires 4.1.0 -->
- <artifact>
- <id>net.java.dev.jna:jna:4.1.0</id>
- <source>true</source>
- </artifact>
- <!-- org.eclipse.epp.mpc.core.win32 plug-in requires 4.1.0 -->
- <artifact>
- <id>net.java.dev.jna:jna-platform:4.1.0</id>
- <source>true</source>
- </artifact>
- <artifact>
- <id>net.java.dev.jna:jna:4.3.0</id>
- <source>true</source>
- </artifact>
- <artifact>
- <id>net.java.dev.jna:jna-platform:4.3.0</id>
+ <id>org.mozilla:rhino:${rhino.version}</id>
<source>true</source>
</artifact>
<artifact>
</instructions>
</artifact>
<artifact>
- <id>ch.qos.logback:logback-classic:1.2.3</id>
+ <id>ch.qos.logback:logback-classic:${logback-classic.version}</id>
<source>true</source>
<override>true</override>
</artifact>
<artifact>
- <id>com.koloboke:koloboke-compile:0.5.1</id>
+ <id>com.koloboke:koloboke-compile:${koloboke-compile.version}</id>
<source>true</source>
</artifact>
<artifact>
- <id>com.koloboke:koloboke-impl-common-jdk8:1.0.0</id>
+ <id>com.koloboke:koloboke-impl-common-jdk8:${koloboke-impl-common-jdk8.version}</id>
<source>true</source>
</artifact>
<artifact>
- <id>com.esotericsoftware:kryo:4.0.0</id>
+ <id>com.esotericsoftware:kryo:${kryo.version}</id>
<source>true</source>
</artifact>
<artifact>
- <id>org.apache.aries.spifly:org.apache.aries.spifly.dynamic.bundle:1.2.3</id>
+ <id>org.apache.aries.spifly:org.apache.aries.spifly.dynamic.bundle:${org.apache.aries.spifly.dynamic.bundle.version}</id>
<source>true</source>
</artifact>
+ <artifact>
+ <id>jakarta.activation:jakarta.activation-api:${jakarta.activation-api.version}</id>
+ <source>true</source>
+ <override>true</override>
+ <instructions>
+ <Bundle-Version>${jakarta.activation-api.version.actual}</Bundle-Version>
+ <Import-Package>*;resolution:=optional</Import-Package>
+ </instructions>
+ </artifact>
+ <artifact>
+ <id>jakarta.ws.rs:jakarta.ws.rs-api:${jakarta.version}</id>
+ <source>true</source>
+ <override>true</override>
+ <instructions>
+ <Bundle-Version>${jakarta.version.actual}</Bundle-Version>
+ <Require-Bundle>
+ jakarta.xml.bind-api
+ </Require-Bundle>
+ <Import-Package>!javax.*,*;resolution:=optional</Import-Package>
+ <Export-Package>
+ javax.ws.rs;version="${jakarta.version}",
+ javax.ws.rs.core;version="${jakarta.version}",
+ javax.ws.rs.ext;version="${jakarta.version}",
+ javax.ws.rs.client;version="${jakarta.version}",
+ javax.ws.rs.container;version="${jakarta.version}",
+ javax.ws.rs.sse;version="${jakarta.version}"
+ </Export-Package>
+ </instructions>
+ </artifact>
+ <artifact>
+ <id>org.glassfish.jersey.core:jersey-common:${jersey.version}</id>
+ <source>true</source>
+ <override>true</override>
+ <instructions>
+ <Bundle-Version>${jersey.version.actual}</Bundle-Version>
+ <!-- <Require-Bundle>
+ javax.annotation,
+ javax.inject,
+ javax.servlet-api,
+ jakarta.validation.jakarta.validation-api,
+ jakarta.ws.rs-api,
+ jakarta.xml.bind-api,
+ jakarta.activation-api
+ </Require-Bundle> -->
+ <Import-Package>*;resolution:=optional</Import-Package>
+ <Export-Package>
+ org.glassfish.jersey.*;version="${jersey.version}"
+ </Export-Package>
+ </instructions>
+ </artifact>
<artifact>
<id>org.glassfish.jersey.core:jersey-server:${jersey.version}</id>
<source>true</source>
+ <override>true</override>
+ <instructions>
+ <Bundle-Version>${jersey.version.actual}</Bundle-Version>
+ <!-- <Require-Bundle>
+ javax.annotation,
+ javax.inject,
+ javax.servlet-api,
+ jakarta.validation.jakarta.validation-api,
+ jakarta.ws.rs-api,
+ jakarta.xml.bind-api,
+ jakarta.activation-api
+ </Require-Bundle> -->
+ <Import-Package>*;resolution:=optional</Import-Package>
+ </instructions>
</artifact>
<artifact>
<id>org.glassfish.jersey.core:jersey-client:${jersey.version}</id>
<source>true</source>
+ <override>true</override>
+ <instructions>
+ <Bundle-Version>${jersey.version.actual}</Bundle-Version>
+ <!-- <Require-Bundle>
+ javax.annotation,
+ javax.inject,
+ javax.servlet-api,
+ jakarta.validation.jakarta.validation-api,
+ jakarta.ws.rs-api,
+ jakarta.xml.bind-api,
+ jakarta.activation-api
+ </Require-Bundle> -->
+ <Import-Package>*;resolution:=optional</Import-Package>
+ </instructions>
</artifact>
+
<artifact>
<id>org.glassfish.jersey.media:jersey-media-multipart:${jersey.version}</id>
<source>true</source>
+ <!-- For some reason p2-maven-plugin does not work with the below plugin and only generates sources for that -->
+ <!-- <override>true</override>
+ <instructions>
+ <Bundle-Version>${jersey.version.actual}</Bundle-Version>
+ <Require-Bundle>
+ jakarta.ws.rs-api,
+ </Require-Bundle>
+ <Import-Package>!javax.*,*;resolution:=optional</Import-Package>
+ </instructions> -->
+ </artifact>
+ <artifact>
+ <id>org.glassfish.jersey.ext:jersey-entity-filtering:${jersey.version}</id>
+ <source>true</source>
+ <override>true</override>
+ <instructions>
+ <Bundle-Version>${jersey.version.actual}</Bundle-Version>
+ <!-- <Require-Bundle>
+ jakarta.ws.rs-api,
+ jakarta.activation-api,
+ javax.servlet-api,
+ org.glassfish.jersey.core.jersey-server
+ </Require-Bundle> -->
+ <Import-Package>*;resolution:=optional</Import-Package>
+ </instructions>
</artifact>
<artifact>
<id>org.glassfish.jersey.media:jersey-media-json-jackson:${jersey.version}</id>
<source>true</source>
+ <override>true</override>
<excludes>
<exclude>com.fasterxml.jackson.*</exclude>
</excludes>
+ <instructions>
+ <Bundle-Version>${jersey.version.actual}</Bundle-Version>
+ <!-- <Require-Bundle>
+ javax.annotation,
+ javax.inject,
+ javax.servlet-api,
+ jakarta.validation.jakarta.validation-api,
+ jakarta.ws.rs-api,
+ jakarta.xml.bind-api,
+ jakarta.activation-api
+ </Require-Bundle> -->
+ <Import-Package>*;resolution:=optional</Import-Package>
+ </instructions>
</artifact>
<artifact>
<id>org.glassfish.jersey.containers:jersey-container-servlet-core:${jersey.version}</id>
<source>true</source>
+ <override>true</override>
+ <instructions>
+ <Bundle-Version>${jersey.version.actual}</Bundle-Version>
+ <!-- <Require-Bundle>
+ javax.annotation,
+ javax.inject,
+ javax.servlet-api,
+ jakarta.validation.jakarta.validation-api,
+ jakarta.ws.rs-api,
+ jakarta.xml.bind-api,
+ jakarta.activation-api
+ </Require-Bundle> -->
+ <Import-Package>*;resolution:=optional</Import-Package>
+ </instructions>
</artifact>
<artifact>
- <id>org.jboss.windup.decompiler:decompiler-procyon:4.0.0.Beta1</id>
+ <id>org.glassfish.jersey.inject:jersey-hk2:${jersey.version}</id>
<source>true</source>
+ <override>true</override>
+ <instructions>
+ <Bundle-Version>${jersey.version.actual}</Bundle-Version>
+ <!-- <Require-Bundle>
+ javax.annotation,
+ javax.inject,
+ javax.servlet-api,
+ jakarta.validation.jakarta.validation-api,
+ jakarta.ws.rs-api,
+ jakarta.xml.bind-api,
+ jakarta.activation-api
+ </Require-Bundle> -->
+ <Import-Package>*;resolution:=optional</Import-Package>
+ </instructions>
</artifact>
<artifact>
- <id>org.jsoup:jsoup:1.11.3</id>
+ <id>org.jboss.windup.decompiler:decompiler-procyon:${decompiler-procyon.version}</id>
<source>true</source>
</artifact>
<artifact>
- <id>org.yaml:snakeyaml:1.23</id>
+ <id>org.jsoup:jsoup:${jsoup.version}</id>
<source>true</source>
</artifact>
<artifact>
- <id>org.eclipse.jetty:jetty-servlets:9.4.5.v20170502</id>
+ <id>org.yaml:snakeyaml:${snakeyaml.version}</id>
<source>true</source>
</artifact>
<artifact>
- <id>org.eclipse.jetty:jetty-server:9.4.5.v20170502</id>
+ <id>org.eclipse.jetty:jetty-servlets:${jetty945.version}</id>
<source>true</source>
</artifact>
<artifact>
</artifact>
<!-- Since 1.21.0 grpc, a manually set up plugin is provided in third-party repository.
Note: grpc-core, grpc-context, and grpc-stub (maybe others as well) must be bundled into same plug-in, since they contain split packages.
+ See:
+ * https://github.com/grpc/grpc-java/issues/2727
+ * https://github.com/grpc/grpc-java/issues/3522
<artifact>
<id>io.grpc:io.grpc:${grpc.version}</id>
<source>true</source>
<!-- Netty is needed by com.impossibl.pgjdbc-ng:pgjdbc-ng:0.7.1 -->
<artifact>
- <id>io.netty:netty-buffer:4.1.35.Final</id>
+ <id>io.netty:netty-buffer:${netty.version}</id>
<source>true</source>
<transitive>true</transitive>
</artifact>
<artifact>
- <id>io.netty:netty-codec:4.1.35.Final</id>
+ <id>io.netty:netty-codec:${netty.version}</id>
<source>true</source>
<transitive>true</transitive>
</artifact>
<artifact>
- <id>io.netty:netty-codec-http:4.1.35.Final</id>
+ <id>io.netty:netty-codec-http:${netty.version}</id>
<source>true</source>
<transitive>true</transitive>
</artifact>
<artifact>
- <id>io.netty:netty-codec-http2:4.1.35.Final</id>
+ <id>io.netty:netty-codec-http2:${netty.version}</id>
<source>true</source>
<transitive>true</transitive>
</artifact>
<artifact>
- <id>io.netty:netty-codec-socks:4.1.35.Final</id>
+ <id>io.netty:netty-codec-socks:${netty.version}</id>
<source>true</source>
<transitive>true</transitive>
</artifact>
<artifact>
- <id>io.netty:netty-common:4.1.35.Final</id>
+ <id>io.netty:netty-common:${netty.version}</id>
<source>true</source>
<transitive>true</transitive>
</artifact>
<artifact>
- <id>io.netty:netty-handler:4.1.35.Final</id>
+ <id>io.netty:netty-handler:${netty.version}</id>
<source>true</source>
<transitive>true</transitive>
</artifact>
<artifact>
- <id>io.netty:netty-handler-proxy:4.1.35.Final</id>
+ <id>io.netty:netty-handler-proxy:${netty.version}</id>
<source>true</source>
<transitive>true</transitive>
</artifact>
<artifact>
- <id>io.netty:netty-resolver:4.1.35.Final</id>
+ <id>io.netty:netty-resolver:${netty.version}</id>
<source>true</source>
<transitive>true</transitive>
</artifact>
<artifact>
- <id>io.netty:netty-transport:4.1.35.Final</id>
+ <id>io.netty:netty-transport:${netty.version}</id>
<source>true</source>
<transitive>true</transitive>
</artifact>
<artifact>
- <id>com.impossibl.pgjdbc-ng:pgjdbc-ng:0.7.1</id>
+ <id>com.impossibl.pgjdbc-ng:pgjdbc-ng:${pgjdbc-ng.version}</id>
<source>true</source>
<transitive>false</transitive>
</artifact>
</instructions>
</artifact>
<artifact>
- <id>net.jcip:jcip-annotations:1.0</id>
+ <id>net.jcip:jcip-annotations:${jcip-annotations.version}</id>
+ <source>true</source>
+ </artifact>
+ <artifact>
+ <id>com.influxdb:influxdb-client-java:${influxdb.client.version}</id>
<source>true</source>
</artifact>
</artifacts>
Simantics 1.31.0 migrated to Eclipse 4.7 Oxygen platform.\r
\r
At the same time [Obeo's Target Platform Definition DSL and Generator tool](https://github.com/mbarbero/fr.obeo.releng.targetplatform)\r
-was taken into use for target platform definition.\r
+was taken into use for target platform definition. Later on the tool was moved to Eclipse\r
+CBI (Common Build Infrastructure) as [Target Platform Definition DSL and Generator](https://github.com/eclipse-cbi/targetplatform-dsl)\r
+which is what we are using right now.\r
\r
Please read the detailed installation and basic use instructions from the tool's website.\r
\r
publishing them online per platform branch is also highly useful.\r
\r
On the other hand legacy Buckminster builds can source `.target` files from a URL, which is why publishing them online\r
-per platform branch is useful.
\ No newline at end of file
+per platform branch is useful.\r
+\r
+## Building .target files from the command line\r
+\r
+There is an example of how to do this with Maven at [build/pom.xml)(build/pom.xml).\r
+Essentially it sources the TPD tool and its required Eclipse parts from public P2\r
+repositories and uses `tycho-eclipserun-plugin` to run the *tpd converter application*\r
+to convert the `.tpd` file given as argument via `-Dtpd=tpd-path`.\r
--- /dev/null
+target
+workspace
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.simantics</groupId>
+ <artifactId>org.simantics.sdk.build.targetdefinition.build</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <properties>
+ <tycho-version>1.5.0</tycho-version>
+ <tycho-extras-version>1.5.0</tycho-extras-version>
+ <platform-version-name>2019-12</platform-version-name>
+ <platform.repository.p2>http://www.simantics.org/update/${platform-version-name}</platform.repository.p2>
+ <targetPlatform.repository.p2>http://www.simantics.org/update/cbi/tpd/3.0.0-SNAPSHOT/</targetPlatform.repository.p2>
+ <targetPlatform.application.name>org.eclipse.cbi.targetplatform.tpd.converter</targetPlatform.application.name>
+ <targetPlatform.application.feature>org.eclipse.cbi.targetplatform-feature</targetPlatform.application.feature>
+ <!--<tpd>../org.simantics.sdk.build.targetdefinition.tpd</tpd>-->
+ <tpd>../simantics.tpd</tpd>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-eclipserun-plugin</artifactId>
+ <version>${tycho-extras-version}</version>
+ <configuration>
+ <repositories>
+ <repository>
+ <id>${platform-version-name}</id>
+ <layout>p2</layout>
+ <url>${platform.repository.p2}</url>
+ </repository>
+ <repository>
+ <id>targetplatform</id>
+ <layout>p2</layout>
+ <url>${targetPlatform.repository.p2}</url>
+ </repository>
+ </repositories>
+ <appArgLine>-consoleLog -application ${targetPlatform.application.name} ${tpd}</appArgLine>
+ <!-- Set dependencies to launch the application -->
+ <dependencies>
+ <dependency>
+ <artifactId>${targetPlatform.application.feature}</artifactId>
+ <type>eclipse-feature</type>
+ </dependency>
+ <dependency>
+ <artifactId>org.eclipse.equinox.p2.sdk</artifactId>
+ <type>eclipse-feature</type>
+ </dependency>
+ </dependencies>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>eclipse-run</goal>
+ </goals>
+ <!-- The phase validate rebuild the targetplatform before to compile/test...
+ @see https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html -->
+ <phase>validate</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="Eclipse 2019-12 (4.14)" sequenceNumber="1579509507">
+<target name="Eclipse 2019-12 (4.14)" sequenceNumber="1587101489">
<locations>
<location includeMode="slicer" includeAllPlatforms="true" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="com.google.guava" version="21.0.0.v20170206-1425"/>
<unit id="org.eclipse.emf.sdk.feature.group" version="2.20.0.v20191028-0905"/>
<unit id="org.eclipse.epp.mpc.feature.group" version="1.8.1.v20191106-1317"/>
<unit id="org.eclipse.epp.mpc.source.feature.group" version="1.8.1.v20191106-1317"/>
+ <unit id="org.eclipse.jetty.continuation" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.continuation.source" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.http" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.http.source" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.io" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.io.source" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.server" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.server.source" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.util" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.util.source" version="9.4.24.v20191120"/>
<unit id="org.eclipse.mylyn.wikitext_feature.feature.group" version="3.0.35.201912061959"/>
<unit id="org.eclipse.mylyn.wikitext.ant.source" version="3.0.35.20191206145759"/>
<unit id="org.eclipse.mylyn.wikitext.mediawiki.source" version="3.0.35.20191206145759"/>
<unit id="org.eclipse.nebula.examples.incubation.feature.feature.group" version="1.0.0.201806070735"/>
<repository location="http://www.simantics.org/update/nebula/releases/2.2.0/incubation/"/>
</location>
+ <location includeMode="slicer" includeAllPlatforms="true" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.collections.feature.feature.group" version="10.1.0.v20200211-1558"/>
+ <unit id="org.eclipse.collections.feature.source.feature.group" version="10.1.0.v20200211-1558"/>
+ <repository location="http://www.simantics.org/update/collections/10.2.0/repository/"/>
+ </location>
<location includeMode="slicer" includeAllPlatforms="true" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="bouncycastle.bcmail-jdk14" version="138.0.0"/>
<unit id="bouncycastle.bcprov-jdk14" version="138.0.0"/>
<unit id="com.google.android.annotations.source" version="4.1.1.4"/>
<unit id="com.google.api.grpc.proto-google-common-protos" version="1.12.0"/>
<unit id="com.google.api.grpc.proto-google-common-protos.source" version="1.12.0"/>
- <unit id="com.google.errorprone.error_prone_annotations" version="2.3.2"/>
- <unit id="com.google.errorprone.error_prone_annotations.source" version="2.3.2"/>
- <unit id="com.google.gson" version="2.7.0"/>
- <unit id="com.google.gson.source" version="2.7.0"/>
- <unit id="com.google.protobuf" version="3.7.1"/>
- <unit id="com.google.protobuf.source" version="3.7.1"/>
- <unit id="com.esotericsoftware.kryo" version="4.0.0"/>
- <unit id="com.esotericsoftware.kryo.source" version="4.0.0"/>
+ <unit id="com.google.errorprone.error_prone_annotations" version="2.3.4"/>
+ <unit id="com.google.errorprone.error_prone_annotations.source" version="2.3.4"/>
+ <unit id="com.google.gson" version="2.8.5"/>
+ <unit id="com.google.gson.source" version="2.8.5"/>
+ <unit id="com.google.protobuf" version="3.11.4"/>
+ <unit id="com.google.protobuf.source" version="3.11.4"/>
+ <unit id="com.esotericsoftware.kryo" version="4.0.2"/>
+ <unit id="com.esotericsoftware.kryo.source" version="4.0.2"/>
<unit id="com.esotericsoftware.minlog" version="1.3.0"/>
<unit id="com.esotericsoftware.minlog.source" version="1.3.0"/>
<unit id="com.esotericsoftware.reflectasm" version="1.11.3"/>
<unit id="com.esotericsoftware.reflectasm.source" version="1.11.3"/>
- <unit id="com.fasterxml.jackson.core.jackson-annotations" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.core.jackson-annotations.source" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.core.jackson-core" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.core.jackson-core.source" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.core.jackson-databind" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.core.jackson-databind.source" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.dataformat.jackson-dataformat-csv" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.dataformat.jackson-dataformat-csv.source" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.dataformat.jackson-dataformat-xml" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.dataformat.jackson-dataformat-xml.source" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.datatype.jackson-datatype-jsr310" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.datatype.jackson-datatype-jsr310.source" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.jaxrs.jackson-jaxrs-base" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.jaxrs.jackson-jaxrs-base.source" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider.source" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.module.jackson-module-jaxb-annotations" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.module.jackson-module-jaxb-annotations.source" version="2.8.8"/>
- <unit id="com.fasterxml.woodstox.woodstox-core" version="5.0.3"/>
- <unit id="com.fasterxml.woodstox.woodstox-core.source" version="5.0.3"/>
+ <unit id="com.fasterxml.jackson.core.jackson-annotations" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.core.jackson-annotations.source" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.core.jackson-core" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.core.jackson-core.source" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.core.jackson-databind" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.core.jackson-databind.source" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.dataformat.jackson-dataformat-csv" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.dataformat.jackson-dataformat-csv.source" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.dataformat.jackson-dataformat-xml" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.dataformat.jackson-dataformat-xml.source" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.datatype.jackson-datatype-jsr310" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.datatype.jackson-datatype-jsr310.source" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.jaxrs.jackson-jaxrs-base" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.jaxrs.jackson-jaxrs-base.source" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider.source" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.module.jackson-module-jaxb-annotations" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.module.jackson-module-jaxb-annotations.source" version="2.10.2"/>
+ <unit id="com.fasterxml.woodstox.woodstox-core" version="6.0.3"/>
+ <unit id="com.fasterxml.woodstox.woodstox-core.source" version="6.0.3"/>
<unit id="com.healthmarketscience.jackcess" version="2.1.3"/>
<unit id="com.healthmarketscience.jackcess.source" version="2.1.3"/>
+ <unit id="com.influxdb.client-core" version="1.5.0"/>
+ <unit id="com.influxdb.client-core.source" version="1.5.0"/>
+ <unit id="com.influxdb.client-java" version="1.5.0"/>
+ <unit id="com.influxdb.client-java.source" version="1.5.0"/>
<unit id="com.koloboke.api-jdk8" version="1.0.0"/>
<unit id="com.koloboke.api-jdk8.source" version="1.0.0"/>
<unit id="com.koloboke.compile" version="0.5.1"/>
<unit id="com.koloboke.impl-common-jdk8.source" version="1.0.0"/>
<unit id="com.lowagie.text" version="2.1.7.b1"/>
<unit id="com.lowagie.text.source" version="2.1.7.b1"/>
- <unit id="com.sun.jna" version="4.3.0"/>
- <unit id="com.sun.jna.platform" version="4.3.0"/>
- <unit id="com.sun.jna.platform.source" version="4.3.0"/>
- <unit id="com.sun.jna.source" version="4.3.0"/>
- <unit id="freemarker" version="2.3.23.stable"/>
- <unit id="freemarker.source" version="2.3.23.stable"/>
+ <unit id="freemarker" version="2.3.29.stable"/>
+ <unit id="freemarker.source" version="2.3.29.stable"/>
<unit id="gnu.trove3" version="3.0.3"/>
<unit id="gnu.trove3.source" version="3.0.3"/>
- <unit id="io.netty.buffer" version="4.1.35.Final"/>
- <unit id="io.netty.buffer.source" version="4.1.35.Final"/>
- <unit id="io.netty.codec" version="4.1.35.Final"/>
- <unit id="io.netty.codec.source" version="4.1.35.Final"/>
- <unit id="io.netty.codec-http" version="4.1.35.Final"/>
- <unit id="io.netty.codec-http.source" version="4.1.35.Final"/>
- <unit id="io.netty.codec-http2" version="4.1.35.Final"/>
- <unit id="io.netty.codec-http2.source" version="4.1.35.Final"/>
- <unit id="io.netty.codec-socks" version="4.1.35.Final"/>
- <unit id="io.netty.codec-socks.source" version="4.1.35.Final"/>
- <unit id="io.netty.common" version="4.1.35.Final"/>
- <unit id="io.netty.common.source" version="4.1.35.Final"/>
- <unit id="io.netty.handler" version="4.1.35.Final"/>
- <unit id="io.netty.handler.source" version="4.1.35.Final"/>
- <unit id="io.netty.handler-proxy" version="4.1.35.Final"/>
- <unit id="io.netty.handler-proxy.source" version="4.1.35.Final"/>
- <unit id="io.netty.resolver" version="4.1.35.Final"/>
- <unit id="io.netty.resolver.source" version="4.1.35.Final"/>
- <unit id="io.netty.transport" version="4.1.35.Final"/>
- <unit id="io.netty.transport.source" version="4.1.35.Final"/>
+ <unit id="io.netty.buffer" version="4.1.45.Final"/>
+ <unit id="io.netty.buffer.source" version="4.1.45.Final"/>
+ <unit id="io.netty.codec" version="4.1.45.Final"/>
+ <unit id="io.netty.codec.source" version="4.1.45.Final"/>
+ <unit id="io.netty.codec-http" version="4.1.45.Final"/>
+ <unit id="io.netty.codec-http.source" version="4.1.45.Final"/>
+ <unit id="io.netty.codec-http2" version="4.1.45.Final"/>
+ <unit id="io.netty.codec-http2.source" version="4.1.45.Final"/>
+ <unit id="io.netty.codec-socks" version="4.1.45.Final"/>
+ <unit id="io.netty.codec-socks.source" version="4.1.45.Final"/>
+ <unit id="io.netty.common" version="4.1.45.Final"/>
+ <unit id="io.netty.common.source" version="4.1.45.Final"/>
+ <unit id="io.netty.handler" version="4.1.45.Final"/>
+ <unit id="io.netty.handler.source" version="4.1.45.Final"/>
+ <unit id="io.netty.handler-proxy" version="4.1.45.Final"/>
+ <unit id="io.netty.handler-proxy.source" version="4.1.45.Final"/>
+ <unit id="io.netty.resolver" version="4.1.45.Final"/>
+ <unit id="io.netty.resolver.source" version="4.1.45.Final"/>
+ <unit id="io.netty.transport" version="4.1.45.Final"/>
+ <unit id="io.netty.transport.source" version="4.1.45.Final"/>
<unit id="io.opencensus.api" version="0.21.0"/>
<unit id="io.opencensus.api.source" version="0.21.0"/>
<unit id="io.opencensus.contrib-grpc-metrics" version="0.21.0"/>
<unit id="io.opencensus.contrib-grpc-metrics.source" version="0.21.0"/>
- <unit id="it.unimi.dsi.fastutil" version="7.2.1"/>
- <unit id="it.unimi.dsi.fastutil.source" version="7.2.1"/>
+ <unit id="it.unimi.dsi.fastutil" version="8.3.1"/>
+ <unit id="it.unimi.dsi.fastutil.source" version="8.3.1"/>
<unit id="jakarta-regexp" version="1.4.0"/>
- <unit id="javassist" version="3.20.0.GA"/>
- <unit id="javassist.source" version="3.20.0.GA"/>
<unit id="javax.servlet-api" version="3.1.0"/>
<unit id="javax.servlet-api.source" version="3.1.0"/>
- <unit id="javax.validation.api" version="1.1.0.Final"/>
- <unit id="javax.validation.api.source" version="1.1.0.Final"/>
- <unit id="javax.ws.rs-api" version="2.0.1"/>
- <unit id="javax.ws.rs-api.source" version="2.0.1"/>
+ <unit id="jakarta.xml.bind-api" version="2.3.2"/>
+ <unit id="jakarta.xml.bind-api.source" version="2.3.2"/>
+ <unit id="jakarta.validation.jakarta.validation-api" version="2.0.2"/>
+ <unit id="jakarta.validation.jakarta.validation-api.source" version="2.0.2"/>
+ <unit id="jakarta.ws.rs-api" version="2.1.6.b0005"/>
+ <unit id="jakarta.ws.rs-api.source" version="2.1.6.b0005"/>
<unit id="net.jcip.annotations" version="1.0.0"/>
<unit id="net.jcip.annotations.source" version="1.0.0"/>
<unit id="net.ucanaccess" version="3.0.7"/>
<unit id="org.antlr.runtime" version="3.5.2"/>
<unit id="org.antlr.runtime.source" version="3.5.2"/>
<unit id="org.apache.aries.spifly.dynamic.bundle" version="1.2.3"/>
- <unit id="org.apache.commons.codec" version="1.10.0"/>
- <unit id="org.apache.commons.codec.source" version="1.10.0"/>
- <unit id="org.apache.commons.collections" version="3.2.2"/>
- <unit id="org.apache.commons.collections.source" version="3.2.2"/>
+ <unit id="org.apache.commons.commons-codec" version="1.14.0"/>
+ <unit id="org.apache.commons.commons-codec.source" version="1.14.0"/>
<unit id="org.apache.commons.collections4" version="4.1.0"/>
<unit id="org.apache.commons.collections4.source" version="4.1.0"/>
- <unit id="org.apache.commons.compress" version="1.18.0"/>
- <unit id="org.apache.commons.compress.source" version="1.18.0"/>
+ <unit id="org.apache.commons.compress" version="1.20.0"/>
+ <unit id="org.apache.commons.compress.source" version="1.20.0"/>
+ <unit id="org.apache.commons.csv" version="1.6.0"/>
+ <unit id="org.apache.commons.csv.source" version="1.6.0"/>
<unit id="org.apache.commons.io" version="2.4.0"/>
<unit id="org.apache.commons.io.source" version="2.4.0"/>
<unit id="org.apache.commons.lang" version="2.6.0"/>
<unit id="org.apache.lucene4.queryparser.source" version="4.9.0.b0003"/>
<unit id="org.apache.lucene4.sandbox" version="4.9.0.b0003"/>
<unit id="org.apache.lucene4.sandbox.source" version="4.9.0.b0003"/>
- <unit id="org.apache.pdfbox" version="2.0.3"/>
- <unit id="org.apache.pdfbox.fontbox" version="2.0.3"/>
- <unit id="org.apache.pdfbox.fontbox.source" version="2.0.3"/>
- <unit id="org.apache.pdfbox.source" version="2.0.3"/>
- <unit id="org.apache.pdfbox.xmpbox" version="2.0.3"/>
- <unit id="org.apache.pdfbox.xmpbox.source" version="2.0.3"/>
+ <unit id="org.apache.pdfbox" version="2.0.19"/>
+ <unit id="org.apache.pdfbox.fontbox" version="2.0.19"/>
+ <unit id="org.apache.pdfbox.fontbox.source" version="2.0.19"/>
+ <unit id="org.apache.pdfbox.source" version="2.0.19"/>
+ <unit id="org.apache.pdfbox.xmpbox" version="2.0.19"/>
+ <unit id="org.apache.pdfbox.xmpbox.source" version="2.0.19"/>
<unit id="org.bouncycastle.bcmail-jdk14" version="1.38.0"/>
<unit id="org.bouncycastle.bcmail-jdk14.source" version="1.38.0"/>
<unit id="org.bouncycastle.bcprov-jdk14" version="1.38.0"/>
<unit id="org.bouncycastle.bcprov-jdk14.source" version="1.38.0"/>
<unit id="org.bouncycastle.bctsp-jdk14" version="1.38.0"/>
<unit id="org.bouncycastle.bctsp-jdk14.source" version="1.38.0"/>
- <unit id="org.eclipse.collections.eclipse-collections-api" version="9.2.0"/>
- <unit id="org.eclipse.collections.eclipse-collections-api.source" version="9.2.0"/>
- <unit id="org.eclipse.collections.eclipse-collections" version="9.2.0"/>
- <unit id="org.eclipse.collections.eclipse-collections.source" version="9.2.0"/>
- <unit id="org.eclipse.jetty.continuation" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.continuation.source" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.http" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.http.source" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.io" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.io.source" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.server" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.server.source" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.servlets" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.servlets.source" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.util" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.util.source" version="9.4.5.v20170502"/>
- <unit id="com.github.benmanes.caffeine" version="2.6.2"/>
- <unit id="com.github.benmanes.caffeine.source" version="2.6.2"/>
- <unit id="org.glassfish.hk2.api" version="2.5.0.b32"/>
- <unit id="org.glassfish.hk2.api.source" version="2.5.0.b32"/>
- <unit id="org.glassfish.hk2.locator" version="2.5.0.b32"/>
- <unit id="org.glassfish.hk2.locator.source" version="2.5.0.b32"/>
- <unit id="org.glassfish.hk2.osgi-resource-locator" version="1.0.1"/>
- <unit id="org.glassfish.hk2.osgi-resource-locator.source" version="1.0.1"/>
- <unit id="org.glassfish.hk2.utils" version="2.5.0.b32"/>
- <unit id="org.glassfish.hk2.utils.source" version="2.5.0.b32"/>
- <unit id="org.glassfish.jersey.bundles.repackaged.jersey-guava" version="2.25.1"/>
- <unit id="org.glassfish.jersey.bundles.repackaged.jersey-guava.source" version="2.25.1"/>
- <unit id="org.glassfish.hk2.external.aopalliance-repackaged" version="2.5.0.b32"/>
- <unit id="org.glassfish.hk2.external.aopalliance-repackaged.source" version="2.5.0.b32"/>
- <unit id="org.glassfish.jersey.core.jersey-client" version="2.25.1"/>
- <unit id="org.glassfish.jersey.core.jersey-client.source" version="2.25.1"/>
- <unit id="org.glassfish.jersey.core.jersey-common" version="2.25.1"/>
- <unit id="org.glassfish.jersey.core.jersey-common.source" version="2.25.1"/>
- <unit id="org.glassfish.jersey.core.jersey-server" version="2.25.1"/>
- <unit id="org.glassfish.jersey.core.jersey-server.source" version="2.25.1"/>
- <unit id="org.glassfish.jersey.ext.jersey-entity-filtering" version="2.25.1"/>
- <unit id="org.glassfish.jersey.ext.jersey-entity-filtering.source" version="2.25.1"/>
- <unit id="org.glassfish.jersey.media.jersey-media-json-jackson" version="2.25.1"/>
- <unit id="org.glassfish.jersey.media.jersey-media-json-jackson.source" version="2.25.1"/>
- <unit id="org.glassfish.jersey.media.jersey-media-multipart" version="2.25.1"/>
- <unit id="org.glassfish.jersey.media.jersey-media-multipart.source" version="2.25.1"/>
- <unit id="org.glassfish.jersey.containers.jersey-container-servlet-core" version="2.25.1"/>
- <unit id="org.glassfish.jersey.containers.jersey-container-servlet-core.source" version="2.25.1"/>
+ <unit id="org.eclipse.jetty.servlets" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.servlets.source" version="9.4.24.v20191120"/>
+ <unit id="com.github.benmanes.caffeine" version="2.8.1"/>
+ <unit id="com.github.benmanes.caffeine.source" version="2.8.1"/>
+ <unit id="org.glassfish.hk2.api" version="2.6.1"/>
+ <unit id="org.glassfish.hk2.api.source" version="2.6.1"/>
+ <unit id="org.glassfish.hk2.locator" version="2.6.1"/>
+ <unit id="org.glassfish.hk2.locator.source" version="2.6.1"/>
+ <unit id="org.glassfish.hk2.osgi-resource-locator" version="1.0.3"/>
+ <unit id="org.glassfish.hk2.osgi-resource-locator.source" version="1.0.3"/>
+ <unit id="org.glassfish.hk2.utils" version="2.6.1"/>
+ <unit id="org.glassfish.hk2.utils.source" version="2.6.1"/>
+ <unit id="org.glassfish.hk2.external.aopalliance-repackaged" version="2.6.1"/>
+ <unit id="org.glassfish.hk2.external.aopalliance-repackaged.source" version="2.6.1"/>
+ <unit id="org.glassfish.hk2.external.jakarta.inject" version="2.6.1"/>
+ <unit id="org.glassfish.hk2.external.jakarta.inject.source" version="2.6.1"/>
+ <unit id="org.glassfish.jersey.core.jersey-client" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.core.jersey-client.source" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.core.jersey-common" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.core.jersey-common.source" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.core.jersey-server" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.core.jersey-server.source" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.ext.jersey-entity-filtering" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.ext.jersey-entity-filtering.source" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.media.jersey-media-json-jackson" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.media.jersey-media-json-jackson.source" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.media.jersey-media-multipart" version="2.30.1"/>
+ <unit id="org.glassfish.jersey.media.jersey-media-multipart.source" version="2.30.1"/>
+ <unit id="org.glassfish.jersey.containers.jersey-container-servlet-core" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.containers.jersey-container-servlet-core.source" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.inject.jersey-hk2" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.inject.jersey-hk2.source" version="2.30.1.b0008"/>
<unit id="org.hsqldb.hsqldb" version="2.3.1"/>
<unit id="org.hsqldb.hsqldb.source" version="2.3.1"/>
<unit id="org.ini4j" version="0.5.4"/>
<unit id="org.ini4j.source" version="0.5.4"/>
- <unit id="org.jboss.windup.decompiler.api.forge-addon" version="4.0.0.Beta1"/>
- <unit id="org.jboss.windup.decompiler.api.forge-addon.source" version="4.0.0.Beta1"/>
- <unit id="org.jboss.windup.decompiler.procyon" version="4.0.0.Beta1"/>
- <unit id="org.jboss.windup.decompiler.procyon.source" version="4.0.0.Beta1"/>
- <unit id="org.jboss.windup.decompiler.procyon.windup-procyon-compilertools" version="1.0.0.20160510"/>
- <unit id="org.jboss.windup.decompiler.procyon.windup-procyon-compilertools.source" version="1.0.0.20160510"/>
- <unit id="org.jboss.windup.decompiler.procyon.windup-procyon-core" version="1.0.0.20160510"/>
- <unit id="org.jboss.windup.decompiler.procyon.windup-procyon-core.source" version="1.0.0.20160510"/>
- <unit id="org.jboss.windup.decompiler.procyon.windup-procyon-reflection" version="1.0.0.20160510"/>
- <unit id="org.jboss.windup.decompiler.procyon.windup-procyon-reflection.source" version="1.0.0.20160510"/>
- <unit id="org.jboss.windup.utils.windup-utils.forge-addon" version="4.0.0.Beta1"/>
- <unit id="org.jboss.windup.utils.windup-utils.forge-addon.source" version="4.0.0.Beta1"/>
- <unit id="jaxen" version="1.1.6"/>
- <unit id="jaxen.source" version="1.1.6"/>
+ <unit id="org.jboss.windup.decompiler.api.forge-addon" version="4.3.0.Final"/>
+ <unit id="org.jboss.windup.decompiler.api.forge-addon.source" version="4.3.0.Final"/>
+ <unit id="org.jboss.windup.decompiler.procyon" version="4.3.0.Final"/>
+ <unit id="org.jboss.windup.decompiler.procyon.source" version="4.3.0.Final"/>
+ <unit id="org.bitbucket.mstrobel.procyon-compilertools" version="0.5.33"/>
+ <unit id="org.bitbucket.mstrobel.procyon-compilertools.source" version="0.5.33"/>
+ <unit id="org.bitbucket.mstrobel.procyon-core" version="0.5.33"/>
+ <unit id="org.bitbucket.mstrobel.procyon-core.source" version="0.5.33"/>
+ <unit id="org.jboss.windup.utils.windup-utils.forge-addon" version="4.3.0.Final"/>
+ <unit id="org.jboss.windup.utils.windup-utils.forge-addon.source" version="4.3.0.Final"/>
+ <unit id="javassist" version="3.25.0.GA"/>
+ <unit id="javassist.source" version="3.25.0.GA"/>
+ <unit id="jakarta.activation-api" version="1.2.1.b0001"/>
+ <unit id="jakarta.activation-api.source" version="1.2.1.b0001"/>
+ <unit id="jakarta.annotation-api" version="1.3.5"/>
+ <unit id="jakarta.annotation-api.source" version="1.3.5"/>
+ <unit id="jaxen" version="1.2.0"/>
+ <unit id="jaxen.source" version="1.2.0"/>
<unit id="org.jdom2" version="2.0.6.b0001"/>
<unit id="org.jdom2.source" version="2.0.6.b0001"/>
- <unit id="org.jfree.jchart" version="1.0.19"/>
- <unit id="org.jfree.jchart.source" version="1.0.19"/>
- <unit id="org.jfree.jcommon" version="1.0.23"/>
- <unit id="org.jfree.jcommon.source" version="1.0.23"/>
- <unit id="org.jsoup" version="1.11.3"/>
- <unit id="org.jsoup.source" version="1.11.3"/>
- <unit id="org.jvnet.mimepull" version="1.9.6"/>
- <unit id="org.jvnet.mimepull.source" version="1.9.6"/>
- <unit id="org.mozilla.rhino" version="1.7.7.1"/>
- <unit id="org.mozilla.rhino.source" version="1.7.7.1"/>
- <unit id="org.objenesis" version="2.2.0"/>
- <unit id="org.objenesis.source" version="2.2.0"/>
- <unit id="org.slf4j.api" version="1.7.25.b001"/>
- <unit id="org.slf4j.api.source" version="1.7.25.b001"/>
+ <unit id="org.jfree.jchart" version="1.5.0"/>
+ <unit id="org.jfree.jchart.source" version="1.5.0"/>
+ <unit id="org.jsoup" version="1.12.2"/>
+ <unit id="org.jsoup.source" version="1.12.2"/>
+ <unit id="org.jvnet.mimepull" version="1.9.11"/>
+ <unit id="org.jvnet.mimepull.source" version="1.9.11"/>
+ <unit id="org.mozilla.rhino" version="1.7.12"/>
+ <unit id="org.mozilla.rhino.source" version="1.7.12"/>
+ <unit id="org.objenesis" version="2.5.1"/>
+ <unit id="org.objenesis.source" version="2.5.1"/>
+ <unit id="org.slf4j.api" version="1.7.30"/>
+ <unit id="org.slf4j.api.source" version="1.7.30"/>
<unit id="org.supercsv" version="2.4.0"/>
<unit id="org.supercsv.source" version="2.4.0"/>
- <unit id="org.yaml.snakeyaml" version="1.23.0"/>
- <unit id="org.yaml.snakeyaml.source" version="1.23.0"/>
- <unit id="org.zeroturnaround.zt-exec" version="1.10.0"/>
- <unit id="org.zeroturnaround.zt-exec.source" version="1.10.0"/>
- <unit id="pgjdbc-ng" version="0.7.1"/>
- <unit id="pgjdbc-ng.source" version="0.7.1"/>
- <unit id="stax2-api" version="3.1.4"/>
- <unit id="stax2-api.source" version="3.1.4"/>
- <repository location="http://www.simantics.org/download/master/external-components/maven"/>
+ <unit id="org.yaml.snakeyaml" version="1.25.0"/>
+ <unit id="org.yaml.snakeyaml.source" version="1.25.0"/>
+ <unit id="org.zeroturnaround.zt-exec" version="1.11.0"/>
+ <unit id="org.zeroturnaround.zt-exec.source" version="1.11.0"/>
+ <unit id="com.impossibl.pgjdbc-ng" version="0.8.3"/>
+ <unit id="com.impossibl.pgjdbc-ng.source" version="0.8.3"/>
+ <unit id="stax2-api" version="4.2.0"/>
+ <unit id="stax2-api.source" version="4.2.0"/>
+ <repository location="http://www.simantics.org/download/master/external-components/maven/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="true" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.apache.batik.feature.feature.group" version="0.0.0"/>
org.eclipse.emf.sdk.feature.group
org.eclipse.epp.mpc.feature.group
org.eclipse.epp.mpc.source.feature.group
+ org.eclipse.jetty.continuation
+ org.eclipse.jetty.continuation.source
+ org.eclipse.jetty.http
+ org.eclipse.jetty.http.source
+ org.eclipse.jetty.io
+ org.eclipse.jetty.io.source
+ org.eclipse.jetty.server
+ org.eclipse.jetty.server.source
+ org.eclipse.jetty.util
+ org.eclipse.jetty.util.source
org.eclipse.mylyn.wikitext_feature.feature.group
org.eclipse.mylyn.wikitext.ant.source
org.eclipse.mylyn.wikitext.mediawiki.source
org.eclipse.nebula.examples.incubation.feature.feature.group
}
-location "http://www.simantics.org/download/master/external-components/maven" {
+location "http://www.simantics.org/update/collections/10.2.0/repository/" {
+ org.eclipse.collections.feature.feature.group
+ org.eclipse.collections.feature.source.feature.group
+}
+
+location "http://www.simantics.org/download/master/external-components/maven/" {
bouncycastle.bcmail-jdk14
bouncycastle.bcprov-jdk14
ch.qos.logback.classic
com.fasterxml.woodstox.woodstox-core.source
com.healthmarketscience.jackcess
com.healthmarketscience.jackcess.source
+ com.influxdb.client-core
+ com.influxdb.client-core.source
+ com.influxdb.client-java
+ com.influxdb.client-java.source
com.koloboke.api-jdk8
com.koloboke.api-jdk8.source
com.koloboke.compile
com.koloboke.impl-common-jdk8.source
com.lowagie.text
com.lowagie.text.source
- com.sun.jna
- com.sun.jna.platform
- com.sun.jna.platform.source
- com.sun.jna.source
freemarker
freemarker.source
gnu.trove3
it.unimi.dsi.fastutil
it.unimi.dsi.fastutil.source
jakarta-regexp
- javassist
- javassist.source
javax.servlet-api
javax.servlet-api.source
- javax.validation.api
- javax.validation.api.source
- javax.ws.rs-api
- javax.ws.rs-api.source
+ jakarta.xml.bind-api
+ jakarta.xml.bind-api.source
+ jakarta.validation.jakarta.validation-api
+ jakarta.validation.jakarta.validation-api.source
+ jakarta.ws.rs-api
+ jakarta.ws.rs-api.source
net.jcip.annotations
net.jcip.annotations.source
net.ucanaccess
org.antlr.runtime
org.antlr.runtime.source
org.apache.aries.spifly.dynamic.bundle
- org.apache.commons.codec
- org.apache.commons.codec.source
- org.apache.commons.collections
- org.apache.commons.collections.source
+ org.apache.commons.commons-codec
+ org.apache.commons.commons-codec.source
org.apache.commons.collections4
org.apache.commons.collections4.source
org.apache.commons.compress
org.apache.commons.compress.source
+ org.apache.commons.csv
+ org.apache.commons.csv.source
org.apache.commons.io
org.apache.commons.io.source
org.apache.commons.lang
org.bouncycastle.bcprov-jdk14.source
org.bouncycastle.bctsp-jdk14
org.bouncycastle.bctsp-jdk14.source
- org.eclipse.collections.eclipse-collections-api
- org.eclipse.collections.eclipse-collections-api.source
- org.eclipse.collections.eclipse-collections
- org.eclipse.collections.eclipse-collections.source
- org.eclipse.jetty.continuation
- org.eclipse.jetty.continuation.source
- org.eclipse.jetty.http
- org.eclipse.jetty.http.source
- org.eclipse.jetty.io
- org.eclipse.jetty.io.source
- org.eclipse.jetty.server
- org.eclipse.jetty.server.source
org.eclipse.jetty.servlets
org.eclipse.jetty.servlets.source
- org.eclipse.jetty.util
- org.eclipse.jetty.util.source
com.github.benmanes.caffeine
com.github.benmanes.caffeine.source
org.glassfish.hk2.api
org.glassfish.hk2.osgi-resource-locator.source
org.glassfish.hk2.utils
org.glassfish.hk2.utils.source
- org.glassfish.jersey.bundles.repackaged.jersey-guava
- org.glassfish.jersey.bundles.repackaged.jersey-guava.source
+ //org.glassfish.jersey.bundles.repackaged.jersey-guava
+ //org.glassfish.jersey.bundles.repackaged.jersey-guava.source
org.glassfish.hk2.external.aopalliance-repackaged
org.glassfish.hk2.external.aopalliance-repackaged.source
+ org.glassfish.hk2.external.jakarta.inject
+ org.glassfish.hk2.external.jakarta.inject.source
org.glassfish.jersey.core.jersey-client
org.glassfish.jersey.core.jersey-client.source
org.glassfish.jersey.core.jersey-common
org.glassfish.jersey.media.jersey-media-multipart.source
org.glassfish.jersey.containers.jersey-container-servlet-core
org.glassfish.jersey.containers.jersey-container-servlet-core.source
+ org.glassfish.jersey.inject.jersey-hk2
+ org.glassfish.jersey.inject.jersey-hk2.source
org.hsqldb.hsqldb
org.hsqldb.hsqldb.source
org.ini4j
org.jboss.windup.decompiler.api.forge-addon.source
org.jboss.windup.decompiler.procyon
org.jboss.windup.decompiler.procyon.source
- org.jboss.windup.decompiler.procyon.windup-procyon-compilertools
- org.jboss.windup.decompiler.procyon.windup-procyon-compilertools.source
- org.jboss.windup.decompiler.procyon.windup-procyon-core
- org.jboss.windup.decompiler.procyon.windup-procyon-core.source
- org.jboss.windup.decompiler.procyon.windup-procyon-reflection
- org.jboss.windup.decompiler.procyon.windup-procyon-reflection.source
+ org.bitbucket.mstrobel.procyon-compilertools
+ org.bitbucket.mstrobel.procyon-compilertools.source
+ org.bitbucket.mstrobel.procyon-core
+ org.bitbucket.mstrobel.procyon-core.source
org.jboss.windup.utils.windup-utils.forge-addon
org.jboss.windup.utils.windup-utils.forge-addon.source
+ javassist
+ javassist.source
+ jakarta.activation-api
+ jakarta.activation-api.source
+ jakarta.annotation-api
+ jakarta.annotation-api.source
jaxen
jaxen.source
org.jdom2
org.jdom2.source
org.jfree.jchart
org.jfree.jchart.source
- org.jfree.jcommon
- org.jfree.jcommon.source
org.jsoup
org.jsoup.source
org.jvnet.mimepull
org.yaml.snakeyaml.source
org.zeroturnaround.zt-exec
org.zeroturnaround.zt-exec.source
- pgjdbc-ng
- pgjdbc-ng.source
+ com.impossibl.pgjdbc-ng
+ com.impossibl.pgjdbc-ng.source
stax2-api
stax2-api.source
}
<artifactId>org.simantics.root.releng</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
-</project>
\ No newline at end of file
+</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="Simantics 1.43.0" sequenceNumber="1579509507">
+<target name="Simantics 1.44.0" sequenceNumber="1587101469">
<locations>
<location includeMode="slicer" includeAllPlatforms="true" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="com.google.guava" version="21.0.0.v20170206-1425"/>
<unit id="org.eclipse.emf.sdk.feature.group" version="2.20.0.v20191028-0905"/>
<unit id="org.eclipse.epp.mpc.feature.group" version="1.8.1.v20191106-1317"/>
<unit id="org.eclipse.epp.mpc.source.feature.group" version="1.8.1.v20191106-1317"/>
+ <unit id="org.eclipse.jetty.continuation" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.continuation.source" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.http" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.http.source" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.io" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.io.source" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.server" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.server.source" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.util" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.util.source" version="9.4.24.v20191120"/>
<unit id="org.eclipse.mylyn.wikitext_feature.feature.group" version="3.0.35.201912061959"/>
<unit id="org.eclipse.mylyn.wikitext.ant.source" version="3.0.35.20191206145759"/>
<unit id="org.eclipse.mylyn.wikitext.mediawiki.source" version="3.0.35.20191206145759"/>
<unit id="org.eclipse.nebula.examples.incubation.feature.feature.group" version="1.0.0.201806070735"/>
<repository location="http://www.simantics.org/update/nebula/releases/2.2.0/incubation/"/>
</location>
+ <location includeMode="slicer" includeAllPlatforms="true" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
+ <unit id="org.eclipse.collections.feature.feature.group" version="10.1.0.v20200211-1558"/>
+ <unit id="org.eclipse.collections.feature.source.feature.group" version="10.1.0.v20200211-1558"/>
+ <repository location="http://www.simantics.org/update/collections/10.2.0/repository/"/>
+ </location>
<location includeMode="slicer" includeAllPlatforms="true" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="bouncycastle.bcmail-jdk14" version="138.0.0"/>
<unit id="bouncycastle.bcprov-jdk14" version="138.0.0"/>
<unit id="com.google.android.annotations.source" version="4.1.1.4"/>
<unit id="com.google.api.grpc.proto-google-common-protos" version="1.12.0"/>
<unit id="com.google.api.grpc.proto-google-common-protos.source" version="1.12.0"/>
- <unit id="com.google.errorprone.error_prone_annotations" version="2.3.2"/>
- <unit id="com.google.errorprone.error_prone_annotations.source" version="2.3.2"/>
- <unit id="com.google.gson" version="2.7.0"/>
- <unit id="com.google.gson.source" version="2.7.0"/>
- <unit id="com.google.protobuf" version="3.7.1"/>
- <unit id="com.google.protobuf.source" version="3.7.1"/>
- <unit id="com.esotericsoftware.kryo" version="4.0.0"/>
- <unit id="com.esotericsoftware.kryo.source" version="4.0.0"/>
+ <unit id="com.google.errorprone.error_prone_annotations" version="2.3.4"/>
+ <unit id="com.google.errorprone.error_prone_annotations.source" version="2.3.4"/>
+ <unit id="com.google.gson" version="2.8.5"/>
+ <unit id="com.google.gson.source" version="2.8.5"/>
+ <unit id="com.google.protobuf" version="3.11.4"/>
+ <unit id="com.google.protobuf.source" version="3.11.4"/>
+ <unit id="com.esotericsoftware.kryo" version="4.0.2"/>
+ <unit id="com.esotericsoftware.kryo.source" version="4.0.2"/>
<unit id="com.esotericsoftware.minlog" version="1.3.0"/>
<unit id="com.esotericsoftware.minlog.source" version="1.3.0"/>
<unit id="com.esotericsoftware.reflectasm" version="1.11.3"/>
<unit id="com.esotericsoftware.reflectasm.source" version="1.11.3"/>
- <unit id="com.fasterxml.jackson.core.jackson-annotations" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.core.jackson-annotations.source" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.core.jackson-core" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.core.jackson-core.source" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.core.jackson-databind" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.core.jackson-databind.source" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.dataformat.jackson-dataformat-csv" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.dataformat.jackson-dataformat-csv.source" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.dataformat.jackson-dataformat-xml" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.dataformat.jackson-dataformat-xml.source" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.datatype.jackson-datatype-jsr310" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.datatype.jackson-datatype-jsr310.source" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.jaxrs.jackson-jaxrs-base" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.jaxrs.jackson-jaxrs-base.source" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider.source" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.module.jackson-module-jaxb-annotations" version="2.8.8"/>
- <unit id="com.fasterxml.jackson.module.jackson-module-jaxb-annotations.source" version="2.8.8"/>
- <unit id="com.fasterxml.woodstox.woodstox-core" version="5.0.3"/>
- <unit id="com.fasterxml.woodstox.woodstox-core.source" version="5.0.3"/>
+ <unit id="com.fasterxml.jackson.core.jackson-annotations" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.core.jackson-annotations.source" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.core.jackson-core" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.core.jackson-core.source" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.core.jackson-databind" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.core.jackson-databind.source" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.dataformat.jackson-dataformat-csv" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.dataformat.jackson-dataformat-csv.source" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.dataformat.jackson-dataformat-xml" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.dataformat.jackson-dataformat-xml.source" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.datatype.jackson-datatype-jsr310" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.datatype.jackson-datatype-jsr310.source" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.jaxrs.jackson-jaxrs-base" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.jaxrs.jackson-jaxrs-base.source" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider.source" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.module.jackson-module-jaxb-annotations" version="2.10.2"/>
+ <unit id="com.fasterxml.jackson.module.jackson-module-jaxb-annotations.source" version="2.10.2"/>
+ <unit id="com.fasterxml.woodstox.woodstox-core" version="6.0.3"/>
+ <unit id="com.fasterxml.woodstox.woodstox-core.source" version="6.0.3"/>
<unit id="com.healthmarketscience.jackcess" version="2.1.3"/>
<unit id="com.healthmarketscience.jackcess.source" version="2.1.3"/>
+ <unit id="com.influxdb.client-core" version="1.5.0"/>
+ <unit id="com.influxdb.client-core.source" version="1.5.0"/>
+ <unit id="com.influxdb.client-java" version="1.5.0"/>
+ <unit id="com.influxdb.client-java.source" version="1.5.0"/>
<unit id="com.koloboke.api-jdk8" version="1.0.0"/>
<unit id="com.koloboke.api-jdk8.source" version="1.0.0"/>
<unit id="com.koloboke.compile" version="0.5.1"/>
<unit id="com.koloboke.impl-common-jdk8.source" version="1.0.0"/>
<unit id="com.lowagie.text" version="2.1.7.b1"/>
<unit id="com.lowagie.text.source" version="2.1.7.b1"/>
- <unit id="com.sun.jna" version="4.3.0"/>
- <unit id="com.sun.jna.platform" version="4.3.0"/>
- <unit id="com.sun.jna.platform.source" version="4.3.0"/>
- <unit id="com.sun.jna.source" version="4.3.0"/>
- <unit id="freemarker" version="2.3.23.stable"/>
- <unit id="freemarker.source" version="2.3.23.stable"/>
+ <unit id="freemarker" version="2.3.29.stable"/>
+ <unit id="freemarker.source" version="2.3.29.stable"/>
<unit id="gnu.trove3" version="3.0.3"/>
<unit id="gnu.trove3.source" version="3.0.3"/>
- <unit id="io.netty.buffer" version="4.1.35.Final"/>
- <unit id="io.netty.buffer.source" version="4.1.35.Final"/>
- <unit id="io.netty.codec" version="4.1.35.Final"/>
- <unit id="io.netty.codec.source" version="4.1.35.Final"/>
- <unit id="io.netty.codec-http" version="4.1.35.Final"/>
- <unit id="io.netty.codec-http.source" version="4.1.35.Final"/>
- <unit id="io.netty.codec-http2" version="4.1.35.Final"/>
- <unit id="io.netty.codec-http2.source" version="4.1.35.Final"/>
- <unit id="io.netty.codec-socks" version="4.1.35.Final"/>
- <unit id="io.netty.codec-socks.source" version="4.1.35.Final"/>
- <unit id="io.netty.common" version="4.1.35.Final"/>
- <unit id="io.netty.common.source" version="4.1.35.Final"/>
- <unit id="io.netty.handler" version="4.1.35.Final"/>
- <unit id="io.netty.handler.source" version="4.1.35.Final"/>
- <unit id="io.netty.handler-proxy" version="4.1.35.Final"/>
- <unit id="io.netty.handler-proxy.source" version="4.1.35.Final"/>
- <unit id="io.netty.resolver" version="4.1.35.Final"/>
- <unit id="io.netty.resolver.source" version="4.1.35.Final"/>
- <unit id="io.netty.transport" version="4.1.35.Final"/>
- <unit id="io.netty.transport.source" version="4.1.35.Final"/>
+ <unit id="io.netty.buffer" version="4.1.45.Final"/>
+ <unit id="io.netty.buffer.source" version="4.1.45.Final"/>
+ <unit id="io.netty.codec" version="4.1.45.Final"/>
+ <unit id="io.netty.codec.source" version="4.1.45.Final"/>
+ <unit id="io.netty.codec-http" version="4.1.45.Final"/>
+ <unit id="io.netty.codec-http.source" version="4.1.45.Final"/>
+ <unit id="io.netty.codec-http2" version="4.1.45.Final"/>
+ <unit id="io.netty.codec-http2.source" version="4.1.45.Final"/>
+ <unit id="io.netty.codec-socks" version="4.1.45.Final"/>
+ <unit id="io.netty.codec-socks.source" version="4.1.45.Final"/>
+ <unit id="io.netty.common" version="4.1.45.Final"/>
+ <unit id="io.netty.common.source" version="4.1.45.Final"/>
+ <unit id="io.netty.handler" version="4.1.45.Final"/>
+ <unit id="io.netty.handler.source" version="4.1.45.Final"/>
+ <unit id="io.netty.handler-proxy" version="4.1.45.Final"/>
+ <unit id="io.netty.handler-proxy.source" version="4.1.45.Final"/>
+ <unit id="io.netty.resolver" version="4.1.45.Final"/>
+ <unit id="io.netty.resolver.source" version="4.1.45.Final"/>
+ <unit id="io.netty.transport" version="4.1.45.Final"/>
+ <unit id="io.netty.transport.source" version="4.1.45.Final"/>
<unit id="io.opencensus.api" version="0.21.0"/>
<unit id="io.opencensus.api.source" version="0.21.0"/>
<unit id="io.opencensus.contrib-grpc-metrics" version="0.21.0"/>
<unit id="io.opencensus.contrib-grpc-metrics.source" version="0.21.0"/>
- <unit id="it.unimi.dsi.fastutil" version="7.2.1"/>
- <unit id="it.unimi.dsi.fastutil.source" version="7.2.1"/>
+ <unit id="it.unimi.dsi.fastutil" version="8.3.1"/>
+ <unit id="it.unimi.dsi.fastutil.source" version="8.3.1"/>
<unit id="jakarta-regexp" version="1.4.0"/>
- <unit id="javassist" version="3.20.0.GA"/>
- <unit id="javassist.source" version="3.20.0.GA"/>
<unit id="javax.servlet-api" version="3.1.0"/>
<unit id="javax.servlet-api.source" version="3.1.0"/>
- <unit id="javax.validation.api" version="1.1.0.Final"/>
- <unit id="javax.validation.api.source" version="1.1.0.Final"/>
- <unit id="javax.ws.rs-api" version="2.0.1"/>
- <unit id="javax.ws.rs-api.source" version="2.0.1"/>
+ <unit id="jakarta.xml.bind-api" version="2.3.2"/>
+ <unit id="jakarta.xml.bind-api.source" version="2.3.2"/>
+ <unit id="jakarta.validation.jakarta.validation-api" version="2.0.2"/>
+ <unit id="jakarta.validation.jakarta.validation-api.source" version="2.0.2"/>
+ <unit id="jakarta.ws.rs-api" version="2.1.6.b0005"/>
+ <unit id="jakarta.ws.rs-api.source" version="2.1.6.b0005"/>
<unit id="net.jcip.annotations" version="1.0.0"/>
<unit id="net.jcip.annotations.source" version="1.0.0"/>
<unit id="net.ucanaccess" version="3.0.7"/>
<unit id="org.antlr.runtime" version="3.5.2"/>
<unit id="org.antlr.runtime.source" version="3.5.2"/>
<unit id="org.apache.aries.spifly.dynamic.bundle" version="1.2.3"/>
- <unit id="org.apache.commons.codec" version="1.10.0"/>
- <unit id="org.apache.commons.codec.source" version="1.10.0"/>
- <unit id="org.apache.commons.collections" version="3.2.2"/>
- <unit id="org.apache.commons.collections.source" version="3.2.2"/>
+ <unit id="org.apache.commons.commons-codec" version="1.14.0"/>
+ <unit id="org.apache.commons.commons-codec.source" version="1.14.0"/>
<unit id="org.apache.commons.collections4" version="4.1.0"/>
<unit id="org.apache.commons.collections4.source" version="4.1.0"/>
- <unit id="org.apache.commons.compress" version="1.18.0"/>
- <unit id="org.apache.commons.compress.source" version="1.18.0"/>
+ <unit id="org.apache.commons.compress" version="1.20.0"/>
+ <unit id="org.apache.commons.compress.source" version="1.20.0"/>
+ <unit id="org.apache.commons.csv" version="1.6.0"/>
+ <unit id="org.apache.commons.csv.source" version="1.6.0"/>
<unit id="org.apache.commons.io" version="2.4.0"/>
<unit id="org.apache.commons.io.source" version="2.4.0"/>
<unit id="org.apache.commons.lang" version="2.6.0"/>
<unit id="org.apache.lucene4.queryparser.source" version="4.9.0.b0003"/>
<unit id="org.apache.lucene4.sandbox" version="4.9.0.b0003"/>
<unit id="org.apache.lucene4.sandbox.source" version="4.9.0.b0003"/>
- <unit id="org.apache.pdfbox" version="2.0.3"/>
- <unit id="org.apache.pdfbox.fontbox" version="2.0.3"/>
- <unit id="org.apache.pdfbox.fontbox.source" version="2.0.3"/>
- <unit id="org.apache.pdfbox.source" version="2.0.3"/>
- <unit id="org.apache.pdfbox.xmpbox" version="2.0.3"/>
- <unit id="org.apache.pdfbox.xmpbox.source" version="2.0.3"/>
+ <unit id="org.apache.pdfbox" version="2.0.19"/>
+ <unit id="org.apache.pdfbox.fontbox" version="2.0.19"/>
+ <unit id="org.apache.pdfbox.fontbox.source" version="2.0.19"/>
+ <unit id="org.apache.pdfbox.source" version="2.0.19"/>
+ <unit id="org.apache.pdfbox.xmpbox" version="2.0.19"/>
+ <unit id="org.apache.pdfbox.xmpbox.source" version="2.0.19"/>
<unit id="org.bouncycastle.bcmail-jdk14" version="1.38.0"/>
<unit id="org.bouncycastle.bcmail-jdk14.source" version="1.38.0"/>
<unit id="org.bouncycastle.bcprov-jdk14" version="1.38.0"/>
<unit id="org.bouncycastle.bcprov-jdk14.source" version="1.38.0"/>
<unit id="org.bouncycastle.bctsp-jdk14" version="1.38.0"/>
<unit id="org.bouncycastle.bctsp-jdk14.source" version="1.38.0"/>
- <unit id="org.eclipse.collections.eclipse-collections-api" version="9.2.0"/>
- <unit id="org.eclipse.collections.eclipse-collections-api.source" version="9.2.0"/>
- <unit id="org.eclipse.collections.eclipse-collections" version="9.2.0"/>
- <unit id="org.eclipse.collections.eclipse-collections.source" version="9.2.0"/>
- <unit id="org.eclipse.jetty.continuation" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.continuation.source" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.http" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.http.source" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.io" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.io.source" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.server" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.server.source" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.servlets" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.servlets.source" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.util" version="9.4.5.v20170502"/>
- <unit id="org.eclipse.jetty.util.source" version="9.4.5.v20170502"/>
- <unit id="com.github.benmanes.caffeine" version="2.6.2"/>
- <unit id="com.github.benmanes.caffeine.source" version="2.6.2"/>
- <unit id="org.glassfish.hk2.api" version="2.5.0.b32"/>
- <unit id="org.glassfish.hk2.api.source" version="2.5.0.b32"/>
- <unit id="org.glassfish.hk2.locator" version="2.5.0.b32"/>
- <unit id="org.glassfish.hk2.locator.source" version="2.5.0.b32"/>
- <unit id="org.glassfish.hk2.osgi-resource-locator" version="1.0.1"/>
- <unit id="org.glassfish.hk2.osgi-resource-locator.source" version="1.0.1"/>
- <unit id="org.glassfish.hk2.utils" version="2.5.0.b32"/>
- <unit id="org.glassfish.hk2.utils.source" version="2.5.0.b32"/>
- <unit id="org.glassfish.jersey.bundles.repackaged.jersey-guava" version="2.25.1"/>
- <unit id="org.glassfish.jersey.bundles.repackaged.jersey-guava.source" version="2.25.1"/>
- <unit id="org.glassfish.hk2.external.aopalliance-repackaged" version="2.5.0.b32"/>
- <unit id="org.glassfish.hk2.external.aopalliance-repackaged.source" version="2.5.0.b32"/>
- <unit id="org.glassfish.jersey.core.jersey-client" version="2.25.1"/>
- <unit id="org.glassfish.jersey.core.jersey-client.source" version="2.25.1"/>
- <unit id="org.glassfish.jersey.core.jersey-common" version="2.25.1"/>
- <unit id="org.glassfish.jersey.core.jersey-common.source" version="2.25.1"/>
- <unit id="org.glassfish.jersey.core.jersey-server" version="2.25.1"/>
- <unit id="org.glassfish.jersey.core.jersey-server.source" version="2.25.1"/>
- <unit id="org.glassfish.jersey.ext.jersey-entity-filtering" version="2.25.1"/>
- <unit id="org.glassfish.jersey.ext.jersey-entity-filtering.source" version="2.25.1"/>
- <unit id="org.glassfish.jersey.media.jersey-media-json-jackson" version="2.25.1"/>
- <unit id="org.glassfish.jersey.media.jersey-media-json-jackson.source" version="2.25.1"/>
- <unit id="org.glassfish.jersey.media.jersey-media-multipart" version="2.25.1"/>
- <unit id="org.glassfish.jersey.media.jersey-media-multipart.source" version="2.25.1"/>
- <unit id="org.glassfish.jersey.containers.jersey-container-servlet-core" version="2.25.1"/>
- <unit id="org.glassfish.jersey.containers.jersey-container-servlet-core.source" version="2.25.1"/>
+ <unit id="org.eclipse.jetty.servlets" version="9.4.24.v20191120"/>
+ <unit id="org.eclipse.jetty.servlets.source" version="9.4.24.v20191120"/>
+ <unit id="com.github.benmanes.caffeine" version="2.8.1"/>
+ <unit id="com.github.benmanes.caffeine.source" version="2.8.1"/>
+ <unit id="org.glassfish.hk2.api" version="2.6.1"/>
+ <unit id="org.glassfish.hk2.api.source" version="2.6.1"/>
+ <unit id="org.glassfish.hk2.locator" version="2.6.1"/>
+ <unit id="org.glassfish.hk2.locator.source" version="2.6.1"/>
+ <unit id="org.glassfish.hk2.osgi-resource-locator" version="1.0.3"/>
+ <unit id="org.glassfish.hk2.osgi-resource-locator.source" version="1.0.3"/>
+ <unit id="org.glassfish.hk2.utils" version="2.6.1"/>
+ <unit id="org.glassfish.hk2.utils.source" version="2.6.1"/>
+ <unit id="org.glassfish.hk2.external.aopalliance-repackaged" version="2.6.1"/>
+ <unit id="org.glassfish.hk2.external.aopalliance-repackaged.source" version="2.6.1"/>
+ <unit id="org.glassfish.hk2.external.jakarta.inject" version="2.6.1"/>
+ <unit id="org.glassfish.hk2.external.jakarta.inject.source" version="2.6.1"/>
+ <unit id="org.glassfish.jersey.core.jersey-client" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.core.jersey-client.source" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.core.jersey-common" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.core.jersey-common.source" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.core.jersey-server" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.core.jersey-server.source" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.ext.jersey-entity-filtering" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.ext.jersey-entity-filtering.source" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.media.jersey-media-json-jackson" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.media.jersey-media-json-jackson.source" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.media.jersey-media-multipart" version="2.30.1"/>
+ <unit id="org.glassfish.jersey.media.jersey-media-multipart.source" version="2.30.1"/>
+ <unit id="org.glassfish.jersey.containers.jersey-container-servlet-core" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.containers.jersey-container-servlet-core.source" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.inject.jersey-hk2" version="2.30.1.b0008"/>
+ <unit id="org.glassfish.jersey.inject.jersey-hk2.source" version="2.30.1.b0008"/>
<unit id="org.hsqldb.hsqldb" version="2.3.1"/>
<unit id="org.hsqldb.hsqldb.source" version="2.3.1"/>
<unit id="org.ini4j" version="0.5.4"/>
<unit id="org.ini4j.source" version="0.5.4"/>
- <unit id="org.jboss.windup.decompiler.api.forge-addon" version="4.0.0.Beta1"/>
- <unit id="org.jboss.windup.decompiler.api.forge-addon.source" version="4.0.0.Beta1"/>
- <unit id="org.jboss.windup.decompiler.procyon" version="4.0.0.Beta1"/>
- <unit id="org.jboss.windup.decompiler.procyon.source" version="4.0.0.Beta1"/>
- <unit id="org.jboss.windup.decompiler.procyon.windup-procyon-compilertools" version="1.0.0.20160510"/>
- <unit id="org.jboss.windup.decompiler.procyon.windup-procyon-compilertools.source" version="1.0.0.20160510"/>
- <unit id="org.jboss.windup.decompiler.procyon.windup-procyon-core" version="1.0.0.20160510"/>
- <unit id="org.jboss.windup.decompiler.procyon.windup-procyon-core.source" version="1.0.0.20160510"/>
- <unit id="org.jboss.windup.decompiler.procyon.windup-procyon-reflection" version="1.0.0.20160510"/>
- <unit id="org.jboss.windup.decompiler.procyon.windup-procyon-reflection.source" version="1.0.0.20160510"/>
- <unit id="org.jboss.windup.utils.windup-utils.forge-addon" version="4.0.0.Beta1"/>
- <unit id="org.jboss.windup.utils.windup-utils.forge-addon.source" version="4.0.0.Beta1"/>
- <unit id="jaxen" version="1.1.6"/>
- <unit id="jaxen.source" version="1.1.6"/>
+ <unit id="org.jboss.windup.decompiler.api.forge-addon" version="4.3.0.Final"/>
+ <unit id="org.jboss.windup.decompiler.api.forge-addon.source" version="4.3.0.Final"/>
+ <unit id="org.jboss.windup.decompiler.procyon" version="4.3.0.Final"/>
+ <unit id="org.jboss.windup.decompiler.procyon.source" version="4.3.0.Final"/>
+ <unit id="org.bitbucket.mstrobel.procyon-compilertools" version="0.5.33"/>
+ <unit id="org.bitbucket.mstrobel.procyon-compilertools.source" version="0.5.33"/>
+ <unit id="org.bitbucket.mstrobel.procyon-core" version="0.5.33"/>
+ <unit id="org.bitbucket.mstrobel.procyon-core.source" version="0.5.33"/>
+ <unit id="org.jboss.windup.utils.windup-utils.forge-addon" version="4.3.0.Final"/>
+ <unit id="org.jboss.windup.utils.windup-utils.forge-addon.source" version="4.3.0.Final"/>
+ <unit id="javassist" version="3.25.0.GA"/>
+ <unit id="javassist.source" version="3.25.0.GA"/>
+ <unit id="jakarta.activation-api" version="1.2.1.b0001"/>
+ <unit id="jakarta.activation-api.source" version="1.2.1.b0001"/>
+ <unit id="jakarta.annotation-api" version="1.3.5"/>
+ <unit id="jakarta.annotation-api.source" version="1.3.5"/>
+ <unit id="jaxen" version="1.2.0"/>
+ <unit id="jaxen.source" version="1.2.0"/>
<unit id="org.jdom2" version="2.0.6.b0001"/>
<unit id="org.jdom2.source" version="2.0.6.b0001"/>
- <unit id="org.jfree.jchart" version="1.0.19"/>
- <unit id="org.jfree.jchart.source" version="1.0.19"/>
- <unit id="org.jfree.jcommon" version="1.0.23"/>
- <unit id="org.jfree.jcommon.source" version="1.0.23"/>
- <unit id="org.jsoup" version="1.11.3"/>
- <unit id="org.jsoup.source" version="1.11.3"/>
- <unit id="org.jvnet.mimepull" version="1.9.6"/>
- <unit id="org.jvnet.mimepull.source" version="1.9.6"/>
- <unit id="org.mozilla.rhino" version="1.7.7.1"/>
- <unit id="org.mozilla.rhino.source" version="1.7.7.1"/>
- <unit id="org.objenesis" version="2.2.0"/>
- <unit id="org.objenesis.source" version="2.2.0"/>
- <unit id="org.slf4j.api" version="1.7.25.b001"/>
- <unit id="org.slf4j.api.source" version="1.7.25.b001"/>
+ <unit id="org.jfree.jchart" version="1.5.0"/>
+ <unit id="org.jfree.jchart.source" version="1.5.0"/>
+ <unit id="org.jsoup" version="1.12.2"/>
+ <unit id="org.jsoup.source" version="1.12.2"/>
+ <unit id="org.jvnet.mimepull" version="1.9.11"/>
+ <unit id="org.jvnet.mimepull.source" version="1.9.11"/>
+ <unit id="org.mozilla.rhino" version="1.7.12"/>
+ <unit id="org.mozilla.rhino.source" version="1.7.12"/>
+ <unit id="org.objenesis" version="2.5.1"/>
+ <unit id="org.objenesis.source" version="2.5.1"/>
+ <unit id="org.slf4j.api" version="1.7.30"/>
+ <unit id="org.slf4j.api.source" version="1.7.30"/>
<unit id="org.supercsv" version="2.4.0"/>
<unit id="org.supercsv.source" version="2.4.0"/>
- <unit id="org.yaml.snakeyaml" version="1.23.0"/>
- <unit id="org.yaml.snakeyaml.source" version="1.23.0"/>
- <unit id="org.zeroturnaround.zt-exec" version="1.10.0"/>
- <unit id="org.zeroturnaround.zt-exec.source" version="1.10.0"/>
- <unit id="pgjdbc-ng" version="0.7.1"/>
- <unit id="pgjdbc-ng.source" version="0.7.1"/>
- <unit id="stax2-api" version="3.1.4"/>
- <unit id="stax2-api.source" version="3.1.4"/>
- <repository location="http://www.simantics.org/download/master/external-components/maven"/>
+ <unit id="org.yaml.snakeyaml" version="1.25.0"/>
+ <unit id="org.yaml.snakeyaml.source" version="1.25.0"/>
+ <unit id="org.zeroturnaround.zt-exec" version="1.11.0"/>
+ <unit id="org.zeroturnaround.zt-exec.source" version="1.11.0"/>
+ <unit id="com.impossibl.pgjdbc-ng" version="0.8.3"/>
+ <unit id="com.impossibl.pgjdbc-ng.source" version="0.8.3"/>
+ <unit id="stax2-api" version="4.2.0"/>
+ <unit id="stax2-api.source" version="4.2.0"/>
+ <repository location="http://www.simantics.org/download/master/external-components/maven/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="true" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
<unit id="org.apache.batik.feature.feature.group" version="0.0.0"/>
-target "Simantics 1.43.0"
+target "Simantics 1.44.0"
with source allEnvironments
-include "http://www.simantics.org/download/master/org.simantics.sdk.build.targetdefinition.tpd"
+include "./org.simantics.sdk.build.targetdefinition.tpd"
location "http://www.simantics.org/download/master/sdk" {
org.simantics.sdk.feature.group lazy
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>org.simantics.sdk.repository</artifactId>
- <version>1.43.0-SNAPSHOT</version>
+ <version>1.44.0-SNAPSHOT</version>
<packaging>eclipse-repository</packaging>
<parent>
<packaging>pom</packaging>
<properties>
- <tycho.version>1.5.0</tycho.version>
- <tycho.extras.version>1.5.0</tycho.extras.version>
+ <maven.compiler.source>11</maven.compiler.source>
+ <maven.compiler.target>11</maven.compiler.target>
+ <tycho.version>1.6.0</tycho.version>
+ <tycho.extras.version>1.6.0</tycho.extras.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
+++ /dev/null
-<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
- http://maven.apache.org/xsd/settings-1.0.0.xsd">
- <servers>
- <server>
- <id>graph-builder-snapshot</id>
- <username>graph-builder</username>
- <password>graph-builder</password>
- </server>
- </servers>
-</settings>
-
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.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.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
org.simantics.db.management;bundle-version="0.8.0",
gnu.trove3;bundle-version="3.0.3",
org.simantics.fastlz;bundle-version="1.0.0",
- org.apache.log4j;bundle-version="1.2.15",
org.simantics.db.impl;bundle-version="0.8.0",
org.simantics.db.layer0;bundle-version="0.8.0",
org.simantics.project;bundle-version="1.0.1",
org.simantics.db.testing;bundle-version="1.0.0";visibility:=reexport,
org.simantics.datatypes.ontology;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.simantics.db.tests.common,
org.simantics.db.tests.suite
Automatic-Module-Name: org.simantics.db.tests
<property name="classes.dir" value="classes.dir" />
<property name="databoard.jar" value="org.simantics.databoard_0.5.2.jar" />
<property name="trove.jar" value="gnu.trove2_2.0.4.jar" />
- <property name="log4j.jar" value="org.apache.log4j_1.2.15.20080201.jar" />
<property name="db.jar" value="db-connector-${version}.jar" />
<property name="installer.jar" value="installer.jar" />
- <property name="classpath-javac" value="${installer.dir}${db.jar}:${installer.dir}${databoard.jar}:${installer.dir}${trove.jar}:${installer.dir}${log4j.jar}" />
- <property name="classpath-manifest" value="${db.jar} ${databoard.jar} ${trove.jar} ${log4j.jar}" />
+ <property name="classpath-javac" value="${installer.dir}${db.jar}:${installer.dir}${databoard.jar}:${installer.dir}${trove.jar}" />
+ <property name="classpath-manifest" value="${db.jar} ${databoard.jar} ${trove.jar}" />
<target name="clean">
<delete dir="${classes.dir}" quiet="true" />
<target name="trove.dir" if="plugin.dir">
<copy file="${plugin.dir}${trove.jar}" toDir="${installer.dir}" />
</target>
-
- <target name="log4j.jar" if="plugin.dir">
- <copy file="${plugin.dir}${log4j.jar}" toDir="${installer.dir}" />
- </target>
<target name="db.jar" depends="clean">
<property name="origin.dir" value="../"/>
<include name="eclipse/plugins/org.eclipse.osgi_*.jar" />
<include name="external/plugins/gnu.trove*.jar" />
<include name="external/plugins/org.apache.commons.collections_*.jar" />
- <include name="external/plugins/org.apache.log4j_*.jar" />
<include name="external/plugins/org.apache.commons.io_*.jar" />
<include name="simantics/plugins/org.simantics.databoard_*.jar" />
<include name="simantics/plugins/org.simantics.db.layer0_*.jar" />
<setAttribute key="selected_features">
<setEntry value="org.simantics.db.tests.feature:default"/>
</setAttribute>
-<stringAttribute key="selected_target_plugins" value="com.famfamfam.silk@default:default,com.ibm.icu@default:default,com.lowagie.text@default:default,com.tools.logging@default:default,freemarker@default:default,gnu.trove2@default:default,gnu.trove3@default:default,javax.servlet.jsp@default:default,javax.servlet@default:default,javax.vecmath@default:default,javax.xml@default:default,net.sf.cglib@default:default,org.antlr.runtime@default:default,org.apache.commons.codec@default:default,org.apache.commons.collections@default:default,org.apache.commons.el@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.io@default:default,org.apache.commons.logging@default:default,org.apache.jasper@default:default,org.apache.log4j@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene3@default:default,org.apache.lucene@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.bouncycastle@default:default,org.cojen@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.aix.ppc@default:false,org.eclipse.core.filesystem.hpux.ia64_32@default:false,org.eclipse.core.filesystem.linux.ppc@default:false,org.eclipse.core.filesystem.linux.x86@default:false,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.core.filesystem.solaris.sparc@default:false,org.eclipse.core.filesystem.win32.x86@default:false,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.linux.x86@default:false,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.net.win32.x86@default:false,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.equinox.launcher.carbon.macosx@default:false,org.eclipse.equinox.launcher.cocoa.macosx.x86_64@default:false,org.eclipse.equinox.launcher.cocoa.macosx@default:false,org.eclipse.equinox.launcher.gtk.aix.ppc64@default:false,org.eclipse.equinox.launcher.gtk.linux.ppc64@default:false,org.eclipse.equinox.launcher.gtk.linux.ppc@default:false,org.eclipse.equinox.launcher.gtk.linux.s390@default:false,org.eclipse.equinox.launcher.gtk.linux.s390x@default:false,org.eclipse.equinox.launcher.gtk.linux.x86@default:false,org.eclipse.equinox.launcher.gtk.linux.x86_64@default:false,org.eclipse.equinox.launcher.gtk.solaris.sparc@default:false,org.eclipse.equinox.launcher.gtk.solaris.x86@default:false,org.eclipse.equinox.launcher.motif.aix.ppc@default:false,org.eclipse.equinox.launcher.motif.hpux.ia64_32@default:false,org.eclipse.equinox.launcher.motif.linux.x86@default:false,org.eclipse.equinox.launcher.motif.solaris.sparc@default:false,org.eclipse.equinox.launcher.win32.win32.x86@default:false,org.eclipse.equinox.launcher.win32.win32.x86_64@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.p2.discovery@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.macosx@default:false,org.eclipse.equinox.security.ui@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.help.appserver@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help.webapp@default:default,org.eclipse.help@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.mylyn.wikitext.core@default:default,org.eclipse.mylyn.wikitext.mediawiki.core@default:default,org.eclipse.nebula.widgets@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.eclipse.pde.runtime@default:default,org.eclipse.rcp@default:default,org.eclipse.swt.carbon.macosx@default:false,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.eclipse.swt.cocoa.macosx@default:false,org.eclipse.swt.gtk.aix.ppc64@default:false,org.eclipse.swt.gtk.linux.ppc64@default:false,org.eclipse.swt.gtk.linux.ppc@default:false,org.eclipse.swt.gtk.linux.s390@default:false,org.eclipse.swt.gtk.linux.s390x@default:false,org.eclipse.swt.gtk.linux.x86@default:false,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.swt.gtk.solaris.sparc@default:false,org.eclipse.swt.gtk.solaris.x86@default:false,org.eclipse.swt.motif.aix.ppc@default:false,org.eclipse.swt.motif.hpux.ia64_32@default:false,org.eclipse.swt.motif.linux.x86@default:false,org.eclipse.swt.motif.solaris.sparc@default:false,org.eclipse.swt.photon.qnx.x86@default:false,org.eclipse.swt.win32.win32.x86@default:false,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.text@default:default,org.eclipse.ui.carbon@default:false,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.ui.console@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.net@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.update.configurator@3:true,org.hamcrest.core@default:default,org.jfree.jchart@default:default,org.jfree.jcommon@default:default,org.junit4@default:default,org.junit@default:default,org.lobobrowser.cobra@default:default,org.mortbay.jetty.server@default:default,org.mortbay.jetty.util@default:default,org.mozilla.rhino@default:default,org.objectweb.asm@default:default,org.opcfoundation.ua@default:default,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.simantics.basicexpression@default:default,org.simantics.browsing.ui.common@default:default,org.simantics.browsing.ui.graph.impl@default:default,org.simantics.browsing.ui.graph@default:default,org.simantics.browsing.ui.model@default:default,org.simantics.browsing.ui.platform@default:default,org.simantics.browsing.ui.swt@default:default,org.simantics.browsing.ui@default:default,org.simantics.charts@default:default,org.simantics.datatypes.ontology@default:default,org.simantics.datatypes@default:default,org.simantics.debug.ui@default:default,org.simantics.diagram.connection@default:default,org.simantics.diagram.profile@default:default,org.simantics.diagram@default:default,org.simantics.editors.win32@default:default,org.simantics.event.ontology@default:default,org.simantics.event@default:default,org.simantics.excel@default:default,org.simantics.g2d@default:default,org.simantics.graphviz.ui@default:default,org.simantics.graphviz@default:default,org.simantics.history@default:default,org.simantics.issues.common@default:default,org.simantics.issues.ui@default:default,org.simantics.issues@default:default,org.simantics.mapping@default:default,org.simantics.message.ui@default:default,org.simantics.message@default:default,org.simantics.migration.ui@default:default,org.simantics.modeling.ui@default:default,org.simantics.modeling@default:default,org.simantics.scenegraph.profile@default:default,org.simantics.scenegraph.swing@default:default,org.simantics.scenegraph.ui@default:default,org.simantics.scenegraph@default:default,org.simantics.scl.compiler@default:default,org.simantics.scl.db@default:default,org.simantics.scl.replaying@default:default,org.simantics.scl.ui.editor@default:default,org.simantics.selectionview@default:default,org.simantics.simulation.ui@default:default,org.simantics.simulation@default:default,org.simantics.spreadsheet.common@default:default,org.simantics.spreadsheet.graph@default:default,org.simantics.spreadsheet.ui@default:default,org.simantics.spreadsheet@default:default,org.simantics.structural.flattening@default:default,org.simantics.structural.ui@default:default,org.simantics.structural2@default:default,org.simantics.team.ui@default:default,org.simantics.trend@default:default,org.simantics.ui@default:default,org.simantics.views.swt.client@default:default,org.simantics.views.swt@default:default,org.simantics.views@default:default,org.simantics.wiki.ui@default:default,org.simantics.workbench.ontology@default:default,org.simantics.workbench.search@default:default,xtc.parser.runtime@default:default"/>
+<stringAttribute key="selected_target_plugins" value="com.famfamfam.silk@default:default,com.ibm.icu@default:default,com.lowagie.text@default:default,com.tools.logging@default:default,freemarker@default:default,gnu.trove2@default:default,gnu.trove3@default:default,javax.servlet.jsp@default:default,javax.servlet@default:default,javax.vecmath@default:default,javax.xml@default:default,net.sf.cglib@default:default,org.antlr.runtime@default:default,org.apache.commons.codec@default:default,org.apache.commons.collections4@default:default,org.apache.commons.el@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.io@default:default,org.apache.commons.logging@default:default,org.apache.jasper@default:default,org.apache.log4j@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene3@default:default,org.apache.lucene@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.bouncycastle@default:default,org.cojen@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.aix.ppc@default:false,org.eclipse.core.filesystem.hpux.ia64_32@default:false,org.eclipse.core.filesystem.linux.ppc@default:false,org.eclipse.core.filesystem.linux.x86@default:false,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.core.filesystem.solaris.sparc@default:false,org.eclipse.core.filesystem.win32.x86@default:false,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.linux.x86@default:false,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.net.win32.x86@default:false,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.equinox.launcher.carbon.macosx@default:false,org.eclipse.equinox.launcher.cocoa.macosx.x86_64@default:false,org.eclipse.equinox.launcher.cocoa.macosx@default:false,org.eclipse.equinox.launcher.gtk.aix.ppc64@default:false,org.eclipse.equinox.launcher.gtk.linux.ppc64@default:false,org.eclipse.equinox.launcher.gtk.linux.ppc@default:false,org.eclipse.equinox.launcher.gtk.linux.s390@default:false,org.eclipse.equinox.launcher.gtk.linux.s390x@default:false,org.eclipse.equinox.launcher.gtk.linux.x86@default:false,org.eclipse.equinox.launcher.gtk.linux.x86_64@default:false,org.eclipse.equinox.launcher.gtk.solaris.sparc@default:false,org.eclipse.equinox.launcher.gtk.solaris.x86@default:false,org.eclipse.equinox.launcher.motif.aix.ppc@default:false,org.eclipse.equinox.launcher.motif.hpux.ia64_32@default:false,org.eclipse.equinox.launcher.motif.linux.x86@default:false,org.eclipse.equinox.launcher.motif.solaris.sparc@default:false,org.eclipse.equinox.launcher.win32.win32.x86@default:false,org.eclipse.equinox.launcher.win32.win32.x86_64@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.p2.discovery@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.macosx@default:false,org.eclipse.equinox.security.ui@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.help.appserver@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help.webapp@default:default,org.eclipse.help@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.mylyn.wikitext.core@default:default,org.eclipse.mylyn.wikitext.mediawiki.core@default:default,org.eclipse.nebula.widgets@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.eclipse.pde.runtime@default:default,org.eclipse.rcp@default:default,org.eclipse.swt.carbon.macosx@default:false,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.eclipse.swt.cocoa.macosx@default:false,org.eclipse.swt.gtk.aix.ppc64@default:false,org.eclipse.swt.gtk.linux.ppc64@default:false,org.eclipse.swt.gtk.linux.ppc@default:false,org.eclipse.swt.gtk.linux.s390@default:false,org.eclipse.swt.gtk.linux.s390x@default:false,org.eclipse.swt.gtk.linux.x86@default:false,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.swt.gtk.solaris.sparc@default:false,org.eclipse.swt.gtk.solaris.x86@default:false,org.eclipse.swt.motif.aix.ppc@default:false,org.eclipse.swt.motif.hpux.ia64_32@default:false,org.eclipse.swt.motif.linux.x86@default:false,org.eclipse.swt.motif.solaris.sparc@default:false,org.eclipse.swt.photon.qnx.x86@default:false,org.eclipse.swt.win32.win32.x86@default:false,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.text@default:default,org.eclipse.ui.carbon@default:false,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.ui.console@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.net@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.update.configurator@3:true,org.hamcrest.core@default:default,org.jfree.jchart@default:default,org.jfree.jcommon@default:default,org.junit4@default:default,org.junit@default:default,org.lobobrowser.cobra@default:default,org.mortbay.jetty.server@default:default,org.mortbay.jetty.util@default:default,org.mozilla.rhino@default:default,org.objectweb.asm@default:default,org.opcfoundation.ua@default:default,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.simantics.basicexpression@default:default,org.simantics.browsing.ui.common@default:default,org.simantics.browsing.ui.graph.impl@default:default,org.simantics.browsing.ui.graph@default:default,org.simantics.browsing.ui.model@default:default,org.simantics.browsing.ui.platform@default:default,org.simantics.browsing.ui.swt@default:default,org.simantics.browsing.ui@default:default,org.simantics.charts@default:default,org.simantics.datatypes.ontology@default:default,org.simantics.datatypes@default:default,org.simantics.debug.ui@default:default,org.simantics.diagram.connection@default:default,org.simantics.diagram.profile@default:default,org.simantics.diagram@default:default,org.simantics.editors.win32@default:default,org.simantics.event.ontology@default:default,org.simantics.event@default:default,org.simantics.excel@default:default,org.simantics.g2d@default:default,org.simantics.graphviz.ui@default:default,org.simantics.graphviz@default:default,org.simantics.history@default:default,org.simantics.issues.common@default:default,org.simantics.issues.ui@default:default,org.simantics.issues@default:default,org.simantics.mapping@default:default,org.simantics.message.ui@default:default,org.simantics.message@default:default,org.simantics.migration.ui@default:default,org.simantics.modeling.ui@default:default,org.simantics.modeling@default:default,org.simantics.scenegraph.profile@default:default,org.simantics.scenegraph.swing@default:default,org.simantics.scenegraph.ui@default:default,org.simantics.scenegraph@default:default,org.simantics.scl.compiler@default:default,org.simantics.scl.db@default:default,org.simantics.scl.replaying@default:default,org.simantics.scl.ui.editor@default:default,org.simantics.selectionview@default:default,org.simantics.simulation.ui@default:default,org.simantics.simulation@default:default,org.simantics.spreadsheet.common@default:default,org.simantics.spreadsheet.graph@default:default,org.simantics.spreadsheet.ui@default:default,org.simantics.spreadsheet@default:default,org.simantics.structural.flattening@default:default,org.simantics.structural.ui@default:default,org.simantics.structural2@default:default,org.simantics.team.ui@default:default,org.simantics.trend@default:default,org.simantics.ui@default:default,org.simantics.views.swt.client@default:default,org.simantics.views.swt@default:default,org.simantics.views@default:default,org.simantics.wiki.ui@default:default,org.simantics.workbench.ontology@default:default,org.simantics.workbench.search@default:default,xtc.parser.runtime@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="org.simantics.action.ontology@default:default,org.simantics.application@default:default,org.simantics.browsing.ui.ontology@default:default,org.simantics.color.ontology@default:default,org.simantics.common@default:default,org.simantics.databoard@default:default,org.simantics.db.build@default:default,org.simantics.db.common@default:default,org.simantics.db.impl@default:default,org.simantics.db.indexing@default:default,org.simantics.db.layer0@default:default,org.simantics.db.management@default:default,org.simantics.db.procore.protocol@default:default,org.simantics.db.procore.server.environment@default:default,org.simantics.db.procore@default:default,org.simantics.db.services@default:default,org.simantics.db.undocore.linux.x86@default:false,org.simantics.db.undocore.linux.x86_64@default:false,org.simantics.db.undocore.win32.x86@default:false,org.simantics.db.undocore@default:default,org.simantics.db@default:default,org.simantics.diagram.ontology@default:default,org.simantics.document.ontology@default:default,org.simantics.dublincore.ontology@default:default,org.simantics.editors@default:default,org.simantics.fastlz@default:default,org.simantics.g2d.ontology@default:default,org.simantics.graph.db@default:default,org.simantics.graph@default:default,org.simantics.image.ontology@default:default,org.simantics.image2.ontology@default:default,org.simantics.issues.ontology@default:default,org.simantics.layer0.utils@default:default,org.simantics.layer0@default:default,org.simantics.layer0x.ontology@default:default,org.simantics.modeling.ontology@default:default,org.simantics.project.ontology@default:default,org.simantics.project@default:default,org.simantics.scl.reflection@default:default,org.simantics.scl.runtime@default:default,org.simantics.scl.types@default:default,org.simantics.selectionview.ontology@default:default,org.simantics.simulation.ontology@default:default,org.simantics.softwareconfiguration.ontology@default:default,org.simantics.spreadsheet.ontology@default:default,org.simantics.structural.ontology@default:default,org.simantics.user.ontology@default:default,org.simantics.utils.datastructures@default:default,org.simantics.utils.thread.swt@default:default,org.simantics.utils.thread@default:default,org.simantics.utils.ui.workbench@default:default,org.simantics.utils.ui@default:default,org.simantics.utils@default:default,org.simantics.viewpoint.ontology@default:default,org.simantics.views.ontology@default:default,org.simantics.webmon.ontology@default:default,org.simantics.workbench@default:default,org.simantics@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<setAttribute key="selected_features">
<setEntry value="org.simantics.db.tests.feature:default"/>
</setAttribute>
-<stringAttribute key="selected_target_plugins" value="com.famfamfam.silk@default:default,com.ibm.icu@default:default,com.lowagie.text@default:default,com.tools.logging@default:default,freemarker@default:default,gnu.trove2@default:default,gnu.trove3@default:default,javax.servlet.jsp@default:default,javax.servlet@default:default,javax.vecmath@default:default,javax.xml@default:default,net.sf.cglib@default:default,org.antlr.runtime@default:default,org.apache.commons.codec@default:default,org.apache.commons.collections@default:default,org.apache.commons.el@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.io@default:default,org.apache.commons.logging@default:default,org.apache.jasper@default:default,org.apache.log4j@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene3@default:default,org.apache.lucene@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.bouncycastle@default:default,org.cojen@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.aix.ppc@default:false,org.eclipse.core.filesystem.hpux.ia64_32@default:false,org.eclipse.core.filesystem.linux.ppc@default:false,org.eclipse.core.filesystem.linux.x86@default:false,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.core.filesystem.solaris.sparc@default:false,org.eclipse.core.filesystem.win32.x86@default:false,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.linux.x86@default:false,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.net.win32.x86@default:false,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.equinox.launcher.carbon.macosx@default:false,org.eclipse.equinox.launcher.cocoa.macosx.x86_64@default:false,org.eclipse.equinox.launcher.cocoa.macosx@default:false,org.eclipse.equinox.launcher.gtk.aix.ppc64@default:false,org.eclipse.equinox.launcher.gtk.linux.ppc64@default:false,org.eclipse.equinox.launcher.gtk.linux.ppc@default:false,org.eclipse.equinox.launcher.gtk.linux.s390@default:false,org.eclipse.equinox.launcher.gtk.linux.s390x@default:false,org.eclipse.equinox.launcher.gtk.linux.x86@default:false,org.eclipse.equinox.launcher.gtk.linux.x86_64@default:false,org.eclipse.equinox.launcher.gtk.solaris.sparc@default:false,org.eclipse.equinox.launcher.gtk.solaris.x86@default:false,org.eclipse.equinox.launcher.motif.aix.ppc@default:false,org.eclipse.equinox.launcher.motif.hpux.ia64_32@default:false,org.eclipse.equinox.launcher.motif.linux.x86@default:false,org.eclipse.equinox.launcher.motif.solaris.sparc@default:false,org.eclipse.equinox.launcher.win32.win32.x86@default:false,org.eclipse.equinox.launcher.win32.win32.x86_64@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.p2.discovery@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.macosx@default:false,org.eclipse.equinox.security.ui@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.help.appserver@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help.webapp@default:default,org.eclipse.help@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.mylyn.wikitext.core@default:default,org.eclipse.mylyn.wikitext.mediawiki.core@default:default,org.eclipse.nebula.widgets@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.eclipse.pde.runtime@default:default,org.eclipse.rcp@default:default,org.eclipse.swt.carbon.macosx@default:false,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.eclipse.swt.cocoa.macosx@default:false,org.eclipse.swt.gtk.aix.ppc64@default:false,org.eclipse.swt.gtk.linux.ppc64@default:false,org.eclipse.swt.gtk.linux.ppc@default:false,org.eclipse.swt.gtk.linux.s390@default:false,org.eclipse.swt.gtk.linux.s390x@default:false,org.eclipse.swt.gtk.linux.x86@default:false,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.swt.gtk.solaris.sparc@default:false,org.eclipse.swt.gtk.solaris.x86@default:false,org.eclipse.swt.motif.aix.ppc@default:false,org.eclipse.swt.motif.hpux.ia64_32@default:false,org.eclipse.swt.motif.linux.x86@default:false,org.eclipse.swt.motif.solaris.sparc@default:false,org.eclipse.swt.photon.qnx.x86@default:false,org.eclipse.swt.win32.win32.x86@default:false,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.text@default:default,org.eclipse.ui.carbon@default:false,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.ui.console@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.net@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.update.configurator@3:true,org.hamcrest.core@default:default,org.jfree.jchart@default:default,org.jfree.jcommon@default:default,org.junit4@default:default,org.junit@default:default,org.lobobrowser.cobra@default:default,org.mortbay.jetty.server@default:default,org.mortbay.jetty.util@default:default,org.mozilla.rhino@default:default,org.objectweb.asm@default:default,org.opcfoundation.ua@default:default,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.simantics.basicexpression@default:default,org.simantics.browsing.ui.common@default:default,org.simantics.browsing.ui.graph.impl@default:default,org.simantics.browsing.ui.graph@default:default,org.simantics.browsing.ui.model@default:default,org.simantics.browsing.ui.platform@default:default,org.simantics.browsing.ui.swt@default:default,org.simantics.browsing.ui@default:default,org.simantics.charts@default:default,org.simantics.datatypes.ontology@default:default,org.simantics.datatypes@default:default,org.simantics.debug.ui@default:default,org.simantics.diagram.connection@default:default,org.simantics.diagram.profile@default:default,org.simantics.diagram@default:default,org.simantics.editors.win32@default:default,org.simantics.event.ontology@default:default,org.simantics.event@default:default,org.simantics.excel@default:default,org.simantics.g2d@default:default,org.simantics.graphviz.ui@default:default,org.simantics.graphviz@default:default,org.simantics.history@default:default,org.simantics.issues.common@default:default,org.simantics.issues.ui@default:default,org.simantics.issues@default:default,org.simantics.mapping@default:default,org.simantics.message.ui@default:default,org.simantics.message@default:default,org.simantics.migration.ui@default:default,org.simantics.modeling.ui@default:default,org.simantics.modeling@default:default,org.simantics.scenegraph.profile@default:default,org.simantics.scenegraph.swing@default:default,org.simantics.scenegraph.ui@default:default,org.simantics.scenegraph@default:default,org.simantics.scl.compiler@default:default,org.simantics.scl.db@default:default,org.simantics.scl.replaying@default:default,org.simantics.scl.ui.editor@default:default,org.simantics.selectionview@default:default,org.simantics.simulation.ui@default:default,org.simantics.simulation@default:default,org.simantics.spreadsheet.common@default:default,org.simantics.spreadsheet.graph@default:default,org.simantics.spreadsheet.ui@default:default,org.simantics.spreadsheet@default:default,org.simantics.structural.flattening@default:default,org.simantics.structural.ui@default:default,org.simantics.structural2@default:default,org.simantics.team.ui@default:default,org.simantics.trend@default:default,org.simantics.ui@default:default,org.simantics.views.swt.client@default:default,org.simantics.views.swt@default:default,org.simantics.views@default:default,org.simantics.wiki.ui@default:default,org.simantics.workbench.ontology@default:default,org.simantics.workbench.search@default:default,xtc.parser.runtime@default:default"/>
+<stringAttribute key="selected_target_plugins" value="com.famfamfam.silk@default:default,com.ibm.icu@default:default,com.lowagie.text@default:default,com.tools.logging@default:default,freemarker@default:default,gnu.trove2@default:default,gnu.trove3@default:default,javax.servlet.jsp@default:default,javax.servlet@default:default,javax.vecmath@default:default,javax.xml@default:default,net.sf.cglib@default:default,org.antlr.runtime@default:default,org.apache.commons.codec@default:default,org.apache.commons.collections4@default:default,org.apache.commons.el@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.io@default:default,org.apache.commons.logging@default:default,org.apache.jasper@default:default,org.apache.log4j@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene3@default:default,org.apache.lucene@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.bouncycastle@default:default,org.cojen@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.aix.ppc@default:false,org.eclipse.core.filesystem.hpux.ia64_32@default:false,org.eclipse.core.filesystem.linux.ppc@default:false,org.eclipse.core.filesystem.linux.x86@default:false,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.core.filesystem.solaris.sparc@default:false,org.eclipse.core.filesystem.win32.x86@default:false,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.linux.x86@default:false,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.net.win32.x86@default:false,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.equinox.launcher.carbon.macosx@default:false,org.eclipse.equinox.launcher.cocoa.macosx.x86_64@default:false,org.eclipse.equinox.launcher.cocoa.macosx@default:false,org.eclipse.equinox.launcher.gtk.aix.ppc64@default:false,org.eclipse.equinox.launcher.gtk.linux.ppc64@default:false,org.eclipse.equinox.launcher.gtk.linux.ppc@default:false,org.eclipse.equinox.launcher.gtk.linux.s390@default:false,org.eclipse.equinox.launcher.gtk.linux.s390x@default:false,org.eclipse.equinox.launcher.gtk.linux.x86@default:false,org.eclipse.equinox.launcher.gtk.linux.x86_64@default:false,org.eclipse.equinox.launcher.gtk.solaris.sparc@default:false,org.eclipse.equinox.launcher.gtk.solaris.x86@default:false,org.eclipse.equinox.launcher.motif.aix.ppc@default:false,org.eclipse.equinox.launcher.motif.hpux.ia64_32@default:false,org.eclipse.equinox.launcher.motif.linux.x86@default:false,org.eclipse.equinox.launcher.motif.solaris.sparc@default:false,org.eclipse.equinox.launcher.win32.win32.x86@default:false,org.eclipse.equinox.launcher.win32.win32.x86_64@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.p2.discovery@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.macosx@default:false,org.eclipse.equinox.security.ui@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.help.appserver@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help.webapp@default:default,org.eclipse.help@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.mylyn.wikitext.core@default:default,org.eclipse.mylyn.wikitext.mediawiki.core@default:default,org.eclipse.nebula.widgets@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.eclipse.pde.runtime@default:default,org.eclipse.rcp@default:default,org.eclipse.swt.carbon.macosx@default:false,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.eclipse.swt.cocoa.macosx@default:false,org.eclipse.swt.gtk.aix.ppc64@default:false,org.eclipse.swt.gtk.linux.ppc64@default:false,org.eclipse.swt.gtk.linux.ppc@default:false,org.eclipse.swt.gtk.linux.s390@default:false,org.eclipse.swt.gtk.linux.s390x@default:false,org.eclipse.swt.gtk.linux.x86@default:false,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.swt.gtk.solaris.sparc@default:false,org.eclipse.swt.gtk.solaris.x86@default:false,org.eclipse.swt.motif.aix.ppc@default:false,org.eclipse.swt.motif.hpux.ia64_32@default:false,org.eclipse.swt.motif.linux.x86@default:false,org.eclipse.swt.motif.solaris.sparc@default:false,org.eclipse.swt.photon.qnx.x86@default:false,org.eclipse.swt.win32.win32.x86@default:false,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.text@default:default,org.eclipse.ui.carbon@default:false,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.ui.console@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.net@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.update.configurator@3:true,org.hamcrest.core@default:default,org.jfree.jchart@default:default,org.jfree.jcommon@default:default,org.junit4@default:default,org.junit@default:default,org.lobobrowser.cobra@default:default,org.mortbay.jetty.server@default:default,org.mortbay.jetty.util@default:default,org.mozilla.rhino@default:default,org.objectweb.asm@default:default,org.opcfoundation.ua@default:default,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.simantics.basicexpression@default:default,org.simantics.browsing.ui.common@default:default,org.simantics.browsing.ui.graph.impl@default:default,org.simantics.browsing.ui.graph@default:default,org.simantics.browsing.ui.model@default:default,org.simantics.browsing.ui.platform@default:default,org.simantics.browsing.ui.swt@default:default,org.simantics.browsing.ui@default:default,org.simantics.charts@default:default,org.simantics.datatypes.ontology@default:default,org.simantics.datatypes@default:default,org.simantics.debug.ui@default:default,org.simantics.diagram.connection@default:default,org.simantics.diagram.profile@default:default,org.simantics.diagram@default:default,org.simantics.editors.win32@default:default,org.simantics.event.ontology@default:default,org.simantics.event@default:default,org.simantics.excel@default:default,org.simantics.g2d@default:default,org.simantics.graphviz.ui@default:default,org.simantics.graphviz@default:default,org.simantics.history@default:default,org.simantics.issues.common@default:default,org.simantics.issues.ui@default:default,org.simantics.issues@default:default,org.simantics.mapping@default:default,org.simantics.message.ui@default:default,org.simantics.message@default:default,org.simantics.migration.ui@default:default,org.simantics.modeling.ui@default:default,org.simantics.modeling@default:default,org.simantics.scenegraph.profile@default:default,org.simantics.scenegraph.swing@default:default,org.simantics.scenegraph.ui@default:default,org.simantics.scenegraph@default:default,org.simantics.scl.compiler@default:default,org.simantics.scl.db@default:default,org.simantics.scl.replaying@default:default,org.simantics.scl.ui.editor@default:default,org.simantics.selectionview@default:default,org.simantics.simulation.ui@default:default,org.simantics.simulation@default:default,org.simantics.spreadsheet.common@default:default,org.simantics.spreadsheet.graph@default:default,org.simantics.spreadsheet.ui@default:default,org.simantics.spreadsheet@default:default,org.simantics.structural.flattening@default:default,org.simantics.structural.ui@default:default,org.simantics.structural2@default:default,org.simantics.team.ui@default:default,org.simantics.trend@default:default,org.simantics.ui@default:default,org.simantics.views.swt.client@default:default,org.simantics.views.swt@default:default,org.simantics.views@default:default,org.simantics.wiki.ui@default:default,org.simantics.workbench.ontology@default:default,org.simantics.workbench.search@default:default,xtc.parser.runtime@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="org.simantics.action.ontology@default:default,org.simantics.application@default:default,org.simantics.browsing.ui.ontology@default:default,org.simantics.color.ontology@default:default,org.simantics.common@default:default,org.simantics.databoard@default:default,org.simantics.db.build@default:default,org.simantics.db.common@default:default,org.simantics.db.impl@default:default,org.simantics.db.indexing@default:default,org.simantics.db.layer0@default:default,org.simantics.db.management@default:default,org.simantics.db.procore.protocol@default:default,org.simantics.db.procore.server.environment@default:default,org.simantics.db.procore@default:default,org.simantics.db.services@default:default,org.simantics.db.undocore.linux.x86@default:false,org.simantics.db.undocore.linux.x86_64@default:false,org.simantics.db.undocore.win32.x86@default:false,org.simantics.db.undocore@default:default,org.simantics.db@default:default,org.simantics.diagram.ontology@default:default,org.simantics.document.ontology@default:default,org.simantics.dublincore.ontology@default:default,org.simantics.editors@default:default,org.simantics.fastlz@default:default,org.simantics.g2d.ontology@default:default,org.simantics.graph.db@default:default,org.simantics.graph@default:default,org.simantics.image.ontology@default:default,org.simantics.image2.ontology@default:default,org.simantics.issues.ontology@default:default,org.simantics.layer0.utils@default:default,org.simantics.layer0@default:default,org.simantics.layer0x.ontology@default:default,org.simantics.modeling.ontology@default:default,org.simantics.project.ontology@default:default,org.simantics.project@default:default,org.simantics.scl.reflection@default:default,org.simantics.scl.runtime@default:default,org.simantics.scl.types@default:default,org.simantics.selectionview.ontology@default:default,org.simantics.simulation.ontology@default:default,org.simantics.softwareconfiguration.ontology@default:default,org.simantics.spreadsheet.ontology@default:default,org.simantics.structural.ontology@default:default,org.simantics.user.ontology@default:default,org.simantics.utils.datastructures@default:default,org.simantics.utils.thread.swt@default:default,org.simantics.utils.thread@default:default,org.simantics.utils.ui.workbench@default:default,org.simantics.utils.ui@default:default,org.simantics.utils@default:default,org.simantics.viewpoint.ontology@default:default,org.simantics.views.ontology@default:default,org.simantics.webmon.ontology@default:default,org.simantics.workbench@default:default,org.simantics@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<setAttribute key="selected_features">
<setEntry value="org.simantics.db.tests.feature:default"/>
</setAttribute>
-<stringAttribute key="selected_target_plugins" value="com.famfamfam.silk@default:default,com.ibm.icu@default:default,com.lowagie.text@default:default,com.tools.logging@default:default,freemarker@default:default,gnu.trove2@default:default,gnu.trove3@default:default,javax.servlet.jsp@default:default,javax.servlet@default:default,javax.vecmath@default:default,javax.xml@default:default,net.sf.cglib@default:default,org.antlr.runtime@default:default,org.apache.commons.codec@default:default,org.apache.commons.collections@default:default,org.apache.commons.el@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.io@default:default,org.apache.commons.logging@default:default,org.apache.jasper@default:default,org.apache.log4j@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene3@default:default,org.apache.lucene@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.bouncycastle@default:default,org.cojen@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.aix.ppc@default:false,org.eclipse.core.filesystem.hpux.ia64_32@default:false,org.eclipse.core.filesystem.linux.ppc@default:false,org.eclipse.core.filesystem.linux.x86@default:false,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.core.filesystem.solaris.sparc@default:false,org.eclipse.core.filesystem.win32.x86@default:false,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.linux.x86@default:false,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.net.win32.x86@default:false,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.equinox.launcher.carbon.macosx@default:false,org.eclipse.equinox.launcher.cocoa.macosx.x86_64@default:false,org.eclipse.equinox.launcher.cocoa.macosx@default:false,org.eclipse.equinox.launcher.gtk.aix.ppc64@default:false,org.eclipse.equinox.launcher.gtk.linux.ppc64@default:false,org.eclipse.equinox.launcher.gtk.linux.ppc@default:false,org.eclipse.equinox.launcher.gtk.linux.s390@default:false,org.eclipse.equinox.launcher.gtk.linux.s390x@default:false,org.eclipse.equinox.launcher.gtk.linux.x86@default:false,org.eclipse.equinox.launcher.gtk.linux.x86_64@default:false,org.eclipse.equinox.launcher.gtk.solaris.sparc@default:false,org.eclipse.equinox.launcher.gtk.solaris.x86@default:false,org.eclipse.equinox.launcher.motif.aix.ppc@default:false,org.eclipse.equinox.launcher.motif.hpux.ia64_32@default:false,org.eclipse.equinox.launcher.motif.linux.x86@default:false,org.eclipse.equinox.launcher.motif.solaris.sparc@default:false,org.eclipse.equinox.launcher.win32.win32.x86@default:false,org.eclipse.equinox.launcher.win32.win32.x86_64@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.p2.discovery@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.macosx@default:false,org.eclipse.equinox.security.ui@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.help.appserver@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help.webapp@default:default,org.eclipse.help@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.mylyn.wikitext.core@default:default,org.eclipse.mylyn.wikitext.mediawiki.core@default:default,org.eclipse.nebula.widgets@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.eclipse.pde.runtime@default:default,org.eclipse.rcp@default:default,org.eclipse.swt.carbon.macosx@default:false,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.eclipse.swt.cocoa.macosx@default:false,org.eclipse.swt.gtk.aix.ppc64@default:false,org.eclipse.swt.gtk.linux.ppc64@default:false,org.eclipse.swt.gtk.linux.ppc@default:false,org.eclipse.swt.gtk.linux.s390@default:false,org.eclipse.swt.gtk.linux.s390x@default:false,org.eclipse.swt.gtk.linux.x86@default:false,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.swt.gtk.solaris.sparc@default:false,org.eclipse.swt.gtk.solaris.x86@default:false,org.eclipse.swt.motif.aix.ppc@default:false,org.eclipse.swt.motif.hpux.ia64_32@default:false,org.eclipse.swt.motif.linux.x86@default:false,org.eclipse.swt.motif.solaris.sparc@default:false,org.eclipse.swt.photon.qnx.x86@default:false,org.eclipse.swt.win32.win32.x86@default:false,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.text@default:default,org.eclipse.ui.carbon@default:false,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.ui.console@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.net@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.update.configurator@3:true,org.hamcrest.core@default:default,org.jfree.jchart@default:default,org.jfree.jcommon@default:default,org.junit4@default:default,org.junit@default:default,org.lobobrowser.cobra@default:default,org.mortbay.jetty.server@default:default,org.mortbay.jetty.util@default:default,org.mozilla.rhino@default:default,org.objectweb.asm@default:default,org.opcfoundation.ua@default:default,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.simantics.basicexpression@default:default,org.simantics.browsing.ui.common@default:default,org.simantics.browsing.ui.graph.impl@default:default,org.simantics.browsing.ui.graph@default:default,org.simantics.browsing.ui.model@default:default,org.simantics.browsing.ui.platform@default:default,org.simantics.browsing.ui.swt@default:default,org.simantics.browsing.ui@default:default,org.simantics.charts@default:default,org.simantics.datatypes.ontology@default:default,org.simantics.datatypes@default:default,org.simantics.debug.ui@default:default,org.simantics.diagram.connection@default:default,org.simantics.diagram.profile@default:default,org.simantics.diagram@default:default,org.simantics.editors.win32@default:default,org.simantics.event.ontology@default:default,org.simantics.event@default:default,org.simantics.excel@default:default,org.simantics.g2d@default:default,org.simantics.graphviz.ui@default:default,org.simantics.graphviz@default:default,org.simantics.history@default:default,org.simantics.issues.common@default:default,org.simantics.issues.ui@default:default,org.simantics.issues@default:default,org.simantics.mapping@default:default,org.simantics.message.ui@default:default,org.simantics.message@default:default,org.simantics.migration.ui@default:default,org.simantics.modeling.ui@default:default,org.simantics.modeling@default:default,org.simantics.scenegraph.profile@default:default,org.simantics.scenegraph.swing@default:default,org.simantics.scenegraph.ui@default:default,org.simantics.scenegraph@default:default,org.simantics.scl.compiler@default:default,org.simantics.scl.db@default:default,org.simantics.scl.replaying@default:default,org.simantics.scl.ui.editor@default:default,org.simantics.selectionview@default:default,org.simantics.simulation.ui@default:default,org.simantics.simulation@default:default,org.simantics.spreadsheet.common@default:default,org.simantics.spreadsheet.graph@default:default,org.simantics.spreadsheet.ui@default:default,org.simantics.spreadsheet@default:default,org.simantics.structural.flattening@default:default,org.simantics.structural.ui@default:default,org.simantics.structural2@default:default,org.simantics.team.ui@default:default,org.simantics.trend@default:default,org.simantics.ui@default:default,org.simantics.views.swt.client@default:default,org.simantics.views.swt@default:default,org.simantics.views@default:default,org.simantics.wiki.ui@default:default,org.simantics.workbench.ontology@default:default,org.simantics.workbench.search@default:default,xtc.parser.runtime@default:default"/>
+<stringAttribute key="selected_target_plugins" value="com.famfamfam.silk@default:default,com.ibm.icu@default:default,com.lowagie.text@default:default,com.tools.logging@default:default,freemarker@default:default,gnu.trove2@default:default,gnu.trove3@default:default,javax.servlet.jsp@default:default,javax.servlet@default:default,javax.vecmath@default:default,javax.xml@default:default,net.sf.cglib@default:default,org.antlr.runtime@default:default,org.apache.commons.codec@default:default,org.apache.commons.collections4@default:default,org.apache.commons.el@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.io@default:default,org.apache.commons.logging@default:default,org.apache.jasper@default:default,org.apache.log4j@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene3@default:default,org.apache.lucene@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.bouncycastle@default:default,org.cojen@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.aix.ppc@default:false,org.eclipse.core.filesystem.hpux.ia64_32@default:false,org.eclipse.core.filesystem.linux.ppc@default:false,org.eclipse.core.filesystem.linux.x86@default:false,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.core.filesystem.solaris.sparc@default:false,org.eclipse.core.filesystem.win32.x86@default:false,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.linux.x86@default:false,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.net.win32.x86@default:false,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.equinox.launcher.carbon.macosx@default:false,org.eclipse.equinox.launcher.cocoa.macosx.x86_64@default:false,org.eclipse.equinox.launcher.cocoa.macosx@default:false,org.eclipse.equinox.launcher.gtk.aix.ppc64@default:false,org.eclipse.equinox.launcher.gtk.linux.ppc64@default:false,org.eclipse.equinox.launcher.gtk.linux.ppc@default:false,org.eclipse.equinox.launcher.gtk.linux.s390@default:false,org.eclipse.equinox.launcher.gtk.linux.s390x@default:false,org.eclipse.equinox.launcher.gtk.linux.x86@default:false,org.eclipse.equinox.launcher.gtk.linux.x86_64@default:false,org.eclipse.equinox.launcher.gtk.solaris.sparc@default:false,org.eclipse.equinox.launcher.gtk.solaris.x86@default:false,org.eclipse.equinox.launcher.motif.aix.ppc@default:false,org.eclipse.equinox.launcher.motif.hpux.ia64_32@default:false,org.eclipse.equinox.launcher.motif.linux.x86@default:false,org.eclipse.equinox.launcher.motif.solaris.sparc@default:false,org.eclipse.equinox.launcher.win32.win32.x86@default:false,org.eclipse.equinox.launcher.win32.win32.x86_64@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.p2.discovery@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.macosx@default:false,org.eclipse.equinox.security.ui@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.help.appserver@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help.webapp@default:default,org.eclipse.help@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.mylyn.wikitext.core@default:default,org.eclipse.mylyn.wikitext.mediawiki.core@default:default,org.eclipse.nebula.widgets@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.eclipse.pde.runtime@default:default,org.eclipse.rcp@default:default,org.eclipse.swt.carbon.macosx@default:false,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.eclipse.swt.cocoa.macosx@default:false,org.eclipse.swt.gtk.aix.ppc64@default:false,org.eclipse.swt.gtk.linux.ppc64@default:false,org.eclipse.swt.gtk.linux.ppc@default:false,org.eclipse.swt.gtk.linux.s390@default:false,org.eclipse.swt.gtk.linux.s390x@default:false,org.eclipse.swt.gtk.linux.x86@default:false,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.swt.gtk.solaris.sparc@default:false,org.eclipse.swt.gtk.solaris.x86@default:false,org.eclipse.swt.motif.aix.ppc@default:false,org.eclipse.swt.motif.hpux.ia64_32@default:false,org.eclipse.swt.motif.linux.x86@default:false,org.eclipse.swt.motif.solaris.sparc@default:false,org.eclipse.swt.photon.qnx.x86@default:false,org.eclipse.swt.win32.win32.x86@default:false,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.text@default:default,org.eclipse.ui.carbon@default:false,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.ui.console@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.net@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.update.configurator@3:true,org.hamcrest.core@default:default,org.jfree.jchart@default:default,org.jfree.jcommon@default:default,org.junit4@default:default,org.junit@default:default,org.lobobrowser.cobra@default:default,org.mortbay.jetty.server@default:default,org.mortbay.jetty.util@default:default,org.mozilla.rhino@default:default,org.objectweb.asm@default:default,org.opcfoundation.ua@default:default,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.simantics.basicexpression@default:default,org.simantics.browsing.ui.common@default:default,org.simantics.browsing.ui.graph.impl@default:default,org.simantics.browsing.ui.graph@default:default,org.simantics.browsing.ui.model@default:default,org.simantics.browsing.ui.platform@default:default,org.simantics.browsing.ui.swt@default:default,org.simantics.browsing.ui@default:default,org.simantics.charts@default:default,org.simantics.datatypes.ontology@default:default,org.simantics.datatypes@default:default,org.simantics.debug.ui@default:default,org.simantics.diagram.connection@default:default,org.simantics.diagram.profile@default:default,org.simantics.diagram@default:default,org.simantics.editors.win32@default:default,org.simantics.event.ontology@default:default,org.simantics.event@default:default,org.simantics.excel@default:default,org.simantics.g2d@default:default,org.simantics.graphviz.ui@default:default,org.simantics.graphviz@default:default,org.simantics.history@default:default,org.simantics.issues.common@default:default,org.simantics.issues.ui@default:default,org.simantics.issues@default:default,org.simantics.mapping@default:default,org.simantics.message.ui@default:default,org.simantics.message@default:default,org.simantics.migration.ui@default:default,org.simantics.modeling.ui@default:default,org.simantics.modeling@default:default,org.simantics.scenegraph.profile@default:default,org.simantics.scenegraph.swing@default:default,org.simantics.scenegraph.ui@default:default,org.simantics.scenegraph@default:default,org.simantics.scl.compiler@default:default,org.simantics.scl.db@default:default,org.simantics.scl.replaying@default:default,org.simantics.scl.ui.editor@default:default,org.simantics.selectionview@default:default,org.simantics.simulation.ui@default:default,org.simantics.simulation@default:default,org.simantics.spreadsheet.common@default:default,org.simantics.spreadsheet.graph@default:default,org.simantics.spreadsheet.ui@default:default,org.simantics.spreadsheet@default:default,org.simantics.structural.flattening@default:default,org.simantics.structural.ui@default:default,org.simantics.structural2@default:default,org.simantics.team.ui@default:default,org.simantics.trend@default:default,org.simantics.ui@default:default,org.simantics.views.swt.client@default:default,org.simantics.views.swt@default:default,org.simantics.views@default:default,org.simantics.wiki.ui@default:default,org.simantics.workbench.ontology@default:default,org.simantics.workbench.search@default:default,xtc.parser.runtime@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="org.simantics.action.ontology@default:default,org.simantics.application@default:default,org.simantics.browsing.ui.ontology@default:default,org.simantics.color.ontology@default:default,org.simantics.common@default:default,org.simantics.databoard@default:default,org.simantics.db.build@default:default,org.simantics.db.common@default:default,org.simantics.db.impl@default:default,org.simantics.db.indexing@default:default,org.simantics.db.layer0@default:default,org.simantics.db.management@default:default,org.simantics.db.procore.protocol@default:default,org.simantics.db.procore.server.environment@default:default,org.simantics.db.procore@default:default,org.simantics.db.services@default:default,org.simantics.db.undocore.linux.x86@default:false,org.simantics.db.undocore.linux.x86_64@default:false,org.simantics.db.undocore.win32.x86@default:false,org.simantics.db.undocore@default:default,org.simantics.db@default:default,org.simantics.diagram.ontology@default:default,org.simantics.document.ontology@default:default,org.simantics.dublincore.ontology@default:default,org.simantics.editors@default:default,org.simantics.fastlz@default:default,org.simantics.g2d.ontology@default:default,org.simantics.graph.db@default:default,org.simantics.graph@default:default,org.simantics.image.ontology@default:default,org.simantics.image2.ontology@default:default,org.simantics.issues.ontology@default:default,org.simantics.layer0.utils@default:default,org.simantics.layer0@default:default,org.simantics.layer0x.ontology@default:default,org.simantics.modeling.ontology@default:default,org.simantics.project.ontology@default:default,org.simantics.project@default:default,org.simantics.scl.reflection@default:default,org.simantics.scl.runtime@default:default,org.simantics.scl.types@default:default,org.simantics.selectionview.ontology@default:default,org.simantics.simulation.ontology@default:default,org.simantics.softwareconfiguration.ontology@default:default,org.simantics.spreadsheet.ontology@default:default,org.simantics.structural.ontology@default:default,org.simantics.user.ontology@default:default,org.simantics.utils.datastructures@default:default,org.simantics.utils.thread.swt@default:default,org.simantics.utils.thread@default:default,org.simantics.utils.ui.workbench@default:default,org.simantics.utils.ui@default:default,org.simantics.utils@default:default,org.simantics.viewpoint.ontology@default:default,org.simantics.views.ontology@default:default,org.simantics.webmon.ontology@default:default,org.simantics.workbench@default:default,org.simantics@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<setAttribute key="selected_features">
<setEntry value="org.simantics.db.tests.feature:default"/>
</setAttribute>
-<stringAttribute key="selected_target_plugins" value="com.famfamfam.silk@default:default,com.ibm.icu@default:default,com.lowagie.text@default:default,com.tools.logging@default:default,freemarker@default:default,gnu.trove2@default:default,gnu.trove3@default:default,javax.servlet.jsp@default:default,javax.servlet@default:default,javax.vecmath@default:default,javax.xml@default:default,net.sf.cglib@default:default,org.antlr.runtime@default:default,org.apache.commons.codec@default:default,org.apache.commons.collections@default:default,org.apache.commons.el@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.io@default:default,org.apache.commons.logging@default:default,org.apache.jasper@default:default,org.apache.log4j@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene3@default:default,org.apache.lucene@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.bouncycastle@default:default,org.cojen@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.aix.ppc@default:false,org.eclipse.core.filesystem.hpux.ia64_32@default:false,org.eclipse.core.filesystem.linux.ppc@default:false,org.eclipse.core.filesystem.linux.x86@default:false,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.core.filesystem.solaris.sparc@default:false,org.eclipse.core.filesystem.win32.x86@default:false,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.linux.x86@default:false,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.net.win32.x86@default:false,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.equinox.launcher.carbon.macosx@default:false,org.eclipse.equinox.launcher.cocoa.macosx.x86_64@default:false,org.eclipse.equinox.launcher.cocoa.macosx@default:false,org.eclipse.equinox.launcher.gtk.aix.ppc64@default:false,org.eclipse.equinox.launcher.gtk.linux.ppc64@default:false,org.eclipse.equinox.launcher.gtk.linux.ppc@default:false,org.eclipse.equinox.launcher.gtk.linux.s390@default:false,org.eclipse.equinox.launcher.gtk.linux.s390x@default:false,org.eclipse.equinox.launcher.gtk.linux.x86@default:false,org.eclipse.equinox.launcher.gtk.linux.x86_64@default:false,org.eclipse.equinox.launcher.gtk.solaris.sparc@default:false,org.eclipse.equinox.launcher.gtk.solaris.x86@default:false,org.eclipse.equinox.launcher.motif.aix.ppc@default:false,org.eclipse.equinox.launcher.motif.hpux.ia64_32@default:false,org.eclipse.equinox.launcher.motif.linux.x86@default:false,org.eclipse.equinox.launcher.motif.solaris.sparc@default:false,org.eclipse.equinox.launcher.win32.win32.x86@default:false,org.eclipse.equinox.launcher.win32.win32.x86_64@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.p2.discovery@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.macosx@default:false,org.eclipse.equinox.security.ui@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.help.appserver@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help.webapp@default:default,org.eclipse.help@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.mylyn.wikitext.core@default:default,org.eclipse.mylyn.wikitext.mediawiki.core@default:default,org.eclipse.nebula.widgets@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.eclipse.pde.runtime@default:default,org.eclipse.rcp@default:default,org.eclipse.swt.carbon.macosx@default:false,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.eclipse.swt.cocoa.macosx@default:false,org.eclipse.swt.gtk.aix.ppc64@default:false,org.eclipse.swt.gtk.linux.ppc64@default:false,org.eclipse.swt.gtk.linux.ppc@default:false,org.eclipse.swt.gtk.linux.s390@default:false,org.eclipse.swt.gtk.linux.s390x@default:false,org.eclipse.swt.gtk.linux.x86@default:false,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.swt.gtk.solaris.sparc@default:false,org.eclipse.swt.gtk.solaris.x86@default:false,org.eclipse.swt.motif.aix.ppc@default:false,org.eclipse.swt.motif.hpux.ia64_32@default:false,org.eclipse.swt.motif.linux.x86@default:false,org.eclipse.swt.motif.solaris.sparc@default:false,org.eclipse.swt.photon.qnx.x86@default:false,org.eclipse.swt.win32.win32.x86@default:false,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.text@default:default,org.eclipse.ui.carbon@default:false,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.ui.console@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.net@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.update.configurator@3:true,org.hamcrest.core@default:default,org.jfree.jchart@default:default,org.jfree.jcommon@default:default,org.junit4@default:default,org.junit@default:default,org.lobobrowser.cobra@default:default,org.mortbay.jetty.server@default:default,org.mortbay.jetty.util@default:default,org.mozilla.rhino@default:default,org.objectweb.asm@default:default,org.opcfoundation.ua@default:default,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.simantics.basicexpression@default:default,org.simantics.browsing.ui.common@default:default,org.simantics.browsing.ui.graph.impl@default:default,org.simantics.browsing.ui.graph@default:default,org.simantics.browsing.ui.model@default:default,org.simantics.browsing.ui.platform@default:default,org.simantics.browsing.ui.swt@default:default,org.simantics.browsing.ui@default:default,org.simantics.charts@default:default,org.simantics.datatypes.ontology@default:default,org.simantics.datatypes@default:default,org.simantics.debug.ui@default:default,org.simantics.diagram.connection@default:default,org.simantics.diagram.profile@default:default,org.simantics.diagram@default:default,org.simantics.editors.win32@default:default,org.simantics.event.ontology@default:default,org.simantics.event@default:default,org.simantics.excel@default:default,org.simantics.g2d@default:default,org.simantics.graphviz.ui@default:default,org.simantics.graphviz@default:default,org.simantics.history@default:default,org.simantics.issues.common@default:default,org.simantics.issues.ui@default:default,org.simantics.issues@default:default,org.simantics.mapping@default:default,org.simantics.message.ui@default:default,org.simantics.message@default:default,org.simantics.migration.ui@default:default,org.simantics.modeling.ui@default:default,org.simantics.modeling@default:default,org.simantics.scenegraph.profile@default:default,org.simantics.scenegraph.swing@default:default,org.simantics.scenegraph.ui@default:default,org.simantics.scenegraph@default:default,org.simantics.scl.compiler@default:default,org.simantics.scl.db@default:default,org.simantics.scl.replaying@default:default,org.simantics.scl.ui.editor@default:default,org.simantics.selectionview@default:default,org.simantics.simulation.ui@default:default,org.simantics.simulation@default:default,org.simantics.spreadsheet.common@default:default,org.simantics.spreadsheet.graph@default:default,org.simantics.spreadsheet.ui@default:default,org.simantics.spreadsheet@default:default,org.simantics.structural.flattening@default:default,org.simantics.structural.ui@default:default,org.simantics.structural2@default:default,org.simantics.team.ui@default:default,org.simantics.trend@default:default,org.simantics.ui@default:default,org.simantics.views.swt.client@default:default,org.simantics.views.swt@default:default,org.simantics.views@default:default,org.simantics.wiki.ui@default:default,org.simantics.workbench.ontology@default:default,org.simantics.workbench.search@default:default,xtc.parser.runtime@default:default"/>
+<stringAttribute key="selected_target_plugins" value="com.famfamfam.silk@default:default,com.ibm.icu@default:default,com.lowagie.text@default:default,com.tools.logging@default:default,freemarker@default:default,gnu.trove2@default:default,gnu.trove3@default:default,javax.servlet.jsp@default:default,javax.servlet@default:default,javax.vecmath@default:default,javax.xml@default:default,net.sf.cglib@default:default,org.antlr.runtime@default:default,org.apache.commons.codec@default:default,org.apache.commons.collections4@default:default,org.apache.commons.el@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.io@default:default,org.apache.commons.logging@default:default,org.apache.jasper@default:default,org.apache.log4j@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene3@default:default,org.apache.lucene@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.bouncycastle@default:default,org.cojen@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.aix.ppc@default:false,org.eclipse.core.filesystem.hpux.ia64_32@default:false,org.eclipse.core.filesystem.linux.ppc@default:false,org.eclipse.core.filesystem.linux.x86@default:false,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.core.filesystem.solaris.sparc@default:false,org.eclipse.core.filesystem.win32.x86@default:false,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.linux.x86@default:false,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.net.win32.x86@default:false,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.equinox.launcher.carbon.macosx@default:false,org.eclipse.equinox.launcher.cocoa.macosx.x86_64@default:false,org.eclipse.equinox.launcher.cocoa.macosx@default:false,org.eclipse.equinox.launcher.gtk.aix.ppc64@default:false,org.eclipse.equinox.launcher.gtk.linux.ppc64@default:false,org.eclipse.equinox.launcher.gtk.linux.ppc@default:false,org.eclipse.equinox.launcher.gtk.linux.s390@default:false,org.eclipse.equinox.launcher.gtk.linux.s390x@default:false,org.eclipse.equinox.launcher.gtk.linux.x86@default:false,org.eclipse.equinox.launcher.gtk.linux.x86_64@default:false,org.eclipse.equinox.launcher.gtk.solaris.sparc@default:false,org.eclipse.equinox.launcher.gtk.solaris.x86@default:false,org.eclipse.equinox.launcher.motif.aix.ppc@default:false,org.eclipse.equinox.launcher.motif.hpux.ia64_32@default:false,org.eclipse.equinox.launcher.motif.linux.x86@default:false,org.eclipse.equinox.launcher.motif.solaris.sparc@default:false,org.eclipse.equinox.launcher.win32.win32.x86@default:false,org.eclipse.equinox.launcher.win32.win32.x86_64@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.p2.discovery@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.macosx@default:false,org.eclipse.equinox.security.ui@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.help.appserver@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help.webapp@default:default,org.eclipse.help@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.mylyn.wikitext.core@default:default,org.eclipse.mylyn.wikitext.mediawiki.core@default:default,org.eclipse.nebula.widgets@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.eclipse.pde.runtime@default:default,org.eclipse.rcp@default:default,org.eclipse.swt.carbon.macosx@default:false,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.eclipse.swt.cocoa.macosx@default:false,org.eclipse.swt.gtk.aix.ppc64@default:false,org.eclipse.swt.gtk.linux.ppc64@default:false,org.eclipse.swt.gtk.linux.ppc@default:false,org.eclipse.swt.gtk.linux.s390@default:false,org.eclipse.swt.gtk.linux.s390x@default:false,org.eclipse.swt.gtk.linux.x86@default:false,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.swt.gtk.solaris.sparc@default:false,org.eclipse.swt.gtk.solaris.x86@default:false,org.eclipse.swt.motif.aix.ppc@default:false,org.eclipse.swt.motif.hpux.ia64_32@default:false,org.eclipse.swt.motif.linux.x86@default:false,org.eclipse.swt.motif.solaris.sparc@default:false,org.eclipse.swt.photon.qnx.x86@default:false,org.eclipse.swt.win32.win32.x86@default:false,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.text@default:default,org.eclipse.ui.carbon@default:false,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.ui.console@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.net@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.update.configurator@3:true,org.hamcrest.core@default:default,org.jfree.jchart@default:default,org.jfree.jcommon@default:default,org.junit4@default:default,org.junit@default:default,org.lobobrowser.cobra@default:default,org.mortbay.jetty.server@default:default,org.mortbay.jetty.util@default:default,org.mozilla.rhino@default:default,org.objectweb.asm@default:default,org.opcfoundation.ua@default:default,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.simantics.basicexpression@default:default,org.simantics.browsing.ui.common@default:default,org.simantics.browsing.ui.graph.impl@default:default,org.simantics.browsing.ui.graph@default:default,org.simantics.browsing.ui.model@default:default,org.simantics.browsing.ui.platform@default:default,org.simantics.browsing.ui.swt@default:default,org.simantics.browsing.ui@default:default,org.simantics.charts@default:default,org.simantics.datatypes.ontology@default:default,org.simantics.datatypes@default:default,org.simantics.debug.ui@default:default,org.simantics.diagram.connection@default:default,org.simantics.diagram.profile@default:default,org.simantics.diagram@default:default,org.simantics.editors.win32@default:default,org.simantics.event.ontology@default:default,org.simantics.event@default:default,org.simantics.excel@default:default,org.simantics.g2d@default:default,org.simantics.graphviz.ui@default:default,org.simantics.graphviz@default:default,org.simantics.history@default:default,org.simantics.issues.common@default:default,org.simantics.issues.ui@default:default,org.simantics.issues@default:default,org.simantics.mapping@default:default,org.simantics.message.ui@default:default,org.simantics.message@default:default,org.simantics.migration.ui@default:default,org.simantics.modeling.ui@default:default,org.simantics.modeling@default:default,org.simantics.scenegraph.profile@default:default,org.simantics.scenegraph.swing@default:default,org.simantics.scenegraph.ui@default:default,org.simantics.scenegraph@default:default,org.simantics.scl.compiler@default:default,org.simantics.scl.db@default:default,org.simantics.scl.replaying@default:default,org.simantics.scl.ui.editor@default:default,org.simantics.selectionview@default:default,org.simantics.simulation.ui@default:default,org.simantics.simulation@default:default,org.simantics.spreadsheet.common@default:default,org.simantics.spreadsheet.graph@default:default,org.simantics.spreadsheet.ui@default:default,org.simantics.spreadsheet@default:default,org.simantics.structural.flattening@default:default,org.simantics.structural.ui@default:default,org.simantics.structural2@default:default,org.simantics.team.ui@default:default,org.simantics.trend@default:default,org.simantics.ui@default:default,org.simantics.views.swt.client@default:default,org.simantics.views.swt@default:default,org.simantics.views@default:default,org.simantics.wiki.ui@default:default,org.simantics.workbench.ontology@default:default,org.simantics.workbench.search@default:default,xtc.parser.runtime@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="org.simantics.action.ontology@default:default,org.simantics.application@default:default,org.simantics.browsing.ui.ontology@default:default,org.simantics.color.ontology@default:default,org.simantics.common@default:default,org.simantics.databoard@default:default,org.simantics.db.build@default:default,org.simantics.db.common@default:default,org.simantics.db.impl@default:default,org.simantics.db.indexing@default:default,org.simantics.db.layer0@default:default,org.simantics.db.management@default:default,org.simantics.db.procore.protocol@default:default,org.simantics.db.procore.server.environment@default:default,org.simantics.db.procore@default:default,org.simantics.db.services@default:default,org.simantics.db.undocore.linux.x86@default:false,org.simantics.db.undocore.linux.x86_64@default:false,org.simantics.db.undocore.win32.x86@default:false,org.simantics.db.undocore@default:default,org.simantics.db@default:default,org.simantics.diagram.ontology@default:default,org.simantics.document.ontology@default:default,org.simantics.dublincore.ontology@default:default,org.simantics.editors@default:default,org.simantics.fastlz@default:default,org.simantics.g2d.ontology@default:default,org.simantics.graph.db@default:default,org.simantics.graph@default:default,org.simantics.image.ontology@default:default,org.simantics.image2.ontology@default:default,org.simantics.issues.ontology@default:default,org.simantics.layer0.utils@default:default,org.simantics.layer0@default:default,org.simantics.layer0x.ontology@default:default,org.simantics.modeling.ontology@default:default,org.simantics.project.ontology@default:default,org.simantics.project@default:default,org.simantics.scl.reflection@default:default,org.simantics.scl.runtime@default:default,org.simantics.scl.types@default:default,org.simantics.selectionview.ontology@default:default,org.simantics.simulation.ontology@default:default,org.simantics.softwareconfiguration.ontology@default:default,org.simantics.spreadsheet.ontology@default:default,org.simantics.structural.ontology@default:default,org.simantics.user.ontology@default:default,org.simantics.utils.datastructures@default:default,org.simantics.utils.thread.swt@default:default,org.simantics.utils.thread@default:default,org.simantics.utils.ui.workbench@default:default,org.simantics.utils.ui@default:default,org.simantics.utils@default:default,org.simantics.viewpoint.ontology@default:default,org.simantics.views.ontology@default:default,org.simantics.webmon.ontology@default:default,org.simantics.workbench@default:default,org.simantics@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Tests
Bundle-SymbolicName: org.simantics.scl.compiler.tests
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.junit;bundle-version="4.12.0",
org.simantics.scl.compiler;bundle-version="0.5.0",
gnu.trove3,
org.objectweb.asm.util,
ch.qos.logback.classic;bundle-version="1.1.7",
ch.qos.logback.core;bundle-version="1.1.7",
- org.apache.commons.collections;bundle-version="3.2.2",
org.eclipse.equinox.ds;bundle-version="1.4.300",
org.slf4j.api
Automatic-Module-Name: org.simantics.scl.compiler.tests
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
Bundle-Name: Tests
Bundle-SymbolicName: org.simantics.scl.osgi.tests
Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.junit;bundle-version="4.12.0",
org.simantics.scl.compiler;bundle-version="0.5.0",
org.simantics.scl.osgi;bundle-version="1.0.4",
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con"
- path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8" />
+ path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11" />
<classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins" />
<classpathentry kind="src" path="src" />
Bundle-SymbolicName: org.simantics.tests.integration
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Semantum Oy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.eclipse.osgi,
org.junit,
org.simantics.tests.modelled,