You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by jt...@apache.org on 2018/04/17 05:36:17 UTC
[incubator-netbeans] branch master updated: don't create moe
project unless selected (#498)
This is an automated email from the ASF dual-hosted git repository.
jtulach pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new 4eb6d46 don't create moe project unless selected (#498)
4eb6d46 is described below
commit 4eb6d46c0c5fde828fa67ceab0bb274ac02be905
Author: Duke Script <du...@eppleton.de>
AuthorDate: Tue Apr 17 07:36:15 2018 +0200
don't create moe project unless selected (#498)
---
.../modules/maven/htmlui/DukeScriptWizard.java | 25 +++++++---
.../modules/maven/htmlui/WizardDataTest.java | 57 ++++++++++++++++++++++
2 files changed, 74 insertions(+), 8 deletions(-)
diff --git a/maven.htmlui/src/org/netbeans/modules/maven/htmlui/DukeScriptWizard.java b/maven.htmlui/src/org/netbeans/modules/maven/htmlui/DukeScriptWizard.java
index 809188f..7b3fdea 100644
--- a/maven.htmlui/src/org/netbeans/modules/maven/htmlui/DukeScriptWizard.java
+++ b/maven.htmlui/src/org/netbeans/modules/maven/htmlui/DukeScriptWizard.java
@@ -55,7 +55,6 @@ import org.openide.util.RequestProcessor;
@Property(name = "nbInstallationDefined", type = boolean.class),
})
public class DukeScriptWizard {
-
@TemplateRegistration(
position = 133,
page = "dukeScriptWizard.html",
@@ -65,6 +64,7 @@ public class DukeScriptWizard {
iconBase = "org/netbeans/modules/maven/htmlui/DukeHTML.png",
description = "description.html"
)
+
@Messages("DukeScriptWizard_displayName=Java Frontend Application")
public static WizardData javafxWebViewAppWizard() {
WizardData data = new WizardData();
@@ -95,7 +95,7 @@ public class DukeScriptWizard {
"knockout4j-archetype",
"com.dukescript.archetype",
true,
- "0.20",
+ "0.23",
"Basic DukeScript Template", "Default skeletal application",
null
);
@@ -105,11 +105,20 @@ public class DukeScriptWizard {
"crud4j-archetype",
"com.dukescript.archetype",
false,
- "0.20",
+ "0.23",
"DukeScript CRUD Template", "Client-Server Application demonstrating communication and reuse of DataModels",
null
);
data.getArchetypes().add(crudArch);
+ final ArchetypeData visArch = new ArchetypeData(
+ "visual-archetype",
+ "com.dukescript.archetype",
+ false,
+ "0.23",
+ "DukeScript Visual Archetype", "A sample application demonstrating Canvas, Charts & Maps",
+ null
+ );
+ data.getArchetypes().add(visArch);
data.setIosMoe(true);
String srvPath = Boolean.getBoolean("staging.archetypes") ? "stage" : "archetypes";
data.loadArchetypes(srvPath);
@@ -156,15 +165,15 @@ public class DukeScriptWizard {
}
@ComputedProperty
- static String iospath(boolean iosRoboVM) {
- return iosRoboVM ? "client-ios" : null;
+ static String iospath(boolean ios, boolean iosRoboVM) {
+ return ios && iosRoboVM ? "client-ios" : null;
}
@ComputedProperty
- static String moepath(boolean iosMoe) {
- return iosMoe ? "client-moe" : null;
+ static String moepath(boolean ios, boolean iosMoe) {
+ return ios && iosMoe ? "client-moe" : null;
}
-
+
@ComputedProperty
static String netbeanspath(boolean netbeans) {
return netbeans ? "client-netbeans" : null;
diff --git a/maven.htmlui/test/unit/src/org/netbeans/modules/maven/htmlui/WizardDataTest.java b/maven.htmlui/test/unit/src/org/netbeans/modules/maven/htmlui/WizardDataTest.java
new file mode 100644
index 0000000..56aeed7
--- /dev/null
+++ b/maven.htmlui/test/unit/src/org/netbeans/modules/maven/htmlui/WizardDataTest.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+package org.netbeans.modules.maven.htmlui;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import org.junit.Before;
+import org.junit.Test;
+
+public class WizardDataTest {
+ private WizardData wd;
+
+ @Before
+ public void setupModel() {
+ wd = new WizardData();
+ wd.setIosMoe(false);
+ wd.setIos(false);
+ wd.setIosRoboVM(false);
+ }
+
+
+ @Test
+ public void moeOnlyEnabledIfIosEnabled() {
+ assertNull("No moe path", wd.getMoepath());
+ wd.setIosMoe(true);
+ assertNull("No moe path yet", wd.getMoepath());
+ wd.setIos(true);
+ assertEquals("Now moe is enabled", "client-moe", wd.getMoepath());
+ assertNull("no robovm", wd.getIospath());
+ }
+
+ @Test
+ public void robovmOnlyEnabledIfIosEnabled() {
+ wd.setIosRoboVM(true);
+ wd.setIos(false);
+ assertNull("No robovm path", wd.getIospath());
+ wd.setIos(true);
+ assertEquals("Now robovm is enabled", "client-ios", wd.getIospath());
+ assertNull("No moe path", wd.getMoepath());
+ }
+}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
jtulach@apache.org.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists