Tuukka Lehtonen [Wed, 10 Jun 2020 18:43:29 +0000 (21:43 +0300)]
Fixed bug in cluster collection logic that caused it to not operate
In case the first encountered resident cluster happened to be large
enough to cover the requested cluster collection size, the code would
collect no clusters at all.
Also contains improvements to dynamic cluster collection.
Tuukka Lehtonen [Thu, 4 Jun 2020 22:33:16 +0000 (01:33 +0300)]
Avoid useless reallocation of empty TreeMaps and map iterators
The problem was that when the database is doing work, MainProgram.run
runs in pretty much busy loop mode and previously it was always
allocating a new TreeMap on each round and also calling Map.entrySet()
to get construct iterators for empty TreeMaps which eventually
accumulates up to somewhat signinificant amount of memory allocated.
Possibly an even more efficient way would be to have the Map be a closed
hashing hashmap instead and then sorting the data for iteration
separately.
Tuukka Lehtonen [Wed, 3 Jun 2020 09:40:35 +0000 (12:40 +0300)]
Changed SCLTypeUtils to not log warnings for non-property relations
For example procedural UCs and their substructure requests would report
tons of these all the time, which is worthless.
Also added an SCL type for MOD.ChangeInformation to avoid having to see
warnings about the SCL type of MOD.ChangeInformation not being
available:
```
WARN [...] org.simantics.modeling.SCLTypeUtils: SCLTypeUtils.getType
cannot transform data type '{
createdBy : String,
createdAt : Long,
modifiedBy : String,
modifiedAt : Long
}' to type. Returns a as default.
```
Tuukka Lehtonen [Mon, 1 Jun 2020 05:47:33 +0000 (08:47 +0300)]
Added identity-providing constructor for IconButtonStyleBase
This is needed to support proper implementation of styles inheriting
IconButtonStyleBase. Otherwise query identities of the mentioned class
fall back to getClass which does not work in general.
Tuukka Lehtonen [Thu, 28 May 2020 19:15:22 +0000 (22:15 +0300)]
Added system property for controlling writing of MOD.changed tags
You can set -Dorg.simantics.modeling.writeChangedTags=false to disable
writing of MOD.changed tags. The property can be set dynamically at
runtime also.
Tuukka Lehtonen [Thu, 7 May 2020 20:29:12 +0000 (23:29 +0300)]
Replace scheduleAtFixedRate with scheduleWithFixedDelay
ScheduledExecutorService.scheduleAtFixedRate tends to run enormous
amounts of runnables that would have been scheduled during a machine is
in sleep, after the machines wakes up from sleep, retroactively.
This is not good and can be avoided by using scheduleWithFixedDelay
which is usually good enough regarding the delay between executions.
Fixed CSVFormatter mind floating point inaccuracy when resampling
These changes prevent the resampling export mode from dropping samples
that have timestamps closer than 1e-13 sec to the last exported sample
time stamp.
Fixed subscription item data file searching to use groupItemId as well
This fixes problems where subscription item data CSV export used the
wrong data files to read the data related to the subscription item
because it wasn't matching the data file based on both groupItemId
(subscription item GUID name) and variable ID, which can be overlapping
if a new subscription item is created for a variable that has had a
previous subscription.
This allows e.g. procedural user component substructure expressions to
use SCL functionality included by the user component's local SCL modules
instead of only having to rely on functionality included by the SCLMain
at the containing index root.
* Several javax-prefixed packages are being removed from JDK (such as
javax.xml.bind) and one has to provide javax.packages via new
jakarta-bundles. See: http://openjdk.java.net/jeps/320#Java-EE-modules
Java 11 is LTS and we don't want to require anything beyond that at this
point. Next LTS will be 17 which will be the next target.
Tuukka Lehtonen [Mon, 30 Mar 2020 22:13:59 +0000 (01:13 +0300)]
Fixed InvertBasicExpressionVisitor bugs with subtractions and divisions
Minus expressions and divisions were both computed the wrong way around,
i.e. a-b as b-a and a/b as b/a.
Consolidated duplicate InvertBasicExpressionVisitor code into single
base class.
Also noticed that the basicexpression parser doesn't parse e.g. `a*5/4`
but parses `a*5 / 4` just fine. Didn't dive into these parser problems
for now. Hopefully we can retire this code entirely at some point in
favor of SCL expressions.
Tuukka Lehtonen [Thu, 19 Mar 2020 23:45:59 +0000 (01:45 +0200)]
Improved Copy Visible Data usability in time series chart editor
The action now first opens a preference dialog with only the CSV export
preferences shown which allows the user to know what settings are being
used to copy the data before actually copying, and also cancel the copy.
The preference page also shows which options are not used if resampling
is not enabled.
Tuukka Lehtonen [Tue, 17 Mar 2020 15:04:43 +0000 (17:04 +0200)]
Added more literal type resolution logic to claimLiteral
If the Class of the value doesn't tell which layer0-builtin type
resource to use, try to use the Datatype provided by the binding to
resolve the builtin type resource. If that fails also, resort to the the
old fallback behavior.
Tuukka Lehtonen [Wed, 4 Mar 2020 21:43:40 +0000 (23:43 +0200)]
Fixed platform ontology sync startup failure problems after installs
Installing a new plug-in that contains multiple ontologies that depend
transitively on each other caused startup failure due to database
requests not finding the newly installed ontology that the second
installed ontology depends on.
The solution is strategic query cache flushes before and after the
installation into immutable contexts.
Tuukka Lehtonen [Sat, 29 Feb 2020 07:53:06 +0000 (09:53 +0200)]
New version of hdf.hdf5 feature required due to upgraded slf4j dep
Maven has cached hdf.hdf5 feature build in many places with version
1.10.2 which has a strict dependency on org.slf4j.api 1.7.25. SLF4j was
just upgraded to 1.7.30 meaning this feature no longer resolves properly
because Maven will use the old cached artifact. We need to bump the
feature version with a qualifier suffix `.b0001` to get maven to get the
fetch the new version.
Tuukka Lehtonen [Thu, 27 Feb 2020 11:59:15 +0000 (13:59 +0200)]
Tons of dependency fixes and updates
* Removed unused JARs from org.simantics.scenegraph and re-exported
org.apache.batik from there instead of including three old batik JARs
internally to export the batik parser.
* Replaced all dependencies on org.apache.commons.collections with
org.apache.commons.collections4
* Removed version specifiers from all org.slf4j.api and
org.eclipse.collections.eclipse-collections* dependencies
to avoid the need to modify them down the road with new major releases
* Explicitly specified all Jetty dependencies to be on version 9.4.24
in an attempt to avoid OSGi (Felix) bundle wiring performance problems
experienced by Marko in recent developments.