Tuukka Lehtonen [Mon, 29 May 2017 09:58:32 +0000 (12:58 +0300)]
Added Simantics/Diagram function positionToVector.
This function complements the existing positionToDoubleArray and is
required to support for instance diagram template scenegraph node
transform property definition with SCL formulas.
Also fixes:
* Potential NPE in ExperimentUtil.scheduleShutdownActiveExperiment
* MANIFEST.MF warnings from org.simantics.document.server
Hannu Niemistö [Mon, 29 May 2017 09:23:24 +0000 (12:23 +0300)]
(refs #7245) The first version of decompiler for SCL compilations
It is intentional that the new fragment
org.simantics.scl.compiler.decompiler is not added to the module
listings in bundles/pom.xml, because currently this feature is intended
only for development purposes.
Hannu Niemistö [Fri, 12 May 2017 10:58:22 +0000 (13:58 +0300)]
(refs #6878) validateOnly flag to ExpressionEvaluator and CommandSession
Added a new flag validateOnly to ExpressionEvaluator and CommandSession.
This prevents the execution of the expression. In command session,
variable types are however updated, so it is possible to run longer
command sequences and check their types. To use the flag, run the script
in CommandSession with static method validate.
jsimomaa [Fri, 12 May 2017 07:25:50 +0000 (10:25 +0300)]
Enhancements to modelled STS-tests
Some refactoring and streamlining for the modelled STS-tests:
* Possibility to ignore certain tests
* Streamlined JUnit execution of modelled tests
* Removed duplicate code related to modelled STS test searching
* Introduced Junit/Assert SCL-module for assertions in SCL tests
* Changed STSTestEditor to extend SCLModuleEditor2
Hannu Niemistö [Thu, 11 May 2017 19:54:24 +0000 (22:54 +0300)]
(refs #7214) Treat $ exactly like function application
Converts (f $ p) before type checking to (f p). This slightly changes
the semantics of the language for it is now possible to use $ with
functions like runProc, syncRead etc.
Tuukka Lehtonen [Thu, 11 May 2017 11:19:32 +0000 (14:19 +0300)]
Added mechanism to diagram IFlagType to prevent graph modifications
When diagram flags are loaded, some implementations trigger graph
modifications because the flag type may know the flag to have wrong
direction information based on analysis of the model. Printing diagrams
to PDF or SVG should not modify the database in any way, just trust what
is in there.
Jussi Koskela [Tue, 9 May 2017 13:12:17 +0000 (16:12 +0300)]
Improved logic in new head state creation.
Earlier any IOException during the reading of head state was interpreted
as empty DB. This might cause unwanted DB reset. It's better to identify
need for empty head state based on main state head directory.
Switched AcornDatabase.start logic back to using RandomAccessFile for
touching the db/lock file. Using RandomAccessFile instead of
FileSystemProvider.newFileChannel in Windows better prevents any other
process from removing the lock file. The newFileChannel version did not
prevent the user from initially running 'del lock' to remove the file -
although the file will be recreated quickly by the system.
Also AcornDatabase.start now re-throws ProCoreException if
opening/locking the lock-file fails with IOException to prevent the
system from attempting to start up without a proper database to work
with. Previously the system just logged the start-up problem and
continued.
* changes:
Use ListIndexRoots in migration
ListIndexRoots request
SingletonRead base class
GenericReadBase2 without the unused template parameter
Initial selection for diagram viewer should be the diagram itself
Support VP.Test in action browse context contribution
InstanceOf tester (VP.Test)
Tuukka Lehtonen [Fri, 5 May 2017 13:59:12 +0000 (16:59 +0300)]
Fixed bad bug related to AcornBackupProvider
AcornBackupProvider was invoking GraphClientImpl2.makeSnapshot with true
parameter which caused the invocation to write the main.state file when
backups were made which was totally unintentional. The main.state file
is now only written only when the database session is shut down, i.e.
not at all in ClusterManager.makeSnapshot.
Also includes robustness fixes for Acorn database directory locking by
using the Java NIO API for atomic existence testing and creation of the
lock file.
Tuukka Lehtonen [Fri, 5 May 2017 14:25:08 +0000 (17:25 +0300)]
Changed external reference flag texts to obey current name/label mode
Text shown in external reference type diagram flags now obeys the
currently selected Name/Label model that can be controlled using code in
class org.simantics.NameLabelUtil.
Previously the text shown in normal diagram external reference flags was
always preferring to show the Label property of diagrams and related
modules and if labels were not defined, the Name property would be used
instead.
Tuukka Lehtonen [Fri, 5 May 2017 10:41:01 +0000 (13:41 +0300)]
Fixed BrowseContext test code to work headlessly
Previous code invoked JFaceResources.getDefaultFontDescriptor which
eventually invoked Display.getCurrent which would assert out in a
headless test environment.
Tuukka Lehtonen [Thu, 4 May 2017 21:52:29 +0000 (00:52 +0300)]
Fixed bad logical bug from Acorn's MainState.load rollback
The major bug was the logical not in MainState.load rollback which
caused the database revisioning to be started from 0 when the database
was *not* empty. It should have been the other way around.
Also cleaned up the database head.state validation code by not using
exceptions for flow control in validating head.state files.
Fixed URI problems related to EnternalEntities during import
Introduced a new function, getTrueUri, that gives the escaped URI.
Used when finding external entities.
Previously, getUri was used, which made finding external entities
impossible, for all User Component's with a space in their name.