Skip to content
This repository was archived by the owner on Nov 25, 2022. It is now read-only.

Commit 0e5e367

Browse files
committed
2 parents 8c37cea + 3dddb56 commit 0e5e367

6 files changed

Lines changed: 205 additions & 110 deletions

File tree

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
sudo: false
2+
language: java
3+
dist: trusty
4+
cache:
5+
directories:
6+
- $HOME/.m2
7+
jdk:
8+
- oraclejdk8
9+
install: true
10+
addons:
11+
sonarcloud:
12+
organization: xdean-github
13+
script:
14+
- mvn clean package sonar:sonar -P jacoco

pom.xml

Lines changed: 110 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,115 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3-
<modelVersion>4.0.0</modelVersion>
4-
<parent>
5-
<groupId>com.github.XDean</groupId>
6-
<artifactId>oss-parent</artifactId>
7-
<version>1.1</version>
8-
</parent>
9-
<artifactId>JavaFX-CSS-Editor</artifactId>
10-
<version>0.0.1-SNAPSHOT</version>
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<groupId>com.github.XDean</groupId>
6+
<artifactId>oss-parent</artifactId>
7+
<version>1.1</version>
8+
</parent>
9+
<artifactId>JavaFX-CSS-Editor</artifactId>
10+
<version>0.0.1-SNAPSHOT</version>
1111

12-
<properties>
13-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
14-
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
15-
</properties>
12+
<dependencyManagement>
13+
<dependencies>
14+
<dependency>
15+
<groupId>io.reactivex.rxjava2</groupId>
16+
<artifactId>rxjava</artifactId>
17+
<version>2.1.13</version>
18+
</dependency>
19+
</dependencies>
20+
</dependencyManagement>
1621

17-
<dependencyManagement>
18-
<dependencies>
19-
<dependency>
20-
<groupId>io.reactivex.rxjava2</groupId>
21-
<artifactId>rxjava</artifactId>
22-
<version>2.1.13</version>
23-
</dependency>
24-
</dependencies>
25-
</dependencyManagement>
22+
<dependencies>
23+
<dependency>
24+
<groupId>com.github.XDean</groupId>
25+
<artifactId>auto-message</artifactId>
26+
<version>0.1.6-SNAPSHOT</version>
27+
<scope>provided</scope>
28+
</dependency>
29+
<dependency>
30+
<groupId>com.github.XDean</groupId>
31+
<artifactId>auto-spring-factories</artifactId>
32+
<version>0.1.2</version>
33+
<scope>provided</scope>
34+
</dependency>
35+
<dependency>
36+
<groupId>com.github.XDean</groupId>
37+
<artifactId>javafx-spring-boot</artifactId>
38+
<version>0.1-SNAPSHOT</version>
39+
</dependency>
40+
<dependency>
41+
<groupId>com.github.XDean</groupId>
42+
<artifactId>rx2-nullable</artifactId>
43+
<version>1.0</version>
44+
</dependency>
45+
<dependency>
46+
<groupId>ch.qos.logback</groupId>
47+
<artifactId>logback-classic</artifactId>
48+
<version>1.1.3</version>
49+
</dependency>
50+
<dependency>
51+
<groupId>ch.qos.logback</groupId>
52+
<artifactId>logback-core</artifactId>
53+
<version>1.1.3</version>
54+
</dependency>
55+
<dependency>
56+
<groupId>org.slf4j</groupId>
57+
<artifactId>slf4j-api</artifactId>
58+
<version>1.7.5</version>
59+
</dependency>
60+
<dependency>
61+
<groupId>junit</groupId>
62+
<artifactId>junit</artifactId>
63+
<version>4.11</version>
64+
</dependency>
65+
<dependency>
66+
<groupId>io.reactivex.rxjava2</groupId>
67+
<artifactId>rxjavafx</artifactId>
68+
<version>2.2.2</version>
69+
</dependency>
70+
<dependency>
71+
<groupId>org.controlsfx</groupId>
72+
<artifactId>controlsfx</artifactId>
73+
<version>8.40.12</version>
74+
</dependency>
75+
<dependency>
76+
<groupId>org.fxmisc.richtext</groupId>
77+
<artifactId>richtextfx</artifactId>
78+
<version>0.7-M2</version>
79+
</dependency>
80+
<dependency>
81+
<groupId>com.github.XDean</groupId>
82+
<artifactId>JavaFX-EX</artifactId>
83+
<version>0.1.0-SNAPSHOT</version>
84+
</dependency>
85+
</dependencies>
2686

