]> gerrit.simantics Code Review - simantics/platform.git/log
simantics/platform.git
6 years agoSystem.currentTimeMillis to "Simantics/Misc" SCL-module 19/1719/1
jsimomaa [Tue, 17 Apr 2018 12:27:32 +0000 (15:27 +0300)]
System.currentTimeMillis to "Simantics/Misc" SCL-module

refs #7867

Change-Id: Ib7a26a7e982dca3de316cb203763a0f720a12b84

6 years agoBetter fix for ClusterTable maps going out of sync
Tuukka Lehtonen [Fri, 13 Apr 2018 21:31:15 +0000 (00:31 +0300)]
Better fix for ClusterTable maps going out of sync

ClusterSmall.toBig was not copying importance over to the constructed
ClusterBig causing importanceMap to go out of sync on the first call to
ClusterSmall.toBig.

refs #7724

Change-Id: I6e56b7f94962de3ec243a9d50775e649f930d0d2
(cherry picked from commit 980d21d8a26dddd2e57dbffdc8f320a76aa0973e)

6 years agoFixed ClusterTable cluster hash/importance map book-keeping problem
Tuukka Lehtonen [Thu, 12 Apr 2018 21:43:36 +0000 (00:43 +0300)]
Fixed ClusterTable cluster hash/importance map book-keeping problem

The main problem was that importance values should have been started
from 1 and 0 is considered an invalid importance value. This prevents
ClusterTable.replaceCluster from making mistakes in importanceMap.

refs #7724

Change-Id: Ie15a2d11bef2b8bdbcee2f5baba47633faa97826
(cherry picked from commit f59872e129c2d1b84fe322ae120fbeac22a94f88)

6 years agoMerge "Refactoring CHR handling code"
Hannu Niemistö [Thu, 12 Apr 2018 10:04:44 +0000 (13:04 +0300)]
Merge "Refactoring CHR handling code"

6 years agoRefactoring CHR handling code 12/1712/1
Hannu Niemistö [Thu, 12 Apr 2018 09:51:23 +0000 (12:51 +0300)]
Refactoring CHR handling code

refs #7866

Change-Id: If2b2a08c740c93d1a4b01830ab0e6de3c014fbec

6 years agoMerge "(refs #7866) Better error location for the NPE in compilation"
Hannu Niemistö [Thu, 12 Apr 2018 09:47:15 +0000 (12:47 +0300)]
Merge "(refs #7866) Better error location for the NPE in compilation"

