]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Fixed multiple issues causing dangling references to discarded queries 19/4419/4 master
authorJussi Koskela <jussi.koskela@semantum.fi>
Wed, 2 Sep 2020 09:17:31 +0000 (12:17 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 8 Oct 2020 07:56:28 +0000 (07:56 +0000)
gitlab #594

Change-Id: Iaa6b12f60d7dfa2bbcbc9614ef837973885586cc

946 files changed:
.gitignore
.mvn/extensions.xml
README.md
bundles/hdf.hdf5lib/.classpath
bundles/hdf.hdf5lib/.settings/org.eclipse.jdt.core.prefs
bundles/hdf.hdf5lib/META-INF/MANIFEST.MF
bundles/org.simantics.acorn/.classpath
bundles/org.simantics.acorn/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.acorn/META-INF/MANIFEST.MF
bundles/org.simantics.acorn/src/org/simantics/acorn/MainProgram.java
bundles/org.simantics.action.ontology/.classpath
bundles/org.simantics.action.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.action.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.annotation.ontology/.classpath
bundles/org.simantics.annotation.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.annotation.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.annotation.ui/.classpath
bundles/org.simantics.annotation.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.annotation.ui/META-INF/MANIFEST.MF
bundles/org.simantics.application/.classpath
bundles/org.simantics.application/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.application/META-INF/MANIFEST.MF
bundles/org.simantics.auditlogging/.classpath
bundles/org.simantics.auditlogging/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.auditlogging/META-INF/MANIFEST.MF
bundles/org.simantics.backup.db/.classpath
bundles/org.simantics.backup.db/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.backup.db/META-INF/MANIFEST.MF
bundles/org.simantics.backup.ontology/.classpath
bundles/org.simantics.backup.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.backup.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.backup/.classpath
bundles/org.simantics.backup/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.backup/META-INF/MANIFEST.MF
bundles/org.simantics.basicexpression/.classpath
bundles/org.simantics.basicexpression/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.basicexpression/META-INF/MANIFEST.MF
bundles/org.simantics.browsing.ui.common/.classpath
bundles/org.simantics.browsing.ui.common/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.browsing.ui.common/META-INF/MANIFEST.MF
bundles/org.simantics.browsing.ui.graph.impl/.classpath
bundles/org.simantics.browsing.ui.graph.impl/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.browsing.ui.graph.impl/META-INF/MANIFEST.MF
bundles/org.simantics.browsing.ui.graph/.classpath
bundles/org.simantics.browsing.ui.graph/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.browsing.ui.graph/META-INF/MANIFEST.MF
bundles/org.simantics.browsing.ui.model/.classpath
bundles/org.simantics.browsing.ui.model/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.browsing.ui.model/META-INF/MANIFEST.MF
bundles/org.simantics.browsing.ui.model/src/org/simantics/browsing/ui/model/browsecontexts/BrowseContext.java
bundles/org.simantics.browsing.ui.model/src/org/simantics/browsing/ui/model/children/ChildContribution.java
bundles/org.simantics.browsing.ui.nattable/.classpath
bundles/org.simantics.browsing.ui.nattable/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.browsing.ui.nattable/META-INF/MANIFEST.MF
bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/GENatTableThemeConfiguration.java
bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/GEStyler.java
bundles/org.simantics.browsing.ui.ontology/.classpath
bundles/org.simantics.browsing.ui.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.browsing.ui.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.browsing.ui.platform/.classpath
bundles/org.simantics.browsing.ui.platform/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.browsing.ui.platform/META-INF/MANIFEST.MF
bundles/org.simantics.browsing.ui.swt/.classpath
bundles/org.simantics.browsing.ui.swt/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.browsing.ui.swt/META-INF/MANIFEST.MF
bundles/org.simantics.browsing.ui/.classpath
bundles/org.simantics.browsing.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.browsing.ui/META-INF/MANIFEST.MF
bundles/org.simantics.charts.ontology/.classpath
bundles/org.simantics.charts.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.charts.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.charts/.classpath
bundles/org.simantics.charts/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.charts/META-INF/MANIFEST.MF
bundles/org.simantics.charts/fragment.e4xmi
bundles/org.simantics.charts/src/org/simantics/charts/editor/ChartCopyHandler.java
bundles/org.simantics.charts/src/org/simantics/charts/editor/ChartPreferencesAction.java [new file with mode: 0644]
bundles/org.simantics.charts/src/org/simantics/charts/editor/Messages.java [new file with mode: 0644]
bundles/org.simantics.charts/src/org/simantics/charts/editor/TimeSeriesEditor.java
bundles/org.simantics.charts/src/org/simantics/charts/editor/messages.properties [new file with mode: 0644]
bundles/org.simantics.charts/src/org/simantics/charts/export/ExportChartCSV.java
bundles/org.simantics.charts/src/org/simantics/charts/query/ChartAndSubscriptionItemData.java
bundles/org.simantics.color.ontology/.classpath
bundles/org.simantics.color.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.color.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.common/.classpath
bundles/org.simantics.common/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.common/META-INF/MANIFEST.MF
bundles/org.simantics.compressions/.classpath
bundles/org.simantics.compressions/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.compressions/META-INF/MANIFEST.MF
bundles/org.simantics.databoard/.classpath
bundles/org.simantics.databoard/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.databoard/META-INF/MANIFEST.MF
bundles/org.simantics.databoard/src/org/simantics/databoard/adapter/AdapterFactory.java
bundles/org.simantics.datatypes.ontology/.classpath
bundles/org.simantics.datatypes.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.datatypes.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.datatypes/.classpath
bundles/org.simantics.datatypes/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.datatypes/META-INF/MANIFEST.MF
bundles/org.simantics.db.common/.classpath
bundles/org.simantics.db.common/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.db.common/META-INF/MANIFEST.MF
bundles/org.simantics.db.common/src/org/simantics/db/common/UndoMetadata.java
bundles/org.simantics.db.common/src/org/simantics/db/common/processor/MergingGraphRequestProcessor.java
bundles/org.simantics.db.common/src/org/simantics/db/common/processor/ProcessorBase.java
bundles/org.simantics.db.common/src/org/simantics/db/common/request/AdaptValue.java
bundles/org.simantics.db.common/src/org/simantics/db/common/request/TransientResourceRead.java
bundles/org.simantics.db.common/src/org/simantics/db/common/utils/ErrorLogger.java [deleted file]
bundles/org.simantics.db.common/src/org/simantics/db/common/utils/LogManager.java [deleted file]
bundles/org.simantics.db.common/src/org/simantics/db/common/utils/OrderedSetUtils.java
bundles/org.simantics.db.impl/.classpath
bundles/org.simantics.db.impl/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.db.impl/META-INF/MANIFEST.MF
bundles/org.simantics.db.impl/src/org/simantics/db/impl/BlockingAsyncProcedure.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/graph/ArraySet.java [deleted file]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/graph/AsyncBarrierImpl.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/graph/ReadGraphImpl.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/graph/WriteGraphImpl.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/AssertedPredicates.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/AssertedPredicatesFactory.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/AssertedStatementsFactory.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/AsyncMultiReadEntry.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/AsyncReadEntry.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/BinaryQuery.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/CacheEntry.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/CacheEntryBase.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/ChildMap.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/ChildMapFactory.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/CollectionBinaryQuery.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/CollectionUnaryQuery.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/DirectObjectsFactory.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/DirectPredicates.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/DirectPredicatesFactory.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/ExternalReadEntry.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/IntArray.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/IntSet.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/Objects.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/ObjectsFactory.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/OrderedSetFactory.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/Predicates.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/PredicatesFactory.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/PrincipalTypesFactory.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryCacheBase.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryCollectorImpl.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryDeserializer.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryFactory.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryFactoryBase.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryIdentityHash.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryIdentityHashSet.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryListening.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryProcessor.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QuerySerializer.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QuerySupport.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/ReadEntry.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/RelationInfoQuery.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/RelationInfoQueryFactory.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/Scheduler.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/Statements.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/StatementsFactory.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/SuperRelations.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/SuperRelationsFactory.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/SuperTypes.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/SuperTypesFactory.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/TaskList.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/TypeHierarchy.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/TypeHierarchyFactory.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/Types.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/TypesFactory.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/URIToResource.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/URIToResourceFactory.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/UnaryQuery.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/UnaryQueryPIntSet.java [new file with mode: 0644]
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/ValueQuery.java
bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/ValueQueryFactory.java [new file with mode: 0644]
bundles/org.simantics.db.indexing/.classpath
bundles/org.simantics.db.indexing/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.db.indexing/META-INF/MANIFEST.MF
bundles/org.simantics.db.layer0/.classpath
bundles/org.simantics.db.layer0/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.db.layer0/META-INF/MANIFEST.MF
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/adapter/ContextualRelatedValue.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/function/All.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/genericrelation/Dependencies.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/genericrelation/DependencyResources.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/scl/AbstractExpressionCompilationRequest.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/HierarchyMultiMap.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/Layer0Utils.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/SessionGarbageCollection.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/NoPredicateResourceException.java [new file with mode: 0644]
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/NodeStructureRequest.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/NodeValueRequest.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/StandardGraphPropertyVariable.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/Variables.java
bundles/org.simantics.db.management/.classpath
bundles/org.simantics.db.management/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.db.management/META-INF/MANIFEST.MF
bundles/org.simantics.db.procore/.classpath
bundles/org.simantics.db.procore/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.db.procore/META-INF/MANIFEST.MF
bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterTable.java
bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/DebugSupportImpl.java
bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ObjectResourceMap.java
bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/QueryControlImpl.java
bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/QuerySupportImpl.java
bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/SessionImplDb.java
bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/SessionImplSocket.java
bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/SessionImplVirtual.java
bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/State.java
bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/WriteSupportImpl.java
bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/XSupportImpl.java
bundles/org.simantics.db.server/.classpath
bundles/org.simantics.db.server/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.db.server/META-INF/MANIFEST.MF
bundles/org.simantics.db.services/.classpath
bundles/org.simantics.db.services/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.db.services/META-INF/MANIFEST.MF
bundles/org.simantics.db.services/src/org/simantics/db/services/adaption/AdapterRegistry2.java
bundles/org.simantics.db.services/src/org/simantics/db/services/adaption/reflection/GraphObject2.java
bundles/org.simantics.db.services/src/org/simantics/db/services/adaption/reflection/ThisResource2.java
bundles/org.simantics.db.testing/.classpath
bundles/org.simantics.db.testing/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.db.testing/META-INF/MANIFEST.MF
bundles/org.simantics.db/.classpath
bundles/org.simantics.db/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.db/META-INF/MANIFEST.MF
bundles/org.simantics.db/src/org/simantics/db/RelationInfo.java
bundles/org.simantics.db/src/org/simantics/db/RequestProcessor.java
bundles/org.simantics.db/src/org/simantics/db/ResourceLocator.java [new file with mode: 0644]
bundles/org.simantics.db/src/org/simantics/db/service/QueryControl.java
bundles/org.simantics.db/src/org/simantics/db/service/XSupport.java
bundles/org.simantics.debug.browser.ui/.classpath
bundles/org.simantics.debug.browser.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.debug.browser.ui/META-INF/MANIFEST.MF
bundles/org.simantics.debug.browser/.classpath
bundles/org.simantics.debug.browser/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.debug.browser/META-INF/MANIFEST.MF
bundles/org.simantics.debug.graphical/.classpath
bundles/org.simantics.debug.graphical/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.debug.graphical/META-INF/MANIFEST.MF
bundles/org.simantics.debug.graphical/scl/Simantics/GraphicalDebugger.scl
bundles/org.simantics.debug.graphical/src/org/simantics/debug/graphical/DebuggerCanvasProxy.java [new file with mode: 0644]
bundles/org.simantics.debug.graphical/src/org/simantics/debug/graphical/GraphicalDebugger.java
bundles/org.simantics.debug.ui/.classpath
bundles/org.simantics.debug.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.debug.ui/META-INF/MANIFEST.MF
bundles/org.simantics.desktop.product/.classpath
bundles/org.simantics.desktop.product/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.desktop.product/META-INF/MANIFEST.MF
bundles/org.simantics.desktop.product/splash.svg
bundles/org.simantics.desktop.ui.ontology/.classpath
bundles/org.simantics.desktop.ui.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.desktop.ui.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.desktop.ui/.classpath
bundles/org.simantics.desktop.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.desktop.ui/META-INF/MANIFEST.MF
bundles/org.simantics.diagram.connection/.classpath
bundles/org.simantics.diagram.connection/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.diagram.connection/META-INF/MANIFEST.MF
bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/RouteGraph.java
bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/RouteLine.java
bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/RouteTerminal.java
bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/SimpleConnectionUtility.java
bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/AggregateConnectionStyle.java [new file with mode: 0644]
bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/BasicConnectionStyle.java
bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/ConnectionCrossings.java [new file with mode: 0644]
bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/ConnectionRenderingHints.java [new file with mode: 0644]
bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/PathModifier.java [new file with mode: 0644]
bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/StyledRouteGraphRenderer.java
bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/segments/Segment.java
bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/splitting/SplittedRouteGraph.java
bundles/org.simantics.diagram.ontology/.classpath
bundles/org.simantics.diagram.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.diagram.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.diagram.ontology/graph/Diagram.pgraph
bundles/org.simantics.diagram.profile/.classpath
bundles/org.simantics.diagram.profile/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.diagram.profile/META-INF/MANIFEST.MF
bundles/org.simantics.diagram.profile/src/org/simantics/diagram/profile/view/ActiveRuntimeDiagramInputSource.java
bundles/org.simantics.diagram.profile/src/org/simantics/diagram/profile/view/CreateGroupAction.java
bundles/org.simantics.diagram.profile/src/org/simantics/diagram/profile/view/CreateProfileAction.java
bundles/org.simantics.diagram.profile/src/org/simantics/diagram/profile/view/CreateStyleAction.java
bundles/org.simantics.diagram.svg/.classpath
bundles/org.simantics.diagram.svg/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.diagram.svg/META-INF/MANIFEST.MF
bundles/org.simantics.diagram/.classpath
bundles/org.simantics.diagram/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.diagram/META-INF/MANIFEST.MF
bundles/org.simantics.diagram/plugin.xml
bundles/org.simantics.diagram/src/org/simantics/diagram/LogManager.java [deleted file]
bundles/org.simantics.diagram/src/org/simantics/diagram/Logger.java [deleted file]
bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/GroupStyleProfileEntry.java
bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphConnectionClassFactory.java
bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/RouteGraphUtils.java
bundles/org.simantics.diagram/src/org/simantics/diagram/connection/ConnectionVisuals.java
bundles/org.simantics.diagram/src/org/simantics/diagram/elements/TextNode.java
bundles/org.simantics.diagram/src/org/simantics/diagram/export/ExportDiagramPdf.java
bundles/org.simantics.diagram/src/org/simantics/diagram/flag/FlagUtil.java
bundles/org.simantics.diagram/src/org/simantics/diagram/flag/RouteGraphConnectionSplitter.java
bundles/org.simantics.diagram/src/org/simantics/diagram/function/All.java
bundles/org.simantics.diagram/src/org/simantics/diagram/handler/CopyPasteHandler.java
bundles/org.simantics.diagram/src/org/simantics/diagram/handler/MouseScaleMode.java
bundles/org.simantics.diagram/src/org/simantics/diagram/handler/e4/CopyPasteHandler.java
bundles/org.simantics.diagram/src/org/simantics/diagram/participant/ConnectionCrossingsParticipant.java [new file with mode: 0644]
bundles/org.simantics.diagram/src/org/simantics/diagram/participant/CopyAsSVGParticipant.java [new file with mode: 0644]
bundles/org.simantics.diagram/src/org/simantics/diagram/participant/PopulateSelectionDropParticipant.java
bundles/org.simantics.diagram/src/org/simantics/diagram/participant/SVGTransfer.java [new file with mode: 0644]
bundles/org.simantics.diagram/src/org/simantics/diagram/profile/IconButtonStyleBase.java
bundles/org.simantics.diagram/src/org/simantics/diagram/profile/Updater.java
bundles/org.simantics.diagram/src/org/simantics/diagram/query/ConnectionVisualsRequest.java
bundles/org.simantics.diagram/src/org/simantics/diagram/runtime/RuntimeVariable.java
bundles/org.simantics.diagram/src/org/simantics/diagram/symbolcontribution/GroupProxySymbolItem.java
bundles/org.simantics.diagram/src/org/simantics/diagram/symbollibrary/ui/SymbolLibraryComposite.java
bundles/org.simantics.diagram/src/org/simantics/diagram/synchronization/graph/CopyAdvisorUtil.java
bundles/org.simantics.diagram/src/org/simantics/diagram/synchronization/graph/ElementReorder.java
bundles/org.simantics.diagram/src/org/simantics/diagram/synchronization/graph/RouteGraphModification.java
bundles/org.simantics.document.base.ontology/.classpath
bundles/org.simantics.document.base.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.document.base.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.document.linking.ontology/.classpath
bundles/org.simantics.document.linking.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.document.linking.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.document.linking.ui/.classpath
bundles/org.simantics.document.linking.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.document.linking.ui/META-INF/MANIFEST.MF
bundles/org.simantics.document.ontology/.classpath
bundles/org.simantics.document.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.document.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.document.server.io/.classpath
bundles/org.simantics.document.server.io/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.document.server.io/META-INF/MANIFEST.MF
bundles/org.simantics.document.server/.classpath
bundles/org.simantics.document.server/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.document.server/META-INF/MANIFEST.MF
bundles/org.simantics.document.server/src/org/simantics/document/server/Functions.java
bundles/org.simantics.document.server/src/org/simantics/document/server/request/DocumentRequest.java
bundles/org.simantics.document.server/src/org/simantics/document/server/request/HandleEventRequest.java
bundles/org.simantics.document.server/src/org/simantics/document/server/request/NodesRequest.java
bundles/org.simantics.document.swt.core/.classpath
bundles/org.simantics.document.swt.core/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.document.swt.core/META-INF/MANIFEST.MF
bundles/org.simantics.document.swt.ontology/.classpath
bundles/org.simantics.document.swt.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.document.swt.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.document.ui.ontology/.classpath
bundles/org.simantics.document.ui.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.document.ui.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.document.ui/.classpath
bundles/org.simantics.document.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.document.ui/META-INF/MANIFEST.MF
bundles/org.simantics.document/.classpath
bundles/org.simantics.document/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.document/META-INF/MANIFEST.MF
bundles/org.simantics.dublincore.ontology/.classpath
bundles/org.simantics.dublincore.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.dublincore.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.editors.win32/.classpath
bundles/org.simantics.editors.win32/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.editors.win32/META-INF/MANIFEST.MF
bundles/org.simantics.editors/.classpath
bundles/org.simantics.editors/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.editors/META-INF/MANIFEST.MF
bundles/org.simantics.equation/.classpath
bundles/org.simantics.equation/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.equation/META-INF/MANIFEST.MF
bundles/org.simantics.event.ontology/.classpath
bundles/org.simantics.event.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.event.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.event/.classpath
bundles/org.simantics.event/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.event/META-INF/MANIFEST.MF
bundles/org.simantics.excel/.classpath
bundles/org.simantics.excel/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.excel/META-INF/MANIFEST.MF
bundles/org.simantics.excel/SimanticsExcel_64.dll [new file with mode: 0644]
bundles/org.simantics.excel/build.properties
bundles/org.simantics.excel/native/Interface.cpp
bundles/org.simantics.excel/native/SimanticsExcel.sln
bundles/org.simantics.excel/native/SimanticsExcel.vcxproj
bundles/org.simantics.excel/native/jni2.h
bundles/org.simantics.excel/scl/Excel.scl [new file with mode: 0644]
bundles/org.simantics.excel/src/org/simantics/excel/Excel.java
bundles/org.simantics.export.core/.classpath
bundles/org.simantics.export.core/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.export.core/META-INF/MANIFEST.MF
bundles/org.simantics.export.ui/.classpath
bundles/org.simantics.export.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.export.ui/META-INF/MANIFEST.MF
bundles/org.simantics.fastlz/.classpath
bundles/org.simantics.fastlz/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.fastlz/META-INF/MANIFEST.MF
bundles/org.simantics.fileimport.ui/.classpath
bundles/org.simantics.fileimport.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.fileimport.ui/META-INF/MANIFEST.MF
bundles/org.simantics.fileimport/.classpath
bundles/org.simantics.fileimport/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.fileimport/META-INF/MANIFEST.MF
bundles/org.simantics.filesystem.services/.classpath
bundles/org.simantics.filesystem.services/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.filesystem.services/META-INF/MANIFEST.MF
bundles/org.simantics.g2d.ontology/.classpath
bundles/org.simantics.g2d.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.g2d.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.g2d.ontology/graph/G2D.pgraph
bundles/org.simantics.g2d/.classpath
bundles/org.simantics.g2d/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.g2d/META-INF/MANIFEST.MF
bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/participant/ElementPainter.java
bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/participant/ZOrderHandler.java
bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/impl/ShapePick.java
bundles/org.simantics.g2d/src/org/simantics/g2d/gallery/GalleryViewer.java
bundles/org.simantics.g2d/src/org/simantics/g2d/image/impl/ShapeImage.java
bundles/org.simantics.g2d/src/org/simantics/g2d/participant/OrientationRestorer.java
bundles/org.simantics.g2d/src/org/simantics/g2d/participant/TimeParticipant.java
bundles/org.simantics.gnuplot/.classpath
bundles/org.simantics.gnuplot/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.gnuplot/META-INF/MANIFEST.MF
bundles/org.simantics.gnuplot/pom.xml
bundles/org.simantics.graph.compiler/.classpath
bundles/org.simantics.graph.compiler/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.graph.compiler/META-INF/MANIFEST.MF
bundles/org.simantics.graph.db/.classpath
bundles/org.simantics.graph.db/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.graph.db/META-INF/MANIFEST.MF
bundles/org.simantics.graph/.classpath
bundles/org.simantics.graph/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.graph/META-INF/MANIFEST.MF
bundles/org.simantics.graph/src/org/simantics/graph/refactoring/FixExportedOntology.java
bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraphUtils.java
bundles/org.simantics.graphfile.ontology/.classpath
bundles/org.simantics.graphfile.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.graphfile.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.graphfile.ui.ontology/.classpath [new file with mode: 0644]
bundles/org.simantics.graphfile.ui.ontology/.project [new file with mode: 0644]
bundles/org.simantics.graphfile.ui.ontology/META-INF/MANIFEST.MF [new file with mode: 0644]
bundles/org.simantics.graphfile.ui.ontology/build.properties [new file with mode: 0644]
bundles/org.simantics.graphfile.ui.ontology/graph/GraphFileUI.pgraph [new file with mode: 0644]
bundles/org.simantics.graphfile.ui/.classpath [new file with mode: 0644]
bundles/org.simantics.graphfile.ui/.project [new file with mode: 0644]
bundles/org.simantics.graphfile.ui/META-INF/MANIFEST.MF [new file with mode: 0644]
bundles/org.simantics.graphfile.ui/adapters.xml [new file with mode: 0644]
bundles/org.simantics.graphfile.ui/build.properties [new file with mode: 0644]
bundles/org.simantics.graphfile.ui/plugin.xml [new file with mode: 0644]
bundles/org.simantics.graphfile.ui/src/org/simantics/graphfile/ui/editor/PlainTextEditor.java [new file with mode: 0644]
bundles/org.simantics.graphfile.ui/src/org/simantics/graphfile/ui/editor/PlainTextEditorDocumentProvider.java [new file with mode: 0644]
bundles/org.simantics.graphfile/.classpath
bundles/org.simantics.graphfile/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.graphfile/META-INF/MANIFEST.MF
bundles/org.simantics.graphviz.ui/.classpath
bundles/org.simantics.graphviz.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.graphviz.ui/META-INF/MANIFEST.MF
bundles/org.simantics.graphviz/.classpath
bundles/org.simantics.graphviz/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.graphviz/META-INF/MANIFEST.MF
bundles/org.simantics.help.base/.classpath
bundles/org.simantics.help.base/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.help.base/META-INF/MANIFEST.MF
bundles/org.simantics.help.core/.classpath
bundles/org.simantics.help.core/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.help.core/META-INF/MANIFEST.MF
bundles/org.simantics.help.ontology/.classpath
bundles/org.simantics.help.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.help.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.help.ui/.classpath
bundles/org.simantics.help.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.help.ui/META-INF/MANIFEST.MF
bundles/org.simantics.history.rest/.classpath
bundles/org.simantics.history.rest/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.history.rest/META-INF/MANIFEST.MF
bundles/org.simantics.history/.classpath
bundles/org.simantics.history/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.history/META-INF/MANIFEST.MF
bundles/org.simantics.history/src/org/simantics/history/csv/CSVFormatter.java
bundles/org.simantics.image.ontology/.classpath
bundles/org.simantics.image.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.image.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.image.ui/.classpath
bundles/org.simantics.image.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.image.ui/META-INF/MANIFEST.MF
bundles/org.simantics.image2.ontology/.classpath
bundles/org.simantics.image2.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.image2.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.issues.common/.classpath
bundles/org.simantics.issues.common/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.issues.common/META-INF/MANIFEST.MF
bundles/org.simantics.issues.ontology/.classpath
bundles/org.simantics.issues.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.issues.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.issues.ui.ontology/.classpath
bundles/org.simantics.issues.ui.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.issues.ui.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.issues.ui/.classpath
bundles/org.simantics.issues.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.issues.ui/META-INF/MANIFEST.MF
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/property/IssuesTab.java [new file with mode: 0644]
bundles/org.simantics.issues/.classpath
bundles/org.simantics.issues/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.issues/META-INF/MANIFEST.MF
bundles/org.simantics.jdbc.ontology/.classpath
bundles/org.simantics.jdbc.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.jdbc.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.jdbc/.classpath
bundles/org.simantics.jdbc/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.jdbc/META-INF/MANIFEST.MF
bundles/org.simantics.jdbc/src/org/simantics/jdbc/variable/JDBCSessionManager.java
bundles/org.simantics.layer0.utils/.classpath
bundles/org.simantics.layer0.utils/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.layer0.utils/META-INF/MANIFEST.MF
bundles/org.simantics.layer0/.classpath
bundles/org.simantics.layer0/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.layer0/META-INF/MANIFEST.MF
bundles/org.simantics.layer0x.ontology/.classpath
bundles/org.simantics.layer0x.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.layer0x.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.logback.configuration/.classpath
bundles/org.simantics.logback.configuration/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.logback.configuration/META-INF/MANIFEST.MF
bundles/org.simantics.logging.ui/.classpath
bundles/org.simantics.logging.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.logging.ui/META-INF/MANIFEST.MF
bundles/org.simantics.logging/.classpath
bundles/org.simantics.logging/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.logging/META-INF/MANIFEST.MF
bundles/org.simantics.lz4/.classpath
bundles/org.simantics.lz4/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.lz4/META-INF/MANIFEST.MF
bundles/org.simantics.mapping/.classpath
bundles/org.simantics.mapping/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.mapping/META-INF/MANIFEST.MF
bundles/org.simantics.message.ui/.classpath
bundles/org.simantics.message.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.message.ui/META-INF/MANIFEST.MF
bundles/org.simantics.message/.classpath
bundles/org.simantics.message/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.message/META-INF/MANIFEST.MF
bundles/org.simantics.migration.ui/.classpath
bundles/org.simantics.migration.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.migration.ui/META-INF/MANIFEST.MF
bundles/org.simantics.modeling.ontology/.classpath
bundles/org.simantics.modeling.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.modeling.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.modeling.ontology/graph/Modeling.pgraph
bundles/org.simantics.modeling.template2d.ontology/.classpath
bundles/org.simantics.modeling.template2d.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.modeling.template2d.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.modeling.template2d.ui/.classpath
bundles/org.simantics.modeling.template2d.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.modeling.template2d.ui/META-INF/MANIFEST.MF
bundles/org.simantics.modeling.tests/.classpath
bundles/org.simantics.modeling.tests/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.modeling.tests/META-INF/MANIFEST.MF
bundles/org.simantics.modeling.ui.workbench/.classpath
bundles/org.simantics.modeling.ui.workbench/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.modeling.ui.workbench/META-INF/MANIFEST.MF
bundles/org.simantics.modeling.ui/.classpath
bundles/org.simantics.modeling.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.modeling.ui/META-INF/MANIFEST.MF
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/chart/property/ObtainedDoubleAdapter.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ComponentTypeScriptDocumentProvider.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ComponentTypeScriptEditor.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ProceduralComponentTypeCodeDocumentProvider.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/monitor/ObtainedColorAdapter.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/monitor/ObtainedExpressionAdapter.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/monitor/ObtainedFontAdapter.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/monitor/ObtainedFormatterAdapter.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/style/IssueDecorationStyle.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/DiagramViewer.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/DiagramViewerLoadJob.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/DiagramViewerSelectionProvider.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/e4/PopulateElementDropParticipant.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/expression/InvertBasicExpressionVisitor.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/handlers/ContextualHelp.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/pdf/PDFPainter.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/preferences/CSVPreferencePage.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/sg/DiagramSceneGraphProvider.java
bundles/org.simantics.modeling/.classpath
bundles/org.simantics.modeling/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.modeling/META-INF/MANIFEST.MF
bundles/org.simantics.modeling/scl/Simantics/ChangeInformation.scl [new file with mode: 0644]
bundles/org.simantics.modeling/scl/Simantics/Testing.scl
bundles/org.simantics.modeling/src/org/simantics/modeling/ContentDumps.java
bundles/org.simantics.modeling/src/org/simantics/modeling/InvertBasicExpressionVisitor.java
bundles/org.simantics.modeling/src/org/simantics/modeling/InvertBasicExpressionVisitorBase.java [new file with mode: 0644]
bundles/org.simantics.modeling/src/org/simantics/modeling/ModelingUtils.java
bundles/org.simantics.modeling/src/org/simantics/modeling/ProceduralSubstructureMapRequest.java
bundles/org.simantics.modeling/src/org/simantics/modeling/SCLAction.java
bundles/org.simantics.modeling/src/org/simantics/modeling/SCLDropAction.java
bundles/org.simantics.modeling/src/org/simantics/modeling/SCLScenegraph.java
bundles/org.simantics.modeling/src/org/simantics/modeling/SCLTypeUtils.java
bundles/org.simantics.modeling/src/org/simantics/modeling/actions/Help.java
bundles/org.simantics.modeling/src/org/simantics/modeling/help/HelpContexts.java [new file with mode: 0644]
bundles/org.simantics.modeling/src/org/simantics/modeling/mapping/ComponentCopyAdvisor.java
bundles/org.simantics.modeling/src/org/simantics/modeling/scl/CompileProceduralSCLMonitorRequest.java
bundles/org.simantics.modeling/src/org/simantics/modeling/scl/CompileSCLMonitorRequest.java
bundles/org.simantics.modeling/src/org/simantics/modeling/scl/CompileSCLQueryRequest.java
bundles/org.simantics.modeling/src/org/simantics/modeling/scl/GraphModuleSourceRepository.java
bundles/org.simantics.modeling/src/org/simantics/modeling/utils/DumpOntologyStructure.java
bundles/org.simantics.modeling/src/org/simantics/modeling/utils/OntologicalRequirementEnforceRequest.java
bundles/org.simantics.msvc.runtime.x86_64/.classpath
bundles/org.simantics.msvc.runtime.x86_64/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.msvc.runtime.x86_64/META-INF/MANIFEST.MF
bundles/org.simantics.msvc.runtime/.classpath
bundles/org.simantics.msvc.runtime/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.msvc.runtime/META-INF/MANIFEST.MF
bundles/org.simantics.nativemem/.classpath
bundles/org.simantics.nativemem/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.nativemem/META-INF/MANIFEST.MF
bundles/org.simantics.objmap2/.classpath
bundles/org.simantics.objmap2/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.objmap2/META-INF/MANIFEST.MF
bundles/org.simantics.objmap2/src/org/simantics/objmap/forward/IForwardMappingRule.java
bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/annotations/factories/UpdateMethodFactory.java
bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/impl/Mapping.java
bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/impl/RangeUpdateRequest.java
bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/MappedElementRule.java
bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/MappedElementsRule.java
bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/ValueRule.java
bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/AdaptedLinkType.java
bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/SimpleLinkType.java
bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/annotations/factories/UpdateMethodFactory.java
bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/schema/AdaptedLinkType.java
bundles/org.simantics.objmap2/src/org/simantics/objmap/structural/schema/SimpleLinkType.java
bundles/org.simantics.platform.ui.ontology/.classpath
bundles/org.simantics.platform.ui.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.platform.ui.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.platform.ui/.classpath
bundles/org.simantics.platform.ui/META-INF/MANIFEST.MF
bundles/org.simantics.project.ontology/.classpath
bundles/org.simantics.project.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.project.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.project/.classpath
bundles/org.simantics.project/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.project/META-INF/MANIFEST.MF
bundles/org.simantics.scenegraph.loader/.classpath
bundles/org.simantics.scenegraph.loader/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.scenegraph.loader/META-INF/MANIFEST.MF
bundles/org.simantics.scenegraph.loader/src/org/simantics/scenegraph/loader/ScenegraphLoaderProcess.java
bundles/org.simantics.scenegraph.ontology/.classpath
bundles/org.simantics.scenegraph.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.scenegraph.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.scenegraph.profile/.classpath
bundles/org.simantics.scenegraph.profile/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.scenegraph.profile/META-INF/MANIFEST.MF
bundles/org.simantics.scenegraph.profile/src/org/simantics/scenegraph/profile/common/ObserverGroupListener.java
bundles/org.simantics.scenegraph.profile/src/org/simantics/scenegraph/profile/common/ProfileObserver.java
bundles/org.simantics.scenegraph.swing/.classpath
bundles/org.simantics.scenegraph.swing/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.scenegraph.swing/META-INF/MANIFEST.MF
bundles/org.simantics.scenegraph.ui/.classpath
bundles/org.simantics.scenegraph.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.scenegraph.ui/META-INF/MANIFEST.MF
bundles/org.simantics.scenegraph/.classpath
bundles/org.simantics.scenegraph/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.scenegraph/META-INF/MANIFEST.MF
bundles/org.simantics.scenegraph/build.properties
bundles/org.simantics.scenegraph/lib/batik-awt-util-1.8.jar [deleted file]
bundles/org.simantics.scenegraph/lib/batik-parser-1.8.jar [deleted file]
bundles/org.simantics.scenegraph/lib/batik-util-1.8.jar [deleted file]
bundles/org.simantics.scenegraph/lib/jcommon-1.0.16.jar [deleted file]
bundles/org.simantics.scenegraph/lib/jfreechart-1.0.13.jar [deleted file]
bundles/org.simantics.scenegraph/lib/svgSalamander-tiny.jar
bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/G2DParentNode.java
bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/events/command/Commands.java
bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/nodes/ConnectionCrossingsNode.java [new file with mode: 0644]
bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/nodes/LinkNode.java
bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/nodes/ShapeNode2.java [new file with mode: 0644]
bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/nodes/connection/RouteGraphNode.java
bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/utils/MipMapBufferedImage.java
bundles/org.simantics.scl.commands/.classpath
bundles/org.simantics.scl.commands/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.scl.commands/META-INF/MANIFEST.MF
bundles/org.simantics.scl.compiler.decompiler/.classpath
bundles/org.simantics.scl.compiler.decompiler/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.scl.compiler.decompiler/META-INF/MANIFEST.MF
bundles/org.simantics.scl.compiler/.classpath
bundles/org.simantics.scl.compiler/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.scl.compiler/META-INF/MANIFEST.MF
bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/common/exceptions/InternalCompilerError.java
bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/module/repository/ModuleRepository.java
bundles/org.simantics.scl.data/.classpath
bundles/org.simantics.scl.data/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.scl.data/META-INF/MANIFEST.MF
bundles/org.simantics.scl.data/scl/Data/Json.scl
bundles/org.simantics.scl.db/.classpath
bundles/org.simantics.scl.db/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.scl.db/META-INF/MANIFEST.MF
bundles/org.simantics.scl.expressions/.classpath
bundles/org.simantics.scl.expressions/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.scl.expressions/META-INF/MANIFEST.MF
bundles/org.simantics.scl.osgi/.classpath
bundles/org.simantics.scl.osgi/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.scl.osgi/META-INF/MANIFEST.MF
bundles/org.simantics.scl.osgi/src/org/simantics/scl/osgi/internal/OsgiJavaReferenceValidatorFactory.java
bundles/org.simantics.scl.reflection/.classpath
bundles/org.simantics.scl.reflection/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.scl.reflection/META-INF/MANIFEST.MF
bundles/org.simantics.scl.rest/.classpath
bundles/org.simantics.scl.rest/META-INF/MANIFEST.MF
bundles/org.simantics.scl.runtime/.classpath
bundles/org.simantics.scl.runtime/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.scl.runtime/META-INF/MANIFEST.MF
bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/exceptions/CheckedFunctionException.java [new file with mode: 0644]
bundles/org.simantics.scl.tutorial/.classpath
bundles/org.simantics.scl.tutorial/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.scl.tutorial/META-INF/MANIFEST.MF
bundles/org.simantics.scl.ui/.classpath
bundles/org.simantics.scl.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.scl.ui/META-INF/MANIFEST.MF
bundles/org.simantics.scl.ui/plugin.xml
bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/assist/StyledTextContentAdapter.java
bundles/org.simantics.selectionview.ontology/.classpath
bundles/org.simantics.selectionview.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.selectionview.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.selectionview.ui.ontology/.classpath
bundles/org.simantics.selectionview.ui.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.selectionview.ui.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.selectionview/.classpath
bundles/org.simantics.selectionview/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.selectionview/META-INF/MANIFEST.MF
bundles/org.simantics.silk.ontology/.classpath
bundles/org.simantics.silk.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.silk.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.simulation.ontology/.classpath
bundles/org.simantics.simulation.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.simulation.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.simulation.sequences/.classpath
bundles/org.simantics.simulation.sequences/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.simulation.sequences/META-INF/MANIFEST.MF
bundles/org.simantics.simulation.ui/.classpath
bundles/org.simantics.simulation.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.simulation.ui/META-INF/MANIFEST.MF
bundles/org.simantics.simulation/.classpath
bundles/org.simantics.simulation/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.simulation/META-INF/MANIFEST.MF
bundles/org.simantics.simulation/src/org/simantics/simulation/data/DatasourceAdapter.java
bundles/org.simantics.simulation/src/org/simantics/simulation/export/CSVItemsQuery.java
bundles/org.simantics.simulation/src/org/simantics/simulation/export/ExportSubscriptionCSV.java
bundles/org.simantics.simulation/src/org/simantics/simulation/history/HistoryUtil.java
bundles/org.simantics.simulator.toolkit.db/.classpath
bundles/org.simantics.simulator.toolkit.db/META-INF/MANIFEST.MF
bundles/org.simantics.simulator.toolkit/.classpath
bundles/org.simantics.simulator.toolkit/META-INF/MANIFEST.MF
bundles/org.simantics.simulator.toolkit/src/org/simantics/simulator/toolkit/StandardNodeManager.java
bundles/org.simantics.simulator.variable/.classpath
bundles/org.simantics.simulator.variable/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.simulator.variable/META-INF/MANIFEST.MF
bundles/org.simantics.simulator.variable/src/org/simantics/simulator/variable/NodeManager.java
bundles/org.simantics.simulator/.classpath
bundles/org.simantics.simulator/META-INF/MANIFEST.MF
bundles/org.simantics.softwareconfiguration.ontology/.classpath
bundles/org.simantics.softwareconfiguration.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.softwareconfiguration.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.spreadsheet.common/.classpath
bundles/org.simantics.spreadsheet.common/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.spreadsheet.common/META-INF/MANIFEST.MF
bundles/org.simantics.spreadsheet.fileimport/.classpath
bundles/org.simantics.spreadsheet.fileimport/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.spreadsheet.fileimport/META-INF/MANIFEST.MF
bundles/org.simantics.spreadsheet.graph/.classpath
bundles/org.simantics.spreadsheet.graph/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.spreadsheet.graph/META-INF/MANIFEST.MF
bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetGraphUtils.java
bundles/org.simantics.spreadsheet.ontology/.classpath
bundles/org.simantics.spreadsheet.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.spreadsheet.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.spreadsheet.ui/.classpath
bundles/org.simantics.spreadsheet.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.spreadsheet.ui/META-INF/MANIFEST.MF
bundles/org.simantics.spreadsheet/.classpath
bundles/org.simantics.spreadsheet/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.spreadsheet/META-INF/MANIFEST.MF
bundles/org.simantics.structural.ontology/.classpath
bundles/org.simantics.structural.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.structural.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.structural.synchronization.client/.classpath
bundles/org.simantics.structural.synchronization.client/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.structural.synchronization.client/META-INF/MANIFEST.MF
bundles/org.simantics.structural.synchronization/.classpath
bundles/org.simantics.structural.synchronization/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.structural.synchronization/META-INF/MANIFEST.MF
bundles/org.simantics.structural.synchronization/src/org/simantics/structural/synchronization/base/SynchronizationEventHandlerBase.java
bundles/org.simantics.structural.ui/.classpath
bundles/org.simantics.structural.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.structural.ui/META-INF/MANIFEST.MF
bundles/org.simantics.structural2/.classpath
bundles/org.simantics.structural2/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.structural2/META-INF/MANIFEST.MF
bundles/org.simantics.structural2/src/org/simantics/structural2/Functions.java
bundles/org.simantics.structural2/src/org/simantics/structural2/queries/GetComponentLocation.java
bundles/org.simantics.structural2/src/org/simantics/structural2/scl/AbstractCompileStructuralValueRequest.java
bundles/org.simantics.structural2/src/org/simantics/structural2/scl/procedural/ProceduralComponentTypeCompilationContextRequest.java
bundles/org.simantics.structural2/src/org/simantics/structural2/utils/StructuralUtils.java
bundles/org.simantics.team.ui/.classpath
bundles/org.simantics.team.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.team.ui/META-INF/MANIFEST.MF
bundles/org.simantics.tests.modelled.ontology/.classpath
bundles/org.simantics.tests.modelled.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.tests.modelled.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.tests.modelled.ui.ontology/.classpath
bundles/org.simantics.tests.modelled.ui.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.tests.modelled.ui.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.tests.modelled.ui/.classpath
bundles/org.simantics.tests.modelled.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.tests.modelled.ui/META-INF/MANIFEST.MF
bundles/org.simantics.tests.modelled.ui/scl/Simantics/TestsUI.scl
bundles/org.simantics.tests.modelled.ui/src/org/simantics/tests/modelled/ui/TestsUIUtils.java
bundles/org.simantics.tests.modelled/.classpath
bundles/org.simantics.tests.modelled/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.tests.modelled/META-INF/MANIFEST.MF
bundles/org.simantics.threadlog/.classpath
bundles/org.simantics.threadlog/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.threadlog/META-INF/MANIFEST.MF
bundles/org.simantics.trend/.classpath
bundles/org.simantics.trend/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.trend/META-INF/MANIFEST.MF
bundles/org.simantics.trend/src/org/simantics/trend/impl/HorizRuler.java
bundles/org.simantics.ui.workspace.tracker/.classpath
bundles/org.simantics.ui.workspace.tracker/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.ui.workspace.tracker/META-INF/MANIFEST.MF
bundles/org.simantics.ui/.classpath
bundles/org.simantics.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.ui/META-INF/MANIFEST.MF
bundles/org.simantics.user.ontology/.classpath
bundles/org.simantics.user.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.user.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.utils.datastructures/.classpath
bundles/org.simantics.utils.datastructures/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.utils.datastructures/META-INF/MANIFEST.MF
bundles/org.simantics.utils.thread.swt/.classpath
bundles/org.simantics.utils.thread.swt/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.utils.thread.swt/META-INF/MANIFEST.MF
bundles/org.simantics.utils.thread/.classpath
bundles/org.simantics.utils.thread/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.utils.thread/META-INF/MANIFEST.MF
bundles/org.simantics.utils.thread/src/org/simantics/utils/threads/AWTThread.java
bundles/org.simantics.utils.ui.workbench/.classpath
bundles/org.simantics.utils.ui.workbench/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.utils.ui.workbench/META-INF/MANIFEST.MF
bundles/org.simantics.utils.ui/.classpath
bundles/org.simantics.utils.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.utils.ui/META-INF/MANIFEST.MF
bundles/org.simantics.utils/.classpath
bundles/org.simantics.utils/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.utils/META-INF/MANIFEST.MF
bundles/org.simantics.viewpoint.ontology/.classpath
bundles/org.simantics.viewpoint.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.viewpoint.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.views.ontology/.classpath
bundles/org.simantics.views.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.views.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.views.swt.client/.classpath
bundles/org.simantics.views.swt.client/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.views.swt.client/META-INF/MANIFEST.MF
bundles/org.simantics.views.swt/.classpath
bundles/org.simantics.views.swt/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.views.swt/META-INF/MANIFEST.MF
bundles/org.simantics.views.text.ontology/.classpath
bundles/org.simantics.views.text.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.views.text.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.views.text/.classpath
bundles/org.simantics.views.text/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.views.text/META-INF/MANIFEST.MF
bundles/org.simantics.views/.classpath
bundles/org.simantics.views/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.views/META-INF/MANIFEST.MF
bundles/org.simantics.wiki.ui/.classpath
bundles/org.simantics.wiki.ui/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.wiki.ui/META-INF/MANIFEST.MF
bundles/org.simantics.workbench.ontology/.classpath
bundles/org.simantics.workbench.ontology/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.workbench.ontology/META-INF/MANIFEST.MF
bundles/org.simantics.workbench.search.impl/.classpath [new file with mode: 0644]
bundles/org.simantics.workbench.search.impl/.project [new file with mode: 0644]
bundles/org.simantics.workbench.search.impl/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
bundles/org.simantics.workbench.search.impl/META-INF/MANIFEST.MF [new file with mode: 0644]
bundles/org.simantics.workbench.search.impl/build.properties [new file with mode: 0644]
bundles/org.simantics.workbench.search.impl/plugin.xml [new file with mode: 0644]
bundles/org.simantics.workbench.search.impl/src/org/simantics/workbench/search/impl/Activator.java [new file with mode: 0644]
bundles/org.simantics.workbench.search.impl/src/org/simantics/workbench/search/impl/ActiveModelsListener.java [moved from bundles/org.simantics.workbench/src/org/simantics/workbench/internal/contributions/search/ActiveModelsListener.java with 94% similarity]
bundles/org.simantics.workbench.search.impl/src/org/simantics/workbench/search/impl/BrowserView.java [moved from bundles/org.simantics.workbench/src/org/simantics/workbench/internal/contributions/search/BrowserView.java with 99% similarity]
bundles/org.simantics.workbench.search.impl/src/org/simantics/workbench/search/impl/NestableSearchService.java [moved from bundles/org.simantics.workbench/src/org/simantics/workbench/internal/contributions/search/NestableSearchService.java with 87% similarity]
bundles/org.simantics.workbench.search.impl/src/org/simantics/workbench/search/impl/SearchServiceFactory.java [moved from bundles/org.simantics.workbench/src/org/simantics/workbench/internal/contributions/search/SearchServiceFactory.java with 93% similarity]
bundles/org.simantics.workbench.search.impl/src/org/simantics/workbench/search/impl/SearchServiceImpl.java [moved from bundles/org.simantics.workbench/src/org/simantics/workbench/internal/contributions/search/SearchServiceImpl.java with 98% similarity]
bundles/org.simantics.workbench.search.impl/src/org/simantics/workbench/search/impl/SlaveSearchService.java [moved from bundles/org.simantics.workbench/src/org/simantics/workbench/internal/contributions/search/SlaveSearchService.java with 91% similarity]
bundles/org.simantics.workbench.search/.classpath
bundles/org.simantics.workbench.search/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.workbench.search/META-INF/MANIFEST.MF
bundles/org.simantics.workbench.search/src/org/simantics/workbench/search/DependenciesSearchFunction.java
bundles/org.simantics.workbench/.classpath
bundles/org.simantics.workbench/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics.workbench/META-INF/MANIFEST.MF
bundles/org.simantics/.classpath
bundles/org.simantics/.settings/org.eclipse.jdt.core.prefs
bundles/org.simantics/META-INF/MANIFEST.MF
bundles/org.simantics/src/org/simantics/LogManager.java [deleted file]
bundles/org.simantics/src/org/simantics/Simantics.java
bundles/org.simantics/src/org/simantics/SimanticsPlatform.java
bundles/pom.xml
bundles/winterwell.markdown/.classpath
bundles/winterwell.markdown/META-INF/MANIFEST.MF
features/hdf.hdf5.feature/feature.xml
features/org.jfree.feature/feature.xml
features/org.simantics.data.feature/feature.xml
features/org.simantics.desktop.feature/feature.xml
features/org.simantics.desktop.product.feature/feature.xml
features/org.simantics.g2d.feature/feature.xml
features/org.simantics.help.feature/feature.xml
features/org.simantics.history.rest.feature/feature.xml
features/org.simantics.platform.ui.feature/feature.xml
features/org.simantics.rcp.feature/feature.xml
features/org.simantics.scl.rest.feature/feature.xml
features/org.simantics.sdk.feature/feature.xml
features/org.simantics.ui.workbench.feature/feature.xml
features/org.simantics.utils.feature/feature.xml
features/org.simantics.workbench.feature/feature.xml
license.html
releng/org.simantics.desktop.rcp.product/simantics-desktop.product
releng/org.simantics.sdk.build.p2.site/pom.xml
releng/org.simantics.sdk.build.targetdefinition/README.md
releng/org.simantics.sdk.build.targetdefinition/build/.gitignore [new file with mode: 0644]
releng/org.simantics.sdk.build.targetdefinition/build/pom.xml [new file with mode: 0644]
releng/org.simantics.sdk.build.targetdefinition/org.simantics.sdk.build.targetdefinition.target
releng/org.simantics.sdk.build.targetdefinition/org.simantics.sdk.build.targetdefinition.tpd
releng/org.simantics.sdk.build.targetdefinition/pom.xml
releng/org.simantics.sdk.build.targetdefinition/simantics.target
releng/org.simantics.sdk.build.targetdefinition/simantics.tpd
releng/org.simantics.sdk.repository/pom.xml
releng/org.simantics.tycho.configuration/pom.xml
settings.xml [deleted file]
tests/org.simantics.db.tests/.settings/org.eclipse.jdt.core.prefs
tests/org.simantics.db.tests/META-INF/MANIFEST.MF
tests/org.simantics.db.tests/build-installer.xml
tests/org.simantics.db.tests/build.xml
tests/org.simantics.db.tests/launch/RegressionTestsPlugin.launch
tests/org.simantics.db.tests/launch/RegressionTestsPlugin2.launch
tests/org.simantics.db.tests/launch/RegressionTestsPlugin64.launch
tests/org.simantics.db.tests/launch/TempTestsPlugin.launch
tests/org.simantics.scl.compiler.tests/.classpath
tests/org.simantics.scl.compiler.tests/.settings/org.eclipse.jdt.core.prefs
tests/org.simantics.scl.compiler.tests/META-INF/MANIFEST.MF
tests/org.simantics.scl.osgi.tests/.classpath
tests/org.simantics.scl.osgi.tests/.settings/org.eclipse.jdt.core.prefs
tests/org.simantics.scl.osgi.tests/META-INF/MANIFEST.MF
tests/org.simantics.tests.integration/.classpath
tests/org.simantics.tests.integration/META-INF/MANIFEST.MF

index cf73f85b69d9b4fbfe4e191227a7cb0a6fc594e3..0bb5834722736f74bc9b2dee4adb5879242c39d6 100644 (file)
@@ -4,7 +4,7 @@
 /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
index 3b43bdfdd6c475790cc5db2e38b62ad33da8875d..e73295bbd2337b55a005ac88ba80e22d00981d46 100644 (file)
@@ -3,6 +3,6 @@
   <extension>
     <groupId>org.eclipse.tycho.extras</groupId>
     <artifactId>tycho-pomless</artifactId>
-    <version>1.5.0</version>
+    <version>1.6.0</version>
   </extension>
 </extensions> 
index d0d9155e4986c2543d45ffc9f0ef8e31fd55e87d..7567cd62f707287c053ebce320840d724907d55b 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,9 +1,101 @@
+## 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.
index f0eb4b56abb59f7d0032b4434b70a25c10865c25..ca6a24379b92bba92b8e82883d718f035fa56284 100644 (file)
@@ -1,8 +1,8 @@
-<?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>
index 295926d964165896ea8aa7c1b1b3c9d3d3caa77e..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
-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
index 66804effbace2b09065cce9743cdadae4f2b84b4..6bd23894644745349d8ed277aeda506a908a100b 100644 (file)
@@ -4,7 +4,7 @@ Bundle-Name: Java HDF5 Interface (JHI5)
 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
@@ -14,5 +14,5 @@ Export-Package: hdf.hdf5lib,
  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
index 22f30643cba38503dfc820a64bc4225fd8c743ba..c3ba59e4c3aa0f77c91a1c5c582d9a7e6363defc 100644 (file)
@@ -1,7 +1,7 @@
 <?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>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 3bf81207bc64b8953750b565202ec90f55f99240..2441affe30faf5c15de671507e2a7a85866f064d 100644 (file)
@@ -11,8 +11,8 @@ Require-Bundle: gnu.trove3;bundle-version="3.0.0",
  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
index 1e4b5cbac508623fff9fd9d5017043818ce1ee42..52be328eb87ea5de7d9b58fed20e1fe53439f727 100644 (file)
@@ -70,7 +70,7 @@ public class MainProgram implements Runnable, Closeable {
                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<>();
                }
        }
 
