-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #1: Added templates for project generation
- Loading branch information
Showing
51 changed files
with
759 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
group 'mvvmfx.intellij.plugin' | ||
version '1.0' | ||
|
||
apply plugin: 'java' | ||
|
||
sourceCompatibility = 1.8 | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
dependencies { | ||
compile group: 'de.saxsys', name: 'mvvmfx', version: '1.4.1' | ||
compile group: 'de.saxsys', name: 'mvvmfx-cdi', version: '1.4.1' | ||
} | ||
testCompile group: 'junit', name: 'junit', version: '4.11' | ||
} |
6 changes: 6 additions & 0 deletions
6
helloworld-cdi-gradle/gradle/wrapper/gradle-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#Wed Mar 16 13:52:51 CET 2016 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.5-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import de.saxsys.mvvmfx.FluentViewLoader; | ||
import de.saxsys.mvvmfx.ViewTuple; | ||
import de.saxsys.mvvmfx.cdi.MvvmfxCdiApplication; | ||
|
||
import javafx.scene.Parent; | ||
import javafx.scene.Scene; | ||
import javafx.stage.Stage; | ||
|
||
public class App extends MvvmfxCdiApplication { | ||
|
||
public static void main(String... args) { | ||
launch(args); | ||
} | ||
|
||
|
||
@Override | ||
public void startMvvmfx(Stage stage) throws Exception { | ||
stage.setTitle("Hello World Application"); | ||
|
||
ViewTuple<HelloWorldView, HelloWorldViewModel> viewTuple = FluentViewLoader.fxmlView(HelloWorldView.class) | ||
.load(); | ||
|
||
Parent root = viewTuple.getView(); | ||
stage.setScene(new Scene(root)); | ||
stage.show(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import de.saxsys.mvvmfx.FxmlView; | ||
import de.saxsys.mvvmfx.InjectViewModel; | ||
import javafx.fxml.FXML; | ||
import javafx.fxml.Initializable; | ||
import javafx.scene.control.Label; | ||
|
||
import java.net.URL; | ||
import java.util.ResourceBundle; | ||
|
||
public class HelloWorldView implements FxmlView<HelloWorldViewModel>, Initializable { | ||
|
||
@FXML | ||
private Label helloLabel; | ||
|
||
@InjectViewModel | ||
private HelloWorldViewModel viewModel; | ||
|
||
@Override | ||
public void initialize(URL location, ResourceBundle resources) { | ||
helloLabel.textProperty().bind(viewModel.helloMessage()); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
helloworld-cdi-gradle/src/main/java/HelloWorldViewModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import de.saxsys.mvvmfx.ViewModel; | ||
import javafx.beans.property.SimpleStringProperty; | ||
import javafx.beans.property.StringProperty; | ||
|
||
public class HelloWorldViewModel implements ViewModel { | ||
|
||
private StringProperty helloMessage = new SimpleStringProperty("Hello World"); | ||
|
||
public StringProperty helloMessage(){ | ||
return helloMessage; | ||
} | ||
|
||
public String getHelloMessage(){ | ||
return helloMessage.get(); | ||
} | ||
|
||
public void setHelloMessage(String message){ | ||
helloMessage.set(message); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
helloworld-cdi-gradle/src/main/resources/HelloWorldView.fxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?import javafx.geometry.Insets?> | ||
<?import javafx.scene.control.Label?> | ||
<?import javafx.scene.layout.VBox?> | ||
<VBox alignment="CENTER" xmlns:fx="http://javafx.com/fxml" prefWidth="600" prefHeight="400" | ||
fx:controller="HelloWorldView"> | ||
<children> | ||
<Label fx:id="helloLabel"/> | ||
</children> | ||
<padding> | ||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/> | ||
</padding> | ||
</VBox> |
21 changes: 21 additions & 0 deletions
21
helloworld-cdi-gradle/src/main/resources/META-INF/beans.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright 2013 Alexander Casall | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee | ||
http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd" | ||
bean-discovery-mode="all"> | ||
</beans> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>mvvmfx.intellij.plugin</groupId> | ||
<artifactId>helloworld-cdi-maven</artifactId> | ||
<version>1.0</version> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>de.saxsys</groupId> | ||
<artifactId>mvvmfx</artifactId> | ||
<version>1.4.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>de.saxsys</groupId> | ||
<artifactId>mvvmfx-cdi</artifactId> | ||
<version>1.4.1</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import de.saxsys.mvvmfx.FluentViewLoader; | ||
import de.saxsys.mvvmfx.ViewTuple; | ||
import de.saxsys.mvvmfx.cdi.MvvmfxCdiApplication; | ||
import javafx.application.Application; | ||
import javafx.scene.Parent; | ||
import javafx.scene.Scene; | ||
import javafx.stage.Stage; | ||
|
||
public class App extends MvvmfxCdiApplication { | ||
|
||
public static void main(String... args) { | ||
launch(args); | ||
} | ||
|
||
|
||
@Override | ||
public void startMvvmfx(Stage stage) throws Exception { | ||
stage.setTitle("Hello World Application"); | ||
|
||
ViewTuple<HelloWorldView, HelloWorldViewModel> viewTuple = FluentViewLoader.fxmlView(HelloWorldView.class) | ||
.load(); | ||
|
||
Parent root = viewTuple.getView(); | ||
stage.setScene(new Scene(root)); | ||
stage.show(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import de.saxsys.mvvmfx.FxmlView; | ||
import de.saxsys.mvvmfx.InjectViewModel; | ||
import javafx.fxml.FXML; | ||
import javafx.fxml.Initializable; | ||
import javafx.scene.control.Label; | ||
|
||
import java.net.URL; | ||
import java.util.ResourceBundle; | ||
|
||
public class HelloWorldView implements FxmlView<HelloWorldViewModel>, Initializable { | ||
|
||
@FXML | ||
private Label helloLabel; | ||
|
||
@InjectViewModel | ||
private HelloWorldViewModel viewModel; | ||
|
||
@Override | ||
public void initialize(URL location, ResourceBundle resources) { | ||
helloLabel.textProperty().bind(viewModel.helloMessage()); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
helloworld-cdi-maven/src/main/java/HelloWorldViewModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import de.saxsys.mvvmfx.ViewModel; | ||
import javafx.beans.property.SimpleStringProperty; | ||
import javafx.beans.property.StringProperty; | ||
|
||
public class HelloWorldViewModel implements ViewModel { | ||
|
||
private StringProperty helloMessage = new SimpleStringProperty("Hello World"); | ||
|
||
public StringProperty helloMessage(){ | ||
return helloMessage; | ||
} | ||
|
||
public String getHelloMessage(){ | ||
return helloMessage.get(); | ||
} | ||
|
||
public void setHelloMessage(String message){ | ||
helloMessage.set(message); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
helloworld-cdi-maven/src/main/resources/HelloWorldView.fxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?import javafx.geometry.Insets?> | ||
<?import javafx.scene.control.Label?> | ||
<?import javafx.scene.layout.VBox?> | ||
<VBox alignment="CENTER" xmlns:fx="http://javafx.com/fxml" prefWidth="600" prefHeight="400" | ||
fx:controller="HelloWorldView"> | ||
<children> | ||
<Label fx:id="helloLabel"/> | ||
</children> | ||
<padding> | ||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/> | ||
</padding> | ||
</VBox> |
21 changes: 21 additions & 0 deletions
21
helloworld-cdi-maven/src/main/resources/META-INF/beans.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright 2013 Alexander Casall | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee | ||
http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd" | ||
bean-discovery-mode="all"> | ||
</beans> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
group 'mvvmfx.intellij.plugin' | ||
version '1.0' | ||
|
||
apply plugin: 'java' | ||
|
||
sourceCompatibility = 1.8 | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
dependencies { | ||
compile group: 'de.saxsys', name: 'mvvmfx', version: '1.4.1' | ||
} | ||
testCompile group: 'junit', name: 'junit', version: '4.11' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#Wed Mar 16 11:14:01 CET 2016 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.5-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import de.saxsys.mvvmfx.FluentViewLoader; | ||
import de.saxsys.mvvmfx.ViewTuple; | ||
import javafx.application.Application; | ||
import javafx.scene.Parent; | ||
import javafx.scene.Scene; | ||
import javafx.stage.Stage; | ||
|
||
public class App extends Application { | ||
|
||
public static void main(String... args) { | ||
launch(args); | ||
} | ||
|
||
|
||
@Override | ||
public void start(Stage stage) throws Exception { | ||
stage.setTitle("Hello World Application"); | ||
|
||
ViewTuple<HelloWorldView, HelloWorldViewModel> viewTuple = FluentViewLoader.fxmlView(HelloWorldView.class) | ||
.load(); | ||
|
||
Parent root = viewTuple.getView(); | ||
stage.setScene(new Scene(root)); | ||
stage.show(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import de.saxsys.mvvmfx.FxmlView; | ||
import de.saxsys.mvvmfx.InjectViewModel; | ||
import javafx.fxml.FXML; | ||
import javafx.fxml.Initializable; | ||
import javafx.scene.control.Label; | ||
|
||
import java.net.URL; | ||
import java.util.ResourceBundle; | ||
|
||
public class HelloWorldView implements FxmlView<HelloWorldViewModel>, Initializable { | ||
|
||
@FXML | ||
private Label helloLabel; | ||
|
||
@InjectViewModel | ||
private HelloWorldViewModel viewModel; | ||
|
||
@Override | ||
public void initialize(URL location, ResourceBundle resources) { | ||
helloLabel.textProperty().bind(viewModel.helloMessage()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import de.saxsys.mvvmfx.ViewModel; | ||
import javafx.beans.property.SimpleStringProperty; | ||
import javafx.beans.property.StringProperty; | ||
|
||
public class HelloWorldViewModel implements ViewModel { | ||
|
||
private StringProperty helloMessage = new SimpleStringProperty("Hello World"); | ||
|
||
public StringProperty helloMessage(){ | ||
return helloMessage; | ||
} | ||
|
||
public String getHelloMessage(){ | ||
return helloMessage.get(); | ||
} | ||
|
||
public void setHelloMessage(String message){ | ||
helloMessage.set(message); | ||
} | ||
} |
Oops, something went wrong.