Commit 0d2787e3 authored by Alexander Weigl's avatar Alexander Weigl

CodeArea's syntax highlightning

* added less pre-compiler
* added solarized theme
parent d15e3322
Pipeline #10983 failed with stage
in 2 minutes and 24 seconds
......@@ -99,6 +99,26 @@
</configuration>
</plugin>
<plugin>
<groupId>org.lesscss</groupId>
<artifactId>lesscss-maven-plugin</artifactId>
<version>1.7.0.1.1</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<sourceDirectory>${project.build.sourceDirectory}/../resources</sourceDirectory>
<compress>false</compress>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
......
......@@ -43,8 +43,9 @@ public class ProofScriptDebugger extends Application {
//DebuggerMainWindowController controller = fxmlLoader.<DebuggerMainWindowController>getController();
Scene scene = new Scene(root);
scene.getStylesheets().addAll(
"/proofscriptdebugger.css"
getClass().getResource("debugger-ui.css").toExternalForm()
);
primaryStage.setTitle(NAME + " (" + VERSION + ") with KeY:" + KEY_VERSION);
primaryStage.setScene(scene);
primaryStage.show();
......
......@@ -35,8 +35,9 @@ public class JavaArea extends CodeArea {
setEditable(false);
setParagraphGraphicFactory(LineNumberFactory.get(this));
setWrapText(true);
getStyleClass().add("java-area");
getStylesheets().add(getClass().getResource("java-keywords.css").toExternalForm());
//getStylesheets().add(getClass().getResource("java-keywords.css").toExternalForm());
getStyleClass().add("java-area");
textProperty().addListener(
(a, b, c) -> updateView());
......
......@@ -55,7 +55,7 @@ public class ScriptArea extends CodeArea {
highlighter = new ANTLR4LexerHighlighter(
(String val) -> new ScriptLanguageLexer(CharStreams.fromString(val)));
this.setParagraphGraphicFactory(gutter);
getStylesheets().add(getClass().getResource("script-keywords.css").toExternalForm());
//getStylesheets().add(getClass().getResource("script-keywords.css").toExternalForm());
getStyleClass().add("script-area");
textProperty().addListener((prop, oldValue, newValue) -> {
clearStyle(0, newValue.length());
......@@ -73,7 +73,7 @@ public class ScriptArea extends CodeArea {
return Optional.empty();
}
}).subscribe(s -> setStyleSpans(0, s));*/
getStyleClass().add("script-area");
installPopup();
}
......
......@@ -28,6 +28,7 @@ public class SequentView extends CodeArea {
public SequentView() {
getStyleClass().add("sequent-view");
setEditable(false);
node.addListener(this::update);
setOnMouseMoved(this::hightlight);
......
.ABSTRACT, .ASSERT, .BOOLEAN, .BREAK, .BYTE, .CASE, .CATCH, .CHAR, .CLASS, .CONST,
.CONTINUE, .DEFAULT, .DO, .DOUBLE, .ELSE, .ENUM, .EXTENDS, .FINAL, .FINALLY,
.FLOAT, .FOR, .IF, .GOTO, .IMPLEMENTS, .IMPORT, .INSTANCEOF, .INT,
.INTERFACE, .LONG, .NATIVE, .NEW, .PACKAGE, .PRIVATE, .PROTECTED, .PUBLIC, .RETURN,
.SHORT, .STATIC, .STRICTFP, .SUPER, .SWITCH, .SYNCHRONIZED, .THIS, .THROW, .THROWS,
.TRANSIENT, .TRY, .VOID, .VOLATILE, .WHILE {
-fx-fill: darkgreen;
-fx-font-weight: bold;
}
.hl-line {
-fx-background-color: khaki !important;
-fx-underline: true;
-fx-font-weight: bold ;
}
.NullLiteral {
-fx-font-weight: bold;
-fx-fill: darkred;
}
.LPAREN, .RPAREN, .LBRACE, .RBRACE, .LBRACK, .RBRACK, .SEMI, .COMMA, .DOT {
-fx-font-weight: bold;
-fx-fill: blueviolet;
}
.script-area {
-fx-font-size: 14pt;
-fx-font-family: "Fira Code Medium";
}
.INTEGER_LITERAL {
-fx-fill: blue;
}
.StringLiteral, .CharacterLiteral {
-fx-fill: green;
-fx-font-smoothing-type: lcd;
}
.LINE_COMMENT, .COMMENT {
-fx-fill: dimgrey;
-fx-font-family: "Fira Code Light";
}
.Identifier {
-fx-fill: darkslateblue;
-fx-font-weight: bold;
}
.problem {
-fx-fill: firebrick !important;
-fx-underline: true;
}
.FOREACH, .CASES, .CASE, .THEONLY, .SCRIPT, .USING,
.REPEAT {
-fx-fill: darkgreen;
-fx-font-weight: bold;
}
.MATCH, .PLUS, .MINUS {
-fx-font-weight: bold;
-fx-fill: darkred;
}
.INDENT, .DEDENT, .COLON, .ASSIGN {
-fx-font-weight: bold;
-fx-fill: blueviolet;
}
.script-area {
-fx-font-size: 14pt;
-fx-font-family: "Fira Code Medium";
}
.INTEGER_LITERAL {
-fx-fill: blue;
}
.TERM_LITERAL {
-fx-fill: green;
-fx-font-smoothing-type: lcd;
}
.STRING_LITERAL {
-fx-fill: olivedrab;
}
.SINGLE_LINE_COMMENT, .MULTI_LINE_COMMENT {
-fx-fill: dimgrey;
-fx-font-family: "Fira Code Light";
}
.IDENTIFIER {
-fx-fill: darkslateblue;
-fx-font-weight: bold;
}
.problem {
-fx-fill: firebrick !important;
-fx-underline: true;
}
@base03: rgb(0, 43, 54);
@base02: rgb(7, 54, 66);
@base01: rgb(88, 110, 117);
@base00: rgb(101, 123, 131);
@base0: rgb(131, 148, 150);
@base1: rgb(147, 161, 161);
@base2: rgb(238, 232, 213);
@base3: rgb(253, 246, 227);
@yellow: rgb(181, 137, 0);
@orange: rgb(203, 75, 22);
@red: rgb(220, 50, 47);
@magenta: rgb(211, 54, 130);
@violet: rgb(108, 113, 196);
@blue: rgb(38, 139, 210);
@cyan: rgb(42, 161, 152);
@green: rgb(133, 153, 0);
.solarized-dark() {
background-color: @base03;
color: @base0;
}
.solarized-light() {
background-color: @base3;
color: @base00;
}
.script-area {
-fx-background-color: @base3;
-fx-font-family: "Fira Code Medium", monospace;
-fx-font-size: 12pt;
-fx-fill: @base00;
// Structures
.FOREACH, .CASES, .CASE, .DEFAULT
.THEONLY, .SCRIPT, .USING, .REPEAT {
-fx-fill: @blue;
-fx-font-weight: bold;
}
// Operators
.MATCH, .PLUS, .MINUS,
.MUL, .DIV, .EQ, .NEQ,
.GEQ, .LEQ, .GE,
.LE, .AND, .OR,
.IMP, .EQUIV, .NOT {
-fx-fill: @green;
}
//
.INDENT, .DEDENT, .COLON, .ASSIGN, .LPAREN, .RPAREN, .LBRACKET, .RBRACKET {
-fx-font-weight: bold;
-fx-fill: blueviolet;
}
.DIGITS, .TRUE, .FALSE {
-fx-fill: @orange;
}
.TERM_LITERAL {
-fx-fill: @green;
}
.STRING_LITERAL {
-fx-fill: @violet;
}
.SINGLE_LINE_COMMENT, .MULTI_LINE_COMMENT {
-fx-fill: @base01;
-fx-font-weight: 100;
}
.IDENTIFIER {
-fx-fill: @orange;
-fx-font-weight: bold;
}
.problem {
-rtfx-background-color: @magenta;
-fx-underline: true;
}
}
/**********************************************************************************************************************/
.java-area {
-fx-background-color: @base3;
-fx-font-family: "Fira Code Medium", monospace;
-fx-font-size: 12pt;
-fx-fill: @base01;
.ABSTRACT, .ASSERT, .BOOLEAN, .BREAK, .BYTE, .CASE, .CATCH, .CHAR, .CLASS, .CONST,
.CONTINUE, .DEFAULT, .DO, .DOUBLE, .ELSE, .ENUM, .EXTENDS, .FINAL, .FINALLY,
.FLOAT, .FOR, .IF, .GOTO, .IMPLEMENTS, .IMPORT, .INSTANCEOF, .INT,
.INTERFACE, .LONG, .NATIVE, .NEW, .PACKAGE, .PRIVATE, .PROTECTED, .PUBLIC, .RETURN,
.SHORT, .STATIC, .STRICTFP, .SUPER, .SWITCH, .SYNCHRONIZED, .THIS, .THROW, .THROWS,
.TRANSIENT, .TRY, .VOID, .VOLATILE, .WHILE {
-fx-fill: darkgreen;
-fx-font-weight: bold;
}
.hl-line {
-rtfx-background-color: @base03 !important;
-fx-fill: @base2;
-fx-font-weight: bold;
}
.NullLiteral {
-fx-font-weight: bold;
-fx-fill: @blue;
}
.LPAREN, .RPAREN, .LBRACE, .RBRACE, .LBRACK, .RBRACK, .SEMI, .COMMA, .DOT {
}
.INTEGER_LITERAL {
-fx-fill: @blue;
}
.StringLiteral, .CharacterLiteral {
-fx-fill: @green;
-fx-font-smoothing-type: lcd;
}
.LINE_COMMENT, .COMMENT {
-fx-fill: @base01;
-fx-font-family: "Fira Code Light";
}
.Identifier {
-fx-fill: @orange;
-fx-font-weight: bold;
}
.problem {
-fx-fill: firebrick !important;
-fx-underline: true;
}
}
/**********************************************************************************************************************/
.problem-popup {
-fx-background-color: @base03;
-fx-text-fill: @base3;
-fx-text-alignment: center;
-fx-wrap-text: true;
-fx-fill-width: true;
}
.problem-popup-label {
-fx-wrap-text: true;
}
.problem-popup-label-error {
-fx-text-fill: @red;
}
.problem-popup-label-warn, .problem-popup-label-warning {
-fx-text-fill: @orange;
}
.problem-popup-label-info {
-fx-text-fill: @blue;
}
.header {
-fx-font-size: 120%;
-fx-font-weight: bold;
-fx-padding: 5px;
}
.sequent-view {
-fx-font-size: 14pt;
-fx-background-color: @base01;
.sequent-highlight {
-rtfx-background-color: @base1;
-fx-fill: @violet
}
}
.section-pane {
.title {
-fx-font-weight: bold;
-fx-font-size: 14pt;
}
.header-box {
-fx-padding: 5px;
}
.header-buttons .button {
}
.header-buttons .button {
}
}
\ No newline at end of file
.problem-popup {
-fx-background-color: black;
-fx-text-fill: white;
-fx-padding: 4px;
-fx-border-radius: 10 10 10 10;
-fx-background-radius: 10 10 10 10;
-fx-text-alignment: center;
-fx-wrap-text: true;
-fx-spacing: 5;
-fx-fill-width: true;
}
.problem-popup-label {
-fx-wrap-text: true;
}
.problem-popup-label-error {
-fx-text-fill: firebrick;
}
.problem-popup-label-warn, .problem-popup-label-warning {
-fx-text-fill: darkorange;
}
.problem-popup-label-info {
-fx-text-fill: cornflowerblue;
}
.header {
-fx-font-size: 120%;
-fx-font-weight: bold;
-fx-padding: 5px;
}
.styled-text-area .text.sequent-highlight {
-fx-background-color: yellowgreen !important;
}
.styled-text-area .sequent-highlight {
-fx-font-weight: bold;
-fx-background-insets: 1px;
-fx-background-position: center;
-fx-fill: firebrick;
-fx-border-color: black;
-fx-background-color: lightskyblue !important;
}
.section-pane .title {
-fx-font-weight: bold;
-fx-font-size: 14pt;
}
.section-pane .header-box {
-fx-padding: 5px;
}
.section-pane .header-buttons .button {
}
.section-pane .header-buttons .button {
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment