[nbgriffonsuite~subversion:2] Initial revision of Griffon Plugin
- From: GWiel@kenai.com
- To: commits@nbgriffonsuite.kenai.com
- Subject: [nbgriffonsuite~subversion:2] Initial revision of Griffon Plugin
- Date: Tue, 28 Jul 2009 18:18:17 +0000
Project: nbgriffonsuite
Repository: subversion
Revision: 2
Author: GWiel
Date: 2009-07-28 18:18:12 UTC
Link:
Log Message:
------------
Initial revision of Griffon Plugin
Revisions:
----------
2
Modified Paths:
---------------
GriffonSuite
Added Paths:
------------
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/resources/UnitTest.html
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy/griffon/api/GrailsPlatform.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/GriffonServerState.java
GriffonSuite/groovy.griffonproject/nbproject/project.properties
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui/GrailsLogicalViewProvider.java
GriffonSuite/groovy.griffon/nbproject/project.properties
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/resources/TagLib.html
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/Bundle.properties
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/templates/GrailsTargetChooserPanelGUI.form
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/commands/GrailsCommandSupport.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui/wizards/PanelConfigureProject.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui/wizards/SettingsPanel.java
GriffonSuite/build.xml
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/templates/GrailsTargetChooserPanelGUI.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/actions
GriffonSuite/groovy.griffon/nbproject/project.xml
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/resources/emptyProject.html
GriffonSuite/groovy.griffon/build.xml
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/resources/Mvc.html
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/templates/GrailsTargetChooserPanel.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/GriffonProjectOperations.java
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy/griffon/api/GrailsEnvironment.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui/wizards/PanelConfigureProjectVisual.form
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/actions/RefreshProjectRunnable.java
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy/griffon/settings/GriffonPanel.form
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy/griffon/layer.xml
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui/wizards/NewGrailsProjectWizardIterator.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/SourceCategory.java
GriffonSuite/groovy.griffonproject/test/unit
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/config
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui/wizards/ProgressLineProcessor.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/classpath
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/resources/desktop.html
GriffonSuite/nbproject/project.xml
GriffonSuite/groovy.griffonproject/test/unit/src
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/classpath/SourcePathImplementation.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui/wizards/PanelOptionsVisual.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui/wizards/PanelConfigureProjectVisual.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/actions/ConfigurationSupport.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/layer.xml
GriffonSuite/groovy.griffonproject/src/org
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy/griffon
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/resources/layer.xml
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/resources/Bundle.properties
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/actions/GrailsCommandAction.java
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy/griffon/settings/GriffonOptionsPanelController.java
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy/griffon/api/ExecutionSupport.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui/wizards/PanelProjectLocationVisual.form
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/actions/GotoViewAction.java
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy/griffon/api/Bundle.properties
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/GriffonSources.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/resources/GantScript.html
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/actions/ResolvePluginsAction.java
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy/griffon/settings/GriffonPanel.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/classpath/BootClassPathImplementation.java
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy/griffon/api/GrailsConstants.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/resources/Controller.html
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/commands/GrailsCommandChooser.java
GriffonSuite/nbproject/platform.properties
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/plugins
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui/wizards/Bundle.properties
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy/griffon/settings
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/resources/CreatePlugin.html
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/templates
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui/wizards/PanelProjectLocationVisual.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/resources/DomainClass.html
GriffonSuite/groovy.griffon/nbproject/suite.properties
GriffonSuite/groovy.griffonproject/test
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/resources/IntegrationTest.html
GriffonSuite/groovy.griffon
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy
GriffonSuite/groovy.griffon/src
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/commands/Bundle.properties
GriffonSuite/groovy.griffonproject/build.xml
GriffonSuite/groovy.griffonproject/nbproject/genfiles.properties
GriffonSuite/groovy.griffon/nbproject/build-impl.xml
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/commands
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/GriffonProjectSettings.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/commands/GrailsCommand.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ProgressSupport.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/plugins/GrailsPluginSupport.java
GriffonSuite/groovy.griffonproject
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui/Bundle.properties
GriffonSuite/groovy.griffon/manifest.mf
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy/griffon/GriffonRuntimeHelper.java
GriffonSuite/groovy.griffon/src/org/netbeans/modules
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy/griffon/KillableProcess.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/GriffonProject.java
GriffonSuite/groovy.griffon/nbproject
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/plugins/Bundle.properties
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/plugins/GrailsPlugin.java
GriffonSuite/groovy.griffonproject/nbproject/build-impl.xml
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/GriffonCustomScriptProvider.java
GriffonSuite/groovy.griffon/nbproject/genfiles.properties
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/templates/NewGrailsArtifactWizardIterator.java
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy/griffon/api/GrailsProjectConfig.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/actions/Bundle.properties
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy/griffon/settings/Bundle.properties
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/classpath/ClassPathProviderImpl.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/actions/GotoDomainClassAction.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/queries/GrailsProjectEncodingQueryImpl.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/NavigationSupport.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/resources/GriffonIcon16x16.png
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/actions/GenerateViewsAction.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/GriffonConstants.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/actions/GenerateAction.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui/GrailsPluginsPanel.form
GriffonSuite/groovy.griffonproject/src
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/queries
GriffonSuite/groovy.griffonproject/src/org/netbeans
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/actions/ManagePluginsAction.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/actions/GotoControllerAction.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui/SourceNodeFactory.java
GriffonSuite/nbproject/genfiles.properties
GriffonSuite/groovy.griffonproject/manifest.mf
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/classpath/ProjectClassPathImplementation.java
GriffonSuite/groovy.griffon/src/org
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/templates/GrailsTemplates.java
GriffonSuite/nbproject/project.properties
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/actions/GenerateAllAction.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/commands/GrailsCommandChooser.form
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/classpath/SourceRoots.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/resources/Service.html
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy/griffon/settings/GriffonSettings.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/GriffonActionProvider.java
GriffonSuite/groovy.griffonproject/nbproject
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/config/BuildConfig.java
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy/griffon/ProcessInputStream.java
GriffonSuite/nbproject/build-impl.xml
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/GriffonProjectFactory.java
GriffonSuite/groovy.griffonproject/nbproject/project.xml
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/templates/Bundle.properties
GriffonSuite/groovy.griffonproject/nbproject/platform.properties
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy/griffon/Bundle.properties
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/templates/GrailsArtifacts.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui/wizards
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui/GrailsPluginsPanel.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui/TreeRootNode.java
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/resources/packageBadge.gif
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/resources
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui/wizards/PanelOptionsVisual.form
GriffonSuite/nbproject
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui
GriffonSuite/groovy.griffonproject/nbproject/suite.properties
GriffonSuite/groovy.griffon/src/org/netbeans
GriffonSuite/groovy.griffon/src/org/netbeans/modules/groovy/griffon/api
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ui/TemplatesImpl.java
Diffs:
------
Index: GriffonSuite/groovy.griffonproject/nbproject/platform.properties
===================================================================
--- GriffonSuite/groovy.griffonproject/nbproject/platform.properties
(revision 0)
+++ GriffonSuite/groovy.griffonproject/nbproject/platform.properties
(revision 2)
@@ -0,0 +1,16 @@
+cluster.path=\
+ ${nbplatform.active.dir}/nb:\
+ ${nbplatform.active.dir}/ergonomics:\
+ ${nbplatform.active.dir}/websvccommon:\
+ ${nbplatform.active.dir}/mobility:\
+ ${nbplatform.active.dir}/enterprise:\
+ ${nbplatform.active.dir}/profiler:\
+ ${nbplatform.active.dir}/identity:\
+ ${nbplatform.active.dir}/java:\
+ ${nbplatform.active.dir}/platform:\
+ ${nbplatform.active.dir}/apisupport:\
+ ${nbplatform.active.dir}/ide:\
+ ${nbplatform.active.dir}/groovy:\
+ ${nbplatform.active.dir}/webcommon:\
+ ${nbplatform.active.dir}/harness
+nbplatform.active=default
Index: GriffonSuite/groovy.griffonproject/nbproject/project.properties
===================================================================
--- GriffonSuite/groovy.griffonproject/nbproject/project.properties
(revision 0)
+++ GriffonSuite/groovy.griffonproject/nbproject/project.properties
(revision 2)
@@ -0,0 +1,2 @@
+javac.source=1.5
+javac.compilerargs=-Xlint -Xlint:-serial
Index: GriffonSuite/groovy.griffonproject/nbproject/suite.properties
===================================================================
--- GriffonSuite/groovy.griffonproject/nbproject/suite.properties
(revision 0)
+++ GriffonSuite/groovy.griffonproject/nbproject/suite.properties
(revision 2)
@@ -0,0 +1 @@
+suite.dir=${basedir}/..
Index: GriffonSuite/groovy.griffonproject/nbproject/project.xml
===================================================================
--- GriffonSuite/groovy.griffonproject/nbproject/project.xml (revision 0)
+++ GriffonSuite/groovy.griffonproject/nbproject/project.xml (revision 2)
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.apisupport.project</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
+
<code-name-base>org.netbeans.modules.groovy.griffonproject</code-name-base>
+ <suite-component/>
+ <module-dependencies>
+ <dependency>
+ <code-name-base>org.jdesktop.layout</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <release-version>1</release-version>
+ <specification-version>1.4</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+ <code-name-base>org.netbeans.api.java</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <release-version>1</release-version>
+ <specification-version>1.18</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+
<code-name-base>org.netbeans.api.java.classpath</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <release-version>1</release-version>
+ <specification-version>1.0</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+
<code-name-base>org.netbeans.api.progress</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <release-version>1</release-version>
+ <specification-version>1.10</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+
<code-name-base>org.netbeans.module.groovy.griffon</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <specification-version>1.0</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+
<code-name-base>org.netbeans.modules.csl.api</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <release-version>1</release-version>
+ <specification-version>1.8</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+
<code-name-base>org.netbeans.modules.editor</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <release-version>3</release-version>
+ <specification-version>1.41</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+
<code-name-base>org.netbeans.modules.editor.lib</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <release-version>1</release-version>
+ <specification-version>1.28</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+
<code-name-base>org.netbeans.modules.extexecution</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <release-version>2</release-version>
+ <specification-version>1.13</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+
<code-name-base>org.netbeans.modules.groovy.support</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <implementation-version/>
+ </run-dependency>
+ </dependency>
+ <dependency>
+
<code-name-base>org.netbeans.modules.java.platform</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <release-version>1</release-version>
+ <specification-version>1.9</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+
<code-name-base>org.netbeans.modules.java.project</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <release-version>1</release-version>
+ <specification-version>1.21</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+
<code-name-base>org.netbeans.modules.options.api</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <release-version>1</release-version>
+ <specification-version>1.6</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+
<code-name-base>org.netbeans.modules.options.editor</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <release-version>1</release-version>
+ <implementation-version/>
+ </run-dependency>
+ </dependency>
+ <dependency>
+
<code-name-base>org.netbeans.modules.projectapi</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <release-version>1</release-version>
+ <specification-version>1.13</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+
<code-name-base>org.netbeans.modules.projectuiapi</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <release-version>1</release-version>
+ <specification-version>1.31</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+
<code-name-base>org.netbeans.modules.queries</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <release-version>1</release-version>
+ <specification-version>1.10</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+ <code-name-base>org.openide.actions</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <specification-version>6.6</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+ <code-name-base>org.openide.awt</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <specification-version>6.11</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+ <code-name-base>org.openide.dialogs</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <specification-version>7.8</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+ <code-name-base>org.openide.execution</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <specification-version>1.10</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+ <code-name-base>org.openide.filesystems</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <specification-version>7.20</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+ <code-name-base>org.openide.io</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <specification-version>1.11</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+ <code-name-base>org.openide.loaders</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <specification-version>6.4</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+ <code-name-base>org.openide.nodes</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <specification-version>7.0</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+ <code-name-base>org.openide.util</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <specification-version>7.15</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+ <code-name-base>org.openide.windows</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <specification-version>6.24</specification-version>
+ </run-dependency>
+ </dependency>
+ <dependency>
+ <code-name-base>org.openidex.util</code-name-base>
+ <build-prerequisite/>
+ <compile-dependency/>
+ <run-dependency>
+ <release-version>3</release-version>
+ <specification-version>3.14</specification-version>
+ </run-dependency>
+ </dependency>
+ </module-dependencies>
+ <public-packages/>
+ </data>
+ </configuration>
+</project>
Index: GriffonSuite/groovy.griffonproject/nbproject/genfiles.properties
===================================================================
--- GriffonSuite/groovy.griffonproject/nbproject/genfiles.properties
(revision 0)
+++ GriffonSuite/groovy.griffonproject/nbproject/genfiles.properties
(revision 2)
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=084626ec
+build.xml.script.CRC32=6b91c3b9
+build.xml.stylesheet.CRC32=79c3b980@1.28.1.7
+# This file is used by a NetBeans-based IDE to track changes in generated
files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never
regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=084626ec
+nbproject/build-impl.xml.script.CRC32=41f6d3bb
+nbproject/build-impl.xml.stylesheet.CRC32=261c4bef@1.28.1.7
Index: GriffonSuite/groovy.griffonproject/nbproject/build-impl.xml
===================================================================
--- GriffonSuite/groovy.griffonproject/nbproject/build-impl.xml (revision 0)
+++ GriffonSuite/groovy.griffonproject/nbproject/build-impl.xml (revision 2)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT ***
+*** EDIT ../build.xml INSTEAD ***
+-->
+<project name="org.netbeans.modules.groovy.griffonproject-impl" basedir="..">
+ <fail message="Please build using Ant 1.7.1 or higher.">
+ <condition>
+ <not>
+ <antversion atleast="1.7.1"/>
+ </not>
+ </condition>
+ </fail>
+ <property file="nbproject/private/suite-private.properties"/>
+ <property file="nbproject/suite.properties"/>
+ <fail unless="suite.dir">You must set 'suite.dir' to point to your
containing module suite</fail>
+ <property
file="${suite.dir}/nbproject/private/platform-private.properties"/>
+ <property file="${suite.dir}/nbproject/platform.properties"/>
+ <macrodef name="property"
uri="http://www.netbeans.org/ns/nb-module-project/2">
+ <attribute name="name"/>
+ <attribute name="value"/>
+ <sequential>
+ <property name="@{name}" value="${@{value}}"/>
+ </sequential>
+ </macrodef>
+ <macrodef name="evalprops"
uri="http://www.netbeans.org/ns/nb-module-project/2">
+ <attribute name="property"/>
+ <attribute name="value"/>
+ <sequential>
+ <property name="@{property}" value="@{value}"/>
+ </sequential>
+ </macrodef>
+ <property file="${user.properties.file}"/>
+ <nbmproject2:property name="harness.dir"
value="nbplatform.${nbplatform.active}.harness.dir"
xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
+ <nbmproject2:property name="nbplatform.active.dir"
value="nbplatform.${nbplatform.active}.netbeans.dest.dir"
xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
+ <nbmproject2:evalprops property="cluster.path.evaluated"
value="${cluster.path}"
xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
+ <fail message="Path to 'platform' cluster missing in $${cluster.path}
property or using corrupt Netbeans Platform (missing harness).">
+ <condition>
+ <not>
+ <contains string="${cluster.path.evaluated}"
substring="platform"/>
+ </not>
+ </condition>
+ </fail>
+ <import file="${harness.dir}/build.xml"/>
+</project>
Property changes on: GriffonSuite/groovy.griffonproject/nbproject
___________________________________________________________________
Added: svn:ignore
+ private
Index: GriffonSuite/groovy.griffonproject/manifest.mf
===================================================================
--- GriffonSuite/groovy.griffonproject/manifest.mf (revision 0)
+++ GriffonSuite/groovy.griffonproject/manifest.mf (revision 2)
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+OpenIDE-Module: org.netbeans.modules.groovy.griffonproject
+OpenIDE-Module-Layer: org/netbeans/modules/groovy/griffonproject/layer.xml
+OpenIDE-Module-Localizing-Bundle:
org/netbeans/modules/groovy/griffonproject/Bundle.properties
+OpenIDE-Module-Specification-Version: 2.0
+
Index:
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/plugins/GrailsPlugin.java
===================================================================
---
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/plugins/GrailsPlugin.java
(revision 0)
+++
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/plugins/GrailsPlugin.java
(revision 2)
@@ -0,0 +1,132 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+ * Development and Distribution License("CDDL") (collectively, the
+ * "License"). You may not use this file except in compliance with the
+ * License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html
+ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+ * specific language governing permissions and limitations under the
+ * License. When distributing the software, include this License Header
+ * Notice in each file and include the License file at
+ * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the
+ * License Header, with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+ * or only the GPL Version 2, indicate your decision by adding
+ * "[Contributor] elects to include this software in this distribution
+ * under the [CDDL or GPL Version 2] license." If you do not indicate a
+ * single choice of license, a recipient has the option to distribute
+ * your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above.
+ * However, if you add GPL Version 2 code and therefore, elected the GPL
+ * Version 2 license, then the option applies only if the new code is
+ * made subject to such option by the copyright holder.
+ *
+ * Contributor(s):
+ *
+ * Portions Copyrighted 2008 Sun Microsystems, Inc.
+ */
+
+package org.netbeans.modules.groovy.griffonproject.plugins;
+
+/**
+ * plugin pojo class
+ *
+ * @author David Calavera
+ */
+public class GrailsPlugin implements Comparable<GrailsPlugin> {
+ private final String name;
+ private final String version;
+ private final String description;
+ private final String path;
+ private final String dirName;
+ private final String zipName;
+
+ public GrailsPlugin(String name, String version, String description) {
+ this(name, version, description, null);
+ }
+
+ // FIXME null values
+ public GrailsPlugin(String name, String version, String description,
String path) {
+ this.name = name;
+ this.version = version;
+ this.description = description;
+ this.path = path;
+ this.dirName = name + "-" + version;
+ this.zipName = "grails-" + dirName + ".zip";
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public String getDirName() {
+ return dirName;
+ }
+
+ public String getZipName() {
+ return zipName;
+ }
+
+ @Override
+ public String toString() {
+ String toS = getName();
+ if (getVersion() != null && getVersion().trim().length() > 0) {
+ toS += "(" + getVersion().trim() + ")";
+ }
+ if (getDescription() != null && getDescription().trim().length() > 0
+ && !getDescription().trim().equals("No description
available")) {
+ toS += " -- " + getDescription().trim();
+ }
+ return toS;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final GrailsPlugin other = (GrailsPlugin) obj;
+ if (this.name != other.name && (this.name == null ||
!this.name.equalsIgnoreCase(other.name))) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hash = 7;
+ hash = 97 * hash + (this.name != null ?
this.name.toUpperCase().hashCode() : 0);
+ return hash;
+ }
+
+ public int compareTo(GrailsPlugin o) {
+ return name.compareToIgnoreCase(o.name);
+ }
+
+}
Index:
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/plugins/Bundle.properties
===================================================================
---
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/plugins/Bundle.properties
(revision 0)
+++
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/plugins/Bundle.properties
(revision 2)
@@ -0,0 +1,5 @@
+PluginInstallPleaseWait=Installing {0} plugin
+PluginUninstallPleaseWait=Uninstalling {0} plugin
+Installation=Installing plugins
+Uninstallation=Uninstalling plugins
+InstallingPluginPanel.plugin=Plugin
Index:
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/plugins/GrailsPluginSupport.java
===================================================================
---
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/plugins/GrailsPluginSupport.java
(revision 0)
+++
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/plugins/GrailsPluginSupport.java
(revision 2)
@@ -0,0 +1,460 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+ * Development and Distribution License("CDDL") (collectively, the
+ * "License"). You may not use this file except in compliance with the
+ * License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html
+ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+ * specific language governing permissions and limitations under the
+ * License. When distributing the software, include this License Header
+ * Notice in each file and include the License file at
+ * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the
+ * License Header, with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+ * or only the GPL Version 2, indicate your decision by adding
+ * "[Contributor] elects to include this software in this distribution
+ * under the [CDDL or GPL Version 2] license." If you do not indicate a
+ * single choice of license, a recipient has the option to distribute
+ * your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above.
+ * However, if you add GPL Version 2 code and therefore, elected the GPL
+ * Version 2 license, then the option applies only if the new code is
+ * made subject to such option by the copyright holder.
+ *
+ * Contributor(s):
+ *
+ * Portions Copyrighted 2008 Sun Microsystems, Inc.
+ */
+
+package org.netbeans.modules.groovy.griffonproject.plugins;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.Dialog;
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CancellationException;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.logging.Logger;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+import javax.swing.SwingUtilities;
+import org.netbeans.api.project.ProjectInformation;
+import org.netbeans.api.extexecution.ExecutionDescriptor;
+import org.netbeans.api.extexecution.ExecutionService;
+import org.netbeans.api.extexecution.input.InputProcessor;
+import org.netbeans.api.extexecution.input.InputProcessors;
+import org.netbeans.api.extexecution.input.LineProcessor;
+import org.netbeans.api.progress.ProgressHandle;
+import org.netbeans.api.progress.ProgressHandleFactory;
+import org.netbeans.modules.groovy.griffon.api.ExecutionSupport;
+import org.netbeans.modules.groovy.griffon.api.GrailsProjectConfig;
+import org.netbeans.modules.groovy.griffon.api.GrailsPlatform;
+import org.netbeans.modules.groovy.griffon.api.GrailsPlatform.Version;
+import org.netbeans.modules.groovy.griffonproject.GriffonProject;
+import org.netbeans.modules.groovy.griffonproject.ProgressSupport;
+import
org.netbeans.modules.groovy.griffonproject.ProgressSupport.ProgressDialogDescriptor;
+import
org.netbeans.modules.groovy.griffonproject.actions.RefreshProjectRunnable;
+import org.openide.DialogDisplayer;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openide.util.Exceptions;
+import org.openide.util.NbBundle;
+import org.openide.xml.XMLUtil;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
+
+/**
+ *
+ * @author David Calavera, Petr Hejl
+ */
+public class GrailsPluginSupport {
+
+ private static Logger LOGGER =
Logger.getLogger(GrailsPluginSupport.class.getName());
+
+ private final GriffonProject project;
+
+ public GrailsPluginSupport(GriffonProject project) {
+ this.project = project;
+ }
+
+ public List<GrailsPlugin> refreshAvailablePlugins() throws
InterruptedException {
+ final String command = "list-plugins"; // NOI18N
+
+ final ProjectInformation inf =
project.getLookup().lookup(ProjectInformation.class);
+ final String displayName = inf.getDisplayName() + " (" + command +
")"; // NOI18N
+
+ final Callable<Process> callable =
ExecutionSupport.getInstance().createSimpleCommand(
+ command, GrailsProjectConfig.forProject(project));
+
+ final PluginProcessor processor = new PluginProcessor();
+ ExecutionDescriptor descriptor = new
ExecutionDescriptor().frontWindow(true);
+ descriptor = descriptor.outProcessorFactory(new
ExecutionDescriptor.InputProcessorFactory() {
+ public InputProcessor newInputProcessor(InputProcessor
defaultProcessor) {
+ return InputProcessors.proxy(defaultProcessor,
InputProcessors.bridge(processor));
+ }
+ });
+
+ ExecutionService service = ExecutionService.newService(callable,
descriptor, displayName);
+ Future<Integer> task = service.run();
+ try {
+ task.get();
+ } catch (InterruptedException ex) {
+ task.cancel(true);
+ throw ex;
+ } catch (ExecutionException ex) {
+ Exceptions.printStackTrace(ex.getCause());
+ }
+
+ return processor.getPlugins();
+ }
+
+ public List<GrailsPlugin> loadInstalledPlugins() {
+ Version version = GrailsPlatform.getDefault().getVersion();
+ if (Version.VERSION_1_1.compareTo(version) <= 0) {
+ return loadInstalledPlugins11();
+ }
+ return loadInstalledPlugins10();
+ }
+
+ private List<GrailsPlugin> loadInstalledPlugins10() {
+ List<GrailsPlugin> plugins = new ArrayList<GrailsPlugin>();
+ try {
+ FileObject pluginsDir =
project.getProjectDirectory().getFileObject("plugins"); //NOI18N
+ if (pluginsDir != null && pluginsDir.isFolder()) {
+ pluginsDir.refresh();
+ for (FileObject child : pluginsDir.getChildren()) {
+ if (child.isFolder()) {
+ FileObject descriptor =
child.getFileObject("plugin.xml"); //NOI18N
+ if (descriptor != null && descriptor.canRead()) {
+
plugins.add(getPluginFromInputStream(descriptor.getInputStream(), null));
+ }
+ }
+ }
+ }
+ } catch (Exception ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ Collections.sort(plugins);
+ return plugins;
+ }
+
+ public List<GrailsPlugin> loadInstalledPlugins11() {
+ List<GrailsPlugin> plugins = new ArrayList<GrailsPlugin>();
+ try {
+ FileObject propertiesFile =
project.getProjectDirectory().getFileObject("application.properties");
//NOI18N
+ if (propertiesFile != null && propertiesFile.isData()) {
+ Properties props = new Properties();
+ InputStream is = new
BufferedInputStream(propertiesFile.getInputStream());
+ try {
+ props.load(is);
+
+ for (Enumeration e = props.propertyNames();
e.hasMoreElements();) {
+ String name = (String) e.nextElement();
+ if (name.startsWith("plugins.")) { // NOI18N
+ String value = props.getProperty(name);
+ name = name.substring("plugins.".length()); //
NOI18N
+ plugins.add(new GrailsPlugin(name, value, null));
+ }
+ }
+
+ } finally {
+ is.close();
+ }
+ }
+ } catch (Exception ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ Collections.sort(plugins);
+ return plugins;
+ }
+
+ public boolean uninstallPlugins(Collection<GrailsPlugin>
selectedPlugins) {
+ Version version = GrailsPlatform.getDefault().getVersion();
+ if (Version.VERSION_1_1.compareTo(version) <= 0) {
+ return uninstallPlugins11(selectedPlugins);
+ }
+
+ return uninstallPlugins10(selectedPlugins);
+ }
+
+ private boolean uninstallPlugins10(Collection<GrailsPlugin>
selectedPlugins) {
+ if (selectedPlugins != null && selectedPlugins.size() > 0) {
+ final FileObject pluginsDir =
project.getProjectDirectory().getFileObject("plugins"); //NO I18N
+ if (pluginsDir != null && pluginsDir.isFolder() &&
pluginsDir.canWrite()) {
+ pluginsDir.refresh();
+ try {
+ for (GrailsPlugin plugin : selectedPlugins) {
+ FileObject pluginDir =
pluginsDir.getFileObject(plugin.getDirName());
+ if (pluginDir != null && pluginDir.isValid()) {
+ pluginDir.delete();
+ }
+ FileObject pluginZipFile =
pluginsDir.getFileObject(plugin.getZipName());
+ if (pluginZipFile != null &&
pluginZipFile.isValid()) {
+ pluginZipFile.delete();
+ }
+ }
+ } catch (Exception ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ }
+ }
+ return true;
+ }
+
+ private boolean uninstallPlugins11(final Collection<GrailsPlugin>
selectedPlugins) {
+ return handlePlugins(selectedPlugins, true);
+ }
+
+ public boolean installPlugins(final Collection<GrailsPlugin>
selectedPlugins) {
+ return handlePlugins(selectedPlugins, false);
+ }
+
+ private boolean handlePlugins(final Collection<GrailsPlugin>
selectedPlugins, boolean uninstall) {
+ assert SwingUtilities.isEventDispatchThread();
+
+ if (!(selectedPlugins != null && selectedPlugins.size() > 0)) {
+ return false;
+ }
+
+ boolean installed = true;
+
+ final GrailsPlatform platform =
GrailsProjectConfig.forProject(project).getGrailsPlatform();
+ final ExecutorService executor = Executors.newFixedThreadPool(1);
+ try {
+ for (GrailsPlugin plugin : selectedPlugins) {
+ String title = NbBundle.getMessage(GrailsPluginSupport.class,
+ uninstall ? "Uninstallation" : "Installation");
+ String message =
NbBundle.getMessage(GrailsPluginSupport.class,
+ uninstall ? "PluginUninstallPleaseWait" :
"PluginInstallPleaseWait", plugin.getName());
+ ProgressHandle handle =
ProgressHandleFactory.createHandle(message);
+
+ ProgressDialogDescriptor descriptor =
ProgressSupport.createProgressDialog(title, handle, null);
+ final Dialog dlg =
DialogDisplayer.getDefault().createDialog(descriptor);
+
+ descriptor.addCancelListener(new ActionListener() {
+
+ public void actionPerformed(ActionEvent e) {
+ dlg.setVisible(false);
+ dlg.dispose();
+ }
+ });
+
+ // FIXME should it be FS atomic action ?
+ Callable<Boolean> runner =
getPluginHandlerCallable(platform, plugin, descriptor, dlg, uninstall);
+
+ final Future<Boolean> result = executor.submit(runner);
+
+ handle.start();
+ handle.progress(message);
+
+ dlg.setVisible(true);
+
+ try {
+ installed = installed && result.get().booleanValue();
+ } catch (InterruptedException ex) {
+ Thread.currentThread().interrupt();
+ break;
+ } catch (ExecutionException ex) {
+ Exceptions.printStackTrace(ex.getCause() != null ?
ex.getCause() : ex);
+ } finally {
+ handle.finish();
+ }
+ }
+ } finally {
+ executor.shutdown();
+
+ // TODO if we will support global plugins we have to refresh
global plugins dir as well
+
FileUtil.refreshFor(project.getBuildConfig().getProjectPluginsDir());
+ }
+ return installed;
+ }
+
+ private Callable<Boolean> getPluginHandlerCallable(final GrailsPlatform
platform, final GrailsPlugin plugin,
+ final ProgressDialogDescriptor desc, final Dialog dlg, final
boolean uninstall) {
+ final String command = uninstall ? "uninstall-plugin" :
"install-plugin"; // NOI18N
+
+ return new Callable<Boolean>() {
+ public Boolean call() {
+ ProjectInformation inf =
project.getLookup().lookup(ProjectInformation.class);
+ String displayName = inf.getDisplayName() + " (" + command +
")"; // NOI18N
+
+ List<String> args = new ArrayList<String>(3);
+ if
(GrailsPlatform.Version.VERSION_1_1.compareTo(platform.getVersion()) <= 0) {
+ args.add("--non-interactive"); // NOI18N
+ }
+ if (plugin.getPath() == null) {
+ args.add(plugin.getName());
+ args.add(plugin.getVersion());
+ } else {
+ args.add(plugin.getPath());
+ }
+
+ Callable<Process> callable =
ExecutionSupport.getInstance().createSimpleCommand(
+ command, GrailsProjectConfig.forProject(project),
args.toArray(new String[args.size()]));
+ ExecutionDescriptor descriptor = new
ExecutionDescriptor().frontWindow(true)
+ .postExecution(new RefreshProjectRunnable(project));
+
+ ExecutionService service =
ExecutionService.newService(callable, descriptor, displayName);
+ final Future<Integer> future = service.run();
+
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ desc.addCancelListener(new ActionListener() {
+ public void actionPerformed(ActionEvent ev) {
+ future.cancel(true);
+ }
+ });
+ }
+ });
+
+ boolean broken = false;
+ boolean interrupted = false;
+ try {
+ try {
+ Integer retValue = future.get();
+ if (retValue.intValue() != 0) {
+ broken = true;
+ }
+ } catch (InterruptedException ex) {
+ interrupted = true;
+ future.cancel(true);
+ broken = true;
+ } catch (ExecutionException ex) {
+ broken = true;
+ Exceptions.printStackTrace(ex.getCause() != null ?
ex.getCause() : ex);
+ } catch (CancellationException ex) {
+ broken = true;
+ }
+
+// FIXME we would need some silent uninstall for this (not the case for 1.1)
+// if (!uninstall && broken) {
+//
uninstallPlugins(Collections.singletonList(plugin));
+// }
+
+ return !broken;
+ } finally {
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ dlg.setVisible(false);
+ dlg.dispose();
+ }
+ });
+ if (interrupted) {
+ Thread.currentThread().interrupt();
+ }
+ }
+ }
+ };
+ }
+
+ public GrailsPlugin getPluginFromZipFile(String path) {
+ GrailsPlugin plugin = null;
+ try {
+ final ZipFile file = new ZipFile(new File(path));
+ try {
+ final ZipEntry entry = file.getEntry("plugin.xml"); // NOI18N
+ if (entry != null) {
+ InputStream stream = file.getInputStream(entry);
+ plugin = getPluginFromInputStream(stream, path);
+ }
+ } finally {
+ file.close();
+ }
+ } catch (Exception ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ return plugin;
+ }
+
+ private GrailsPlugin getPluginFromInputStream(InputStream inputStream,
String path) throws Exception {
+ final Document doc = XMLUtil.parse(new InputSource(inputStream),
false, false, null, null);
+ final Node root = doc.getFirstChild();
+ final String name =
root.getAttributes().getNamedItem("name").getTextContent(); //NOI18N
+ String version = null;
+ String description = null;
+ if (root.getAttributes().getNamedItem("version") != null) { //NOI18N
+ version =
root.getAttributes().getNamedItem("version").getTextContent(); //NOI18N
+ }
+ if (doc.getElementsByTagName("title") != null // NOI18N
+ && doc.getElementsByTagName("title").getLength() > 0) {
//NOI18N
+ description = doc.getElementsByTagName("title") // NOI18N
+ .item(0).getTextContent(); //NOI18N
+ }
+ return new GrailsPlugin(name, version, description, path);
+ }
+
+ private static class PluginProcessor implements LineProcessor {
+
+ private final List<GrailsPlugin> plugins =
Collections.synchronizedList(new ArrayList<GrailsPlugin>());
+
+ /**
+ * In 1.1 plugins are listen in following format so the pattern
+ * luckily works. So installed plugins are not captured.
+ *
+ * core repo
+ * ---------------------------------------
+ * name <version> -- description
+ *
+ * default repo
+ * ---------------------------------------
+ * name <version> -- description
+ *
+ * installed
+ * ---------------------------------------
+ * name version -- description
+ */
+ private static final Pattern PLUGIN_PATTERN =
Pattern.compile("(.+)[\\s]+<([\\w\\s.-]+)>[\\s]+--(.+)"); // NOI18N
+
+ public void processLine(String line) {
+ GrailsPlugin plugin = null;
+ final Matcher matcher = PLUGIN_PATTERN.matcher(line);
+ if (matcher.matches()) {
+ if (!"no releases".equals(matcher.group(2))) { //NO I18N
+ plugin = new GrailsPlugin(matcher.group(1).trim(),
matcher.group(2), matcher.group(3));
+ }
+ }
+ if (plugin != null) {
+ plugins.add(plugin);
+ }
+ }
+
+ public void reset() {
+ // noop
+ }
+
+ public void close() {
+ // noop
+ }
+
+ public List<GrailsPlugin> getPlugins() {
+ return plugins;
+ }
+ }
+
+}
Index:
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ProgressSupport.java
===================================================================
---
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ProgressSupport.java
(revision 0)
+++
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/ProgressSupport.java
(revision 2)
@@ -0,0 +1,124 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+ * Development and Distribution License("CDDL") (collectively, the
+ * "License"). You may not use this file except in compliance with the
+ * License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html
+ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+ * specific language governing permissions and limitations under the
+ * License. When distributing the software, include this License Header
+ * Notice in each file and include the License file at
+ * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the
+ * License Header, with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+ * or only the GPL Version 2, indicate your decision by adding
+ * "[Contributor] elects to include this software in this distribution
+ * under the [CDDL or GPL Version 2] license." If you do not indicate a
+ * single choice of license, a recipient has the option to distribute
+ * your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above.
+ * However, if you add GPL Version 2 code and therefore, elected the GPL
+ * Version 2 license, then the option applies only if the new code is
+ * made subject to such option by the copyright holder.
+ *
+ * Contributor(s):
+ *
+ * Portions Copyrighted 2009 Sun Microsystems, Inc.
+ */
+
+package org.netbeans.modules.groovy.griffonproject;
+
+import java.awt.Component;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.event.ActionListener;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.SwingUtilities;
+import org.netbeans.api.progress.ProgressHandle;
+import org.netbeans.api.progress.ProgressHandleFactory;
+import org.openide.DialogDescriptor;
+import org.openide.util.HelpCtx;
+import org.openide.util.NbBundle;
+
+/**
+ *
+ * @author Petr Hejl
+ */
+public class ProgressSupport {
+
+ public static ProgressDialogDescriptor createProgressDialog(String
title, ProgressHandle handle,
+ ActionListener cancelationListener) {
+
+ assert SwingUtilities.isEventDispatchThread();
+
+ Component progress =
ProgressHandleFactory.createProgressComponent(handle);
+ JLabel label =
ProgressHandleFactory.createDetailLabelComponent(handle);
+
+ JPanel panel = new JPanel(new GridBagLayout());
+ panel.setPreferredSize(new java.awt.Dimension(450, 50));
+
+ GridBagConstraints constraintsLabel = new GridBagConstraints();
+ constraintsLabel.gridwidth = java.awt.GridBagConstraints.REMAINDER;
+ constraintsLabel.fill = java.awt.GridBagConstraints.HORIZONTAL;
+ constraintsLabel.anchor = java.awt.GridBagConstraints.WEST;
+ constraintsLabel.weightx = 1.0;
+ constraintsLabel.insets = new java.awt.Insets(8, 8, 0, 8);
+ constraintsLabel.gridx = 0;
+ constraintsLabel.gridy = 0;
+ panel.add(label, constraintsLabel);
+
+ GridBagConstraints constraintsProgress = new
java.awt.GridBagConstraints();
+ constraintsProgress.gridwidth =
java.awt.GridBagConstraints.REMAINDER;
+ constraintsProgress.gridheight =
java.awt.GridBagConstraints.REMAINDER;
+ constraintsProgress.fill = java.awt.GridBagConstraints.HORIZONTAL;
+ constraintsProgress.anchor = java.awt.GridBagConstraints.NORTHWEST;
+ constraintsProgress.weightx = 1.0;
+ constraintsProgress.insets = new java.awt.Insets(6, 8, 8, 8);
+ constraintsProgress.gridx = 0;
+ constraintsProgress.gridy = 1;
+ panel.add(progress, constraintsProgress);
+
+ JButton cancel = new
JButton(NbBundle.getMessage(ProgressSupport.class, "LBL_Cancel"));
+ ProgressDialogDescriptor descriptor = new
ProgressDialogDescriptor(panel, title, true,
+ new JButton[] {cancel}, cancel,
DialogDescriptor.DEFAULT_ALIGN, null, cancelationListener);
+
+ return descriptor;
+ }
+
+ public static class ProgressDialogDescriptor extends DialogDescriptor {
+
+ private final JButton cancelButton;
+
+ private ProgressDialogDescriptor(Object innerPane, String title,
boolean modal,
+ JButton[] options, JButton initialValue, int optionsAlign,
HelpCtx helpCtx, ActionListener bl) {
+
+ super(innerPane, title, modal, options, initialValue,
optionsAlign, helpCtx, bl);
+
+ assert options.length == 1;
+ assert options[0] == initialValue;
+
+ cancelButton = initialValue;
+ }
+
+ public void addCancelListener(ActionListener listener) {
+ cancelButton.addActionListener(listener);
+ }
+
+ public void removeCancelListener(ActionListener listener) {
+ cancelButton.removeActionListener(listener);
+ }
+ }
+}
Index:
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/GriffonProjectSettings.java
===================================================================
---
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/GriffonProjectSettings.java
(revision 0)
+++
GriffonSuite/groovy.griffonproject/src/org/netbeans/modules/groovy/griffonproject/GriffonProjectSettings.java
(revision 2)
@@ -0,0 +1,83 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+ * Development and Distribution License("CDDL") (collectively, the
+ * "License"). You may not use this file except in compliance with the
+ * License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html
+ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+ * specific language governing permissions and limitations under the
+ * License. When distributing the software, include this
[truncated due to length]
|
[nbgriffonsuite~subversion:2] Initial revision of Griffon Plugin |
GWiel | 07/28/2009 |





