Moved into Maven repository: https://hg.netbeans.org/html4j/nb/rev/979e72c8b55e
1.1 --- a/project.htmljava/build.xml Wed May 21 14:42:59 2014 +0200
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,6 +0,0 @@
1.4 -<?xml version="1.0" encoding="UTF-8"?>
1.5 -<project basedir="." default="netbeans" name="contrib/project.htmljava">
1.6 - <description>Builds, tests, and runs the project org.netbeans.modules.project.htmljava
1.7 -</description>
1.8 - <import file="../../nbbuild/templates/projectized.xml"/>
1.9 -</project>
2.1 --- a/project.htmljava/manifest.mf Wed May 21 14:42:59 2014 +0200
2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2.3 @@ -1,7 +0,0 @@
2.4 -Manifest-Version: 1.0
2.5 -AutoUpdate-Show-In-Client: true
2.6 -OpenIDE-Module: org.netbeans.modules.project.htmljava
2.7 -OpenIDE-Module-Layer: org/netbeans/modules/project/htmljava/layer.xml
2.8 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/htmljava/Bundle.properties
2.9 -OpenIDE-Module-Specification-Version: 1.3
2.10 -
3.1 --- a/project.htmljava/nbproject/project.properties Wed May 21 14:42:59 2014 +0200
3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
3.3 @@ -1,4 +0,0 @@
3.4 -javac.source=1.7
3.5 -javac.compilerargs=-Xlint -Xlint:-serial
3.6 -nbm.homepage=http://bck2brwsr.apidesign.org
3.7 -nbm.module.author=Jaroslav Tulach
4.1 --- a/project.htmljava/nbproject/project.xml Wed May 21 14:42:59 2014 +0200
4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
4.3 @@ -1,97 +0,0 @@
4.4 -<?xml version="1.0" encoding="UTF-8"?>
4.5 -<project xmlns="http://www.netbeans.org/ns/project/1">
4.6 - <type>org.netbeans.modules.apisupport.project</type>
4.7 - <configuration>
4.8 - <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
4.9 - <code-name-base>org.netbeans.modules.project.htmljava</code-name-base>
4.10 - <module-dependencies>
4.11 - <dependency>
4.12 - <code-name-base>org.netbeans.modules.debugger.jpda.kit</code-name-base>
4.13 - <run-dependency>
4.14 - <specification-version>1.9</specification-version>
4.15 - </run-dependency>
4.16 - </dependency>
4.17 - <dependency>
4.18 - <code-name-base>org.netbeans.modules.ko4j.debugging</code-name-base>
4.19 - <run-dependency>
4.20 - <specification-version>0.3</specification-version>
4.21 - </run-dependency>
4.22 - </dependency>
4.23 - <dependency>
4.24 - <code-name-base>org.netbeans.modules.maven.j2ee</code-name-base>
4.25 - <run-dependency>
4.26 - <release-version>1</release-version>
4.27 - <specification-version>1.48</specification-version>
4.28 - </run-dependency>
4.29 - </dependency>
4.30 - <dependency>
4.31 - <code-name-base>org.netbeans.modules.projectapi</code-name-base>
4.32 - <build-prerequisite/>
4.33 - <compile-dependency/>
4.34 - <run-dependency>
4.35 - <release-version>1</release-version>
4.36 - <specification-version>1.54</specification-version>
4.37 - </run-dependency>
4.38 - </dependency>
4.39 - <dependency>
4.40 - <code-name-base>org.netbeans.modules.projectuiapi</code-name-base>
4.41 - <build-prerequisite/>
4.42 - <compile-dependency/>
4.43 - <run-dependency>
4.44 - <release-version>1</release-version>
4.45 - <specification-version>1.72</specification-version>
4.46 - </run-dependency>
4.47 - </dependency>
4.48 - <dependency>
4.49 - <code-name-base>org.openide.awt</code-name-base>
4.50 - <build-prerequisite/>
4.51 - <compile-dependency/>
4.52 - <run-dependency>
4.53 - <specification-version>7.59</specification-version>
4.54 - </run-dependency>
4.55 - </dependency>
4.56 - <dependency>
4.57 - <code-name-base>org.openide.dialogs</code-name-base>
4.58 - <build-prerequisite/>
4.59 - <compile-dependency/>
4.60 - <run-dependency>
4.61 - <specification-version>7.32</specification-version>
4.62 - </run-dependency>
4.63 - </dependency>
4.64 - <dependency>
4.65 - <code-name-base>org.openide.filesystems</code-name-base>
4.66 - <build-prerequisite/>
4.67 - <compile-dependency/>
4.68 - <run-dependency>
4.69 - <specification-version>8.8</specification-version>
4.70 - </run-dependency>
4.71 - </dependency>
4.72 - <dependency>
4.73 - <code-name-base>org.openide.loaders</code-name-base>
4.74 - <build-prerequisite/>
4.75 - <compile-dependency/>
4.76 - <run-dependency>
4.77 - <specification-version>7.50</specification-version>
4.78 - </run-dependency>
4.79 - </dependency>
4.80 - <dependency>
4.81 - <code-name-base>org.openide.util</code-name-base>
4.82 - <build-prerequisite/>
4.83 - <compile-dependency/>
4.84 - <run-dependency>
4.85 - <specification-version>8.33</specification-version>
4.86 - </run-dependency>
4.87 - </dependency>
4.88 - <dependency>
4.89 - <code-name-base>org.openide.util.lookup</code-name-base>
4.90 - <build-prerequisite/>
4.91 - <compile-dependency/>
4.92 - <run-dependency>
4.93 - <specification-version>8.22</specification-version>
4.94 - </run-dependency>
4.95 - </dependency>
4.96 - </module-dependencies>
4.97 - <public-packages/>
4.98 - </data>
4.99 - </configuration>
4.100 -</project>
5.1 --- a/project.htmljava/src/org/netbeans/modules/project/htmljava/Bundle.properties Wed May 21 14:42:59 2014 +0200
5.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
5.3 @@ -1,66 +0,0 @@
5.4 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
5.5 -#
5.6 -# Copyright 2010 Oracle and/or its affiliates. All rights reserved.
5.7 -#
5.8 -# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
5.9 -# Other names may be trademarks of their respective owners.
5.10 -#
5.11 -# The contents of this file are subject to the terms of either the GNU
5.12 -# General Public License Version 2 only ("GPL") or the Common
5.13 -# Development and Distribution License("CDDL") (collectively, the
5.14 -# "License"). You may not use this file except in compliance with the
5.15 -# License. You can obtain a copy of the License at
5.16 -# http://www.netbeans.org/cddl-gplv2.html
5.17 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
5.18 -# specific language governing permissions and limitations under the
5.19 -# License. When distributing the software, include this License Header
5.20 -# Notice in each file and include the License file at
5.21 -# nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
5.22 -# particular file as subject to the "Classpath" exception as provided
5.23 -# by Oracle in the GPL Version 2 section of the License file that
5.24 -# accompanied this code. If applicable, add the following below the
5.25 -# License Header, with the fields enclosed by brackets [] replaced by
5.26 -# your own identifying information:
5.27 -# "Portions Copyrighted [year] [name of copyright owner]"
5.28 -#
5.29 -# If you wish your version of this file to be governed by only the CDDL
5.30 -# or only the GPL Version 2, indicate your decision by adding
5.31 -# "[Contributor] elects to include this software in this distribution
5.32 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
5.33 -# single choice of license, a recipient has the option to distribute
5.34 -# your version of this file under either the CDDL, the GPL Version 2 or
5.35 -# to extend the choice of license to its licensees as provided above.
5.36 -# However, if you add GPL Version 2 code and therefore, elected the GPL
5.37 -# Version 2 license, then the option applies only if the new code is
5.38 -# made subject to such option by the copyright holder.
5.39 -#
5.40 -# Contributor(s):
5.41 -#
5.42 -# Portions Copyrighted 2008 Sun Microsystems, Inc.
5.43 -
5.44 -OpenIDE-Module-Display-Category=HTML5
5.45 -OpenIDE-Module-Long-Description=\
5.46 - Write your application UI in HTML5 with Knockout bindings. \
5.47 - Design your application logic in Java using powerful compile time annotation like @Model and @Property. \
5.48 - Deploy as desktop Java application or (with the help of bck2brwsr virtual machine) as static HTML web site that can be executed in any modern browser (even without Java plugin).\n\n\
5.49 - Use additional APIs for accessing sound, geolocation and REST or WebSocket communication.
5.50 -OpenIDE-Module-Name=HTML/Java Project Support
5.51 -LBL_CreateProjectStep=Name and Location
5.52 -HjPanelVisual.projectNameLabel.text=Project &Name:
5.53 -HjPanelVisual.projectLocationLabel.text=Project &Location:
5.54 -HjPanelVisual.browseButton.text=Br&owse...
5.55 -HjPanelVisual.createdFolderLabel.text=Project &Folder:
5.56 -HjPanelVisual.packageNameLabel.text=&Package Name
5.57 -HjPanelVisual.artifactIdLabel.text=artifactId
5.58 -HjPanelVisual.groupIdLabel.text=groupId
5.59 -
5.60 -HTMLJavaFolder=HTML5
5.61 -Hj_displayName=HTML5 with Java Application Logic
5.62 -OpenIDE-Module-Short-Description=Skeleton project to develop HTML5 client applications with logic written in Java
5.63 -SELECT\ PROJECT\ LOCATION=Select Project Location
5.64 -PROJECT\ NAME\ IS\ NOT\ A\ VALID\ FOLDER\ NAME.=Project Name is not a valid folder name.
5.65 -PROJECT\ FOLDER\ IS\ NOT\ A\ VALID\ PATH.=Project Folder is not a valid path.
5.66 -PROJECT\ FOLDER\ CANNOT\ BE\ CREATED.=Project Folder cannot be created.
5.67 -PROJECT\ FOLDER\ ALREADY\ EXISTS\ AND\ IS\ NOT\ EMPTY.=Project Folder already exists and is not empty.
5.68 -ENTER\ PACKAGE\ WITH\ AT\ LEAST\ ONE\ DOT=Enter package with at least one dot
5.69 -PACKAGE\ NAME\ IS\ NOT\ VALID\ JAVA\ INDENTIFICATOR=Package name is not valid Java indentificator
6.1 Binary file project.htmljava/src/org/netbeans/modules/project/htmljava/Hj.png has changed
7.1 --- a/project.htmljava/src/org/netbeans/modules/project/htmljava/HjDescription.html Wed May 21 14:42:59 2014 +0200
7.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
7.3 @@ -1,50 +0,0 @@
7.4 -<!--
7.5 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
7.6 -
7.7 -Copyright 2013 Oracle and/or its affiliates. All rights reserved.
7.8 -
7.9 -Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7.10 -Other names may be trademarks of their respective owners.
7.11 -
7.12 -The contents of this file are subject to the terms of either the GNU
7.13 -General Public License Version 2 only ("GPL") or the Common
7.14 -Development and Distribution License("CDDL") (collectively, the
7.15 -"License"). You may not use this file except in compliance with the
7.16 -License. You can obtain a copy of the License at
7.17 -http://www.netbeans.org/cddl-gplv2.html
7.18 -or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
7.19 -specific language governing permissions and limitations under the
7.20 -License. When distributing the software, include this License Header
7.21 -Notice in each file and include the License file at
7.22 -nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
7.23 -particular file as subject to the "Classpath" exception as provided
7.24 -by Oracle in the GPL Version 2 section of the License file that
7.25 -accompanied this code. If applicable, add the following below the
7.26 -License Header, with the fields enclosed by brackets [] replaced by
7.27 -your own identifying information:
7.28 -"Portions Copyrighted [year] [name of copyright owner]"
7.29 -
7.30 -If you wish your version of this file to be governed by only the CDDL
7.31 -or only the GPL Version 2, indicate your decision by adding
7.32 -"[Contributor] elects to include this software in this distribution
7.33 -under the [CDDL or GPL Version 2] license." If you do not indicate a
7.34 -single choice of license, a recipient has the option to distribute
7.35 -your version of this file under either the CDDL, the GPL Version 2 or
7.36 -to extend the choice of license to its licensees as provided above.
7.37 -However, if you add GPL Version 2 code and therefore, elected the GPL
7.38 -Version 2 license, then the option applies only if the new code is
7.39 -made subject to such option by the copyright holder.
7.40 -
7.41 -Contributor(s):
7.42 -
7.43 -Portions Copyrighted 2013 Sun Microsystems, Inc.
7.44 --->
7.45 -<html>
7.46 - <head>
7.47 - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7.48 - </head>
7.49 - <body>
7.50 - Use Java as your programming language. Render via HTML. Deploy
7.51 - any browser (even without Java enabled).
7.52 - </body>
7.53 -</html>
8.1 --- a/project.htmljava/src/org/netbeans/modules/project/htmljava/HjPanelVisual.form Wed May 21 14:42:59 2014 +0200
8.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
8.3 @@ -1,190 +0,0 @@
8.4 -<?xml version="1.0" encoding="UTF-8" ?>
8.5 -
8.6 -<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
8.7 - <AuxValues>
8.8 - <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
8.9 - <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
8.10 - <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
8.11 - <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
8.12 - <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
8.13 - <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
8.14 - <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="1"/>
8.15 - <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
8.16 - <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
8.17 - </AuxValues>
8.18 -
8.19 - <Layout>
8.20 - <DimensionLayout dim="0">
8.21 - <Group type="103" groupAlignment="0" attributes="0">
8.22 - <Group type="102" attributes="0">
8.23 - <EmptySpace max="-2" attributes="0"/>
8.24 - <Group type="103" groupAlignment="0" attributes="0">
8.25 - <Component id="projectNameLabel" alignment="0" min="-2" max="-2" attributes="0"/>
8.26 - <Component id="projectLocationLabel" alignment="0" min="-2" max="-2" attributes="0"/>
8.27 - <Component id="createdFolderLabel" alignment="0" min="-2" max="-2" attributes="0"/>
8.28 - <Component id="packageNameLabel" alignment="0" min="-2" max="-2" attributes="0"/>
8.29 - <Component id="groupIdLabel" alignment="0" min="-2" max="-2" attributes="0"/>
8.30 - <Component id="artifactIdLabel" alignment="0" min="-2" max="-2" attributes="0"/>
8.31 - </Group>
8.32 - <EmptySpace max="-2" attributes="0"/>
8.33 - <Group type="103" groupAlignment="0" attributes="0">
8.34 - <Component id="projectNameTextField" alignment="1" pref="191" max="32767" attributes="0"/>
8.35 - <Component id="projectLocationTextField" alignment="1" pref="191" max="32767" attributes="0"/>
8.36 - <Component id="createdFolderTextField" alignment="1" pref="191" max="32767" attributes="0"/>
8.37 - <Component id="packageNameTextField" max="32767" attributes="0"/>
8.38 - <Component id="groupIdTextField" max="32767" attributes="0"/>
8.39 - <Component id="artifactIdTextField" max="32767" attributes="0"/>
8.40 - </Group>
8.41 - <EmptySpace min="-2" max="-2" attributes="0"/>
8.42 - <Component id="browseButton" min="-2" max="-2" attributes="0"/>
8.43 - <EmptySpace max="-2" attributes="0"/>
8.44 - </Group>
8.45 - </Group>
8.46 - </DimensionLayout>
8.47 - <DimensionLayout dim="1">
8.48 - <Group type="103" groupAlignment="0" attributes="0">
8.49 - <Group type="102" attributes="0">
8.50 - <EmptySpace max="-2" attributes="0"/>
8.51 - <Group type="103" groupAlignment="3" attributes="0">
8.52 - <Component id="projectNameLabel" alignment="3" min="-2" max="-2" attributes="0"/>
8.53 - <Component id="projectNameTextField" alignment="3" min="-2" max="-2" attributes="0"/>
8.54 - </Group>
8.55 - <EmptySpace max="-2" attributes="0"/>
8.56 - <Group type="103" groupAlignment="3" attributes="0">
8.57 - <Component id="projectLocationLabel" alignment="3" min="-2" max="-2" attributes="0"/>
8.58 - <Component id="projectLocationTextField" alignment="3" min="-2" max="-2" attributes="0"/>
8.59 - <Component id="browseButton" alignment="3" min="-2" max="-2" attributes="0"/>
8.60 - </Group>
8.61 - <EmptySpace max="-2" attributes="0"/>
8.62 - <Group type="103" groupAlignment="0" max="-2" attributes="0">
8.63 - <Component id="createdFolderTextField" min="-2" max="-2" attributes="0"/>
8.64 - <Group type="102" attributes="0">
8.65 - <Component id="createdFolderLabel" max="32767" attributes="0"/>
8.66 - <EmptySpace min="2" pref="2" max="-2" attributes="0"/>
8.67 - </Group>
8.68 - </Group>
8.69 - <Group type="103" groupAlignment="3" attributes="0">
8.70 - <Component id="packageNameLabel" alignment="3" min="-2" max="-2" attributes="0"/>
8.71 - <Component id="packageNameTextField" alignment="3" min="-2" max="-2" attributes="0"/>
8.72 - </Group>
8.73 - <EmptySpace max="-2" attributes="0"/>
8.74 - <Group type="103" groupAlignment="0" max="-2" attributes="0">
8.75 - <Component id="groupIdTextField" alignment="0" min="-2" max="-2" attributes="0"/>
8.76 - <Component id="groupIdLabel" alignment="0" min="-2" pref="17" max="-2" attributes="0"/>
8.77 - </Group>
8.78 - <EmptySpace max="-2" attributes="0"/>
8.79 - <Group type="103" groupAlignment="0" max="-2" attributes="0">
8.80 - <Component id="artifactIdTextField" alignment="0" min="-2" max="-2" attributes="0"/>
8.81 - <Component id="artifactIdLabel" alignment="0" min="-2" pref="17" max="-2" attributes="0"/>
8.82 - </Group>
8.83 - <EmptySpace pref="144" max="32767" attributes="0"/>
8.84 - </Group>
8.85 - </Group>
8.86 - </DimensionLayout>
8.87 - </Layout>
8.88 - <SubComponents>
8.89 - <Component class="javax.swing.JLabel" name="projectNameLabel">
8.90 - <Properties>
8.91 - <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
8.92 - <ComponentRef name="projectNameTextField"/>
8.93 - </Property>
8.94 - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
8.95 - <ResourceString bundle="org/netbeans/modules/project/htmljava/Bundle.properties" key="HjPanelVisual.projectNameLabel.text" replaceFormat="getMessage("{key}")"/>
8.96 - </Property>
8.97 - </Properties>
8.98 - <AuxValues>
8.99 - <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
8.100 - </AuxValues>
8.101 - </Component>
8.102 - <Component class="javax.swing.JTextField" name="projectNameTextField">
8.103 - </Component>
8.104 - <Component class="javax.swing.JLabel" name="projectLocationLabel">
8.105 - <Properties>
8.106 - <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
8.107 - <ComponentRef name="projectLocationTextField"/>
8.108 - </Property>
8.109 - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
8.110 - <ResourceString bundle="org/netbeans/modules/project/htmljava/Bundle.properties" key="HjPanelVisual.projectLocationLabel.text" replaceFormat="getMessage("{key}")"/>
8.111 - </Property>
8.112 - </Properties>
8.113 - <AuxValues>
8.114 - <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
8.115 - </AuxValues>
8.116 - </Component>
8.117 - <Component class="javax.swing.JTextField" name="projectLocationTextField">
8.118 - </Component>
8.119 - <Component class="javax.swing.JButton" name="browseButton">
8.120 - <Properties>
8.121 - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
8.122 - <ResourceString bundle="org/netbeans/modules/project/htmljava/Bundle.properties" key="HjPanelVisual.browseButton.text" replaceFormat="getMessage("{key}")"/>
8.123 - </Property>
8.124 - <Property name="actionCommand" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
8.125 - <ResourceString bundle="org/netbeans/modules/project/ios/Bundle.properties" key="" replaceFormat="getMessage("{key}")"/>
8.126 - </Property>
8.127 - </Properties>
8.128 - <Events>
8.129 - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="browseButtonActionPerformed"/>
8.130 - </Events>
8.131 - </Component>
8.132 - <Component class="javax.swing.JLabel" name="createdFolderLabel">
8.133 - <Properties>
8.134 - <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
8.135 - <ComponentRef name="createdFolderTextField"/>
8.136 - </Property>
8.137 - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
8.138 - <ResourceString bundle="org/netbeans/modules/project/htmljava/Bundle.properties" key="HjPanelVisual.createdFolderLabel.text" replaceFormat="getMessage("{key}")"/>
8.139 - </Property>
8.140 - </Properties>
8.141 - </Component>
8.142 - <Component class="javax.swing.JTextField" name="createdFolderTextField">
8.143 - <Properties>
8.144 - <Property name="editable" type="boolean" value="false"/>
8.145 - </Properties>
8.146 - </Component>
8.147 - <Component class="javax.swing.JLabel" name="packageNameLabel">
8.148 - <Properties>
8.149 - <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
8.150 - <ComponentRef name="projectNameTextField"/>
8.151 - </Property>
8.152 - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
8.153 - <ResourceString bundle="org/netbeans/modules/project/htmljava/Bundle.properties" key="HjPanelVisual.packageNameLabel.text" replaceFormat="getMessage("{key}")"/>
8.154 - </Property>
8.155 - </Properties>
8.156 - <AuxValues>
8.157 - <AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
8.158 - </AuxValues>
8.159 - </Component>
8.160 - <Component class="javax.swing.JTextField" name="packageNameTextField">
8.161 - </Component>
8.162 - <Component class="javax.swing.JLabel" name="groupIdLabel">
8.163 - <Properties>
8.164 - <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
8.165 - <ComponentRef name="createdFolderTextField"/>
8.166 - </Property>
8.167 - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
8.168 - <ResourceString bundle="org/netbeans/modules/project/htmljava/Bundle.properties" key="HjPanelVisual.groupIdLabel.text" replaceFormat="getMessage("{key}")"/>
8.169 - </Property>
8.170 - </Properties>
8.171 - </Component>
8.172 - <Component class="javax.swing.JTextField" name="groupIdTextField">
8.173 - <Properties>
8.174 - <Property name="editable" type="boolean" value="false"/>
8.175 - </Properties>
8.176 - </Component>
8.177 - <Component class="javax.swing.JTextField" name="artifactIdTextField">
8.178 - <Properties>
8.179 - <Property name="editable" type="boolean" value="false"/>
8.180 - </Properties>
8.181 - </Component>
8.182 - <Component class="javax.swing.JLabel" name="artifactIdLabel">
8.183 - <Properties>
8.184 - <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
8.185 - <ComponentRef name="createdFolderTextField"/>
8.186 - </Property>
8.187 - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
8.188 - <ResourceString bundle="org/netbeans/modules/project/htmljava/Bundle.properties" key="HjPanelVisual.artifactIdLabel.text" replaceFormat="getMessage("{key}")"/>
8.189 - </Property>
8.190 - </Properties>
8.191 - </Component>
8.192 - </SubComponents>
8.193 -</Form>
9.1 --- a/project.htmljava/src/org/netbeans/modules/project/htmljava/HjPanelVisual.java Wed May 21 14:42:59 2014 +0200
9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
9.3 @@ -1,414 +0,0 @@
9.4 -/*
9.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
9.6 - *
9.7 - * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
9.8 - *
9.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
9.10 - * Other names may be trademarks of their respective owners.
9.11 - *
9.12 - * The contents of this file are subject to the terms of either the GNU
9.13 - * General Public License Version 2 only ("GPL") or the Common
9.14 - * Development and Distribution License("CDDL") (collectively, the
9.15 - * "License"). You may not use this file except in compliance with the
9.16 - * License. You can obtain a copy of the License at
9.17 - * http://www.netbeans.org/cddl-gplv2.html
9.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
9.19 - * specific language governing permissions and limitations under the
9.20 - * License. When distributing the software, include this License Header
9.21 - * Notice in each file and include the License file at
9.22 - * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
9.23 - * particular file as subject to the "Classpath" exception as provided
9.24 - * by Oracle in the GPL Version 2 section of the License file that
9.25 - * accompanied this code. If applicable, add the following below the
9.26 - * License Header, with the fields enclosed by brackets [] replaced by
9.27 - * your own identifying information:
9.28 - * "Portions Copyrighted [year] [name of copyright owner]"
9.29 - *
9.30 - * If you wish your version of this file to be governed by only the CDDL
9.31 - * or only the GPL Version 2, indicate your decision by adding
9.32 - * "[Contributor] elects to include this software in this distribution
9.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
9.34 - * single choice of license, a recipient has the option to distribute
9.35 - * your version of this file under either the CDDL, the GPL Version 2 or
9.36 - * to extend the choice of license to its licensees as provided above.
9.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
9.38 - * Version 2 license, then the option applies only if the new code is
9.39 - * made subject to such option by the copyright holder.
9.40 - *
9.41 - * Contributor(s):
9.42 - *
9.43 - * Portions Copyrighted 2013 Sun Microsystems, Inc.
9.44 - */
9.45 -package org.netbeans.modules.project.htmljava;
9.46 -
9.47 -import java.io.File;
9.48 -import java.util.StringTokenizer;
9.49 -import javax.swing.JFileChooser;
9.50 -import javax.swing.JPanel;
9.51 -import javax.swing.event.DocumentEvent;
9.52 -import javax.swing.event.DocumentListener;
9.53 -import javax.swing.text.Document;
9.54 -import org.netbeans.spi.project.ui.support.ProjectChooser;
9.55 -import org.openide.WizardDescriptor;
9.56 -import org.openide.WizardValidationException;
9.57 -import org.openide.filesystems.FileUtil;
9.58 -import org.openide.util.NbBundle;
9.59 -import org.openide.util.Utilities;
9.60 -
9.61 -public class HjPanelVisual extends JPanel implements DocumentListener {
9.62 -
9.63 - public static final String PROP_PROJECT_NAME = "projectName"; //NOI18N
9.64 -
9.65 - private HjWizardPanel panel;
9.66 -
9.67 - public HjPanelVisual(HjWizardPanel panel) {
9.68 - initComponents();
9.69 - this.panel = panel;
9.70 - // Register listener on the textFields to make the automatic updates
9.71 - projectNameTextField.getDocument().addDocumentListener(this);
9.72 - projectLocationTextField.getDocument().addDocumentListener(this);
9.73 - packageNameTextField.getDocument().addDocumentListener(this);
9.74 - }
9.75 -
9.76 - public String getProjectName() {
9.77 - return this.projectNameTextField.getText();
9.78 - }
9.79 -
9.80 - /**
9.81 - * This method is called from within the constructor to initialize the form.
9.82 - * WARNING: Do NOT modify this code. The content of this method is always
9.83 - * regenerated by the Form Editor.
9.84 - */
9.85 - // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
9.86 - private void initComponents() {
9.87 -
9.88 - projectNameLabel = new javax.swing.JLabel();
9.89 - projectNameTextField = new javax.swing.JTextField();
9.90 - projectLocationLabel = new javax.swing.JLabel();
9.91 - projectLocationTextField = new javax.swing.JTextField();
9.92 - browseButton = new javax.swing.JButton();
9.93 - createdFolderLabel = new javax.swing.JLabel();
9.94 - createdFolderTextField = new javax.swing.JTextField();
9.95 - packageNameLabel = new javax.swing.JLabel();
9.96 - packageNameTextField = new javax.swing.JTextField();
9.97 - groupIdLabel = new javax.swing.JLabel();
9.98 - groupIdTextField = new javax.swing.JTextField();
9.99 - artifactIdTextField = new javax.swing.JTextField();
9.100 - artifactIdLabel = new javax.swing.JLabel();
9.101 -
9.102 - FormListener formListener = new FormListener();
9.103 -
9.104 - projectNameLabel.setLabelFor(projectNameTextField);
9.105 - org.openide.awt.Mnemonics.setLocalizedText(projectNameLabel, getMessage("HjPanelVisual.projectNameLabel.text")); // NOI18N
9.106 -
9.107 - projectLocationLabel.setLabelFor(projectLocationTextField);
9.108 - org.openide.awt.Mnemonics.setLocalizedText(projectLocationLabel, getMessage("HjPanelVisual.projectLocationLabel.text")); // NOI18N
9.109 -
9.110 - org.openide.awt.Mnemonics.setLocalizedText(browseButton, getMessage("HjPanelVisual.browseButton.text")); // NOI18N
9.111 - browseButton.setActionCommand("null");
9.112 - browseButton.addActionListener(formListener);
9.113 -
9.114 - createdFolderLabel.setLabelFor(createdFolderTextField);
9.115 - org.openide.awt.Mnemonics.setLocalizedText(createdFolderLabel, getMessage("HjPanelVisual.createdFolderLabel.text")); // NOI18N
9.116 -
9.117 - createdFolderTextField.setEditable(false);
9.118 -
9.119 - packageNameLabel.setLabelFor(projectNameTextField);
9.120 - org.openide.awt.Mnemonics.setLocalizedText(packageNameLabel, getMessage("HjPanelVisual.packageNameLabel.text")); // NOI18N
9.121 -
9.122 - groupIdLabel.setLabelFor(createdFolderTextField);
9.123 - org.openide.awt.Mnemonics.setLocalizedText(groupIdLabel, getMessage("HjPanelVisual.groupIdLabel.text")); // NOI18N
9.124 -
9.125 - groupIdTextField.setEditable(false);
9.126 -
9.127 - artifactIdTextField.setEditable(false);
9.128 -
9.129 - artifactIdLabel.setLabelFor(createdFolderTextField);
9.130 - org.openide.awt.Mnemonics.setLocalizedText(artifactIdLabel, getMessage("HjPanelVisual.artifactIdLabel.text")); // NOI18N
9.131 -
9.132 - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
9.133 - this.setLayout(layout);
9.134 - layout.setHorizontalGroup(
9.135 - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
9.136 - .addGroup(layout.createSequentialGroup()
9.137 - .addContainerGap()
9.138 - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
9.139 - .addComponent(projectNameLabel)
9.140 - .addComponent(projectLocationLabel)
9.141 - .addComponent(createdFolderLabel)
9.142 - .addComponent(packageNameLabel)
9.143 - .addComponent(groupIdLabel)
9.144 - .addComponent(artifactIdLabel))
9.145 - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
9.146 - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
9.147 - .addComponent(projectNameTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE)
9.148 - .addComponent(projectLocationTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE)
9.149 - .addComponent(createdFolderTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE)
9.150 - .addComponent(packageNameTextField)
9.151 - .addComponent(groupIdTextField)
9.152 - .addComponent(artifactIdTextField))
9.153 - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
9.154 - .addComponent(browseButton)
9.155 - .addContainerGap())
9.156 - );
9.157 - layout.setVerticalGroup(
9.158 - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
9.159 - .addGroup(layout.createSequentialGroup()
9.160 - .addContainerGap()
9.161 - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
9.162 - .addComponent(projectNameLabel)
9.163 - .addComponent(projectNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
9.164 - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
9.165 - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
9.166 - .addComponent(projectLocationLabel)
9.167 - .addComponent(projectLocationTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
9.168 - .addComponent(browseButton))
9.169 - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
9.170 - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
9.171 - .addComponent(createdFolderTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
9.172 - .addGroup(layout.createSequentialGroup()
9.173 - .addComponent(createdFolderLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
9.174 - .addGap(2, 2, 2)))
9.175 - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
9.176 - .addComponent(packageNameLabel)
9.177 - .addComponent(packageNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
9.178 - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
9.179 - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
9.180 - .addComponent(groupIdTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
9.181 - .addComponent(groupIdLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
9.182 - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
9.183 - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
9.184 - .addComponent(artifactIdTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
9.185 - .addComponent(artifactIdLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
9.186 - .addContainerGap(144, Short.MAX_VALUE))
9.187 - );
9.188 - }
9.189 -
9.190 - // Code for dispatching events from components to event handlers.
9.191 -
9.192 - private class FormListener implements java.awt.event.ActionListener {
9.193 - FormListener() {}
9.194 - public void actionPerformed(java.awt.event.ActionEvent evt) {
9.195 - if (evt.getSource() == browseButton) {
9.196 - HjPanelVisual.this.browseButtonActionPerformed(evt);
9.197 - }
9.198 - }
9.199 - }// </editor-fold>//GEN-END:initComponents
9.200 -
9.201 - private void browseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseButtonActionPerformed
9.202 - String command = evt.getActionCommand();
9.203 - if ("BROWSE".equals(command)) { //NOI18N
9.204 - JFileChooser chooser = new JFileChooser();
9.205 - FileUtil.preventFileChooserSymlinkTraversal(chooser, null);
9.206 - chooser.setDialogTitle(getMessage("SELECT PROJECT LOCATION"));
9.207 - chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
9.208 - String path = this.projectLocationTextField.getText();
9.209 - if (path.length() > 0) {
9.210 - File f = new File(path);
9.211 - if (f.exists()) {
9.212 - chooser.setSelectedFile(f);
9.213 - }
9.214 - }
9.215 - if (JFileChooser.APPROVE_OPTION == chooser.showOpenDialog(this)) {
9.216 - File projectDir = chooser.getSelectedFile();
9.217 - projectLocationTextField.setText(FileUtil.normalizeFile(projectDir).getAbsolutePath());
9.218 - }
9.219 - panel.fireChangeEvent();
9.220 - }
9.221 -
9.222 - }//GEN-LAST:event_browseButtonActionPerformed
9.223 -
9.224 - // Variables declaration - do not modify//GEN-BEGIN:variables
9.225 - private javax.swing.JLabel artifactIdLabel;
9.226 - private javax.swing.JTextField artifactIdTextField;
9.227 - private javax.swing.JButton browseButton;
9.228 - private javax.swing.JLabel createdFolderLabel;
9.229 - private javax.swing.JTextField createdFolderTextField;
9.230 - private javax.swing.JLabel groupIdLabel;
9.231 - private javax.swing.JTextField groupIdTextField;
9.232 - private javax.swing.JLabel packageNameLabel;
9.233 - private javax.swing.JTextField packageNameTextField;
9.234 - private javax.swing.JLabel projectLocationLabel;
9.235 - private javax.swing.JTextField projectLocationTextField;
9.236 - private javax.swing.JLabel projectNameLabel;
9.237 - private javax.swing.JTextField projectNameTextField;
9.238 - // End of variables declaration//GEN-END:variables
9.239 -
9.240 - @Override
9.241 - public void addNotify() {
9.242 - super.addNotify();
9.243 - //same problem as in 31086, initial focus on Cancel button
9.244 - projectNameTextField.requestFocus();
9.245 - }
9.246 -
9.247 - boolean valid(WizardDescriptor wizardDescriptor) {
9.248 -
9.249 - if (projectNameTextField.getText().length() == 0) {
9.250 - wizardDescriptor.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE,
9.251 - getMessage("PROJECT NAME IS NOT A VALID FOLDER NAME."));
9.252 - return false; // Display name not specified
9.253 - }
9.254 - File f = FileUtil.normalizeFile(new File(projectLocationTextField.getText()).getAbsoluteFile());
9.255 - if (!f.isDirectory()) {
9.256 - String message = getMessage("PROJECT FOLDER IS NOT A VALID PATH.");
9.257 - wizardDescriptor.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, message);
9.258 - return false;
9.259 - }
9.260 - final File destFolder = FileUtil.normalizeFile(new File(createdFolderTextField.getText()).getAbsoluteFile());
9.261 -
9.262 - File projLoc = destFolder;
9.263 - while (projLoc != null && !projLoc.exists()) {
9.264 - projLoc = projLoc.getParentFile();
9.265 - }
9.266 - if (projLoc == null || !projLoc.canWrite()) {
9.267 - wizardDescriptor.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE,
9.268 - getMessage("PROJECT FOLDER CANNOT BE CREATED."));
9.269 - return false;
9.270 - }
9.271 -
9.272 - if (FileUtil.toFileObject(projLoc) == null) {
9.273 - String message = getMessage("PROJECT FOLDER IS NOT A VALID PATH.");
9.274 - wizardDescriptor.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, message);
9.275 - return false;
9.276 - }
9.277 -
9.278 - File[] kids = destFolder.listFiles();
9.279 - if (destFolder.exists() && kids != null && kids.length > 0) {
9.280 - // Folder exists and is not empty
9.281 - wizardDescriptor.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE,
9.282 - getMessage("PROJECT FOLDER ALREADY EXISTS AND IS NOT EMPTY."));
9.283 - return false;
9.284 - }
9.285 -
9.286 - String pkg = packageNameTextField.getText();
9.287 - if (pkg.indexOf('.') == -1) {
9.288 - wizardDescriptor.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE,
9.289 - getMessage("ENTER PACKAGE WITH AT LEAST ONE DOT"));
9.290 - return false;
9.291 - }
9.292 -
9.293 - final StringTokenizer tok = new StringTokenizer(pkg, ".", true); //NOI18N
9.294 - boolean prevDot = false;
9.295 - while (tok.hasMoreElements()) {
9.296 - String part = tok.nextToken();
9.297 - if (part.equals(".")) { //NOI18N
9.298 - if (prevDot) {
9.299 - wizardDescriptor.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE,
9.300 - getMessage("PACKAGE NAME IS NOT VALID JAVA INDENTIFICATOR"));
9.301 - return false;
9.302 - }
9.303 - prevDot = true;
9.304 - continue;
9.305 - }
9.306 - prevDot = false;
9.307 - if (part.isEmpty() || !Utilities.isJavaIdentifier(part)) {
9.308 - wizardDescriptor.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE,
9.309 - getMessage("PACKAGE NAME IS NOT VALID JAVA INDENTIFICATOR"));
9.310 - return false;
9.311 - }
9.312 - }
9.313 - if (prevDot) {
9.314 - wizardDescriptor.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE,
9.315 - getMessage("PACKAGE NAME IS NOT VALID JAVA INDENTIFICATOR"));
9.316 - return false;
9.317 - }
9.318 -
9.319 - wizardDescriptor.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, ""); //NOI18N
9.320 - return true;
9.321 - }
9.322 -
9.323 - void store(WizardDescriptor d) {
9.324 - String name = projectNameTextField.getText().trim();
9.325 - String pkg = packageNameTextField.getText().trim();
9.326 - String folder = createdFolderTextField.getText().trim();
9.327 -
9.328 - d.putProperty("projdir", new File(folder)); //NOI18N
9.329 - d.putProperty("name", name); //NOI18N
9.330 - d.putProperty("pkg", pkg); //NOI18N
9.331 - }
9.332 -
9.333 - void read(WizardDescriptor settings) {
9.334 - File projectLocation = (File) settings.getProperty("projdir"); //NOI18N
9.335 - if (projectLocation == null || projectLocation.getParentFile() == null || !projectLocation.getParentFile().isDirectory()) {
9.336 - projectLocation = ProjectChooser.getProjectsFolder();
9.337 - } else {
9.338 - projectLocation = projectLocation.getParentFile();
9.339 - }
9.340 - this.projectLocationTextField.setText(projectLocation.getAbsolutePath());
9.341 -
9.342 - String projectName = (String) settings.getProperty("name"); //NOI18N
9.343 - if (projectName == null) {
9.344 - projectName = "htmljava"; //NOI18N
9.345 - }
9.346 - this.projectNameTextField.setText(projectName);
9.347 - this.projectNameTextField.selectAll();
9.348 - String pkgName = (String) settings.getProperty("pkg"); //NOI18N
9.349 - if (pkgName == null) {
9.350 - pkgName = "test.html.java"; //NOI18N
9.351 - }
9.352 - this.packageNameTextField.setText(pkgName);
9.353 - this.packageNameTextField.selectAll();
9.354 - }
9.355 -
9.356 - void validate(WizardDescriptor d) throws WizardValidationException {
9.357 - // nothing to validate
9.358 - }
9.359 -
9.360 - // Implementation of DocumentListener --------------------------------------
9.361 - public void changedUpdate(DocumentEvent e) {
9.362 - updateTexts(e);
9.363 - if (this.projectNameTextField.getDocument() == e.getDocument()) {
9.364 - firePropertyChange(PROP_PROJECT_NAME, null, this.projectNameTextField.getText());
9.365 - }
9.366 - }
9.367 -
9.368 - public void insertUpdate(DocumentEvent e) {
9.369 - updateTexts(e);
9.370 - if (this.projectNameTextField.getDocument() == e.getDocument()) {
9.371 - firePropertyChange(PROP_PROJECT_NAME, null, this.projectNameTextField.getText());
9.372 - }
9.373 - }
9.374 -
9.375 - public void removeUpdate(DocumentEvent e) {
9.376 - updateTexts(e);
9.377 - if (this.projectNameTextField.getDocument() == e.getDocument()) {
9.378 - firePropertyChange(PROP_PROJECT_NAME, null, this.projectNameTextField.getText());
9.379 - }
9.380 - }
9.381 -
9.382 - /**
9.383 - * Handles changes in the Project name and project directory,
9.384 - */
9.385 - private void updateTexts(DocumentEvent e) {
9.386 -
9.387 - Document doc = e.getDocument();
9.388 -
9.389 - if (doc == projectNameTextField.getDocument() || doc == projectLocationTextField.getDocument()) {
9.390 - // Change in the project name
9.391 -
9.392 - String projectName = projectNameTextField.getText();
9.393 - String projectFolder = projectLocationTextField.getText();
9.394 -
9.395 - //if (projectFolder.trim().length() == 0 || projectFolder.equals(oldName)) {
9.396 - createdFolderTextField.setText(projectFolder + File.separatorChar + projectName);
9.397 - //}
9.398 -
9.399 - }
9.400 - if (doc == packageNameTextField.getDocument()) {
9.401 - final String pkg = packageNameTextField.getText();
9.402 - int lastDot = pkg.lastIndexOf('.');
9.403 - if (lastDot == -1) {
9.404 - groupIdTextField.setText(""); //NOI18N
9.405 - artifactIdTextField.setText(""); //NOI18N
9.406 - } else {
9.407 - groupIdTextField.setText(pkg.substring(0, lastDot));
9.408 - artifactIdTextField.setText(pkg.substring(lastDot + 1));
9.409 - }
9.410 - }
9.411 - panel.fireChangeEvent(); // Notify that the panel changed
9.412 - }
9.413 -
9.414 - private static String getMessage(String key) {
9.415 - return NbBundle.getMessage(HjPanelVisual.class, key);
9.416 - }
9.417 -}
10.1 --- a/project.htmljava/src/org/netbeans/modules/project/htmljava/HjWizardIterator.java Wed May 21 14:42:59 2014 +0200
10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
10.3 @@ -1,235 +0,0 @@
10.4 -/*
10.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
10.6 - *
10.7 - * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
10.8 - *
10.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
10.10 - * Other names may be trademarks of their respective owners.
10.11 - *
10.12 - * The contents of this file are subject to the terms of either the GNU
10.13 - * General Public License Version 2 only ("GPL") or the Common
10.14 - * Development and Distribution License("CDDL") (collectively, the
10.15 - * "License"). You may not use this file except in compliance with the
10.16 - * License. You can obtain a copy of the License at
10.17 - * http://www.netbeans.org/cddl-gplv2.html
10.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
10.19 - * specific language governing permissions and limitations under the
10.20 - * License. When distributing the software, include this License Header
10.21 - * Notice in each file and include the License file at
10.22 - * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
10.23 - * particular file as subject to the "Classpath" exception as provided
10.24 - * by Oracle in the GPL Version 2 section of the License file that
10.25 - * accompanied this code. If applicable, add the following below the
10.26 - * License Header, with the fields enclosed by brackets [] replaced by
10.27 - * your own identifying information:
10.28 - * "Portions Copyrighted [year] [name of copyright owner]"
10.29 - *
10.30 - * If you wish your version of this file to be governed by only the CDDL
10.31 - * or only the GPL Version 2, indicate your decision by adding
10.32 - * "[Contributor] elects to include this software in this distribution
10.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
10.34 - * single choice of license, a recipient has the option to distribute
10.35 - * your version of this file under either the CDDL, the GPL Version 2 or
10.36 - * to extend the choice of license to its licensees as provided above.
10.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
10.38 - * Version 2 license, then the option applies only if the new code is
10.39 - * made subject to such option by the copyright holder.
10.40 - *
10.41 - * Contributor(s):
10.42 - *
10.43 - * Portions Copyrighted 2013 Sun Microsystems, Inc.
10.44 - */
10.45 -package org.netbeans.modules.project.htmljava;
10.46 -
10.47 -import java.awt.Component;
10.48 -import java.io.File;
10.49 -import java.io.IOException;
10.50 -import java.io.InputStream;
10.51 -import java.io.OutputStream;
10.52 -import java.io.OutputStreamWriter;
10.53 -import java.text.MessageFormat;
10.54 -import java.util.Enumeration;
10.55 -import java.util.LinkedHashSet;
10.56 -import java.util.NoSuchElementException;
10.57 -import java.util.Set;
10.58 -import javax.swing.JComponent;
10.59 -import javax.swing.event.ChangeListener;
10.60 -import org.netbeans.api.project.ProjectManager;
10.61 -import org.netbeans.spi.project.ui.support.ProjectChooser;
10.62 -import org.netbeans.spi.project.ui.templates.support.Templates;
10.63 -import org.openide.WizardDescriptor;
10.64 -import org.openide.filesystems.FileObject;
10.65 -import org.openide.filesystems.FileUtil;
10.66 -import org.openide.util.NbBundle;
10.67 -
10.68 -public class HjWizardIterator implements WizardDescriptor./*Progress*/InstantiatingIterator {
10.69 -
10.70 - private int index;
10.71 - private WizardDescriptor.Panel[] panels;
10.72 - private WizardDescriptor wiz;
10.73 -
10.74 - public HjWizardIterator() {
10.75 - }
10.76 -
10.77 - public static HjWizardIterator createIterator() {
10.78 - return new HjWizardIterator();
10.79 - }
10.80 -
10.81 - private WizardDescriptor.Panel[] createPanels() {
10.82 - return new WizardDescriptor.Panel[]{
10.83 - new HjWizardPanel(),};
10.84 - }
10.85 -
10.86 - private String[] createSteps() {
10.87 - return new String[]{
10.88 - NbBundle.getMessage(HjWizardIterator.class, "LBL_CreateProjectStep")
10.89 - };
10.90 - }
10.91 -
10.92 - public Set/*<FileObject>*/ instantiate(/*ProgressHandle handle*/) throws IOException {
10.93 - Set<FileObject> resultSet = new LinkedHashSet<FileObject>();
10.94 - File dirF = FileUtil.normalizeFile((File) wiz.getProperty("projdir"));
10.95 - dirF.mkdirs();
10.96 -
10.97 - FileObject template = Templates.getTemplate(wiz);
10.98 - FileObject dir = FileUtil.toFileObject(dirF);
10.99 - copyProject(template, dir,
10.100 - (String)wiz.getProperty("name"),
10.101 - (String)wiz.getProperty("pkg")
10.102 - );
10.103 -
10.104 - // Always open top dir as a project:
10.105 - resultSet.add(dir);
10.106 - // Look for nested projects to open as well:
10.107 - Enumeration<? extends FileObject> e = dir.getFolders(true);
10.108 - while (e.hasMoreElements()) {
10.109 - FileObject subfolder = e.nextElement();
10.110 - if (ProjectManager.getDefault().isProject(subfolder)) {
10.111 - resultSet.add(subfolder);
10.112 - }
10.113 - }
10.114 -
10.115 - File parent = dirF.getParentFile();
10.116 - if (parent != null && parent.exists()) {
10.117 - ProjectChooser.setProjectsFolder(parent);
10.118 - }
10.119 -
10.120 - return resultSet;
10.121 - }
10.122 -
10.123 - public void initialize(WizardDescriptor wiz) {
10.124 - this.wiz = wiz;
10.125 - FileObject template = Templates.getTemplate(wiz);
10.126 - wiz.putProperty("profile", template.getAttribute("profile"));
10.127 - index = 0;
10.128 - panels = createPanels();
10.129 - // Make sure list of steps is accurate.
10.130 - String[] steps = createSteps();
10.131 - for (int i = 0; i < panels.length; i++) {
10.132 - Component c = panels[i].getComponent();
10.133 - if (steps[i] == null) {
10.134 - // Default step name to component name of panel.
10.135 - // Mainly useful for getting the name of the target
10.136 - // chooser to appear in the list of steps.
10.137 - steps[i] = c.getName();
10.138 - }
10.139 - if (c instanceof JComponent) { // assume Swing components
10.140 - JComponent jc = (JComponent) c;
10.141 - // Step #.
10.142 - // TODO if using org.openide.dialogs >= 7.8, can use WizardDescriptor.PROP_*:
10.143 - jc.putClientProperty("WizardPanel_contentSelectedIndex", new Integer(i));
10.144 - // Step name (actually the whole list for reference).
10.145 - jc.putClientProperty("WizardPanel_contentData", steps);
10.146 - }
10.147 - }
10.148 - }
10.149 -
10.150 - public void uninitialize(WizardDescriptor wiz) {
10.151 - this.wiz.putProperty("projdir", null);
10.152 - this.wiz.putProperty("name", null);
10.153 - this.wiz = null;
10.154 - panels = null;
10.155 - }
10.156 -
10.157 - public String name() {
10.158 - return MessageFormat.format("{0} of {1}",
10.159 - new Object[]{new Integer(index + 1), new Integer(panels.length)});
10.160 - }
10.161 -
10.162 - public boolean hasNext() {
10.163 - return index < panels.length - 1;
10.164 - }
10.165 -
10.166 - public boolean hasPrevious() {
10.167 - return index > 0;
10.168 - }
10.169 -
10.170 - public void nextPanel() {
10.171 - if (!hasNext()) {
10.172 - throw new NoSuchElementException();
10.173 - }
10.174 - index++;
10.175 - }
10.176 -
10.177 - public void previousPanel() {
10.178 - if (!hasPrevious()) {
10.179 - throw new NoSuchElementException();
10.180 - }
10.181 - index--;
10.182 - }
10.183 -
10.184 - public WizardDescriptor.Panel current() {
10.185 - return panels[index];
10.186 - }
10.187 -
10.188 - // If nothing unusual changes in the middle of the wizard, simply:
10.189 - public final void addChangeListener(ChangeListener l) {
10.190 - }
10.191 -
10.192 - public final void removeChangeListener(ChangeListener l) {
10.193 - }
10.194 -
10.195 - private static void copyProject(
10.196 - FileObject fileRoot, FileObject projectRoot,
10.197 - String prjname, String pkg
10.198 - ) throws IOException {
10.199 - final int prefix = fileRoot.getPath().length();
10.200 - final String realPkg = "/" + pkg.replace('.', '/') + "/";
10.201 - Enumeration<? extends FileObject> all = fileRoot.getChildren(true);
10.202 - while (all.hasMoreElements()) {
10.203 - FileObject entry = all.nextElement();
10.204 - String name = entry.getPath().substring(prefix).replace("/pkg/", realPkg);
10.205 - if (entry.isData()) {
10.206 - FileObject fo = FileUtil.createData(projectRoot, name);
10.207 - if (entry.getMIMEType().startsWith("text/")) {
10.208 - copyWithSubst(entry, fo, prjname, pkg);
10.209 - continue;
10.210 - }
10.211 - try (
10.212 - InputStream is = entry.getInputStream();
10.213 - OutputStream os = fo.getOutputStream()
10.214 - ) {
10.215 - FileUtil.copy(is, os);
10.216 - }
10.217 - }
10.218 - }
10.219 - }
10.220 -
10.221 - private static void copyWithSubst(FileObject from, FileObject to,
10.222 - String name, String pkg
10.223 - ) throws IOException {
10.224 - final String crlf = System.getProperty("line.separator");
10.225 -
10.226 - int lastDot = pkg.lastIndexOf('.');
10.227 - String group = pkg.substring(0, lastDot);
10.228 - String artifact = pkg.substring(lastDot + 1);
10.229 -
10.230 - try (OutputStreamWriter w = new OutputStreamWriter(to.getOutputStream(), "UTF-8")) {
10.231 - for (String line : from.asLines("UTF-8")) {
10.232 - line = line.replace("@NAME@", name).replace("@PKG@", pkg)
10.233 - .replace("@GROUP@", group).replace("@ARTIFACT@", artifact);
10.234 - w.append(line).append(crlf);
10.235 - }
10.236 - }
10.237 - }
10.238 -}
11.1 --- a/project.htmljava/src/org/netbeans/modules/project/htmljava/HjWizardPanel.java Wed May 21 14:42:59 2014 +0200
11.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
11.3 @@ -1,127 +0,0 @@
11.4 -/*
11.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
11.6 - *
11.7 - * Copyright 2013 Oracle and/or its affiliates. All rights reserved.
11.8 - *
11.9 - * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
11.10 - * Other names may be trademarks of their respective owners.
11.11 - *
11.12 - * The contents of this file are subject to the terms of either the GNU
11.13 - * General Public License Version 2 only ("GPL") or the Common
11.14 - * Development and Distribution License("CDDL") (collectively, the
11.15 - * "License"). You may not use this file except in compliance with the
11.16 - * License. You can obtain a copy of the License at
11.17 - * http://www.netbeans.org/cddl-gplv2.html
11.18 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
11.19 - * specific language governing permissions and limitations under the
11.20 - * License. When distributing the software, include this License Header
11.21 - * Notice in each file and include the License file at
11.22 - * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
11.23 - * particular file as subject to the "Classpath" exception as provided
11.24 - * by Oracle in the GPL Version 2 section of the License file that
11.25 - * accompanied this code. If applicable, add the following below the
11.26 - * License Header, with the fields enclosed by brackets [] replaced by
11.27 - * your own identifying information:
11.28 - * "Portions Copyrighted [year] [name of copyright owner]"
11.29 - *
11.30 - * If you wish your version of this file to be governed by only the CDDL
11.31 - * or only the GPL Version 2, indicate your decision by adding
11.32 - * "[Contributor] elects to include this software in this distribution
11.33 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
11.34 - * single choice of license, a recipient has the option to distribute
11.35 - * your version of this file under either the CDDL, the GPL Version 2 or
11.36 - * to extend the choice of license to its licensees as provided above.
11.37 - * However, if you add GPL Version 2 code and therefore, elected the GPL
11.38 - * Version 2 license, then the option applies only if the new code is
11.39 - * made subject to such option by the copyright holder.
11.40 - *
11.41 - * Contributor(s):
11.42 - *
11.43 - * Portions Copyrighted 2013 Sun Microsystems, Inc.
11.44 - */
11.45 -package org.netbeans.modules.project.htmljava;
11.46 -
11.47 -import java.awt.Component;
11.48 -import java.util.HashSet;
11.49 -import java.util.Set;
11.50 -import javax.swing.event.ChangeEvent;
11.51 -import javax.swing.event.ChangeListener;
11.52 -import org.openide.WizardDescriptor;
11.53 -import org.openide.WizardValidationException;
11.54 -import org.openide.util.HelpCtx;
11.55 -import org.openide.util.NbBundle;
11.56 -
11.57 -/**
11.58 - * Panel just asking for basic info.
11.59 - */
11.60 -public class HjWizardPanel implements WizardDescriptor.Panel,
11.61 - WizardDescriptor.ValidatingPanel, WizardDescriptor.FinishablePanel {
11.62 -
11.63 - private WizardDescriptor wizardDescriptor;
11.64 - private HjPanelVisual component;
11.65 -
11.66 - public HjWizardPanel() {
11.67 - }
11.68 -
11.69 - public Component getComponent() {
11.70 - if (component == null) {
11.71 - component = new HjPanelVisual(this);
11.72 - component.setName(NbBundle.getMessage(HjWizardPanel.class, "LBL_CreateProjectStep"));
11.73 - }
11.74 - return component;
11.75 - }
11.76 -
11.77 - public HelpCtx getHelp() {
11.78 - return new HelpCtx(HjWizardPanel.class);
11.79 - }
11.80 -
11.81 - public boolean isValid() {
11.82 - getComponent();
11.83 - return component.valid(wizardDescriptor);
11.84 - }
11.85 -
11.86 - private final Set<ChangeListener> listeners = new HashSet<ChangeListener>(1); // or can use ChangeSupport in NB 6.0
11.87 -
11.88 - public final void addChangeListener(ChangeListener l) {
11.89 - synchronized (listeners) {
11.90 - listeners.add(l);
11.91 - }
11.92 - }
11.93 -
11.94 - public final void removeChangeListener(ChangeListener l) {
11.95 - synchronized (listeners) {
11.96 - listeners.remove(l);
11.97 - }
11.98 - }
11.99 -
11.100 - protected final void fireChangeEvent() {
11.101 - Set<ChangeListener> ls;
11.102 - synchronized (listeners) {
11.103 - ls = new HashSet<ChangeListener>(listeners);
11.104 - }
11.105 - ChangeEvent ev = new ChangeEvent(this);
11.106 - for (ChangeListener l : ls) {
11.107 - l.stateChanged(ev);
11.108 - }
11.109 - }
11.110 -
11.111 - public void readSettings(Object settings) {
11.112 - wizardDescriptor = (WizardDescriptor) settings;
11.113 - component.read(wizardDescriptor);
11.114 - }
11.115 -
11.116 - public void storeSettings(Object settings) {
11.117 - WizardDescriptor d = (WizardDescriptor) settings;
11.118 - component.store(d);
11.119 - }
11.120 -
11.121 - public boolean isFinishPanel() {
11.122 - return true;
11.123 - }
11.124 -
11.125 - public void validate() throws WizardValidationException {
11.126 - getComponent();
11.127 - component.validate(wizardDescriptor);
11.128 - }
11.129 -
11.130 -}
12.1 --- a/project.htmljava/src/org/netbeans/modules/project/htmljava/layer.xml Wed May 21 14:42:59 2014 +0200
12.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
12.3 @@ -1,54 +0,0 @@
12.4 -<?xml version="1.0" encoding="UTF-8"?>
12.5 -<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
12.6 -<filesystem>
12.7 - <folder name="Templates">
12.8 - <folder name="Project">
12.9 - <folder name="ClientSide">
12.10 - <attr name="displayName" bundlevalue="org.netbeans.modules.project.htmljava.Bundle#HTMLJavaFolder"/>
12.11 - <folder name="htmljava.project">
12.12 - <attr boolvalue="true" name="template"/>
12.13 - <attr bundlevalue="org.netbeans.modules.project.htmljava.Bundle#Hj_displayName" name="displayName"/>
12.14 - <attr name="iconBase" stringvalue="org/netbeans/modules/project/htmljava/Hj.png"/>
12.15 - <attr name="instantiatingWizardURL" urlvalue="nbresloc:/org/netbeans/modules/project/htmljava/HjDescription.html"/>
12.16 - <attr name="instantiatingIterator" newvalue="org.netbeans.modules.project.htmljava.HjWizardIterator"/>
12.17 - <attr boolvalue="true" name="requireProject"/>
12.18 - <attr name="position" intvalue="53101"/>
12.19 -
12.20 - <!-- project files -->
12.21 - <file name="pom.xml" url="prj/pom.txt"/>
12.22 - <file name="nbactions.xml" url="prj/nbactions.xml"/>
12.23 - <file name="nbactions-bck2brwsr.xml" url="prj/nbactions-bck2brwsr.xml"/>
12.24 - <file name="nbactions-fxbrwsr.xml" url="prj/nbactions-fxbrwsr.xml"/>
12.25 - <folder name="src">
12.26 - <folder name="main">
12.27 - <folder name="assembly">
12.28 - <file name="html.java.net.xml" url="prj/html.java.net.xml"/>
12.29 - <file name="bck2brwsr.xml" url="prj/bck2brwsr.xml"/>
12.30 - </folder>
12.31 - <folder name="java">
12.32 - <folder name="pkg">
12.33 - <file name="Main.java" url="prj/Main.src"/>
12.34 - <file name="MainBrwsr.java" url="prj/MainBrwsr.src"/>
12.35 - <file name="DataModel.java" url="prj/DataModel.src"/>
12.36 - </folder>
12.37 - </folder>
12.38 - <folder name="webapp">
12.39 - <folder name="pages">
12.40 - <file name="index.html" url="prj/index.html"/>
12.41 - </folder>
12.42 - </folder>
12.43 - </folder>
12.44 - <folder name="test">
12.45 - <folder name="java">
12.46 - <folder name="pkg">
12.47 - <file name="DataModelTest.java" url="prj/DataModelTest.src"/>
12.48 - <file name="JsInteractionTest.java" url="prj/JsInteractionTest.src"/>
12.49 - </folder>
12.50 - </folder>
12.51 - </folder>
12.52 - </folder>
12.53 - </folder>
12.54 - </folder>
12.55 - </folder>
12.56 - </folder>
12.57 -</filesystem>
13.1 --- a/project.htmljava/src/org/netbeans/modules/project/htmljava/prj/DataModel.src Wed May 21 14:42:59 2014 +0200
13.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
13.3 @@ -1,44 +0,0 @@
13.4 -package @PKG@;
13.5 -
13.6 -import net.java.html.json.ComputedProperty;
13.7 -import net.java.html.json.Function;
13.8 -import net.java.html.json.Model;
13.9 -import net.java.html.json.Property;
13.10 -
13.11 -/** Model annotation generates class Data with
13.12 - * one message property, boolean property and read only words property
13.13 - */
13.14 -@Model(className = "Data", properties = {
13.15 - @Property(name = "message", type = String.class),
13.16 - @Property(name = "on", type = boolean.class)
13.17 -})
13.18 -final class DataModel {
13.19 - @ComputedProperty static java.util.List<String> words(String message) {
13.20 - String[] arr = new String[6];
13.21 - String[] words = message == null ? new String[0] : message.split(" ", 6);
13.22 - for (int i = 0; i < 6; i++) {
13.23 - arr[i] = words.length > i ? words[i] : "!";
13.24 - }
13.25 - return java.util.Arrays.asList(arr);
13.26 - }
13.27 -
13.28 - @Function static void turnOn(Data model) {
13.29 - model.setOn(true);
13.30 - }
13.31 - @Function static void turnOff(final Data model) {
13.32 - confirmByUser("Really turn off?", new Runnable() {
13.33 - @Override
13.34 - public void run() {
13.35 - model.setOn(false);
13.36 - }
13.37 - });
13.38 - }
13.39 -
13.40 - /** Shows direct interaction with JavaScript */
13.41 - @net.java.html.js.JavaScriptBody(
13.42 - args = { "msg", "callback" },
13.43 - javacall = true,
13.44 - body = "alert(msg); callback.@java.lang.Runnable::run()();"
13.45 - )
13.46 - static native void confirmByUser(String msg, Runnable callback);
13.47 -}
14.1 --- a/project.htmljava/src/org/netbeans/modules/project/htmljava/prj/DataModelTest.src Wed May 21 14:42:59 2014 +0200
14.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
14.3 @@ -1,16 +0,0 @@
14.4 -package @PKG@;
14.5 -
14.6 -import static org.testng.Assert.*;
14.7 -import org.testng.annotations.Test;
14.8 -
14.9 -public class DataModelTest {
14.10 - @Test public void areHelloWorldTwoWords() {
14.11 - Data model = new Data();
14.12 - model.setMessage("Hello World!");
14.13 -
14.14 - java.util.List<String> arr = model.getWords();
14.15 - assertEquals(arr.size(), 6, "Six words always");
14.16 - assertEquals("Hello", arr.get(0), "Hello is the first word");
14.17 - assertEquals("World!", arr.get(1), "World is the second word");
14.18 - }
14.19 -}
15.1 --- a/project.htmljava/src/org/netbeans/modules/project/htmljava/prj/JsInteractionTest.src Wed May 21 14:42:59 2014 +0200
15.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
15.3 @@ -1,103 +0,0 @@
15.4 -package @PKG@;
15.5 -
15.6 -import java.io.Closeable;
15.7 -import java.io.Reader;
15.8 -import java.net.URL;
15.9 -import java.util.ArrayList;
15.10 -import java.util.List;
15.11 -import javax.script.Invocable;
15.12 -import javax.script.ScriptEngine;
15.13 -import javax.script.ScriptEngineManager;
15.14 -import javax.script.ScriptException;
15.15 -import org.apidesign.html.boot.spi.Fn;
15.16 -import static org.testng.Assert.assertEquals;
15.17 -import org.testng.annotations.AfterMethod;
15.18 -import org.testng.annotations.BeforeMethod;
15.19 -import org.testng.annotations.Test;
15.20 -
15.21 -/** Tests for behavior of @JavaScriptBody methods. Set your JavaScript
15.22 - * environment up (for example define <code>alert</code> or use some
15.23 - * emulation library like <em>env.js</em>), register script presenter
15.24 - * and then you can call methods that deal with JavaScript in your tests.
15.25 - */
15.26 -public class JsInteractionTest {
15.27 - private Closeable jsEngine;
15.28 - @BeforeMethod public void initializeJSEngine() throws Exception {
15.29 - jsEngine = Fn.activate(new ScriptPresenter());
15.30 - }
15.31 -
15.32 - @AfterMethod public void shutdownJSEngine() throws Exception {
15.33 - jsEngine.close();
15.34 - }
15.35 -
15.36 - @Test public void testCallbackFromJavaScript() throws Exception {
15.37 - class R implements Runnable {
15.38 - int called;
15.39 -
15.40 - @Override
15.41 - public void run() {
15.42 - called++;
15.43 - }
15.44 - }
15.45 - R callback = new R();
15.46 -
15.47 - DataModel.confirmByUser("Hello", callback);
15.48 -
15.49 - assertEquals(callback.called, 1, "One immediate callback");
15.50 - }
15.51 -
15.52 - private static class ScriptPresenter implements Fn.Presenter {
15.53 - private final ScriptEngine eng;
15.54 -
15.55 - public ScriptPresenter() throws ScriptException {
15.56 - eng = new ScriptEngineManager().getEngineByName("javascript");
15.57 - eng.eval("function alert(msg) { Packages.java.lang.System.out.println(msg); };");
15.58 - }
15.59 -
15.60 - @Override
15.61 - public Fn defineFn(String code, String... names) {
15.62 - StringBuilder sb = new StringBuilder();
15.63 - sb.append("(function() {");
15.64 - sb.append(" return function(");
15.65 - String sep = "";
15.66 - for (String n : names) {
15.67 - sb.append(sep).append(n);
15.68 - sep = ",";
15.69 - }
15.70 - sb.append(") {\n");
15.71 - sb.append(code);
15.72 - sb.append("};");
15.73 - sb.append("})()");
15.74 -
15.75 - final Object fn;
15.76 - try {
15.77 - fn = eng.eval(sb.toString());
15.78 - } catch (ScriptException ex) {
15.79 - throw new IllegalStateException(ex);
15.80 - }
15.81 - return new Fn(this) {
15.82 - @Override
15.83 - public Object invoke(Object thiz, Object... args) throws Exception {
15.84 - List<Object> all = new ArrayList<Object>(args.length + 1);
15.85 - all.add(thiz == null ? fn : thiz);
15.86 - for (int i = 0; i < args.length; i++) {
15.87 - all.add(args[i]);
15.88 - }
15.89 - Object ret = ((Invocable)eng).invokeMethod(fn, "call", all.toArray()); // NOI18N
15.90 - return fn.equals(ret) ? null : thiz;
15.91 - }
15.92 - };
15.93 - }
15.94 -
15.95 - @Override
15.96 - public void displayPage(URL page, Runnable onPageLoad) {
15.97 - // not really displaying anything
15.98 - onPageLoad.run();
15.99 - }
15.100 -
15.101 - @Override
15.102 - public void loadScript(Reader code) throws Exception {
15.103 - eng.eval(code);
15.104 - }
15.105 - }
15.106 -}
16.1 --- a/project.htmljava/src/org/netbeans/modules/project/htmljava/prj/Main.src Wed May 21 14:42:59 2014 +0200
16.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
16.3 @@ -1,27 +0,0 @@
16.4 -package @PKG@;
16.5 -
16.6 -import net.java.html.boot.BrowserBuilder;
16.7 -
16.8 -
16.9 -/** Bootstrap and initialization. */
16.10 -public final class Main {
16.11 - private Main() {
16.12 - }
16.13 -
16.14 - /** Launches the browser */
16.15 - public static void main(String... args) throws Exception {
16.16 - BrowserBuilder.newBrowser().
16.17 - loadPage("pages/index.html").
16.18 - loadClass(Main.class).
16.19 - invoke("onPageLoad", args).
16.20 - showAndWait();
16.21 - System.exit(0);
16.22 - }
16.23 -
16.24 - /** Called when page is ready */
16.25 - public static void onPageLoad(String... args) throws Exception {
16.26 - Data d = new Data();
16.27 - d.setMessage("Hello World from HTML and Java!");
16.28 - d.applyBindings();
16.29 - }
16.30 -}
17.1 --- a/project.htmljava/src/org/netbeans/modules/project/htmljava/prj/MainBrwsr.src Wed May 21 14:42:59 2014 +0200
17.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
17.3 @@ -1,11 +0,0 @@
17.4 -package @PKG@;
17.5 -
17.6 -public class MainBrwsr {
17.7 - static {
17.8 - try {
17.9 - Main.onPageLoad();
17.10 - } catch (Exception ex) {
17.11 - throw new IllegalStateException(ex);
17.12 - }
17.13 - }
17.14 -}
18.1 --- a/project.htmljava/src/org/netbeans/modules/project/htmljava/prj/bck2brwsr.xml Wed May 21 14:42:59 2014 +0200
18.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
18.3 @@ -1,43 +0,0 @@
18.4 -<?xml version="1.0"?>
18.5 -<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
18.6 - xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
18.7 -
18.8 - <id>bck2brwsr</id>
18.9 - <formats>
18.10 - <format>zip</format>
18.11 - </formats>
18.12 - <baseDirectory>public_html</baseDirectory>
18.13 - <dependencySets>
18.14 - <dependencySet>
18.15 - <useProjectArtifact>false</useProjectArtifact>
18.16 - <scope>runtime</scope>
18.17 - <outputDirectory>lib</outputDirectory>
18.18 - <includes>
18.19 - <include>*:jar</include>
18.20 - <include>*:rt</include>
18.21 - </includes>
18.22 - </dependencySet>
18.23 - <dependencySet>
18.24 - <useProjectArtifact>false</useProjectArtifact>
18.25 - <scope>provided</scope>
18.26 - <includes>
18.27 - <include>*:js</include>
18.28 - </includes>
18.29 - <unpack>true</unpack>
18.30 - <outputDirectory>/</outputDirectory>
18.31 - </dependencySet>
18.32 - </dependencySets>
18.33 - <fileSets>
18.34 - <fileSet>
18.35 - <directory>src/main/webapp/pages</directory>
18.36 - <outputDirectory>/</outputDirectory>
18.37 - <filtered>true</filtered>
18.38 - </fileSet>
18.39 - </fileSets>
18.40 - <files>
18.41 - <file>
18.42 - <source>${project.build.directory}/${project.build.finalName}.jar</source>
18.43 - <outputDirectory>/</outputDirectory>
18.44 - </file>
18.45 - </files>
18.46 -</assembly>
18.47 \ No newline at end of file
19.1 --- a/project.htmljava/src/org/netbeans/modules/project/htmljava/prj/html.java.net.xml Wed May 21 14:42:59 2014 +0200
19.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
19.3 @@ -1,57 +0,0 @@
19.4 -<?xml version="1.0"?>
19.5 -<!--
19.6 -
19.7 - The MIT License (MIT)
19.8 -
19.9 - Copyright (C) 2013 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
19.10 -
19.11 - Permission is hereby granted, free of charge, to any person obtaining a copy
19.12 - of this software and associated documentation files (the "Software"), to deal
19.13 - in the Software without restriction, including without limitation the rights
19.14 - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19.15 - copies of the Software, and to permit persons to whom the Software is
19.16 - furnished to do so, subject to the following conditions:
19.17 -
19.18 - The above copyright notice and this permission notice shall be included in
19.19 - all copies or substantial portions of the Software.
19.20 -
19.21 - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19.22 - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19.23 - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19.24 - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19.25 - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19.26 - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19.27 - THE SOFTWARE.
19.28 -
19.29 --->
19.30 -<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19.31 - xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
19.32 -
19.33 - <id>html.java.net</id>
19.34 - <formats>
19.35 - <format>zip</format>
19.36 - </formats>
19.37 - <baseDirectory>${project.build.finalName}-app</baseDirectory>
19.38 - <dependencySets>
19.39 - <dependencySet>
19.40 - <useProjectArtifact>false</useProjectArtifact>
19.41 - <scope>runtime</scope>
19.42 - <outputDirectory>lib</outputDirectory>
19.43 - </dependencySet>
19.44 - </dependencySets>
19.45 - <files>
19.46 - <file>
19.47 - <source>${project.build.directory}/${project.build.finalName}.jar</source>
19.48 - <outputDirectory>/</outputDirectory>
19.49 - </file>
19.50 - </files>
19.51 - <fileSets>
19.52 - <fileSet>
19.53 - <directory>src/main/webapp/</directory>
19.54 - <outputDirectory>/</outputDirectory>
19.55 - <includes>
19.56 - <include>pages/**</include>
19.57 - </includes>
19.58 - </fileSet>
19.59 - </fileSets>
19.60 -</assembly>
19.61 \ No newline at end of file
20.1 --- a/project.htmljava/src/org/netbeans/modules/project/htmljava/prj/index.html Wed May 21 14:42:59 2014 +0200
20.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
20.3 @@ -1,66 +0,0 @@
20.4 -<!DOCTYPE html>
20.5 -<html>
20.6 - <head>
20.7 - <title></title>
20.8 - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
20.9 -
20.10 - <style type="text/css">
20.11 - @-webkit-keyframes spin {
20.12 - 0% { -webkit-transform: rotate(0deg); }
20.13 - 100% { -webkit-transform: rotate(360deg); }
20.14 - }
20.15 -
20.16 - .rotate {
20.17 - -webkit-animation-name: spin;
20.18 - -webkit-animation-duration: 3s;
20.19 - -webkit-animation-iteration-count: infinite;
20.20 - -webkit-animation-direction: alternate;
20.21 - }
20.22 -
20.23 - #scene {
20.24 - position: relative;
20.25 - top: 60px;
20.26 - text-align: center;
20.27 - }
20.28 -
20.29 - #words span {
20.30 - border: 1px solid #ccc;
20.31 - background: rgba(255,255,155,0.8);
20.32 - text-align: center;
20.33 - font-size: 30px;
20.34 - -webkit-box-shadow: inset 0 0 40px rgba(0,0,0,0.4);
20.35 - position: absolute;
20.36 - }
20.37 -
20.38 - #words span:nth-child(1) { left: 45%; top: 0px; }
20.39 - #words span:nth-child(2) { left: 25%; top: 100px; }
20.40 - #words span:nth-child(3) { left: 65%; top: 100px; }
20.41 - #words span:nth-child(4) { left: 10%; top: 200px; }
20.42 - #words span:nth-child(5) { left: 45%; top: 200px; }
20.43 - #words span:nth-child(6) { left: 80%; top: 200px; }
20.44 -
20.45 - </style>
20.46 -
20.47 - </head>
20.48 - <body>
20.49 - <h1>Words Demo</h1>
20.50 - <input data-bind="value: message, valueUpdate: 'afterkeydown'" size="80">
20.51 - <br>
20.52 - <button data-bind="enable: !on(), click: $root.turnOn">Start</button>
20.53 - <button data-bind="enable: on, click: $root.turnOff">Stop</button>
20.54 -
20.55 - <div id="scene">
20.56 - <span id="words" data-bind="foreach: words">
20.57 - <span data-bind="text: $data, css: { 'rotate' : $root.on } "></span>
20.58 - </span>
20.59 - </div>
20.60 -
20.61 -
20.62 - <script type="text/javascript" src="bck2brwsr.js"></script>
20.63 - <script>
20.64 - var vm = bck2brwsr('${project.build.finalName}.jar');
20.65 - vm.loadClass('@PKG@.MainBrwsr');
20.66 - </script>
20.67 -
20.68 - </body>
20.69 -</html>
21.1 --- a/project.htmljava/src/org/netbeans/modules/project/htmljava/prj/nbactions-bck2brwsr.xml Wed May 21 14:42:59 2014 +0200
21.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
21.3 @@ -1,14 +0,0 @@
21.4 -<?xml version="1.0" encoding="UTF-8"?>
21.5 -<actions>
21.6 - <action>
21.7 - <actionName>run</actionName>
21.8 - <goals>
21.9 - <goal>package</goal>
21.10 - <goal>bck2brwsr:brwsr</goal>
21.11 - </goals>
21.12 - <properties>
21.13 - <skipTests>true</skipTests>
21.14 - <bck2brwsr.obfuscationlevel>NONE</bck2brwsr.obfuscationlevel>
21.15 - </properties>
21.16 - </action>
21.17 -</actions>
22.1 --- a/project.htmljava/src/org/netbeans/modules/project/htmljava/prj/nbactions-fxbrwsr.xml Wed May 21 14:42:59 2014 +0200
22.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
22.3 @@ -1,20 +0,0 @@
22.4 -<?xml version="1.0" encoding="UTF-8"?>
22.5 -<actions>
22.6 - <action>
22.7 - <actionName>run</actionName>
22.8 - <goals>
22.9 - <goal>process-classes</goal>
22.10 - <goal>exec:java</goal>
22.11 - </goals>
22.12 - </action>
22.13 - <action>
22.14 - <actionName>debug</actionName>
22.15 - <goals>
22.16 - <goal>process-classes</goal>
22.17 - <goal>exec:java</goal>
22.18 - </goals>
22.19 - <properties>
22.20 - <jpda.listen>maven</jpda.listen>
22.21 - </properties>
22.22 - </action>
22.23 -</actions>
23.1 --- a/project.htmljava/src/org/netbeans/modules/project/htmljava/prj/nbactions.xml Wed May 21 14:42:59 2014 +0200
23.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
23.3 @@ -1,20 +0,0 @@
23.4 -<?xml version="1.0" encoding="UTF-8"?>
23.5 -<actions>
23.6 - <action>
23.7 - <actionName>run</actionName>
23.8 - <goals>
23.9 - <goal>process-classes</goal>
23.10 - <goal>exec:java</goal>
23.11 - </goals>
23.12 - </action>
23.13 - <action>
23.14 - <actionName>debug</actionName>
23.15 - <goals>
23.16 - <goal>process-classes</goal>
23.17 - <goal>exec:java</goal>
23.18 - </goals>
23.19 - <properties>
23.20 - <jpda.listen>maven</jpda.listen>
23.21 - </properties>
23.22 - </action>
23.23 -</actions>
24.1 --- a/project.htmljava/src/org/netbeans/modules/project/htmljava/prj/pom.txt Wed May 21 14:42:59 2014 +0200
24.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
24.3 @@ -1,226 +0,0 @@
24.4 -<?xml version="1.0" encoding="UTF-8"?>
24.5 -<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">
24.6 - <modelVersion>4.0.0</modelVersion>
24.7 -
24.8 - <groupId>@GROUP@</groupId>
24.9 - <artifactId>@ARTIFACT@</artifactId>
24.10 - <version>1.0-SNAPSHOT</version>
24.11 - <packaging>jar</packaging>
24.12 -
24.13 - <name>@NAME@</name>
24.14 -
24.15 - <properties>
24.16 - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
24.17 - <net.java.html.version>0.7.5</net.java.html.version>
24.18 - <bck2brwsr.version>0.8.1</bck2brwsr.version>
24.19 - <brwsr.startpage>pages/index.html</brwsr.startpage>
24.20 - <project.mainclass>@PKG@.Main</project.mainclass>
24.21 - <netbeans.compile.on.save>none</netbeans.compile.on.save>
24.22 - </properties>
24.23 - <build>
24.24 - <plugins>
24.25 - <plugin>
24.26 - <groupId>org.netbeans.html</groupId>
24.27 - <artifactId>html4j-maven-plugin</artifactId>
24.28 - <version>${net.java.html.version}</version>
24.29 - <executions>
24.30 - <execution>
24.31 - <id>js-classes</id>
24.32 - <goals>
24.33 - <goal>process-js-annotations</goal>
24.34 - </goals>
24.35 - </execution>
24.36 - </executions>
24.37 - </plugin>
24.38 - <plugin>
24.39 - <groupId>org.apache.maven.plugins</groupId>
24.40 - <artifactId>maven-compiler-plugin</artifactId>
24.41 - <version>2.3.2</version>
24.42 - <configuration>
24.43 - <source>1.7</source>
24.44 - <target>1.7</target>
24.45 - </configuration>
24.46 - </plugin>
24.47 - <plugin>
24.48 - <groupId>org.apache.maven.plugins</groupId>
24.49 - <artifactId>maven-jar-plugin</artifactId>
24.50 - <version>2.4</version>
24.51 - <configuration>
24.52 - <archive>
24.53 - <manifest>
24.54 - <mainClass>${project.mainclass}</mainClass>
24.55 - <addClasspath>true</addClasspath>
24.56 - <classpathPrefix>lib/</classpathPrefix>
24.57 - </manifest>
24.58 - </archive>
24.59 - </configuration>
24.60 - </plugin>
24.61 - <plugin>
24.62 - <groupId>org.codehaus.mojo</groupId>
24.63 - <artifactId>exec-maven-plugin</artifactId>
24.64 - <version>1.2.1</version>
24.65 - <configuration>
24.66 - <systemProperties>
24.67 - <systemProperty>
24.68 - <key>browser.rootdir</key>
24.69 - <value>${basedir}/src/main/webapp/</value>
24.70 - </systemProperty>
24.71 - </systemProperties>
24.72 - <mainClass>${project.mainclass}</mainClass>
24.73 - </configuration>
24.74 - </plugin>
24.75 - </plugins>
24.76 - </build>
24.77 - <dependencies>
24.78 - <dependency>
24.79 - <groupId>org.netbeans.html</groupId>
24.80 - <artifactId>net.java.html.json</artifactId>
24.81 - <version>${net.java.html.version}</version>
24.82 - </dependency>
24.83 - <dependency>
24.84 - <groupId>org.netbeans.html</groupId>
24.85 - <artifactId>net.java.html.boot</artifactId>
24.86 - <version>${net.java.html.version}</version>
24.87 - </dependency>
24.88 - <dependency>
24.89 - <groupId>org.testng</groupId>
24.90 - <artifactId>testng</artifactId>
24.91 - <version>6.7</version>
24.92 - <scope>test</scope>
24.93 - </dependency>
24.94 - </dependencies>
24.95 - <profiles>
24.96 - <profile>
24.97 - <id>fxbrwsr</id>
24.98 - <activation>
24.99 - <activeByDefault>true</activeByDefault>
24.100 - </activation>
24.101 - <build>
24.102 - <plugins>
24.103 - <plugin>
24.104 - <artifactId>maven-assembly-plugin</artifactId>
24.105 - <version>2.4</version>
24.106 - <executions>
24.107 - <execution>
24.108 - <id>distro-assembly</id>
24.109 - <phase>package</phase>
24.110 - <goals>
24.111 - <goal>single</goal>
24.112 - </goals>
24.113 - <configuration>
24.114 - <descriptors>
24.115 - <descriptor>src/main/assembly/html.java.net.xml</descriptor>
24.116 - </descriptors>
24.117 - </configuration>
24.118 - </execution>
24.119 - </executions>
24.120 - </plugin>
24.121 - </plugins>
24.122 - </build>
24.123 - <dependencies>
24.124 - <dependency>
24.125 - <groupId>org.netbeans.html</groupId>
24.126 - <artifactId>ko4j</artifactId>
24.127 - <version>${net.java.html.version}</version>
24.128 - <scope>runtime</scope>
24.129 - </dependency>
24.130 - <dependency>
24.131 - <groupId>org.netbeans.html</groupId>
24.132 - <artifactId>net.java.html.boot.fx</artifactId>
24.133 - <version>${net.java.html.version}</version>
24.134 - <scope>runtime</scope>
24.135 - </dependency>
24.136 - </dependencies>
24.137 - </profile>
24.138 - <profile>
24.139 - <id>bck2brwsr</id>
24.140 - <activation>
24.141 - <property>
24.142 - <name>brwsr</name>
24.143 - <value>bck2brwsr</value>
24.144 - </property>
24.145 - </activation>
24.146 - <build>
24.147 - <plugins>
24.148 - <plugin>
24.149 - <groupId>org.apache.maven.plugins</groupId>
24.150 - <artifactId>maven-compiler-plugin</artifactId>
24.151 - <configuration>
24.152 - <compilerArguments>
24.153 - <bootclasspath>netbeans.ignore.jdk.bootclasspath</bootclasspath>
24.154 - </compilerArguments>
24.155 - <testExcludes>
24.156 - <exclude>**/JsInteractionTest*</exclude>
24.157 - </testExcludes>
24.158 - </configuration>
24.159 - </plugin>
24.160 - <plugin>
24.161 - <groupId>org.apidesign.bck2brwsr</groupId>
24.162 - <artifactId>bck2brwsr-maven-plugin</artifactId>
24.163 - <version>${bck2brwsr.version}</version>
24.164 - <executions>
24.165 - <execution>
24.166 - <goals>
24.167 - <goal>brwsr</goal>
24.168 - </goals>
24.169 - </execution>
24.170 - </executions>
24.171 - <configuration>
24.172 - <directory>${basedir}/src/main/webapp/</directory>
24.173 - <startpage>${brwsr.startpage}</startpage>
24.174 - </configuration>
24.175 - </plugin>
24.176 - <plugin>
24.177 - <groupId>org.apache.maven.plugins</groupId>
24.178 - <artifactId>maven-compiler-plugin</artifactId>
24.179 - <configuration>
24.180 - <compilerArguments>
24.181 - <bootclasspath>netbeans.ignore.jdk.bootclasspath</bootclasspath>
24.182 - </compilerArguments>
24.183 - </configuration>
24.184 - </plugin>
24.185 - <plugin>
24.186 - <artifactId>maven-assembly-plugin</artifactId>
24.187 - <version>2.4</version>
24.188 - <executions>
24.189 - <execution>
24.190 - <id>distro-assembly</id>
24.191 - <phase>package</phase>
24.192 - <goals>
24.193 - <goal>single</goal>
24.194 - </goals>
24.195 - <configuration>
24.196 - <descriptors>
24.197 - <descriptor>src/main/assembly/bck2brwsr.xml</descriptor>
24.198 - </descriptors>
24.199 - </configuration>
24.200 - </execution>
24.201 - </executions>
24.202 - </plugin>
24.203 - </plugins>
24.204 - </build>
24.205 - <dependencies>
24.206 - <dependency>
24.207 - <groupId>org.apidesign.bck2brwsr</groupId>
24.208 - <artifactId>emul</artifactId>
24.209 - <version>${bck2brwsr.version}</version>
24.210 - <classifier>rt</classifier>
24.211 - </dependency>
24.212 - <dependency>
24.213 - <groupId>org.apidesign.bck2brwsr</groupId>
24.214 - <artifactId>ko-bck2brwsr</artifactId>
24.215 - <version>${bck2brwsr.version}</version>
24.216 - <scope>runtime</scope>
24.217 - </dependency>
24.218 - <dependency>
24.219 - <groupId>org.apidesign.bck2brwsr</groupId>
24.220 - <artifactId>vm4brwsr</artifactId>
24.221 - <classifier>js</classifier>
24.222 - <type>zip</type>
24.223 - <version>${bck2brwsr.version}</version>
24.224 - <scope>provided</scope>
24.225 - </dependency>
24.226 - </dependencies>
24.227 - </profile>
24.228 - </profiles>
24.229 -</project>