summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2017-05-09 22:46:11 +0200
committerRicardo Wurmus <rekado@elephly.net>2017-05-15 22:33:17 +0200
commitbf96acf7e5869fb5e6d05ef0ccfd13d4619002fa (patch)
treea389fa871987f547f6260cb566660ef9a9b79b42
parent31342529b25a1b66f3c21084d4eb994b1c1cb478 (diff)
gnu: Add java-eclipse-text.
* gnu/packages/java.scm (java-eclipse-text): New variable.
-rw-r--r--gnu/packages/java.scm55
1 files changed, 55 insertions, 0 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 95ddc581e26..aebcbd6b47b 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2825,6 +2825,61 @@ module @code{org.eclipse.compare.core}.")
2825@code{org.eclipse.core.commands}.") 2825@code{org.eclipse.core.commands}.")
2826 (license license:epl1.0))) 2826 (license license:epl1.0)))
2827 2827
2828(define-public java-eclipse-text
2829 (package
2830 (name "java-eclipse-text")
2831 (version "3.6.0")
2832 (source (origin
2833 (method url-fetch)
2834 (uri (string-append "https://repo1.maven.org/maven2/"
2835 "org/eclipse/platform/org.eclipse.text/"
2836 version "/org.eclipse.text-"
2837 version "-sources.jar"))
2838 (sha256
2839 (base32
2840 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
2841 (build-system ant-build-system)
2842 (arguments
2843 `(#:tests? #f ; no tests included
2844 #:jar-name "eclipse-text.jar"
2845 #:phases
2846 (modify-phases %standard-phases
2847 ;; When creating a new category we must make sure that the new list
2848 ;; matches List<Position>. By default it seems to be too generic
2849 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
2850 ;; Without this we get this error:
2851 ;;
2852 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
2853 ;; error: method put in interface Map<K,V> cannot be applied to given types;
2854 ;; [javac] fPositions.put(category, new ArrayList<>());
2855 ;; [javac] ^
2856 ;; [javac] required: String,List<Position>
2857 ;; [javac] found: String,ArrayList<Object>
2858 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
2859 ;; to List<Position> by method invocation conversion
2860 ;; [javac] where K,V are type-variables:
2861 ;; [javac] K extends Object declared in interface Map
2862 ;; [javac] V extends Object declared in interface Map
2863 ;;
2864 ;; I don't know if this is a good fix. I suspect it is not, but it
2865 ;; seems to work.
2866 (add-after 'unpack 'fix-compilation-error
2867 (lambda _
2868 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
2869 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
2870 "Positions.put(category, new ArrayList<Position>());"))
2871 #t)))))
2872 (inputs
2873 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
2874 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
2875 ("java-icu4j" ,java-icu4j)))
2876 (home-page "http://www.eclipse.org/platform")
2877 (synopsis "Eclipse text library")
2878 (description "Platform Text is part of the Platform UI project and
2879provides the basic building blocks for text and text editors within Eclipse
2880and contributes the Eclipse default text editor.")
2881 (license license:epl1.0)))
2882
2828(define-public java-commons-cli 2883(define-public java-commons-cli
2829 (package 2884 (package
2830 (name "java-commons-cli") 2885 (name "java-commons-cli")