From: Jani Simomaa Date: Mon, 22 Aug 2016 06:43:40 +0000 (+0300) Subject: Merge "Fixed acorn head.state writing" X-Git-Tag: v1.25.0~158 X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=7ae3183d63888cfeb1f755997067a859f7763b5f;hp=00dfdf1c3bd241ba9ace7ec4e375695e181a8963 Merge "Fixed acorn head.state writing" --- diff --git a/bundles/org.simantics.help.base/.classpath b/bundles/org.simantics.help.base/.classpath index 6cf33fb32..b1dabee38 100644 --- a/bundles/org.simantics.help.base/.classpath +++ b/bundles/org.simantics.help.base/.classpath @@ -1,9 +1,5 @@ - - - - diff --git a/bundles/org.simantics.help.base/META-INF/MANIFEST.MF b/bundles/org.simantics.help.base/META-INF/MANIFEST.MF index 51c9d1aa0..a20f8e475 100644 --- a/bundles/org.simantics.help.base/META-INF/MANIFEST.MF +++ b/bundles/org.simantics.help.base/META-INF/MANIFEST.MF @@ -7,11 +7,9 @@ Bundle-Activator: org.simantics.help.base.internal.Activator Bundle-Vendor: Semantum Oy Require-Bundle: org.eclipse.core.runtime, org.eclipse.help.base, - org.apache.commons.logging;bundle-version="1.0.4" + org.apache.commons.logging;bundle-version="1.0.4", + org.apache.pdfbox;bundle-version="2.0.2", + org.apache.pdfbox.fontbox;bundle-version="2.0.2" Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-ActivationPolicy: lazy -Bundle-ClassPath: ., - xmpbox-1.8.10.jar, - jempbox-1.8.10.jar, - fontbox-1.8.10.jar, - pdfbox-1.8.10.jar +Bundle-ClassPath: . diff --git a/bundles/org.simantics.help.base/build.properties b/bundles/org.simantics.help.base/build.properties index 7904aba26..c125ab4d7 100644 --- a/bundles/org.simantics.help.base/build.properties +++ b/bundles/org.simantics.help.base/build.properties @@ -2,9 +2,5 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ .,\ - plugin.xml,\ - pdfbox-1.8.10.jar,\ - fontbox-1.8.10.jar,\ - jempbox-1.8.10.jar,\ - xmpbox-1.8.10.jar + plugin.xml source.. = src/ diff --git a/bundles/org.simantics.help.base/fontbox-1.8.10.jar b/bundles/org.simantics.help.base/fontbox-1.8.10.jar deleted file mode 100644 index 3284950c8..000000000 Binary files a/bundles/org.simantics.help.base/fontbox-1.8.10.jar and /dev/null differ diff --git a/bundles/org.simantics.help.base/jempbox-1.8.10.jar b/bundles/org.simantics.help.base/jempbox-1.8.10.jar deleted file mode 100644 index 48cc63375..000000000 Binary files a/bundles/org.simantics.help.base/jempbox-1.8.10.jar and /dev/null differ diff --git a/bundles/org.simantics.help.base/pdfbox-1.8.10-src.zip b/bundles/org.simantics.help.base/pdfbox-1.8.10-src.zip deleted file mode 100644 index e05aa634b..000000000 Binary files a/bundles/org.simantics.help.base/pdfbox-1.8.10-src.zip and /dev/null differ diff --git a/bundles/org.simantics.help.base/pdfbox-1.8.10.jar b/bundles/org.simantics.help.base/pdfbox-1.8.10.jar deleted file mode 100644 index 87bb9a704..000000000 Binary files a/bundles/org.simantics.help.base/pdfbox-1.8.10.jar and /dev/null differ diff --git a/bundles/org.simantics.help.base/src/org/simantics/help/base/internal/PDFUtil.java b/bundles/org.simantics.help.base/src/org/simantics/help/base/internal/PDFUtil.java index c12e56b4d..43fac6c70 100644 --- a/bundles/org.simantics.help.base/src/org/simantics/help/base/internal/PDFUtil.java +++ b/bundles/org.simantics.help.base/src/org/simantics/help/base/internal/PDFUtil.java @@ -1,14 +1,14 @@ package org.simantics.help.base.internal; import java.io.File; -import java.io.FileInputStream; import java.io.IOException; import org.apache.pdfbox.cos.COSDocument; +import org.apache.pdfbox.io.RandomAccessFile; import org.apache.pdfbox.pdfparser.PDFParser; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDDocumentInformation; -import org.apache.pdfbox.util.PDFTextStripper; +import org.apache.pdfbox.text.PDFTextStripper; import org.eclipse.help.search.ISearchDocument; /** @@ -17,7 +17,7 @@ import org.eclipse.help.search.ISearchDocument; public class PDFUtil { public static void stripText(File fromPdf, ISearchDocument doc) throws IOException { - PDFParser parser = new PDFParser(new FileInputStream(fromPdf)); + PDFParser parser = new PDFParser(new RandomAccessFile(fromPdf, "r")); parser.parse(); try (COSDocument cosDoc = parser.getDocument()) { diff --git a/bundles/org.simantics.help.base/xmpbox-1.8.10.jar b/bundles/org.simantics.help.base/xmpbox-1.8.10.jar deleted file mode 100644 index 7a8a46594..000000000 Binary files a/bundles/org.simantics.help.base/xmpbox-1.8.10.jar and /dev/null differ diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java index f0c9dbddf..5e332742a 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java @@ -86,6 +86,8 @@ public class Types { public static final TCon VEC_COMP = con(BUILTIN, "VecComp"); public static final TCon BINDING = con(BUILTIN, "Binding"); + public static final TCon TYPE = con(BUILTIN, "Type"); + public static final TCon DYNAMIC = con("Prelude", "Dynamic"); public static final TCon VARIANT = con(BUILTIN, "Variant"); diff --git a/bundles/org.simantics.scl.runtime/META-INF/MANIFEST.MF b/bundles/org.simantics.scl.runtime/META-INF/MANIFEST.MF index d88e4403a..64d5ac63d 100755 --- a/bundles/org.simantics.scl.runtime/META-INF/MANIFEST.MF +++ b/bundles/org.simantics.scl.runtime/META-INF/MANIFEST.MF @@ -6,7 +6,6 @@ Bundle-Version: 0.4.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Export-Package: org.simantics.scl.runtime, org.simantics.scl.runtime.collection, - org.simantics.scl.runtime.equations, org.simantics.scl.runtime.exceptions, org.simantics.scl.runtime.function, org.simantics.scl.runtime.io, diff --git a/bundles/org.simantics.scl.runtime/scl/Expressions/Equations.scl b/bundles/org.simantics.scl.runtime/scl/Expressions/Equations.scl deleted file mode 100644 index e695a0089..000000000 --- a/bundles/org.simantics.scl.runtime/scl/Expressions/Equations.scl +++ /dev/null @@ -1,13 +0,0 @@ -effect Equation - "equation" - "org.simantics.scl.runtime.equations.EquationContext" - -importJava "org.simantics.scl.runtime.equations.EquationContext" where - data EquationContext - - listenEquationVariable :: String -> (a -> ()) -> () - setEquationVariable :: String -> a -> () - applyEquationContext :: ( a) -> EquationContext -> a - -importJava "org.simantics.scl.runtime.equations.TestEquationContext" where - solveEquations :: ( a) -> [(String,String)] \ No newline at end of file diff --git a/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/equations/EquationContext.java b/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/equations/EquationContext.java deleted file mode 100644 index f20dd6fb3..000000000 --- a/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/equations/EquationContext.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.simantics.scl.runtime.equations; - -import org.simantics.scl.runtime.SCLContext; -import org.simantics.scl.runtime.function.Function; -import org.simantics.scl.runtime.tuple.Tuple0; - -public interface EquationContext { - void listenEquationVariable(String variableName, Function callback); - void setEquationVariable(String variableName, Object value); - - public static Object applyEquationContext(Function f, EquationContext equationContext) { - SCLContext context = SCLContext.getCurrent(); - Object oldEquationContext = context.put("equation", equationContext); - try { - return f.apply(Tuple0.INSTANCE); - } finally { - context.put("equation", oldEquationContext); - } - } -} diff --git a/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/equations/TestEquationContext.java b/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/equations/TestEquationContext.java deleted file mode 100644 index 856ef2870..000000000 --- a/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/equations/TestEquationContext.java +++ /dev/null @@ -1,95 +0,0 @@ -package org.simantics.scl.runtime.equations; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.simantics.scl.runtime.SCLContext; -import org.simantics.scl.runtime.function.Function; -import org.simantics.scl.runtime.tuple.Tuple0; -import org.simantics.scl.runtime.tuple.Tuple2; - -import gnu.trove.map.hash.THashMap; -import gnu.trove.procedure.TObjectObjectProcedure; - -public class TestEquationContext implements EquationContext { - - public static final boolean TRACE = true; - - THashMap values = new THashMap(); - THashMap> listenerMap = new THashMap>(); - - @Override - public void listenEquationVariable(String variableName, Function listener) { - if(TRACE) - System.out.println("listenEquationVariable(" + variableName + ", " + listener + ")"); - if(values.containsKey(variableName)) { - Object value = values.get(variableName); - if(TRACE) - System.out.println(" apply " + value); - listener.apply(value); - } - else { - if(TRACE) - System.out.println(" add listener"); - ArrayList listeners = listenerMap.get(variableName); - if(listeners == null) { - listeners = new ArrayList(); - listenerMap.put(variableName, listeners); - } - listeners.add(listener); - } - } - - @Override - public void setEquationVariable(String variableName, Object value) { - if(TRACE) - System.out.println("setEquationVariable(" + variableName + ", " + value + ")"); - if(values.containsKey(variableName)) - throw new IllegalStateException("Value for " + variableName + " already defined (oldValue=" + values.get(variableName) + - ", newValue=" + value + ")."); - values.put(variableName, value); - ArrayList listeners = listenerMap.remove(variableName); - SCLContext context = SCLContext.getCurrent(); - if(listeners != null) { - Object oldEquationContex = context.put("equation", this); - try { - for(Function listener : listeners) { - if(TRACE) - System.out.println(" apply " + listener + " " + value); - listener.apply(value); - } - } finally { - context.put("equation", oldEquationContex); - } - } - } - - public static List solveEquations(Function f) { - TestEquationContext equationContext = new TestEquationContext(); - SCLContext context = SCLContext.getCurrent(); - Object oldEquationContext = context.put("equation", equationContext); - try { - f.apply(Tuple0.INSTANCE); - } finally { - context.put("equation", oldEquationContext); - } - ArrayList result = new ArrayList(equationContext.values.size()); - equationContext.values.forEachEntry(new TObjectObjectProcedure() { - @Override - public boolean execute(String a, Object b) { - result.add(new Tuple2(a, String.valueOf(b))); - return true; - } - }); - Collections.sort(result, (t1, t2) -> { - return ((String)t1.c0).compareTo((String)t2.c0); - }); - return result; - } - - public THashMap getValues() { - return values; - } - -} diff --git a/features/pom.xml b/features/pom.xml index 5ad3c0dfa..f935cf28e 100644 --- a/features/pom.xml +++ b/features/pom.xml @@ -97,6 +97,7 @@ com.lowagie.text.feature org.apache.lucene4.feature + org.jfree.feature org.simantics.browsing.ui.feature org.simantics.charts.feature org.simantics.data.feature diff --git a/releng/org.simantics.sdk.build.p2.site/README.md b/releng/org.simantics.sdk.build.p2.site/README.md new file mode 100644 index 000000000..8114468fb --- /dev/null +++ b/releng/org.simantics.sdk.build.p2.site/README.md @@ -0,0 +1 @@ +Run mvn p2:site to build the P2 repository of the external components listed in pom.xml. \ No newline at end of file diff --git a/releng/org.simantics.sdk.build.p2.site/pom.xml b/releng/org.simantics.sdk.build.p2.site/pom.xml index b76a97269..4e17e3765 100644 --- a/releng/org.simantics.sdk.build.p2.site/pom.xml +++ b/releng/org.simantics.sdk.build.p2.site/pom.xml @@ -9,7 +9,9 @@ 1.25.0 + 2.1.7.b1 4.9.0 + 4.9.0.b0003 org.apache.lucene4 @@ -107,6 +109,8 @@ true ${lucene.prefix}.core + ${lucene.version.actual} + *;version="${lucene.version}" @@ -114,6 +118,10 @@ true ${lucene.prefix}.queries + ${lucene.version.actual} + ${lucene.prefix}.core;bundle-version="${lucene.version}" + *;version="${lucene.version}" + !org.apache.lucene.*,*;resolution:=optional @@ -121,20 +129,32 @@ true ${lucene.prefix}.sandbox + ${lucene.version.actual} + ${lucene.prefix}.core;bundle-version="${lucene.version}" + *;version="${lucene.version}" + !org.apache.lucene.*,*;resolution:=optional - org.apache.lucene:lucene-queryparser:${lucene.version} + org.apache.lucene:lucene-analyzers-common:${lucene.version} true - ${lucene.prefix}.queryparser + ${lucene.prefix}.analyzers-common + ${lucene.version.actual} + ${lucene.prefix}.core;bundle-version="${lucene.version}" + *;version="${lucene.version}" + !org.apache.lucene.*,*;resolution:=optional - org.apache.lucene:lucene-analyzers-common:${lucene.version} + org.apache.lucene:lucene-queryparser:${lucene.version} true - ${lucene.prefix}.analyzers-common + ${lucene.prefix}.queryparser + ${lucene.version.actual} + ${lucene.prefix}.core;bundle-version="${lucene.version}",${lucene.prefix}.queries;bundle-version="${lucene.version}",${lucene.prefix}.sandbox;bundle-version="${lucene.version}" + *;version="${lucene.version}" + !org.apache.lucene.*,*;resolution:=optional @@ -222,7 +242,11 @@ org.eclipse.collections:eclipse-collections-api:7.1.0 + true true + + org.eclipse.collections.* + org.eclipse.collections:eclipse-collections:7.1.0 @@ -257,6 +281,7 @@ true com.lowagie.text + ${itext.version.actual} diff --git a/releng/org.simantics.sdk.build.targetdefinition/org.simantics.sdk.build.targetdefinition.target b/releng/org.simantics.sdk.build.targetdefinition/org.simantics.sdk.build.targetdefinition.target index 9a85c879f..34bfa95c2 100644 --- a/releng/org.simantics.sdk.build.targetdefinition/org.simantics.sdk.build.targetdefinition.target +++ b/releng/org.simantics.sdk.build.targetdefinition/org.simantics.sdk.build.targetdefinition.target @@ -16,7 +16,7 @@ - + @@ -75,9 +75,9 @@ - + - + @@ -91,20 +91,20 @@ - + - + - + - + @@ -121,12 +121,12 @@ - + - + @@ -134,12 +134,12 @@ - + - + @@ -156,13 +156,13 @@ - - - + + + - + @@ -180,7 +180,7 @@ - +