@@ -93,11 +93,13 @@ public class MainProgram implements Runnable, Closeable {
 
                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()) {
@@ -165,6 +167,9 @@ public class MainProgram implements Runnable, Closeable {
                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()) {
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index ecd3249c9de20a11d0c63f76c1fc419e0dd30433..6a381777e67a472143d1daac2a1f72305864a3ca 100644 (file)
@@ -4,6 +4,6 @@ Bundle-Name: http://www.simantics.org/Action
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 678e472fb3339542c30b97075515f4c0641de1a0..679467d20d95cf462a58bfdcd6b7a896eef84ec1 100644 (file)
@@ -14,7 +14,7 @@ Require-Bundle: org.simantics.layer0,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 752c445b5a479d688dd65217fcf23e0bf3b09b66..49285d070e7a0f5c2c3600284a41adf281f678b1 100644 (file)
@@ -17,9 +17,9 @@ Require-Bundle: org.eclipse.ui,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 61b0f0b74d512fc18582b620445e683204b055c4..11fbec03ddd162588775b13e13a8e2f0651ea914 100644 (file)
@@ -15,6 +15,6 @@ Require-Bundle: org.eclipse.core.runtime,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 245787d5974d64fcc72c97c2943cb151fb830d8a..2ed0b2ba43d81b164b4985f3514e18abdf172706 100644 (file)
@@ -9,16 +9,16 @@ Require-Bundle: org.eclipse.core.runtime,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 7293ca150b77c19df9ffdf03d8d6318617fe0fb4..ae4014eec95ce7d244df89fbf916269faf90a6df 100644 (file)
@@ -7,7 +7,7 @@ Bundle-Activator: org.simantics.backup.db.Activator
 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
index 098194ca4b7d8f45177f94e735506ae3a26b5c94..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index f42de363afaae68bbd968318f1d331877f5514fc..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 690b6e2b1d6616acfa59d6012ed83678f28d97ab..3166fff2886cc41de84e09772fd6296caeb9be6c 100644 (file)
@@ -7,7 +7,7 @@ Bundle-Activator: org.simantics.backup.ontology.Activator
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 083c6d375b83a71803a4300094fe497f1968c75c..4f1487e0940d52b36d75df992f40cf3851e40e01 100644 (file)
@@ -5,7 +5,7 @@ Bundle-SymbolicName: org.simantics.backup
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index ac83d5cf0e2f82937d6ff33d4af8cff69a0daba1..a2e07366cd7f0bca95d3eb7936bd2fc90ebbc002 100644 (file)
@@ -1,8 +1,8 @@
 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
@@ -16,6 +16,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 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
@@ -45,6 +46,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
 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
@@ -70,4 +72,5 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa
 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
index 29026a5ac8221124509c14eaafa75f526442882d..b13c011fb5f564d968ecf7f7e3af9d19ea62d15d 100644 (file)
@@ -4,12 +4,12 @@ Bundle-Name: Basic Expression Parser
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 0b734538c68fa8941fb4de275385eabacceb9adf..040121acb9ba5b6412723190cb72a40a64c39e82 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 7e1375f96aa84f364016e1bad8f6c160e14907c5..df548f25de9ede22b49c24c26d520b18bda6ea19 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 833cc2f623feabfa9b8b657e85959cd8507a2d15..8d96dd46b544eca7753f95abbec6362a98cbd0bd 100644 (file)
@@ -7,7 +7,7 @@ Require-Bundle: org.simantics.browsing.ui.common;bundle-version="[0.9.0,2.0.0)";
  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,
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index e33714f535b32331e03074afb7ed2fc9ffb087e8..2730d5f0d0707ddba1aaf819b908704371ca6c9d 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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
index c4f8c26829081fa290a6df3cd35549817f6d3439..3a185f5850bf62de7b0d9af14058ae3192b54ae0 100644 (file)
@@ -57,11 +57,13 @@ import org.simantics.browsing.ui.model.visuals.VisualsContribution;
 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;
@@ -77,21 +79,21 @@ public class BrowseContext {
     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;
@@ -110,6 +112,38 @@ public class BrowseContext {
         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.
      * 
@@ -127,7 +161,7 @@ public class BrowseContext {
             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) {
@@ -138,17 +172,16 @@ public class BrowseContext {
             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);
                 }
@@ -159,11 +192,11 @@ public class BrowseContext {
     }
 
     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) {
@@ -171,19 +204,29 @@ public class BrowseContext {
                     }
                 }
                 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))
@@ -192,7 +235,7 @@ public class BrowseContext {
         }
         return result;
     }
-    
+
     /**
      * Finds the possible children of the given {@link NodeContext} parameter.
      * 
index ca9f59da0cd89e7f5bd34474b28d07288527bcab..09a15fefcb6bd5a4235fd2a4433130057c54b170 100644 (file)
@@ -22,6 +22,8 @@ import org.simantics.browsing.ui.model.nodetypes.NodeType;
 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;
@@ -52,6 +54,26 @@ public class ChildContribution {
         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);
         
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index f158246fa2e7254faa201812ccd8b94b61d1bc8e..4c12cb034751e500668d2b850e4046f97aa0e874 100644 (file)
@@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.ui,
  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
index 80882b46cc0148290c19309a16a9809ce346468d..c1551274e48902138de4286ffcb0db5aaf5ad922 100644 (file)
@@ -15,12 +15,14 @@ public class GENatTableThemeConfiguration extends ModernNatTableThemeConfigurati
        
        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,
index c9c37ab50b5d98494894af1c6507ee669df254c5..e773ebb004002822dd7f257d77422be7a51e3292 100644 (file)
@@ -42,6 +42,8 @@ public class GEStyler extends CellPainterWrapper{
                        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));
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 874f7e1c380ec3b9c5a3a245819e3897efaa60c4..5e88348a9be3491aeaa7bcf9fb1c8aae74f661d1 100644 (file)
@@ -4,7 +4,7 @@ Bundle-Name: http://www.simantics.org/Browsing
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index f70303d53f4c338d7565f18bfcdde8782c19897a..a884e5b900d05d1bc2264a83e9641eaeb664a859 100644 (file)
@@ -15,7 +15,7 @@ Require-Bundle: org.eclipse.ui,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 132fd69fc81911c807cc0da82172d78be98803c1..006684e3ddafcad9a2f0828a9a496d5e0add58d8 100644 (file)
@@ -15,10 +15,10 @@ Require-Bundle: org.simantics.utils.thread.swt;bundle-version="1.0.0",
  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,
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 15adb3e113f9bdb2726637a4de9ac56c5e3d30f6..da71e8582d17d96636c09df5aedc3003e190f79f 100644 (file)
@@ -6,7 +6,7 @@ Bundle-Version: 1.1.0.qualifier
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 01c6ad2d898048221d1c44005ac7d397f4b468ca..6c261f05ee502d0264c6026dcbedfc0c63dfd57b 100644 (file)
@@ -13,6 +13,6 @@ Require-Bundle: org.simantics.layer0;bundle-version="1.0.0",
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 3a21537071bf4118b9e1ee864cb4bc258aa48211..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,11 +1,10 @@
 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
index b0c49505b5fdcd655f8f0a1545467fc1bab48ce2..0920f6766bcf627ad16388900c8900700a22c83c 100644 (file)
@@ -49,6 +49,6 @@ Require-Bundle: org.eclipse.ui,
  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
index 59ed5915c437ea4355580f3ee606c17521681803..ecea0073c05f82297fec7ab98a0723d5eefac3d1 100644 (file)
   </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:/">
index 65108d6f7a4ab4e3dde7d664d2e147ffdbff2584..1e1c6e1b30d2995788ab2e7edee5237119525444 100644 (file)
@@ -1,6 +1,6 @@
 /*******************************************************************************
- * 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
@@ -8,6 +8,7 @@
  *
  * Contributors:
  *     VTT Technical Research Centre of Finland - initial API and implementation
+ *     Semantum Oy - #501
  *******************************************************************************/
 package org.simantics.charts.editor;
 
@@ -33,11 +34,14 @@ import org.eclipse.core.runtime.preferences.InstanceScope;
 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;
@@ -74,8 +78,28 @@ public class ChartCopyHandler extends AbstractHandler {
         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 {
@@ -92,6 +116,8 @@ public class ChartCopyHandler extends AbstractHandler {
             ErrorLogger.defaultLogError(e.getCause());
         } catch (InterruptedException e) {
             ErrorLogger.defaultLogError(e);
+        } finally {
+            csvnode.setValue(CSVPreferences.P_CSV_START_TIME, oldStartTime);
         }
 
         return null;
@@ -132,7 +158,7 @@ public class ChartCopyHandler extends AbstractHandler {
                    
                    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);
diff --git a/bundles/org.simantics.charts/src/org/simantics/charts/editor/ChartPreferencesAction.java b/bundles/org.simantics.charts/src/org/simantics/charts/editor/ChartPreferencesAction.java
new file mode 100644 (file)
index 0000000..0cc5820
--- /dev/null
@@ -0,0 +1,38 @@
+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
diff --git a/bundles/org.simantics.charts/src/org/simantics/charts/editor/Messages.java b/bundles/org.simantics.charts/src/org/simantics/charts/editor/Messages.java
new file mode 100644 (file)
index 0000000..5771b14
--- /dev/null
@@ -0,0 +1,15 @@
+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() {
+       }
+}
index bffd4c8a24952fb60bfae8cd517be91a9d24e36d..ad718e49ec353c11c5de660ea77fd767af3bc23b 100644 (file)
@@ -635,6 +635,8 @@ public class TimeSeriesEditor extends ResourceEditorPart {
                             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));
                             }
@@ -674,6 +676,8 @@ public class TimeSeriesEditor extends ResourceEditorPart {
                     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));
                 }
             }
diff --git a/bundles/org.simantics.charts/src/org/simantics/charts/editor/messages.properties b/bundles/org.simantics.charts/src/org/simantics/charts/editor/messages.properties
new file mode 100644 (file)
index 0000000..37bbe90
--- /dev/null
@@ -0,0 +1 @@
+ChartPreferencesAction_ChartPreferences=Chart Preferences
index 7e6bdc3b7cc07a0eda98b618b608e1f9ff516b00..57f1ed33fccf7456acdb69af5c90ee1ad32e3281 100644 (file)
@@ -102,7 +102,7 @@ public class ExportChartCSV extends org.simantics.simulation.export.ExperimentEx
                                                                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);
