Previous too-optimized implementation had multiple flaws:
* Index calculation did not have enough parenthesis in it which meant
that the value table index was sometimes calculated incorrectly.
This lead to string literal values being read incorrectly.
* Did not take into account string literals longer than 127 characters
* Did not take into account that string literals are modified-utf-8
encoded and simply decoded them as US-ASCII bytes. Essentially all
resources with name containing special characters were indexed
incorrectly up until now.
All of these flaws have been in the code for ages.
Tuukka Lehtonen [Tue, 21 Aug 2018 15:54:52 +0000 (18:54 +0300)]
Render last known value in time series chart hairline value tip
Previously if a history item's data stream did not (yet) contain a value
with a timestamp >= than the chart hairline time, the value time on top
of the chart would not paint any value at all for that item. The best
thing the chart can do in such circumstances to prevent unwanted visual
skipping in the UI is to paint the last known sample's value regardless
of its endTime value.
Tuukka Lehtonen [Mon, 18 Jun 2018 10:58:54 +0000 (13:58 +0300)]
HistorySampler.sample(HistorySamplerItem2, ...) now uses mipmapped data
Implemented selection of sampled history data source based on the
seconds/pixel (= timeWindow / maxSamples) ratio provided to the sampler.
This is one way to attempt not sampling too much data for trend views
that cannot inherently handle large amounts of data.
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.
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.