27-
<dependencies>
28-
<dependency>
29-
<groupId>com.github.XDean</groupId>
30-
<artifactId>auto-message</artifactId>
31-
<version>0.1.6-SNAPSHOT</version>
32-
<scope>provided</scope>
33-
</dependency>
34-
<dependency>
35-
<groupId>com.github.XDean</groupId>
36-
<artifactId>auto-spring-factories</artifactId>
37-
<version>0.1.2</version>
38-
<scope>provided</scope>
39-
</dependency>
40-
<dependency>
41-
<groupId>com.github.XDean</groupId>
42-
<artifactId>javafx-spring-boot</artifactId>
43-
<version>0.1-SNAPSHOT</version>
44-
</dependency>
45-
<dependency>
46-
<groupId>com.github.XDean</groupId>
47-
<artifactId>rx2-nullable</artifactId>
48-
<version>1.0</version>
49-
</dependency>
50-
<dependency>
51-
<groupId>ch.qos.logback</groupId>
52-
<artifactId>logback-classic</artifactId>
53-
<version>1.1.3</version>
54-
</dependency>
55-
<dependency>
56-
<groupId>ch.qos.logback</groupId>
57-
<artifactId>logback-core</artifactId>
58-
<version>1.1.3</version>
59-
</dependency>
60-
<dependency>
61-
<groupId>org.slf4j</groupId>
62-
<artifactId>slf4j-api</artifactId>
63-
<version>1.7.5</version>
64-
</dependency>
65-
<dependency>
66-
<groupId>junit</groupId>
67-
<artifactId>junit</artifactId>
68-
<version>4.11</version>
69-
</dependency>
70-
<dependency>
71-
<groupId>io.reactivex.rxjava2</groupId>
72-
<artifactId>rxjavafx</artifactId>
73-
<version>2.2.2</version>
74-
</dependency>
75-
<dependency>
76-
<groupId>org.controlsfx</groupId>
77-
<artifactId>controlsfx</artifactId>
78-
<version>8.40.12</version>
79-
</dependency>
80-
<dependency>
81-
<groupId>org.fxmisc.richtext</groupId>
82-
<artifactId>richtextfx</artifactId>
83-
<version>0.7-M2</version>
84-
</dependency>
85-
<dependency>
86-
<groupId>com.github.XDean</groupId>
87-
<artifactId>JavaFX-EX</artifactId>
88-
<version>0.1.0-SNAPSHOT</version>
89-
</dependency>
90-
</dependencies>
91-
92-
<build>
93-
<plugins>
94-
<plugin>
95-
<groupId>org.springframework.boot</groupId>
96-
<artifactId>spring-boot-maven-plugin</artifactId>
97-
<configuration>
98-
<executable>true</executable>
99-
</configuration>
100-
<executions>
101-
<execution>
102-
<goals>
103-
<goal>repackage</goal>
104-
</goals>
105-
</execution>
106-
</executions>
107-
</plugin>
108-
</plugins>
109-
</build>
87+
<build>
88+
<plugins>
89+
<plugin>
90+
<groupId>org.apache.maven.plugins</groupId>
91+
<artifactId>maven-compiler-plugin</artifactId>
92+
<version>3.1</version>
93+
<configuration>
94+
<compilerArguments>
95+
<bootclasspath>${sun.boot.class.path}${path.separator}${java.home}/lib/jfxrt.jar</bootclasspath>
96+
</compilerArguments>
97+
</configuration>
98+
</plugin>
99+
<plugin>
100+
<groupId>org.springframework.boot</groupId>
101+
<artifactId>spring-boot-maven-plugin</artifactId>
102+
<configuration>
103+
<executable>true</executable>
104+
</configuration>
105+
<executions>
106+
<execution>
107+
<goals>
108+
<goal>repackage</goal>
109+
</goals>
110+
</execution>
111+
</executions>
112+
</plugin>
113+
</plugins>
114+
</build>
110115
</project>
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
package xdean.css.editor.context.setting;
2+
3+
import java.lang.String;
4+
import javax.annotation.Generated;
5+
6+
@Generated("xdean.auto.message.AutoMessageProcessor")
7+
public interface RawSettingKeys {
8+
String OPTION_GENERAL = "option.general";
9+
10+
String OPTION_GENERAL_COMMON = "option.general.common";
11+
12+
String OPTION_GENERAL_COMMON_AUTO_SUGGEST = "option.general.common.auto-suggest";
13+
14+
String OPTION_GENERAL_COMMON_SHOW_LINE = "option.general.common.show-line";
15+
16+
String OPTION_GENERAL_COMMON_OPEN_LAST = "option.general.common.open-last";
17+
18+
String OPTION_GENERAL_COMMON_CHARSET = "option.general.common.charset";
19+
20+
String OPTION_GENERAL_TEXT = "option.general.text";
21+
22+
String OPTION_GENERAL_TEXT_FONT_FAMILY = "option.general.text.font-family";
23+
24+
String OPTION_GENERAL_TEXT_FONT_SIZE = "option.general.text.font-size";
25+
26+
String OPTION_GENERAL_TEXT_WRAP_TEXT = "option.general.text.wrap-text";
27+
28+
String OPTION_KEY = "option.key";
29+
30+
String OPTION_FIND_REGEX = "option.find.regex";
31+
32+
String OPTION_FIND_WRAP_SEARCH = "option.find.wrap-search";
33+
34+
String OPTION_FIND_CASE_SENSITIVE = "option.find.case-sensitive";
35+
36+
String OPTION_LANGUAGE = "option.language";
37+
38+
String OPTION_SKIN = "option.skin";
39+
40+
String OPTION_RECENT_LOCATION = "option.recent.location";
41+
42+
String EDIT_UNDO = "edit.undo";
43+
44+
String EDIT_REDO = "edit.redo";
45+
46+
String EDIT_SUGGEST = "edit.suggest";
47+
48+
String EDIT_FORMAT = "edit.format";
49+
50+
String EDIT_COMMENT = "edit.comment";
51+
52+
String EDIT_FIND = "edit.find";
53+
54+
String FILE_NEW = "file.new";
55+
56+
String FILE_OPEN = "file.open";
57+
58+
String FILE_SAVE = "file.save";
59+
60+
String FILE_SAVEAS = "file.saveAs";
61+
62+
String FILE_CLOSE = "file.close";
63+
64+
String FILE_REVERT = "file.revert";
65+
66+
String FILE_EXIT = "file.exit";
67+
68+
String HELP_SETTINGS = "help.settings";
69+
70+
String HELP_ABOUT = "help.about";
71+
72+
String HELP_HELP = "help.help";
73+
}

src/main/java/xdean/css/editor/context/setting/SettingKeys.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import xdean.auto.message.AutoMessage;
66

7-
@AutoMessage(path = "/message/settings.properties", generatedName = "RawSettingKeys")
7+
@AutoMessage(path = "/message/settings.properties", generatedName = "RawSettingKeysStub")
88
public interface SettingKeys {
99
String GENERAL = OPTION_GENERAL;
1010

src/main/java/xdean/css/editor/feature/PreviewFeature.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import org.springframework.stereotype.Service;
1010

1111
import io.reactivex.Observable;
12+
import io.reactivex.functions.Consumer;
1213
import io.reactivex.rxjavafx.observables.JavaFxObservable;
1314
import io.reactivex.rxjavafx.schedulers.JavaFxScheduler;
1415
import io.reactivex.schedulers.Schedulers;
@@ -101,7 +102,7 @@ private class InnerController {
101102
.map(o -> Pair.of(p, o)))
102103
.firstElement())
103104
.observeOn(JavaFxScheduler.platform())
104-
.doOnNext((Pair<CssElementPreviewer, Object> p) -> show(p.getLeft(), p.getRight()))
105+
.doOnNext((Consumer<Pair<CssElementPreviewer, Object>>) (p -> show(p.getLeft(), p.getRight())))
105106
.subscribe();
106107
}
107108

src/main/java/xdean/css/editor/feature/preview/PaintPreviewer.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
import static xdean.jex.util.lang.ExceptionUtil.uncatch;
44

5-
import java.util.function.Function;
6-
75
import org.springframework.stereotype.Service;
86

97
import com.sun.javafx.css.Stylesheet;
@@ -14,7 +12,9 @@
1412
import com.sun.javafx.css.parser.LadderConverter;
1513

1614
import io.reactivex.Maybe;
15+
import io.reactivex.MaybeSource;
1716
import io.reactivex.Observable;
17+
import io.reactivex.functions.Function;
1818
import io.reactivex.schedulers.Schedulers;
1919
import javafx.css.ParsedValue;
2020
import javafx.scene.Group;
@@ -46,7 +46,9 @@ public Maybe<Paint> parse(CssContext context, String str) {
4646
text -> LinearGradientConverter.getInstance().convert(resolve(context, text), Font.getDefault()),
4747
text -> RadialGradientConverter.getInstance().convert(resolve(context, text), Font.getDefault()))
4848
.observeOn(Schedulers.computation())
49-
.flatMapMaybe((Function<String, Paint> t) -> Maybe.fromCallable(() -> uncatch(() -> t.apply(str))).onErrorComplete())
49+
.<Paint> flatMapMaybe((Function<Function<String, Paint>, MaybeSource<Paint>>) (t -> Maybe
50+
.fromCallable(() -> uncatch(() -> t.apply(str)))
51+
.onErrorComplete()))
5052
.firstElement();
5153
}
5254

0 commit comments

Comments
 (0)