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.
Hannu Niemistö [Mon, 20 Feb 2017 09:17:31 +0000 (11:17 +0200)]
(refs #7042) Added a new compiler optimization (eta-reduce)
Adds new optimization to SCL compiler that transforms the following code
\someParameters = f someOtherParameters someParameters'
to
f someOtherParameters
with the following restrictions:
* someParameters and someParameters' are lists of equal variables
or the type is ()
* someOtherParameters does not refer to variables in someParameters
or the lambda expression itself or something depending on it
recursively
Hannu Niemistö [Wed, 1 Feb 2017 14:40:11 +0000 (16:40 +0200)]
Added module header feature to SCL language.
Module header must be in the beginning of the module. However, comments
are allowed before the header. Header has the following form:
module {
field = value,
field = value
}
Currently field name classLoader is supported. It makes it possible to
specify which classLoader is used to resolve importJava declarations.
module {
classLoader = "my.bundle.name.somewhere"
}
Tuukka Lehtonen [Thu, 2 Feb 2017 11:22:03 +0000 (13:22 +0200)]
Removed logging of PendingVariableExceptions from LabelContribution
org.simantics.browsing.ui.model.labels.LabelContribution.getLabel used
to log all DatabaseExceptions which filled logs with very uninformative
PendingVariableException prints in normal operation.
PendingVariableExceptions are expected to happen in this context and
therefore should simply be ignored by returning empty labeling results.
Tuukka Lehtonen [Mon, 23 Jan 2017 18:56:03 +0000 (20:56 +0200)]
GraphExplorerComposite now accepts TextTransfer and MOVE/DEFAULT dnd ops
TextTransfer must be enabled to allow JSON drops into the model browser.
The MOVE and DEFAULT drag operations are allowed to see if this affects
people with problems dragging files from system file explorer to the
model browser.
Tuukka Lehtonen [Thu, 19 Jan 2017 23:06:09 +0000 (01:06 +0200)]
Issues-view menu improvements & Variable-based issue context resolution
This adds a new [Resource] valued property for Issue instances that is
by default defined to just read the old Issue.HasContexts L0.List
property. The property allows for more specific domains to override the
issue context resource calculations.
To support this calculation a noteworthy change needed to be made to
org.simantics.db.layer0.function.All.getStandardChildDomainPropertyVariable.
It now performs a new final fallback step that resembles how the
standard procedural variables work. If the parent variable has a solver
variable node defined, it will use NodeManager.getClassifications as an
attempt to read the type Resource of the variable. If this is
successful, the asserted properties of the type are searched to find a
property matching name of the the requested property. To support this a
new request was added: UnescapedAssertedPropertyMapOfResource. This
request is also used to optimize the implementation of
All.standardGetValue[12].
These changes also add a Help action for Issues view context menu that
looks for the "contextHelpId" String property from the Variable
describing the issue.