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.
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.
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.
Tuukka Lehtonen [Mon, 26 Mar 2018 11:52:39 +0000 (14:52 +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.
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.
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.
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.
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.
Tuukka Lehtonen [Mon, 29 Jan 2018 13:54:46 +0000 (15:54 +0200)]
Added syncActivateModel function for deterministic SCL script execution
syncActivateModel works directly by invoking the old activeModel
function and then waiting until all related activities are finished by
using the old trusty Simantics/Misc/syncGraph function.
Tuukka Lehtonen [Fri, 19 Jan 2018 13:50:54 +0000 (15:50 +0200)]
Moved org.simantics.issues.ui.ontology to org.simantics.issues.feature
org.simantics.issues.common depends on org.simantics.issues.ui.ontology
now anyway, and the ontology plug-in, albeit is UI related, does not
have any direct dependency to any UI code anyway.
Jussi Koskela [Wed, 20 Dec 2017 06:52:49 +0000 (08:52 +0200)]
Read previous BTree modification count from the graph
Modification count is used when generating unique names for the
resources. We should continue from the previous modification count
whenever creating new BTree object to work on.
jsimomaa [Thu, 14 Dec 2017 06:16:51 +0000 (08:16 +0200)]
Replace OrientationRestorer TimerTask usage with ScheduledExecutor
Timer can exhaust the system with TimerTask-runnables that are queued up
e.g. during computer hibernate and sleep. According to documentation:
If an execution is delayed for any reason (such as garbage collection or
other background activity), two or more executions will occur in rapid
succession to "catch up." In the long run, the frequency of execution
will be exactly the reciprocal of the specified period
Fixed CompilePGraphsAction that gave a NullPointerException
A worker thread with a null displayed tried to compile the pgraph for
ontology definition files. Ensuring that a default display is used in
such cases fixed the issues.
An error message mentioned missing dependencies if the ontology file
containers syntax errors. Thie message now mentioned problems in the
ontology file instead.
Tuukka Lehtonen [Thu, 7 Dec 2017 08:59:34 +0000 (10:59 +0200)]
Fixed regression in IndexedRelationsImpl.replace return value.
The return value was always false which caused index query listeners to
never be fired upon index replace operations. This in turn caused
potentially invalidated query results to be returne for database
clients.
The regression was introduced in commit 702195f3 for release/1.28.0.
Tuukka Lehtonen [Sun, 3 Dec 2017 20:07:15 +0000 (22:07 +0200)]
Tested and fixed utility for truncating history data.
HistoryUtil.truncateHistory now actually works as intended. Care must be
taken not to interfere with the history data while it is being
truncated. This must be ensured externally.
A reference counter (AtomicInteger) was also added to ChartData to be
able to see how many users the ChartData has and to wait until it no
longer has any users. This is required to wait until all chart editors
have detached themselves from the history data.
Tuukka Lehtonen [Thu, 30 Nov 2017 17:26:55 +0000 (19:26 +0200)]
Simplified diagram connection creation
With these changes diagram connections can be created with a single drag
operation when suitable by holding the first (left) mouse button down
until releasing it on top of the end terminal of the connection.
The same sequence also work for branching to/from an existing
connection.
Tuukka Lehtonen [Wed, 29 Nov 2017 11:07:05 +0000 (13:07 +0200)]
More robust Simantics platform shutdown logic.
Added a JVM runtime shutdown hook to ensure that unless the JVM process
is killed forcibly, the JVM should attempt properly shutting down the
Simantics platform, even if the client code that started the platform
fails to do so for any reason.
Also marked both SimanticsPlatform.{startUp,shutdown} synchronized to
prevent concurrent access to either the start-up or shutdown logic.