6 years ago(refs #7866) Better error location for the NPE in compilation 11/1711/2
Hannu Niemistö [Thu, 12 Apr 2018 07:04:44 +0000 (10:04 +0300)]
(refs #7866) Better error location for the NPE in compilation

Change-Id: I3027ac4cd1061edefed6b46ddf1c79773d03caca

6 years agoAllow changing DisposingPolicy max queue length 05/1705/1
Tuukka Lehtonen [Tue, 10 Apr 2018 20:48:18 +0000 (23:48 +0300)]
Allow changing DisposingPolicy max queue length

Needed to suppor preference-configurability of diagram editor background
disposal.

refs #7863

Change-Id: Ibf9f29dde2c06f5b055bfd42f989368c7573f327
(cherry picked from commit 56a44956cc6cf02ee85b7cfd55c8d3cbfb80a82f)

6 years agoUse unpack in hdf.hdf5lib 02/1702/4
meklund [Tue, 10 Apr 2018 14:12:44 +0000 (17:12 +0300)]
Use unpack in hdf.hdf5lib

Unpack helps on Linux, since otherwise libhdf5_java.so cannot find
libhdf5.so.101.

refs #7858

Change-Id: I8946d5e30b2b4c8ac98a5555f8869399b516fdca

6 years agoUpgraded HDF5 library to 1.10.2 and added linux support 95/1695/6
Tuukka Lehtonen [Sun, 8 Apr 2018 22:01:52 +0000 (01:01 +0300)]
Upgraded HDF5 library to 1.10.2 and added linux support

Amend by Miro:
Ran patchelf -set-rpath \$ORIGIN libhdf5_java.so and updated README

refs #7858

Change-Id: Ibe6d56443b8d02c4e2896adaed9b76f86e042f6e

6 years agoFixes the dpi value in SVGSalamander to 96 98/1698/2
Hannu Niemistö [Tue, 10 Apr 2018 12:24:20 +0000 (15:24 +0300)]
Fixes the dpi value in SVGSalamander to 96

If SVG file defining symbol graphics does not contain unit information,
it is converted from points to pixels using a dpi-value. The value is 96
in most cases but in some machines differs from this default. This makes
the symbol graphics scaled compared to originally drawn graphics which
is undesirable.

refs #7860

Change-Id: I1f858ec0703a6f4dba9547fed2aca0438172248b

6 years agoA utility class for recursive search in cyclic graph 97/1697/3
Hannu Niemistö [Tue, 10 Apr 2018 06:57:49 +0000 (09:57 +0300)]
A utility class for recursive search in cyclic graph

refs #7859

Change-Id: Idba80d0a6a42ab06fa774da1933ffd1d636085f1

6 years agoFixing problems in the database unit testing environment with Acorn 93/1693/1
Tuukka Lehtonen [Thu, 5 Apr 2018 06:47:03 +0000 (09:47 +0300)]
Fixing problems in the database unit testing environment with Acorn

* Removed static map from org.simantics.acorn.FileIO.
  Moved the map into a session service as org.simantics.acorn.FileCache
* Changed org.simantics.db.testing.common.Tests utilities to use Acorn
  instead of ProCore (AcornTestHandler). Did not introduce abstraction
  for this for now.

refs #7855

Conflicts:
bundles/org.simantics.acorn/src/org/simantics/acorn/FileIO.java

Change-Id: Iec42395cc71b30a4c376a44778b358e3807e6ec9
(cherry picked from commit 03fac449ec81e88669169d671bb386eb93ac060d)

6 years agoFinalizing improve startup time for fresh or rollback'd session 29/1629/5
Tuukka Lehtonen [Thu, 5 Apr 2018 13:33:58 +0000 (16:33 +0300)]
Finalizing improve startup time for fresh or rollback'd session

Finally fixed the long-sought InputStream reading bug from
TransferableGraphFileReader.InputChannel.read(ByteBuffer).

The ByteFileReader implementation expected the provided
ReadableByteChannel to always provide a full buffer of data unless EOF
was encountered and the InputChannel.read implementation was not taking
care of that.

Also added simpler utilities for reading TG's from files/InputStreams
directly using static TransferableGraphFileReader.read(File/InputStream)
methods.

PlatformUtil.readTG can now finally use TransferableGraphFileReader for
maximal performance.

refs #7835

Change-Id: I170986bf271a409f9205fad808ae029becc1d3a4

6 years agoShow imports of nonexistent modules as errors 92/1692/1
Hannu Niemistö [Thu, 5 Apr 2018 10:28:31 +0000 (13:28 +0300)]
Show imports of nonexistent modules as errors

Previously there was a separate error category IMPORT_ERROR for all
import errors that was sorted with WARNINGS. Now IMPORT_ERROR category
is also used for import failures whose reason is compilation problem in
the upstream module (although this is fatal for compilation, the problem
is not located in the current module).

refs #7857

Change-Id: Id9227a69d045b68a3e94c1562eb6d24f70d7aaa1

6 years agoStreaming serialization of values, debugger for corrupted values 91/1691/1
Hannu Niemistö [Thu, 5 Apr 2018 08:07:16 +0000 (11:07 +0300)]
Streaming serialization of values, debugger for corrupted values

refs #7856

Change-Id: If9d7bdb84c46c3b3626241f9a63e582fe0a15004

6 years agoSupport diagram profile activity store/restore in model export/import 88/1688/1
Tuukka Lehtonen [Tue, 3 Apr 2018 20:48:36 +0000 (23:48 +0300)]
Support diagram profile activity store/restore in model export/import

Diagram profile selections are stored in the "profiles" workspace
persistent virtual graph. They cannot be done in the persistent database
because we do not want the profile selections to be part of the database
version/undo history. This just doesn't fit the current way of using
diagram profiles.

The code introduced in this commit needs to be put to use in
product-specific custom export/import logic and copy/paste handlers to
take advantage of it.

refs #7854

Change-Id: Ib996144f1afa376a1563e4309fe41421ee4da529
(cherry picked from commit 95e05b3cc3208ec57118e8167a090c9b90edfaf2)

6 years agoUse synchronized hash map instead of ConcurrentHashMap in LazyModule 83/1683/1
Hannu Niemistö [Tue, 3 Apr 2018 12:15:11 +0000 (15:15 +0300)]
Use synchronized hash map instead of ConcurrentHashMap in LazyModule

refs #7826

Change-Id: I660f5f3312a7d1db49441f02d55864e36c950d74

6 years agoCleaning up some bloat from CompilePGraphs 79/1679/1
jsimomaa [Tue, 3 Apr 2018 10:11:38 +0000 (13:11 +0300)]
Cleaning up some bloat from CompilePGraphs

refs #7852

Change-Id: Ie3cfe8d7873f9c687bffca776054c626cc65497b

6 years agoRace condition fix caused deadlock, allow parallel recomputation 76/1676/1
Hannu Niemistö [Tue, 3 Apr 2018 07:52:58 +0000 (10:52 +0300)]
Race condition fix caused deadlock, allow parallel recomputation

refs #7826

Change-Id: Ib0515c2ae7d3e6d1474f991965307969a439baf7

6 years agoEscape the dot in regular expression 74/1674/1
Jussi Koskela [Tue, 3 Apr 2018 06:24:31 +0000 (09:24 +0300)]
Escape the dot in regular expression

refs #7848

Change-Id: Iffbdcdc50150f24e4f6517fd8154a5a47bbf8eb0

6 years agoReset SVGNode's data hash on clean up 73/1673/1
Jussi Koskela [Tue, 3 Apr 2018 06:00:03 +0000 (09:00 +0300)]
Reset SVGNode's data hash on clean up

AnimatedSVGNode assumes that its diagram cache is initialized if data
hash is not null.

refs #7851

Change-Id: Id143816210c7905a772e2c391a32026bf838f8e6

6 years agoFail-safe import can now be disabled with a system property 72/1672/1
Tuukka Lehtonen [Mon, 2 Apr 2018 20:54:03 +0000 (23:54 +0300)]
Fail-safe import can now be disabled with a system property

Use the system property -Dorg.simantics.tg.import.failOnMissingEntities@
to disable fail-safe import by settings its value to true.

refs #7850

Change-Id: I2c29d1795ba0c04b16be1798c237651556326bd9
(cherry picked from commit f7c2f46c7c411c5c9dd3323d3cec3a4b8b6a3bbe)

6 years agoImproved subscription CSV export wizard page initial selection handling 69/1669/1
Tuukka Lehtonen [Fri, 30 Mar 2018 07:23:00 +0000 (10:23 +0300)]
Improved subscription CSV export wizard page initial selection handling

Now it supports chart/chart group/chart item selections as well to
initialize the subscription item selection.

refs #7849

Change-Id: Idbfbd979116b932f0d54958a63b01142401366a6
(cherry picked from commit b6f0f7aa4de4c172a830ef9087749e38185a8edf)

6 years agoFixed invalid comparison from AcornBackupProvider.RestoreCopyVisitor 66/1666/1
Tuukka Lehtonen [Thu, 29 Mar 2018 11:41:33 +0000 (14:41 +0300)]
Fixed invalid comparison from AcornBackupProvider.RestoreCopyVisitor

Also removed unnecessary Files.exists checks.

refs #7847

Change-Id: I67d9d5a500824a275f4412ef2ecb7c2860f7f1c7

6 years agoRemoved redundant Files.exists/isDirectory checks 61/1661/2
Tuukka Lehtonen [Wed, 28 Mar 2018 13:01:10 +0000 (16:01 +0300)]
Removed redundant Files.exists/isDirectory checks

refs #7847

Change-Id: Id2f5936a801ece1828c13e29662c15d61b04abaa

6 years agoFixed compilation problems and SWTAWTComponent focus problem with Java9+ 63/1663/1
Tuukka Lehtonen [Wed, 28 Mar 2018 19:44:18 +0000 (22:44 +0300)]
Fixed compilation problems and SWTAWTComponent focus problem with Java9+

refs #7848

Change-Id: If166f7864d05c67f4c58b87018b273a36f085801

6 years agoUse searchByTypeShallow in ModelingUtils.createMissingGUIDs 58/1658/1
Tuukka Lehtonen [Mon, 26 Mar 2018 20:33:42 +0000 (23:33 +0300)]
Use searchByTypeShallow in ModelingUtils.createMissingGUIDs

refs #7845

Change-Id: Idf9c33687c53a9725821911fce59d9cf7287ce9c

6 years agoImproved network-drive-resilience in index directory creation 57/1657/1
Tuukka Lehtonen [Mon, 26 Mar 2018 15:36:02 +0000 (18:36 +0300)]
Improved network-drive-resilience in index directory creation

In a product, the removed Files.exists(p) && !Files.isDirectory(p) code
threw an exception because the examined path was not guaranteed to be in
a coherent state at the time of examination but Files.createDirectories
would still take care of throwing any exceptions if there were any
problems in creating the directory.

The worst thing was that this exception was hidden and not even logged.
Luckily a problem case forced the find.

refs #7845

Change-Id: Id44c5118ad97fbb83dcec87f77717185d3e402a1

6 years agoPrevent NPEs in ViewUtils layout loading code 52/1652/3
Tuukka Lehtonen [Mon, 26 Mar 2018 09:30:51 +0000 (12:30 +0300)]
Prevent NPEs in ViewUtils layout loading code

refs #7843

Change-Id: Ia34be3d08b8a368ed314c56e3af0b4e39aa45cec

6 years agoOnly claim new identifier if instance L0.TypeWithIdentifier 54/1654/1
Tuukka Lehtonen [Mon, 26 Mar 2018 08:29:34 +0000 (11:29 +0300)]
Only claim new identifier if instance L0.TypeWithIdentifier

Fixed long-standing bug from CopyComponentAdvisor which added
identifiers for non-STR.Component instances which has started causing
problems in team server products in version comparisons.

refs #7842

Change-Id: Iac3e604993ec579cd8feb443843af944a8fa01f3
(cherry picked from commit c912edf13bf5a91b2f6dc855f54d8728aa0a64f5)

6 years agoAdding FileSystem and FileSystems to Files SCL-API 50/1650/3
jsimomaa [Mon, 26 Mar 2018 05:40:13 +0000 (08:40 +0300)]
Adding FileSystem and FileSystems to Files SCL-API

refs #7841

Change-Id: I8b2a02b68c29bb5be724def3e0c2d67b2b6c51e6

6 years agoImproved usability of shared library export wizard 48/1648/1
Tuukka Lehtonen [Fri, 23 Mar 2018 14:06:36 +0000 (16:06 +0200)]
Improved usability of shared library export wizard

Now allows selection of the exported shared library from the combo box
and does not allow the user to export any model-browser-selected
resource but only shared ontologies.

refs #7130

Change-Id: I19356805e37242967cb3bec7f26bb96689248d89
(cherry picked from commit bd8834c00c213045b3967794f5841f5f33bd809c)

6 years agoShow instance for SafeDynamic 38/1638/1
Hannu Niemistö [Thu, 22 Mar 2018 19:33:17 +0000 (21:33 +0200)]
Show instance for SafeDynamic

refs #7839

Change-Id: Ib84dceb46e1d43666b8f089e75c79e52f7bc3390

6 years agoCtrl+Shift+G support for finding also expressions from properties 28/1628/2
jsimomaa [Thu, 22 Mar 2018 13:38:34 +0000 (15:38 +0200)]
Ctrl+Shift+G support for finding also expressions from properties

refs #7834

Change-Id: I24ba4188bbe3b2ba412a9e42fc762f21f76aca55

6 years agoRemove duplicate string/regex functionality from Simantics/Misc 30/1630/3
jsimomaa [Thu, 22 Mar 2018 13:44:22 +0000 (15:44 +0200)]
Remove duplicate string/regex functionality from Simantics/Misc

refs #7836

Change-Id: I485f09891cb0bd60f2e3b53209a3aaa47e5f7d24

6 years agoAllow client-logic in component type interface property name editing 32/1632/3
Tuukka Lehtonen [Thu, 22 Mar 2018 16:00:37 +0000 (18:00 +0200)]
Allow client-logic in component type interface property name editing

refs #7838

Change-Id: I17cebd2f303b2713444eeba5b4480657e3fba057

6 years agoMinor fixes for product build information querying 27/1627/2
jsimomaa [Thu, 22 Mar 2018 13:34:35 +0000 (15:34 +0200)]
Minor fixes for product build information querying

refs #7828

Change-Id: Ibddcc305bce0d4e84f3fc684c80f3f65592374b6

6 years agoIntroduce QueryIndexUtils in favor of bloated ModelingUtils 31/1631/2
jsimomaa [Thu, 22 Mar 2018 13:46:34 +0000 (15:46 +0200)]
Introduce QueryIndexUtils in favor of bloated ModelingUtils

Usage of ModelingUtils requires dependency for the whole modeling-plugin
which brings in a lot of unwanted stuff for simple query indexing

refs #7837

Change-Id: I1d2c4c7881b21904ad72c101acc12b9d61169994

6 years agoInclude Jaxen in org.simantics.scl.feature to keep JDom2 happy 17/1617/2
Tuukka Lehtonen [Wed, 21 Mar 2018 16:15:54 +0000 (18:15 +0200)]
Include Jaxen in org.simantics.scl.feature to keep JDom2 happy

refs #7833

Change-Id: Ic55cec2e2cd94d49206dc6324974bc798cf6a98b

6 years agoMerge "Included Jaxen in the platform's external-components"
Tuukka Lehtonen [Wed, 21 Mar 2018 16:09:32 +0000 (18:09 +0200)]
Merge "Included Jaxen in the platform's external-components"

6 years agoIncluded Jaxen in the platform's external-components 16/1616/1
Tuukka Lehtonen [Wed, 21 Mar 2018 16:07:51 +0000 (18:07 +0200)]
Included Jaxen in the platform's external-components

JDom2 requires Jaxen in its classpath to perform non-validating XML
parsing and it is not available at the moment in its classpath.

refs #7833

Change-Id: I961370f9c09c10dd61fe49f0147cd32716f010ef

6 years agoSCL-functionality for build information querying 09/1609/2
jsimomaa [Tue, 20 Mar 2018 20:51:42 +0000 (22:51 +0200)]
SCL-functionality for build information querying

refs #7828

Change-Id: Ic4b02ce9a205309a7f9a3fd38b0842c6b0597087

6 years agoMinor updates to Document/All.scl and Prelude.scl 07/1607/4
Miro Richard Eklund [Tue, 20 Mar 2018 14:55:48 +0000 (16:55 +0200)]
Minor updates to Document/All.scl and Prelude.scl

"show" is able to type cast a ByteArray without the additional
specification in Prelude.scl. Show is unable to be used on ByteArrays if
Prelude.scl contains an implementation for it, as "show" cannot
determine which implementation to use: the general, or the ByteArray
specific. Thus, ByteArray has been removed from Prelude.

getTuples returns a list of tuples that can be of any format: they do
not necessarily have to all be the same. As a result, [a] specification
doesn't correctly reflect the data that can be fetched with getTuples,
but [Dynamic] does.

refs #7830
refs #7831

Change-Id: Ib9912e9479838df2c8d32c621936e8fdecef2d7b

6 years agoIncluded ANT build file to generate buildinfo.properties
Tuukka Lehtonen [Tue, 20 Mar 2018 12:31:47 +0000 (14:31 +0200)]
Included ANT build file to generate buildinfo.properties

The file contains three properties:
* simantics-platform.branch
* simantics-platform.commit
* simantics-platform.build.id

refs #7828

6 years agoMerge "Added a function to read the module source text"
Hannu Niemistö [Tue, 20 Mar 2018 12:25:04 +0000 (14:25 +0200)]
Merge "Added a function to read the module source text"

6 years agoAdded a function to read the module source text 03/1603/1
Hannu Niemistö [Tue, 20 Mar 2018 12:07:13 +0000 (14:07 +0200)]
Added a function to read the module source text

refs #7811

Change-Id: I62a37e226b1f7b531d69e8446bbff805c67825ec

6 years agoRemoved apparent debugging code from org.simantics.utils.Development 02/1602/1
Tuukka Lehtonen [Tue, 20 Mar 2018 08:04:38 +0000 (10:04 +0200)]
Removed apparent debugging code from org.simantics.utils.Development

refs #7719

Change-Id: If5e3366a390f7c2cae581d7d0994f85a404a326d

6 years agoFixed index changed indicator regression caused by commit 8b8630b9 00/1600/1
Tuukka Lehtonen [Mon, 19 Mar 2018 20:50:18 +0000 (22:50 +0200)]
Fixed index changed indicator regression caused by commit 8b8630b9

refs #7785

Change-Id: I4fc56d823f825c65c9fbece81d26d30d0cb9f16d

6 years agoFixed various bugs in TG readers 93/1593/4
Antti Villberg [Fri, 16 Mar 2018 14:55:52 +0000 (16:55 +0200)]
Fixed various bugs in TG readers

Added primary install-location based relative path resolution to
database baselining logic. Secondary relative baseline resolution logic
still uses working directory.

refs #7825

Change-Id: I154528e674e6d478ea4bdb1de4d38c38d5097fdf

6 years agoFixed race condition in getValues/Relations/EntityTypes 94/1594/2
Hannu Niemistö [Sun, 18 Mar 2018 20:45:52 +0000 (22:45 +0200)]
Fixed race condition in getValues/Relations/EntityTypes

refs #7826

Change-Id: I30842b6fe067b58c6916679804f56ed20b821ada

6 years agoExport org.simantics.modeling.ui.scl package from os.modeling.ui 82/1582/1
Tuukka Lehtonen [Thu, 15 Mar 2018 15:07:04 +0000 (17:07 +0200)]
Export org.simantics.modeling.ui.scl package from os.modeling.ui

refs #7823

Change-Id: I299da65fed3a7670ead3fae1b02ea6166124100b

6 years agoDisable parallel graph.tg/header read, serializer ctor not thread-safe 81/1581/1
Tuukka Lehtonen [Thu, 15 Mar 2018 14:33:04 +0000 (16:33 +0200)]
Disable parallel graph.tg/header read, serializer ctor not thread-safe

Having parallel() here caused random platform startup problems and
doesn't account for any major speedup in normal use anyway.

refs #7806

Change-Id: I37b26a3df622d4ad3b2ad744e43e2f08cf0284ff

6 years agoAdded graph.tg hash caching to FixExportedOntology 66/1566/3
Tuukka Lehtonen [Tue, 13 Mar 2018 09:08:40 +0000 (11:08 +0200)]
Added graph.tg hash caching to FixExportedOntology

Moved generic database baselining code to DatabaseBaselines from
SimanticsPlatform and added new utility functions to DataContainers and
cleaned up existing methods therein using resource-try statements.

Also note org.simantics.graph.refactoring.TransferableGraphHasher that
can be used for adding hash values to graph.tg files.

refs #7806

Change-Id: I7f54cfb0db68a8a5602fc2a8d9651cb305a8136d

6 years agoSingleObjectWithType was broken in the previous change 69/1569/1
Marko Luukkainen [Tue, 13 Mar 2018 09:45:48 +0000 (11:45 +0200)]
SingleObjectWithType was broken in the previous change

refs #7803

Change-Id: I4ad3281195144f5f70dd0cc86e2348663d0d1c02

6 years agoAdded a handler for data format sharedLibrary:1 63/1563/1
Hannu Niemistö [Tue, 13 Mar 2018 07:33:21 +0000 (09:33 +0200)]
Added a handler for data format sharedLibrary:1

refs #7806

Change-Id: I2994b32318d665aed3f84077da8ce89286e3b3bc

6 years agoFixed platform startup ontology update hash checking to work 62/1562/2
Tuukka Lehtonen [Mon, 12 Mar 2018 20:15:14 +0000 (22:15 +0200)]
Fixed platform startup ontology update hash checking to work

There was a typo in the Extensions class constant that identified cached
hash value in the DataContainer metadata map compared to the maven graph
builder plug-in.

refs #7806

Change-Id: I21e99108adfa2b1e9307127ffd4be7127f852812

6 years agoEscape/unescape names of the externals when converting to/from URIs 58/1558/2
Jussi Koskela [Mon, 12 Mar 2018 13:25:46 +0000 (15:25 +0200)]
Escape/unescape names of the externals when converting to/from URIs

refs #7812

Change-Id: I491a0d57a076c73785e120c3632d48c6258ea1ab

6 years agoPlatform startup performance improvements 49/1549/6
Tuukka Lehtonen [Fri, 9 Mar 2018 21:41:15 +0000 (23:41 +0200)]
Platform startup performance improvements

1. DB baselining can now be enabled with ontology update checking due to
   caching of TG hash values in the DataContainer.metadata
   map field with key "cached.hashCode". This diminishes the time taken
   by ontology merge need checking to very little time compared to the
   old system where all graph.tg files were loaded completely into heap
   memory to simply check whether they need to be merged or not.

2. BaselineCreator application can be used to construct a baseline with
   a built product in any OS supported by Simantics.

To get the benefit from these changes, you'll also need to use the
version 0.0.9 of the graph-builder-maven-plugin.

refs #7806

Change-Id: I7fadaf43f3c96d3b989a73e0f1ae6e6fa83e09ce

6 years agoMerge "(refs #7811) Some new functions for SCL reflection"
Hannu Niemistö [Mon, 12 Mar 2018 10:23:43 +0000 (12:23 +0200)]
Merge "(refs #7811) Some new functions for SCL reflection"

6 years ago(refs #7811) Some new functions for SCL reflection 56/1556/1
Hannu Niemistö [Mon, 12 Mar 2018 09:08:38 +0000 (11:08 +0200)]
(refs #7811) Some new functions for SCL reflection

Change-Id: I80b7091a59b0446b1b3d066056b1473d9ec74c56

6 years agoTruncate file after writing DataContainer to it 54/1554/1
Jussi Koskela [Mon, 12 Mar 2018 07:35:47 +0000 (09:35 +0200)]
Truncate file after writing DataContainer to it

refs #7810

Change-Id: I5ab3f7b1e173b22f1183d4c1fbef1d5d260030e4

6 years ago(refs #7809) Added builtin Pure type to indicate no effects 48/1548/1
Hannu Niemistö [Fri, 9 Mar 2018 21:39:05 +0000 (23:39 +0200)]
(refs #7809) Added builtin Pure type to indicate no effects

Change-Id: I7068a4932be87afaa254cd9b1eecce712fb83d9c

6 years agoInclude cached hash code in TransferableGraph1 extensions map 43/1543/2
Tuukka Lehtonen [Fri, 9 Mar 2018 11:20:47 +0000 (13:20 +0200)]
Include cached hash code in TransferableGraph1 extensions map

The cached hashcode is calculated before inserting the cached hash value
in the TransferableGraph1.extensions TreeMap. Reading and inspection
must be done with this in mind.

This cached value is used to optimize platform startup by removing the
need to calculate the TransferableGraph1 structure hashcode at runtime
which can be quite expensive because the standard databoard Bindings are
slow compared to optimal methods. Of course an optimized binding could
be used to speed the calculation up dramatically but it still can't beat
caching the final (immutable) hashCode value.

refs #7806

Change-Id: I9d4fc6549cba567f95b19f80bd15c1ccfbbedf07

6 years ago(refs #7807) Fixed bad signature of virtualSyncWriteXXX 40/1540/2
Hannu Niemistö [Fri, 9 Mar 2018 10:05:26 +0000 (12:05 +0200)]
(refs #7807) Fixed bad signature of virtualSyncWriteXXX

Change-Id: I93ae74a99e8ee6829f077b1622d61954a78787af

6 years agoImprove startup time for fresh or rollback'd session in index writing 36/1536/3
jsimomaa [Thu, 8 Mar 2018 11:56:30 +0000 (13:56 +0200)]
Improve startup time for fresh or rollback'd session in index writing

refs #7806

Change-Id: I44ea1e0972bfd360b6af44dbbe62e934e06c59e0

6 years agoRestored old NoSingleResultException constructors without result count 38/1538/1
Tuukka Lehtonen [Thu, 8 Mar 2018 14:42:07 +0000 (16:42 +0200)]
Restored old NoSingleResultException constructors without result count

Don't break backwards compatibility.

refs #7803

Change-Id: I33a88f002bedb79202176860d65cb77bf43aab4a

6 years agoIgnore NoSingleResultException in DependenciesRelation 29/1529/8
jsimomaa [Wed, 7 Mar 2018 08:06:29 +0000 (10:06 +0200)]
Ignore NoSingleResultException in DependenciesRelation

Some fixes for NoSingleResultException usage and introducing resultCount
field for more detailed exception messages

refs #7803

Change-Id: Id633dcfee66c44556de3943c5ec4454e9473f6f3

6 years agoSCL compiler generates line numbers to bytecode 34/1534/3
Hannu Niemistö [Thu, 8 Mar 2018 06:18:56 +0000 (08:18 +0200)]
SCL compiler generates line numbers to bytecode

refs #6922

Change-Id: I2219d6dc74ae815cdea7d3f6daf3a736be5f1781

6 years agoIndexedRelationsSearcherBase possible deadlock with semaphore 35/1535/2
jsimomaa [Thu, 8 Mar 2018 07:56:08 +0000 (09:56 +0200)]
IndexedRelationsSearcherBase possible deadlock with semaphore

refs #7805

Change-Id: I0a3e7d03b648d2b03b187baf171c0c95b4b7abb9

6 years agoAdded LoggingUtils/archiveLogs SCL function. 33/1533/1
Tuukka Lehtonen [Wed, 7 Mar 2018 12:59:39 +0000 (14:59 +0200)]
Added LoggingUtils/archiveLogs SCL function.

Also moved all archival related headless code to org.simantics.logging
from org.simantics.logging.ui to keep both UI & headless codebases
cleaner.

DBAndMetadataLogProvider was fixed to support workspace paths with
whitespace in their name.

LogCollector.archiveLogs now also removes the temporary directory
structure it creates for collecting and archiving the log files.

refs #7795

Change-Id: Icbffa7ffc5d6a5f2b859b0220fbebcf59b5ac590

6 years agoAlways discard database undo history after each platform startup. 32/1532/2
Tuukka Lehtonen [Wed, 7 Mar 2018 11:44:25 +0000 (13:44 +0200)]
Always discard database undo history after each platform startup.

refs #7792

Change-Id: I587d095dbb65e458ff70a4cdf14001f6bee13461

6 years agoImproved exceptions & logging & debugging of GraphModuleSourceRepository 30/1530/3
jsimomaa [Wed, 7 Mar 2018 10:34:42 +0000 (12:34 +0200)]
Improved exceptions & logging & debugging of GraphModuleSourceRepository

refs #7804

Change-Id: Ia3fcd7f9e42e704d544382cd8257b035526addb6

6 years agoFixed yet another potential NPE. 31/1531/1
Tuukka Lehtonen [Wed, 7 Mar 2018 10:50:28 +0000 (12:50 +0200)]
Fixed yet another potential NPE.

refs #7800

Change-Id: Ia6f45c5f3b5c32845bb486062fe46e10fe8cffe2

6 years agoAdded missing Proc effect to importSharedOntology SCL function 26/1526/1
Jussi Koskela [Tue, 6 Mar 2018 08:40:46 +0000 (10:40 +0200)]
Added missing Proc effect to importSharedOntology SCL function

refs #7794

Change-Id: I2879e0d21194e50aba1bdfbc33146587284b647a

6 years agoMerge "Tried to improve the implementation of getPossibleDomainProperty"
Hannu Niemistö [Tue, 6 Mar 2018 07:15:30 +0000 (09:15 +0200)]
Merge "Tried to improve the implementation of getPossibleDomainProperty"

6 years agoTried to improve the implementation of getPossibleDomainProperty 24/1524/1
Hannu Niemistö [Mon, 5 Mar 2018 14:46:30 +0000 (16:46 +0200)]
Tried to improve the implementation of getPossibleDomainProperty

refs #7800

Change-Id: Ife7ed9a2c7ec556194987b34c3301e6ea8e0e7bc

6 years agoAdded HDF5 license to Simantics license texts 23/1523/2
Tuukka Lehtonen [Sat, 3 Mar 2018 23:07:28 +0000 (01:07 +0200)]
Added HDF5 license to Simantics license texts

refs #7793

Change-Id: I183c4d01d5e3c106d0369e4d9a42f4d084926ff3

6 years agoLogging configuration via SCL and UI & saving to ZIP-archive 19/1519/1
jsimomaa [Fri, 2 Mar 2018 10:28:34 +0000 (12:28 +0200)]
Logging configuration via SCL and UI & saving to ZIP-archive

refs #7795

Change-Id: Ib8867aff85634d6a1ed6d2fe65da4e43818b83fc

6 years agoNPE fix for Acorn cluster stream undo handling 17/1517/2
Tuukka Lehtonen [Thu, 1 Mar 2018 22:35:49 +0000 (00:35 +0200)]
NPE fix for Acorn cluster stream undo handling

refs #7792

Change-Id: If6e7e3d89db26bb7c4aeed06507b02ae34554d00

6 years agoAdded HDF5 Java interface library version 1.10.0-patch1 to the platform 18/1518/3
Tuukka Lehtonen [Thu, 1 Mar 2018 23:08:48 +0000 (01:08 +0200)]
Added HDF5 Java interface library version 1.10.0-patch1 to the platform

If you need the library in your product, include the hdf.hdf5 feature to
include the hdf.hdf5lib plug-in.

For now only the win32.x86_64 build of the interface library is included
in the plug-in but also linux and mac compilations of the DLL should be
included in the future.

refs #7793

Change-Id: I274a1ccf6e00b106c06d74767dd78c36e4073dad

6 years agoSimulator toolkit enhancements 98/1498/8
Antti Villberg [Tue, 27 Feb 2018 09:00:13 +0000 (11:00 +0200)]
Simulator toolkit enhancements

The basic simulator node manager and its supporting structures have been
moved to org.simantics.simulator[.toolkit] and stripped of any
dependency the Simantics database interfaces.

org.simantics.simulator.toolkit.db now contains the parts that bind the
simulator toolkit interfaces to the Simantics DB.

refs #7782

Change-Id: I266faaec323c772767d7a32331ed27e9f893f473

6 years agoFixed Acorn deadlock during snapshotting 11/1511/9
Antti Villberg [Wed, 28 Feb 2018 07:56:08 +0000 (09:56 +0200)]
Fixed Acorn deadlock during snapshotting

refs #7713

Change-Id: Ibb3e87bb6ab4d13bfb6445bf55e16ca8555bee29

6 years agoUse Logger in Debug.scl timing-functions 16/1516/2
jsimomaa [Wed, 28 Feb 2018 12:11:05 +0000 (14:11 +0200)]
Use Logger in Debug.scl timing-functions

refs #7791

Change-Id: Ib2b27db232cf91052b1880d41f4e3f6ed9897f77

6 years agoRemove debug printing from indexing & change debugging level to INFO 15/1515/2
jsimomaa [Wed, 28 Feb 2018 11:56:15 +0000 (13:56 +0200)]
Remove debug printing from indexing & change debugging level to INFO

refs #7785

Change-Id: Idc1bb5aba5dfa217449e2c587e03d67016b8d8b1

6 years agoAdded more createRun utility functions to ExperimentRuns 12/1512/1
Tuukka Lehtonen [Wed, 28 Feb 2018 11:08:16 +0000 (13:08 +0200)]
Added more createRun utility functions to ExperimentRuns

The new functions directly take WriteGraph as input to allow clients to
create an experiment run within one write transaction and still work on
it afterwards.

refs #7790

Change-Id: I49c86df960ec9a42d7dfa3fdba95315398ec6f65

6 years agoAdd logging to indexing & replace File-API with NIO Path-API 00/1500/4
jsimomaa [Tue, 27 Feb 2018 10:00:15 +0000 (12:00 +0200)]
Add logging to indexing & replace File-API with NIO Path-API

refs #7785

Change-Id: I38a1d2fe7425bf06c97e1178c7b26b3566f1126b

6 years agoBumped master target, org.simantics.sdk and desktop versions to 1.34.0 10/1510/3
Tuukka Lehtonen [Tue, 27 Feb 2018 20:58:11 +0000 (22:58 +0200)]
Bumped master target, org.simantics.sdk and desktop versions to 1.34.0

refs #7788

Change-Id: I979284151c186c678d4219a3a810a23727caacfb

6 years agoInclude simantics/3d and gold-members/proteus in release train
Tuukka Lehtonen [Tue, 27 Feb 2018 21:05:59 +0000 (23:05 +0200)]
Include simantics/3d and gold-members/proteus in release train

refs #7712
refs #7788

6 years agoInclude gold-members/proteus in release train.
Tuukka Lehtonen [Tue, 27 Feb 2018 20:23:42 +0000 (22:23 +0200)]
Include gold-members/proteus in release train.

refs #7712

6 years agoInclude simantics/3d repository in release train.
Tuukka Lehtonen [Tue, 27 Feb 2018 15:44:42 +0000 (17:44 +0200)]
Include simantics/3d repository in release train.

refs #7712

6 years agoFix to a NatTable-based graph explorer issue (fixes #7787) 07/1507/1
Reino Ruusu [Tue, 27 Feb 2018 14:38:52 +0000 (16:38 +0200)]
Fix to a NatTable-based graph explorer issue (fixes #7787)

Change-Id: I53e073f06fe4f487e2145879d8c545292a5de08d

6 years agoFix to NatTable graph explorer issue. (fixes #7786) 06/1506/1
Reino Ruusu [Tue, 27 Feb 2018 14:35:06 +0000 (16:35 +0200)]
Fix to NatTable graph explorer issue. (fixes #7786)

Change-Id: I4de3502e86eebc5de915ca91311a4026edac3f5a

6 years agoSimanticsPlatform.startUp ensures updateness of installed feature groups 90/1490/1
Tuukka Lehtonen [Wed, 21 Feb 2018 10:58:32 +0000 (12:58 +0200)]
SimanticsPlatform.startUp ensures updateness of installed feature groups

Previously the installed feature group update code was only executed
when the workspace was first initialized. This does work when new
features are installed into Simantics programs running on existing
workspaces.

refs #7005

Change-Id: I5879c398c966dc5d0e15344569b37610703d5e51

6 years agoDefer change set disposal in State.commitWriteTransaction 88/1488/1
Tuukka Lehtonen [Wed, 21 Feb 2018 10:21:35 +0000 (12:21 +0200)]
Defer change set disposal in State.commitWriteTransaction

The change set was still used after disposal in notifying db change
listeners.

refs #6233

Change-Id: I3e9f49ea084703afdc2129162402ab592f2f3f72

6 years agoFixed InvertBasicExpressionVisitor.invert to keep inverted value type 86/1486/1
Tuukka Lehtonen [Tue, 20 Feb 2018 22:26:16 +0000 (00:26 +0200)]
Fixed InvertBasicExpressionVisitor.invert to keep inverted value type

Previously the code would convert all Number-values to Double instead of
passing the inverted value to Variable.setValue in the same type the
original non-inverted value was in.

refs #7777

Change-Id: I78771698d3e2222ede47969e3cceea2166c23a75

6 years agoDon't report ResourceNotFoundExceptions when looking for browse context 85/1485/2
Tuukka Lehtonen [Tue, 20 Feb 2018 15:02:09 +0000 (17:02 +0200)]
Don't report ResourceNotFoundExceptions when looking for browse context

This changes the code to behave like it did before commit 1dfeb7d5 as
intended.

refs #7719

Change-Id: I4fa9ae5114713d4e61acd1363a5369d16e1a5043

6 years agoDispose ClientChangesImpl ChangeSets to minimize memory footprint 74/1474/7
Tuukka Lehtonen [Fri, 16 Feb 2018 13:09:29 +0000 (15:09 +0200)]
Dispose ClientChangesImpl ChangeSets to minimize memory footprint

This change stems from the fact that
org.simantics.db.common.changeset.GenericChangeListener gives ChangeSets
as an argument to DB requests which can leave strong references to the
ChangeSet instances in the DB QueryProcessor until the DB client
garbage collects these requests. Usually DB client request parameters
should be immutable, but in this case the request is never listened to
for changes so it is OK dispose of the ChangeSet parameter after all
DB ChangeListeners are notified.

This change adds a Disposable implementation to ClientChangesImpl which
minimizes the memory footprint of the class down to 192 bytes compared
to ~2^17 bytes. The instances can take up a very considerable amount of
memory if not disposed. It has not been uncommon to see multiple
gigabytes of memory being spent by these byte[] buffers that are not
really used anymore but still referenced.

Once more note that this is not a case of memory leakage but simply bad
use of memory through over-sized buffers that were GC'ed eventually.

refs #6233

Change-Id: I2e96754f106602a4986c37187a9af3bbd64356dc

6 years ago(refs #7776) Fixed module export for javaImports 82/1482/2
Hannu Niemistö [Tue, 20 Feb 2018 08:53:57 +0000 (10:53 +0200)]
(refs #7776) Fixed module export for javaImports

Change-Id: I50a5f635445d1b1d1df9dfc3ea0195f0859f86c0

6 years agoRemoved unused but similarly buggy code to fb2f890c from WriteBindings 75/1475/2
Tuukka Lehtonen [Fri, 16 Feb 2018 13:27:23 +0000 (15:27 +0200)]
Removed unused but similarly buggy code to fb2f890c from WriteBindings

refs #7770

Change-Id: I3750d0272c3fd4a228fe2c943dcf331955cbcee5