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.
Hannu Niemistö [Wed, 18 Jan 2017 15:55:14 +0000 (17:55 +0200)]
Fixed memory leaks of SCL module listening systems
The main addition in this change are backlinks from UpdateListeners to
Observables. They make it possible to implement
UpdateListener.stopListening that removes the listener from all
Observables. This method is called automatically before the listener is
notified about the change, but client code can also call it when it
becames disinterested about changes.
Because now the client code is reposible for signaling when the
listening stops, the listeners are no more store to WeakHashMap in
ModuleEntry.
This change also contains a change in the default imports of some graph
based modules (Prelude -> StandardLibrary).
Tuukka Lehtonen [Tue, 17 Jan 2017 14:59:42 +0000 (16:59 +0200)]
Removed unwanted and broken toolbar contributions
These innocent toolbar menuContribution extensions seem to have been the
cause of the ConcurrentModificationException that came from inside
Eclipse code when this plug-in was in use and the Eclipse platform
version used was 4.5.2. It didn't happen on 4.5.1.
Tuukka Lehtonen [Fri, 13 Jan 2017 12:56:41 +0000 (14:56 +0200)]
Fixed adapters.xml line endings to standard LF.
For some reason one of the original adapters.xml files had gotten a
macintosh-style CR line ending on its first line which started the
proliferation of CR line endings in all the adapters.xml files.
Tuukka Lehtonen [Tue, 10 Jan 2017 20:32:38 +0000 (22:32 +0200)]
Fixed component type editor Lift Properties domain setting.
Previously Lift Properties would copy the lifted property relation over
to the user component type as-is which would also leave all the existing
L0.HasDomain relations of the relation in the copy. This can cause
totally unwanted HasDomain definitions in the property relations which
in turn can cause unexpected export-import problems later because of
those unexpected dependencies.
This changes the code to first remove all the existing HasDomain
definitions from the copied property relation and then add the HasDomain
relation to the target component type.
Tuukka Lehtonen [Thu, 5 Jan 2017 14:09:37 +0000 (16:09 +0200)]
Removal prevention of different types of resources disabled
This "safety feature" has been in the model browser for a long time but
it feels like its time to remove it as it is really basically only an
annoyance and seldom saves the user from any real peril.
Tuukka Lehtonen [Wed, 4 Jan 2017 12:38:06 +0000 (14:38 +0200)]
Fixed IEditorPart reference (memory) leaks from ResourceEditorSupport
ResourceEditorSupport.validationRequest gave IEditorPart as an argument
to UnaryRequest which caused the reference to remain in the DB client's
caches for very long times. This consumed the JVM heap rather quickly
with editors that require a lot of memory and never explicitly free
(nullify) it.
Jussi Koskela [Thu, 29 Dec 2016 15:54:25 +0000 (17:54 +0200)]
Save cluster sets only when creating DB snapshots
Performance improvement. Also fix the order of saving cluster sets and
persisting head state. This (luckily) worked correctly earlier as well,
since the cluster sets were saved after each change.
Tuukka Lehtonen [Thu, 29 Dec 2016 11:05:27 +0000 (13:05 +0200)]
Improved error handling in shared library import wizard
Previously the wizard catched all exceptions in the wrong place causing
the UI to never show any errors to the user and just close the wizard as
if everything was successful. The problems were only printed to the
console and in selected cases also to the workspace error log.
This changes the import code to not catch any exceptions and let the UI
side deal with the thrown exceptions by logging them, showing them to
the user as the wizard's error message and in a separate error dialog.
jsimomaa [Wed, 28 Dec 2016 14:05:48 +0000 (16:05 +0200)]
ReflectionAdapter2 does not handle all Throwables
ReflectionAdapter2.adapt() does not catch all throwables (e.g.
NoClassDefFoundError) enabling the possibility that the throwable is not
shown to the developer in any manner (console or log)