index 9438e404ba05d530cdeb94faddcb1f22439867a4..8f2bd26f8ccf6fc4fe348d7c44cbddf6e0d9af37 100644 (file)
@@ -48,7 +48,7 @@ public class ChartAndSubscriptionItemData extends Bean {
        
        // 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;
index ad32c83a7885b8953a938b41df3b4fd4fe1aae01..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index c9773dba7eb6a5a3b02bb1a4f3b0d675b22fef54..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,8 +1,10 @@
-#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
index 8ef329e89e834ed96415d268ada8a4eadfc5c823..fb5d1e29cd3bf87026452367aba7269aceaf6926 100644 (file)
@@ -4,6 +4,6 @@ Bundle-Name: http://www.simantics.org/Color
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 7de26d40de53a5e5ce7124074cf5a8cdccc4c7ea..ee5971f318781fea5967d85470d9921be7a835f6 100644 (file)
@@ -4,7 +4,7 @@ Bundle-Name: Simantics Common Classes
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 939df8a2395028134cac6075412fe5515ad19252..fd24c516f9505e8beba70fe6ea43bbfdd25e4560 100644 (file)
@@ -5,7 +5,7 @@ Bundle-SymbolicName: org.simantics.compressions
 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
index 60bca21295375ed7090ac0d681f73a7251739306..35a38d845bb1d147ede868041db6fc22942a61c5 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index efa4817264d7145e55099c8551078031d493b0df..cca05d9c39289ffad64931ee3faf7b89702724ae 100644 (file)
@@ -3,16 +3,16 @@ Bundle-ManifestVersion: 2
 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,
index a674943d50b996e6e62cf654043bd83e9a4ff4d6..066ed4c886e7bb4eb6500174b978fda5232c877a 100644 (file)
@@ -14,8 +14,8 @@ package org.simantics.databoard.adapter;
 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;
@@ -52,9 +52,8 @@ import org.simantics.databoard.util.ObjectUtils;
  */
 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
        {               
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 58b2bc0cdad3163f3e0bbd8f58850df2ea6e4dd1..6f18a736b9a5b17b162635d3c5638055270cdc47 100644 (file)
@@ -6,6 +6,6 @@ Bundle-Version: 1.1.0.qualifier
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index d5dac69757e4c9bf0b0fd4c3e8cf3049a45f988c..a75fdc1e88bf7bb48c84c582720856bf1ce7e6a4 100644 (file)
@@ -4,7 +4,7 @@ Bundle-Name: Standard Datatype Library
 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",
index a3361b46b366da77f5e712486c8a61e8be2c6003..13a532f8e407ae9a9738af5cc9f1552b6776331a 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 27e43385191e53f6038eda67523c87df3594f5f4..a293714958e1da200758e09116c21861ce07f255 100644 (file)
@@ -4,10 +4,9 @@ Bundle-Name: DB Client Common Implementation
 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,
index f8026f59432c7701e2a134aa24dad97da447062e..0568b3103861ea64a28e6550e9dbd87cf11c381b 100644 (file)
@@ -116,4 +116,11 @@ public class UndoMetadata extends ACommentMetadata {
     public String getHeader() {
         return getType() + getRange();
     }
+    
+    /**
+     * Returns true when no change sets are included.
+     */
+    public boolean isEmpty() {
+        return begin == 0 && end == 0;
+    }
 }
index e9523c0c899628ee03fb29a4130067131044708a..dfb5780f96da2edfe4e8f7079c20812a8dfd051f 100644 (file)
@@ -33,7 +33,6 @@ import org.simantics.db.common.procedure.adapter.SyncMultiProcedureAdapter;
 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;
@@ -63,9 +62,13 @@ import org.simantics.db.request.WriteOnlyResult;
 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);
@@ -128,7 +131,7 @@ public class MergingGraphRequestProcessor implements AsyncRequestProcessor {
             try {
                 semaphore.acquire();
             } catch (InterruptedException e) {
-                       Logger.defaultLogError(e);
+                LOGGER.error("SyncWriteRequestAdapter interrupted", e);
             }
         }
 
@@ -223,7 +226,7 @@ public class MergingGraphRequestProcessor implements AsyncRequestProcessor {
                             try {
                                 MergingGraphRequestProcessor.this.wait(transactionKeepalivePeriod);
                             } catch (InterruptedException e) {
-                                       Logger.defaultLogError(e);
+                                LOGGER.error("MergedRead interrupted", e);
                             }
                             if (requestQueue.isEmpty())
                                 break;
@@ -262,7 +265,7 @@ public class MergingGraphRequestProcessor implements AsyncRequestProcessor {
 
                     } catch(Throwable t) {
 
-                               Logger.defaultLogError(t);
+                        LOGGER.error("MergedRead failed", t);
 
 //                        if(currentRequest.second instanceof AsyncProcedure<?>) {
 //                            ((AsyncProcedure<?>)currentRequest.second).exception(graph, t);
@@ -281,7 +284,7 @@ public class MergingGraphRequestProcessor implements AsyncRequestProcessor {
 
                 } else {
 
-                    try{
+                    try {
 
                         if(currentRequest.second instanceof AsyncProcedure<?>) {
                             if(currentRequest.first instanceof AsyncRead) {
@@ -298,7 +301,7 @@ public class MergingGraphRequestProcessor implements AsyncRequestProcessor {
 
                     } catch(Throwable t) {
 
-                               Logger.defaultLogError(t);
+                        LOGGER.error("MergedRead failed", t);
 
 //                        if(currentRequest.second instanceof AsyncProcedure<?>) {
 //                            ((AsyncProcedure<?>)currentRequest.second).exception(graph, t);
@@ -355,7 +358,7 @@ public class MergingGraphRequestProcessor implements AsyncRequestProcessor {
                             try {
                                 MergingGraphRequestProcessor.this.wait(transactionKeepalivePeriod);
                             } catch (InterruptedException e) {
-                                       Logger.defaultLogError(e);
+                                LOGGER.error("RunnerWriteGraphRequest interrupted", e);
                             }
                             if (requestQueue.isEmpty())
                                 break;
@@ -385,7 +388,7 @@ public class MergingGraphRequestProcessor implements AsyncRequestProcessor {
                         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);
                     }
 
@@ -399,7 +402,7 @@ public class MergingGraphRequestProcessor implements AsyncRequestProcessor {
                         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);
                     }
 
@@ -572,7 +575,7 @@ public class MergingGraphRequestProcessor implements AsyncRequestProcessor {
         Throwable t = throwable.get();
 
         if(t != null) {
-               Logger.defaultLogError(t);
+            LOGGER.error("syncRequest(AsyncMultiRead, AsyncMultiProcedure) failed", t);
             throw new RuntimeException(t.getMessage());
         }
         
@@ -625,7 +628,7 @@ public class MergingGraphRequestProcessor implements AsyncRequestProcessor {
         Throwable t = throwable.get();
 
         if(t != null) {
-               Logger.defaultLogError(t);
+            LOGGER.error("syncRequest(AsyncRead, AsyncProcedure) failed", t);
             throw new RuntimeException(t.getMessage());
         }
         
@@ -691,7 +694,7 @@ public class MergingGraphRequestProcessor implements AsyncRequestProcessor {
 
             @Override
             public void exception(Throwable t) {
-                       Logger.defaultLogError(t);
+                LOGGER.error("asyncRequest(AsyncRead) failed", t);
             }
 
         });
@@ -736,7 +739,7 @@ public class MergingGraphRequestProcessor implements AsyncRequestProcessor {
         Throwable t = throwable.get();
 
         if(t != null) {
-               Logger.defaultLogError(t);
+            LOGGER.error("syncRequest(AsyncRead) failed", t);
             throw new RuntimeException(t.getMessage());
         }
 
@@ -775,7 +778,7 @@ public class MergingGraphRequestProcessor implements AsyncRequestProcessor {
         Throwable t = throwable.get();
 
         if(t != null) {
-               Logger.defaultLogError(t);
+            LOGGER.error("syncRequest(AsyncMultiRead) failed", t);
             throw new RuntimeException(t.getMessage());
         }
 
@@ -878,7 +881,7 @@ public class MergingGraphRequestProcessor implements AsyncRequestProcessor {
 
             @Override
             public void exception(Throwable t) {
-                Logger.defaultLogError(t);
+                LOGGER.error("asyncRequest(Read) failed", t);
             }
 
         });
@@ -1305,4 +1308,9 @@ public class MergingGraphRequestProcessor implements AsyncRequestProcessor {
                throw new UnsupportedOperationException();
        }
        
+       @Override
+       public <T> T l0() {
+               return processor.l0();
+       }
+       
 }
index 1f00ff008674e73ada990c71e297e9f01afe2f19..f47ebb3f342ac302cb2dd43bf6bfaaf56d251d28 100644 (file)
@@ -46,6 +46,11 @@ import org.simantics.db.request.WriteResult;
 
 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();
index b3eba37fbdb4a0e395a90ea75c21a82abd1ad089..aeea33f0276c8a1de7dc0736bda0e86f03b0f72f 100644 (file)
@@ -14,7 +14,7 @@ import org.simantics.scl.runtime.function.FunctionImpl3;
  * @author Hannu Niemist&ouml;
  */
 public class AdaptValue extends ResourceRead<Object> {
-    
+
     public AdaptValue(Resource resource) {
         super(resource);
     }
@@ -31,14 +31,14 @@ public class AdaptValue extends ResourceRead<Object> {
                }
 
        };
-    
+
     @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);
-
     }
 
 }
index 117a1a27fb3d0e2fba3acab9ef9a57f7280858c2..73e612a9f4004b154478ad3893213e6960d5d8d3 100644 (file)
@@ -19,37 +19,41 @@ import org.simantics.db.service.QueryControl;
 
 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);
+    }
+
 }
diff --git a/bundles/org.simantics.db.common/src/org/simantics/db/common/utils/ErrorLogger.java b/bundles/org.simantics.db.common/src/org/simantics/db/common/utils/ErrorLogger.java
deleted file mode 100644 (file)
index 68ad374..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * 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);
-    }
-}
diff --git a/bundles/org.simantics.db.common/src/org/simantics/db/common/utils/LogManager.java b/bundles/org.simantics.db.common/src/org/simantics/db/common/utils/LogManager.java
deleted file mode 100644 (file)
index 9abae43..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * 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
index 143d3e443099f31c703503dfea77b1da7ea115f1..8e8171f85273e460bdf519df9eab706ba395b539 100644 (file)
@@ -220,6 +220,27 @@ public class OrderedSetUtils {
             }
     }
 
+    /**
+     * 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.
      */
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 21c4223f2478187252824c7bbcb694ba4327d657..b20d9aa0a77fc00546ea0cefb82452fb7ab2f84d 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
index 8f96bb9e6d3a51a48c7b98baa40f962fc83f5617..9f89a0d8fa2a4f2ede8474513ac9f8ae5ce33de1 100644 (file)
@@ -19,34 +19,31 @@ import org.simantics.db.impl.query.AsyncReadEntry;
 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();
@@ -112,34 +109,39 @@ public class BlockingAsyncProcedure<Result> implements AsyncProcedure<Result> {
         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) {
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/graph/ArraySet.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/graph/ArraySet.java
deleted file mode 100644 (file)
index 1360cef..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * 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();
-    }
-
-}
index 637db3f26f8e119173fbf29cbe54b46ed9b17002..f1e5b5cce10cc4758207a257c2f6cfeb4f0a3372 100644 (file)
@@ -14,13 +14,15 @@ package org.simantics.db.impl.graph;
 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;
@@ -107,7 +109,7 @@ public class AsyncBarrierImpl extends AtomicInteger implements AsyncBarrier {
                 }
             }
             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());
             }
index 48662d1903a08267a13dded57e04e04f8b85db6d..2309af76440b10bc2a3e9d336cf2fc4bdfc14819 100644 (file)
@@ -50,6 +50,7 @@ import org.simantics.db.DevelopmentKeys;
 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;
@@ -188,8 +189,6 @@ import org.simantics.utils.DataContainer;
 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;
@@ -1351,7 +1350,10 @@ public class ReadGraphImpl implements AsyncReadGraph {
 
                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());
                
        }
 
@@ -1513,15 +1515,15 @@ public class ReadGraphImpl implements AsyncReadGraph {
 
                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);
@@ -1848,13 +1850,42 @@ public class ReadGraphImpl implements AsyncReadGraph {
 
                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);
+
                } 
                
        }
@@ -1922,14 +1953,11 @@ public class ReadGraphImpl implements AsyncReadGraph {
         * 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)
@@ -1943,16 +1971,12 @@ public class ReadGraphImpl implements AsyncReadGraph {
                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,
@@ -2028,17 +2052,13 @@ public class ReadGraphImpl implements AsyncReadGraph {
                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,
@@ -5235,54 +5255,55 @@ public class ReadGraphImpl implements AsyncReadGraph {
                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,
@@ -6399,4 +6420,10 @@ public class ReadGraphImpl implements AsyncReadGraph {
         else return getTopLevelGraphStatic(impl.parentGraph);
     }
 
+    @SuppressWarnings("unchecked")
+    @Override
+    public <T> T l0() {
+        return (T) processor.getL0();
+    }
+
 }
index 0c4e681385da7ab25a4c5afae9217a649c1a7966..8cb1688fb73f584f1900f6589fd0a45c448c96c6 100644 (file)
@@ -14,10 +14,13 @@ package org.simantics.db.impl.graph;
 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;
@@ -31,7 +34,16 @@ import org.simantics.databoard.primitives.MutableLong;
 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;
@@ -69,8 +81,6 @@ import org.simantics.layer0.Layer0;
 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 {
 
@@ -683,7 +693,7 @@ 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) {
 
@@ -714,6 +724,76 @@ final public class WriteGraphImpl extends ReadGraphImpl implements WriteGraph {
         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
@@ -734,13 +814,13 @@ final public class WriteGraphImpl extends ReadGraphImpl implements WriteGraph {
         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);
         }
         
@@ -805,14 +885,14 @@ final public class WriteGraphImpl extends ReadGraphImpl implements WriteGraph {
 
         } 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);
index b4104e965fbc0b56be90fc40a8f0cd07eef5ab3a..23fbe95ecd6627453202e85e94a6711e6ae0d947 100644 (file)
@@ -241,5 +241,11 @@ final public class AssertedPredicates extends UnaryQuery<IntProcedure> {
         });
         
     }
-    
+
+    @Override
+    public void serializeValue(QuerySerializer serializer) {
+        IntArray is = getResult();
+        is.serialize(serializer);
+    }
+
 }
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/AssertedPredicatesFactory.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/AssertedPredicatesFactory.java
new file mode 100644 (file)
index 0000000..c76bc51
--- /dev/null
@@ -0,0 +1,21 @@
+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();
+    }
+
+}
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/AssertedStatementsFactory.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/AssertedStatementsFactory.java
new file mode 100644 (file)
index 0000000..708ce66
--- /dev/null
@@ -0,0 +1,21 @@
+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();
+    }
+
+}
index ea88d179107c920f9f10193f727907a56d39356e..7880448078dc0f7edb48701c4de7d9bac52e9fec 100644 (file)
@@ -190,4 +190,9 @@ final public class AsyncMultiReadEntry<T> extends CacheEntryBase<AsyncMultiProce
                return graph.processor.cache.performQuery(graph, id, this, procedure);
        }
 
+    @Override
+    public String classId() {
+        return null;
+    }
+
 }
index 5017151b10b9f8478bf1df7319326d020b0fb583..2fdb43d113332e4f33b6b131685fd8c80c112b22 100644 (file)
@@ -213,4 +213,9 @@ final public class AsyncReadEntry<T> extends CacheEntryBase<AsyncProcedure<T>> i
         }
     }
 
+    @Override
+    public String classId() {
+        return null;
+    }
+
 }
index d699ea825d9823cfb8c1f3454f13115ff4518455..04df0d00c5c8f1ea1222eee6000788e8e2a43bde 100644 (file)
@@ -66,4 +66,15 @@ public abstract class BinaryQuery<Procedure> extends CacheEntryBase<Procedure> i
 
     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());
+    }
+
 }
index 1cdcbde9dd0b11733b224877c4a5a0c7cf41cbe7..a650f32ce8dc6ee1f70166cbb3e21c31b6604f17 100644 (file)
@@ -11,6 +11,8 @@
  *******************************************************************************/
 package org.simantics.db.impl.query;
 
+import java.util.Collection;
+
 import org.simantics.db.exception.DatabaseException;
 import org.simantics.db.impl.graph.ReadGraphImpl;
 
@@ -40,10 +42,11 @@ public abstract class CacheEntry<Procedure> {
     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);
index e79f99deae1d06ab4469e1496accd8fbcacb3e97..98e7f0d00554f1c3f351339d8aa4b891028966ae 100644 (file)
@@ -12,6 +12,7 @@
 package org.simantics.db.impl.query;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Iterator;
 
 import org.simantics.databoard.Bindings;
@@ -277,7 +278,31 @@ public abstract class CacheEntryBase<Procedure> extends CacheEntry<Procedure> {
        }
         
     }
-    
+
+    @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) {
        
@@ -339,7 +364,7 @@ public abstract class CacheEntryBase<Procedure> extends CacheEntry<Procedure> {
     }
     
     @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);
@@ -471,5 +496,44 @@ public abstract class CacheEntryBase<Procedure> extends CacheEntry<Procedure> {
 
     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);
+    }
 
 }
index 8effbb1d549152bd21f0ecdae723bc0c7c81993d..79d3106a8c0074b9ce763e2c4188b819656eb48d 100644 (file)
@@ -142,6 +142,16 @@ public final class ChildMap extends UnaryQueryP<ObjectResourceIdMap<String>> {
 
     }
 
+    @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 + "]";
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/ChildMapFactory.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/ChildMapFactory.java
new file mode 100644 (file)
index 0000000..bf179b5
--- /dev/null
@@ -0,0 +1,28 @@
+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();
+    }
+
+}
index cd139655cfa647080f74d825ddbafdbf02dd433b..6e1692ba462f1af084d502959f25d41513c15e89 100644 (file)
@@ -11,9 +11,6 @@
  *******************************************************************************/
 package org.simantics.db.impl.query;
 
-
-
-
 abstract public class CollectionBinaryQuery<T> extends BinaryQuery<T> {
        
     public CollectionBinaryQuery(final int r1, final int r2) {
@@ -33,5 +30,11 @@ abstract public class CollectionBinaryQuery<T> extends BinaryQuery<T> {
         if(size == 0) setResult(IntArray.EMPTY);
         else v.trim();
     }
-    
+
+    @Override
+    public void serializeValue(QuerySerializer serializer) {
+        IntArray is = getResult();
+        is.serialize(serializer);
+    }
+
 }
index 90bb0355447acfeac8089b3f080d435f062a23e8..2eaeca472c2088d7d10156cc678506004dfdacbc 100644 (file)
@@ -96,4 +96,10 @@ public abstract class CollectionUnaryQuery extends UnaryQuery<IntProcedure> impl
         except(throwable);
     }
 
+    @Override
+    public void serializeValue(QuerySerializer serializer) {
+        IntArray is = getResult();
+        is.serialize(serializer);
+    }
+    
 }
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/DirectObjectsFactory.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/DirectObjectsFactory.java
new file mode 100644 (file)
index 0000000..323ec21
--- /dev/null
@@ -0,0 +1,21 @@
+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();
+    }
+
+}
index 1a006369a1d6867c0c788449f61900eae12d55ee..ee0faa1cfdd8b607ab59a8261e7e2c38af6d9e4b 100644 (file)
@@ -16,7 +16,7 @@ import org.simantics.db.exception.DatabaseException;
 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);
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/DirectPredicatesFactory.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/DirectPredicatesFactory.java
new file mode 100644 (file)
index 0000000..e707e62
--- /dev/null
@@ -0,0 +1,21 @@
+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();
+    }
+
+}
index d044043394ef771f7e7e0cfab3e5257f77883db6..2980b9b15f72e9a54b00a96fe06a397ef60b59b6 100644 (file)
@@ -28,7 +28,7 @@ final public class ExternalReadEntry<T> extends CacheEntryBase<AsyncProcedure<T>
     final LinkedList<T> items = new LinkedList<T>();
 
     protected ExternalRead<T> id;
-    protected ReadGraphImpl graph;
+    protected QueryProcessor processor;
     protected boolean registered = false;
 
     @Override
@@ -49,7 +49,7 @@ final public class ExternalReadEntry<T> extends CacheEntryBase<AsyncProcedure<T>
     public void discard() {
         id.unregistered();
         id = null;
-        graph = null;
+        processor = null;
         super.discard();
     }
 
@@ -65,7 +65,7 @@ final public class ExternalReadEntry<T> extends CacheEntryBase<AsyncProcedure<T>
     public ExternalReadEntry(ExternalRead<T> request, ReadGraphImpl graph) {
         assert request != null;
         this.id = request;
-        this.graph = graph;
+        this.processor = graph.processor;
     }
     
     @Override
@@ -213,7 +213,7 @@ final public class ExternalReadEntry<T> extends CacheEntryBase<AsyncProcedure<T>
 
                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.
                }
@@ -229,7 +229,12 @@ final public class ExternalReadEntry<T> extends CacheEntryBase<AsyncProcedure<T>
 
        @Override
        public boolean isDisposed() {
-               return registered && (isDiscarded() || !graph.processor.isBound(this));
+               return registered && (isDiscarded() || !processor.isBound(this));
        }
-    
+
+    @Override
+    public String classId() {
+        return null;
+    }
+
 }
index 6ee30ad70fd1d341930f11c35eabe2ecdf69af87..53b447f08b3da6e081bfff9d1a0452c4bd552bde 100644 (file)
@@ -13,6 +13,8 @@ package org.simantics.db.impl.query;
 
 import java.util.Arrays;
 
+import org.simantics.db.exception.DatabaseException;
+
 
 final public class IntArray {
 
@@ -111,7 +113,27 @@ 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)
index 3ef19b8f335ec9dbf60aeaf1df6bf818251d67a2..3f2e0140bda6f0a2da13dea02e7e24b7a77e8230 100644 (file)
@@ -32,8 +32,7 @@ final public class IntSet implements ResourceSet {
 
     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;
@@ -46,6 +45,8 @@ final public class IntSet implements ResourceSet {
 
     private IntSet() {
         support = null;
+        data = null;
+        sizeOrData = NO_DATA;
     }
 
     public IntSet(QuerySupport support) {
@@ -299,5 +300,26 @@ final public class IntSet implements ResourceSet {
         }
         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
index f74344b2fdb807dad60e1b746580f81cb106ad80..c84b63dc61a5d6304cf52c3478c8c91a7ca9f7e3 100644 (file)
@@ -37,569 +37,566 @@ import org.simantics.db.request.RequestFlags;
 
 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) {
@@ -607,63 +604,63 @@ public final class Objects extends CollectionBinaryQuery<IntProcedure> implement
         } 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 {
@@ -683,4 +680,10 @@ public final class Objects extends CollectionBinaryQuery<IntProcedure> implement
         except(throwable);
     }
 
+    @Override
+    public void serializeValue(QuerySerializer serializer) {
+        IntArray is = getResult();
+        is.serialize(serializer);
+    }
+    
 }
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/ObjectsFactory.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/ObjectsFactory.java
new file mode 100644 (file)
index 0000000..f6758e6
--- /dev/null
@@ -0,0 +1,21 @@
+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();
+    }
+
+}
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/OrderedSetFactory.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/OrderedSetFactory.java
new file mode 100644 (file)
index 0000000..9b5f581
--- /dev/null
@@ -0,0 +1,21 @@
+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();
+    }
+
+}
index 9445db03b4e048ca1488cb22f45eeaa56da9bdd1..982d8019c0c7cdd6328b791fa2071baf98ece9f9 100644 (file)
@@ -19,7 +19,7 @@ import org.simantics.db.request.RequestFlags;
 
 import gnu.trove.procedure.TIntProcedure;
 
-final public class Predicates extends UnaryQueryP<IntSet> {
+final public class Predicates extends UnaryQueryPIntSet {
 
        Predicates(final int r) {
         super(r);
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/PredicatesFactory.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/PredicatesFactory.java
new file mode 100644 (file)
index 0000000..c86e43c
--- /dev/null
@@ -0,0 +1,21 @@
+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();
+    }
+
+}
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/PrincipalTypesFactory.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/PrincipalTypesFactory.java
new file mode 100644 (file)
index 0000000..ccd4ddc
--- /dev/null
@@ -0,0 +1,21 @@
+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();
+    }
+
+}
index f80fb5098b847d9264768be6c833c39d38a7ac24..b0bca135042fbe99a5f07ffc3f4cab28628a164b 100644 (file)
@@ -4,13 +4,10 @@ import java.util.ArrayList;
 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;
@@ -24,7 +21,6 @@ import org.simantics.db.request.AsyncRead;
 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;
@@ -980,5 +976,158 @@ public class QueryCacheBase {
        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
index 7bab1a77a9f6dbc60280e012a623566ddcb104e6..e6dc252c41f210d00586895aeabe6d7c619001f3 100644 (file)
@@ -42,6 +42,10 @@ class QueryCollectorImpl implements QueryProcessor.QueryCollector {
        @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
@@ -144,6 +148,7 @@ class QueryCollectorImpl implements QueryProcessor.QueryCollector {
                                                        
                                                } else {
                                                        
+                                                       entry.pruneParentSet();
                                                        support.setLevel(entry, parent.getLevel() + 1);
                                                        
                                                }
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryDeserializer.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryDeserializer.java
new file mode 100644 (file)
index 0000000..0fe9b9c
--- /dev/null
@@ -0,0 +1,227 @@
+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);
+    }
+
+}
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryFactory.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryFactory.java
new file mode 100644 (file)
index 0000000..c4b3f9f
--- /dev/null
@@ -0,0 +1,8 @@
+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;
+}
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryFactoryBase.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryFactoryBase.java
new file mode 100644 (file)
index 0000000..a193cce
--- /dev/null
@@ -0,0 +1,25 @@
+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;
+    }
+
+}
index c2b21444fd17157753d2cfc303bd8b4932a488fa..2db67c67970b165f836317cbbaaabea40fa6994d 100644 (file)
  *******************************************************************************/
 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.
@@ -59,7 +61,7 @@ abstract public class QueryIdentityHash extends THash {
         }
 
         @Override
-        public Iterable<CacheEntry> getParents(QueryProcessor processor) {
+        public Collection<CacheEntry> getParents(QueryProcessor processor) {
             // TODO Auto-generated method stub
             return null;
         }
@@ -227,7 +229,11 @@ abstract public class QueryIdentityHash extends THash {
                        // TODO Auto-generated method stub
                        return null;
                }
-        
+
+        @Override
+            void pruneParentSet() {
+        }
+
     };
 
     /**
index 3a7eb61820203ffc5e079d0a57b12f7fe8c86842..ac2602fcb647b4ad54e8de9edf1a8c4412313d95 100644 (file)
@@ -147,7 +147,25 @@ final public class QueryIdentityHashSet extends QueryIdentityHash implements Ite
         }
         
     }
-    
+
+    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.
index dd410b4ce7e8c57fba7e86d94a30dbb7b9ec1e9f..e0b39d6516055656995689f90c1506c19bb26265 100644 (file)
@@ -14,15 +14,12 @@ import java.util.LinkedList;
 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;
@@ -34,11 +31,10 @@ import gnu.trove.set.hash.THashSet;
 
 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>();
@@ -46,210 +42,11 @@ public class QueryListening {
 
     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();
         
     }
@@ -260,7 +57,7 @@ public class QueryListening {
     
     void sync() {
         try {
-            scheduler.flush();
+            scheduler.sync();
         } catch (Throwable t) {
             LOGGER.error("Error while waiting for query dependency management", t);
         }
@@ -276,7 +73,7 @@ public class QueryListening {
         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);
             }
@@ -284,7 +81,7 @@ public class QueryListening {
 
         if(listener != null)
             if(!listener.isDisposed())
-                consumer.accept(new RegisterListenerRunnable(this, listener, procedure, parent, child));
+               scheduler.accept(new RegisterListenerRunnable(this, listener, procedure, parent, child));
 
     }
 
@@ -292,10 +89,7 @@ public class QueryListening {
         
         if(base == null) return;
 
-        consumer.accept(() -> {
-            ListenerEntry entry = addedEntries.get(base);
-            if(entry != null) entry.setLastKnown(result);
-        });
+        scheduler.accept(new RegisterFirstKnownRunnable(addedEntries, base, result));
 
     }
 
@@ -413,7 +207,7 @@ public class QueryListening {
 
     }
 
-    public void fireListeners(WriteGraphImpl graph) {
+    public void fireListeners(ReadGraphImpl graph) {
 
         assert (!processor.updating);
         assert (!processor.cache.collecting);
@@ -529,5 +323,102 @@ public class QueryListening {
         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);
+        }
+
+    }
+
 }
index a46bc0e8dd4e1b024dea3b0dd8d7269b10a19192..f61c661d19cbd7eb47fbf15de27ef4bb9035627c 100644 (file)
@@ -32,6 +32,7 @@ import java.util.concurrent.Semaphore;
 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;
@@ -42,6 +43,7 @@ import org.simantics.db.Resource;
 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;
@@ -68,9 +70,11 @@ import org.simantics.db.request.AsyncMultiRead;
 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;
@@ -1069,6 +1073,82 @@ final public class QueryProcessor extends AbstractDisposable implements ReadGrap
 
        }
 
+    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.
@@ -1279,8 +1359,9 @@ final public class QueryProcessor extends AbstractDisposable implements ReadGrap
                        entry.prepareRecompute(querySupport);
                        
                        ReadGraphImpl parentGraph = graph.forRecompute(entry);
-
+                       parentGraph.asyncBarrier.inc();
                        query.recompute(parentGraph);
+                       parentGraph.asyncBarrier.dec();
 
                        if(entry.isExcepted()) return ListenerEntry.NO_VALUE;
 
@@ -1759,6 +1840,12 @@ final public class QueryProcessor extends AbstractDisposable implements ReadGrap
                }
                return result;
        }
+       
+       public long cluster(int resource) {
+           if(resource <= 0)
+               return 0;
+           return querySupport.getClusterId(resource);
+       }
 
        public void assertDone() {
        }
@@ -4053,6 +4140,10 @@ final public class QueryProcessor extends AbstractDisposable implements ReadGrap
                return L0;
        }
 
+       public Layer0 getL0() {
+               return L0;
+       }
+
     public static ThreadLocal<Integer> thread = new ThreadLocal<Integer>() {
         protected Integer initialValue() {
             return -1;
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QuerySerializer.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QuerySerializer.java
new file mode 100644 (file)
index 0000000..06b0140
--- /dev/null
@@ -0,0 +1,136 @@
+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;
+    }
+
+}
index 3071c30c042d8730799004eec9d10b7168b70fd4..0a0a207fdc4d8d90b51ac93e594bc417489984f8 100644 (file)
@@ -13,17 +13,23 @@ package org.simantics.db.impl.query;
 
 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);
index 8f547d22b3e950a9c3b87e035fd9a0e07a4aef08..4fb5ed996011a047659a22158477103d216c6f41 100644 (file)
@@ -214,4 +214,9 @@ public final class ReadEntry<T> extends CacheEntryBase<AsyncProcedure<T>> implem
         except(throwable);
     }
 
+    @Override
+    public String classId() {
+        return null;
+    }
+
 }
index cffd2984a0c31219acfcb740aa7cf921df0e709e..367e75f632c3cdd10e592286fb06cacdb13548b6 100644 (file)
@@ -100,4 +100,13 @@ public final class RelationInfoQuery extends UnaryQueryP<RelationInfo> {
                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);
+    }
+
 }
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/RelationInfoQueryFactory.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/RelationInfoQueryFactory.java
new file mode 100644 (file)
index 0000000..05adb56
--- /dev/null
@@ -0,0 +1,26 @@
+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();
+    }
+
+}
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/Scheduler.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/Scheduler.java
new file mode 100644 (file)
index 0000000..2c9c475
--- /dev/null
@@ -0,0 +1,203 @@
+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
index 6652f1b6bac9aac657ec22aa8c2f2d329591b8aa..218777413fe496a3afbba9d8dfb142a1fd0f1194 100644 (file)
@@ -11,8 +11,6 @@
  *******************************************************************************/
 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;
@@ -24,93 +22,93 @@ import org.simantics.db.procedure.ListenerBase;
 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]);
+                    }
                 }
             }
 
@@ -118,322 +116,336 @@ public final class Statements extends CollectionBinaryQuery<TripleIntProcedure>
             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);
+                }
 
             }; 
 
@@ -442,57 +454,57 @@ public final class Statements extends CollectionBinaryQuery<TripleIntProcedure>
                 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);
@@ -502,36 +514,30 @@ public final class Statements extends CollectionBinaryQuery<TripleIntProcedure>
                 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)) {
 
@@ -560,30 +566,30 @@ public final class Statements extends CollectionBinaryQuery<TripleIntProcedure>
                                 });
 
                             }
-                            
+
                         } 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) {
@@ -593,16 +599,16 @@ public final class Statements extends CollectionBinaryQuery<TripleIntProcedure>
         }
 
         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) {
@@ -614,95 +620,95 @@ public final class Statements extends CollectionBinaryQuery<TripleIntProcedure>
         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
@@ -719,5 +725,5 @@ public final class Statements extends CollectionBinaryQuery<TripleIntProcedure>
     public void exception(ReadGraphImpl graph, Throwable throwable) throws DatabaseException {
         except(throwable);
     }
-    
+
 }
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/StatementsFactory.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/StatementsFactory.java
new file mode 100644 (file)
index 0000000..7639235
--- /dev/null
@@ -0,0 +1,21 @@
+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();
+    }
+
+}
index 1f540062e9440d2db81164ee820c05566f4a55c0..5c6e8e43947917da321343525984fdb8a362d47a 100644 (file)
@@ -21,7 +21,7 @@ import org.simantics.db.impl.procedure.InternalProcedure;
 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);
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/SuperRelationsFactory.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/SuperRelationsFactory.java
new file mode 100644 (file)
index 0000000..9011b46
--- /dev/null
@@ -0,0 +1,21 @@
+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();
+    }
+
+}
index a02fda4623342fc7d80889f8c543f6d5aec70316..f3dc03e14ffb2c85f7f7885516a45c130ab67709 100644 (file)
@@ -17,7 +17,7 @@ import org.simantics.db.impl.procedure.InternalProcedure;
 
 import gnu.trove.procedure.TIntProcedure;
 
-public final class SuperTypes extends UnaryQueryP<IntSet> {
+public final class SuperTypes extends UnaryQueryPIntSet {
 
     SuperTypes(int resource) {
         super(resource);
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/SuperTypesFactory.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/SuperTypesFactory.java
new file mode 100644 (file)
index 0000000..edb82ef
--- /dev/null
@@ -0,0 +1,21 @@
+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();
+    }
+
+}
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/TaskList.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/TaskList.java
new file mode 100644 (file)
index 0000000..7734bae
--- /dev/null
@@ -0,0 +1,24 @@
+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
index 5c2be0c64e6dca1908b182ee340073de9405bfa3..323bbd42dc66d811e1b2db14d8eb39c724585bd1 100644 (file)
@@ -18,7 +18,7 @@ import org.simantics.db.procedure.ListenerBase;
 
 import gnu.trove.procedure.TIntProcedure;
 
-public final class TypeHierarchy extends UnaryQueryP<IntSet> {
+public final class TypeHierarchy extends UnaryQueryPIntSet {
 
     TypeHierarchy(int resource) {
         super(resource);
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/TypeHierarchyFactory.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/TypeHierarchyFactory.java
new file mode 100644 (file)
index 0000000..d8120b7
--- /dev/null
@@ -0,0 +1,21 @@
+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();
+    }
+
+}
index a9fe36bc6bfcb60608e2758f3a28721c165e09dc..bb0d11a243193da746bb88804696317503dc941f 100644 (file)
@@ -19,7 +19,7 @@ import org.simantics.db.impl.procedure.InternalProcedure;
 
 import gnu.trove.procedure.TIntProcedure;
 
-public final class Types extends UnaryQueryP<IntSet> {
+public final class Types extends UnaryQueryPIntSet {
 
     Types(int resource) {
         super(resource);
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/TypesFactory.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/TypesFactory.java
new file mode 100644 (file)
index 0000000..014b0ee
--- /dev/null
@@ -0,0 +1,21 @@
+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();
+    }
+
+}
index ec7ebeed7fad0324035280af18dc69225307c1ac..9dae343e39b3e7028e2e46d0f14def1d6dfbcc1e 100644 (file)
@@ -144,4 +144,20 @@ public class URIToResource extends StringQuery<InternalProcedure<Integer>> imple
         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);
+    }
+
 }
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/URIToResourceFactory.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/URIToResourceFactory.java
new file mode 100644 (file)
index 0000000..ca82ff6
--- /dev/null
@@ -0,0 +1,21 @@
+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();
+    }
+
+}
index fd6cd7d879374bb8af81c18a40058137b46aed2e..fe24846aa318539da2524f19a0c50b4a2e382d5c 100644 (file)
@@ -15,6 +15,8 @@ import org.simantics.db.exception.DatabaseException;
 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;
@@ -68,4 +70,14 @@ public abstract class UnaryQuery<Procedure> extends CacheEntryBase<Procedure> im
         return graph.processor.isImmutable(id);
     }
     
