You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by ol...@apache.org on 2008/12/20 23:14:35 UTC
svn commit: r728359 [1/2] - in
/continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin: ./ src/
src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/
src/main/java/org/apache/continuum/
src/main/java/org/apache/continuum/plug...
Author: olamy
Date: Sat Dec 20 14:14:34 2008
New Revision: 728359
URL: http://svn.apache.org/viewvc?rev=728359&view=rev
Log:
[CONTINUUM-1817] netbeans continuum plugin
Submitted by Laurent Foret
CLA is here http://people.apache.org/~jim/committers.html
Added:
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/ (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/license.txt (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/pom.xml (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ContinuumClient.java (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ContinuumSettings2.java (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ServerInfo.java (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectGroupNode.java (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectHelper.java (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectNode.java (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/RootNode.java (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ServerNode.java (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ui/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ui/MavenProjectForm.form (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ui/MavenProjectForm.java (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ui/SingleServer.form (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ui/SingleServer.java (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/codehaus/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/codehaus/mevenide/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/codehaus/mevenide/continuum/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/codehaus/mevenide/continuum/forms/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/codehaus/mevenide/continuum/nodes/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/codehaus/mevenide/continuum/options/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/nbm/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/nbm/manifest.mf (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/nbm/module.xml (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/apache/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/apache/continuum/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/apache/continuum/plugins/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/apache/continuum/plugins/netbeans/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/apache/continuum/plugins/netbeans/AntIcon.gif (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/apache/continuum/plugins/netbeans/ContinuumServer.png (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/apache/continuum/plugins/netbeans/Maven2Icon.gif (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/apache/continuum/plugins/netbeans/MavenIcon.gif (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/apache/continuum/plugins/netbeans/ant-freeform.png (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/apache/continuum/plugins/netbeans/continuum-badge.png (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/apache/continuum/plugins/netbeans/layer.xml (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/apache/continuum/plugins/netbeans/nodes/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/apache/continuum/plugins/netbeans/nodes/Bundle.properties (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/apache/continuum/plugins/netbeans/state-error.png (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/apache/continuum/plugins/netbeans/state-ok.png (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/apache/continuum/plugins/netbeans/state-running.png (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/apache/continuum/plugins/netbeans/threeBrands.gif (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/apache/continuum/plugins/netbeans/ui/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/apache/continuum/plugins/netbeans/ui/Bundle.properties (with props)
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/codehaus/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/codehaus/mevenide/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/codehaus/mevenide/continuum/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/codehaus/mevenide/continuum/forms/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/codehaus/mevenide/continuum/nodes/
continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/resources/org/codehaus/mevenide/continuum/nodes/Bundle.properties (with props)
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Dec 20 14:14:34 2008
@@ -0,0 +1 @@
+target
Added: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/license.txt
URL: http://svn.apache.org/viewvc/continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/license.txt?rev=728359&view=auto
==============================================================================
--- continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/license.txt (added)
+++ continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/license.txt Sat Dec 20 14:14:34 2008
@@ -0,0 +1,176 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
\ No newline at end of file
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/license.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/license.txt
------------------------------------------------------------------------------
svn:executable = *
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/license.txt
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/pom.xml
URL: http://svn.apache.org/viewvc/continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/pom.xml?rev=728359&view=auto
==============================================================================
--- continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/pom.xml (added)
+++ continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/pom.xml Sat Dec 20 14:14:34 2008
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.continuum.plugins.netbeans</groupId>
+ <artifactId>continuum-netbeans-plugin</artifactId>
+ <packaging>nbm</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>Continuum :: Netbeans support</name>
+ <description>Support for Apache Continuum continuous integration servers.</description>
+ <properties>
+ <continuum.release>1.2.2</continuum.release>
+ <netbeans.release>RELEASE61</netbeans.release>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-openide-util</artifactId>
+ <version>${netbeans.release}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-openide-io</artifactId>
+ <version>${netbeans.release}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-openide-nodes</artifactId>
+ <version>${netbeans.release}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-openide-dialogs</artifactId>
+ <version>${netbeans.release}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.netbeans.api</groupId>
+ <artifactId>org-jdesktop-layout</artifactId>
+ <version>${netbeans.release}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.java.dev.swing-layout</groupId>
+ <artifactId>swing-layout</artifactId>
+ <version>1.0.2</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.continuum</groupId>
+ <artifactId>continuum-xmlrpc-client</artifactId>
+ <version>${continuum.release}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.continuum</groupId>
+ <artifactId>continuum-xmlrpc-api</artifactId>
+ <version>${continuum.release}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.continuum</groupId>
+ <artifactId>continuum-api</artifactId>
+ <version>${continuum.release}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlrpc</groupId>
+ <artifactId>xmlrpc-client</artifactId>
+ <version>3.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlrpc</groupId>
+ <artifactId>xmlrpc-common</artifactId>
+ <version>3.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ws.commons</groupId>
+ <artifactId>ws-commons-util</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.3</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.3</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <showDeprecation>true</showDeprecation>
+ <compilerVersion>1.5</compilerVersion>
+ <source>1.5</source>
+ <target>1.5</target>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>nbm-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>install</phase>
+ <goals>
+ <goal>nbm</goal>
+ </goals>
+ </execution>
+ </executions>
+ <version>2.7-alpha-2</version>
+ <extensions>true</extensions>
+ <configuration>
+ <descriptor>src/main/nbm/module.xml</descriptor>
+ <keystorealias>continuum-netbeans-plugin</keystorealias>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.netbeans.nbbuild</groupId>
+ <artifactId>tasks</artifactId>
+ <version>6.0</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ <repositories>
+ <repository>
+ <id>netbeans</id>
+ <name>repository hosting netbeans.org api artifacts</name>
+ <url>http://deadlock.netbeans.org/maven2</url>
+ <releases>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </repository>
+ </repositories>
+</project>
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/pom.xml
------------------------------------------------------------------------------
svn:executable = *
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ContinuumClient.java
URL: http://svn.apache.org/viewvc/continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ContinuumClient.java?rev=728359&view=auto
==============================================================================
--- continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ContinuumClient.java (added)
+++ continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ContinuumClient.java Sat Dec 20 14:14:34 2008
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2008 Mevenide Team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * under the License.
+ */
+package org.apache.continuum.plugins.netbeans;
+
+import org.apache.maven.continuum.xmlrpc.client.ContinuumXmlRpcClient;
+import org.openide.util.RequestProcessor;
+
+/**
+ * Facade of the Continuum client.
+ * @author Lo
+ */
+public class ContinuumClient {
+
+ private ServerInfo serverInfo;
+ private ContinuumXmlRpcClient xmlRpcClient;
+ private RequestProcessor queue;
+
+ public ContinuumClient(String serverRawInfo) {
+ this.serverInfo = new ServerInfo(serverRawInfo);
+ this.queue = new RequestProcessor("Continuum server processor", 1);
+ this.xmlRpcClient = new ContinuumXmlRpcClient(serverInfo.getXmlRpcUrl(), serverInfo.getUser(), serverInfo.getPassword());
+ }
+
+ public ContinuumXmlRpcClient getXmlRpcClient() {
+ return xmlRpcClient;
+ }
+
+ public RequestProcessor getQueue() {
+ return queue;
+ }
+
+ public ServerInfo getServerInfo() {
+ return serverInfo;
+ }
+}
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ContinuumClient.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ContinuumClient.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ContinuumClient.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ContinuumSettings2.java
URL: http://svn.apache.org/viewvc/continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ContinuumSettings2.java?rev=728359&view=auto
==============================================================================
--- continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ContinuumSettings2.java (added)
+++ continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ContinuumSettings2.java Sat Dec 20 14:14:34 2008
@@ -0,0 +1,121 @@
+/* ==========================================================================
+ * Copyright 2005 Mevenide Team
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================================================================
+ */
+
+package org.apache.continuum.plugins.netbeans;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.prefs.BackingStoreException;
+import java.util.prefs.Preferences;
+import org.openide.util.HelpCtx;
+import org.openide.util.NbBundle;
+import org.openide.util.NbPreferences;
+
+
+/**
+ * continuum related settings
+ * @author Milos Kleint (mkleint@codehaus.org)
+ */
+public class ContinuumSettings2 {
+
+ public static final String PROP_SERVER = "server"; // NOI18N
+
+ private static ContinuumSettings2 INSTANCE = new ContinuumSettings2();
+ private Preferences preferences;
+
+ public String displayName() {
+ return NbBundle.getMessage(ContinuumSettings2.class, "LBL_Settings"); //NOI18N
+ }
+
+ public HelpCtx getHelpCtx() {
+ return HelpCtx.DEFAULT_HELP;
+ }
+
+ public static ContinuumSettings2 getDefault() {
+ return INSTANCE;
+ }
+
+ public String[] getServerArray() {
+ List<ServerInfo> servers = getServers();
+ String[] toReturn = new String[servers.size()];
+ for (int i = 0; i < servers.size(); i++) {
+ toReturn[i] = servers.get(i).toString();
+ }
+ return toReturn;
+ }
+
+ public List<ServerInfo> getServers() {
+ try {
+ List<ServerInfo> toReturn = new ArrayList<ServerInfo>();
+ String[] keys = getPreferences().keys();
+ for (int i = 0; i < keys.length; i++) {
+ String rawServerInfo = getPreferences().get(keys[i], null);
+ toReturn.add(new ServerInfo(rawServerInfo));
+ }
+ return toReturn;
+ } catch (BackingStoreException ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ public void setServers(List<ServerInfo> serverInfos) {
+ try {
+ String[] servers = new String[serverInfos.size()];
+ int i = 0;
+ for (ServerInfo serverInfo : serverInfos) {
+ servers[i] = serverInfo.toString();
+ i++;
+ }
+ getPreferences().clear();
+ for (int j = 0; j < servers.length; j++) {
+// IOProvider.getDefault().getStdOut().println("getPreferences().put("+PROP_SERVER + j+", "+servers[j]+")");
+ getPreferences().put(PROP_SERVER + j, servers[j]);
+ }
+ } catch (BackingStoreException ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+
+
+ public void removeServer(String serverRawInfo) {
+ removeServer(new ServerInfo(serverRawInfo));
+ }
+
+ public void addServer(ServerInfo serverInfo) {
+ List<ServerInfo> servers = getServers();
+ if (!servers.contains(serverInfo)) {
+ servers.add(serverInfo);
+ setServers(servers);
+ }
+ }
+
+ public void removeServer(ServerInfo serverInfo) {
+ List<ServerInfo> servers = getServers();
+ servers.remove(serverInfo);
+ setServers(servers);
+ }
+
+ public void removeServers() {
+ setServers(new ArrayList<ServerInfo>());
+ }
+
+ public Preferences getPreferences() {
+ if (preferences == null) preferences = NbPreferences.forModule(ContinuumSettings2.class);
+ return preferences;
+}
+
+}
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ContinuumSettings2.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ContinuumSettings2.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ContinuumSettings2.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ServerInfo.java
URL: http://svn.apache.org/viewvc/continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ServerInfo.java?rev=728359&view=auto
==============================================================================
--- continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ServerInfo.java (added)
+++ continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ServerInfo.java Sat Dec 20 14:14:34 2008
@@ -0,0 +1,105 @@
+/* ==========================================================================
+ * Copyright 2005 Mevenide Team
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================================================================
+ */
+package org.apache.continuum.plugins.netbeans;
+
+import java.io.Serializable;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.StringTokenizer;
+import org.openide.util.Exceptions;
+
+/**
+ *
+ * @author laurent.foret@codehaus.org
+ */
+@SuppressWarnings("serial")
+public class ServerInfo implements Serializable {
+
+ private URL xmlRpcUrl;
+ private URL webUrl;
+ private String user;
+ private String password;
+
+ public ServerInfo() {
+ }
+
+ public ServerInfo(String rawInfos) {
+ try {
+ StringTokenizer tokenizer = new StringTokenizer(rawInfos, ",");
+ setXmlRpcUrl(new URL(tokenizer.nextToken()));
+ setWebUrl(new URL(tokenizer.nextToken()));
+ if (tokenizer.hasMoreTokens()) {
+ setUser(tokenizer.nextToken());
+ setPassword(tokenizer.nextToken());
+ } else {
+ setUser(null);
+ setPassword(null);
+ }
+ } catch (MalformedURLException ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ }
+
+ public ServerInfo(URL xmlRpcUrl, URL webUrl, String user, String password) {
+ setXmlRpcUrl(xmlRpcUrl);
+ setWebUrl(webUrl);
+ setUser(user);
+ setPassword(password);
+ }
+
+ public URL getXmlRpcUrl() {
+ return xmlRpcUrl;
+ }
+
+ public void setXmlRpcUrl(URL url) {
+ this.xmlRpcUrl = url;
+ }
+
+ public URL getWebUrl() {
+ return webUrl;
+ }
+
+ public void setWebUrl(URL url) {
+ this.webUrl = url;
+ }
+
+ public String getUser() {
+ return user;
+ }
+
+ public void setUser(String user) {
+ this.user = user;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ @Override
+ public String toString() {
+ return xmlRpcUrl + "," + webUrl + "," + (user == null ? "" : user) + "," + (password == null ? "" : password);
+ }
+
+ @Override
+ public boolean equals(Object object) {
+ return this.toString().equalsIgnoreCase(object.toString());
+ }
+}
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ServerInfo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ServerInfo.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ServerInfo.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectGroupNode.java
URL: http://svn.apache.org/viewvc/continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectGroupNode.java?rev=728359&view=auto
==============================================================================
--- continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectGroupNode.java (added)
+++ continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectGroupNode.java Sat Dec 20 14:14:34 2008
@@ -0,0 +1,142 @@
+/* ==========================================================================
+ * Copyright 2005 Mevenide Team
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================================================================
+ */
+package org.apache.continuum.plugins.netbeans.nodes;
+
+import java.awt.Image;
+import java.awt.event.ActionEvent;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+
+import javax.swing.Icon;
+import javax.swing.UIManager;
+import org.apache.maven.continuum.xmlrpc.project.Project;
+import org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary;
+import org.apache.maven.continuum.xmlrpc.project.ProjectSummary;
+import org.apache.continuum.plugins.netbeans.ContinuumClient;
+import org.openide.nodes.AbstractNode;
+import org.openide.nodes.Children;
+import org.openide.nodes.Node;
+import org.openide.util.Utilities;
+
+public class ProjectGroupNode extends AbstractNode {
+
+ public ProjectGroupNode(ProjectGroupSummary projectGroup,
+ ContinuumClient client) {
+ super(new ProjectGroupChildren(projectGroup, client));
+ setName(Integer.toString(projectGroup.getId()));
+ setDisplayName(projectGroup.getName());
+// setIconBaseWithExtension("");
+ }
+
+ public Action[] getActions(boolean b) {
+ Action[] retValue = {new RefreshAction()};
+ return retValue;
+ }
+
+ private Image getIcon(boolean opened) {
+ Icon baseIcon = UIManager.getIcon(opened ? "Tree.openIcon" : "Tree.closedIcon");
+ Image badge = Utilities.loadImage("org/apache/continuum/plugins/netbeans/continuum-badge.png", true); //NOI18N
+ return Utilities.mergeImages(Utilities.icon2Image(baseIcon), badge, 8, 8);
+ }
+
+ @Override
+ public Image getIcon(int type) {
+ return getIcon(false);
+ }
+
+ @Override
+ public Image getOpenedIcon(int type) {
+ return getIcon(true);
+ }
+
+
+ @SuppressWarnings("unchecked")
+ private static class ProjectGroupChildren extends Children.Keys {
+
+ private ProjectGroupSummary projectGroup;
+ private ContinuumClient client;
+
+ public ProjectGroupChildren(ProjectGroupSummary projectGroup,
+ ContinuumClient client) {
+ this.projectGroup = projectGroup;
+ this.client = client;
+ }
+
+ protected Node[] createNodes(Object object) {
+ if (object instanceof Project) {
+ Project project = (Project) object;
+ return new Node[]{new ProjectNode(project, client)};
+ }
+ if (object instanceof String) {
+ AbstractNode nd = new AbstractNode(Children.LEAF);
+ nd.setDisplayName((String) object);
+ return new Node[]{nd};
+ }
+ return new Node[0];
+ }
+
+ protected void removeNotify() {
+ super.removeNotify();
+ setKeys(Collections.EMPTY_LIST);
+ }
+
+ protected void addNotify() {
+ super.addNotify();
+ if (client != null && client.getXmlRpcClient() != null) {
+ setKeys(Collections.singleton("Fetching projects ..."));
+ client.getQueue().post(new Runnable() {
+
+ @SuppressWarnings("unchecked")
+ public void run() {
+ try {
+ Collection<Project> projects = new ArrayList<Project>();
+ for (ProjectSummary summary : client.getXmlRpcClient().getProjects(projectGroup.getId())) {
+ projects.add(client.getXmlRpcClient().getProjectWithAllDetails(summary.getId()));
+ }
+ setKeys(projects);
+ } catch (Exception ex) {
+ setKeys(Collections.singletonList(getDisplayableMessageFrom(ex)));
+ throw new RuntimeException(ex);
+ }
+ }
+
+ private String getDisplayableMessageFrom(Exception ex) {
+ return (ex.getMessage() != null) ? ex.getMessage() : ex.getClass().getName();
+ }
+ });
+ }
+ }
+ }
+
+ @SuppressWarnings("serial")
+ private class RefreshAction extends AbstractAction {
+
+ public RefreshAction() {
+ this.putValue(Action.NAME, "Refresh");
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ setChildren(new ProjectGroupChildren(
+ ((ProjectGroupChildren) getChildren()).projectGroup,
+ ((ProjectGroupChildren) getChildren()).client));
+ }
+ }
+}
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectGroupNode.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectGroupNode.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectGroupNode.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectHelper.java
URL: http://svn.apache.org/viewvc/continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectHelper.java?rev=728359&view=auto
==============================================================================
--- continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectHelper.java (added)
+++ continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectHelper.java Sat Dec 20 14:14:34 2008
@@ -0,0 +1,68 @@
+/* ==========================================================================
+ * Copyright 2005 Mevenide Team
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================================================================
+ */
+package org.apache.continuum.plugins.netbeans.nodes;
+
+import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.continuum.model.scm.ScmResult;
+
+
+/**
+ *
+ * @author laurent.foret
+ */
+public class ProjectHelper {
+
+ private static ProjectHelper instance;
+
+ private ProjectHelper() {
+ }
+
+ public static ProjectHelper getInstance() {
+ if (instance == null) instance = new ProjectHelper();
+ return instance;
+ }
+
+ public String getDisplayableStateFrom(Project project) {
+ int state = project.getState();
+ String stateStr = "";
+ boolean running = false;
+ if (state == 6 || state == 7 || state == 8 ) {
+ running = true;
+ state = project.getOldState();
+ }
+ if (state == 1) {
+ stateStr = "Never built before";
+ }
+ if (state == 2) {
+ stateStr = "Last Build successful.";
+ }
+ if (state == 3 || state == 4) {
+ stateStr = "Last Build failed.";
+ ScmResult res = project.getCheckoutResult();
+ if (res != null) {
+ //TODO.. add more details
+ }
+ }
+ if (running) {
+ stateStr = stateStr + " (Now running)";
+ }
+ return stateStr;
+ }
+
+
+
+}
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectHelper.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectHelper.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectHelper.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectNode.java
URL: http://svn.apache.org/viewvc/continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectNode.java?rev=728359&view=auto
==============================================================================
--- continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectNode.java (added)
+++ continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectNode.java Sat Dec 20 14:14:34 2008
@@ -0,0 +1,369 @@
+/* ==========================================================================
+ * Copyright 2005 Mevenide Team
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================================================================
+ */
+package org.apache.continuum.plugins.netbeans.nodes;
+
+import java.awt.Image;
+import java.awt.event.ActionEvent;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.StringReader;
+import java.lang.reflect.InvocationTargetException;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpMethod;
+import org.apache.commons.httpclient.HttpStatus;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.maven.continuum.xmlrpc.client.ContinuumXmlRpcClient;
+import org.apache.maven.continuum.xmlrpc.project.BuildDefinition;
+import org.apache.maven.continuum.xmlrpc.project.Project;
+import org.apache.maven.continuum.xmlrpc.project.ProjectDependency;
+import org.apache.maven.continuum.xmlrpc.project.ProjectDeveloper;
+import org.apache.continuum.plugins.netbeans.ContinuumClient;
+import org.apache.continuum.plugins.netbeans.ServerInfo;
+import org.openide.nodes.AbstractNode;
+import org.openide.nodes.Children;
+import org.openide.nodes.Node;
+import org.openide.nodes.PropertySupport;
+import org.openide.nodes.Sheet;
+import org.openide.util.Exceptions;
+import org.openide.util.RequestProcessor;
+import org.openide.util.Utilities;
+import org.openide.windows.IOProvider;
+import org.openide.windows.InputOutput;
+import org.openide.windows.OutputWriter;
+
+/**
+ *
+ * @author mkleint
+ */
+public class ProjectNode extends AbstractNode {
+
+ private Project project;
+ private ContinuumClient client;
+ private RequestProcessor.Task refreshTask;
+
+ /** Creates a new instance of ProjectNode */
+ public ProjectNode(Project proj, ContinuumClient client) {
+ super(Children.LEAF);
+ this.client = client;
+ project = proj;
+ setName(project.getName());
+ setDisplayName(project.getName());
+ String executor = project.getExecutorId();
+ if ("maven2".equals(executor)) {
+ setIconBaseWithExtension("org/apache/continuum/plugins/netbeans/Maven2Icon.gif");
+ } else if ("maven1".equals(executor)) {
+ setIconBaseWithExtension("org/apache/continuum/plugins/netbeans/MavenIcon.gif");
+ } else if ("ant".equals(executor)) {
+ setIconBaseWithExtension("org/apache/continuum/plugins/netbeans/ant-freeform.png");
+ }
+ refreshTask = client.getQueue().create(new RepeatingRefresher());
+ }
+
+ public Image getIcon(int param) {
+ Image img = super.getIcon(param);
+ int state = project.getState();
+ if (state == 2) {
+ return Utilities.mergeImages(img, Utilities.loadImage("org/apache/continuum/plugins/netbeans/state-ok.png"),
+ 16, 8);
+ }
+ // fail or error
+ if (state == 3 || state == 4) {
+ return Utilities.mergeImages(
+ img,
+ Utilities.loadImage("org/apache/continuum/plugins/netbeans/state-error.png"),
+ 16, 8);
+ }
+ // many running states
+ if (state == 5 || state == 6 || state == 7 || state == 8) {
+ return Utilities.mergeImages(
+ img,
+ Utilities.loadImage("org/apache/continuum/plugins/netbeans/state-running.png"),
+ 16, 8);
+ }
+ return img;
+ }
+
+ public Image getOpenedIcon(int param) {
+ Image img = super.getOpenedIcon(param);
+ int state = project.getState();
+ if (state == 2) {
+ return Utilities.mergeImages(img, Utilities.loadImage("org/apache/continuum/plugins/netbeans/state-ok.png"),
+ 16, 8);
+ }
+ // fail or error
+ if (state == 3 || state == 4) {
+ return Utilities.mergeImages(
+ img,
+ Utilities.loadImage("org/apache/continuum/plugins/netbeans/state-error.png"),
+ 16, 8);
+ }
+ // many running states
+ if (state == 6 || state == 7 || state == 8) {
+ return Utilities.mergeImages(
+ img,
+ Utilities.loadImage("org/apache/continuum/plugins/netbeans/state-running.png"),
+ 16, 8);
+ }
+ return img;
+ }
+
+ /**
+ * @LFO find a more elegant manner to crate the sheet .
+ */
+ protected Sheet createSheet() {
+ Sheet sheet = new Sheet();
+
+ Sheet.Set basicProps = new Sheet.Set();
+ basicProps.setName("General");
+ basicProps.setDisplayName("General");
+
+ sheet.put(basicProps);
+ try {
+ // Node.Property buildState = new MyStringPropertySupport("state",
+ // "State",
+ // ProjectHelper.getInstance().getDisplayableStateFrom(project));
+ Node.Property buildNumber = new MyStringPropertySupport(
+ "buildNumber", "Build Number", Integer.toString(project.getBuildNumber()));
+
+ PropertySupport.Reflection artifactId = new PropertySupport.Reflection(
+ project, String.class, "getArtifactId", null);
+ artifactId.setName("artifactId");
+ artifactId.setDisplayName("Artifact Id");
+ artifactId.setShortDescription("");
+ PropertySupport.Reflection groupId = new PropertySupport.Reflection(
+ project, String.class, "getGroupId", null);
+ groupId.setName("groupId");
+ groupId.setDisplayName("Group Id");
+ groupId.setShortDescription("");
+ PropertySupport.Reflection version = new PropertySupport.Reflection(
+ project, String.class, "getVersion", null);
+ version.setName("version");
+ version.setDisplayName("Version");
+ version.setShortDescription("Version of the current artifact");
+ PropertySupport.Reflection name = new PropertySupport.Reflection(
+ project, String.class, "getName", null);
+ name.setName("name");
+ name.setDisplayName("Name");
+ PropertySupport.Reflection scmUrl = new PropertySupport.Reflection(
+ project, String.class, "getScmUrl", null);
+ scmUrl.setName("scmURL");
+ scmUrl.setDisplayName("Scm url");
+ PropertySupport.Reflection desc = new PropertySupport.Reflection(
+ project, String.class, "getDescription", null);
+ desc.setName("description");
+ desc.setDisplayName("Description");
+
+ // basicProps.put(new Node.Property[] {
+ // buildState, buildNumber, artifactId, groupId, version, name,
+ // desc, scmUrl
+ // });
+
+ Sheet.Set developerSet = new Sheet.Set();
+ developerSet.setName("developers");
+ developerSet.setDisplayName("Developers");
+ for (Object developerObj : project.getDevelopers()) {
+ ProjectDeveloper dev = (ProjectDeveloper) developerObj;
+ Node.Property developer = new MyStringPropertySupport(Integer.toString(dev.getContinuumId()), dev.getName(), dev.getEmail());
+ developerSet.put(developer);
+ }
+ sheet.put(developerSet);
+
+ Sheet.Set dependencySet = new Sheet.Set();
+ dependencySet.setName("dependencies");
+ dependencySet.setDisplayName("Dependencies");
+ for (Object obj : project.getDependencies()) {
+ ProjectDependency dep = (ProjectDependency) obj;
+ String depStr = dep.getArtifactId() + ":" + dep.getVersion();
+ Node.Property dependency = new MyStringPropertySupport(depStr,
+ dep.getGroupId(), depStr);
+ dependencySet.put(dependency);
+ }
+ sheet.put(dependencySet);
+
+ Sheet.Set buildDefinitionSet = new Sheet.Set();
+ buildDefinitionSet.setName("buildDefinition");
+ buildDefinitionSet.setDisplayName("Build definitions");
+ int i = 0;
+ for (Object obj : project.getBuildDefinitions()) {
+ BuildDefinition def = (BuildDefinition) obj;
+ String defStr = def.getArguments() + ", " + def.getGoals() + ", " + def.getModelEncoding();
+ Node.Property definitionSet = new MyStringPropertySupport("def" + (i++), "", defStr);
+ buildDefinitionSet.put(definitionSet);
+ }
+ sheet.put(buildDefinitionSet);
+ } catch (NoSuchMethodException exc) {
+ exc.printStackTrace();
+ }
+ return sheet;
+ }
+
+ public Action[] getActions(boolean context) {
+ Action[] retValue = new Action[3];
+ retValue[0] = new RefreshAction();
+ retValue[1] = new ForceBuildAction();
+ retValue[2] = new ShowLastOutputAction();
+ return retValue;
+ }
+
+ public Object getValue(String attributeName) {
+ Object retValue;
+
+ retValue = super.getValue(attributeName);
+ return retValue;
+ }
+
+ @SuppressWarnings("serial")
+ private class RefreshAction extends AbstractAction {
+
+ public RefreshAction() {
+ this.putValue(Action.NAME, "Refresh");
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ try {
+ client.getXmlRpcClient().updateProject(project);
+ } catch (Exception ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ fireIconChange();
+ fireOpenedIconChange();
+ // ProjectNode.this.firePropertyChange(PROPERTY_COMPLETE_RELOAD,
+ // null, Boolean.TRUE);
+ }
+ }
+
+ @SuppressWarnings("serial")
+ private class ForceBuildAction extends AbstractAction {
+
+ public ForceBuildAction() {
+ this.putValue(Action.NAME, "Force Build");
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ try {
+ client.getXmlRpcClient().buildProject(project.getId());
+ refreshTask.schedule(1000);
+ } catch (Exception ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ }
+ }
+
+ /**
+ * @LFO Make it works on my environment.
+ */
+ @SuppressWarnings("serial")
+ private class ShowLastOutputAction extends AbstractAction {
+
+ public ShowLastOutputAction() {
+ this.putValue(Action.NAME, "Show Last Build Output");
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ RequestProcessor.getDefault().post(new Runnable() {
+
+ public void run() {
+ String pathRoot = client.getServerInfo().getWebUrl().toExternalForm();
+ InputOutput io = IOProvider.getDefault().getIO(
+ "Continuum-" + project.getName(), true);
+ io.select();
+ OutputWriter out = io.getOut();
+ try {
+ BufferedReader read;
+ if (pathRoot != null) {
+ String loginPath = pathRoot + "/security/login.action?username="+ client.getServerInfo().getUser()+"&password="+client.getServerInfo().getPassword()+"&method:login=login";
+ String path = pathRoot + "/buildOutputText.action?buildId=" + project.getLatestBuildId() + "&projectId=" + project.getId() + "&projectGroupId=" + project.getProjectGroup().getId();
+ HttpClient client = new HttpClient();
+ out.println("Connect to " + loginPath.substring(0, loginPath.indexOf("&password")));
+ HttpMethod method = new GetMethod(loginPath);
+ int ret = client.executeMethod(method);
+
+ out.println("Connect to " + path);
+ method = new GetMethod(path);
+ client.executeMethod(method);
+ if (ret == HttpStatus.SC_OK) {
+ read = new BufferedReader(
+ new InputStreamReader(method.getResponseBodyAsStream()));
+ } else if (ret == org.apache.commons.httpclient.HttpStatus.SC_NOT_FOUND) {
+ read = new BufferedReader(
+ new StringReader(
+ "The output page for build " + project.getLatestBuildId() + " was not found.\n" + "Tried accessing the build output under " + path + "\n"));
+ } else {
+ read = new BufferedReader(
+ new InputStreamReader(method.getResponseBodyAsStream()));
+ }
+ } else {
+ read = new BufferedReader(
+ new StringReader(
+ "You don't defined the URL for locating the build outputs" + " for server '" + client.getServerInfo().getWebUrl().toString() + "'. Please go to Options dialog and under Miscellaneous update " + "your server settings."));
+ }
+ String line = read.readLine();
+ while (line != null) {
+ out.println(line);
+ line = read.readLine();
+ }
+ out.close();
+ read.close();
+ } catch (IOException ex) {
+ out.println(ex.getMessage());
+ }
+ }
+ });
+
+ }
+ }
+
+ private class RepeatingRefresher implements Runnable {
+
+ public void run() {
+ try {
+ client.getXmlRpcClient().updateProject(project);
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ fireIconChange();
+ fireOpenedIconChange();
+ // ProjectNode.this.firePropertyChange(PROPERTY_COMPLETE_RELOAD,
+ // null, Boolean.TRUE);
+ createSheet();
+
+ if (project.getState() == 6 || project.getState() == 7 || project.getState() == 8) {
+ refreshTask.schedule(10 * 1000);
+ }
+ }
+ }
+
+ private static class MyStringPropertySupport extends PropertySupport.ReadOnly {
+
+ private String value;
+
+ MyStringPropertySupport(String name, String displayName, String value) {
+ super(name, String.class, displayName, "");
+ this.value = value;
+ }
+
+ public Object getValue() throws IllegalAccessException,
+ InvocationTargetException {
+ return value;
+ }
+ }
+}
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectNode.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectNode.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ProjectNode.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/RootNode.java
URL: http://svn.apache.org/viewvc/continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/RootNode.java?rev=728359&view=auto
==============================================================================
--- continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/RootNode.java (added)
+++ continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/RootNode.java Sat Dec 20 14:14:34 2008
@@ -0,0 +1,129 @@
+/* ==========================================================================
+ * Copyright 2005 Mevenide Team
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================================================================
+ */
+package org.apache.continuum.plugins.netbeans.nodes;
+
+import java.awt.event.ActionEvent;
+import java.net.MalformedURLException;
+import java.util.Collections;
+import java.util.prefs.PreferenceChangeEvent;
+import java.util.prefs.PreferenceChangeListener;
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import org.apache.continuum.plugins.netbeans.ContinuumSettings2;
+import org.apache.continuum.plugins.netbeans.ui.SingleServer;
+import org.openide.DialogDescriptor;
+import org.openide.DialogDisplayer;
+import org.openide.NotifyDescriptor;
+import org.openide.nodes.AbstractNode;
+import org.openide.nodes.Children;
+import org.openide.nodes.Node;
+import org.openide.util.Exceptions;
+
+/**
+ *
+ * @author laurent.foret
+ */
+public class RootNode extends AbstractNode {
+
+ private static RootNode instance;
+
+ private RootNode() {
+ super(new RootChildren());
+ setName("continuumRoot");
+ setDisplayName("Continuum servers");
+ setIconBaseWithExtension("org/apache/continuum/plugins/netbeans/ContinuumServer.png");
+ }
+
+ public static RootNode getInstance() {
+ if (instance == null) {
+ instance = new RootNode();
+ }
+ return instance;
+ }
+
+ public Action[] getActions(boolean b) {
+ Action[] retValue = {new AddAction(), new DeleteAllServersAction()};
+ return retValue;
+ }
+
+ private static class RootChildren extends Children.Keys {
+
+ private PreferenceChangeListener listener;
+
+ RootChildren() {
+ listener = new PreferenceChangeListener() {
+ public void preferenceChange(PreferenceChangeEvent evt) {
+ reloadKeys();
+ }
+ };
+ }
+
+ protected Node[] createNodes(Object object) {
+ return new Node[]{new ServerNode((String) object)};
+ }
+
+ protected void removeNotify() {
+ super.removeNotify();
+ setKeys(Collections.EMPTY_LIST);
+ }
+
+ protected void addNotify() {
+ super.addNotify();
+ reloadKeys();
+ ContinuumSettings2.getDefault().getPreferences().addPreferenceChangeListener(listener);
+ }
+
+ void reloadKeys() {
+ setKeys(ContinuumSettings2.getDefault().getServerArray());
+ }
+ }
+
+ private class AddAction extends AbstractAction {
+
+ public AddAction() {
+ this.putValue(Action.NAME, "Add server ...");
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ SingleServer ss = new SingleServer();
+ DialogDescriptor dd = new DialogDescriptor(ss, "Add Continuum server");
+ dd.setOptions(new Object[]{
+ NotifyDescriptor.OK_OPTION,
+ NotifyDescriptor.CANCEL_OPTION
+ });
+ Object ret = DialogDisplayer.getDefault().notify(dd);
+ if (ret == NotifyDescriptor.OK_OPTION) {
+ try {
+ ContinuumSettings2.getDefault().addServer(ss.getServerInfo());
+ } catch (MalformedURLException ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ }
+ }
+ }
+
+ private class DeleteAllServersAction extends AbstractAction {
+
+ public DeleteAllServersAction() {
+ this.putValue(Action.NAME, "Delete all servers");
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ ContinuumSettings2.getDefault().removeServers();
+ }
+ }
+}
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/RootNode.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/RootNode.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/RootNode.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ServerNode.java
URL: http://svn.apache.org/viewvc/continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ServerNode.java?rev=728359&view=auto
==============================================================================
--- continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ServerNode.java (added)
+++ continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ServerNode.java Sat Dec 20 14:14:34 2008
@@ -0,0 +1,168 @@
+/* ==========================================================================
+ * Copyright 2005 Mevenide Team
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================================================================
+ */
+package org.apache.continuum.plugins.netbeans.nodes;
+
+import java.awt.event.ActionEvent;
+import java.util.Collections;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+
+import org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary;
+import org.apache.continuum.plugins.netbeans.ContinuumClient;
+import org.apache.continuum.plugins.netbeans.ContinuumSettings2;
+import org.apache.continuum.plugins.netbeans.ui.MavenProjectForm;
+import org.openide.DialogDescriptor;
+import org.openide.DialogDisplayer;
+import org.openide.NotifyDescriptor;
+import org.openide.nodes.AbstractNode;
+import org.openide.nodes.Children;
+import org.openide.nodes.Node;
+import org.openide.util.NbBundle;
+
+/**
+ *
+ * @author mkleint
+ */
+public class ServerNode extends AbstractNode {
+
+ private ContinuumClient client;
+
+ /** Creates a new instance of ContinuumServerNode */
+ public ServerNode(String serverRawInfo) {
+ super(new ServerChildren(new ContinuumClient(serverRawInfo)));
+ client = ((ServerChildren)getChildren()).getClient();
+
+ setName(client.getServerInfo().toString());
+ setDisplayName(client.getServerInfo().getXmlRpcUrl().toString());
+ setIconBaseWithExtension("org/apache/continuum/plugins/netbeans/threeBrands.gif");
+ }
+
+ public Action[] getActions(boolean b) {
+ Action[] retValue = {new RemoveAction(), new RefreshAction(), new AddMaven2Action(client)};
+ return retValue;
+ }
+
+ protected static class ServerChildren extends Children.Keys {
+
+ private ContinuumClient client;
+
+ public ServerChildren(ContinuumClient client) {
+ this.client = client;
+ }
+
+ protected Node[] createNodes(Object object) {
+ if (object instanceof ProjectGroupSummary) {
+ ProjectGroupSummary projectGroup = (ProjectGroupSummary) object;
+ return new Node[]{new ProjectGroupNode(projectGroup, client)};
+ }
+ if (object instanceof String) {
+ AbstractNode nd = new AbstractNode(Children.LEAF);
+ nd.setDisplayName((String) object);
+ return new Node[]{nd};
+ }
+ return new Node[0];
+ }
+
+ @Override
+ protected void removeNotify() {
+ super.removeNotify();
+ setKeys(Collections.EMPTY_LIST);
+ }
+
+ @Override
+ protected void addNotify() {
+ super.addNotify();
+ if (client != null) {
+ setKeys(Collections.singleton("Connecting to " + client.getServerInfo().getXmlRpcUrl() + " ..."));
+ client.getQueue().post(new Runnable() {
+
+ @SuppressWarnings("unchecked")
+ public void run() {
+ try {
+ setKeys(client.getXmlRpcClient().getAllProjectGroups());
+ } catch (Exception ex) {
+ setKeys(Collections.singletonList(getDisplayableMessageFrom(ex)));
+ throw new RuntimeException(ex);
+ }
+ }
+ });
+ }
+ }
+
+ private String getDisplayableMessageFrom(Exception ex) {
+ return (ex.getMessage() != null) ? ex.getMessage() : ex.getClass().getName();
+ }
+
+ public ContinuumClient getClient() {
+ return client;
+ }
+
+ }
+
+ @SuppressWarnings("serial")
+ private class RemoveAction extends AbstractAction {
+
+ public RemoveAction() {
+ this.putValue(Action.NAME, "Remove");
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ ContinuumSettings2.getDefault().removeServer(getName());
+ }
+ }
+
+ @SuppressWarnings("serial")
+ private class RefreshAction extends AbstractAction {
+
+ public RefreshAction() {
+ this.putValue(Action.NAME, "Refresh");
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ setChildren(new ServerChildren(new ContinuumClient(getName())));
+ }
+ }
+
+ private class AddMaven2Action extends AbstractAction {
+
+ private ContinuumClient client;
+
+ public AddMaven2Action(ContinuumClient client) {
+ this.putValue(Action.NAME, NbBundle.getMessage(ServerNode.class, "ServerNode.addMaven2.action"));
+ this.client = client;
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ MavenProjectForm form = new MavenProjectForm();
+ DialogDescriptor dd = new DialogDescriptor(form, NbBundle.getMessage(ServerNode.class, "ServerNode.addMaven2.action") );
+ dd.setOptions(new Object[]{
+ NotifyDescriptor.OK_OPTION,
+ NotifyDescriptor.CANCEL_OPTION
+ });
+ Object ret = DialogDisplayer.getDefault().notify(dd);
+ if (ret == NotifyDescriptor.OK_OPTION) {
+ try {
+ // TODO : enqueue + refresh + exception handling
+ client.getXmlRpcClient().addMavenTwoProject(form.getPomUrl());
+ } catch (Exception ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+ }
+ }
+}
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ServerNode.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ServerNode.java
------------------------------------------------------------------------------
svn:executable = *
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/nodes/ServerNode.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ui/MavenProjectForm.form
URL: http://svn.apache.org/viewvc/continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ui/MavenProjectForm.form?rev=728359&view=auto
==============================================================================
--- continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ui/MavenProjectForm.form (added)
+++ continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ui/MavenProjectForm.form Sat Dec 20 14:14:34 2008
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.5" maxVersion="1.6" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+ <AuxValues>
+ <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
+ <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ </AuxValues>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="pomUrlLabel" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="pomUrlTextField" min="-2" pref="406" max="-2" attributes="0"/>
+ <EmptySpace max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace min="-2" pref="23" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="pomUrlLabel" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="pomUrlTextField" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace pref="21" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="pomUrlLabel">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/apache/continuum/plugins/netbeans/ui/Bundle.properties" key="MavenProjectForm.pomUrlLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
+ </Property>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JTextField" name="pomUrlTextField">
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="pomUrlTextFieldActionPerformed"/>
+ </Events>
+ </Component>
+ </SubComponents>
+</Form>
Propchange: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ui/MavenProjectForm.form
------------------------------------------------------------------------------
svn:executable = *
Added: continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ui/MavenProjectForm.java
URL: http://svn.apache.org/viewvc/continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ui/MavenProjectForm.java?rev=728359&view=auto
==============================================================================
--- continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ui/MavenProjectForm.java (added)
+++ continuum/sandbox/continuum-ide-plugins/continuum-netbeans-plugin/src/main/java/org/apache/continuum/plugins/netbeans/ui/MavenProjectForm.java Sat Dec 20 14:14:34 2008
@@ -0,0 +1,63 @@
+package org.apache.continuum.plugins.netbeans.ui;
+
+public class MavenProjectForm extends javax.swing.JPanel {
+
+ /** Creates new form MavenProjectForm */
+ public MavenProjectForm() {
+ initComponents();
+ }
+
+ /** This method is called from within the constructor to
+ * initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is
+ * always regenerated by the Form Editor.
+ */
+ @SuppressWarnings("unchecked")
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ pomUrlLabel = new javax.swing.JLabel();
+ pomUrlTextField = new javax.swing.JTextField();
+
+ pomUrlLabel.setText(org.openide.util.NbBundle.getMessage(MavenProjectForm.class, "MavenProjectForm.pomUrlLabel.text")); // NOI18N
+
+ pomUrlTextField.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ pomUrlTextFieldActionPerformed(evt);
+ }
+ });
+
+ org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
+ this.setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout.createSequentialGroup()
+ .addContainerGap()
+ .add(pomUrlLabel)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(pomUrlTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 406, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout.createSequentialGroup()
+ .add(23, 23, 23)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
+ .add(pomUrlLabel)
+ .add(pomUrlTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap(21, Short.MAX_VALUE))
+ );
+ }// </editor-fold>//GEN-END:initComponents
+
+private void pomUrlTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pomUrlTextFieldActionPerformed
+// TODO add your handling code here:
+}//GEN-LAST:event_pomUrlTextFieldActionPerformed
+
+ public String getPomUrl() {
+ return pomUrlTextField.getText();
+ }
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JLabel pomUrlLabel;
+ private javax.swing.JTextField pomUrlTextField;
+ // End of variables declaration//GEN-END:variables
+}