Skip to content

Commit

Permalink
Upgrade Java20 + JavaFx19
Browse files Browse the repository at this point in the history
  • Loading branch information
GiacomoCau committed Jun 2, 2023
1 parent 1b258b4 commit 36ef7be
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/JavaFx16"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/JavaFx19"/>
<classpathentry kind="output" path="bin"/>
</classpath>
15 changes: 0 additions & 15 deletions .settings/org.eclipse.jdt.core.prefs

This file was deleted.

2 changes: 1 addition & 1 deletion src/gui/Grammar.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.text.Font?>

<GridPane alignment="center" hgap="10" vgap="10" xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gui.GrammarController">
<GridPane alignment="center" hgap="10" vgap="10" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gui.GrammarController">
<columnConstraints>
<ColumnConstraints />
</columnConstraints>
Expand Down
4 changes: 2 additions & 2 deletions src/gui/GrammarController.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public class GrammarController implements Initializable {

public static LRParser lrParser;

private static String parserValue;
private static String inputText;
private String parserValue;
private String inputText;

@FXML private Label error;
@FXML private TextArea input;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/Parser.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.text.Font?>

<BorderPane minHeight="-Infinity" minWidth="-Infinity" prefHeight="550.0" prefWidth="700.0" style="-fx-background-color: white;" xmlns="http://javafx.com/javafx/16" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gui.ParserController">
<BorderPane minHeight="-Infinity" minWidth="-Infinity" prefHeight="550.0" prefWidth="700.0" style="-fx-background-color: white;" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gui.ParserController">
<top>
<AnchorPane minHeight="-Infinity" minWidth="-Infinity" prefHeight="134.0" prefWidth="700.0" style="-fx-border-color: black; -fx-border-width: 0 0 1 0; -fx-background-color: white;" BorderPane.alignment="CENTER">
<children>
Expand Down
3 changes: 2 additions & 1 deletion src/util/LRParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,9 @@ public <T> T put(int state, String symbol, T t) {
public <T> T get(int state, String symbol) {
return (T) get(new Key(state, symbol));
}
@SuppressWarnings("preview")
private int value(int state, String symbol) {
return switch (get(state, symbol)) { case null, default-> 0; case Integer i-> i; case Action a-> a.operand; };
return switch (get(state, symbol)) { case Integer i-> i; case Action a-> a.operand; case null, default-> 0; };
}
@Override
public String toString() {
Expand Down

0 comments on commit 36ef7be

Please sign in to comment.