+    @Override
+    public long cluster(QueryProcessor processor) {
+        return processor.cluster(id);
+    }
+    
+    @Override
+    public void serializeKey(QuerySerializer serializer) {
+        serializer.addResource(id);
+    }
+    
 }
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/UnaryQueryPIntSet.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/UnaryQueryPIntSet.java
new file mode 100644 (file)
index 0000000..cf82479
--- /dev/null
@@ -0,0 +1,15 @@
+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);
+    }
+
+}
index ad4017f9cff863c0a2bbe42a4fb9458a655e57f2..f04df9f6846097d6b03c1f1b0bc5411ca71af248 100644 (file)
@@ -45,6 +45,17 @@ public final class ValueQuery extends UnaryQueryP<byte[]> {
         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() {
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/ValueQueryFactory.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/ValueQueryFactory.java
new file mode 100644 (file)
index 0000000..4a746fd
--- /dev/null
@@ -0,0 +1,21 @@
+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();
+    }
+
+}
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 501876664d98982e6dacaf3035c268c87d9118ce..0655ab9229192b58f542e5253a35224f197e9f58 100644 (file)
@@ -10,8 +10,8 @@ Require-Bundle: org.eclipse.core.runtime,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 28801e2782958a0ab5907a7be8d7665c168b6b4c..17fc2ed8c51883fe630e9a3e66ab16913d55f5af 100644 (file)
@@ -3,13 +3,12 @@ Bundle-ManifestVersion: 2
 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,
index 517ce761ed4d7d8686ae501ae942090f5854fc61..6ad6315b989c8b0704c78f53519131864fa53fc2 100644 (file)
@@ -27,41 +27,43 @@ import org.simantics.scl.runtime.function.FunctionImpl3;
  */
 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;
     }
 
 }
index 4e775e08a22e12597044218f138aef3cfcaf6637..671810d8e40853938414353d82fdc7440ccb37bd 100644 (file)
@@ -36,7 +36,6 @@ import org.simantics.db.common.uri.UnescapedChildMapOfResource;
 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;
@@ -92,15 +91,19 @@ import org.simantics.simulator.variable.exceptions.NodeManagerException;
 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) {
@@ -108,59 +111,61 @@ public class All {
             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) {
@@ -173,61 +178,61 @@ public class All {
                 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);
@@ -243,8 +248,8 @@ public class All {
                             } catch (NodeManagerException e) {
                                 throw new RuntimeException(e);
                             } catch (BindingException e) {
-                                   throw new RuntimeException(e);
-                               }
+                                throw new RuntimeException(e);
+                            }
                         }
                     });
                 } catch(RuntimeException e) {
@@ -262,31 +267,31 @@ public class All {
 
                 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
@@ -297,42 +302,42 @@ public class All {
                                 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 {
@@ -360,25 +365,25 @@ public class All {
     }
 
     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() {
@@ -409,54 +414,54 @@ public class All {
 //             }
 //             
 //     };
-       
-       @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);
@@ -471,7 +476,7 @@ public class All {
         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)
@@ -511,41 +516,41 @@ public class All {
     }
 
     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;
@@ -556,249 +561,249 @@ public class All {
                 }
             }
             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("");
@@ -813,24 +818,24 @@ public class All {
 
     @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.
@@ -840,18 +845,18 @@ public class All {
      * @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;
@@ -866,368 +871,371 @@ public class All {
      * @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();
@@ -1236,129 +1244,130 @@ public class All {
                         }
                     }
                     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;
@@ -1373,63 +1382,63 @@ public class All {
             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();
 
     }
 
@@ -1439,197 +1448,197 @@ public class All {
         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 {
index 0aa36390b6030ed4068ed99ed9c5160640feeb73..83837a960a6950888baf3180b664be0fadfb4fbb 100644 (file)
@@ -13,13 +13,14 @@ package org.simantics.db.layer0.genericrelation;
 
 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:
@@ -30,6 +31,8 @@ import org.simantics.scl.runtime.function.UnsaturatedFunction2;
  */
 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";
@@ -71,10 +74,15 @@ public class Dependencies extends FunctionImpl4<ReadGraph, Resource, String, Int
             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;
         }
     }
index 1702af0f38e6182832673997ab7b55588ae5f335..a2059a6ad27264b02381a3b4400d18f7ed5a5401 100644 (file)
@@ -13,13 +13,14 @@ package org.simantics.db.layer0.genericrelation;
 
 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:
@@ -30,6 +31,8 @@ import org.simantics.scl.runtime.function.UnsaturatedFunction2;
  */
 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;
     }
@@ -61,10 +64,15 @@ public class DependencyResources extends FunctionImpl4<ReadGraph, Resource, Stri
             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;
         }
     }
index 1bcd918771f3db8520507e6893b2de2376d61164..16f88a340a63e7f9dfeb9c0d7ef751a7ff8e7048 100644 (file)
@@ -179,7 +179,6 @@ implements Read<Function1<EvaluationContext,Object>> {
                 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!
index a4ac87b50d1472d02626647145e6c412905aa7b6..b12d5ad2b9b4ab9d2f7d74733a2ebfe1fae21b71 100644 (file)
@@ -37,7 +37,28 @@ public abstract class HierarchyMultiMap<A,B> {
         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.
index 830f7a6bb74776ece6a99b35eb3b9b51999cc10a..ad8676f813bdb83d4da1adde8aed547c31541ddb 100644 (file)
@@ -1202,6 +1202,10 @@ public class Layer0Utils {
 
     }
 
+    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();
index c168e22860b25dba84ff1b715376c4a878effcfb..c48ec36309e601cf885f9b8125f16f7e79c579f8 100644 (file)
@@ -76,7 +76,18 @@ public class SessionGarbageCollection {
         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);
     }
diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/NoPredicateResourceException.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/NoPredicateResourceException.java
new file mode 100644 (file)
index 0000000..a1b7463
--- /dev/null
@@ -0,0 +1,34 @@
+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);
+       }
+
+}
index 5d21ca56bdf5ab3a0d0ba9aa7cd7a11542379920..707fdbd0ee46463a586eda41827beb5b9118085f 100644 (file)
@@ -7,174 +7,177 @@ import java.util.Map;
 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
index 2bd089d1e8ed1589ecadb76f6f18662169b405ef..b44f16b30eeedc3ca7ee15fd9d023e0505703a9b 100644 (file)
@@ -6,44 +6,48 @@ import org.simantics.databoard.binding.mutable.Variant;
 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));
     }
@@ -55,18 +59,18 @@ class NodeValueRequest extends ParametrizedPrimitiveRead<Pair<VariableNode,Bindi
     @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;
@@ -87,37 +91,35 @@ class NodeValueRequest extends ParametrizedPrimitiveRead<Pair<VariableNode,Bindi
 //                }
 //            }
 //            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();
 //        }
@@ -145,61 +147,64 @@ class NodeValueRequest extends ParametrizedPrimitiveRead<Pair<VariableNode,Bindi
 //            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;
@@ -209,11 +214,13 @@ class NodeValueRequest extends ParametrizedPrimitiveRead<Pair<VariableNode,Bindi
         } 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.
@@ -221,8 +228,8 @@ class NodeValueRequest extends ParametrizedPrimitiveRead<Pair<VariableNode,Bindi
         if (listener != null) {
             //System.out.println("LISTENER " + listener + " invoked with value " + value);
             listener.execute(value);
+            wasRun = true;
         }
-        wasRun = true;
     }
 
     @Override
index b7eaf075edea1c1e051981662954629f70673cf1..c9214e398c69577da69642536c8b932e67e5bc69 100644 (file)
@@ -21,6 +21,7 @@ import org.simantics.db.exception.DatabaseException;
 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;
@@ -100,11 +101,15 @@ public class StandardGraphPropertyVariable extends AbstractPropertyVariable {
 
        @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);
        }
 
@@ -124,10 +129,12 @@ public class StandardGraphPropertyVariable extends AbstractPropertyVariable {
                
                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);
+                                       }
                                }
                        }
                }
@@ -145,10 +152,12 @@ public class StandardGraphPropertyVariable extends AbstractPropertyVariable {
 
                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);
+                                       }
                                }
                        }
                }
@@ -183,10 +192,12 @@ public class StandardGraphPropertyVariable extends AbstractPropertyVariable {
                
                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);
+                                       }
                                }
                        }
                }
@@ -200,10 +211,12 @@ public class StandardGraphPropertyVariable extends AbstractPropertyVariable {
                
                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);
+                                       }
                                }
                        }
                }
@@ -324,11 +337,15 @@ public class StandardGraphPropertyVariable extends AbstractPropertyVariable {
        
        @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;
        }
        
index 341a496a4ff2778a3e9972cb2c0c998dbe9f6114..218a268a464097916f666d44cf3c20f91115a166 100644 (file)
@@ -32,7 +32,6 @@ import org.simantics.db.WriteGraph;
 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;
@@ -53,14 +52,19 @@ import org.simantics.scl.runtime.function.Function1;
 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) {
@@ -154,8 +158,8 @@ final public class Variables {
 
     @Deprecated
     public final static String[] builtins = {
-        TYPE, RESOURCE, URI
-        //, SERIALISED
+            TYPE, RESOURCE, URI
+            //, SERIALISED
     };
 
     public static Variable getPossibleVariable(ReadGraph graph, Resource resource) throws DatabaseException {
@@ -309,15 +313,15 @@ final public class Variables {
     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);
@@ -382,7 +386,7 @@ final public class Variables {
         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);
@@ -546,12 +550,12 @@ final public class Variables {
     }
 
     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);
 
     }
 
@@ -641,25 +645,26 @@ final public class Variables {
     }
 
     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;
@@ -699,51 +704,51 @@ final public class Variables {
         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;
+        }
+
     }
 
     /**
@@ -790,8 +795,10 @@ final public class Variables {
                     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;
             }
         }
@@ -814,10 +821,9 @@ final public class Variables {
             try {
                 result = NodeStructureRequest.get(n);
             } catch (NodeManagerException e) {
-                Logger.defaultLogError(e);
                 exception = e;
             }
-        }
+         }
 
     };
 
@@ -825,12 +831,12 @@ final public class Variables {
         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);
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 75fdb8b6f209d4850f4bf5fa55b4b1ce2872ef6f..4794e15f160d48ef5064da345ad386c63a938d5c 100644 (file)
@@ -11,6 +11,6 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.5.0",
 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
 
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index bf25b3db217e4314b21f88af2abd4ed4cec966a5..ac40619dfa17c772fb96ba3b2dbdeb8c89dc0fd4 100644 (file)
@@ -4,8 +4,7 @@ Bundle-Name: ProCore Database Access
 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",
@@ -24,6 +23,6 @@ Import-Package: org.eclipse.core.runtime,
  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
index 200e9e3c14f573478c4c50c2a3809266d77c5602..efb644acd78330df99bd86c305a1d21e73646ea7 100644 (file)
@@ -526,10 +526,11 @@ public final class ClusterTable implements IClusterTable {
                 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;
                     }
                 }
index 3b05bcba6d67baabc0ee5afcf48557f522f3b384..ca5eb0825a3c6462676dcee91124d4b2384b2021 100644 (file)
@@ -45,6 +45,7 @@ import org.simantics.scl.runtime.function.FunctionImpl2;
 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;
@@ -53,6 +54,8 @@ import gnu.trove.set.hash.TIntHashSet;
 
 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>>();
@@ -106,6 +109,21 @@ public class DebugSupportImpl implements DebugSupport {
 
                });
 
+        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
index 8b26442d87ff6c70a6e37e4a8dfa980d9f342e2b..02daf860e7945fcb27345d264a4a36026373642a 100644 (file)
@@ -214,5 +214,5 @@ final class ObjectResourceMap<T> implements Map<T, Resource>, ObjectResourceIdMa
        public int getId(T t) {
                return backend.get(t);
        }
-
+       
 }
\ No newline at end of file
index 237e8b50b96f2f88a006662f14a1571f5770a07b..f5e55deaae4d8a3b45b434c50c84c76577943836 100644 (file)
@@ -13,11 +13,16 @@ import org.simantics.db.impl.graph.ReadGraphImpl;
 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) {
@@ -47,7 +52,7 @@ public class QueryControlImpl implements QueryControl {
                 
             });
         } catch (DatabaseException e) {
-            e.printStackTrace();
+            LOGGER.error("query flush failed", e);
         }
         return result.get();
     }
@@ -78,7 +83,7 @@ public class QueryControlImpl implements QueryControl {
                 }
             });
         } catch (DatabaseException e) {
-            e.printStackTrace();
+            LOGGER.error("query gc failed", e);
         }
     }
 
@@ -141,6 +146,17 @@ public class QueryControlImpl implements QueryControl {
                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) {
index eea97e2e0a673c0050cf0f14f6aa1d2c99494719..0febcea1b87b2781c3c5461a2adb051d929e42a9 100644 (file)
@@ -5,6 +5,7 @@ import java.io.InputStream;
 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;
@@ -83,7 +84,17 @@ public class QuerySupportImpl implements QuerySupport {
        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);
index 92c5e9dda255a93b19ffeb21954a2c4153c7c674..2b7f2da3358778d90495a7a20b59b12f69ed9ed3 100644 (file)
@@ -18,7 +18,6 @@ import org.simantics.db.SessionManager;
 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;
@@ -30,9 +29,13 @@ import org.simantics.db.impl.graph.WriteSupport;
 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
@@ -58,7 +61,7 @@ final public class SessionImplDb extends SessionImplSocket {
         try {
             newId = cluster.createResource(clusterTranslator);
         } catch (DatabaseException e) {
-            Logger.defaultLogError(e);
+            LOGGER.error("createResource failed", e);
             return null;
         }
         return new ResourceImpl(resourceSupport, newId);
@@ -90,6 +93,9 @@ final public class SessionImplDb extends SessionImplSocket {
             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);
@@ -114,8 +120,7 @@ final public class SessionImplDb extends SessionImplSocket {
 //            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);
index 22d0f316545762d4937b384bea9fd648e8bdd441..29c70445bd208dd190c9796b60f2e31f46408dca 100644 (file)
@@ -328,7 +328,7 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule
         try {
             getClusterTable().refresh(csid, this, clusterUID);
         } catch (Throwable t) {
-            Logger.defaultLogError("Refesh failed.", t);
+            LOGGER.error("refresh({}, {}) failed", thread, csid, t);
         }
     }
 
@@ -461,17 +461,17 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule
                     });
 
                     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);
                     }
 
@@ -482,7 +482,7 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule
 
                     // 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);
@@ -571,52 +571,21 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule
                 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();
 
             }
@@ -657,7 +626,7 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule
                             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);
                     }
                 };
 
@@ -1355,7 +1324,7 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule
                 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  {
 
@@ -1561,7 +1530,7 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule
                                 if(throwable != null) {
                                     throwable.set(th);
                                 } else {
-                                    Logger.defaultLogError("Unhandled exception", th);
+                                    LOGGER.error("Unhandled exception", th);
                                 }
 
                             }
@@ -1574,7 +1543,7 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule
                             if(throwable != null) {
                                 throwable.set(t);
                             } else {
-                                Logger.defaultLogError("Unhandled exception", t);
+                                LOGGER.error("Unhandled exception", t);
                             }
 
                             try {
@@ -1586,7 +1555,7 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule
                                 if(throwable != null) {
                                     throwable.set(t2);
                                 } else {
-                                    Logger.defaultLogError("Unhandled exception", t2);
+                                    LOGGER.error("Unhandled exception", t2);
                                 }
 
                             }
@@ -1626,6 +1595,7 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule
                 ITask task = ThreadLogger.task(request);
 
                 final ReadGraphImpl newGraph = ReadGraphImpl.create(getQueryProvider2());
+                newGraph.asyncBarrier.inc();
 
                 try {
 
@@ -1663,6 +1633,8 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule
 
                 } finally {
 
+                    newGraph.asyncBarrier.dec();
+
                     fireSessionVariableChange(SessionVariables.QUEUED_READS);
 
                 }
@@ -2479,6 +2451,7 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule
                 return;
 
             WriteGraphImpl reactionGraph = WriteGraphImpl.create(graph.processor, writeSupport, null);
+            reactionGraph.asyncBarrier.inc();
 
             try {
 
@@ -2493,6 +2466,8 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule
 
             } finally {
 
+                reactionGraph.asyncBarrier.dec();
+
             }
 
         } catch (Throwable t) {
@@ -2536,39 +2511,41 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule
      */
     @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;
+        }
     }
 
     /*
@@ -2615,9 +2592,9 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule
             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);
             }
         }
     }
@@ -3604,4 +3581,10 @@ public abstract class SessionImplSocket implements Session, WriteRequestSchedule
         state.setCombine(false);
     }
 
+    @SuppressWarnings("unchecked")
+    @Override
+    public <T> T l0() {
+        return (T) L0;
+    }
+
 }
index 50184528e6f7641719c2f0e3da3caf8e7212bf10..d90f2c3a530a06b6d9fb47bca020005c7c2e5bb4 100644 (file)
@@ -16,7 +16,6 @@ import java.io.IOException;
 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;
@@ -24,6 +23,8 @@ import org.simantics.db.impl.ResourceImpl;
 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;
@@ -31,6 +32,9 @@ import fi.vtt.simantics.procore.ProCoreSessionReference;
 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 {
@@ -75,12 +79,11 @@ public class SessionImplVirtual extends SessionImplSocket {
         } 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);
         }
@@ -108,7 +111,7 @@ public class SessionImplVirtual extends SessionImplSocket {
         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;
         }
     }
index 4c6e77b1a94729c0274078ef5318ffcf30a51f36..1e468f2c3f25e2e3e50cc6487fc02e57d3a7017e 100644 (file)
@@ -24,6 +24,7 @@ import org.simantics.db.common.utils.Logger;
 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;
@@ -340,7 +341,10 @@ class State {
 
 //                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. ");
 
index ea4319ace00c464095ab59547d93f6ce2da11ba7..247df4645c5b207c13f2e19dbb94d84af31bc850 100644 (file)
@@ -8,7 +8,6 @@ import org.simantics.db.VirtualGraph;
 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;
@@ -28,9 +27,13 @@ import org.simantics.db.request.WriteOnly;
 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;
@@ -122,7 +125,7 @@ public class WriteSupportImpl implements WriteSupport {
                 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 {
@@ -134,7 +137,7 @@ public class WriteSupportImpl implements WriteSupport {
                 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());
@@ -199,7 +202,7 @@ public class WriteSupportImpl implements WriteSupport {
             try { 
                 cluster.removeValue(key, session.clusterTranslator);
             } catch (DatabaseException e) {
-                Logger.defaultLogError(e);
+                LOGGER.error("denyValue({}, {}) failed", provider, resource, e);
                 return;
             }
             queryProcessor.updateValue(key);
@@ -460,7 +463,7 @@ public class WriteSupportImpl implements WriteSupport {
             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);
@@ -480,7 +483,7 @@ public class WriteSupportImpl implements WriteSupport {
             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;
@@ -504,7 +507,7 @@ public class WriteSupportImpl implements WriteSupport {
         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);
index 05870668616b258e648634e5ac4383a88f8277f1..7a9be048055fdcff23e9831a2882917d2d5ede6d 100644 (file)
@@ -1,5 +1,7 @@
 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;
@@ -175,5 +177,14 @@ public class XSupportImpl implements XSupport {
                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);
+        }
+    }
+
 }
index b862a296d38fe04269faeee6c9d77d11ff77380d..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,7 +1,7 @@
-<?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>
index 295926d964165896ea8aa7c1b1b3c9d3d3caa77e..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
-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
index dceca2ea8a5f14f989228c4197dc129c1b9a3973..bd2c64b3193596f5613b1659f197528469bd5304 100644 (file)
@@ -7,12 +7,10 @@ Bundle-Activator: org.simantics.db.server.internal.Activator
 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,
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 3a21537071bf4118b9e1ee864cb4bc258aa48211..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,11 +1,10 @@
 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
index bb78bf41ee57507907c197c3fa84286e0bcded56..099d1dca2129cef990c676cbc59fd69aa5565b76 100644 (file)
@@ -7,7 +7,7 @@ Bundle-Vendor: VTT Technical Research Centre of Finland
 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,
@@ -19,5 +19,5 @@ Export-Package: org.simantics.db.services,
 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
index fe9bab55201f188be514d33c2d21e702586be0a1..e9b59023fbb28130c45a14782805e3cdb4b864af 100644 (file)
@@ -34,7 +34,6 @@ import org.simantics.db.Session;
 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;
@@ -96,15 +95,12 @@ public class AdapterRegistry2 {
     }
 
     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) {
@@ -228,7 +224,6 @@ public class AdapterRegistry2 {
 
                     }, fileName);
         } catch (Exception e) {
-            e.printStackTrace();
             handleException(e, fileName);
         }
     }
@@ -242,9 +237,9 @@ public class AdapterRegistry2 {
                 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();
index e8f171b8ca02a170268d4270e442ed3655ffad9d..8a2db578f6488debda2a66fa3d1719c6772cca10 100644 (file)
@@ -15,6 +15,8 @@ import org.simantics.db.ReadGraph;
 
 public class GraphObject2 implements IDynamicAdapter2 {
 
+       public static final IDynamicAdapter2 INSTANCE = new GraphObject2();
+
        @Override
        public Class<?> getType() {
                return ReadGraph.class;
index 24001ee0ae90840a5333a3c2665a098b92f42f23..bacf3adee83f92185c46572121f751e0a8e67de7 100644 (file)
@@ -16,6 +16,8 @@ import org.simantics.db.ReadGraph;
 
 public class ThisResource2 implements IDynamicAdapter2 {
 
+       public static IDynamicAdapter2 INSTANCE = new ThisResource2();
+
        @Override
        public Class<?> getType() {
                return Resource.class;
index d280a5aa3a85dde439cc9d562cd741c052a92092..e56d60296c1048efb59ea614ad6057f38325696d 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 960ccf0095f1c8eb88811244a48594bf8e1588f7..03b2c8cd361a80763b4cfe9a7ada727e7a7d2b42 100644 (file)
@@ -4,7 +4,7 @@ Bundle-Name: DB Testing Support
 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,
@@ -19,7 +19,7 @@ Require-Bundle: org.simantics.db.layer0;bundle-version="1.1.0",
  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,
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 34c12e8cc053e7fe1de087d9f8cdb94b57bff4fa..9762e369bb2a547041755110b66f9f84d7384187 100644 (file)
@@ -21,7 +21,7 @@ Require-Bundle: org.simantics.utils.datastructures;bundle-version="1.0.0";visibi
  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
index fb4c4820a43442dd97c8d7d545e109abfb74e78c..168816ed992852c5f5e561f84f7790e5b461b649 100644 (file)
@@ -11,8 +11,6 @@
  *******************************************************************************/
 package org.simantics.db;
 
-
-
 final public class RelationInfo {
     
     public static final RelationInfo[] NONE = new RelationInfo[0];
@@ -27,7 +25,7 @@ final public class RelationInfo {
         this.isFinal = isFinal;
         this.isAsserted = isAsserted;
     }
-    
+
     @Override
     public String toString() {
        return "RelationInfo[predicate=" + predicate + ", isFunctional=" + isFunctional + ", isFinal=" + isFinal + ", isAsserted=" + isAsserted + "]";
index 5e818cb995c32408a9f04377c0b0885767d95513..924ccffb02ec855e492230e6a21e9d47bdad2b3f 100644 (file)
@@ -62,7 +62,7 @@ import org.simantics.db.request.WriteInterface;
  * @see MergingGraphRequestProcessor
  * @see AsyncRequestProcessor
  */
-public interface RequestProcessor extends RequestProcessorSpecific, ServiceLocator {
+public interface RequestProcessor extends RequestProcessorSpecific, ServiceLocator, ResourceLocator {
 
     Resource getRootLibrary();
 
diff --git a/bundles/org.simantics.db/src/org/simantics/db/ResourceLocator.java b/bundles/org.simantics.db/src/org/simantics/db/ResourceLocator.java
new file mode 100644 (file)
index 0000000..8a8b0fa
--- /dev/null
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * 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();
+
+}
index 3da3c5aa3baa8f71e50bb1615939dcc8ef8a7fae..a8c7286437aa4b1d08c619926a05b8d986eec5b0 100644 (file)
@@ -17,9 +17,11 @@ import org.simantics.db.AsyncReadGraph;
 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;
 
 
 /**
@@ -87,12 +89,25 @@ public interface QueryControl {
      * 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);
 
 }
index cf9e96e7833421fb7617cc9ebeaef422a9dd3947..bab69074e6ca1cd30dc5fdb613dad21cfb67cf0c 100644 (file)
@@ -162,5 +162,7 @@ public interface XSupport {
     public boolean rolledback();
     
     public boolean isClusterLoaded(ClusterUID clusterUID) throws DatabaseException;
-    
+
+    public void saveQueries() throws DatabaseException;
+
 }
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index f377235cb348a8374c3c4a6bfc767f0a60b0e68b..4e4424aec10bdeea9c35f85f0e7af4336d6617a4 100644 (file)
@@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.ui,
  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,
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 398b4bce160b185129f53351d3c185632c738c97..3dc219fb51ebad9fbaa69188dbe3c6d6417c9221 100644 (file)
@@ -6,17 +6,16 @@ Bundle-Version: 1.0.0.qualifier
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index b50e13d6312cc315466bc0f6a1bc59f0e3c351fc..f43bcaec45fa7bcfc44a7ffc066776eb3ff6331e 100644 (file)
@@ -3,12 +3,12 @@ Bundle-ManifestVersion: 2
 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
index 7a23274c4028d377c5a216d7e01a55bb8fca54d4..0542beb1dad91186e0b646997d3e2a7e9ba4d6c6 100644 (file)
@@ -1,6 +1,6 @@
 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> ()
diff --git a/bundles/org.simantics.debug.graphical/src/org/simantics/debug/graphical/DebuggerCanvasProxy.java b/bundles/org.simantics.debug.graphical/src/org/simantics/debug/graphical/DebuggerCanvasProxy.java
new file mode 100644 (file)
index 0000000..bf7a738
--- /dev/null
@@ -0,0 +1,32 @@
+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;
+    }
+
+}
index 9091a27f98d6367d340b1927e111ee393a93703c..81844e4aeb82f4310b4409eef9591ffad012b4a9 100644 (file)
@@ -11,7 +11,7 @@ import javax.swing.JFrame;
 
 public class GraphicalDebugger {
 
-    public static DebuggerCanvas newGraphDebugger() {
+    public static DebuggerCanvasProxy newGraphDebugger() {
         final JFrame frame = new JFrame();
         frame.setTitle("Graph debugger");
         Toolkit tk = Toolkit.getDefaultToolkit();
@@ -53,7 +53,7 @@ public class GraphicalDebugger {
         });        
         frame.setVisible(true);
         
-        return canvas;
+        return new DebuggerCanvasProxy(canvas);
     }
     
 }
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 4996a07e99bcc54c25c408bda2f38bf5c00f80c1..397d3febef4e1218342146b1aef0ead15fb67a03 100644 (file)
@@ -23,6 +23,6 @@ Require-Bundle: org.eclipse.core.runtime,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 0d0294896a2a6c374a0cd2d482747b5855289dae..0da4b9a481cd2274eec11a58298741ed5e4c3464 100644 (file)
@@ -4,5 +4,5 @@ Bundle-Name: Simantics Desktop Product
 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
index b984365f40d85a93433ea14337e4587b7e79e96d..2b4ec84d2c1386780af560eedd54afb4d9a10821 100644 (file)
          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" />
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 08fbbb32b7dba6f678d1194fd9f6b94c54a6445a..8024dbe0a85a65f9e3c1b63ba53a684bd3dd1c27 100644 (file)
@@ -9,5 +9,5 @@ Require-Bundle: org.simantics.layer0,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 1c2b3846c07e6cfe333e015e878b6f1d2a8b3676..05b72e7407800fa5a7346262a209daa378e4124e 100644 (file)
@@ -15,7 +15,8 @@ Require-Bundle: org.simantics.workbench;bundle-version="1.5.1",
  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
index 8a3b30d04d2ea337f478db2134604fec1f037cb0..6248f62f735db49c50d08b01509b759603023eff 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index bd0ead3ec52fb8c140a49f620a1d9d2f08ab3227..824febec48021560d96f02a31a8e680bf60f406e 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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,
index fe93717662b2220c840ca38d2be848ed2c542d3b..6357e537ac5c5d356b89803c25ad2ea3166c8706 100644 (file)
@@ -277,6 +277,12 @@ public class RouteGraph implements Serializable {
         transientLines.clear();
     }
     
+    protected void removeRouteTerminalsFromRouteLines() {
+        for(RouteLine line : lines) {
+            line.removeRouteTerminals();
+        }
+    }
+
     /**
      * Rotates given terminal clockwise by given amount
      * (also negative numbers are allowed). 
@@ -311,6 +317,7 @@ public class RouteGraph implements Serializable {
     public void update() {
         needsUpdate = false;
         removeTransientRouteLines();
+        removeRouteTerminalsFromRouteLines();
 
         //print();
         
index a6a4f22d2ff1b5ba0be0add013fe7d9c412ff29a..225c4abfe890ecb5250e724777fb5f2dc4659c97 100644 (file)
@@ -113,10 +113,17 @@ public class RouteLine implements RouteNode, Serializable {
             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();
     }
 
@@ -188,6 +195,10 @@ public class RouteLine implements RouteNode, Serializable {
        return lines;
     }
 
+    public void removeRouteTerminals() {
+        points.removeIf(p -> p instanceof RouteTerminal);
+    }
+
     public RouteTerminal getTerminal() {
         return terminal;
     }
index dd660d4aaa659df5bce98302794586549e423c04..3d6bd182f664b9146c5686155ac8d4f541e6f8cf 100644 (file)
@@ -164,18 +164,31 @@ public class RouteTerminal extends RoutePoint implements RouteNode, Serializable
             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);
index 0628573d0576962d7efff9efa3da0ebef159a44e..f36417b48d2c7cca4a19bd7709c307bfa7e44fe7 100644 (file)
@@ -145,7 +145,7 @@ public class SimpleConnectionUtility {
         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());
diff --git a/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/AggregateConnectionStyle.java b/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/AggregateConnectionStyle.java
new file mode 100644 (file)
index 0000000..7bf7624
--- /dev/null
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * 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;
+    }
+
+}
index b2895fb342d60fc1571b7f9b1fe4424c07144203..94de76bb447af1a435a8323ea7d24c4187ab7b4a 100644 (file)
@@ -17,9 +17,11 @@ import java.awt.RenderingHints;
 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;
 
 /**
@@ -37,12 +39,13 @@ public class BasicConnectionStyle implements ConnectionStyle, 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;
@@ -50,10 +53,16 @@ public class BasicConnectionStyle implements ConnectionStyle, Serializable {
         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() {
@@ -101,11 +110,101 @@ public class BasicConnectionStyle implements ConnectionStyle, Serializable {
         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) {
@@ -126,16 +225,18 @@ public class BasicConnectionStyle implements ConnectionStyle, Serializable {
                     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;
@@ -216,6 +317,8 @@ public class BasicConnectionStyle implements ConnectionStyle, Serializable {
         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;
     }
@@ -248,6 +351,8 @@ public class BasicConnectionStyle implements ConnectionStyle, Serializable {
                 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;
@@ -260,4 +365,7 @@ public class BasicConnectionStyle implements ConnectionStyle, Serializable {
         return rounding;
     }
 
+    public double getOffset() {
+        return offset;
+    }
 }
diff --git a/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/ConnectionCrossings.java b/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/ConnectionCrossings.java
new file mode 100644 (file)
index 0000000..3ccb492
--- /dev/null
@@ -0,0 +1,214 @@
+/*******************************************************************************
+ * 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);
+        }
+    }
+
+}
diff --git a/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/ConnectionRenderingHints.java b/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/ConnectionRenderingHints.java
new file mode 100644 (file)
index 0000000..a78bec0
--- /dev/null
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * 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
diff --git a/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/PathModifier.java b/bundles/org.simantics.diagram.connection/src/org/simantics/diagram/connection/rendering/PathModifier.java
new file mode 100644 (file)
index 0000000..50d771a
--- /dev/null
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * 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);
+}
index dd9473042152d0c3af43244d9549d63e4c649e4b..fa14474691f281ad312df693dec50e242bdb9503 100644 (file)
@@ -62,6 +62,10 @@ public class StyledRouteGraphRenderer implements IRouteGraphRenderer, Serializab
 
                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();
index b283cb4ed283e3cacda7abbff892a72cf3585f8b..4e4280c0aab746d3d3ea9afdb82d0a2db6f1340c 100644 (file)
@@ -28,4 +28,9 @@ public class Segment {
     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());
+    }
 }
index ae79dc019b3cb320f883315599a20952e2fb420d..8f7f71a299f08f5b08a51cf1adc29db72b623c03 100644 (file)
@@ -1,13 +1,17 @@
 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;
@@ -91,7 +95,75 @@ public class SplittedRouteGraph {
         }
     }
 
-    /**
+    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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 9e9456843d5bcf68e082459a94eef98844301dca..a36b26e83d553e6eb71baa762402c2d556eb32bc 100644 (file)
@@ -15,7 +15,7 @@ Require-Bundle: org.simantics.layer0,
  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
index b26bfc698ee214ac9040b7228d2fe0a13c59b334..a38de5bc95db19a77f425d3d8ea2e09087c3789f 100644 (file)
@@ -68,6 +68,9 @@ DIA.IOTableRename <T L0.Entity
 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"
@@ -143,4 +146,37 @@ DIA.diagramActivityCondition : L0.Template
 
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 3d5910b9455324e88ca367a1b8b61719f49641d1..60816536a7b56bbf434fb26dfac684e10b49afd7 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
@@ -14,7 +14,8 @@ Require-Bundle: org.simantics.browsing.ui.swt;bundle-version="1.1.0",
  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
index fb07993ac7894940a6fa522243595470a16837bb..be0b062ad3b8fdd5a3d911228092932997db3b86 100644 (file)
@@ -37,6 +37,7 @@ import org.simantics.db.common.request.UniqueRead;
 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;
@@ -170,7 +171,12 @@ public class ActiveRuntimeDiagramInputSource implements WorkbenchSessionContextI
     }
 
     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);
index 58cd82b0e8e2156a034e6a5d83488730cfc0fb30..cbe77333fff0e439fc6e20fed11528050c8e0bb3 100644 (file)
@@ -7,13 +7,16 @@ import org.simantics.db.WriteGraph;
 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);
        }
@@ -49,9 +52,7 @@ public class CreateGroupAction extends ModelledActionImpl<Resource> {
                        });
                
                } catch (DatabaseException e) {
-
-                       Logger.defaultLogError(e);
-                       
+                       LOGGER.error("CreateGroupAction failed", e);
                }
 
        }
index 656159abf3cc948e36ba8f326b9268cd6f9045a6..c0fdb11e38cf11b0c53bdd51d423f0829fdd9078 100644 (file)
@@ -8,12 +8,15 @@ import org.simantics.db.common.request.WriteRequest;
 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);
        }
@@ -51,9 +54,7 @@ public class CreateProfileAction extends ModelledActionImpl<Resource> {
                        });
                
                } catch (DatabaseException e) {
-
-                       Logger.defaultLogError(e);
-                       
+                       LOGGER.error("CreateProfileAction failed", e);
                }
 
        }
index de0734156f63057f3f6d82806c5b98c8fd23a16d..6cda70f2dbf9353bee42cdf525f762cbbf586e21 100644 (file)
@@ -7,13 +7,16 @@ import org.simantics.db.WriteGraph;
 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);
        }
@@ -49,9 +52,7 @@ public class CreateStyleAction extends ModelledActionImpl<Resource> {
                        });
                
                } catch (DatabaseException e) {
-
-                       Logger.defaultLogError(e);
-                       
+                       LOGGER.error("CreateStyleAction failed", e);
                }
 
        }
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 0a4be84451377459fd4b4033e2165240709101cf..df874ebe05bca0ffe8a91f8f1e3ca1069a5f9b74 100644 (file)
@@ -13,8 +13,8 @@ Require-Bundle: org.eclipse.ui,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 6ca327d19b18981ca9995bb21d9a2441be476243..92e4d84aec581a7118d112a85475a7fbaa314705 100644 (file)
@@ -18,7 +18,6 @@ Require-Bundle: org.simantics.utils.thread.swt,
  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",
@@ -45,7 +44,7 @@ Require-Bundle: org.simantics.utils.thread.swt,
  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,
@@ -77,5 +76,5 @@ Import-Package: org.simantics.simulation.experiment,
 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
index ef8a32516069d795ecda3a4966b99afdcdc576ba..b6a591201d43430f00172cd30bed16c956390343 100644 (file)
             </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">
diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/LogManager.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/LogManager.java
deleted file mode 100644 (file)
index a4e1eab..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * 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
diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/Logger.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/Logger.java
deleted file mode 100644 (file)
index ad93cb8..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * 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);
-    }
-}
index bdc3af02c81be3029163123631fb154e5cbaedef..f38d1971b50a960bb3b80d6b435ffc4d6054e40d 100644 (file)
@@ -44,6 +44,7 @@ public class GroupStyleProfileEntry implements ProfileEntry {
         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);
     }
 
index a3d9074827f57b94f402448c071b6e4e1d07d478..4e15608a61e0e4da754eea6f9b1d5c3628ade90b 100644 (file)
@@ -100,7 +100,7 @@ public class RouteGraphConnectionClassFactory extends SyncElementFactory {
         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
index d6a59a0cbc26a9284e0e656c2062c3b6fae4a2a1..3ff98cd0b1cc115d33687764e650282c707623bb 100644 (file)
@@ -20,6 +20,7 @@ import java.awt.geom.AffineTransform;
 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;
 
@@ -31,6 +32,7 @@ import org.simantics.db.Statement;
 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;
@@ -39,6 +41,7 @@ import org.simantics.diagram.connection.RouteLine;
 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;
@@ -65,8 +68,8 @@ import org.simantics.g2d.element.ElementUtils;
 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;
@@ -543,13 +546,30 @@ public class RouteGraphUtils {
      * @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 {
@@ -589,6 +609,7 @@ public class RouteGraphUtils {
             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,
@@ -597,7 +618,8 @@ public class RouteGraphUtils {
                 lineStroke,
                 routeLineStroke,
                 degenerateLineLength,
-                rounding);
+                rounding,
+                offset);
     }
 
     public static void scheduleSynchronize(Session session, Resource connection, RouteGraphChangeEvent event) {
index 802881e1610efa52d787e0670edddb4c291e45de..e7a31692b5ea2cb22a5bda1bd044bdd3a199ad8c 100644 (file)
@@ -27,12 +27,17 @@ public class ConnectionVisuals {
     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;
@@ -40,6 +45,7 @@ public class ConnectionVisuals {
         this.stroke = stroke;
         this.branchPointRadius = branchPointRadius;
         this.rounding = rounding;
+        this.offset = offset;
     }
 
     public Color toColor() {
@@ -57,6 +63,7 @@ public class ConnectionVisuals {
         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;
@@ -83,6 +90,11 @@ public class ConnectionVisuals {
                 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;
index 2991d234c462bdb09e150e7d81892e7c18013f2c..bf1bf563b32c9f9e89c2c2355902d2a5b5f1ef02 100644 (file)
@@ -403,13 +403,14 @@ public class TextNode extends G2DNode implements IDynamicSelectionPainterNode, L
         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();
     }
@@ -469,8 +470,8 @@ public class TextNode extends G2DNode implements IDynamicSelectionPainterNode, L
         // 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();
@@ -1437,6 +1438,9 @@ public class TextNode extends G2DNode implements IDynamicSelectionPainterNode, L
             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;
         }
index 23cb9f970f36acd3761e1ee009b3375250125b6d..25e72d984b81a277a7eda60dc1cf0ca656dae37a 100644 (file)
@@ -183,8 +183,14 @@ public class ExportDiagramPdf implements ExportClass {
                 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;
index d38a301da3c4a9d93dc60c2de926eaa41af5aea7..e53f4b636baf8480888e72bf30b572a93e43364f 100644 (file)
@@ -176,6 +176,17 @@ public final class FlagUtil {
      * @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();
@@ -184,14 +195,24 @@ public final class FlagUtil {
         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.
@@ -531,5 +552,4 @@ public final class FlagUtil {
        return flags;
     }
 
-
-}
+}
\ No newline at end of file
index 3f1076b5df48e70047cd4dae8d9531bd494c9d0d..5c85a99440a9d7efe09b2eaaff2338d56b78291f 100644 (file)
@@ -1,11 +1,10 @@
 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;
@@ -24,9 +23,11 @@ import org.simantics.diagram.connection.RouteNode;
 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;
@@ -34,6 +35,8 @@ import org.simantics.layer0.Layer0;
 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.
@@ -87,34 +90,33 @@ public class RouteGraphConnectionSplitter {
         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();
@@ -141,44 +143,106 @@ public class RouteGraphConnectionSplitter {
                     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,
@@ -186,22 +250,28 @@ public class RouteGraphConnectionSplitter {
             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);
         }
@@ -209,15 +279,39 @@ public class RouteGraphConnectionSplitter {
         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.
@@ -237,97 +331,31 @@ public class RouteGraphConnectionSplitter {
             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);
     }
 
     /**
@@ -370,15 +398,6 @@ public class RouteGraphConnectionSplitter {
         }
     }
 
-    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) {
@@ -421,6 +440,7 @@ public class RouteGraphConnectionSplitter {
     }
 
     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));
     }
index 6cd4c542f106afe53d4d80a774f4e9ace4e90e28..5bb793f7df39b6147ce72511d48664d9ba94ec95 100644 (file)
@@ -95,6 +95,8 @@ public class All {
 
                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)
index 52217c3cfcf2b84a6ddc9795d7d13d3f66af80ba..de10603d3bc078257ddc27fd7c0b390915f9baa4 100644 (file)
@@ -44,7 +44,6 @@ import org.simantics.db.layer0.util.SimanticsKeys;
 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;
@@ -114,6 +113,8 @@ import org.simantics.utils.threads.SWTThread;
 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
@@ -141,6 +142,8 @@ import org.simantics.utils.ui.SWTUtils;
  */
 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");
@@ -1294,7 +1297,7 @@ public class CopyPasteHandler extends AbstractDiagramParticipant {
                     });
                 }
             } catch (DatabaseException e1) {
-               Logger.defaultLogError(e1);
+                LOGGER.error("Monitor paste failed", e1);
             }
         }
         return true;
