properly configured maven plugin

This commit is contained in:
Sem van der Hoeven
2019-12-27 20:55:01 +01:00
parent 2c3b5f2487
commit a9213d6169
7 changed files with 42 additions and 19 deletions

View File

@@ -31,6 +31,11 @@
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>

View File

@@ -5,5 +5,5 @@ org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.processAnnotations=disabled
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8

View File

@@ -42,7 +42,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>8</release> <!--or <release>10</release>-->
<source>1.8</source>
<target>1.8</target> <!--or <release>10</release>-->
</configuration>
</plugin>
<plugin>

View File

@@ -0,0 +1,21 @@
package brainfuck.gui;
import javafx.fxml.FXML;
import javafx.scene.control.Menu;
import javafx.scene.control.MenuBar;
import javafx.scene.control.MenuItem;
public class Controller {
@FXML
MenuBar menuBar;
@FXML
MenuItem saveMenu;
public void initialize() {
saveMenu.setOnAction(e -> {
System.out.println("menu clicked");
});
}
}

View File

@@ -1,5 +0,0 @@
package brainfuck.interpreter;
public class Controller {
}

View File

@@ -18,14 +18,6 @@ public class Main extends Application {
public static void main(String[] args) {
String excl = ">,[[----------[ >>>[>>>>]+[[-]+<[->>>>++>>>>+[>>>>]++[->+<<<<<]]<<<] ++++++[>------<-]>--[>>[->>>>]+>+[<<<<]>-],< ]> ]>>>++>+>>[ <<[>>>>[-]+++++++++<[>-<-]+++++++++>[-[<->-]+[<<<<]]<[>+<-]>] >[>[>>>>]+[[-]<[+[->>>>]>+<]>[<+>[<<<<]]+<<<<]>>>[->>>>]+>+[<<<<]] >[[>+>>[<<<<+>>>>-]>]<<<<[-]>[-<<<<]]>>>>>>> ]>>+[[-]++++++>>>>]<<<<[[<++++++++>-]<.[-]<[-]<[-]<]<, ]";
launch(Main.class);
// try {
// BfInterpreter interpreter = new BfInterpreter(",.");
// interpreter.setCodeFromFile("mandelbrot-tiny.bf");
// interpreter.interpret();
// // interpreter.interpretAgain(excl);
// } catch (Exception e) {
// e.printStackTrace();
// }
}
@@ -33,6 +25,7 @@ public class Main extends Application {
public void start(Stage stage) throws Exception {
Parent pane = FXMLLoader.load(getClass().getResource("/fxml/layout.fxml"));
Scene scene = new Scene(pane);
stage.setTitle("Brainfuck Interpreter");
stage.setScene(scene);
stage.show();

View File

@@ -6,9 +6,17 @@
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
fx:controller="brainfuck.interpreter.Controller"
prefHeight="400.0" prefWidth="600.0">
<AnchorPane prefHeight="800.0" prefWidth="1200.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="brainfuck.gui.Controller">
<children>
<MenuBar fx:id="menuBar" layoutY="2.0">
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem fx:id="saveMenu" mnemonicParsing="false" text="Save" />
</items>
</Menu>
</menus>
</MenuBar>
</children>
</AnchorPane>