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.
Jussi Koskela [Wed, 22 Nov 2017 10:56:27 +0000 (12:56 +0200)]
Let the request processor handle the exceptions
Prior to this failed write transactions were not cancelled. For
consistency the read transactions are now handled the same way.
Also deprecated legacy implementations.
* Added new functions create{SCLModule,SCLScript,PGraph}R that return
the created resource instead of returning ().
* Added new functions createSCL{Module,Script}WithDefinition for
directly creating modules/scripts with a specific definition
* Added new functions set{SCLModule,SCLScript,PGraph}Definition for
setting the definition specific to each entity.
* Added preliminary documentation for the module
* Deprecated create{SCLModule,SCLScript,PGraph} functions in favor of
create...R
Tuukka Lehtonen [Mon, 6 Nov 2017 10:53:36 +0000 (12:53 +0200)]
Fixed migrating import temporary folder creation to prevent name overlap
Previously model imports could fail if they were small and contained one
or more shared libraries imported at the same time because the imports
could be done within the same second which triggered the folder name
overlap.
Tuukka Lehtonen [Sun, 5 Nov 2017 11:52:32 +0000 (13:52 +0200)]
Some fixes/cleanup for cluster table size caching logic.
The previous code was not keeping the cached size properly up-to-date
which resulted in the DB client thinking that the consumer cluster
memory size is larger than it actually is and eventually winding up in a
state where the LRU importanceMap is constantly almost empty and the
code keeps throwing away clusters whenever the next cluster is loaded
due the misconception of used cluster memory.
The code is still not perfect/totally functional - I was still able to
get the thrashing situation to reproduce with A6 model imports, but not
as heavily as originally. I was able to import models with much more
initial conditions stored than previously without these changes.
Tuukka Lehtonen [Fri, 3 Nov 2017 06:50:24 +0000 (08:50 +0200)]
DefaultMouseListener was added twice in GraphExplorerComposite
Changed ExpandNodeHandler double click action to perform its search for
editor adapters based on the input object provided in the double click
event instead of the NodeContext potentially contained by the input
object. This makes it use the same logic as OpenDefaultEditor adapter.
Tuukka Lehtonen [Thu, 2 Nov 2017 14:52:34 +0000 (16:52 +0200)]
Allow overriding issue hidden-ness/hiding logic in inheriting ontologies
Changed the way issues are modelled by adding two new
function-properties: hider & hidden. hider is used to change the
hidden-state of issues and hidden is used to query the state. This
allows e.g. fully variable-based dynamic issue hierarchies to support
hiding as well.