index 539e284611daef9388b578bafb82054e09d4df2a..32df540eec5a10ea41da8062652b30d16002d4dd 100644 (file)
@@ -315,8 +315,8 @@ public class MouseScaleMode extends AbstractMode {
                     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)
index 76149412702b67c364b3e81e302f934ab6b2274c..7f709c70993eb62839ed8d0a283cbdfd8f54e9ad 100644 (file)
@@ -44,7 +44,6 @@ import org.simantics.db.layer0.util.SimanticsKeys;
 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;
@@ -125,6 +124,8 @@ import org.simantics.utils.threads.SWTThread;
 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
@@ -152,6 +153,8 @@ import org.simantics.utils.ui.SWTUtils;
  */
 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");
@@ -1291,7 +1294,7 @@ public class CopyPasteHandler extends AbstractDiagramParticipant {
                     });
                 }
             } catch (DatabaseException e1) {
-               Logger.defaultLogError(e1);
+                LOGGER.error("Monitor paste failed", e1);
             }
         }
         return true;
diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/participant/ConnectionCrossingsParticipant.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/participant/ConnectionCrossingsParticipant.java
new file mode 100644 (file)
index 0000000..c02f68d
--- /dev/null
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * 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);
+        }
+    }
+
+}
diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/participant/CopyAsSVGParticipant.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/participant/CopyAsSVGParticipant.java
new file mode 100644 (file)
index 0000000..b91c2bb
--- /dev/null
@@ -0,0 +1,175 @@
+/*******************************************************************************
+ * 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);
+                }
+            }
+        }
+    }
+}
index 3e1140a07f358b3fbef42905254677d99bed65aa..0731bd90d7f3c542797e6c4f590e77d27324ba92 100644 (file)
@@ -24,10 +24,8 @@ import java.util.List;
 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;
@@ -42,11 +40,14 @@ import org.simantics.g2d.element.IElement;
 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;
@@ -96,12 +97,8 @@ abstract public class PopulateSelectionDropParticipant extends AbstractDiagramPa
 
                                }
 
-                       } 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);
                        }
 
                }
diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/participant/SVGTransfer.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/participant/SVGTransfer.java
new file mode 100644 (file)
index 0000000..539e22e
--- /dev/null
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * 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
index f4c9470bdaa6e6465b97543a2ae81469ccdbfc19..4055e8d4aa5ad47fef14bba55cac542d4894c801 100644 (file)
@@ -18,7 +18,15 @@ public abstract class IconButtonStyleBase<T extends IconButtonResult> extends St
 
        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()) {
index 44ec7618e2fee64577f350633c778316428ae144..2e79ef2160808332339bd79d72d97d4edec14fca 100644 (file)
@@ -60,11 +60,11 @@ class Updater implements Runnable {
        }
        
        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);
index 73e3615cee0589fd7f3fa42f98cb3a7d4cca2c69..619e913f041c5554f9082e98893cb800b8edf6d0 100644 (file)
@@ -54,8 +54,9 @@ public class ConnectionVisualsRequest extends ResourceRead<ConnectionVisuals> {
         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) {
index 9943706700bb960346e4c3a974c19328bdd63e0f..e7d411f853d7cb1856292e30c555b0c3e5491f0f 100644 (file)
@@ -65,6 +65,8 @@ class RuntimeVariable extends TernaryRead<Resource, RVI, Resource, RuntimeDiagra
                Resource composite = graph.getPossibleObject(diagram, ModelingResources.getInstance(graph).DiagramToComposite);
                if (composite != null) {
                        variable = Variables.getPossibleVariable(graph, composite);
+               } else {
+                       variable = Variables.getPossibleVariable(graph, diagram);
                }
 
         }
index fb3666e0b275fbc8f982ef9a92be347646249064..1d04653b5720fd0ab8bcead8c522ec3b14961680 100644 (file)
@@ -37,6 +37,10 @@ public class GroupProxySymbolItem implements ISymbolItem {
         this.group = group;
     }
 
+    public ISymbolItem getSubject() {
+        return proxy;
+    }
+
     @Override
     public String getName() {
         return proxy.getName();
index af58be479ec1c7bf7ac4687d11ed478e26995155..31c091fd4eed1041e9b869639463f0ec5e4adfbb 100644 (file)
@@ -88,7 +88,6 @@ import org.simantics.diagram.internal.Activator;
 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;
@@ -1118,24 +1117,22 @@ public class SymbolLibraryComposite extends Composite {
             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);
             
index ab28463e84d5a8e3d3ae81af98b52f990393f167..bbf9a8e5b23d2134f536bacb21cae26d058e815e 100644 (file)
@@ -11,8 +11,6 @@
  *******************************************************************************/
 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;
@@ -46,6 +44,10 @@ import org.simantics.diagram.synchronization.SynchronizationHints;
 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
@@ -82,6 +84,15 @@ public class CopyAdvisorUtil {
 
     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}
@@ -364,8 +375,10 @@ public class CopyAdvisorUtil {
      * @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<>());
     }
 
     /**
@@ -380,13 +393,52 @@ public class CopyAdvisorUtil {
      * @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 + ")");
@@ -497,12 +549,18 @@ public class CopyAdvisorUtil {
                             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");
+                        }
                     }
                 }
             }
index b0146cc21bf7ad2b7be6b6b7e3a9bb0516e00aeb..e0d757417dc83250ba9f62702499bdf8334d9090 100644 (file)
@@ -55,9 +55,7 @@ public class ElementReorder extends ModificationAdapter {
         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) {
@@ -66,41 +64,22 @@ public class ElementReorder extends ModificationAdapter {
                 // 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);
     }
 
 }
index a15b99bc45907eeb319cdc7bc5925c0bb1af95be..41f4c00e621641ce6b46f02f8c7266d08d3b20d4 100644 (file)
@@ -162,12 +162,14 @@ public class RouteGraphModification {
         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;
@@ -175,6 +177,7 @@ public class RouteGraphModification {
             this.terminals1 = terminals1;
             this.terminals2 = terminals2;
             this.isHorizontal = isHorizontal;
+            this.invertFlagRotation = invertFlagRotation;
             this.isectX = isectX;
             this.isectY = isectY;
         }
@@ -188,6 +191,7 @@ public class RouteGraphModification {
             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());
         }
@@ -208,6 +212,8 @@ public class RouteGraphModification {
             b.append("$");
             b.append(isHorizontal);
             b.append("$");
+            b.append(invertFlagRotation);
+            b.append("$");
             b.append(isectX);
             b.append("$");
             b.append(isectY);
@@ -531,6 +537,7 @@ public class RouteGraphModification {
                         toResources(modi.terminals1),
                         toResources(modi.terminals2),
                         modi.isHorizontal,
+                        modi.invertFlagRotation,
                         modi.isectX,
                         modi.isectY
                         );
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index deb99608f44062f1eb3dd4e76cc03a6ed9bb98ce..9ec3dc50f01a6b4d52df44820ab63438f55e80c5 100644 (file)
@@ -16,6 +16,6 @@ Require-Bundle: org.simantics.layer0,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 8cc4ad04e8bee0aca1896b37bb2665295232dba6..e34909c19fd6992382227e1a6debccae77eab44d 100644 (file)
@@ -11,6 +11,6 @@ Require-Bundle: org.eclipse.core.runtime,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index a7dc9009254c7878a4e05fd027abbca132a63aa7..56bdc60bd43d952db41cffa186e968a136d1b23e 100644 (file)
@@ -26,7 +26,7 @@ Require-Bundle: org.eclipse.ui,
  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,
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index a0083d3a64d5f58c0d274dec9fe95bc2a3d4228b..f28e12378d54dfe399691df9e9e289e8cc77b98d 100644 (file)
@@ -11,6 +11,6 @@ Require-Bundle: org.simantics.layer0,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 0acaf46953ff4d464989b6a6a01e8a44393a90d2..1434cb1b8a9bdf653687e6b270d2962f97ea3a2b 100644 (file)
@@ -6,7 +6,7 @@ Bundle-Version: 1.0.0.qualifier
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 2881621c63864737a85ff10d62d9c48893d3134a..677d6d411d1a46cb6360970d7dcb7f39dffac7c6 100644 (file)
@@ -4,7 +4,7 @@ Bundle-Name: Document Server
 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",
index d5a727ffae324f3219af714288bce219aa58f2ec..8dea97ad118da8235b185d56b0e0ce539d9d7f0a 100644 (file)
@@ -164,8 +164,8 @@ public class Functions {
                         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) {
@@ -297,8 +297,8 @@ public class Functions {
                         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) {
index 8acc2f0d192899316c870cfba8ce27366b93d699..5b76cd344043f10dd05428642bee688c418ed12f 100644 (file)
@@ -1,6 +1,7 @@
 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;
@@ -10,7 +11,7 @@ import java.util.Set;
 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;
@@ -28,49 +29,55 @@ public class DocumentRequest extends VariableRead<List<JSONObject>> {
         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;
index 606b361b62729ef2f5b74cdb8ad7f379a974049c..4c611a9aab043d749f0be7c4158b0fce95a0da76 100644 (file)
@@ -1,19 +1,17 @@
 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
@@ -21,7 +19,7 @@ public class HandleEventRequest implements Read<AbstractEventHandler> {
 
         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));
@@ -29,7 +27,7 @@ public class HandleEventRequest implements Read<AbstractEventHandler> {
         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
index 99526368e8cc3e21e1b92451f4dd915db45d40ba..133264e29b09321e399831600106ce0227ba0a04 100644 (file)
@@ -2,11 +2,12 @@ package org.simantics.document.server.request;
 
 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;
@@ -16,52 +17,57 @@ import org.simantics.structural.stubs.StructuralResource2;
 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();
 
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 7e9a61d04a4d10464e9f77bb55b0802e05ba5c58..c65f2054a19a1ed3ff761672b836d5495ebad210 100644 (file)
@@ -18,7 +18,7 @@ Require-Bundle: org.eclipse.core.runtime,
  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,
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index b5edfb4708b205e4a30414f8114be3cdb3b8fa6c..1258ad659ea4dc53b3f21e9d797e42b2f9cf187a 100644 (file)
@@ -9,6 +9,6 @@ Require-Bundle: org.simantics.layer0,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 8a09d9e4b7ddaa7b0548561663e4be5fa4ba028d..553b2b57094a553c8faf9760b95595dc96cdf887 100644 (file)
@@ -18,6 +18,6 @@ Require-Bundle: org.simantics.layer0,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index b226c5aac4b74ce60feb7d706eeadfd6ba46150e..799395372054d3203589224d1f68b095eb1170b6 100644 (file)
@@ -28,8 +28,8 @@ Require-Bundle: org.eclipse.ui,
  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,
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 865f7dffe0289ecbdd9af27076d6c54b8c33b9cd..5e2adc62d7f46baa2f8d997d5050086d7367f0fe 100644 (file)
@@ -5,7 +5,7 @@ Bundle-SymbolicName: org.simantics.document;singleton:=true
 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",
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 4578ba2e1f2d0edf019cd7664d0f9cee532553a2..c521b5f919ee4d2616537e8c31a2f0284450b177 100644 (file)
@@ -4,6 +4,6 @@ Bundle-Name: http://www.simantics.org/DublinCore
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 25aba8548c42b06b1ff1d637d2aca0a6da2dac28..bf68d4a97a7343287136b1c88e6013ad1850b15d 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 832274725bed989aa23d6f5566ac43a08701b943..3ff52984d2f4a0135848e81687b2ca4a95bbfd4d 100644 (file)
@@ -11,7 +11,7 @@ Require-Bundle: org.eclipse.ui,
  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"
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 217052d50297b60fcaf7e15cd9b07517e429d161..ea31838725eae180f078825f9cd41941b5f4c8ff 100644 (file)
@@ -15,5 +15,5 @@ Require-Bundle: org.eclipse.ui,
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 11b0c889e8483ade301da32a798775dbd4be1bb5..53ef2d8a75e22e7422e70513b4b192eb73378cb5 100644 (file)
@@ -8,7 +8,7 @@ Require-Bundle: org.simantics.layer0;visibility:=reexport,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 2ccee86aa2b3bdc703054671c07724c9afc420be..f7ea7e744adf14f1ba1eb6aff2b27e11000c808a 100644 (file)
@@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.ui,
  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,
index ad32c83a7885b8953a938b41df3b4fd4fe1aae01..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index e52cbc8ce6c055f3d5a2bb9173b4e44d9d3db464..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,8 +1,10 @@
-#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
index 9085bef9a7031f53bae8ab978ee427c8f6696346..28ebf5dc44161d9f8a207da62d73d11fee8ebed8 100644 (file)
@@ -8,7 +8,7 @@ Bundle-Vendor: VTT Technical Research Centre of Finland
 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
diff --git a/bundles/org.simantics.excel/SimanticsExcel_64.dll b/bundles/org.simantics.excel/SimanticsExcel_64.dll
new file mode 100644 (file)
index 0000000..9be7f04
Binary files /dev/null and b/bundles/org.simantics.excel/SimanticsExcel_64.dll differ
index 9a56e9b7ee1106fecc242650952a5d3544c15b89..4f7390681a89be7c1557ccfcedae59524fc12345 100644 (file)
@@ -13,4 +13,5 @@ source.. = src/
 output.. = bin/
 bin.includes = META-INF/,\
                .,\
-               SimanticsExcel.dll
+               SimanticsExcel.dll,\
+               scl/
index 46f894c63397ded825af1c78a8e008fcd2073dba..9e67f4aa8258bb2ea627b0d5d971e512116fc073 100644 (file)
@@ -1,31 +1,21 @@
 
-//#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"
 
@@ -34,10 +24,10 @@ using namespace VBIDE;
 
 #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) {
@@ -464,7 +454,7 @@ JNIEXPORT jint JNICALL Java_org_simantics_excel_Excel_close(JNIEnv *env, jobject
 
 }
 
-/**
+
 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);
@@ -489,7 +479,7 @@ JNIEXPORT jdouble JNICALL Java_org_simantics_excel_Excel_getDouble(JNIEnv *env,
 }
 
 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);
@@ -499,30 +489,30 @@ JNIEXPORT jstring JNICALL Java_org_simantics_excel_Excel_getString(JNIEnv *env,
        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
index 59c24ad3489255b85d6e2350a786fe753995472a..bb04a663d1eda63c60e1d0568665360f12afcd12 100644 (file)
@@ -1,7 +1,9 @@
 ï»¿
-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
@@ -11,8 +13,8 @@ Global
        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
index 77b34218353b8f90222eb5c0a8e22a2481e9bdb7..67c676b43c119ddd7808d13deb44f8a3a4e9eb15 100644 (file)
@@ -1,14 +1,22 @@
 ï»¿<?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>
index d2c7715f0b663946f778523393daa5ffcdd40e3b..ba3eeec8b0751b8c3205a4e21961ab1150dbd7e4 100644 (file)
@@ -14,9 +14,8 @@ JNIEXPORT jint JNICALL Java_org_simantics_excel_Excel_setString(JNIEnv *env, job
 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
 }
diff --git a/bundles/org.simantics.excel/scl/Excel.scl b/bundles/org.simantics.excel/scl/Excel.scl
new file mode 100644 (file)
index 0000000..4314025
--- /dev/null
@@ -0,0 +1,19 @@
+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
index bf7ddb5d5625966d05a13566db889c57f3a885e2..d692206bd147d1436ec17736f8082a80311c246c 100644 (file)
@@ -45,6 +45,10 @@ public class Excel {
 
     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) {
@@ -89,11 +93,11 @@ public class Excel {
 
         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;
         
@@ -266,7 +270,7 @@ public class Excel {
         
         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();
@@ -306,8 +310,8 @@ public class Excel {
     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();
 
@@ -331,6 +335,20 @@ public class Excel {
        });
     }
 
+    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>() {
@@ -437,32 +455,32 @@ public class Excel {
         }
     }
     
-//    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;
+        }
+    }
 
 }
index be475a6eadf6267fc8d2ba6154baec0267b7ba7a..8b22afe9caa655a20fe8ee45490bb5c7587714bc 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 946657f54f791a80e6454f4d4ba1433205e9ad5c..4f50d5ead6ee6a4b17136e382e5f5a215d3d9a41 100644 (file)
@@ -17,7 +17,7 @@ Require-Bundle: org.eclipse.core.runtime,
  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,
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 99f9aaba6cc63b9e8705aa3538553555d03f4ae0..79807ff043b7642ba55eac1a9e2677ea76febb0e 100644 (file)
@@ -19,5 +19,5 @@ Require-Bundle: org.eclipse.ui,
  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
index 21329daa4a702b33ff521b3348e3f9a720822d3b..83e26c9bfb3f91b290ee53496ccd6132b926317c 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index f05b9d965b0587dee25bd0b77c7fd1aeed7698f0..6e85cea8d8b55674a62b498be3b3081165ebba33 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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,
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 3f0eb69b3058b6aad5effb373da2bf01032a24e8..e41e8a9629bfdc16e70ffe178f62d77d0ff0c299 100644 (file)
@@ -12,7 +12,7 @@ Require-Bundle: org.eclipse.ui,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 12f2e3db6d76b267474334a55e4a47ca683074d4..7adcb430e65df93942b38aeee9313bfcb69a8dd2 100644 (file)
@@ -5,14 +5,13 @@ Bundle-SymbolicName: org.simantics.fileimport;singleton:=true
 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,
index b862a296d38fe04269faeee6c9d77d11ff77380d..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,7 +1,7 @@
-<?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>
index 295926d964165896ea8aa7c1b1b3c9d3d3caa77e..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
-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
index 53f44ce9cf3536bdd4835f197ac13bb2be402716..d2c2f03b20ad6a0705d7ef2b75c77bb63ad92b59 100644 (file)
@@ -8,7 +8,7 @@ Require-Bundle: org.eclipse.core.runtime,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index c75b66080dfc7ac02e69aeacf1e7fe7f03b1756f..8de2fc24332a627d88f940ff7244c90a2f4a18e5 100644 (file)
@@ -5,6 +5,6 @@ Bundle-SymbolicName: org.simantics.g2d.ontology
 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
index ce06a4109e47fe1c9b94b25e6cfd0f267554264a..269f6a4fbe0a08f01f3dcbc0d0ed8d0c58b642d9 100644 (file)
@@ -94,6 +94,8 @@ G2D.StrokeType.Scaling : G2D.StrokeType
 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
@@ -210,7 +212,9 @@ G2D.HasVerticalAlignment <R L0.IsRelatedTo : L0.FunctionalRelation
 
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 3a21537071bf4118b9e1ee864cb4bc258aa48211..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,11 +1,10 @@
 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
index ee5b50be248ceeb7b314a94e0b0cc664f1c91d0b..10037c36e39452d2c580a83443b1a3598776da5a 100644 (file)
@@ -11,7 +11,6 @@ Require-Bundle: org.eclipse.core.runtime,
  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,
@@ -22,8 +21,7 @@ Require-Bundle: org.eclipse.core.runtime,
  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,
@@ -68,6 +66,6 @@ Export-Package: org.simantics.g2d.canvas,
  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
index 7896e52a716a608b7ee307425f295156dc42cc32..9134c1729ac161c7ec4d9bcb927880da9612b8dd 100644 (file)
@@ -1033,6 +1033,17 @@ public class ElementPainter extends AbstractDiagramParticipant implements Compos
         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();
@@ -1054,7 +1065,7 @@ public class ElementPainter extends AbstractDiagramParticipant implements Compos
                 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);
@@ -1090,7 +1101,7 @@ public class ElementPainter extends AbstractDiagramParticipant implements Compos
             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);
index 007d039f23715e4ec65446739c8cc941cbe80cd5..8b893a2b1e7f0730fac80482cd67feb7ae1e115d 100644 (file)
@@ -86,8 +86,8 @@ public class ZOrderHandler extends AbstractDiagramParticipant {
                         int index = elements.indexOf(e);
                         if (index != -1 && selectedElements.contains(e)) {
                             changed |= diagram.moveTo(e, nextPos);
-                            nextPos = index;
                         }
+                        nextPos = index;
                     }
                     if (changed) {
                         notifyZOrderListeners(diagram);
@@ -121,8 +121,8 @@ public class ZOrderHandler extends AbstractDiagramParticipant {
                         int index = elements.indexOf(e);
                         if (index != -1 && selectedElements.contains(e)) {
                             changed |= diagram.moveTo(e, nextPos);
-                            nextPos = index;
                         }
+                        nextPos = index;
                     }
                     if (changed) {
                         notifyZOrderListeners(diagram);
index a1d31acf0e03f9990ef11583fa8c1f4409eeb1b9..3766a751b6816dbc6a4d12be5f59a4fcd7160bb7 100644 (file)
@@ -39,6 +39,8 @@ public class ShapePick implements Pick {
             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);
@@ -55,7 +57,12 @@ public class ShapePick implements Pick {
                 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;
         }
 
index 5bbe9f26e7de24047b90c875f8e66809d542b897..d09ecf4a6b6f753f7f0adbf57060b3a36ac987c1 100644 (file)
@@ -631,8 +631,10 @@ public class GalleryViewer extends ContentViewer {
                 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;
             }
index 77c65cb6ee497d9883cf01ea496a81039dc5184c..90ceaa12af567f4d1f217bd35131b11c47bd6a9b 100644 (file)
@@ -21,7 +21,7 @@ import java.util.EnumSet;
 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
@@ -31,7 +31,8 @@ public class ShapeImage extends AbstractImage implements Image {
     private static final EnumSet<Feature> defaultFeats = VECTOR;
 
     Shape shape;
-    Paint paint;
+    Paint fillPaint;
+    Paint strokePaint;
     Stroke stroke;
     EnumSet<Feature> feats;
     boolean scaleStroke = false;
@@ -41,16 +42,20 @@ public class ShapeImage extends AbstractImage implements Image {
     }
 
     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;
@@ -73,11 +78,11 @@ public class ShapeImage extends AbstractImage implements Image {
 
     @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;
     }
index f2a420b1221910c1f54e1dba891ad8417bfcc449..aafedcc09f78b902775a50e8ec76903b486f1b94 100644 (file)
@@ -88,7 +88,7 @@ public class OrientationRestorer extends AbstractCanvasParticipant {
 //        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")
index 9103dfd638539d6c9e9ad5d93b2e4c1e067614b3..7eb4f4c379a14a2b8ced71fbe5b6841cda93b321 100644 (file)
@@ -207,7 +207,7 @@ public class TimeParticipant extends AbstractCanvasParticipant {
             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() {
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 8230ed887db12bcf0eeaf1a55b872165e1c3f408..05c7ed1b6d3ce7fece60746883382dedfeda60df 100644 (file)
@@ -4,7 +4,7 @@ Bundle-Name: Gnuplot front end
 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
index 2d270fb111599cc9a0714dc399166f9c7a57bfbf..d1d62195299aca16231c9ca752fbe49764aee99e 100644 (file)
 
        <!-- 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>
index 8a3b30d04d2ea337f478db2134604fec1f037cb0..6248f62f735db49c50d08b01509b759603023eff 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 8b22e78ebeeb76292af68e0ffae0aa87cd0b5bf8..a90285e21a7b7390883aca7f7d8b451b9e99acfa 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 2bd96db62f3b7f1e9ea716383954452f147fedf4..14e0b79ab855e1e578b95b3b5840e40d129d8078 100644 (file)
@@ -3,12 +3,12 @@ Bundle-ManifestVersion: 2
 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
index 8a3b30d04d2ea337f478db2134604fec1f037cb0..6248f62f735db49c50d08b01509b759603023eff 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index e599845627c5046013190b9057c763287272c4db..4a2045bbfebd2e12b667076c5063ea2db3d44a99 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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
index 17aa3ed26af30ab5143a2cacf7fb16b01d2a27d3..33291cdf108e75cef32b35e64e69b19d8583c589 100644 (file)
@@ -41,8 +41,9 @@ public class FixExportedOntology {
 
        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);
        }
 
index f2321dce9515b2819af7c51ddc146f324c5b4b1a..9873f8f1eef88ce338129a110e5e1e61d2ab2a9d 100644 (file)
@@ -156,25 +156,27 @@ public class TransferableGraphUtils {
         }
         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();
+                                    }
                                 }
                             }
                         }
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 3b0863d0392a5eed02b352bd4290c8636c175bb8..2566020c92dea3de1fa3d0bdfea46359ba46c47b 100644 (file)
@@ -5,6 +5,6 @@ Bundle-SymbolicName: org.simantics.graphfile.ontology
 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
diff --git a/bundles/org.simantics.graphfile.ui.ontology/.classpath b/bundles/org.simantics.graphfile.ui.ontology/.classpath
new file mode 100644 (file)
index 0000000..e801ebf
--- /dev/null
@@ -0,0 +1,7 @@
+<?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>
diff --git a/bundles/org.simantics.graphfile.ui.ontology/.project b/bundles/org.simantics.graphfile.ui.ontology/.project
new file mode 100644 (file)
index 0000000..740f3f8
--- /dev/null
@@ -0,0 +1,34 @@
+<?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>
diff --git a/bundles/org.simantics.graphfile.ui.ontology/META-INF/MANIFEST.MF b/bundles/org.simantics.graphfile.ui.ontology/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..aceca4b
--- /dev/null
@@ -0,0 +1,13 @@
+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"
diff --git a/bundles/org.simantics.graphfile.ui.ontology/build.properties b/bundles/org.simantics.graphfile.ui.ontology/build.properties
new file mode 100644 (file)
index 0000000..e85b630
--- /dev/null
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               graph.tg
diff --git a/bundles/org.simantics.graphfile.ui.ontology/graph/GraphFileUI.pgraph b/bundles/org.simantics.graphfile.ui.ontology/graph/GraphFileUI.pgraph
new file mode 100644 (file)
index 0000000..196296e
--- /dev/null
@@ -0,0 +1,48 @@
+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
diff --git a/bundles/org.simantics.graphfile.ui/.classpath b/bundles/org.simantics.graphfile.ui/.classpath
new file mode 100644 (file)
index 0000000..e801ebf
--- /dev/null
@@ -0,0 +1,7 @@
+<?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>
diff --git a/bundles/org.simantics.graphfile.ui/.project b/bundles/org.simantics.graphfile.ui/.project
new file mode 100644 (file)
index 0000000..7533101
--- /dev/null
@@ -0,0 +1,28 @@
+<?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>
diff --git a/bundles/org.simantics.graphfile.ui/META-INF/MANIFEST.MF b/bundles/org.simantics.graphfile.ui/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..947f314
--- /dev/null
@@ -0,0 +1,13 @@
+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"
diff --git a/bundles/org.simantics.graphfile.ui/adapters.xml b/bundles/org.simantics.graphfile.ui/adapters.xml
new file mode 100644 (file)
index 0000000..6eceb37
--- /dev/null
@@ -0,0 +1,50 @@
+<?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
diff --git a/bundles/org.simantics.graphfile.ui/build.properties b/bundles/org.simantics.graphfile.ui/build.properties
new file mode 100644 (file)
index 0000000..2df8c94
--- /dev/null
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               adapters.xml
diff --git a/bundles/org.simantics.graphfile.ui/plugin.xml b/bundles/org.simantics.graphfile.ui/plugin.xml
new file mode 100644 (file)
index 0000000..925a7f3
--- /dev/null
@@ -0,0 +1,25 @@
+<?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>
diff --git a/bundles/org.simantics.graphfile.ui/src/org/simantics/graphfile/ui/editor/PlainTextEditor.java b/bundles/org.simantics.graphfile.ui/src/org/simantics/graphfile/ui/editor/PlainTextEditor.java
new file mode 100644 (file)
index 0000000..d30210f
--- /dev/null
@@ -0,0 +1,92 @@
+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();
+    }
+
+}
diff --git a/bundles/org.simantics.graphfile.ui/src/org/simantics/graphfile/ui/editor/PlainTextEditorDocumentProvider.java b/bundles/org.simantics.graphfile.ui/src/org/simantics/graphfile/ui/editor/PlainTextEditorDocumentProvider.java
new file mode 100644 (file)
index 0000000..3eb40ea
--- /dev/null
@@ -0,0 +1,108 @@
+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);
+    }
+
+}
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 2763bd78f42bf894b2593946550f23acb72f8fa1..82bbe06e79e07586b5515d5f2281741778d386b1 100644 (file)
@@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
  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,
index f6b3a270be6eb1f94b8918e511fad91ac5f1f8a6..e6f2f43f36d651eda3a74d5d6d0d64d38ebfc27e 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 2f469dc5830c0980b6098feef0f07b01c37158f8..d435ec1521f553f65bde7630e51d09afaa97d97b 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
index f6b3a270be6eb1f94b8918e511fad91ac5f1f8a6..e6f2f43f36d651eda3a74d5d6d0d64d38ebfc27e 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index ea99ad54b6ab66b80a64316f3250de0b56ba0d65..57de81b98a4e78d66bf43630e282e316720984ba 100644 (file)
@@ -5,9 +5,9 @@ Bundle-SymbolicName: org.simantics.graphviz
 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,
index 098194ca4b7d8f45177f94e735506ae3a26b5c94..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index f42de363afaae68bbd968318f1d331877f5514fc..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index a262f46d07fa6bdeaacb354fa13bf9278ee63969..ac460b044f3e29a2b0593c845798ecb7de2eea3e 100644 (file)
@@ -8,9 +8,9 @@ Bundle-Vendor: Semantum Oy
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index d8094af2e00e6f5431829b1f4457e49af827e09e..6f17932006329e68c01f8d263b9f830bd6e16bcc 100644 (file)
@@ -17,7 +17,7 @@ Require-Bundle: org.eclipse.ui,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 80d3c76805a8cfc7c33e7aeedcd49390dc0c0143..72fd2f572dff1bfcac53ba38c7386faf5558202a 100644 (file)
@@ -7,7 +7,7 @@ Require-Bundle: org.simantics.layer0,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index d7bd01e12e4757b2d92a8c213b202ba64ccdb9ae..a6a0ed24f1eb85b7498cfa12a94b7c2565bf1695 100644 (file)
@@ -14,7 +14,7 @@ Require-Bundle: org.eclipse.ui,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 030278955d57ec20f38b3fa2b7ab3f314c9b131e..e5857318e7ffd2ba5a4a86d500f24d6b76519f8a 100644 (file)
@@ -5,20 +5,20 @@ Bundle-SymbolicName: org.simantics.history.rest
 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",
@@ -32,7 +32,6 @@ Require-Bundle: org.simantics.history;bundle-version="1.0.0",
  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
index 0a61ffeb482d819e39640dce73adfdefdb12203c..d2debb82b0befed8cb7b992d3c7fe82b9498fb13 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index fa32108edb84bdeb2e21f232a32bb9007bdac354..00ef5321c18b8cb4ef25b7af1ef85cc13e7daed7 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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,
index 4e405e2acafff0ba2c81d06cb6a48d382a17d778..b04e0dd37b37e34d0398855a451cd93cb534d6ff 100644 (file)
@@ -38,6 +38,23 @@ import org.simantics.history.util.ValueBand;
  */
 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;
@@ -308,7 +325,7 @@ public class CSVFormatter {
                                // 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;
 
@@ -329,6 +346,13 @@ public class CSVFormatter {
                        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;
@@ -394,10 +418,26 @@ public class CSVFormatter {
 
                                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;
@@ -420,6 +460,7 @@ public class CSVFormatter {
                        if(contains(i, time)) hasMore = true;
                }
                
+               //System.out.println("hasMore @ " + time + " (" + bigTime + ") = " + hasMore);
                if(!hasMore) break;
                
                } while (time<=_end);
@@ -587,7 +628,7 @@ public class CSVFormatter {
     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) {
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 23a7f149ac4c5168326a372f9e802fdb9e276c6c..fb8a85de144da8740244924bf5bafd3f71084d41 100644 (file)
@@ -4,6 +4,6 @@ Bundle-Name: http://www.simantics.org/Image
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index ab68e3097aaffb74d05202cb23f41b744fdb4412..4479602515b4032a41cc878cf0983900fb3e8080 100644 (file)
@@ -13,7 +13,7 @@ Require-Bundle: org.simantics.ui;bundle-version="1.0.0",
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index f01e6f05f88c485bdfdb79ca0c6a70d2cc0950c1..b149860b67a2a2482ca1e6aff48f6915fe5bb059 100644 (file)
@@ -4,6 +4,6 @@ Bundle-Name: http://www.simantics.org/Image2
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 7fe964225269c0531b04e4426edb703abc548844..25284dccbfe74ecff083726fed183e0a6093d681 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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,
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index aaec74f256ef37c72e5d20ee32e89c62cec12ab4..6ab043f0661d3305293d608742eec4ed5eddbfa0 100644 (file)
@@ -11,6 +11,6 @@ Require-Bundle: org.simantics.layer0,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 80068cc2c12dfb2e4e60028cd319f74ba08a8360..e97c47caa1e44b74952fbd0879fdfc9b88d69a0b 100644 (file)
@@ -14,6 +14,6 @@ Require-Bundle: org.simantics.layer0,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index da218152bb30a2f95e54fd7b1f15f4f08f8c6e06..abb1bf685ee7b3757c996d8bbd43d02e32e93531 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
@@ -24,6 +24,7 @@ Bundle-ActivationPolicy: lazy
 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
diff --git a/bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/property/IssuesTab.java b/bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/property/IssuesTab.java
new file mode 100644 (file)
index 0000000..fb1e0a9
--- /dev/null
@@ -0,0 +1,172 @@
+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);
+               }
+       }
+
+}
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 423f89f28b1d406188d75215b1d5cfa06dd9b0de..9f71c2672891c75bfb0245fb5be858c827bb2b98 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 200d69f6c37d2bdd8f78bfa8d09cfcbe74564b77..f643b85f7fe3cbe2d2b1e297ebffd7f5c3aab17d 100644 (file)
@@ -6,6 +6,6 @@ Bundle-Version: 1.0.0.qualifier
 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
index b862a296d38fe04269faeee6c9d77d11ff77380d..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,7 +1,7 @@
-<?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>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 8199e8979efb74286f134edbfa55cc81a13ebd6a..bcfabfbbf104a95c9343e55dfaba0c7f6e9c6a02 100644 (file)
@@ -3,13 +3,13 @@ Bundle-ManifestVersion: 2
 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,
@@ -19,7 +19,7 @@ Require-Bundle: org.eclipse.osgi,
  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
index 17ffcf143cc679b7f25685069c8c9e2023ea9533..9e0c03bfd59b3b9330e516f39d4af6513c41e80f 100644 (file)
@@ -110,7 +110,7 @@ public class JDBCSessionManager extends StandardVariableSessionManager<JDBCNode,
             dataSource = new PGDataSource();
             dataSource.setHost(host);
             dataSource.setPort(portNumber);
-            dataSource.setDatabase(database);
+            dataSource.setDatabaseName(database);
             dataSource.setUser(user);
             dataSource.setPassword(password);
 
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 36f82a01dc69cee7d9cf3b0de233753343b1b851..cf4ad8b083070dfcaec6e7b281fac9948b399286 100644 (file)
@@ -23,5 +23,5 @@ Require-Bundle: gnu.trove3;bundle-version="3.0.3",
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index ac01c010f61df5599f6a151d10fecac5f6869cab..0d93d41344e82230fe2f63edfaae7a2f83c33f2e 100644 (file)
@@ -5,7 +5,7 @@ Bundle-SymbolicName: org.simantics.layer0
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 9e8a0aa7e28d42d886b55206e6c40777ae0bb780..83ad2bbfeea5e48ea34fbcad9efe686924d1edd8 100644 (file)
@@ -4,7 +4,7 @@ Bundle-Name: http://www.simantics.org/Layer0X
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 665f5bacb6a25629462dc0bab310db22bb6a6f50..dcd2cb1ab9dda100e196cbaae0e023fb34d704f5 100644 (file)
@@ -4,7 +4,7 @@ Bundle-Name: Simantics Logback Configuration
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 9e35ec2adca1ce26bbc7d9793cd81acd1232f201..997253929c6ed10ed96e5b2bf32664fede737420 100644 (file)
@@ -12,8 +12,8 @@ Require-Bundle: javax.inject,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 96c84263a395eb988f81cddfb3df4d0b2f3f2816..abf3a16f6f21c51e2722aff1913c298fcbe991f0 100644 (file)
@@ -10,7 +10,7 @@ Require-Bundle: org.eclipse.core.runtime,
  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
index 50096858f92be159702d5957564cd5409c90c638..5b663aec3b44ac90e0db472b16c049809b14e7e5 100644 (file)
@@ -1,6 +1,6 @@
 <?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>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 173d0c6cab844fcc431c283ba0981b01ff440e01..5717323758560c60a4039c4adc6f5999b80f5f0a 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 576c053fe77dc44e788e908bfe168d82dca9cdeb..e3b6b329fdc4fa53ab4b05553b97badf1b209ee7 100644 (file)
@@ -15,5 +15,5 @@ Export-Package: org.simantics.mapping,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 3a21537071bf4118b9e1ee864cb4bc258aa48211..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,11 +1,10 @@
 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
index fcc3b9f626c9e89b2d54aa5348b3cdeb4508a53b..e47b7d1858c01b591885e531323b538ca03beae5 100644 (file)
@@ -13,6 +13,6 @@ Require-Bundle: com.ibm.icu,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 64452df1696024b4fcdd824c413e8197903ad4d8..265b6c83b9459bcccf8d0d61910a088510d2d1a3 100644 (file)
@@ -8,7 +8,7 @@ Bundle-Vendor: Semantum Oy
 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",
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index ba9eada223c8fb0bacb20360f36647ab9e7c9757..3a3cde3bb4ee2e4e41fb14caf5cfc760cb147f66 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index c814a674d0d0040fb87541418a50d185d2ba30ef..39909eeb96e1dc3fdd06b810144012412773b2d8 100644 (file)
@@ -22,6 +22,6 @@ Require-Bundle: org.simantics.layer0,
  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
index 82808f837b425f2726f1f9df57f279249997d29e..b13462813e1fbf9f8a477c64313fea55a0db036c 100644 (file)
@@ -375,6 +375,7 @@ MOD.HasSourceInformation --> MOD.SourceInformation <R L0.IsRelatedTo : L0.Functi
 //##########################################################################
 
 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
@@ -567,6 +568,11 @@ STR.Component
     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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 35ae15e978faffe3718042d7310767d152f8cee7..c7ecff3bac0673e15b1de09c65c3e149596bdb78 100644 (file)
@@ -29,6 +29,6 @@ Require-Bundle: org.eclipse.core.runtime,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 5ffa50f9d4d8101cd8a20e02aa67bf7b6e091b75..c4e5e1ebdfae611f60534604ec4e651fd5fe97d5 100644 (file)
@@ -22,6 +22,6 @@ Require-Bundle: org.simantics.layer0.utils;bundle-version="0.8.0",
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 374f61e896a04067d08cd31f7a510ab11d3a91c3..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,8 +1,10 @@
-#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
index 48e1e0a9514a3a79a0067b917ce48e62cbef9ca3..d9df526eb6ceb818d4acd9b0fdfd37a2b1ace5e4 100644 (file)
@@ -4,7 +4,7 @@ Bundle-Name: Modeling Tests
 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",
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 7c026c9bd5803b0b7369cf6aa1251d5ad98ad60e..9099b1c9baaf16ede41f75d1bcfe83dce7ed2d97 100644 (file)
@@ -4,6 +4,6 @@ Bundle-Name: General Modeling Workbench Contributions
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index f6f6fa4844720b9b7e198ae879c5903aa3768f0e..ac90be6885a95a2978fe31344f4c509be47b717f 100644 (file)
@@ -3,13 +3,10 @@ Bundle-ManifestVersion: 2
 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",
@@ -17,24 +14,19 @@ Require-Bundle: org.simantics.project;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,
@@ -44,8 +36,6 @@ Require-Bundle: org.simantics.project;bundle-version="1.0.0",
  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",
@@ -55,17 +45,12 @@ Require-Bundle: org.simantics.project;bundle-version="1.0.0",
  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,
@@ -96,7 +81,6 @@ Export-Package: org.simantics.modeling.ui,
 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
index 79f32fcd2fee1e144bdd89e25e4317ecfdfc5ff7..ff257169ca01e1272b57e62ff1dd259d82aa6601 100644 (file)
@@ -20,6 +20,7 @@ import org.simantics.db.RelationContext;
 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;
@@ -46,7 +47,7 @@ public class ObtainedDoubleAdapter extends SimpleContextualAdapter<Double, Relat
                 return result;
         }
 
-        return null;
+        throw new AdaptionException("No obtained double available");
     }
 
 }
index 57d0aa69a6bbfdd30e4905aabcb992fb571b9097..a8e637a04dd240b0d8cd51aa9398e6dc5694bbc5 100644 (file)
@@ -21,6 +21,7 @@ import org.simantics.db.WriteGraph;
 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;
@@ -60,7 +61,8 @@ public class ComponentTypeScriptDocumentProvider extends AbstractDocumentProvide
                     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$
                 }
index 6ee5ec77abe89da85f4b41313ea45a5182fdca7e..ec82da5f3e82022ef35e9d8a09ce8a3d1a3f627d 100644 (file)
@@ -31,13 +31,13 @@ import org.simantics.db.common.request.ReadRequest;
 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&ouml;
@@ -45,25 +45,25 @@ import org.simantics.ui.workbench.ToolTipRequest;
  */
 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
@@ -131,12 +131,14 @@ public class ComponentTypeScriptEditor extends SCLModuleEditor {
                 @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;
                                 }
                         });
@@ -145,12 +147,26 @@ public class ComponentTypeScriptEditor extends SCLModuleEditor {
         }
         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);
index 1a1eb723fcfe363e000fcb4cf5d8f9e611780360..5cc209943b920d58bbb2a037efbe71b807bdd112 100644 (file)
@@ -31,6 +31,7 @@ import org.simantics.scl.ui.editor.SCLSourceViewerConfigurationNew;
 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;
@@ -55,6 +56,7 @@ public class ProceduralComponentTypeCodeDocumentProvider extends SCLModuleEditor
                 @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$
                 }
index 21c8208644c1d56a10a2337d7f22ec6a533b1b85..acb2581106e54640f0028af1211c2bf5ea9796e5 100644 (file)
@@ -10,6 +10,7 @@ import org.simantics.db.RelationContext;
 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;
@@ -34,7 +35,7 @@ public class ObtainedColorAdapter extends SimpleContextualAdapter<Color, Relatio
                        if(result != null) return result;
                }
                
-               return null;
+               throw new AdaptionException("No obtained color available");
                
        }
 
index 2d136e8abfbb1d942c44f5daa14f34da6d1d3c78..71988116da9782cd66ee8565ebbe31ce170b87a3 100644 (file)
@@ -9,6 +9,7 @@ import org.simantics.db.RelationContext;
 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;
@@ -31,7 +32,7 @@ public class ObtainedExpressionAdapter extends SimpleContextualAdapter<String, R
                        if(result != null) return result;
                }
                
-               return null;
+               throw new AdaptionException("No obtained expression available");
                
        }
 
index cbb91402042645b659233146479b9859dc8c5b14..1c7d1d823720ce48499a959a28944a846736a1c1 100644 (file)
@@ -9,6 +9,7 @@ import org.simantics.db.RelationContext;
 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;
@@ -34,7 +35,7 @@ public class ObtainedFontAdapter extends SimpleContextualAdapter<FontDescriptor,
                        if(result != null) return result;
                }
                
-               return null;
+               throw new AdaptionException("No obtained font available");
                
        }
 
index d8bd993bd40cec57c5ea621b2d5efce4d500016c..3f0200c961ecfbe34c4bcc82123c9f95d08a8305 100644 (file)
@@ -10,6 +10,7 @@ import org.simantics.db.RelationContext;
 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;
@@ -34,7 +35,7 @@ public class ObtainedFormatterAdapter extends SimpleContextualAdapter<Formatter,
                        if(result != null) return result;
                }
                
-               return null;
+               throw new AdaptionException("No obtained formatter available");
                
        }
 
index 68210f9e263f5c48e51eb10bbbc30f0324b85244..6558df07c80a60963f9dbdedf608948152c06282 100644 (file)
@@ -60,7 +60,7 @@ public class IssueDecorationStyle extends StyleBase<IssueResult> {
 
     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);
index 409aecbea26dc04ef73d9851b5fa31f9eb0eb234..88d85cfbf6581dc996205ffdf0204d4e8e444e51 100644 (file)
@@ -67,7 +67,9 @@ import org.simantics.diagram.handler.DeleteHandler;
 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;
@@ -330,6 +332,8 @@ public class DiagramViewer
         //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) {
index decf3356c68b1b72864f738ac1d6ac57b6fb1ea3..dc9d9d1bef72f88c590167b14acc666edf33d19b 100644 (file)
@@ -111,8 +111,8 @@ public class DiagramViewerLoadJob extends DatabaseJob {
                         });
                         END(task);
                     } catch (Throwable t) {
-                        viewer = null;
                         LOGGER.error("Failed to complete loading of diagram {} in the canvas thread", viewer.diagramResource, t);
+                        viewer = null;
                     }
                 }
             });
index b7ea5ac78a1efff4769b267fdaa7ddf565cdea41..d9d14c37eada50ab64cddc9a9e55c0e94cf64249 100644 (file)
@@ -17,7 +17,6 @@ import org.simantics.db.layer0.SelectionHints;
 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;
@@ -36,6 +35,8 @@ import org.simantics.ui.selection.WorkbenchSelectionContentType;
 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
@@ -44,6 +45,8 @@ public class DiagramViewerSelectionProvider extends WorkbenchSelectionProvider {
 
     protected static class SelectionElement extends AdaptableHintContext {
 
+        private static final Logger LOGGER = LoggerFactory.getLogger(SelectionElement.class);
+
         final public Resource runtime;
         final public Resource element;
 
@@ -108,7 +111,7 @@ public class DiagramViewerSelectionProvider extends WorkbenchSelectionProvider {
                         }
                     });
                 } catch (DatabaseException e) {
-                    Logger.defaultLogError(e);
+                    LOGGER.error("WorkbenchSelectionElement.getContent failed for type AnyVariable", e);
                 }
             }
             else if(contentType instanceof ParentVariable) {
@@ -117,10 +120,7 @@ public class DiagramViewerSelectionProvider extends WorkbenchSelectionProvider {
                     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)
@@ -134,7 +134,7 @@ public class DiagramViewerSelectionProvider extends WorkbenchSelectionProvider {
                         }
                     });
                 } catch (DatabaseException e) {
-                    Logger.defaultLogError(e);
+                    LOGGER.error("WorkbenchSelectionElement.getContent failed for type ParentVariable", e);
                 }
             } 
 
index ac9413064a7b8b222e401a820e0e552a582dc198..4e7ac0ab815ab3b8605c5f67ed466018c69c047e 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * 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
@@ -45,7 +45,6 @@ import org.simantics.db.exception.DatabaseException;
 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;
@@ -83,12 +82,16 @@ import org.simantics.ui.dnd.LocalObjectTransferable;
 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;
        
@@ -321,7 +324,7 @@ public class PopulateElementDropParticipant extends AbstractDiagramParticipant i
                                        });
                                        
                                } catch (DatabaseException e) {
-                                       Logger.defaultLogError(e);
+                                       LOGGER.error("symbolDropHandler invocation failed", e);
                                }
                
                return;
index 3f4ccc20bfbe2bcc253f4f18ec81a2265432a3d3..9101700d0c2dea734ab4f0022f07657c78f5fe7a 100644 (file)
 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);
-               }
-               
-       }
-       
 }
index 0d0ec7ce64d5554b46e1913ebb3cd33a21f3ddde..e7bfd35fa5477550aeb68fd0aead0342d9b2a406 100644 (file)
@@ -20,16 +20,13 @@ import org.eclipse.jface.viewers.ISelection;
 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 {
@@ -47,7 +44,7 @@ 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) {
@@ -64,34 +61,12 @@ public class ContextualHelp extends AbstractHandler {
         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);
     }
 
 }
index bec1e5408ae414c82c568b102cff6743cefec5ac..0b7cd63e4c55eed107eb552c9707a382beffc974 100644 (file)
@@ -89,7 +89,15 @@ public class PDFPainter {
 
                     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);
index aadd9395ab2867faf1a4a3f3168558fb14d4146a..7a2e7a6eb3a1fb57b84a619190adf8d2a1b7cc2d 100644 (file)
@@ -23,8 +23,10 @@ import org.eclipse.jface.preference.IntegerFieldEditor;
 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;
@@ -110,7 +112,8 @@ public class CSVPreferencePage extends FieldEditorPreferencePage implements IWor
            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",
@@ -127,8 +130,9 @@ public class CSVPreferencePage extends FieldEditorPreferencePage implements IWor
                        return true;
                    }
                    try {
+                       @SuppressWarnings("unused")
                        double number = Double.parseDouble(text);
-                       return number>0;
+                       return true;
                    } catch (NumberFormatException e1) {
                        return false;
                    }
@@ -136,6 +140,8 @@ public class CSVPreferencePage extends FieldEditorPreferencePage implements IWor
            };
            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() {
@@ -153,6 +159,7 @@ public class CSVPreferencePage extends FieldEditorPreferencePage implements IWor
            };
            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);
@@ -171,6 +178,8 @@ public class CSVPreferencePage extends FieldEditorPreferencePage implements IWor
            addField(fDoubleDigitsEditor);
 
            GridLayoutFactory.swtDefaults().numColumns(2).applyTo(significantDigitsGroup);
+
+           updateSampling(getPreferenceStore().getBoolean(CSVPreferences.P_CSV_RESAMPLE));
        }
 
     /**
@@ -187,6 +196,8 @@ public class CSVPreferencePage extends FieldEditorPreferencePage implements IWor
             } else if (source == fColumnSeparatorEditor) {
                 columnSeparatorValue = (String) event.getNewValue();
                 validate = true;
+            } else if (source == fResamplingEditor) {
+                updateSampling();
             }
             if (validate) {
                 if (decimalSeparatorValue.equals(columnSeparatorValue)) {
@@ -201,4 +212,16 @@ public class CSVPreferencePage extends FieldEditorPreferencePage implements IWor
         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);
+    }
+
 }
index d3170b9506270350f5dde298d7e1285bee0f2d1a..302e074fce35fe9a202c743119e15afd397eb23f 100644 (file)
@@ -26,6 +26,7 @@ import org.simantics.db.exception.ManyObjectsForFunctionalRelationException;
 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;
@@ -35,6 +36,7 @@ import org.simantics.diagram.handler.CopyPasteStrategy;
 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;
@@ -97,6 +99,7 @@ import org.simantics.utils.page.PageDesc;
 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;
 
 
@@ -249,6 +252,7 @@ public class DiagramSceneGraphProvider implements ICanvasSceneGraphProvider, IDi
         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() );
@@ -288,6 +292,30 @@ public class DiagramSceneGraphProvider implements ICanvasSceneGraphProvider, IDi
             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);
         }
@@ -296,7 +324,7 @@ public class DiagramSceneGraphProvider implements ICanvasSceneGraphProvider, IDi
     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());
     }
 
@@ -348,13 +376,7 @@ public class DiagramSceneGraphProvider implements ICanvasSceneGraphProvider, IDi
         }
 
         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);
             
@@ -385,6 +407,15 @@ public class DiagramSceneGraphProvider implements ICanvasSceneGraphProvider, IDi
         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(
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index c1d891b0aed6c0fad748cffca51d84d6ca8ecdf8..e00a8e1147cdac344a36d52cd45f858dff5e6b72 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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,
@@ -39,7 +39,7 @@ Require-Bundle: org.simantics.simulation;bundle-version="1.0.0",
  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,
@@ -47,6 +47,7 @@ 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,
diff --git a/bundles/org.simantics.modeling/scl/Simantics/ChangeInformation.scl b/bundles/org.simantics.modeling/scl/Simantics/ChangeInformation.scl
new file mode 100644 (file)
index 0000000..9d858d9
--- /dev/null
@@ -0,0 +1,2 @@
+importJava "org.simantics.modeling.adapters.ChangeInformation" where
+    data ChangeInformation
index f1ebaf50c3d5117e99f2737ec85cfa0fcb95cbb2..08f9f2868b4deec344ddcefb3a7744233ca3a774 100644 (file)
@@ -11,5 +11,6 @@ importJava "org.simantics.modeling.ContentDumps" where
   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
 
index 687544e78a52d99306436408d0211f23fa157157..39ed968dd5385034f76ccdbb520d050e9995c63c 100644 (file)
@@ -2,6 +2,8 @@ package org.simantics.modeling;
 
 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;
 
@@ -9,6 +11,7 @@ import org.simantics.databoard.Bindings;
 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;
@@ -47,12 +50,10 @@ public class ContentDumps {
         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));
@@ -87,6 +88,47 @@ public class ContentDumps {
                 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);
     }
 
index 5bcce3ee415683f32ad4c54065f61ff5ffe8f764..6293cbac9fd7d9c9fe3c6989e33ac368b5784fe5 100644 (file)
@@ -1,14 +1,6 @@
 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;
@@ -19,110 +11,14 @@ import org.simantics.structural.stubs.StructuralResource2;
 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);
@@ -208,26 +104,36 @@ public class InvertBasicExpressionVisitor extends DepthFirstAdapter {
         
     }
 
-    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;
+    }
+
 }
diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/InvertBasicExpressionVisitorBase.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/InvertBasicExpressionVisitorBase.java
new file mode 100644 (file)
index 0000000..8ccf5c2
--- /dev/null
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * 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
index 1edf3cd3121a4e4682e5de0012916fcfd0b74ee5..a42e51a162e190e05497a5f15918fbc1fac15eef 100644 (file)
@@ -70,6 +70,7 @@ import org.simantics.db.Session;
 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;
@@ -82,10 +83,10 @@ import org.simantics.db.common.request.ObjectsWithType;
 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;
@@ -123,7 +124,6 @@ import org.simantics.db.layer0.util.SimanticsKeys;
 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;
@@ -166,12 +166,16 @@ import org.simantics.utils.datastructures.Pair;
 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&ouml;
  */
 public class ModelingUtils {
 
+       private static final Logger LOGGER = LoggerFactory.getLogger(ModelingUtils.class);
+
        private ReadGraph g;
        private WriteGraph wg;
        public Layer0 b;
@@ -478,7 +482,7 @@ public class ModelingUtils {
                        
 
                } catch (Exception e) {
-                       Logger.defaultLogError(e);
+                       LOGGER.error("Model import failed", e);
                }
 
        }
@@ -598,7 +602,9 @@ public class ModelingUtils {
        }
 
     public static void untrackDependencies() {
-       untrackDependencies(Simantics.getSession());
+        Session s = Simantics.peekSession();
+        if (s != null)
+            untrackDependencies(s);
     }
 
        public static void untrackDependencies(RequestProcessor processor) {
@@ -615,7 +621,7 @@ public class ModelingUtils {
                 
             });
         } catch (DatabaseException e) {
-            Logger.defaultLogError(e);
+            LOGGER.error("untrackDependenices failed", e);
         }
 
     }
@@ -638,7 +644,7 @@ public class ModelingUtils {
                 
             });
         } catch (DatabaseException e) {
-            Logger.defaultLogError(e);
+            LOGGER.error("trackDependenices failed", e);
         }
 
        }
@@ -1256,7 +1262,7 @@ public class ModelingUtils {
                        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 {
                }
 
@@ -1442,7 +1448,7 @@ public class ModelingUtils {
                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;
        }
     }
@@ -2459,16 +2465,34 @@ public class ModelingUtils {
         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);
+                }
+            }
+        });
+    }
+
 }
index e8c54fa987537401d8b448c35652c6a7fe32ff16..6256891b82ae17a96391e7a05399b2ef9ae3f640 100644 (file)
@@ -3,6 +3,7 @@ package org.simantics.modeling;
 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;
@@ -21,19 +22,28 @@ public class ProceduralSubstructureMapRequest extends VariableRead<THashMap<Stri
     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;
     }
 
index 47c7d346657d2caa7116a332a5f79860a6fb6e4a..ba7e7117fea1dc28202803be58e7961f6a34266d 100644 (file)
@@ -8,11 +8,14 @@ import org.simantics.db.exception.DatabaseException;
 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 {
@@ -52,7 +55,7 @@ public class SCLAction implements ActionFactory {
                                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);
                        }
                }
        
index 74b19a2144f77229c6ba338a5f3cf5ad461bf829..f1d38554572d1f3d6260636241095d980c97da59 100644 (file)
@@ -8,11 +8,14 @@ import org.simantics.db.exception.DatabaseException;
 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 {
@@ -55,7 +58,7 @@ public class SCLDropAction implements DropActionFactory {
                                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);
                        }
                }
 
index fad803ce41a4a84bdb11991a06f73e0bdc3a3451..82115ef0e0825e2c9b8b2c69793f6bffd015344b 100644 (file)
@@ -51,6 +51,7 @@ import org.simantics.g2d.canvas.ICanvasContext;
 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;
@@ -914,6 +915,39 @@ public class SCLScenegraph {
                         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);
@@ -931,9 +965,31 @@ public class SCLScenegraph {
                        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.
                }
index 27955fb7ee2ae99d95eab3d19653e71c8bbc7441..eeabbd960b4e6583bc0a05d35d2b89998e5f8883 100644 (file)
@@ -13,6 +13,7 @@ import org.simantics.databoard.type.LongType;
 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;
@@ -23,6 +24,8 @@ public class SCLTypeUtils {
     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);
     }
@@ -66,6 +69,7 @@ public class SCLTypeUtils {
                 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
@@ -81,7 +85,7 @@ public class SCLTypeUtils {
         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;
     }
@@ -105,18 +109,23 @@ public class SCLTypeUtils {
             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);
+    }
 }
index ba124310800bb29b87988d85144176fa19f7bc96..22327aeb3f71b833ea002af5705ca7080a87ac96 100644 (file)
@@ -16,38 +16,36 @@ import org.simantics.Simantics;
 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);
                        }
                }; 
        }
+
 }
diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/help/HelpContexts.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/help/HelpContexts.java
new file mode 100644 (file)
index 0000000..ca25cf4
--- /dev/null
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * 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;
+    }
+
+}
index 3e6e9c1b9527096cfa1835a50e43f6b2dfb97c7f..021ecc436b86c5d82af28d062cd45d4a88b38148 100644 (file)
@@ -32,7 +32,6 @@ import org.simantics.modeling.ModelingUtils;
 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;
 
@@ -58,7 +57,6 @@ public class ComponentCopyAdvisor extends GraphCopyAdvisor {
     @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);
index 4c7964513f8f38b171c92b9607a1de6e4dd68bad..79eb3d6ba5da1f5ea8b751bf318aa1ae786b7929 100644 (file)
@@ -11,7 +11,7 @@ import org.simantics.db.exception.DatabaseException;
 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;
@@ -88,7 +88,7 @@ public class CompileProceduralSCLMonitorRequest extends AbstractExpressionCompil
             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);
index dfea839318d2c33415dd454c30a60980e9e55c5f..b9ec1affcd9871fa5a134c9c2d736f6f5d9ad53f 100644 (file)
@@ -9,7 +9,7 @@ import org.simantics.db.common.request.ResourceRead;
 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;
@@ -114,7 +114,7 @@ public class CompileSCLMonitorRequest extends AbstractExpressionCompilationReque
             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));
             }
         });
index 1cef75ddfec4662394c60850f930fc2ec77a0259..dab7aa0e78c57b798d2f14e74cd04371741a6588 100644 (file)
@@ -7,8 +7,8 @@ import org.simantics.db.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;
index 8eed51aca7ed70401b7ddafb7da5a13bab85b2ff..a70844cd375c8956adb593cb71406e92d782e963 100644 (file)
@@ -12,6 +12,8 @@ import org.simantics.db.common.request.WriteRequest;
 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;
@@ -137,6 +139,29 @@ public enum GraphModuleSourceRepository implements ModuleSourceRepository {
         }
     }
 
+    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);
@@ -144,7 +169,7 @@ public enum GraphModuleSourceRepository implements ModuleSourceRepository {
 
         @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);
index 5bb3d9ca21c95d30bb5d96200d41caade8bf59df..e058f2c36fed2fb0ba8d6753c5fd47a244aa4963 100644 (file)
@@ -5,7 +5,9 @@ import java.io.IOException;
 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;
@@ -32,17 +34,48 @@ public class DumpOntologyStructure {
     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 {
@@ -110,37 +143,56 @@ public class DumpOntologyStructure {
     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);
         }
     }
@@ -162,7 +214,7 @@ public class DumpOntologyStructure {
     }
 
     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
index 3f8ffb15b94d81282f275b7edd7246d78c29e948..d8eed0a66103141a4affde596c3867b2373ec421 100644 (file)
@@ -21,17 +21,28 @@ import org.simantics.modeling.adapters.ChangeInformation;
  */
 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());
        }
 
@@ -45,7 +56,7 @@ public class OntologicalRequirementEnforceRequest extends WriteRequest {
 
        @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(
@@ -61,7 +72,7 @@ public class OntologicalRequirementEnforceRequest extends WriteRequest {
                                modis,
                                ids,
                                addComment,
-                               System.getProperty("user.name", ""),
+                               getAuthor(),
                                System.currentTimeMillis(),
                                disableDependencyIndexing);
 
@@ -76,10 +87,24 @@ public class OntologicalRequirementEnforceRequest extends WriteRequest {
                        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);
 
@@ -93,8 +118,9 @@ public class OntologicalRequirementEnforceRequest extends WriteRequest {
                        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) {
@@ -109,9 +135,10 @@ public class OntologicalRequirementEnforceRequest extends WriteRequest {
                        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);
@@ -119,10 +146,8 @@ public class OntologicalRequirementEnforceRequest extends WriteRequest {
                        }
                }
 
-               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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index d4ecac0f2ad5432539ed8c8cd29110115dc817fb..972ff89e42534d3c5862e8dc7d9b6d314b300565 100644 (file)
@@ -5,7 +5,7 @@ Bundle-SymbolicName: org.simantics.msvc.runtime.x86_64
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index d741eef76a2e0dfad77a4755b6cd607621c3a5af..36cb8eba7fb81d88820132eb73fbd832f3ff7cfb 100644 (file)
@@ -6,7 +6,7 @@ Bundle-Version: 10.0.40219.qualifier
 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
index b862a296d38fe04269faeee6c9d77d11ff77380d..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,7 +1,7 @@
-<?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>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 06b61442470fcace80de28d06212973e303bf0c5..86d19f7b43fbc540aaf201760b0623a60ebbe846 100644 (file)
@@ -4,7 +4,7 @@ Bundle-Name: Native Memory Tracking
 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",
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 55a1393f523e791ef1d8174e171554b4fcf0cffb..8b9e0e523146a027a98ba960a106eafaed1daf91 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
index d6c707e026b5e5f1086f19599d2d7591d2650a8d..27a1aeb1af216883eb0e686382541abb8bc13025 100644 (file)
@@ -15,6 +15,11 @@ import org.simantics.db.ReadGraph;
 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
@@ -24,6 +29,6 @@ public interface IForwardMappingRule<Domain, Range> {
         * @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;
 }
index e1de9f20c20c0983a4ea4c2fe15d40c0db872e04..79c39ecfac2b6713da40eb8d828feb5c6f8c8088 100644 (file)
@@ -58,6 +58,12 @@ public class UpdateMethodFactory<Domain, Range> implements IMethodRuleFactory<Do
                 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);
             };
index c2ecdf1b1679fe7f9fd5bd21ed9a0cef090ea63d..4820dae016b44c358fe52206d876f25a66b42fe3 100644 (file)
@@ -12,8 +12,6 @@
 package org.simantics.objmap.graph.impl;
 
 
-import gnu.trove.map.hash.THashMap;
-
 import java.util.AbstractSet;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -21,12 +19,9 @@ import java.util.Iterator;
 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;
@@ -34,6 +29,10 @@ import org.simantics.objmap.graph.IMapping;
 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
@@ -79,7 +78,7 @@ public class Mapping<Domain, Range> implements IMapping<Domain, Range> {
                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);
@@ -92,7 +91,7 @@ public class Mapping<Domain, Range> implements IMapping<Domain, Range> {
                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>() {
@@ -173,10 +172,7 @@ public class Mapping<Domain, Range> implements IMapping<Domain, Range> {
        
        class DomainToRange implements IForwardMapping<Domain, Range> {
 
-               ReadGraph g;
-               
-               public DomainToRange(ReadGraph g) {
-                       this.g = g;
+               public DomainToRange() {
                }
 
                @Override
@@ -197,10 +193,10 @@ public class Mapping<Domain, Range> implements IMapping<Domain, Range> {
                    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;
                }
                
@@ -213,12 +209,10 @@ public class Mapping<Domain, Range> implements IMapping<Domain, Range> {
        
        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) {
                        
@@ -237,10 +231,10 @@ public class Mapping<Domain, Range> implements IMapping<Domain, Range> {
                            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;
                }
                
@@ -265,7 +259,7 @@ public class Mapping<Domain, Range> implements IMapping<Domain, Range> {
        @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());
@@ -293,7 +287,7 @@ public class Mapping<Domain, Range> implements IMapping<Domain, Range> {
        @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());
@@ -311,13 +305,15 @@ public class Mapping<Domain, Range> implements IMapping<Domain, Range> {
                        
                        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))
index b84b9c94ff8b866eb8ecea86471914d6dc7d1bda..d62435cd1de24a11748be77b99928a28649f86e4 100644 (file)
@@ -21,7 +21,7 @@ import org.simantics.objmap.forward.IForwardMapping;
 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;
     /*
@@ -30,27 +30,24 @@ public class RangeUpdateRequest<Domain,Range> implements Read<Boolean>, SyncList
      */
     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
@@ -63,15 +60,24 @@ public class RangeUpdateRequest<Domain,Range> implements Read<Boolean>, SyncList
     }
 
     @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();
     }
-    
-    
-    
 }
index 9761f555568fbc6b3827eaa2d6cd7ee77e9ad884..251895ad72a1aedc7aac9966b5f51b5bc83aa08b 100644 (file)
@@ -11,6 +11,8 @@
  *******************************************************************************/
 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;
@@ -61,10 +63,19 @@ public class MappedElementRule<Domain, Range> implements IBidirectionalMappingRu
         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);
        };
index 7f3c13a106e956989fc4185353de667adad5f6e1..fcc62d7b5444e925ad451124eb14bd67c9b02caf 100644 (file)
@@ -13,6 +13,7 @@ package org.simantics.objmap.graph.rules;
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Objects;
 
 import org.simantics.db.ReadGraph;
 import org.simantics.db.WriteGraph;
@@ -66,12 +67,25 @@ public class MappedElementsRule<Domain, Range> implements IBidirectionalMappingR
             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);
index 9ba9dba11274291b0dadb6664492542bd853951e..2e2b81b191abe792826df445f55e548357df888c 100644 (file)
@@ -13,6 +13,9 @@ package org.simantics.objmap.graph.rules;
 
 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;
@@ -57,7 +60,14 @@ public class ValueRule<Domain, Range> implements IBidirectionalMappingRule<Domai
         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);
index 9b02d5d50c9bec9d4bcb77ed9a1277fd6c015267..b0d8d965f087ff9be1f098c48c01f144bf6a6839 100644 (file)
@@ -69,18 +69,27 @@ public class AdaptedLinkType<Range> implements ILinkType<Resource,Range> {
        }
     }
     
+    @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;
     }
index 9ddc437162e12a32720c5faefa6544ddc7e8a246..12dd4c9c03ed6bc5c8442fc5c15083fa893676e6 100644 (file)
@@ -104,6 +104,15 @@ public class SimpleLinkType<Range> implements ILinkType<Resource,Range> {
        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 { 
index a2be5fa42bf978083642deb38b68807e46dc3329..c0fee3da6e53c27ed6042c23e58ed881c5fa5564 100644 (file)
@@ -58,6 +58,12 @@ public class UpdateMethodFactory<Domain, Range> implements IMethodRuleFactory<Do
                 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);
             };
index 203863a6c74c61606d26e71d9c9dabf5964d675f..21d1d89903cfbad8dc76cf21918e6d75e24f0551 100644 (file)
@@ -72,18 +72,27 @@ public class AdaptedLinkType implements ILinkType<StructuralResource,IStructural
        }
     }
     
+    @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;
     }
index 77b2ab094a50b6baf05c6853b3b10a7da6d91242..5df6064b85225d1729d56a7b32f4ac36bd0a513e 100644 (file)
@@ -154,6 +154,15 @@ public class SimpleLinkType implements ILinkType<StructuralResource,IStructuralO
        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 { 
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 1e8ad54e13d4b8396d0f37626eb7b488322c0428..d46b50d04fd8824885bb0832e007d03add4098fb 100644 (file)
@@ -20,6 +20,6 @@ Require-Bundle: org.simantics.layer0,
  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
index b862a296d38fe04269faeee6c9d77d11ff77380d..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,7 +1,7 @@
-<?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>
index f0e776e4191ef90d8ddc15125a786f54a64c5f22..06734106e950753e9c00e5b04fd70b4f44e42452 100644 (file)
@@ -5,7 +5,7 @@ Bundle-SymbolicName: org.simantics.platform.ui
 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",
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 3484e03329607fa5ea9fd6287c28843b41b90bfe..a3c28bc77d7a4ec722394610b9e0d98552d27356 100644 (file)
@@ -9,6 +9,6 @@ Require-Bundle: org.simantics.layer0,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 3a21537071bf4118b9e1ee864cb4bc258aa48211..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,11 +1,10 @@
 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
index 1eac93e9ad2bf181ef618e92fcba435a7923ce44..3c380df33bc1cd8258f81c1da5e6c939bd28481f 100644 (file)
@@ -4,7 +4,7 @@ Bundle-Name: Simantics Project Framework
 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",
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 046b06140a9ba9caa565e75ee8d23f12005e2fb7..de512d7d04e9ea571a3aeb0280b61ad66024672c 100644 (file)
@@ -4,7 +4,7 @@ Bundle-Name: Scenegraph Loader
 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",
index e901b0cdba63e54c397613d49c021f34beda838f..20c10fa5be048ea27b54ca601d12ad92d64592e0 100644 (file)
@@ -11,7 +11,6 @@ import org.simantics.db.common.primitiverequest.PossibleResource;
 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;
@@ -19,11 +18,14 @@ import org.simantics.db.layer0.variable.VariableRepository;
 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;
 
@@ -153,7 +155,7 @@ public class ScenegraphLoaderProcess implements Disposable, ListenerSupport {
 
        @Override
        public void exception(Throwable t) {
-               Logger.defaultLogError(t);
+               LOGGER.error("Unexpected problem encountered", t);
        }
 
        @Override
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index cc54431594446349fcc6a5aef3d7d69af53f73f5..0b10e37b35b6a4c7f22541eecb172d7eb28b150b 100644 (file)
@@ -5,6 +5,6 @@ Bundle-SymbolicName: org.simantics.scenegraph.ontology
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index e032ff4170440c36fa574aa18215d44b64ae8b22..fc7ad08b6c773a4f8fd9fe037f39b995bec82d6e 100644 (file)
@@ -4,7 +4,7 @@ Bundle-Name: Scenegraph Profiles
 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",
@@ -14,7 +14,7 @@ Require-Bundle: org.simantics.db.layer0;bundle-version="1.1.0",
  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
index 31295b9b692f60178c422ad7dda719089d87b76c..10e2abe67fb1f347ce8cc91dcf9553d9abc7c529 100644 (file)
@@ -44,7 +44,7 @@ public class ObserverGroupListener implements SetListener<Resource> {
     public void add(Resource item) {
         //System.out.println("Add to group(" + this + "): " + item);
         items.put(item, item);
-        observer.update();
+        observer.update(style, item);
     }
 
     @Override
@@ -52,7 +52,7 @@ public class ObserverGroupListener implements SetListener<Resource> {
 //        new Exception().printStackTrace();
         //System.out.println("Remove from group(" + this + "): " + item);
         items.remove(item);
-        observer.update();
+        observer.update(style, item);
     }
 
     @Override
index 9d379c890b9bd952a3ac2b6db941b3c71acc07c6..440ee2714aada5e1effad128b3b4b03a6d10f98e 100644 (file)
@@ -23,8 +23,8 @@ import org.simantics.db.AsyncRequestProcessor;
 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;
@@ -38,9 +38,13 @@ import org.simantics.utils.datastructures.Pair;
 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;
 
     /**
@@ -58,6 +62,7 @@ public class ProfileObserver implements EvaluationContext {
     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;
     
@@ -95,6 +100,7 @@ public class ProfileObserver implements EvaluationContext {
         this.sceneGraph = sceneGraph;
         this.constants.putAll(constants);
         this.notification = notification;
+        this.needSynchronizedUpdates = session.getService(QueryControl.class).getAmountOfQueryThreads() > 1;
 
         attachSessionListener();
 
@@ -139,8 +145,14 @@ public class ProfileObserver implements EvaluationContext {
     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;
     }
@@ -179,10 +191,25 @@ public class ProfileObserver implements EvaluationContext {
                                 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;
@@ -221,7 +248,7 @@ public class ProfileObserver implements EvaluationContext {
 
             @Override
             public void exception(Throwable t) {
-                Logger.defaultLogError(t);
+                LOGGER.error("RuntimeProfileActiveEntries request failed", t);
             }
         });
     }
@@ -233,7 +260,7 @@ public class ProfileObserver implements EvaluationContext {
 
     @Override
     public void exception(Throwable throwable) {
-        Logger.defaultLogError(throwable);
+        LOGGER.error("Exception occurred during diagram profile observation", throwable);
     }
 
     @SuppressWarnings("unchecked")
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index e4d734b9b6e11dbe9bf99b1efd837207c0d95c6e..258a062670631f59fdd7621bfc4379d650a6adf1 100644 (file)
@@ -4,9 +4,8 @@ Bundle-Name: Swing Nodes
 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",
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index f397ca41efbcadd81fdd54c5314f02caaa956f22..c71128c8a58042d7f512a26f73c28dffe3cab6f8 100644 (file)
@@ -4,7 +4,7 @@ Bundle-Name: Scene Graph UI
 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",
index 282b753dc0ef1f9b045904fb8d3fb8677a26323e..a77c387de5ace6394d711111a3a2847ad004dcbd 100644 (file)
@@ -1,9 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index f2c70f5c60d54bf752903db7da33ec31cd6c7b90..ebaffc23460316e3234345ff8302b6b72db4b1e0 100644 (file)
@@ -8,24 +8,19 @@ Require-Bundle: gnu.trove3;bundle-version="3.0.0",
  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,
index dc6fde4b23d59ebd01743f50f7a4af74ebfe04c2..1fe8ef8ce12cc3a5277266949d57228efbc11394 100644 (file)
@@ -17,8 +17,5 @@ bin.includes = META-INF/,\
                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
 
diff --git a/bundles/org.simantics.scenegraph/lib/batik-awt-util-1.8.jar b/bundles/org.simantics.scenegraph/lib/batik-awt-util-1.8.jar
deleted file mode 100644 (file)
index ce0be3c..0000000
Binary files a/bundles/org.simantics.scenegraph/lib/batik-awt-util-1.8.jar and /dev/null differ
diff --git a/bundles/org.simantics.scenegraph/lib/batik-parser-1.8.jar b/bundles/org.simantics.scenegraph/lib/batik-parser-1.8.jar
deleted file mode 100644 (file)
index 01108ad..0000000
Binary files a/bundles/org.simantics.scenegraph/lib/batik-parser-1.8.jar and /dev/null differ
diff --git a/bundles/org.simantics.scenegraph/lib/batik-util-1.8.jar b/bundles/org.simantics.scenegraph/lib/batik-util-1.8.jar
deleted file mode 100644 (file)
index cb1c63f..0000000
Binary files a/bundles/org.simantics.scenegraph/lib/batik-util-1.8.jar and /dev/null differ
diff --git a/bundles/org.simantics.scenegraph/lib/jcommon-1.0.16.jar b/bundles/org.simantics.scenegraph/lib/jcommon-1.0.16.jar
deleted file mode 100644 (file)
index 4cd6807..0000000
Binary files a/bundles/org.simantics.scenegraph/lib/jcommon-1.0.16.jar and /dev/null differ
diff --git a/bundles/org.simantics.scenegraph/lib/jfreechart-1.0.13.jar b/bundles/org.simantics.scenegraph/lib/jfreechart-1.0.13.jar
deleted file mode 100644 (file)
index 83c6993..0000000
Binary files a/bundles/org.simantics.scenegraph/lib/jfreechart-1.0.13.jar and /dev/null differ
index 0fede7cb0f3d5870ec0d2f8c6170b168f441cac5..3418b8958560c50a4bd3d0e76874efecbef5c61c 100644 (file)
Binary files a/bundles/org.simantics.scenegraph/lib/svgSalamander-tiny.jar and b/bundles/org.simantics.scenegraph/lib/svgSalamander-tiny.jar differ
index af8c5630dc84c88c46c350b07c540ee9926e9ae6..a752e9253eedf1149b1d6860fe8e2586ffdaf539 100644 (file)
@@ -349,11 +349,12 @@ public class G2DParentNode extends ParentNode<IG2DNode> implements IG2DNode, Ini
         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 {
index ce52912a5612f019a49eba3d533a2fc8f3b3d6ab..89de18835282e8150dbaa61eeb18c7c03c9461b7 100644 (file)
@@ -107,6 +107,7 @@ public class Commands {
 
     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);
diff --git a/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/nodes/ConnectionCrossingsNode.java b/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/nodes/ConnectionCrossingsNode.java
new file mode 100644 (file)
index 0000000..a46c4e7
--- /dev/null
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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;
+    }
+}
index 50d50ecd2f3fe48e2d8b9f894149c7585880bd13..aa570d6aa21144d3ea4dfd6eb9f2dd7d255de93e 100644 (file)
@@ -131,6 +131,11 @@ public class LinkNode extends StateMaskNode {
 
     @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();
@@ -141,7 +146,7 @@ public class LinkNode extends StateMaskNode {
 
         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;
diff --git a/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/nodes/ShapeNode2.java b/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/nodes/ShapeNode2.java
new file mode 100644 (file)
index 0000000..2a8b959
--- /dev/null
@@ -0,0 +1,191 @@
+/*******************************************************************************
+ * 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 +"]";
+    }
+
+}
index b0e9147f63134e5c2af5dee0c2436efbdbc016e3..3c7b9bad85be182d92cca5637f2fddfcd390169f 100644 (file)
@@ -288,6 +288,7 @@ public class RouteGraphNode extends G2DNode implements ISelectionPainterNode, In
                  selectionStroke = new BasicStroke(width, BasicStroke.CAP_BUTT, stroke.getLineJoin());
              }
          } else {
+             // TODO: support AggregateConnectionStyle
              selectionStroke = SELECTION_STROKE;
          }
     }
@@ -301,24 +302,28 @@ public class RouteGraphNode extends G2DNode implements ISelectionPainterNode, In
         
         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;
         }
index d76b9ec05a1063c437dd1b2c26a1edd9ebb221db..7e5f09949ad0e44af5151e3889814d36daadf650 100644 (file)
@@ -23,6 +23,9 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import com.kitfox.svg.SVGDiagram;
 
 /**
@@ -35,6 +38,8 @@ 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;
 
@@ -61,6 +66,8 @@ public class MipMapBufferedImage extends BufferedImage {
     }
 
     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()) {
@@ -94,6 +101,9 @@ public class MipMapBufferedImage extends BufferedImage {
             }
         }
 
+        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++)
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index cde9e243073670496f9d9a2af7ec52c98a591833..e3cafcf38eeb4eae7c03897f1bbeac8dcb810105 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 118ada9c439f3c72fb176ad634b141d44c513734..bd89882b0e42e97277d1311137d19cb0629d5247 100644 (file)
@@ -4,11 +4,8 @@ Bundle-Name: SCL bytecode decompiler
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 70bb068b32d900359e8b798d15cab39a7d4f7037..852603f49a69dad1ee7727bf9062910971b3e6a7 100644 (file)
@@ -3,14 +3,14 @@ Bundle-ManifestVersion: 2
 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,
index 1c2709665765562067f185a96bff6ece7243b17a..a3b64613428c465168cb210211ef19010e8570cf 100644 (file)
@@ -22,6 +22,11 @@ public class InternalCompilerError extends RuntimeException {
         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;
index 79b596908962b2f4d8fbc4b8c09e74c9266bd213..23491235ce3289c46fd254009cde5963774374d6 100644 (file)
@@ -240,6 +240,10 @@ public class ModuleRepository {
         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();
     }
index 098194ca4b7d8f45177f94e735506ae3a26b5c94..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index f42de363afaae68bbd968318f1d331877f5514fc..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index eb6ba41c5c4bf0fde149c03079f3ba8b4450ec25..a5279445a73c96bb22046008d70406334dd671b1 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
index cacffb01acc806a48d284f220afc8e874c8b8a65..268b9732a3e17db930708696f2d913c2a50b38a2 100644 (file)
@@ -309,6 +309,30 @@ instance (Json a, Json b, Json c, Json d, Json e) => Json (a, b, c, d, e) where
     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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 8d826cfa39e528a3806944bd747b2bc57614975e..81af84419cb6f3c3c664a7f7078116a227f10285 100644 (file)
@@ -13,8 +13,8 @@ Require-Bundle: org.eclipse.core.runtime,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 394f82df255c75695462f2ed8efa74f6e48e7e29..59c5852fecbbe25b651dbe64ed27797270d50de3 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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,
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 6c9dec184ae70ea13eccec62a9e748d59a6aa996..2b6dc004fc3e074370c09dfc7ea859a58fe53786 100644 (file)
@@ -9,7 +9,7 @@ Require-Bundle: org.eclipse.core.runtime,
  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
index 2f3c869b478aa631bb652b07341ab66a8abd5dbe..69a724e9ff55f9114be4a63e666055e6102953b2 100644 (file)
@@ -33,7 +33,7 @@ public class OsgiJavaReferenceValidatorFactory implements JavaReferenceValidator
                 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);
             }
index 8a3b30d04d2ea337f478db2134604fec1f037cb0..6248f62f735db49c50d08b01509b759603023eff 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 9597daf769412e3ace1e66422e92a4d8a27d93c2..99407f549b251b7c1151818b88d51d918abc52b5 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index e950c170f6a94c3f4f276362eec3f430e38bb7c8..7e382bfee0369cc93aafe379a7ca472f41204148 100644 (file)
@@ -4,17 +4,15 @@ Bundle-Name: Simantics SCL REST-Server
 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",
@@ -24,7 +22,9 @@ Require-Bundle: org.eclipse.core.runtime,
  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
index 5c2ab66a954fb6cc036c9c0e18c86d1cb3c5e04b..1b7bf7a9624ed9f0251420b29207a6da6d813069 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 0cb8969b4217566bfa0c01f05c1cc4d8006c3ec7..4d092f2fe72d67d3b7e40065992bf923050cd076 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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,
@@ -25,5 +25,5 @@ Export-Package: org.simantics.scl.runtime,
 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
diff --git a/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/exceptions/CheckedFunctionException.java b/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/exceptions/CheckedFunctionException.java
new file mode 100644 (file)
index 0000000..2601728
--- /dev/null
@@ -0,0 +1,11 @@
+package org.simantics.scl.runtime.exceptions;
+
+public class CheckedFunctionException extends RuntimeException {
+
+    private static final long serialVersionUID = 6314226787099140449L;
+
+    public CheckedFunctionException(Exception cause) {
+        super(cause);
+    }
+    
+}
index 49e77f4e0f2712bd022bc294be03a0e9d453f9a7..bc3587db4853a4ed6a6079487df4d1ba19de350b 100644 (file)
@@ -1,6 +1,6 @@
-<?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>
index 11f6e462df7b697da0744bef232871f1aa1b0cb3..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
-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
index f1c87134eadb30994556c82f0aae4772921e48df..3fc00d4a5d8f9df38a455db568493f6aeeb62fff 100644 (file)
@@ -3,4 +3,4 @@ Bundle-ManifestVersion: 2
 Bundle-Name: Tutorial
 Bundle-SymbolicName: org.simantics.scl.tutorial
 Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-11
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index e0a561c81e348286da8bafbef74e2b444e2abd55..0441e0f63380f55b1c16c0fce2bd33001fb1af51 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
index b7d5c9fb2005941f82c9cb028214da8f53775237..ac4489d2e01bfb751cff6aa31f42bac3f2244905 100644 (file)
    </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"
index dd71e323b0b2a500d6c67452df72dad99d4079e5..899b9e731dd7800d7447e32988abbf588120edae 100644 (file)
@@ -10,6 +10,7 @@
  *******************************************************************************/
 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;
@@ -69,26 +70,51 @@ public class StyledTextContentAdapter implements IControlContentAdapter, IContro
        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;
        }
 
        /*
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 0f92059721ba5d3dbc50330fb24a09dcdf8786eb..353d917d8edcb8a3dc510b819f662fef3e8f2616 100644 (file)
@@ -6,6 +6,6 @@ Bundle-Version: 1.2.0.qualifier
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index c92716c61fef545a4670a8833e20dd0afdd0311c..5fd730466420126021656539a595603eaaf6e76c 100644 (file)
@@ -13,6 +13,6 @@ Require-Bundle: org.eclipse.ui,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 74ace5a4042a6099965a84f9745bda84605d7f24..2a0715673b7f0872b3f645f53a77d29402db2b72 100644 (file)
@@ -23,7 +23,7 @@ Require-Bundle: org.eclipse.ui,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 9e96d4ecc62ebd19270e146fae1ffdfcfa38cf69..409a32d94cf5ba6ef798fc487ef9465a1a8dd0c1 100644 (file)
@@ -6,6 +6,6 @@ Bundle-Version: 1.1.0.qualifier
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 1a6c81fffa41feaac9ec787e2c74e9940aca9a78..4be09242bb8e74dcc85e63f85cdc68e092eed059 100644 (file)
@@ -5,6 +5,6 @@ Bundle-SymbolicName: org.simantics.simulation.ontology
 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
index 8a3b30d04d2ea337f478db2134604fec1f037cb0..6248f62f735db49c50d08b01509b759603023eff 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 7ecc4b3a08a277e042dc2187e1cb8e6e09362dee..00f45d43d09abaedd63cfb624df34e810f34860e 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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"
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 7bada8706ac2fa2dcf6bd12b5b13b76105b18014..48b50e16422402702b7654ee9e698b5dbee8ad42 100644 (file)
@@ -23,8 +23,9 @@ Require-Bundle: org.eclipse.core.runtime,
  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
index 84688be67961062d6a30e30adc1fb5bada29a068..a43bb09e7991c3bfe0bf9519bb89afbb803f1da2 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 06a61d2b94af484140cea0a46d1f8e1aeac4cf1c..8bc3d9af5c563a2db1bba90a1d64255d5e2cfde7 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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,
@@ -13,7 +13,7 @@ Require-Bundle: org.simantics.ui;bundle-version="1.0.0",
  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,
index 1ee543f4c91c6ce7d45959f3d46ead583da32b57..34fbb587d8afca2e5645f3399914abe5d5991dab 100644 (file)
@@ -19,8 +19,6 @@ import java.util.Set;
 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;
@@ -32,6 +30,8 @@ import org.simantics.history.HistoryException;
 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.
@@ -41,7 +41,7 @@ import org.simantics.utils.datastructures.Triple;
  */
 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>();
@@ -139,7 +139,7 @@ public class DatasourceAdapter implements DatasourceListener {
                         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;
                     }
                 }
@@ -172,20 +172,20 @@ public class DatasourceAdapter implements DatasourceListener {
                             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 );
-                        }                       
+                        }
                     }
                 }
 
@@ -193,11 +193,11 @@ public class DatasourceAdapter implements DatasourceListener {
                 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();
         }
@@ -207,6 +207,5 @@ public class DatasourceAdapter implements DatasourceListener {
        public Executor getExecutor() {
                return null;
        }
-       
 
 }
index a39f2e736087b08bc94f81bad8199eaae2f3ec76..6ce6a50cf553b4ec45f5b08cd915e8883a03f59a 100644 (file)
@@ -77,7 +77,10 @@ public class CSVItemsQuery implements Read<List<CSVItemsQuery.CSVItem>> {
                        
 //            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;
 
@@ -118,6 +121,7 @@ public class CSVItemsQuery implements Read<List<CSVItemsQuery.CSVItem>> {
     public static class CSVItem {
        public String modelUri;
        public String label;
+       public String groupItemId;
        public String variableReference;
        public String unit;
     }
index 07954660edd202124478599d6b22df3eb6095d5a..9abae29d2271c0b17de30e92d87b0f9e590311b2 100644 (file)
@@ -97,7 +97,7 @@ public class ExportSubscriptionCSV extends ExperimentExportClass implements Expo
                                                                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);
index 343adefc8686fc2053b6c4b41e9167d0e937372d..6719cf63b2f138d119b4470403c2b21629a2b6ed 100644 (file)
@@ -664,7 +664,7 @@ public class HistoryUtil {
         */
        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) {
index b862a296d38fe04269faeee6c9d77d11ff77380d..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,7 +1,7 @@
-<?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>
index b9b735d66eecf938d4e85c377545e360222b40d1..1a8578c03090565ea5799222c13ffcf5bd71509a 100644 (file)
@@ -3,10 +3,10 @@ Bundle-ManifestVersion: 2
 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
index b862a296d38fe04269faeee6c9d77d11ff77380d..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,7 +1,7 @@
-<?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>
index 1053c96375fa309093d35ef545c3f82c88b6bfaa..eb5c147c03189c45c22e9ed7d518bca7b9a3affb 100644 (file)
@@ -3,11 +3,11 @@ Bundle-ManifestVersion: 2
 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",
index 402f3884d433270d9161594224d971469f297b3c..e09b3136e6307c7750f81f2ab1271ed340e4a2b4 100644 (file)
@@ -194,7 +194,10 @@ public class StandardNodeManager<Node, Engine extends StandardNodeManagerSupport
     @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);
         }
@@ -296,6 +299,8 @@ public class StandardNodeManager<Node, Engine extends StandardNodeManagerSupport
         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);
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 92ad56a8eecf86aa4b26e4ac8da545f773e1cb3a..d19e58d4c26e17366051cb6d6054189c7f813c7c 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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,
index 345aff81f82e88771156ff69b5f19c67901719f0..27bf8c51b4d03757db7d7e98dec8fdf66acb30a6 100644 (file)
@@ -36,112 +36,114 @@ import org.simantics.simulator.variable.exceptions.NotInRealmException;
  */
 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
index b862a296d38fe04269faeee6c9d77d11ff77380d..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,7 +1,7 @@
-<?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>
index 0bbebef439b91a6f94e4e9c81d78d925c4c2b765..6bd37757c730a26b4432154a0fa8d92de20c5339 100644 (file)
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index d47cbfae2779333f852aaa3571b9411346a6a80f..cf50cf94b72786cbacf1805efae5e1efc11135e0 100644 (file)
@@ -5,6 +5,6 @@ Bundle-SymbolicName: org.simantics.softwareconfiguration.ontology
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index fb44927463d2a49dc79a752649051539bdbf3a54..415c943cc98ff82eab5fb76bbdc825687d0f1624 100644 (file)
@@ -1,7 +1,7 @@
 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
@@ -12,6 +12,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 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
@@ -41,6 +42,7 @@ org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
 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
@@ -66,4 +68,5 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa
 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
index 8d195df0cd1206f9d2a764b41c37899566783365..3e2330afef2734b0c71931a23fd801557301589a 100644 (file)
@@ -3,10 +3,9 @@ Bundle-ManifestVersion: 2
 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",
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index d3ef37118a557e1aefb3b75879b4127224e17935..45df7045485243d1e6c5345464a6ceaf2542bef3 100644 (file)
@@ -9,7 +9,7 @@ Require-Bundle: org.eclipse.core.runtime,
  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
index 66e73102633981720df3364df364999e35444b79..ce277ead8a3c609119d22c84c95ae71a51be686b 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 4972e50782bf999eb88d0ff50b3fa195b6006936..9c4a2011f712994707e49d7caf881db4641e64de 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
@@ -29,7 +29,7 @@ Require-Bundle: org.simantics.layer0.utils,
  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,
index 3938e478b923d768220952d44301eedb449388f1..a2d2141f797403ac773028f0fd3a8ef83e106dd6 100644 (file)
@@ -12,8 +12,6 @@ import java.util.Iterator;
 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;
