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.
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)
Hannu Niemistö [Wed, 28 Dec 2016 10:46:48 +0000 (12:46 +0200)]
Improvements to SCL compiler error messages
Better error message if type annotation has different number of
parameters than the function definition.
Refactored method names, we have now getSyntacticFunctionArity for
estimating function arity without type information and
getFunctionDefinitionPatternArity for arity calculations of patterns.
Hannu Niemistö [Tue, 27 Dec 2016 14:30:02 +0000 (16:30 +0200)]
Reverted if-without-else feature in SCL
Removed possibility to have if-then -construct without else, because the
implementation changed parsing rules and some existing code was broken.
The feature might be added in future, if better implementation is found.
Hannu Niemistö [Tue, 20 Dec 2016 10:09:30 +0000 (12:09 +0200)]
Merged changes from feature/scl to master.
This commit contains lots of SCL compiler and runtime changes:
* New CHR-rule based sublanguage. This change alters meaning of
when-keyword and so some code using when may break.
* Removed type classes Eq and Hashable. Compiler now generates and uses
Java methods equals and hashCode. This change is needed for better
interoperability with Java code.
* Type based overloading for symbols imported from different modules
* Some expressions ignore their return value (statements in
do/let/where, if and match cases if the return value of if/match is
ignored). These expressions can have any type and if/match expression
branches may have different types. Also if-expressions may have only
else branch. If the return value of apply-experssion is ignored, the
expression cannot be partial application that does not have
side-effects.
* View pattern support
(https://ghc.haskell.org/trac/ghc/wiki/ViewPatterns)
* Lambda-match support
(https://ghc.haskell.org/trac/ghc/wiki/LambdasVsPatternMatching)
* String interpolation can be used also in patterns
* SCL compiler regression test suite has been moved to a new bundle
org.simantics.scl.compiler.tests
* Improvements to SCL module editor syntax coloring
* SCL compiler refactorings, for example all name constants are now in a
dedicated class Names and CompilationContext merging old context classes
* Improved byte code for comparisons
* Improved code generation from string interpolation
* Anonymous object support in SCL backend (not yet frontend support)
* Bugfixes and new regression tests
Jussi Koskela [Mon, 19 Dec 2016 15:24:01 +0000 (17:24 +0200)]
Import/export menuitems missing from Simantics Desktop product
Import/export were moved to separate feature
(org.simantics.modeling.ui.workbench.feature) in #6856, but this feature
was not included to Simantics Desktop product.
Tuukka Lehtonen [Mon, 19 Dec 2016 07:55:48 +0000 (09:55 +0200)]
Fix desktop product configuration
Removed -Djava.net.preferIPv4Stack=true which is totally out of date. It
was an early day procore hack.
Added -Djava.util.Arrays.useLegacyMergeSort=true because the G2D scene
graph comparator for some still unknown reason runs into problems with
Java's TimSort implementation.
Tuukka Lehtonen [Sun, 18 Dec 2016 19:25:07 +0000 (21:25 +0200)]
Include source features in generated SDK P2 repository
The problem was that the generated org.simantics.sdk.source feature was
missing from org.simantics.sdk.repository/category.xml and thus the
build would not include any sources.
Also bumped used tycho version to 0.26.0 from 0.25.0.
Tuukka Lehtonen [Sun, 18 Dec 2016 15:53:43 +0000 (17:53 +0200)]
Target platform release work for 1.25.0.
Removed useless releng/org.simantics.target.
Moved releng/org.simantics.target/simantics.target to
org.simantics.sdk.build.targetdefinition/simantics.target and changed
its contents to match what shall be published on the web as
http://www.simantics.org/download/<refspec>/simantics.target.
Antti Villberg [Thu, 8 Dec 2016 09:08:39 +0000 (11:08 +0200)]
Moved File menu Export and Import contributions to separate feature.
The contributions were previously in org.simantics.desktop.ui. It was
deemed best to move them to a separate plug-in and feature
(org.simantics.modeling.ui.workbench) to make it possible to prevent
forcefully including the contributions in all Simantics products.
Tuukka Lehtonen [Thu, 8 Dec 2016 21:48:11 +0000 (23:48 +0200)]
Fixed labels for search results restored from previous search memento
Also made the details label shown at the bottom of the dialog for the
selected entry a bit more legible. The URI that was previously shown is
now a root relative unescaped path for results contained by a model
root.
Antti Villberg [Thu, 8 Dec 2016 09:06:36 +0000 (11:06 +0200)]
Re-enabled CTRL+SHIFT+R resource search dialog in org.simantics.debug.ui
This fixes the old problem where the index searches were not limited to
e.g. a 1000 hits but to Integer.MAX_VALUE instead. If the user happened
to write 'a' into the search field, this would return pretty much every
indexed resource and kill the JVM eventually.
This also fixes a problem from
org.simantics.modeling.ui.diagramEditor.DiagramViewer which did not
check diagram resource immutability before attempting to write a diagram
page description to it because it was missing. This can happen if you
use the resource search dialog to open e.g. diagram symbols from the
ontologies.
Tuukka Lehtonen [Wed, 30 Nov 2016 13:48:51 +0000 (15:48 +0200)]
Added support for JSON PlainTextTransferable to charts and subscriptions
With these changes dragging JSON text using
org.simantics.ui.dnd.PlainTextTransfer on top of model browser charts
and subscriptions and also on a chart editor is now supported.
The dragged JSON data must be in the following format:
<pre>
{
"type" : "variable",
"uri" : "variable space URI to dragged entity",
"defaultPropertyUri" : "variable space URI to default referenced
property variable of the dragged entity"
}
</pre>
Only "type" and "defaultPropertyUri" keys are required.
Tuukka Lehtonen [Wed, 30 Nov 2016 12:57:40 +0000 (14:57 +0200)]
Fixed regression in TrendNode.
The regression was caused by change r32901 and merge r32981. The problem
was that the code tried to keep existing VertRuler nodes alive as much
as possible to keep their (transient) settings in place between chart
configuration reloads. However the code failed to do this correctly and
caused IndexOutOfBoundsExceptions and other corollary failures.
This fix needs to go into platform branches 1.22.2 and 1.22 as well.
Tuukka Lehtonen [Mon, 28 Nov 2016 17:20:29 +0000 (19:20 +0200)]
Fixed bounds calculation for flags and diagram profile monitors.
NodeUtil.getLocalElementBounds did not recognize flag table flags from
the scene graph. Also TextGridStyle.calculateStyle used wrong method for
transform calculation which causes profile monitors to be positioned
incorrectly.
Tuukka Lehtonen [Mon, 28 Nov 2016 13:34:36 +0000 (15:34 +0200)]
Include org.apache.batik/1.8.0 in org.simantics.g2d feature.
After including org.simantics.diagram.svg into the org.simantics.g2d
feature in commit:229196a1cb46a94d1cc5f75aef7f822157ba7917, the feature
started requiring org.apache.batik(/1.8.0). However, it is not included
by the feature which can cause product/feature configurations to be
invalid.
User Components now see their own SCLModule definitions without
including them to the index roots SCLMain. Makes UCs more individual and
eases the usage of them.
Tuukka Lehtonen [Fri, 25 Nov 2016 14:45:37 +0000 (16:45 +0200)]
Re-export org.simantics.db.management dependency from org.simantics.
org.simantics has API that publishes/uses interface ISessionContext. It
is defined in org.simantics.db.management plug-in. Therefore
org.simantics.db.managment must be re-exported.
Tuukka Lehtonen [Fri, 25 Nov 2016 10:03:27 +0000 (12:03 +0200)]
Introduce utility class org.simantics.db.function.DbOptional<T>.
The class is a direct copy of java.util.Optional<T> but it uses
DbConsumer, DbFunction, DbPredicate and DbSupplier instead of the
standard Java 1.8 functional interfaces to allow the DbOptional methods
to throw DatabaseExceptions for cleaner database code in certain
situations.
The rationale behind this class is much the same as with the standard
optional. See e.g.
http://www.oracle.com/technetwork/articles/java/java8-optional-2175753.html.
Tuukka Lehtonen [Fri, 25 Nov 2016 13:08:24 +0000 (15:08 +0200)]
Include Jackson XML/CSV dataformat libraries in external components
The following new bundles were added:
* com.fasterxml.jackson.core.jackson-annotations/2.8.0
* com.fasterxml.jackson.core.jackson-databind/2.8.5
* com.fasterxml.jackson.dataformat.jackson-dataformat-csv/2.8.5
* com.fasterxml.jackson.dataformat.jackson-dataformat-xml/2.8.5
* com.fasterxml.jackson.module.jackson-module-jaxb-annotations/2.8.5
* com.fasterxml.woodstox.woodstox-core/5.0.3
* stax2-api/3.1.4
The following upgrades were done:
* net.ucanaccess/3.0.6 -> 3.0.7
Tuukka Lehtonen [Thu, 24 Nov 2016 14:40:39 +0000 (16:40 +0200)]
Include org.simantics.{fileimport,spreadsheet.fileimport} in SDK build.
org.simantics.spreadsheet.fileimport needs org.simantics.fileimport and
org.simantics.spreadsheet isn't actually in any way dependent on other
org.simantics.spreadsheet plug-ins.
Tuukka Lehtonen [Wed, 23 Nov 2016 22:24:30 +0000 (00:24 +0200)]
Lots of small fixes for the Simantics SDK build
* org.apache.batik/1.8.0 is taken from external-components/manual now.
Removed it from this repository.
* org.simantics.sdk now includes plenty of previously missing plug-ins
and features: org.simantics.help.*,
org.simantics.spreadsheet.fileimport, org.apache.pdfbox*,
org.simantics.tests.modelled*, org.simantics.diagram.svg,
org.simantics.browsing.ui.nattable*
* many build.properties fixes, e.g. removal of non-existent files and
addition of missing binary/source artifacts
* added new feature org.simantics.help.addons to bundle together all the
recently added org.simantics.help.* plug-ins for modelled help page
construction in the Simantics Desktop workbench.
* added new feature org.simantics.browsing.ui.nattable.feature to gather
together org.simantics.browsing.ui.nattable and its external component
dependencies (nattable.core, fastutil)
refs #6621
Tuukka Lehtonen [Wed, 23 Nov 2016 13:17:14 +0000 (15:17 +0200)]
Merge changes I8832696c,I7ff3a4d5
* changes:
Refactored RouteGraphConnectionClassFactory code into RouteGraphUtils
Fixed record-type value editing in the old property tab implementation
Tuukka Lehtonen [Tue, 22 Nov 2016 11:04:13 +0000 (13:04 +0200)]
Fixed Typical inheritance profile style implementation for I/O tables
Now all transforms are calculated properly using
DiagramGraphUtil.getDynamicWorldTransform in
the default case. This fixes the highlights for flags
that are attached to a diagram template flag table.
Tuukka Lehtonen [Tue, 22 Nov 2016 07:16:22 +0000 (09:16 +0200)]
Include org.apache.poi.feature in org.simantics.spreadsheet feature.
This replaces the inclusion of only the org.apache.poi plug-in which
does not include all the dependencies required by Apache POI.
Also, exclude source org.apache.poi[.feature] source bundles from build.
Since there is no source bundle for org.apache.poi 3.15.0 so we must
exclude it from the build to get the build to pass.
Jussi Koskela [Mon, 21 Nov 2016 08:21:09 +0000 (10:21 +0200)]
Introduce WrapLayout to replace FlowLayout
FlowLayout does not really flow components into separate lines when they
overrun their horizontal space. WrapLayout does this.
Also moved the contents of org.simantics.utils.ui.awt into
org.simantics.utils.ui.internal.awt since that code was never meant for
public use. Moved WrapLayout into org.simantics.utils.ui.awt and
published that package.
Tuukka Lehtonen [Sun, 20 Nov 2016 22:11:57 +0000 (00:11 +0200)]
Use direct repository links instead of composite repository link.
There seems to be problems with Tycho and composite repositories and
furthermore, otherwise the composite repository would always have to be
bumped separately to get updates to clients.
Tuukka Lehtonen [Sun, 20 Nov 2016 09:08:47 +0000 (11:08 +0200)]
Added back dependencies of org.apache.poi 3.15.
Added org.apache.commons.codec, org.apache.commons.logging,
com.github.virtuald.curvesapi, org.apache.xmlbeans back to external
components to be used by org.apache.poi 3.15 which will be manually
bundled.