MainState will no longer destroy the entire database if the user removes
directories but forgets to remove the main.state file. The information
stored in main.state is now regarded as cached information only and if
it seems invalid or cannot be read, the same normal rollback logic will
be performed every time.
Another enhancement is that rollback will now automatically store the
revisions deleted by the rollback procedure in timestamped
<workspace>/db/recovery/yyyy-M-d_HH-mm-ss/ folders for later inspection
and debugging. Previously the code just deleted all the extra revisions.
Manually removing the recovery-folder is always a safe operation to
perform.
Also fixed a bug in databoard Files class readFile methods that take
a File as argument. Previously all the functions constructed a
BinaryFile using the default mode which is "rw". This unintentionally
made the readFile methods create an empty file if the file did not
exist. All such methods have been changed to use mode "r".
Hannu Niemistö [Mon, 24 Apr 2017 15:24:17 +0000 (18:24 +0300)]
(refs #6924) Support for record field access syntax.
Because the record field access syntax is harder to implement when the
old Variable access syntax is also supported, this feature is only
enabled (and Variable disabled), when the following module header is
used:
module {
fields
}
This change contains also refactoring and cleaning up of code
related to variable resolving and field handling.
Rudimentary Linux and MacOSX support for org.simantics.nativemem
Linux now supports current and peak RSS and OSX only supports peak RSS
information.
Moved org.simantics.nativemem + JNA into a separate feature
org.simantics.nativemem.feature from org.simantics.utils.feature to not
force the dependency onto all products.
Less memory use for TG import when NamespaceMigrationStep is involved
MigrationStateImpl.getProperty for root resource(s) keys now first
exports CURRENT_TG back to disk if the TG has already been loaded and
then imports it back using StreamingTransferableGraphImportProcess. This
avoids the need to keep the whole TransferableGraph1 in memory while
doing the import and also allows for the use of the leaner Streaming
import process.
Added alternatives taking RequestProcessor to WorkbenchSelectionUtils.
Fixed several places which were found to use a method from
WorkbenchSelectionUtils that could potentially try to initiate a new
read transaction through org.simantics.db.Session to pass the current
ReadGraph over to WorkbenchSelectionUtils instead. This fixes the very
same problem from OpenWithMenuContribution that was introduced in 6d3ad788 change I45cfa3940df8e1f4abe016b215843dc083227b2b.
Also, ComponentTypeViewerData.editValue now prevents committing new
entered value if the value does not pass input validation.
Tuukka Lehtonen [Fri, 31 Mar 2017 13:14:02 +0000 (16:14 +0300)]
Replaced use of deprecated BinaryFunction et al with BiFunction et al
Also added missing logic to GraphExplorerComposite.SelectionElement to
discover Resource from Variable when WorkbenchSelectionElement is asked
for AnyResource. This is part of the fix for #7116.
Fixed breakage from ContextualHelp F1 keystroke handler which was
introduced in the original SVN commit r32734 (#6446).
Tuukka Lehtonen [Fri, 31 Mar 2017 09:05:47 +0000 (12:05 +0300)]
Reversioned org.jdom2 from 2.0.6 to 2.0.6.b0001
This ensures that people loading the target platform will
receive the correct version of the plug-in. Currently developers
still have old cached versions of the old bundle with version
2.0.6 that the system unwantedly keeps loading while P2 should
be loading the correct file on the web. The only way to prevent
this is to bump the version qualifier stamp to force downloads.
Antti Villberg [Wed, 8 Mar 2017 14:50:59 +0000 (16:50 +0200)]
Import/export changes. A load.
May cause some problems. Exports create Internals instead of blanks if
possible. FixExportedOntology treatment now produces tgs that are
compatible with Graph Compiler. Import creates L0.ExternalEntity
instances for unresolved external references (thus making it fail safe).
Note that addBuiltin("http://Projects") was removed from class
CoreInitialization because its existence resulted in a non-functioning
URI space because:
* http://Projects was added as a "built-in resource" when the database
is first initialized which means that
ReadGraph.getResource("http://Projects") would succeed even when the
resource was not yet properly imported from the project ontology
* When the project ontology is imported, a new resource is created to
represent http://Projects instead of using the existing uninitialized
"built-in resource". The L0.ExternalEntity changes made to the standard
transferable graph import in this patch caused the code to find the
built-in resource for "http://Projects" and think that it has to be a
resource that's already properly initialized. This led to the TG import
not initializing the resource at all. Previously there was a bug here as
well but it was hidden by the fact that the system would import the
actual/new "http://Projects" resource from the ontology anyway. This
effectively left the uninitialized built-in resource just hanging in the
database as trash.
Tuukka Lehtonen [Tue, 28 Mar 2017 15:02:18 +0000 (18:02 +0300)]
Added base diagram profile style for showing terminal names on diagrams
Previously there has been an implementation for showing terminal names
in the symbol editor (SymbolTerminalNameStyle). This implementation is
for showing symbol instance terminal names on modelling diagrams
containing symbol instances. The names are positioned outside the
current symbol's bounding box.
ConnectionPointNameStyle also employs the new TextNode automatic text
flipping feature added in #7112.
Jussi Koskela [Mon, 20 Mar 2017 13:04:31 +0000 (15:04 +0200)]
Not possible to open declaration of SCL module from relative path (F3)
Resolve absolute path of SCL module when user presses F3 on
import/include that uses relative path. Refactored absolute path
resolving to static utility function.
Jussi Koskela [Fri, 10 Mar 2017 07:38:28 +0000 (09:38 +0200)]
Hardening of DB index integrity
Mark index dirty as early as possible on write operations (and sync to
disk). Clean index dirtiness indicator as last step when deleting the
index. Cache dirty statuses to write dirty files only once.
Tuukka Lehtonen [Mon, 20 Mar 2017 06:56:08 +0000 (08:56 +0200)]
Removed useless class org.simantics.utils.thread.Executors2.
Also removed the optional org.eclipse.swt dependency introduced to
org.simantics.utils.thread by Executors2. org.simantics.utils.thread.swt
already contains SWTThread which is where this dependency should be
kept.
Tuukka Lehtonen [Fri, 10 Mar 2017 16:27:03 +0000 (18:27 +0200)]
Fonts are now embedded in diagram, wiki, etc PDF exports.
A lot of general cleanup/refactoring for the old "Diagrams to PDF"
export wizard backend implementation. Consolidated some page numbering
code into org.simantics.export.core.pdf.PageNumbering.
Also consolidated iText FontMapper initialization into
org.simantics.export.core.pdf.FontMapping. It turned out that the key to
getting iText to embed fonts for text rendered into PDFs was that the
FontMapper used needs to have all system fonts registered into it.
Also fixed PDF export page number positioning in the more generic PDF
export wizard.
Tuukka Lehtonen [Tue, 7 Feb 2017 14:11:00 +0000 (16:11 +0200)]
Remove all dependencies on javax.vecmath.
Apache Commons Math3 library can be used to replace the functionality.
The only downside is that Math3 is over 10 times larger than the old
vecmath library (180kB vs. >2MB).
Also removed javax.vecmath entirely from platform external dependencies.