@@ -728,7 +726,7 @@ public class SpreadsheetGraphUtils {
     
     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;
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 1541224553885c500509444b6d50ebeb4bb89a4f..22606b513d174b5f901a1d399f7e90610df343b0 100644 (file)
@@ -12,6 +12,6 @@ Require-Bundle: org.simantics.layer0,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 1faf40bb392146a42605e270626fabde25209da3..df9e6b1dd16dd98be811e31c691e7de91cad25fa 100644 (file)
@@ -27,7 +27,7 @@ Require-Bundle: org.eclipse.ui,
  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
index b862a296d38fe04269faeee6c9d77d11ff77380d..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,7 +1,7 @@
-<?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>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 2bbd595f73c2087b0d2d368a7701b1ee826c06bb..105f5c3cf9009c8880afa5fe55d24c09a99a922f 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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,
@@ -23,6 +23,6 @@ Require-Bundle: org.simantics.utils.datastructures;bundle-version="1.0.0",
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index b8aff1cb468f66ef40b4de0b1c7cece4f8a94216..918cce9726f2c12da3a0f2d6bb061165ceae59a6 100644 (file)
@@ -8,7 +8,7 @@ Require-Bundle: org.simantics.layer0,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index ba77d3e370a8e9a69b6211e0251f42b932fae8e8..b922360d40a926e64b863ed359af46a06ace9154 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 5cf82d1f1d3a89772c2a760ed22c91c61c016a97..fe5bd373e21e7583195c934fb4c48b8c44826a76 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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
index 095640c4aa1f0a2185da8bd6a92010421da6d63a..5f8334398fe9ba99d896b9798ef195f20c5c059a 100644 (file)
@@ -56,6 +56,13 @@ public abstract class SynchronizationEventHandlerBase<T extends ComponentBase<T>
      */
     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;
@@ -66,6 +73,19 @@ public abstract class SynchronizationEventHandlerBase<T extends ComponentBase<T>
         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) {
@@ -311,14 +331,16 @@ public abstract class SynchronizationEventHandlerBase<T extends ComponentBase<T>
                     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);
                     }
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index e6ec6a0508821d0b036bfb89a02b9d3596ba2efe..ada7b22b2147a04c2b74675bf0b2ac5fa2ca16e3 100644 (file)
@@ -18,7 +18,7 @@ Require-Bundle: org.simantics.structural2;bundle-version="1.0.0",
  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,
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 1e43cc4c118c0c372d065fc8cae9db54388d5f9d..ff13395ccc38a30dc2cca3ddd535154756d9e6ee 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
@@ -11,7 +11,7 @@ Require-Bundle: org.simantics.structural.ontology;bundle-version="1.0.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,
index e43007637ac5ca616a89f33b3cc3f62247ad8fea..e9bb272d3d4442d07184c2bed0437a63f67a5562 100644 (file)
@@ -635,8 +635,8 @@ public class Functions {
 
                @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);
@@ -653,7 +653,6 @@ public class Functions {
                }
                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);
index df6e1598c2649312442e3acae4c7186b4bc329c3..e109f59e89538b3574f2abe73c67b39355674a56 100644 (file)
@@ -66,10 +66,16 @@ public class GetComponentLocation extends UnaryRead<Variable, ComponentLocation>
         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) {
index fce1abaa2d8a62fa3fcadfd97c12c66b037e0655..5e8538a69a80aca2ca8560577d6df868175bf332 100644 (file)
@@ -9,10 +9,10 @@ import org.simantics.db.Resource;
 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;
index 50a905e8204d3b84e4f094b3de1dd030cf53761a..1e3647905b004f7855892249c500bc251fb8c749 100644 (file)
@@ -8,7 +8,7 @@ import org.simantics.db.common.procedure.adapter.TransientCacheListener;
 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;
@@ -25,7 +25,7 @@ public class ProceduralComponentTypeCompilationContextRequest extends UnaryRead<
     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) {
index e27d92f29219a7f54963208286b5bd1936c0f485..aac19a7f176b663c9297e9e3b820e86e44392992 100644 (file)
@@ -308,11 +308,13 @@ public class StructuralUtils {
     }
 
     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)
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 334c4ab02e75fab37cc387fe37892ea4a9a41ce1..a52e7bbd76280baf7ca40c748728bd11a2882cbb 100644 (file)
@@ -19,6 +19,6 @@ Require-Bundle: org.eclipse.ui,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index ee1d781715ab2b25a6f6cd5187186c9143c28134..0a062fd85e52241839f3374effd0f427e6394f03 100644 (file)
@@ -6,7 +6,7 @@ Bundle-Version: 1.0.0.qualifier
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 5d84c6eef439ac34fddb65359a918668732e7489..ff0286c9b049f8d11de5dc96314890e2d8218ad5 100644 (file)
@@ -10,7 +10,7 @@ Require-Bundle: org.simantics.layer0,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 24f324cfb5f0341538a04ede0286b47703942bde..7ea5fac37df2d8970ee931fb3713d73b92ab6a6a 100644 (file)
@@ -17,8 +17,9 @@ Require-Bundle: org.eclipse.ui,
  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
index 0b99fe784fa2239470ef3f93f80b59f5e2ae6bcf..169f37e2a369c6cc93eb086e210ed40cf79746d9 100644 (file)
@@ -7,7 +7,7 @@ createSTSTestAction res = do
 
 importJava "org.simantics.tests.modelled.ui.TestsUIUtils" where
     runSTSTestAction :: Resource -> <Proc> ()
-    ignoreSTSTestAction :: [Resource] -> <Proc> ()
+    ignoreSTSTestAction :: Resource -> <Proc> ()
     
 createSTSSuiteAction :: Resource -> <Proc> ()
 createSTSSuiteAction res = do
index b24f445e23c985e317f652f628e435a0135a3b53..648d48969456e2c74064255fc01bc6fd7daa954e 100644 (file)
@@ -1,7 +1,6 @@
 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;
@@ -27,15 +26,13 @@ public class TestsUIUtils {
         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);
             }
         });
     }
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 19c437b0e46fde824541938e1528a7f3240a8449..3d4953c6e12c1409183cd773d05532cce25569f8 100644 (file)
@@ -12,7 +12,7 @@ Require-Bundle: org.simantics.tests.modelled.ontology,
  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,
index cb285791cb2927298b02a27c692e364ceb335cba..e6f2f43f36d651eda3a74d5d6d0d64d38ebfc27e 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 7c19c1fc3fd8b1caea2867af29e015f9a304a640..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,8 +1,10 @@
-#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
index fae2ac8217956b4c23c58390b26b134a64de99cb..8750d6431cdd590bea464f0a2cdc3b1e9611ce07 100644 (file)
@@ -7,6 +7,6 @@ Bundle-Activator: org.simantics.threadlog.internal.Activator
 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
index 9cea2c448f5f54fba3b228cba4a87c79c3c29977..45437d5a7957d29d254a7e62ef6804562f13c709 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 9b1daad02d1b5ee3f022dd890c9b01393c275df1..42771b0481cabe81c4fffa83f6cffbadf659d5a4 100644 (file)
@@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.core.runtime,
  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,
index a70949d5e1e2995fd9176e7e2c19d11ae030e4a7..708a32efcde55d6022b27675264762e31050ca65 100644 (file)
@@ -284,6 +284,14 @@ public class HorizRuler extends TrendGraphicalNode {
                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.
index b862a296d38fe04269faeee6c9d77d11ff77380d..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,7 +1,7 @@
-<?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>
index 295926d964165896ea8aa7c1b1b3c9d3d3caa77e..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
-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
index 5558732567c671b8b67e745e7b2dfc7a45b5ece4..76ebb9cc42fc69b379b78bff97b653229db79267 100644 (file)
@@ -15,13 +15,13 @@ Require-Bundle: javax.inject,
  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
index 95b68dcc68afb1585915dae1b612f6e73de7f160..cbb66231b60ebf97c78cc9f4307f5a3413fb85b9 100644 (file)
@@ -1,6 +1,6 @@
 <?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>
index a698e59674fc5acbc59d9c75892963a0115b7c26..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,12 +1,10 @@
 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
index 2842b50b79e3bea7c93ba494528562d80cf6151a..dab3c9ab96f5b30805d2d1b33411a6f53f6c2e99 100644 (file)
@@ -30,7 +30,8 @@ Require-Bundle: org.eclipse.core.runtime,
  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,
@@ -57,5 +58,5 @@ 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index f4545cf149db3221f4678180067497b0464f908f..e32551f98c20a2082dff272b52671e15216325f2 100644 (file)
@@ -5,6 +5,6 @@ Bundle-SymbolicName: org.simantics.user.ontology
 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
index 21329daa4a702b33ff521b3348e3f9a720822d3b..83e26c9bfb3f91b290ee53496ccd6132b926317c 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 1b012d999f0be311d10a06ee9287d28a2030d4ca..0ac866e13c30398c951d75a68fdf65127a44457d 100644 (file)
@@ -20,8 +20,7 @@ Require-Bundle: org.simantics.utils.thread;bundle-version="1.0.0";visibility:=re
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 7c14f5b12f9437e1322b33b4dcd1e4bc0c753036..2f026f482e8e4871f9d1f6e1b2af6d87092f598f 100644 (file)
@@ -7,5 +7,5 @@ Bundle-Vendor: VTT Technical Research Centre of Finland
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 7028157f6a172c970dd54522c847cb6181d4b690..a200f5fa0060e104fcb7ab65d511319bded0f10f 100644 (file)
@@ -6,6 +6,6 @@ Bundle-Version: 1.1.0.qualifier
 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
index 3b9d5b258d8a72163e1846dae2425e9c7af5ed3d..a5683be49ebac271b18f24331fc943e57bce4d54 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * 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
@@ -8,6 +8,7 @@
  *
  * Contributors:
  *     VTT Technical Research Centre of Finland - initial API and implementation
+ *     Semantum Oy - gitlab #522 - removed reflection hack
  *******************************************************************************/
 /*
  *
@@ -16,8 +17,6 @@
 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;
@@ -36,36 +35,10 @@ public class AWTThread extends AbstractExecutorService implements IThreadWorkQue
                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
@@ -93,14 +66,7 @@ public class AWTThread extends AbstractExecutorService implements IThreadWorkQue
 
        @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() {
@@ -135,6 +101,6 @@ public class AWTThread extends AbstractExecutorService implements IThreadWorkQue
        public boolean awaitTermination(long timeout, TimeUnit unit)
                        throws InterruptedException {
                return false;
-       }       
+       }
 
 }
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index b6999573f49d4d6cfa74f74b57724666fe2bab66..edcaa894325f547c5d9e0b2377ff561be680111e 100644 (file)
@@ -16,5 +16,5 @@ Export-Package: org.simantics.utils.ui.workbench,
  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
index 21329daa4a702b33ff521b3348e3f9a720822d3b..83e26c9bfb3f91b290ee53496ccd6132b926317c 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 53dcc1171b053b434fd5cc73b0837cb296ef78f2..9fd5c289d2b2020441508354b40ad4f516e89fae 100644 (file)
@@ -26,5 +26,5 @@ Export-Package: org.simantics.utils.ui,
 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
index 21329daa4a702b33ff521b3348e3f9a720822d3b..83e26c9bfb3f91b290ee53496ccd6132b926317c 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 9abadd88e6d5d9c4c1b9a577e0c38de8c30e983e..2a7a76a1fa3d086f64384df032feb6cb4bb6fb6a 100644 (file)
@@ -15,6 +15,6 @@ Export-Package: org.simantics.utils,
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 7116eb7208174472876bb615f769776fb494efe4..6d4fd81ac8775469bd3c63e5ad452b3fc2290b5d 100644 (file)
@@ -7,6 +7,6 @@ Require-Bundle: org.simantics.layer0,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index c2f875be06da1e9dd5911a82a761e53e954e5b04..981ad74fc49772da81c3669ecfbaf63968cb2db6 100644 (file)
@@ -8,7 +8,7 @@ Require-Bundle: org.simantics.layer0,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 8b5ee402afa181e34f306523f6c6b59d5360d1b9..3ab911b7226f61991a0614b3a63de2b0abaf87cf 100644 (file)
@@ -19,7 +19,7 @@ Require-Bundle: org.eclipse.core.runtime,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index f90a7a7dd847d09e556ee73ece6d8ca228c9ab2b..ba1504f0f466cd362906c9261c2ed12fa0a2c902 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
@@ -17,7 +17,7 @@ Require-Bundle: org.simantics.browsing.ui.swt;bundle-version="1.1.0";visibility:
  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
index b862a296d38fe04269faeee6c9d77d11ff77380d..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,7 +1,7 @@
-<?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>
index 295926d964165896ea8aa7c1b1b3c9d3d3caa77e..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
-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
index 2a0792592ab95ff23f809069b9739184f7ef0497..495539ff1cf080456ada8e8fc87d3858fd72c36c 100644 (file)
@@ -6,5 +6,5 @@ Bundle-Version: 1.0.0.qualifier
 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
index b862a296d38fe04269faeee6c9d77d11ff77380d..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,7 +1,7 @@
-<?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>
index 295926d964165896ea8aa7c1b1b3c9d3d3caa77e..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
-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
index 868c24a909f8ff14e309e2d4fc0cec2e27a22bde..a53a3c6cd4c2c626a9ddf5b2eee442f57d3188e5 100644 (file)
@@ -16,6 +16,6 @@ Require-Bundle: org.eclipse.ui,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 6ff07c9dab7fac3973df0fab8b18b4b86b58a909..82c6edbef99073cef636a470f5316c0451efa49b 100644 (file)
@@ -4,7 +4,7 @@ Bundle-Name: Views
 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",
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 460bda717c647439359cdbc4d5ebbf004e0eb949..144382aacc7a4443c7a576bbff09f180417cee22 100644 (file)
@@ -19,7 +19,7 @@ Require-Bundle: org.eclipse.ui,
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 53c2632b3598ffb96247640ed0ead716aa959b45..e3d072c693fe907b61ace0464bd33605bbadc63b 100644 (file)
@@ -7,6 +7,6 @@ Bundle-Vendor: Semantum Oy
 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
diff --git a/bundles/org.simantics.workbench.search.impl/.classpath b/bundles/org.simantics.workbench.search.impl/.classpath
new file mode 100644 (file)
index 0000000..e801ebf
--- /dev/null
@@ -0,0 +1,7 @@
+<?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>
diff --git a/bundles/org.simantics.workbench.search.impl/.project b/bundles/org.simantics.workbench.search.impl/.project
new file mode 100644 (file)
index 0000000..a13c54b
--- /dev/null
@@ -0,0 +1,28 @@
+<?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>
diff --git a/bundles/org.simantics.workbench.search.impl/.settings/org.eclipse.jdt.core.prefs b/bundles/org.simantics.workbench.search.impl/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..7adc0fb
--- /dev/null
@@ -0,0 +1,10 @@
+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
diff --git a/bundles/org.simantics.workbench.search.impl/META-INF/MANIFEST.MF b/bundles/org.simantics.workbench.search.impl/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..6e62746
--- /dev/null
@@ -0,0 +1,18 @@
+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
diff --git a/bundles/org.simantics.workbench.search.impl/build.properties b/bundles/org.simantics.workbench.search.impl/build.properties
new file mode 100644 (file)
index 0000000..e9863e2
--- /dev/null
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml
diff --git a/bundles/org.simantics.workbench.search.impl/plugin.xml b/bundles/org.simantics.workbench.search.impl/plugin.xml
new file mode 100644 (file)
index 0000000..8105d76
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.ui.services">
+   </extension>
+
+</plugin>
diff --git a/bundles/org.simantics.workbench.search.impl/src/org/simantics/workbench/search/impl/Activator.java b/bundles/org.simantics.workbench.search.impl/src/org/simantics/workbench/search/impl/Activator.java
new file mode 100644 (file)
index 0000000..cfb6852
--- /dev/null
@@ -0,0 +1,44 @@
+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;
+       }
+
+}
@@ -9,7 +9,7 @@
  * 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;
@@ -19,7 +19,6 @@ import org.eclipse.core.runtime.IStatus;
 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
similarity index 99%
rename from bundles/org.simantics.workbench/src/org/simantics/workbench/internal/contributions/search/BrowserView.java
rename to bundles/org.simantics.workbench.search.impl/src/org/simantics/workbench/search/impl/BrowserView.java
index 01d015de564eabb935302ac98b5c3af6a1e86097..0e3c6eb219166ff1935a39d30cf0f1a3bb53047c 100644 (file)
@@ -10,7 +10,7 @@
  *     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;
 
@@ -1,4 +1,4 @@
-package org.simantics.workbench.internal.contributions.search;
+package org.simantics.workbench.search.impl;
 
 
 import org.eclipse.core.expressions.Expression;
@@ -12,9 +12,9 @@ import org.eclipse.ui.services.AbstractServiceFactory;
 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,
@@ -27,7 +27,8 @@ public class SearchServiceFactory extends AbstractServiceFactory {
                if (wb == null) {
                        return null;
                }
-               
+
+               @SuppressWarnings("unchecked")
                Object parent = parentLocator.getService(serviceInterface);
                if (parent == null) {
                        return new SearchServiceImpl();
@@ -42,7 +43,7 @@ public class SearchServiceFactory extends AbstractServiceFactory {
                        Expression parentExp = ((SlaveSearchService) parent).getDefaultExpression();
                        return new NestableSearchService((ISearchService)parent, parentExp);
                }
-               
+
                Expression exp = new ActivePartExpression(site.getPart());
                return new SlaveSearchService((ISearchService)parent, exp);
        }
similarity index 98%
rename from bundles/org.simantics.workbench/src/org/simantics/workbench/internal/contributions/search/SearchServiceImpl.java
rename to bundles/org.simantics.workbench.search.impl/src/org/simantics/workbench/search/impl/SearchServiceImpl.java
index 733bebddf2fc6460723309bfef5a9837fc251395..19c574547d9a5db7658d049878e61cfc90d3ac43 100644 (file)
@@ -1,4 +1,4 @@
-package org.simantics.workbench.internal.contributions.search;
+package org.simantics.workbench.search.impl;
 
 import java.io.File;
 import java.io.IOException;
@@ -61,7 +61,6 @@ import org.simantics.utils.datastructures.Pair;
 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;
@@ -621,9 +620,9 @@ public class SearchServiceImpl implements ISearchService{
                        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;
                    }
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 8d66e46688e30b7f6d3d5e4b6e3ecd5d9788a092..399d33231217035e7bbcddf70c0ea266a980441a 100644 (file)
@@ -5,13 +5,10 @@ Bundle-SymbolicName: org.simantics.workbench.search
 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
index ffbfc5f62cc22308cb4ad2916f48777635be5c06..d270124f1d84e674878e5267ad60eafc2c92d885 100644 (file)
@@ -17,11 +17,12 @@ import java.util.Map;
 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:
@@ -31,6 +32,8 @@ import org.simantics.scl.runtime.function.FunctionImpl5;
  */
 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 {
@@ -41,7 +44,7 @@ public class DependenciesSearchFunction extends FunctionImpl5<IProgressMonitor,
 
             return Searching.generateDependenciesSearchResult(graph, results);
         } catch (DatabaseException e) {
-            Logger.defaultLogError(e);
+            LOGGER.error("Search query {} failed", query, e);
         }
         return null;
     }
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 5f0d41e961f84e55bb6fb516df19455ea11eaffd..088eb3624792d4daa131b454fdbfeb76fca84d43 100644 (file)
@@ -1,7 +1,7 @@
 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
@@ -10,6 +10,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 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
@@ -36,6 +37,7 @@ org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
 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
@@ -58,4 +60,5 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=di
 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
index 968c1f344ec59ac865e297f9ef88f5f28f7abd60..63709cc6f13fd355827b5d8862a38ebda4c7c0b4 100644 (file)
@@ -9,43 +9,24 @@ Bundle-Localization: plugin
 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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 1a1102e203c974462724f0c44e1a3156c3dd29bb..4829d00c5a4f025e63e641131a6331bdc88025f3 100644 (file)
@@ -11,7 +11,6 @@ Require-Bundle: org.eclipse.core.runtime;visibility:=reexport,
  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",
@@ -21,7 +20,7 @@ Require-Bundle: org.eclipse.core.runtime;visibility:=reexport,
  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",
diff --git a/bundles/org.simantics/src/org/simantics/LogManager.java b/bundles/org.simantics/src/org/simantics/LogManager.java
deleted file mode 100644 (file)
index 4274002..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * 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
index cbe17e940d9436223aa6c2b62127872963a7b769..35808bd929fa74d63f18f860bdc51680abeababf 100644 (file)
@@ -44,6 +44,7 @@ import org.simantics.db.management.SessionContextProvider;
 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;
@@ -467,6 +468,14 @@ public class Simantics {
         }
     }
 
+    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 {
index 730e4e8877470439c8fd88cc8b47050db3bcfb66..aa0b503dace880ca7c18d86dd1584f944a18260e 100644 (file)
@@ -21,7 +21,6 @@ import java.io.File;
 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;
@@ -392,6 +391,8 @@ public class SimanticsPlatform implements LifecycleListener {
                     throw new PlatformException("Reinstalling Database, NOT IMPLEMENTED");
                 }
 
+                boolean serviceModeEntered = false;
+
                 if (ontologyPolicy == OntologyRecoveryPolicy.Merge) {
                     message = "Merging ontology changes";
                     monitor.subTask(message);
@@ -450,6 +451,14 @@ public class SimanticsPlatform implements LifecycleListener {
 
                                 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);
@@ -500,6 +509,11 @@ public class SimanticsPlatform implements LifecycleListener {
                     }
                 }
                 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);
@@ -998,6 +1012,11 @@ public class SimanticsPlatform implements LifecycleListener {
                     } 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");
index 59e88c12b6a83843b1a69dbd2cb2766cc5bdbec2..3b5df71507c303b152d697dcee08f6d18d89f6b1 100644 (file)
                <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>
 
index cf4ff31b9fe934987c2c0a6521dae86c527638e0..f11bdd484f30f630c7e35d497bbcaf1dd224afdb 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 83cfa91dc8df95f6c5797dcd0d4b243128587303..89e0b928b59703da8aa89c32478a1f2819b88672 100644 (file)
@@ -14,7 +14,7 @@ Require-Bundle: org.eclipse.ui,
  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,
index a1a1b3177da22a7a570354bf6feeb5cb89dbb3a9..7808093a6a27684e9232bb530f556fd2ff4ffc8b 100644 (file)
@@ -2,7 +2,7 @@
 <feature
       id="hdf.hdf5"
       label="HDF5 for Java"
-      version="1.10.2"
+      version="1.10.2.b0001"
       provider-name="Semantum Oy">
 
    <description>
index 1afb8a6f3f759fa793fcea32549bd31c39fb4566..64d7a8066a745d267dc9375b7471ce9dad052a0c 100644 (file)
@@ -88,11 +88,4 @@ If the Library as you received it specifies that a proxy can decide whether futu
          version="0.0.0"
          unpack="false"/>
 
-   <plugin
-         id="org.jfree.jcommon"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
 </feature>
index 86408f00ab1f3b3a9392c0f0e1ce1c7da2296e38..daf0be719004d9c0dc2cca70484cec0adf15836b 100644 (file)
@@ -36,7 +36,7 @@
          unpack="false"/>
 
    <plugin
-         id="org.apache.commons.collections"
+         id="org.apache.commons.collections4"
          download-size="0"
          install-size="0"
          version="0.0.0"
index ae1c2ddaebee9a1616e30d1bf47ff91bc65e9ad2..c5efb11d79353323d8cc67fd7ad254ae960be7f2 100644 (file)
          version="0.0.0"
          unpack="false"/>
 
+   <plugin
+         id="jakarta.annotation-api"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
 </feature>
index 59c22464375383ef51b34e2c4080e9c80a8b8937..7cc275b352c9f431195d82b7b16a6005db6bf6ac 100644 (file)
          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>
index 1f262aca35f460136d6943a363ef8aac92ea3593..fdb6644f481dc46c90fe63d4780f53aff7026aa3 100644 (file)
          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>
index 658c26f6cde7e97a029cda5731c159dccc51a885..66eeffaffed5729bf4ae23b5e791724e896a1f17 100644 (file)
          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>
index 33dd73ef64c5436065c705566351cd082e8646a0..b5cd3f73d42aa66c56e96d07c2abdd8c2361acad 100644 (file)
@@ -40,7 +40,7 @@
          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"
index f5148b1d741f03b2f039b1f5438b12400b7488be..0d2638196368cfa1189fed1c08f0c12f15fe8982 100644 (file)
@@ -100,7 +100,14 @@ reusable components implemented on top of the platform.
          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"
index 910e199de437b4a7bebafc28a04605244606a9f8..54dd723722cfd6cddd0d97025dcd34b6747209a6 100644 (file)
@@ -479,13 +479,6 @@ This Agreement is governed by the laws of the State of New York and the intellec
          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"
index 72371382e5d8c7419072486839acc3d239778e28..1e53969d56bf79efdf3082338376219f62bccaa3 100644 (file)
@@ -110,7 +110,14 @@ This Agreement is governed by the laws of the State of New York and the intellec
          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"
@@ -228,13 +235,6 @@ This Agreement is governed by the laws of the State of New York and the intellec
          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"
@@ -243,14 +243,7 @@ This Agreement is governed by the laws of the State of New York and the intellec
          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"
@@ -263,20 +256,6 @@ This Agreement is governed by the laws of the State of New York and the intellec
          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"
@@ -284,13 +263,6 @@ This Agreement is governed by the laws of the State of New York and the intellec
          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"
@@ -312,13 +284,6 @@ This Agreement is governed by the laws of the State of New York and the intellec
          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"
index 0d0bc2f072e0231669ed8825444bc6a31fe5c466..e1133bd659bcf59effd0e26379f443ad0262a8cd 100644 (file)
@@ -13,7 +13,7 @@
 <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>
index 72baed8b3f4f57d9413fd20002ef602263adc31e..cf4ecfaadc58684314acc7250fc53c499ba4683d 100644 (file)
          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"
index 0a32a1539296294b373a0710b176bc8bde85080d..64a2dd46812e503d6dcb592ee75014a8c1b451a2 100644 (file)
       [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"
index 20c72be5fe2e9200e1976e5dbcdf3aaf2d842c42..9c39c71e72312768bc60f79f116dd6e6d4c947b8 100644 (file)
          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>
index cac8ec5bb52684bf5b6eb25f199ec1503b64a437..3d60be4670a0cf9ce5cb98a7091002e6b7aef727 100644 (file)
@@ -105,20 +105,6 @@ worth mentioning is <a rel="nofollow" class="external text" href="http://www.ope
 <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
@@ -148,7 +134,7 @@ All rights reserved.</pre>
 <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
@@ -169,14 +155,14 @@ All rights reserved.</pre>
 <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
@@ -254,7 +240,7 @@ Copyright (c) 2011-2016, Yann Collet</pre>
 </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 &amp; compact type-specific collections for Java</a>\r
@@ -285,11 +271,12 @@ Copyright (c) 2011-2016, Yann Collet</pre>
 <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
@@ -341,13 +328,6 @@ Copyright (c) 2011-2016, Yann Collet</pre>
 <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
@@ -355,14 +335,6 @@ Copyright (c) 2011-2016, Yann Collet</pre>
 <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
@@ -384,6 +356,13 @@ Copyright (c) 2011-2016, Yann Collet</pre>
 <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
index b7df7f22e09e11b19442a176af9eadeb6644bc4e..55b537f941a225baca3d92f82cbd40f170fd050f 100644 (file)
@@ -1,7 +1,7 @@
 <?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
@@ -42,7 +42,6 @@ org.eclipse.e4.ui.css.theme.e4_classic
       </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
@@ -55,7 +54,7 @@ org.eclipse.e4.ui.css.theme.e4_classic
    </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
index d4e66227b1fff88e874e611068c731917cda769f..4d84e674f80ed65fb8998e65b8db9df61862791a 100644 (file)
     <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>
index f5b19fd7381fe0d49640efdfebb3c535d38b70ff..4b1730d71e06981d1219cee40409d653e0690a18 100644 (file)
@@ -3,7 +3,9 @@
 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
@@ -47,4 +49,11 @@ This greatly simplifies target definition by removing duplication from the their
 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
diff --git a/releng/org.simantics.sdk.build.targetdefinition/build/.gitignore b/releng/org.simantics.sdk.build.targetdefinition/build/.gitignore
new file mode 100644 (file)
index 0000000..ebfaccf
--- /dev/null
@@ -0,0 +1,2 @@
+target
+workspace
\ No newline at end of file
diff --git a/releng/org.simantics.sdk.build.targetdefinition/build/pom.xml b/releng/org.simantics.sdk.build.targetdefinition/build/pom.xml
new file mode 100644 (file)
index 0000000..cc70d35
--- /dev/null
@@ -0,0 +1,69 @@
+<?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
index 64ab6dc3b913758b1792262f9187a74c589f038c..6500ce550c84a4d30a4b62d8cacc05b44848dad6 100644 (file)
@@ -1,7 +1,7 @@
 <?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"/>
index 8bca4a7d78f54990706deed5bed16c99addd33f1..7494c798142049c0fbe8f943c168e766222bbb2b 100644 (file)
@@ -39,6 +39,16 @@ location "http://www.simantics.org/update/2019-12/" {
        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
@@ -158,7 +168,12 @@ location "http://www.simantics.org/update/nebula/releases/2.2.0/incubation/" {
        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
@@ -203,6 +218,10 @@ location "http://www.simantics.org/download/master/external-components/maven" {
        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
@@ -211,10 +230,6 @@ location "http://www.simantics.org/download/master/external-components/maven" {
        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
@@ -246,14 +261,14 @@ location "http://www.simantics.org/download/master/external-components/maven" {
        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
@@ -261,14 +276,14 @@ location "http://www.simantics.org/download/master/external-components/maven" {
        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
@@ -301,22 +316,8 @@ location "http://www.simantics.org/download/master/external-components/maven" {
        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
@@ -327,10 +328,12 @@ location "http://www.simantics.org/download/master/external-components/maven" {
        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
@@ -345,6 +348,8 @@ location "http://www.simantics.org/download/master/external-components/maven" {
        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
@@ -353,22 +358,24 @@ location "http://www.simantics.org/download/master/external-components/maven" {
        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
@@ -385,8 +392,8 @@ location "http://www.simantics.org/download/master/external-components/maven" {
        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
 }
index de8c9bb7050a158d537771487eb854dcaa7b0067..dddbfc2ea15cd3b976715f4e9b30263c34e1c44f 100644 (file)
@@ -13,4 +13,4 @@
                <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
index 67ce332010243ffbdff1829b94ef343059e7a71c..2e8f54c2de717124ebc73e6aa1ae50d95c76245b 100644 (file)
@@ -1,7 +1,7 @@
 <?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"/>
index 1d7588e2646b56ca377c9298075f73ba27df56c0..f607a133f843e1903d5866a7695beafbd72ac911 100644 (file)
@@ -1,8 +1,8 @@
-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
index c636acba4307532b65fe7b27c1adab3b082ec48b..42fd442e8846bd623c1fa923766072cf8fcecb84 100644 (file)
@@ -2,7 +2,7 @@
        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>
index da8b7254d61683f2dc11d3806ceb9fe9338abb2d..cfa99b7ba5e305a3e36063c0db4a4d397c674ced 100644 (file)
@@ -8,8 +8,10 @@
        <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>
 
diff --git a/settings.xml b/settings.xml
deleted file mode 100644 (file)
index 1aabd4d..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<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>
-
index 3a21537071bf4118b9e1ee864cb4bc258aa48211..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,11 +1,10 @@
 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
index 0247fb635957011ae011e872403e09f3302912f5..1d23305664e38f93d743e1a49eb3790119b72455 100644 (file)
@@ -13,7 +13,6 @@ Require-Bundle: org.eclipse.core.runtime,
  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",
@@ -25,7 +24,7 @@ Require-Bundle: org.eclipse.core.runtime,
  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
index 05804fb8403173a2b5c57c317e3cea115ce5c1c4..80b7f7b9d61496a6e06c4461762c9423f7e84dfb 100644 (file)
        <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="../"/>
index da0a86faa7699924535531d815b0debb37f0b05d..4c6a1daf9481466637d0f802fb073856af43a7ac 100644 (file)
                                <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" />
index cb98442a642dbbe0792d581727f140a163e63c70..484db5564b242b5d84f2f79ea0ba216297a83670 100644 (file)
@@ -60,7 +60,7 @@
 <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"/>
index 306635d3117dab79a6f34d90f86e59075ca3fc7f..74c1f77b3eb97a30e0daf34651cfa151211827d8 100644 (file)
@@ -60,7 +60,7 @@
 <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"/>
index d7bdd406e39c9e17b985b40381fb1ba6bb6b7459..d0bd9bb6ce0b5004a07de6cf26b3da0f9c7416d5 100644 (file)
@@ -60,7 +60,7 @@
 <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"/>
index 485bc8fb82aebf2903a55c0a155753112d68eadb..bc14401080ae336044e3da2fb266baaed3e1599d 100644 (file)
@@ -40,7 +40,7 @@
 <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"/>
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index d21946107ff59c8df2b2f09f2a24332553bea137..678f28e7b80ceff88e5a628ab8ea33af04e0a6b9 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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,
@@ -11,7 +11,6 @@ Require-Bundle: org.junit;bundle-version="4.12.0",
  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
index eca7bdba8f03f22510b7980a94dbfe10c16c0901..e801ebfb4680123285c15553dc70584276fe0057 100644 (file)
@@ -1,6 +1,6 @@
 <?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"/>
index 0c68a61dca867ceb49e79d2402935261ec3e3809..7adc0fb9a0d32bd6b4e3ce6f305ab7165208865c 100644 (file)
@@ -1,7 +1,10 @@
 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
index 2773e93bd92b6e5f112810b862e3a298271c00ab..f4787aef992149fa27d6c0e70a1da58bbe4a95da 100644 (file)
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 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",
index 4058b66fe01308b00bdfd519361e76dc2677a237..1e56295b323545cf041b447c3ca15b164dcffd8d 100644 (file)
@@ -1,7 +1,7 @@
 <?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" />
index bfbaa85aec1f6eed3849fafd69c1519553b048ac..881f9d2bef180fe56ba2c8e23b00ac15d6162fbf 100644 (file)
@@ -4,7 +4,7 @@ Bundle-Name: Simantics Integration STS
 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,