Deletion old files from trunk for further updating with new from release551.
1.1 --- a/compapp.help/build.xml Wed Feb 21 08:53:38 2007 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,28 +0,0 @@
1.4 -<?xml version="1.0" encoding="UTF-8"?>
1.5 -
1.6 -<!--
1.7 -The contents of this file are subject to the terms of the Common Development
1.8 -and Distribution License (the License). You may not use this file except in
1.9 -compliance with the License.
1.10 -
1.11 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
1.12 -or http://www.netbeans.org/cddl.txt.
1.13 -
1.14 -When distributing Covered Code, include this CDDL Header Notice in each file
1.15 -and include the License file at http://www.netbeans.org/cddl.txt.
1.16 -If applicable, add the following below the CDDL Header, with the fields
1.17 -enclosed by brackets [] replaced by your own identifying information:
1.18 -"Portions Copyrighted [year] [name of copyright owner]"
1.19 -
1.20 - The Original Software is NetBeans. The Initial Developer of the Original
1.21 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
1.22 - Microsystems, Inc. All Rights Reserved.
1.23 --->
1.24 -
1.25 -<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
1.26 -<!-- for some information on what you could do (e.g. targets to override). -->
1.27 -<!-- If you delete this file and reopen the project it will be recreated. -->
1.28 -<project name="org.netbeans.modules.compapp.capshelp" default="netbeans" basedir=".">
1.29 - <description>Builds, tests, and runs the project org.netbeans.modules.compapp.capshelp.</description>
1.30 - <import file="nbproject/build-impl.xml"/>
1.31 -</project>
2.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/basics/about.html Wed Feb 21 08:53:38 2007 +0000
2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2.3 @@ -1,58 +0,0 @@
2.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2.5 -<!--
2.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
2.7 -* Use is subject to license terms.
2.8 --->
2.9 -<html>
2.10 -<head>
2.11 -<link rel="stylesheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
2.12 -<title>About Composite Application Projects</title>
2.13 -</head>
2.14 -<body>
2.15 -<h2>About Composite Application Projects</h2>
2.16 -<p><small><a href="#seealso">See Also</a></small></p>
2.17 -<p>A Composite Application project is used to create a Service Assembly
2.18 -that can be deployed to the Java Business Integration (JBI) server.
2.19 -Within the Composite Application project, you can:</p>
2.20 -<ul>
2.21 - <li>Assemble an application that uses multiple project types (BPEL, XSLT, and so forth).</li>
2.22 - <li>Configure external/edge access protocols (SOAP, JMS, SMTP, and others).</li>
2.23 - <li>Build JBI deployment packages.</li>
2.24 - <li>Deploy the application image to the target JBI server.</li>
2.25 - <li>Monitor the status of JBI server components and applications.</li>
2.26 -</ul>
2.27 -<p>The JBI server can contain different service engines.
2.28 - One service engine is the BPEL Service Engine runtime.
2.29 - For a Composite Application project to be deployed to the BPEL SE runtime,
2.30 - it must include a JBI module created from a BPEL Module project.
2.31 - Within a Composite Application Project that includes a JBI module,
2.32 - you can also create and execute test cases that can then be run, in JUnit fashion,
2.33 - against the deployed BPEL processes.</p>
2.34 -<p>Three samples are supplied, illustrating the relationship between
2.35 - BPEL Module projects and Composite Application projects.
2.36 - See <a href="nbdocs://org.netbeans.modules.bpel.bpelhelp/org/netbeans/modules/bpel/bpelhelp/basics/create_sample.html" title="Creating Sample Processes in the BPEL Designer">Creating Sample Processes in the BPEL Designer</a>.</p>
2.37 -<p>The pop-up menu of a Composite Application project contains major commands you can run on this type of projects, such as: </p>
2.38 -<ul>
2.39 - <li><a href="add_jbi_module.html" title="Adding JBI Modules to Composite Application Projects">Add JBI Module</a>. Adds a BPEL Module project to the Composite Application project. You must do this to deploy and test-run your business application. </li>
2.40 - <li>Build, clean and build, or clean the project. </li>
2.41 - <li><a href="deploy_project.html" title="Deploying Composite Application Projects">Deploy Project</a>. Compiles the Composite Application project and deploys it to the BPEL Service Engine runtime. </li>
2.42 - <li><a href="jbi_tester.html" title="Performing Test Runs">Test Project</a>. Runs test cases against this Composite Application project. </li>
2.43 - <li><a href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/project/proj_main.html">Set Main Project</a></li>
2.44 - <li>Delete the project.</li>
2.45 - <li>Configure project properties, such as the project location in the filesystem, descriptions of the Assembly Unit and Application Sub Assembly, target engine, binding, and deployment components, and the server to which the project is deployed. To configure project properties, right-click the project's node and choose Properties. </li>
2.46 -</ul>
2.47 -<dl>
2.48 -<dt><a name="seealso">See Also</a></dt>
2.49 -<dd><a href="nbdocs://org.netbeans.modules.bpel.bpelhelp/org/netbeans/modules/bpel/bpelhelp/test_run/about.html" title="Deploying and Performing Test Runs of BPEL Processes">Deploying and Performing Test Runs of BPEL Processes</a></dd>
2.50 -<dd><a href="nbdocs://org.netbeans.modules.bpel.bpelhelp/org/netbeans/modules/bpel/bpelhelp/basics/project_lifecycle.html" title="Understanding Service Oriented Architecture Projects">Understanding Service Oriented Architecture Projects</a></dd>
2.51 -<dd><a href="create_project.html" title="Creating Composite Application Projects">Creating Composite Application Projects</a></dd>
2.52 -</dl>
2.53 -<hr>
2.54 -<small><a href="../credits.html">Legal Notices</a></small>
2.55 -<table border="0" cellpadding="150">
2.56 -<tr><td> </td></tr>
2.57 -<tr><td> </td></tr>
2.58 -<tr><td> </td></tr>
2.59 -</table>
2.60 -</body>
2.61 -</html>
3.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/basics/add_jbi_module.html Wed Feb 21 08:53:38 2007 +0000
3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
3.3 @@ -1,35 +0,0 @@
3.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3.5 -<!--
3.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
3.7 -* Use is subject to license terms.
3.8 --->
3.9 -<html>
3.10 -<head>
3.11 -<title>Adding JBI Modules to Composite Application Projects</title>
3.12 -<link rel="stylesheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
3.13 -</head>
3.14 -<body>
3.15 -<h2>Adding JBI Modules to Composite Application Projects</h2>
3.16 -<p><small><a href="#seealso">See Also</a></small></p>
3.17 -<p><b>To add a JBI Module project to the Composite Application project:</b></p>
3.18 -<ol>
3.19 - <li>In the Projects window, right-click the Composite Application project's node and choose Add JBI Module.</li>
3.20 - <li>In the Select Project dialog box, select the BPEL Module project folder, make sure that the project's JAR file has appeared in the Project JAR Files list, and click Add Project JAR Files. <br>
3.21 - To verify that the JBI Module has appeared, in the Projects window, expand Composite Application project > JBI Modules. You should see the JAR file of the BPEL Module project. </li>
3.22 -</ol>
3.23 -
3.24 -<dl>
3.25 -<dt><a name="seealso">See Also</a></dt>
3.26 -<dd><a href="nbdocs://org.netbeans.modules.bpel.bpelhelp/org/netbeans/modules/bpel/bpelhelp/basics/project_lifecycle.html" title="Understanding Service Oriented Architecture Projects">Understanding Service Oriented Architecture Projects</a></dd>
3.27 -<dd><a href="../basics/create_project.html" title="Creating Composite Application Projects">Creating Composite Application Projects</a></dd>
3.28 -</dl>
3.29 -<hr>
3.30 -<small>
3.31 -<a href="../credits.html">Legal Notices</a></small>
3.32 -<table border="0" cellpadding="150">
3.33 -<tr><td> </td></tr>
3.34 -<tr><td> </td></tr>
3.35 -<tr><td> </td></tr>
3.36 -</table>
3.37 -</body>
3.38 -</html>
4.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/basics/caps_project_basic_create.html Wed Feb 21 08:53:38 2007 +0000
4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
4.3 @@ -1,38 +0,0 @@
4.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4.5 -<!--
4.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
4.7 -* Use is subject to license terms.
4.8 --->
4.9 -<html>
4.10 -<head>
4.11 -<link rel="stylesheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
4.12 -<title>New Composite Application Project Wizard: Name and Location</title>
4.13 -</head>
4.14 -<body>
4.15 -<h2>New Composite Application Project Wizard: Name and Location</h2>
4.16 -<p><small><a href="#seealso">See Also</a></small></p>
4.17 -<p>The New Project wizard steps you through the process of creating a new project.
4.18 - You open the wizard by opening the New Project wizard and selecting the Composite Application project template from the Service Oriented Architecture category.
4.19 -<p>The Name and Location page of the wizard prompts you to supply information
4.20 - characterizing the Composite Application project you are creating:</p>
4.21 -<ul>
4.22 - <li><b>Project Name.</b> Supply a name for the folder that will contain your Composite Application files. </li>
4.23 - <li><b>Project Location.</b> Keep the default path to your other projects, or specify a new one. </li>
4.24 - <li>Project Folder <em>(not settable).</em> The system derives this value by concatenating the previous two entries. </li>
4.25 - <li><b>Set as Main Project.</b> Keep this check box selected unless you want a different project to be regarded as the main project</a>.</li>
4.26 -</ul>
4.27 -<p> When you click Finish, the project is created on your computer and opened
4.28 - in both the Projects window and the Files window.</p>
4.29 -<dt><a name="seealso">See Also</a></dt>
4.30 -<dd><a href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/project/proj_main.html" title="Set Main Project">Set Main Project</a>.</dd>
4.31 -<dd><a href="../basics/create_project.html" title="Creating Composite Application Projects">Creating Composite Application Projects</a>.</dd>
4.32 -</dl>
4.33 -<hr>
4.34 -<small><a href="../credits.html">Legal Notices</a></small>
4.35 -<table border="0" cellpadding="150">
4.36 -<tr><td> </td></tr>
4.37 -<tr><td> </td></tr>
4.38 -<tr><td> </td></tr>
4.39 -</table>
4.40 -</body>
4.41 -</html>
5.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/basics/create_project.html Wed Feb 21 08:53:38 2007 +0000
5.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
5.3 @@ -1,39 +0,0 @@
5.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
5.5 -<!--
5.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
5.7 -* Use is subject to license terms.
5.8 --->
5.9 -<html>
5.10 -<head>
5.11 -<title>Creating Composite Application Projects</title>
5.12 -<link rel="stylesheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
5.13 -</head>
5.14 -<body>
5.15 -<h2>Creating Composite Application Projects</h2>
5.16 -<p><small><a href="#seealso">See Also</a></small></p>
5.17 -<p>The New Project wizard guides you through the steps needed to create a Composite Application project. </p>
5.18 -<p><b>To create a new Composite Application project:</b></p>
5.19 -<ol>
5.20 - <li>Choose File > New
5.21 - Project (Ctrl-Shift-N).</li>
5.22 - <li>In the Categories list, select Service Oriented Architecture and in the Projects list, select Composite Application and click Next.</li>
5.23 - <li>In the Name and Location page, name the project and specify the location of project files.</li>
5.24 - <li>To set the new Composite Application project as main, leave the Set as Main Project checkbox selected. </li>
5.25 - <li>Click Finish. <br>
5.26 - The new Composite Application project appears in the Projects window. To be able to deploy and test-run your business process, <a href="add_jbi_module.html">add a JBI module</a> to the Composite Application project.</li>
5.27 -</ol>
5.28 -<dl>
5.29 - <dt><a name="seealso">See Also</a></dt>
5.30 - <dd><a href="about.html" title="About Composite Applications">About Composite Application Projects</a></dd>
5.31 - <dd><a href="nbdocs://org.netbeans.modules.bpel.bpelhelp/org/netbeans/modules/bpel/bpelhelp/basics/project_lifecycle.html" title="Understanding Service Oriented Architecture Projects">Understanding Service Oriented Architecture Projects</a></dd>
5.32 -</dl>
5.33 -<hr>
5.34 -<small>
5.35 -<a href="../credits.html">Legal Notices</a></small>
5.36 -<table border="0" cellpadding="150">
5.37 -<tr><td> </td></tr>
5.38 -<tr><td> </td></tr>
5.39 -<tr><td> </td></tr>
5.40 -</table>
5.41 -</body>
5.42 -</html>
5.43 \ No newline at end of file
6.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/basics/deploy_project.html Wed Feb 21 08:53:38 2007 +0000
6.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
6.3 @@ -1,40 +0,0 @@
6.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
6.5 -<!--
6.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
6.7 -* Use is subject to license terms.
6.8 --->
6.9 -<html>
6.10 -<head>
6.11 -<title>Deploying Composite Application Projects </title>
6.12 -<link rel="stylesheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
6.13 -</head>
6.14 -<body>
6.15 -<h2>Deploying Composite Application Projects </h2>
6.16 -<p><small><a href="#seealso">See Also</a></small></p>
6.17 -<p>Before you can <a href="jbi_tester.html">test-run</a> a business process,
6.18 -make sure that you have <a href="nbdocs://org.netbeans.modules.j2ee.platform/org/netbeans/modules/j2ee/platform/docs/server/server_start.html" title="Starting and Stopping a Server">started the Application Server</a>, <a href="nbdocs://org.netbeans.modules.bpel.bpelhelp/org/netbeans/modules/bpel/bpelhelp/test_run/build_project.html" title="Building BPEL Module Projects">built the BPEL Module project</a>, and <a href="add_jbi_module.html" title="Adding JBI Modules to Composite Application Projects">added</a> it to a Composite Application project as a JBI module. </p>
6.19 -<p><b>To deploy a Composite Application project to the JBI server:</b> </p>
6.20 -<ul>
6.21 -<li>
6.22 - In the Projects window, right-click the Composite Application project's node and choose
6.23 - Deploy Project. </li>
6.24 -</ul>
6.25 -<p>The Deploy action compiles the files in the Composite Application project, packages
6.26 -the compiled BPEL and related web service artifacts (<tt>.wsdl</tt> and <tt>.xsd</tt> files), and deploys them to the BPEL Service Engine. </p>
6.27 -<p>To verify that the project has been successfully deployed to the BPEL Service Engine, open the Runtime window, expand the JBI node, right-click the Service Assemblies node, and choose Refresh. You should see the name of the Composite Application project for the deployed Service Assembly. </p>
6.28 -<dl>
6.29 -<dt><a name="seealso">See Also</a></dt>
6.30 -<dd><a href="add_jbi_module.html" title="Adding JBI Modules to Composite Application Projects">Adding JBI Modules to Composite Application Projects</a></dd>
6.31 -<dd><a href="nbdocs://org.netbeans.modules.bpel.bpelhelp/org/netbeans/modules/bpel/bpelhelp/test_run/about.html" title="Deploying and Performing Test Runs of BPEL Processes">Deploying and Performing Test Runs of BPEL Processes</a></dd>
6.32 -</dl>
6.33 -<hr>
6.34 -<small>
6.35 -<a href="../credits.html">Legal Notices</a></small>
6.36 -<table border="0" cellpadding="150">
6.37 -<tr><td> </td></tr>
6.38 -<tr><td> </td></tr>
6.39 -<tr><td> </td></tr>
6.40 -</table>
6.41 -</body>
6.42 -</html>
6.43 -
7.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/basics/jbi.html Wed Feb 21 08:53:38 2007 +0000
7.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
7.3 @@ -1,45 +0,0 @@
7.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
7.5 -<!--
7.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
7.7 -* Use is subject to license terms.
7.8 --->
7.9 -<html>
7.10 -<head>
7.11 -<link rel="stylesheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
7.12 -<title>Java Business Integration (JBI)</title>
7.13 -</head>
7.14 -<body>
7.15 -<h2>Java Business Integration (JBI)</h2>
7.16 -<p><small><a href="#seealso">See Also</a></small></p>
7.17 -<p>The JBI framework implements Java Specification Request
7.18 - (JSR) 208 to provide the foundation of integration and
7.19 -service-oriented architecture (SOA) solutions.</p>
7.20 -<p>This framework provides the following:</p>
7.21 -<ul>
7.22 - <li><b>JBI pluggability.</b> An open, extensible,
7.23 - pluggable platform that enables the collaboration of
7.24 - integration technology (such as business process engines,
7.25 - document transform engines, B2B management, and business rules)
7.26 - with Web services.</li>
7.27 - <li><b>JBI Service Assembly. </b>A single
7.28 - standard document describing the routing, artifacts,
7.29 - and services that make up an SOA application.
7.30 - You can think of a Service Assembly as an SOA
7.31 - "super <tt>.jar</tt> file" that packages together the
7.32 - individual Service Units, modules, and configurations
7.33 - into a single deployable entity.</li>
7.34 -</ul>
7.35 -<dl>
7.36 -<dt><a name="seealso">See Also</a></dt>
7.37 -<dd><a href="jbi_tester.html" title="Testing a JBI Project">Testing a JBI Project</a></dd>
7.38 -<dd><a href="../jbinode/caps_jbi_node_RuntimeFunctionality.html" title="JBI Nodes: Runtime Functionality">JBI Nodes: Runtime Functionality</a></dd>
7.39 -</dl>
7.40 -<hr>
7.41 -<small><a href="../credits.html">Legal Notices</a></small>
7.42 -<table border="0" cellpadding="150">
7.43 -<tr><td> </td></tr>
7.44 -<tr><td> </td></tr>
7.45 -<tr><td> </td></tr>
7.46 -</table>
7.47 -</body>
7.48 -</html>
7.49 \ No newline at end of file
8.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/basics/jbi_tester.html Wed Feb 21 08:53:38 2007 +0000
8.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
8.3 @@ -1,70 +0,0 @@
8.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
8.5 -<!--
8.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
8.7 -* Use is subject to license terms.
8.8 --->
8.9 -<html>
8.10 -<head>
8.11 -<title>Testing a JBI Project</title>
8.12 -<link rel="stylesheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
8.13 -</head>
8.14 -<body>
8.15 -<h2>Testing a JBI Project</h2>
8.16 -<p><small><a href="#seealso">See Also</a></small></p>
8.17 -<p>You can enhance a JBI deployment project by adding one or more test cases.</p>
8.18 -<h3>Creating and Running Test Cases</h3>
8.19 -<p>In order to obtain test results you must do the following:
8.20 -<ol>
8.21 - <li><a href="jbi_tester_adding_test.html" title="Adding/Binding a Test Case">Add a test case and bind it to a BPEL operation</a></li>
8.22 - <li><a href="jbi_tester_setting_props.html" title="Setting Test Properties">Set the test properties</a></li>
8.23 - <li><a href="jbi_tester_customizing_input.html" title="Customizing Test Input">Customize test input</a></li>
8.24 - <li><a href="jbi_tester_running_tester.html" title="Running the Tester">Run the Tester</a></li>
8.25 -</ol>
8.26 -<ul class="note">
8.27 - <li>All steps in this section assume the following:</li>
8.28 - <ul>
8.29 - <li>You have already created a BPEL Module project containing
8.30 - a .wsdl file that codes an operation you want to test.</li>
8.31 - <li>You have successfully built your BPEL Module project.</li>
8.32 - <li>You have added your BPEL Module project to a Composite Application project as a JBI Module.</li>
8.33 - </ul>
8.34 -</ul>
8.35 -<h3>Looking at Test Case Results</h3>
8.36 -<ul>
8.37 - <li>The first run correctly reports that it failed:
8.38 - The output produced does not match the (empty) <tt>Output.xml</tt> file,
8.39 - and the file’s null content is replaced with the output of the first run. </li>
8.40 - <li>If you run the test again without changing the input,
8.41 - second and subsequent runs report success,
8.42 - since the output matches the contents of <tt>Output.xml</tt>. </li>
8.43 - <li>If you change the value in the <tt>Input.xml</tt> and re-run the test, then:</li>
8.44 - <ul>
8.45 - <li>If the feature-status property is set to progress,
8.46 - then the test indicates success even though a mismatch occurred. </li>
8.47 - <li>If the feature-status property is set to done,
8.48 - then the test indicates failure. </li>
8.49 - </ul>
8.50 - <li>If you right-click <tt>myTestcase1</tt> and click the Diff pop-up menu item,
8.51 - the window displays the difference between the latest output
8.52 - and the contents of <tt>Output.xml</tt>. </li>
8.53 -</ul>
8.54 -<p>To browse the results of past tests, you can choose from the drop-down list of
8.55 - Actual_<em>yymmddhhmmss</em>.xml files, and then click the Refresh button.</p>
8.56 -<dl>
8.57 -<dt><a name="seealso">See Also</a></dt>
8.58 -<dd><a href="nbdocs://org.netbeans.modules.j2ee.platform/org/netbeans/modules/j2ee/platform/docs/server/server_start.html" title="Starting and Stopping a Server">Starting and Stopping a Server</a></dd>
8.59 -<dd><a href="nbdocs://org.netbeans.modules.bpel.bpelhelp/org/netbeans/modules/bpel/bpelhelp/test_run/build_project.html" title="Building BPEL Module Projects">Building BPEL Module Projects</a></dd>
8.60 -<dd><a href="add_jbi_module.html" title="Adding JBI Modules to Composite Application Projects">Adding JBI Modules to Composite Application Projects</a></dd>
8.61 -<dd><a href="deploy_project.html" title="Deploying Composite Application Projects">Deploying Composite Application Projects</a></dd>
8.62 -</dl>
8.63 -<hr>
8.64 -<small>
8.65 -<a href="../credits.html">Legal Notices</a></small>
8.66 -<table border="0" cellpadding="150">
8.67 -<tr><td> </td></tr>
8.68 -<tr><td> </td></tr>
8.69 -<tr><td> </td></tr>
8.70 -</table>
8.71 -</body>
8.72 -</html>
8.73 -
9.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/basics/jbi_tester_adding_test.html Wed Feb 21 08:53:38 2007 +0000
9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
9.3 @@ -1,44 +0,0 @@
9.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
9.5 -<!--
9.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
9.7 -* Use is subject to license terms.
9.8 --->
9.9 -<html>
9.10 -<head>
9.11 -<title>Adding/Binding a Test Case</title>
9.12 -<link rel="stylesheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
9.13 -</head>
9.14 -<body>
9.15 -<h2>Adding/Binding a Test Case</h2>
9.16 -<p><small><a href="#seealso">See Also</a></small></p>
9.17 -<p><b>To add a test case and bind it to a BPEL operation:</b></p>
9.18 -<ol>
9.19 - <li>In the IDE Projects tab, open the Composite Application project
9.20 - to expose its Test folder.</li>
9.21 - <li>Right-click Test, and choose New Test Case from the pop-up menu.<br>
9.22 - This launches the Create New Test Case wizard.</li>
9.23 - <li>In the Enter the Test Case Name step, enter a name for the test case and click Next.</li>
9.24 - <li>In the Select the WSDL Document step, open the BPEL Module project,
9.25 - select the <tt>.wsdl</tt> file containing the operation you want to test,
9.26 - and then click Next.
9.27 - <li>In the next step, select the operation you want to test, and then click Finish.<br>
9.28 - In the project tree, under Test, a new folder is created in the form of an upper case T, containing two files: <tt>Input.xml</tt> and <tt>Output.xml</tt>.</li>
9.29 -</ol>
9.30 -<ul class="note">
9.31 - <li>If you viewed the test case in the Files tab, you would see Concurrent.properties
9.32 - as a third file.</li>
9.33 -</ul>
9.34 -<dl>
9.35 -<dt><a name="seealso">See Also</a></dt>
9.36 -<dd><a href="jbi_tester.html" title="Testing a JBI Project">Testing a JBI Project</a></dd>
9.37 -</dl>
9.38 -<hr>
9.39 -<small>
9.40 -<a href="../credits.html">Legal Notices</a></small>
9.41 -<table border="0" cellpadding="150">
9.42 -<tr><td> </td></tr>
9.43 -<tr><td> </td></tr>
9.44 -<tr><td> </td></tr>
9.45 -</table>
9.46 -</body>
9.47 -</html>
10.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/basics/jbi_tester_customizing_input.html Wed Feb 21 08:53:38 2007 +0000
10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
10.3 @@ -1,47 +0,0 @@
10.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
10.5 -<!--
10.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
10.7 -* Use is subject to license terms.
10.8 --->
10.9 -<html>
10.10 -<head>
10.11 -<title>Customizing Test Input</title>
10.12 -<link rel="stylesheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
10.13 -</head>
10.14 -<body>
10.15 -<h2>Customizing Test Input</h2>
10.16 -<p><small><a href="#seealso">See Also</a></small></p>
10.17 -<p><b>To customize test input:</b></p>
10.18 -<ol>
10.19 - <li>In the project tree, right-click Input.xml and click Edit.</li>
10.20 - <li>Modify its contents to your taste. For example, wherever you see <tt><value>?string?</value></tt> click within <tt>?string?</tt> and replace it with a string of any length.
10.21 - However, within such strings, do not include the characters <b><</b> (less-than sign) or <b>&</b> (ampersand)
10.22 - unless you use them with XML semantics.</li>
10.23 - <li>When you are satisfied, click Save.</li>
10.24 - <li>Right-click <tt>Output.xml</tt> and click Edit to examine its contents:
10.25 - <ul>
10.26 - <li>It is empty. This is a special state that triggers a special operation when the test is run.</li>
10.27 - <li>Each time the test is run, the current output is compared to the contents of Output.xml;
10.28 - whatever differences are detected will be stored in the
10.29 - Actual_<em>yymmddhhmmss</em>.xml
10.30 - file under the test case folder.
10.31 - However, in the special case where Output.xml starts null,
10.32 - then the output is written to the <tt>Output.xml</tt> file.</li>
10.33 - <li>In each run after the first, assuming Output.xml is no longer null, its contents are preserved.
10.34 - In other words, a previous output is never overwritten by new results.</li>
10.35 - </ul>
10.36 -</ol>
10.37 -<dl>
10.38 -<dt><a name="seealso">See Also</a></dt>
10.39 -<dd><a href="jbi_tester.html" title="Testing a JBI Project">Testing a JBI Project</a></dd>
10.40 -</dl>
10.41 -<hr>
10.42 -<small>
10.43 -<a href="../credits.html">Legal Notices</a></small>
10.44 -<table border="0" cellpadding="150">
10.45 -<tr><td> </td></tr>
10.46 -<tr><td> </td></tr>
10.47 -<tr><td> </td></tr>
10.48 -</table>
10.49 -</body>
10.50 -</html>
11.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/basics/jbi_tester_running_tester.html Wed Feb 21 08:53:38 2007 +0000
11.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
11.3 @@ -1,35 +0,0 @@
11.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
11.5 -<!--
11.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
11.7 -* Use is subject to license terms.
11.8 --->
11.9 -<html>
11.10 -<head>
11.11 -<title>Running the Tester</title>
11.12 -<link rel="stylesheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
11.13 -</head>
11.14 -<body>
11.15 -<h2>Running the Tester</h2>
11.16 -<p><small><a href="#seealso">See Also</a></small></p>
11.17 -<p><b>To run a single test case:</b> </p>
11.18 -<ul>
11.19 - <li>In the project tree, right-click the test case folder and choose Run.</li>
11.20 -</ul>
11.21 -<b>To run all test cases in a project:</b>
11.22 -<ul>
11.23 - <li>Right-click the project and choose Test Project from the pop-up menu (or press Alt-F6).</li>
11.24 -</ul>
11.25 -<dl>
11.26 -<dt><a name="seealso">See Also</a></dt>
11.27 -<dd><a href="jbi_tester.html" title="Testing a JBI Project">Testing a JBI Project</a></dd>
11.28 -</dl>
11.29 -<hr>
11.30 -<small>
11.31 -<a href="../credits.html">Legal Notices</a></small>
11.32 -<table border="0" cellpadding="150">
11.33 -<tr><td> </td></tr>
11.34 -<tr><td> </td></tr>
11.35 -<tr><td> </td></tr>
11.36 -</table>
11.37 -</body>
11.38 -</html>
12.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/basics/jbi_tester_setting_props.html Wed Feb 21 08:53:38 2007 +0000
12.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
12.3 @@ -1,74 +0,0 @@
12.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
12.5 -<!--
12.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
12.7 -* Use is subject to license terms.
12.8 --->
12.9 -<html>
12.10 -<head>
12.11 -<title>Setting the Test Properties</title>
12.12 -<link rel="stylesheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
12.13 -</head>
12.14 -<body>
12.15 -<h2>Setting the Test Properties</h2>
12.16 -<p><small><a href="#seealso">See Also</a></small></p>
12.17 -<p><b>To set the test properties:</b></p>
12.18 -<ol>
12.19 - <li>Right-click the test case and choose pop-menu item Properties.</li>
12.20 - <li>Set the properties of the test case as follows:</li>
12.21 - <dl>
12.22 - <dt><strong>Description</strong>: string</dt>
12.23 - <dd>User-entered text to help user know what the test is about.</dd>
12.24 - <dt><strong>Destination</strong>: URL
12.25 - (from the <tt>.wsdl</tt> file's <tt><soap:address location="THIS"></tt> tag)</dt>
12.26 - <dd>Identifies the location of the web service to be tested.</dd>
12.27 - <dt><strong>SoapAction</strong> (default: blank)</dt>
12.28 - <dd></dd>
12.29 - <dt><strong>Input File</strong> (read-only; generated by system)</dt>
12.30 - <dd>Name of input file.</dd>
12.31 - <dt><strong>Output File</strong> (read-only; generated by system)</dt>
12.32 - <dd>Name of output file.</dd>
12.33 - <dt><strong>Concurrent Threads</strong>: integer; default = 1</dt>
12.34 - <dd>Each thread can invoke the test case multiple times (see the following property).
12.35 - Thus, if conc=2 and inv=3, the test case will be run 6 times
12.36 - (two threads, each run thrice).</dd>
12.37 - <dt><strong>Invokes Per Thread</strong> : integer; default = 1</dt>
12.38 - <dd>Number of times each thread invokes the test case.</dd>
12.39 - <dt><strong>Test Timeout(sec)</strong>: integer; default = 30</dt>
12.40 - <dd>How long each thread has to finish.
12.41 - If it does not finish in the allotted time, then an exception is thrown.</dd>
12.42 - <dt><strong>Calculate Throughput</strong>: boolean</dt>
12.43 - <dd>If the checkbox is selected, then throughput statistics are calculated.
12.44 - Example: If a test specifies two threads and three invokes per thread,
12.45 - and if the test takes 15 seconds for the 6 invocations, then
12.46 - the statistics report an average of 2.5 seconds each.</dd>
12.47 - <dt><strong>Comparison Type</strong>: drop-down list:</dt>
12.48 - <dd>
12.49 - <ul>
12.50 - <li>identical: Considers the output and actual output as a stream of characters.
12.51 - <li>binary: Considers the output and actual output as a stream of bytes.
12.52 - <li>equals: Considers the output and actual output as a XML documents.
12.53 - </ul>
12.54 - </dd>
12.55 - <dt><strong>Feature Status</strong> : pull-down list:</dt>
12.56 - <dd>
12.57 - <ul>
12.58 - <li>progress: Marks test completion as "success", regardless of actual outcome.
12.59 - <li>done: Records actual outcome of test.
12.60 - </ul>
12.61 - </dd>
12.62 - </dl>
12.63 -</ol>
12.64 -<dl>
12.65 -<dt><a name="seealso">See Also</a></dt>
12.66 -<dd><a href="jbi_tester.html" title="Testing a JBI Project">Testing a JBI Project</a></dd>
12.67 -</dl>
12.68 -<hr>
12.69 -<small>
12.70 -<a href="../credits.html">Legal Notices</a></small>
12.71 -<table border="0" cellpadding="150">
12.72 -<tr><td> </td></tr>
12.73 -<tr><td> </td></tr>
12.74 -<tr><td> </td></tr>
12.75 -</table>
12.76 -</body>
12.77 -</html>
13.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/capshelp-idx.xml Wed Feb 21 08:53:38 2007 +0000
13.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
13.3 @@ -1,24 +0,0 @@
13.4 -<?xml version='1.0' encoding='ISO-8859-1'?>
13.5 -<!DOCTYPE index PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Index Version 2.0//EN"
13.6 - "http://java.sun.com/products/javahelp/index_2_0.dtd">
13.7 -
13.8 -<index version="2.0">
13.9 - <indexitem text="Composite Application projects">
13.10 - <indexitem text="about" target="org.netbeans.modules.compapp.projects.jbi.ui.JbiLogicalViewProvider" />
13.11 - <indexitem text="adding as JBI modules" target="caps_basics_add_jbi" />
13.12 - <indexitem text="creating" target="caps_basics_create" />
13.13 - <indexitem text="deploying" target="caps_basics_deploy" />
13.14 - </indexitem>
13.15 - <indexitem text="Java Business Integration (JBI)">
13.16 - <indexitem text="about" target="caps_basics_jbi" />
13.17 - <indexitem text="JBI nodes, in Runtime window" target="org.netbeans.modules.sun.manager.jbi.nodes.JBINode" />
13.18 - <indexitem text="runtime functionality" target="caps_jbi_runtime_function" />
13.19 - </indexitem>
13.20 - <indexitem text="testing, JBI modules">
13.21 - <indexitem text="about" target="caps_jbi_tester" />
13.22 - <indexitem text="adding test cases" target="caps_jbi_tester_adding_test" />
13.23 - <indexitem text="running tests" target="caps_jbi_tester_running_tester" />
13.24 - <indexitem text="test input, customizing" target="caps_jbi_tester_customizing_input" />
13.25 - <indexitem text="test properties, configuring" target="caps_jbi_tester_setting_props" />
13.26 - </indexitem>
13.27 -</index>
14.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/capshelp-map.jhm Wed Feb 21 08:53:38 2007 +0000
14.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
14.3 @@ -1,28 +0,0 @@
14.4 -<?xml version='1.0' encoding='ISO-8859-1'?>
14.5 -<!DOCTYPE map PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Map Version 1.0//EN"
14.6 - "http://java.sun.com/products/javahelp/map_1_0.dtd">
14.7 -
14.8 -<map version="1.0">
14.9 - <mapID target="caps_basics_jbi" url="basics/jbi.html"/>
14.10 - <mapID target="caps_credits" url="credits.html"/>
14.11 - <mapID target="org.netbeans.modules.compapp.projects.jbi.ui.JbiLogicalViewProvider" url="basics/about.html"/>
14.12 - <mapID target="org.netbeans.modules.compapp.projects.jbi.ui.wizards.NewJbiProjectWizardIterator" url="basics/caps_project_basic_create.html"/>
14.13 - <mapID target="org.netbeans.modules.compapp.projects.jbi.ui.wizards.PanelConfigureProject" url="basics/caps_project_basic_create.html"/>
14.14 - <mapID target="org.netbeans.modules.compapp.projects.jbi.ui.customizer.CustomizerGeneral" url="properties/caps_project_props.html"/>
14.15 - <mapID target="org.netbeans.modules.compapp.projects.jbi.ui.customizer.CustomizerJarContent" url="properties/caps_project_props.html"/>
14.16 - <mapID target="org.netbeans.modules.compapp.projects.jbi.ui.customizer.CustomizerRun" url="properties/caps_project_props.html"/>
14.17 - <mapID target="org.netbeans.modules.sun.manager.jbi.nodes.JBINode" url="jbinode/caps_jbi_node.html"/>
14.18 - <mapID target="org.netbeans.modules.sun.manager.jbi.nodes.JBIComponentContainerNode$SharedLibraries" url="jbinode/caps_jbi_node_SharedLibraries.html"/>
14.19 - <mapID target="org.netbeans.modules.sun.manager.jbi.nodes.JBIComponentContainerNode$ServiceEngines" url="jbinode/caps_jbi_node_ServiceEngines.html"/>
14.20 - <mapID target="org.netbeans.modules.sun.manager.jbi.nodes.JBIComponentContainerNode$BindingComponents" url="jbinode/caps_jbi_node_BindingComponents.html"/>
14.21 - <mapID target="org.netbeans.modules.sun.manager.jbi.nodes.JBIServiceAssembliesNode" url="jbinode/caps_jbi_node_ServiceAssemblies.html"/>
14.22 - <mapID target="caps_jbi_runtime_function" url="jbinode/caps_jbi_node_RuntimeFunctionality.html"/>
14.23 - <mapID target="caps_basics_create" url="basics/create_project.html"/>
14.24 - <mapID target="caps_basics_deploy" url="basics/deploy_project.html"/>
14.25 - <mapID target="caps_basics_add_jbi" url="basics/add_jbi_module.html"/>
14.26 - <mapID target="caps_jbi_tester" url="basics/jbi_tester.html"/>
14.27 - <mapID target="caps_jbi_tester_adding_test" url="basics/jbi_tester_adding_test.html"/>
14.28 - <mapID target="caps_jbi_tester_customizing_input" url="basics/jbi_tester_customizing_input.html"/>
14.29 - <mapID target="caps_jbi_tester_running_tester" url="basics/jbi_tester_running_tester.html"/>
14.30 - <mapID target="caps_jbi_tester_setting_props" url="basics/jbi_tester_setting_props.html"/>
14.31 -</map>
15.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/capshelp-toc.xml Wed Feb 21 08:53:38 2007 +0000
15.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
15.3 @@ -1,23 +0,0 @@
15.4 -<?xml version='1.0' encoding='ISO-8859-1'?>
15.5 -<!DOCTYPE toc PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp TOC Version 2.0//EN"
15.6 - "http://java.sun.com/products/javahelp/toc_2_0.dtd">
15.7 -
15.8 -<toc version="2.0">
15.9 - <tocitem text="Composite Applications">
15.10 - <tocitem text="About Composite Application Projects" target="org.netbeans.modules.compapp.projects.jbi.ui.JbiLogicalViewProvider" />
15.11 - <tocitem text="Working with Composite Application Projects">
15.12 - <tocitem text="Creating Composite Application Projects" target="caps_basics_create" />
15.13 - <tocitem text="Adding JBI Modules to Composite Application Projects" target="caps_basics_add_jbi" />
15.14 - <tocitem text="Deploying Composite Application Projects" target="caps_basics_deploy" />
15.15 - </tocitem>
15.16 - <tocitem text="Testing a JBI Project" target="caps_jbi_tester">
15.17 - <tocitem text="Adding/Binding a Test Case" target="caps_jbi_tester_adding_test" />
15.18 - <tocitem text="Setting the Test Properties" target="caps_jbi_tester_setting_props" />
15.19 - <tocitem text="Customizing Test Input" target="caps_jbi_tester_customizing_input" />
15.20 - <tocitem text="Running the Tester" target="caps_jbi_tester_running_tester" />
15.21 - </tocitem>
15.22 - <tocitem text="Java Business Integration (JBI) Basics" target="caps_basics_jbi">
15.23 - <tocitem text="JBI Nodes: Runtime Functionality" target="caps_jbi_runtime_function" />
15.24 - </tocitem>
15.25 - </tocitem>
15.26 -</toc>
16.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/capshelp.hs Wed Feb 21 08:53:38 2007 +0000
16.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
16.3 @@ -1,29 +0,0 @@
16.4 -<?xml version='1.0' encoding='ISO-8859-1'?>
16.5 -<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN"
16.6 - "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
16.7 -
16.8 -<helpset version="2.0">
16.9 - <title>Composite Application Help</title>
16.10 - <maps>
16.11 - <homeID>caps_intro</homeID>
16.12 - <mapref location="capshelp-map.jhm"/>
16.13 - </maps>
16.14 - <view>
16.15 - <name>TOC</name>
16.16 - <label>Table of Contents</label>
16.17 - <type>javax.help.TOCView</type>
16.18 - <data>capshelp-toc.xml</data>
16.19 - </view>
16.20 - <view>
16.21 - <name>Index</name>
16.22 - <label>Index</label>
16.23 - <type>javax.help.IndexView</type>
16.24 - <data>capshelp-idx.xml</data>
16.25 - </view>
16.26 - <view>
16.27 - <name>Search</name>
16.28 - <label>Search</label>
16.29 - <type>javax.help.SearchView</type>
16.30 - <data engine="com.sun.java.help.search.DefaultSearchEngine">JavaHelpSearch</data>
16.31 - </view>
16.32 -</helpset>
17.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/credits.html Wed Feb 21 08:53:38 2007 +0000
17.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
17.3 @@ -1,18 +0,0 @@
17.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
17.5 -<!--
17.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
17.7 -* Use is subject to license terms.
17.8 --->
17.9 -<html>
17.10 -<head>
17.11 -<title>Legal Notices</title>
17.12 -<link rel="stylesheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
17.13 -</head>
17.14 -<body>
17.15 -<p>The contents of this file are subject to the terms of the Common Development and Distribution License (the License). You may not use this file except in compliance with the License. </p>
17.16 -<p>You can obtain a copy of the License at <tt>http://www.netbeans.org/cddl.html</tt> or <tt>http://www.netbeans.org/cddl.txt</tt>.</p>
17.17 -<p>When distributing Covered Code, include this CDDL Header Notice in each file and include the License file at http://www.netbeans.org/cddl.txt. If applicable, add the following below the CDDL Header, with the fields enclosed by brackets [] replaced by your own identifying information: "Portions Copyrighted [year] [name of copyright owner]" </p>
17.18 -<p>The Original Software is NetBeans. The Initial Developer of the Original Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.</p>
17.19 -<p><b>Note:</b> Sun is not responsible for the availability of third-party web sites mentioned in this document and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. Sun will not be responsible or liable for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods, or services available on or through any such sites or resources.</p>
17.20 -</body>
17.21 -</html>
18.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/intro.html Wed Feb 21 08:53:38 2007 +0000
18.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
18.3 @@ -1,27 +0,0 @@
18.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
18.5 -<!--
18.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
18.7 -* Use is subject to license terms.
18.8 --->
18.9 -<html>
18.10 -<head>
18.11 -<title>About Composite Applications</title>
18.12 -<link rel="StyleSheet" href="/org/netbeans/modules/usersguide/ide.css" type="text/css">
18.13 -</head>
18.14 -<body>
18.15 -<h2>About Composite Applications</h2>
18.16 -<p>Using Composite Application projects, one can compose business logic of several project types into
18.17 -a compsite application targeting the Java Business Integration (JBI) server. The project system provides support for the developer to easily:</p>
18.18 -<ul>
18.19 - <li>assemble an application utilizing multiple project types, e.g., BPEL, XSLT, and others;</li>
18.20 - <li>configure external/edge access protocols, e.g., soap, jms, smtp, and others;</li>
18.21 - <li>build JBI deployment packages;</li>
18.22 - <li>deploy the application image to the target JBI server;</li>
18.23 - <li>monitor JBI server components and applications status;</li>
18.24 - <li>define and run test cases;</li>
18.25 -</ul>
18.26 -<hr>
18.27 -<small>Copyright © 2006 Sun Microsystems, Inc. All rights reserved.<br>
18.28 -<a href="credits.html">Legal Notices</a></small>
18.29 -</body>
18.30 -</html>
19.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/jbinode/caps_jbi_node.html Wed Feb 21 08:53:38 2007 +0000
19.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
19.3 @@ -1,42 +0,0 @@
19.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
19.5 -<!--
19.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
19.7 -* Use is subject to license terms.
19.8 --->
19.9 -<html>
19.10 -<head>
19.11 -<link rel="stylesheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
19.12 -<title>JBI Node (Under Runtime/Servers)</title>
19.13 -</head>
19.14 -<body>
19.15 -<h2>JBI Node (Under Runtime/Servers)</h2>
19.16 -<p><small><a href="#seealso">See Also</a></small></p>
19.17 -<p>The JBI node holds all installed or deployed JBI components in one of the following subfolders:</p>
19.18 -<ul>
19.19 - <li><a href="caps_jbi_node_ServiceEngines.html">Service Engines:</a> Perform transformations.<br>
19.20 - You can use the folder's pop-up menu to install a new Service Engine or to refresh the current list.</li>
19.21 - <li><a href="caps_jbi_node_BindingComponents.html">Binding Components:</a> Connect to external systems.
19.22 - <br>
19.23 - You can use the folder's pop-up menu to install a new Binding Component or to refresh the current list.</li>
19.24 - <li><a href="caps_jbi_node_SharedLibraries.html">Shared Libraries:</a>Components that provide common code shared by multiple JBI components
19.25 - deployed on the JBI meta-container. Shared libraries are required by some SEs and BCs to function properly. <br>
19.26 -You can use the folder's pop-up menu to install a new shared library or to refresh the current list. </li>
19.27 - <li><a href="caps_jbi_node_ServiceAssemblies.html">Service Assemblies:</a> Deployable SOA applications.
19.28 - <br>
19.29 - You can use the folder's pop-up menu to deploy a new Service Assembly or to refresh the current list.</li>
19.30 -</ul>
19.31 -<dl>
19.32 -<dt><a name="seealso">See Also</a></dt>
19.33 -<dd><a href="caps_jbi_node_RuntimeFunctionality.html" title="JBI Nodes: Runtime Functionality">JBI Nodes: Runtime Functionality</a></dd>
19.34 -<dd><a href="nbdocs://org.netbeans.modules.bpel.bpelhelp/org/netbeans/modules/bpel/bpelhelp/test_run/about.html" title="Deploying and Performing Test Runs of BPEL Processes">Deploying and Performing Test Runs of BPEL Processes</a></dd>
19.35 -</dl>
19.36 -<hr>
19.37 -<small>
19.38 -<a href="../credits.html">Legal Notices</a></small>
19.39 -<table border="0" cellpadding="150">
19.40 -<tr><td> </td></tr>
19.41 -<tr><td> </td></tr>
19.42 -<tr><td> </td></tr>
19.43 -</table>
19.44 -</body>
19.45 -</html>
20.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/jbinode/caps_jbi_node_BindingComponents.html Wed Feb 21 08:53:38 2007 +0000
20.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
20.3 @@ -1,36 +0,0 @@
20.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
20.5 -<!--
20.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
20.7 -* Use is subject to license terms.
20.8 --->
20.9 -<html>
20.10 -<head>
20.11 -<link rel="stylesheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
20.12 -<title>Binding Components Node (Under Runtime/Server/JBI)</title>
20.13 -</head>
20.14 -<body>
20.15 -<h2>Binding Components Node (Under Runtime/Server/JBI)</h2>
20.16 -<p><small><a href="#seealso">See Also</a></small></p>
20.17 -<p>The Binding Components node is a folder containing all
20.18 - JBI Binding Components that are currently installed to this server. A binding component is the JBI component type that connects to external
20.19 - systems.</p>
20.20 -<p>The pop-up menu of each Binding Component subnode allows you to start,
20.21 - stop, shut down, or uninstall it.
20.22 -</p>
20.23 -<dl>
20.24 -<dt><a name="seealso">See Also</a></dt>
20.25 -<dd><a href="caps_jbi_node.html" title="JBI Node (Under Runtime/Servers)">JBI Node (Under Runtime/Servers)</a></dd>
20.26 -<dd><a href="caps_jbi_node_ServiceAssemblies.html" title="Service Assemblies Node (Under Runtime/Server/JBI)">Service Assemblies Node (Under Runtime/Server/JBI)</a></dd>
20.27 -<dd><a href="caps_jbi_node_ServiceEngines.html" title="Service Engines Node (Under Runtime/Server/JBI)">Service Engines Node (Under Runtime/Server/JBI)</a></dd>
20.28 -<dd><a href="caps_jbi_node_SharedLibraries.html" title="Shared Libraries Node (Under Runtime/Server/JBI)">Shared Libraries Node (Under Runtime/Server/JBI)</a></dd>
20.29 -</dl>
20.30 -<hr>
20.31 -<small>
20.32 -<a href="../credits.html">Legal Notices</a></small>
20.33 -<table border="0" cellpadding="150">
20.34 -<tr><td> </td></tr>
20.35 -<tr><td> </td></tr>
20.36 -<tr><td> </td></tr>
20.37 -</table>
20.38 -</body>
20.39 -</html>
21.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/jbinode/caps_jbi_node_RuntimeFunctionality.html Wed Feb 21 08:53:38 2007 +0000
21.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
21.3 @@ -1,51 +0,0 @@
21.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
21.5 -<!--
21.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
21.7 -* Use is subject to license terms.
21.8 --->
21.9 -<html>
21.10 -<head>
21.11 -<link rel="stylesheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
21.12 -<title>JBI Nodes: Runtime Functionality</title>
21.13 -</head>
21.14 -<body>
21.15 -<h2>JBI Nodes: Runtime Functionality</h2>
21.16 -<p><small><a href="#seealso">See Also</a></small></p>
21.17 -<p>You can perform the following runtime actions on items contained in the subfolders of the JBI node:</p>
21.18 -<ul>
21.19 - <li>By right-clicking a component name under the <a href="caps_jbi_node_ServiceEngines.html" title="Service Engines Node (Under Runtime/Server/JBI)">Service Engines</a> node, you can start, stop, shut down, or uninstall an existing Service Engine. </li>
21.20 - <li>By right-clicking a component name under the <a href="caps_jbi_node_BindingComponents.html" title="Binding Components Node (Under Runtime/Server/JBI)">Binding Components</a> node, you can start, stop, shut down, or uninstall an existing Binding Component. </li>
21.21 - <li>By right-clicking a component name under the <a href="caps_jbi_node_SharedLibraries.html" title="Shared Libraries Node (Under Runtime/Server/JBI)"> Shared Libraries</a> node, you can uninstall an existing shared library. </li>
21.22 - <li>By right-clicking a component name under the <a href="caps_jbi_node_ServiceAssemblies.html">Service Assemblies</a> node, you can start, stop, shut down, or undeploy an existing Service Assembly. </li>
21.23 -</ul>
21.24 -<p>In addition, you can right-click the folder itself to install/deploy a new component or to
21.25 - refresh the current list.
21.26 - Note that components can be installed and deployed by tools other than the JBI node by such means as ant tasks or the administrator console.
21.27 - Therefore, it is good practice to refresh the component list immediately before you use a pop-up menu to take any action. </p>
21.28 -<h3>
21.29 -Starting, Stopping, Shutting Down, and Uninstalling/Undeploying
21.30 -</h3>
21.31 -<ul>
21.32 - <li>Starting or stopping a component causes it to begin or end processing, such as
21.33 - reading/transforming/writing data, or seeking/making/dropping connections. </li>
21.34 - <li>Shutting down a component keeps it available to application server while flagging
21.35 - it as not currently processing. </li>
21.36 - <li>Uninstalling a component, or undeploying a Service Assembly, removes it from
21.37 - the set of components that are available to the application server. </li>
21.38 -</ul>
21.39 -<dl>
21.40 -<dt><a name="seealso">See Also</a></dt>
21.41 -<dd><a href="caps_jbi_node.html" title="JBI Node (Under Runtime/Servers)">JBI Node (Under Runtime/Servers)</a></dd>
21.42 -<dd><a href="caps_jbi_node_ServiceAssemblies.html" title="Service Assemblies Node (Under Runtime/Server/JBI)">Service Assemblies Node (Under Runtime/Server/JBI)</a></dd>
21.43 -<dd><a href="caps_jbi_node_ServiceEngines.html" title="Service Engines Node (Under Runtime/Server/JBI)">Service Engines Node (Under Runtime/Server/JBI)</a></dd>
21.44 -</dl>
21.45 -<hr>
21.46 -<small>
21.47 -<a href="../credits.html">Legal Notices</a></small>
21.48 -<table border="0" cellpadding="150">
21.49 -<tr><td> </td></tr>
21.50 -<tr><td> </td></tr>
21.51 -<tr><td> </td></tr>
21.52 -</table>
21.53 -</body>
21.54 -</html>
22.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/jbinode/caps_jbi_node_ServiceAssemblies.html Wed Feb 21 08:53:38 2007 +0000
22.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
22.3 @@ -1,34 +0,0 @@
22.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
22.5 -<!--
22.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22.7 -* Use is subject to license terms.
22.8 --->
22.9 -<html>
22.10 -<head>
22.11 -<link rel="stylesheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
22.12 -<title>Service Assemblies Node (Under Runtime/Server/JBI)</title>
22.13 -</head>
22.14 -<body>
22.15 -<h2>Service Assemblies Node (Under Runtime/Server/JBI)</h2>
22.16 -<p><small><a href="#seealso">See Also</a></small></p>
22.17 -<p>The Service Assemblies node is a folder containing all
22.18 - Service Assemblies that are currently deployed to this server. </p>
22.19 -<p>A Service Assembly is a single standard document describing the routing, artifacts, and services that make up an SOA application. You can think of a Service Assembly as an SOA "super <tt>.jar</tt> file" that packages together the individual Service Units, modules, and configurations into a single deployable entity. </p>
22.20 -<p>The pop-up menu of each Service Assembly subnode allows you to start, stop, shut down, or undeploy it.</p>
22.21 -<dl>
22.22 -<dt><a name="seealso">See Also</a></dt>
22.23 -<dd><a href="caps_jbi_node.html" title="JBI Node (Under Runtime/Servers)">JBI Node (Under Runtime/Servers)</a></dd>
22.24 -<dd><a href="caps_jbi_node_BindingComponents.html" title="Binding Components Node (Under Runtime/Server/JBI)">Binding Components Node (Under Runtime/Server/JBI)</a></dd>
22.25 -<dd><a href="caps_jbi_node_ServiceEngines.html" title="Service Engines Node (Under Runtime/Server/JBI)">Service Engines Node (Under Runtime/Server/JBI)</a></dd>
22.26 -<dd><a href="caps_jbi_node_SharedLibraries.html" title="Shared Libraries Node (Under Runtime/Server/JBI)">Shared Libraries Node (Under Runtime/Server/JBI)</a></dd>
22.27 -</dl>
22.28 -<hr>
22.29 -<small>
22.30 -<a href="../credits.html">Legal Notices</a></small>
22.31 -<table border="0" cellpadding="150">
22.32 -<tr><td> </td></tr>
22.33 -<tr><td> </td></tr>
22.34 -<tr><td> </td></tr>
22.35 -</table>
22.36 -</body>
22.37 -</html>
22.38 \ No newline at end of file
23.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/jbinode/caps_jbi_node_ServiceEngines.html Wed Feb 21 08:53:38 2007 +0000
23.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
23.3 @@ -1,34 +0,0 @@
23.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
23.5 -<!--
23.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23.7 -* Use is subject to license terms.
23.8 --->
23.9 -<html>
23.10 -<head>
23.11 -<link rel="stylesheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
23.12 -<title>Service Engines Node (Under Runtime/Server/JBI)</title>
23.13 -</head>
23.14 -<body>
23.15 -<h2>Service Engines Node (Under Runtime/Server/JBI)</h2>
23.16 -<p><small><a href="#seealso">See Also</a></small></p>
23.17 -<p>The Service Engines node is a folder containing all
23.18 - JBI Service Engines that are currently installed to this server. A service engine is the JBI component type that performs data transformations.</p>
23.19 -<p>The pop-up menu of each Service Engine subnode allows you to start,
23.20 - stop, shut down, or uninstall it. </p>
23.21 -<dl>
23.22 -<dt><a name="seealso">See Also</a></dt>
23.23 -<dd><a href="caps_jbi_node.html" title="JBI Node (Under Runtime/Servers)">JBI Node (Under Runtime/Servers)</a></dd>
23.24 -<dd><a href="caps_jbi_node_BindingComponents.html" title="Binding Components Node (Under Runtime/Server/JBI)">Binding Components Node (Under Runtime/Server/JBI)</a></dd>
23.25 -<dd><a href="caps_jbi_node_ServiceAssemblies.html" title="Service Assemblies Node (Under Runtime/Server/JBI)">Service Assemblies Node (Under Runtime/Server/JBI)</a></dd>
23.26 -<dd><a href="caps_jbi_node_SharedLibraries.html" title="Shared Libraries Node (Under Runtime/Server/JBI)">Shared Libraries Node (Under Runtime/Server/JBI)</a></dd>
23.27 -</dl>
23.28 -<hr>
23.29 -<small>
23.30 -<a href="../credits.html">Legal Notices</a></small>
23.31 -<table border="0" cellpadding="150">
23.32 -<tr><td> </td></tr>
23.33 -<tr><td> </td></tr>
23.34 -<tr><td> </td></tr>
23.35 -</table>
23.36 -</body>
23.37 -</html>
23.38 \ No newline at end of file
24.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/jbinode/caps_jbi_node_SharedLibraries.html Wed Feb 21 08:53:38 2007 +0000
24.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
24.3 @@ -1,36 +0,0 @@
24.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
24.5 -<!--
24.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24.7 -* Use is subject to license terms.
24.8 --->
24.9 -<html>
24.10 -<head>
24.11 -<link rel="stylesheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
24.12 -<title>Shared Libraries Node (Under Runtime/Server/JBI)</title>
24.13 -</head>
24.14 -<body>
24.15 -<h2>Shared Libraries Node (Under Runtime/Server/JBI)</h2>
24.16 -<p><small><a href="#seealso">See Also</a></small></p>
24.17 -<p>The Shared Libraries node is a folder containing all
24.18 - shared libraries that are currently installed to this server.</p>
24.19 -<p>Shared libraries provide common code shared by multiple
24.20 - JBI components deployed on the JBI meta-container.
24.21 - They are required by some service engines and binding components to function properly.</p>
24.22 -<p>The pop-up menu of each Shared Libraries subnode allows you to
24.23 - install or uninstall it. </p>
24.24 -<dl>
24.25 -<dt><a name="seealso">See Also</a></dt>
24.26 -<dd><a href="caps_jbi_node.html" title="JBI Node (Under Runtime/Servers)">JBI Node (Under Runtime/Servers)</a></dd>
24.27 -<dd><a href="caps_jbi_node_ServiceAssemblies.html" title="Service Assemblies Node (Under Runtime/Server/JBI)">Service Assemblies Node (Under Runtime/Server/JBI)</a></dd>
24.28 -<dd><a href="caps_jbi_node_ServiceEngines.html" title="Service Engines Node (Under Runtime/Server/JBI)">Service Engines Node (Under Runtime/Server/JBI)</a></dd>
24.29 -</dl>
24.30 -<hr>
24.31 -<small>
24.32 -<a href="../credits.html">Legal Notices</a></small>
24.33 -<table border="0" cellpadding="150">
24.34 -<tr><td> </td></tr>
24.35 -<tr><td> </td></tr>
24.36 -<tr><td> </td></tr>
24.37 -</table>
24.38 -</body>
24.39 -</html>
25.1 --- a/compapp.help/javahelp/org/netbeans/modules/compapp/capshelp/properties/caps_project_props.html Wed Feb 21 08:53:38 2007 +0000
25.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
25.3 @@ -1,48 +0,0 @@
25.4 -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
25.5 -<!--
25.6 -* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
25.7 -* Use is subject to license terms.
25.8 --->
25.9 -<html>
25.10 -<head>
25.11 -<title>Java Business Integration (JBI)</title>
25.12 -<link rel="StyleSheet" href="/org/netbeans/modules/usersguide/ide.css" type="text/css">
25.13 -</head>
25.14 -<body>
25.15 -
25.16 -<!-- MAIN CONTENT -->
25.17 -
25.18 -<h2>Composite Application Project Properties Dialog Box</h2>
25.19 -
25.20 -<p>You open the Properties dialog box for a Composite Application project
25.21 -by right-clicking the Composite Application project node and choosing Properties.
25.22 -The tree in the left pane shows that you have access to three pages:</p>
25.23 -
25.24 -<ul>
25.25 - <li>General</li>
25.26 - <li>(Build) > Packaging Project</li>
25.27 - <li>(Run) > Running Project</li>
25.28 -</ul>
25.29 -
25.30 -<p>The General page allows you to view the path of the folder containing
25.31 -the project's files and to supply aliases and descriptions for the project's
25.32 -Service Assembly and Service Unit.</p>
25.33 -
25.34 -<p>The Packaging Project page allows you to:</p>
25.35 -
25.36 -<ul>
25.37 - <li>View or modify the filename of the application <tt>.jar</tt> file to be deployed.</li>
25.38 - <li>View and update the resources (binding components and service engines) that are targeted.</li>
25.39 - <li>View, add, or remove the artifacts (JBI modules) to be deployed in the service assembly.</li>
25.40 -</ul>
25.41 -
25.42 -<p>The Running Project page allows you to view or modify the server that is running the project.
25.43 -(If only one server available, the drop-down list contains only one item.)</p>
25.44 -
25.45 -<!-- END OF MAIN CONTENT -->
25.46 -
25.47 -<hr>
25.48 -<small><a href="../credits.html">Legal Notices</a></small>
25.49 -</body>
25.50 -</html>
25.51 -
26.1 --- a/compapp.help/manifest.mf Wed Feb 21 08:53:38 2007 +0000
26.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
26.3 @@ -1,6 +0,0 @@
26.4 -Manifest-Version: 1.0
26.5 -OpenIDE-Module: org.netbeans.modules.compapp.capshelp
26.6 -OpenIDE-Module-Layer: org/netbeans/modules/compapp/capshelp/layer.xml
26.7 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/compapp/capshelp/Bundle.properties
26.8 -OpenIDE-Module-Specification-Version: 1.1
26.9 -
27.1 --- a/compapp.help/nbproject/project.properties Wed Feb 21 08:53:38 2007 +0000
27.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
27.3 @@ -1,20 +0,0 @@
27.4 -#
27.5 -# The contents of this file are subject to the terms of the Common Development
27.6 -# and Distribution License (the License). You may not use this file except in
27.7 -# compliance with the License.
27.8 -#
27.9 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
27.10 -# or http://www.netbeans.org/cddl.txt.
27.11 -
27.12 -# When distributing Covered Code, include this CDDL Header Notice in each file
27.13 -# and include the License file at http://www.netbeans.org/cddl.txt.
27.14 -# If applicable, add the following below the CDDL Header, with the fields
27.15 -# enclosed by brackets [] replaced by your own identifying information:
27.16 -# "Portions Copyrighted [year] [name of copyright owner]"
27.17 -#
27.18 -# The Original Software is NetBeans. The Initial Developer of the Original
27.19 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
27.20 -# Microsystems, Inc. All Rights Reserved.
27.21 -#
27.22 -
27.23 -javahelp.base=org/netbeans/modules/compapp/capshelp
28.1 --- a/compapp.help/nbproject/project.xml Wed Feb 21 08:53:38 2007 +0000
28.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
28.3 @@ -1,40 +0,0 @@
28.4 -<?xml version="1.0" encoding="UTF-8"?>
28.5 -
28.6 -<!--
28.7 -The contents of this file are subject to the terms of the Common Development
28.8 -and Distribution License (the License). You may not use this file except in
28.9 -compliance with the License.
28.10 -
28.11 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
28.12 -or http://www.netbeans.org/cddl.txt.
28.13 -
28.14 -When distributing Covered Code, include this CDDL Header Notice in each file
28.15 -and include the License file at http://www.netbeans.org/cddl.txt.
28.16 -If applicable, add the following below the CDDL Header, with the fields
28.17 -enclosed by brackets [] replaced by your own identifying information:
28.18 -"Portions Copyrighted [year] [name of copyright owner]"
28.19 -
28.20 - The Original Software is NetBeans. The Initial Developer of the Original
28.21 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
28.22 - Microsystems, Inc. All Rights Reserved.
28.23 --->
28.24 -
28.25 -<project xmlns="http://www.netbeans.org/ns/project/1">
28.26 - <type>org.netbeans.modules.apisupport.project</type>
28.27 - <configuration>
28.28 - <data xmlns="http://www.netbeans.org/ns/nb-module-project/2">
28.29 - <code-name-base>org.netbeans.modules.compapp.capshelp</code-name-base>
28.30 - <suite-component/>
28.31 - <module-dependencies>
28.32 - <dependency>
28.33 - <code-name-base>org.netbeans.modules.javahelp</code-name-base>
28.34 - <run-dependency>
28.35 - <release-version>1</release-version>
28.36 - <specification-version>1.0</specification-version>
28.37 - </run-dependency>
28.38 - </dependency>
28.39 - </module-dependencies>
28.40 - <public-packages/>
28.41 - </data>
28.42 - </configuration>
28.43 -</project>
29.1 --- a/compapp.help/src/org/netbeans/modules/compapp/capshelp/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
29.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
29.3 @@ -1,23 +0,0 @@
29.4 -#
29.5 -# The contents of this file are subject to the terms of the Common Development
29.6 -# and Distribution License (the License). You may not use this file except in
29.7 -# compliance with the License.
29.8 -#
29.9 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
29.10 -# or http://www.netbeans.org/cddl.txt.
29.11 -#
29.12 -# When distributing Covered Code, include this CDDL Header Notice in each file
29.13 -# and include the License file at http://www.netbeans.org/cddl.txt.
29.14 -# If applicable, add the following below the CDDL Header, with the fields
29.15 -# enclosed by brackets [] replaced by your own identifying information:
29.16 -# "Portions Copyrighted [year] [name of copyright owner]"
29.17 -#
29.18 -# The Original Software is NetBeans. The Initial Developer of the Original
29.19 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
29.20 -# Microsystems, Inc. All Rights Reserved.
29.21 -
29.22 -# manifest
29.23 -OpenIDE-Module-Name=Composite Application Help Topics
29.24 -OpenIDE-Module-Display-Category=Service-Oriented Architecture
29.25 -OpenIDE-Module-Short-Description=Composite Application Help Topics.
29.26 -OpenIDE-Module-Long-Description=Composite Application Help Topics.
30.1 --- a/compapp.help/src/org/netbeans/modules/compapp/capshelp/helpset.xml Wed Feb 21 08:53:38 2007 +0000
30.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
30.3 @@ -1,25 +0,0 @@
30.4 -<?xml version="1.0" encoding="UTF-8"?>
30.5 -
30.6 -<!--
30.7 -The contents of this file are subject to the terms of the Common Development
30.8 -and Distribution License (the License). You may not use this file except in
30.9 -compliance with the License.
30.10 -
30.11 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
30.12 -or http://www.netbeans.org/cddl.txt.
30.13 -
30.14 -When distributing Covered Code, include this CDDL Header Notice in each file
30.15 -and include the License file at http://www.netbeans.org/cddl.txt.
30.16 -If applicable, add the following below the CDDL Header, with the fields
30.17 -enclosed by brackets [] replaced by your own identifying information:
30.18 -"Portions Copyrighted [year] [name of copyright owner]"
30.19 -
30.20 - The Original Software is NetBeans. The Initial Developer of the Original
30.21 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
30.22 - Microsystems, Inc. All Rights Reserved.
30.23 --->
30.24 -
30.25 -<!DOCTYPE helpsetref PUBLIC
30.26 - "-//NetBeans//DTD JavaHelp Help Set Reference 1.0//EN"
30.27 - "http://www.netbeans.org/dtds/helpsetref-1_0.dtd">
30.28 - <helpsetref url="nbdocs:/org/netbeans/modules/compapp/capshelp/capshelp.hs"/>
30.29 \ No newline at end of file
31.1 --- a/compapp.help/src/org/netbeans/modules/compapp/capshelp/layer.xml Wed Feb 21 08:53:38 2007 +0000
31.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
31.3 @@ -1,31 +0,0 @@
31.4 -<?xml version="1.0" encoding="UTF-8"?>
31.5 -
31.6 -<!--
31.7 -The contents of this file are subject to the terms of the Common Development
31.8 -and Distribution License (the License). You may not use this file except in
31.9 -compliance with the License.
31.10 -
31.11 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
31.12 -or http://www.netbeans.org/cddl.txt.
31.13 -
31.14 -When distributing Covered Code, include this CDDL Header Notice in each file
31.15 -and include the License file at http://www.netbeans.org/cddl.txt.
31.16 -If applicable, add the following below the CDDL Header, with the fields
31.17 -enclosed by brackets [] replaced by your own identifying information:
31.18 -"Portions Copyrighted [year] [name of copyright owner]"
31.19 -
31.20 - The Original Software is NetBeans. The Initial Developer of the Original
31.21 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
31.22 - Microsystems, Inc. All Rights Reserved.
31.23 --->
31.24 -
31.25 -<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
31.26 -<filesystem>
31.27 - <folder name="Services">
31.28 - <folder name="JavaHelp">
31.29 - <file name="org-netbeans-modules-compapp-capshelp-helpset.xml" url="helpset.xml"/>
31.30 - <attr name="org-netbeans-modules-usersguide-below-regular.txt/org-netbeans-modules-compapp-capshelp-helpset.xml" boolvalue="true"/>
31.31 - </folder>
31.32 - </folder>
31.33 -</filesystem>
31.34 -
32.1 --- a/compapp.manager.jbi/build.xml Wed Feb 21 08:53:38 2007 +0000
32.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
32.3 @@ -1,27 +0,0 @@
32.4 -<?xml version="1.0" encoding="UTF-8"?>
32.5 -
32.6 -<!--
32.7 -The contents of this file are subject to the terms of the Common Development
32.8 -and Distribution License (the License). You may not use this file except in
32.9 -compliance with the License.
32.10 -
32.11 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
32.12 -or http://www.netbeans.org/cddl.txt.
32.13 -
32.14 -When distributing Covered Code, include this CDDL Header Notice in each file
32.15 -and include the License file at http://www.netbeans.org/cddl.txt.
32.16 -If applicable, add the following below the CDDL Header, with the fields
32.17 -enclosed by brackets [] replaced by your own identifying information:
32.18 -"Portions Copyrighted [year] [name of copyright owner]"
32.19 -
32.20 - The Original Software is NetBeans. The Initial Developer of the Original
32.21 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
32.22 - Microsystems, Inc. All Rights Reserved.
32.23 --->
32.24 -
32.25 -<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
32.26 -<!-- for some information on what you could do (e.g. targets to override). -->
32.27 -<!-- If you delete this file and reopen the project it will be recreated. -->
32.28 -<project name="org.netbeans.modules.compapp.manager.jbi" default="netbeans" basedir=".">
32.29 - <import file="nbproject/build-impl.xml"/>
32.30 -</project>
33.1 --- a/compapp.manager.jbi/manifest.mf Wed Feb 21 08:53:38 2007 +0000
33.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
33.3 @@ -1,5 +0,0 @@
33.4 -Manifest-Version: 1.0
33.5 -OpenIDE-Module: org.netbeans.modules.compapp.manager.jbi
33.6 -OpenIDE-Module-Layer: org/netbeans/modules/sun/manager/jbi/layer.xml
33.7 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/sun/manager/jbi/Bundle.properties
33.8 -OpenIDE-Module-Specification-Version: 1.1
34.1 --- a/compapp.manager.jbi/nbproject/project.properties Wed Feb 21 08:53:38 2007 +0000
34.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
34.3 @@ -1,22 +0,0 @@
34.4 -
34.5 -#
34.6 -# The contents of this file are subject to the terms of the Common Development
34.7 -# and Distribution License (the License). You may not use this file except in
34.8 -# compliance with the License.
34.9 -#
34.10 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
34.11 -# or http://www.netbeans.org/cddl.txt.
34.12 -
34.13 -# When distributing Covered Code, include this CDDL Header Notice in each file
34.14 -# and include the License file at http://www.netbeans.org/cddl.txt.
34.15 -# If applicable, add the following below the CDDL Header, with the fields
34.16 -# enclosed by brackets [] replaced by your own identifying information:
34.17 -# "Portions Copyrighted [year] [name of copyright owner]"
34.18 -#
34.19 -# The Original Software is NetBeans. The Initial Developer of the Original
34.20 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
34.21 -# Microsystems, Inc. All Rights Reserved.
34.22 -#
34.23 -
34.24 -cp.extra=../../../nbbuild/netbeans/enterprise4/modules/ext/appsrvbridge.jar
34.25 -javac.source=1.5
35.1 --- a/compapp.manager.jbi/nbproject/project.xml Wed Feb 21 08:53:38 2007 +0000
35.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
35.3 @@ -1,105 +0,0 @@
35.4 -<?xml version="1.0" encoding="UTF-8"?>
35.5 -<!--
35.6 -The contents of this file are subject to the terms of the Common Development
35.7 -and Distribution License (the License). You may not use this file except in
35.8 -compliance with the License.
35.9 -
35.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
35.11 -or http://www.netbeans.org/cddl.txt.
35.12 -
35.13 -When distributing Covered Code, include this CDDL Header Notice in each file
35.14 -and include the License file at http://www.netbeans.org/cddl.txt.
35.15 -If applicable, add the following below the CDDL Header, with the fields
35.16 -enclosed by brackets [] replaced by your own identifying information:
35.17 -"Portions Copyrighted [year] [name of copyright owner]"
35.18 -
35.19 - The Original Software is NetBeans. The Initial Developer of the Original
35.20 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
35.21 - Microsystems, Inc. All Rights Reserved.
35.22 --->
35.23 -<project xmlns="http://www.netbeans.org/ns/project/1">
35.24 - <type>org.netbeans.modules.apisupport.project</type>
35.25 - <configuration>
35.26 - <data xmlns="http://www.netbeans.org/ns/nb-module-project/2">
35.27 - <code-name-base>org.netbeans.modules.compapp.manager.jbi</code-name-base>
35.28 - <suite-component/>
35.29 - <module-dependencies>
35.30 - <dependency>
35.31 - <code-name-base>org.netbeans.api.progress</code-name-base>
35.32 - <build-prerequisite/>
35.33 - <compile-dependency/>
35.34 - <run-dependency>
35.35 - <release-version>1</release-version>
35.36 - <specification-version>1.5.1</specification-version>
35.37 - </run-dependency>
35.38 - </dependency>
35.39 - <dependency>
35.40 - <code-name-base>org.netbeans.modules.j2eeapis</code-name-base>
35.41 - <build-prerequisite/>
35.42 - <compile-dependency/>
35.43 - <run-dependency>
35.44 - <release-version>1</release-version>
35.45 - <specification-version>1.7</specification-version>
35.46 - </run-dependency>
35.47 - </dependency>
35.48 - <dependency>
35.49 - <code-name-base>org.openide.actions</code-name-base>
35.50 - <build-prerequisite/>
35.51 - <compile-dependency/>
35.52 - <run-dependency>
35.53 - <specification-version>6.5.1</specification-version>
35.54 - </run-dependency>
35.55 - </dependency>
35.56 - <dependency>
35.57 - <code-name-base>org.openide.dialogs</code-name-base>
35.58 - <build-prerequisite/>
35.59 - <compile-dependency/>
35.60 - <run-dependency>
35.61 - <specification-version>6.5.1</specification-version>
35.62 - </run-dependency>
35.63 - </dependency>
35.64 - <dependency>
35.65 - <code-name-base>org.openide.explorer</code-name-base>
35.66 - <build-prerequisite/>
35.67 - <compile-dependency/>
35.68 - <run-dependency>
35.69 - <specification-version>6.5.1</specification-version>
35.70 - </run-dependency>
35.71 - </dependency>
35.72 - <dependency>
35.73 - <code-name-base>org.openide.filesystems</code-name-base>
35.74 - <build-prerequisite/>
35.75 - <compile-dependency/>
35.76 - <run-dependency>
35.77 - <specification-version>6.4.21</specification-version>
35.78 - </run-dependency>
35.79 - </dependency>
35.80 - <dependency>
35.81 - <code-name-base>org.openide.io</code-name-base>
35.82 - <build-prerequisite/>
35.83 - <compile-dependency/>
35.84 - <run-dependency>
35.85 - <specification-version>1.9.1</specification-version>
35.86 - </run-dependency>
35.87 - </dependency>
35.88 - <dependency>
35.89 - <code-name-base>org.openide.nodes</code-name-base>
35.90 - <build-prerequisite/>
35.91 - <compile-dependency/>
35.92 - <run-dependency>
35.93 - <specification-version>6.7.1</specification-version>
35.94 - </run-dependency>
35.95 - </dependency>
35.96 - <dependency>
35.97 - <code-name-base>org.openide.util</code-name-base>
35.98 - <build-prerequisite/>
35.99 - <compile-dependency/>
35.100 - <run-dependency>
35.101 - <specification-version>6.8.1</specification-version>
35.102 - </run-dependency>
35.103 - </dependency>
35.104 - </module-dependencies>
35.105 - <public-packages/>
35.106 - </data>
35.107 - </configuration>
35.108 -</project>
36.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
36.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
36.3 @@ -1,23 +0,0 @@
36.4 -#
36.5 -# The contents of this file are subject to the terms of the Common Development
36.6 -# and Distribution License (the License). You may not use this file except in
36.7 -# compliance with the License.
36.8 -#
36.9 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
36.10 -# or http://www.netbeans.org/cddl.txt.
36.11 -#
36.12 -# When distributing Covered Code, include this CDDL Header Notice in each file
36.13 -# and include the License file at http://www.netbeans.org/cddl.txt.
36.14 -# If applicable, add the following below the CDDL Header, with the fields
36.15 -# enclosed by brackets [] replaced by your own identifying information:
36.16 -# "Portions Copyrighted [year] [name of copyright owner]"
36.17 -#
36.18 -# The Original Software is NetBeans. The Initial Developer of the Original
36.19 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
36.20 -# Microsystems, Inc. All Rights Reserved.
36.21 -
36.22 -# manifest
36.23 -OpenIDE-Module-Name=Composite Application JBI Manager
36.24 -OpenIDE-Module-Display-Category=Service-Oriented Architecture
36.25 -OpenIDE-Module-Short-Description=Composite Application JBI Manager.
36.26 -OpenIDE-Module-Long-Description=Composite Application JBI Manager.
37.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/GenericConstants.java Wed Feb 21 08:53:38 2007 +0000
37.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
37.3 @@ -1,259 +0,0 @@
37.4 -/*
37.5 - * The contents of this file are subject to the terms of the Common Development
37.6 - * and Distribution License (the License). You may not use this file except in
37.7 - * compliance with the License.
37.8 - *
37.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
37.10 - * or http://www.netbeans.org/cddl.txt.
37.11 -
37.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
37.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
37.14 - * If applicable, add the following below the CDDL Header, with the fields
37.15 - * enclosed by brackets [] replaced by your own identifying information:
37.16 - * "Portions Copyrighted [year] [name of copyright owner]"
37.17 - *
37.18 - * The Original Software is NetBeans. The Initial Developer of the Original
37.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
37.20 - * Microsystems, Inc. All Rights Reserved.
37.21 - */
37.22 -
37.23 -package org.netbeans.modules.sun.manager.jbi;
37.24 -
37.25 -/**
37.26 - *
37.27 - * @author Graj
37.28 - */
37.29 -public interface GenericConstants {
37.30 -
37.31 - public static final String PORT = "port"; // NOI18N
37.32 - public static final String HOSTNAME = "hostName"; // NOI18N
37.33 - public static final String DOMAINNAME = "domainName"; // NOI18N
37.34 - public static final String HTTP_ADMINISTRATION_PORT = "httpAdministrationPort"; // NOI18N
37.35 - public static final String IIOP_PORT = "iiopPort"; // NOI18N
37.36 - public static final String JRMP_PORT = "jrmpPort"; // NOI18N
37.37 - public static final String HTTP_ENDPOINT_PORT = "httpEndpointPort"; // NOI18N
37.38 - public static final String USER_NAME = "userName"; // NOI18N
37.39 - public static final String PASSWORD = "password"; // NOI18N
37.40 - public static final String MULTICAST_GROUP_ADDRESS = "multicastGroupAddress"; // NOI18N
37.41 - public static final String MULTICAST_GROUP_PORT = "multicastGroupPort"; // NOI18N
37.42 - public static final String MULTICAST_TIME_TO_LIVE = "multicastTimeToLive"; // NOI18N
37.43 - public static final String MULTICAST_MESSAGE_SEND_INTERVAL = "multicastMessageSendInterval"; // NOI18N
37.44 - public static final String UPDATER_REFRESH_RATE = "updaterRefreshRate"; // seconds // NOI18N
37.45 -
37.46 - public static final String DEFAULT_HOST_NAME = "127.0.0.1"; // NOI18N
37.47 - public static final String DEFAULT_DOMAIN_NAME = "domain1"; // NOI18N
37.48 - public static final String DEFAULT_ADMIN_PORT = "4848"; // NOI18N
37.49 - public static final String DEFAULT_HTTP_USER_PORT = "8080"; // NOI18N
37.50 - public static final String DEFAULT_IIOP_ADMIN_PORT = "3700"; // NOI18N
37.51 - public static final String DEFAULT_JRMP_ADMIN_PORT = "8686"; // NOI18N
37.52 - public static final String DEFAULT_USER_NAME = "admin"; // NOI18N
37.53 - public static final String DEFAULT_CREDENTIALS = "adminadmin"; // NOI18N
37.54 - public static final String DEFAULT_MULTICAST_GROUP_ADDRESS = "225.1.2.3"; // NOI18N
37.55 - public static final String DEFAULT_MULTICAST_GROUP_PORT = "5000"; // NOI18N
37.56 - public static final String DEFAULT_MULTICAST_TIME_TO_LIVE = "10"; // NOI18N
37.57 - public static final String DEFAULT_MULTICAST_MESSAGE_SEND_INTERVAL = "60"; // seconds // NOI18N
37.58 - public static final String DEFAULT_UPDATER_REFRESH_RATE = "8"; // seconds // NOI18N
37.59 -
37.60 - // None
37.61 - public static final int INVALID_DIRECTION_KEY = 10;
37.62 - // backward
37.63 - public static final int PROVIDER_TO_CONSUMER_DIRECTION_KEY = -1;
37.64 - // forward and backward round-trip
37.65 - public static final int CONSUMER_TO_PROVIDER_AND_BACK_DIRECTION_KEY = 0;
37.66 - // forward
37.67 - public static final int CONSUMER_TO_PROVIDER_DIRECTION_KEY = 1;
37.68 -
37.69 - public static final String CONSUMER_SUFFIX = "Consumer"; // NOI18N
37.70 -
37.71 -
37.72 - public static final String PORTMAPS_KEY = "portmaps"; // NOI18N
37.73 - public static final String PORTMAP_KEY = "portmap"; // NOI18N
37.74 - public static final String DIRECTION_KEY = "direction"; // NOI18N
37.75 - public static final String INBOUND_KEY = "inbound"; // NOI18N
37.76 - public static final String OUTBOUND_KEY = "outbound"; // NOI18N
37.77 - public static final String ENDPOINT_KEY = "endPoint"; // NOI18N
37.78 - public static final String SERVICE_KEY = "service"; // NOI18N
37.79 -
37.80 - public static final String COLON_DELIMITER = "\\:"; // NOI18N
37.81 - public static final String DOLLAR_DELIMITER = "\\$"; // NOI18N
37.82 - public static final String VERTICAL_LINE_DELIMITER = "\\|"; // NOI18N
37.83 - public static final String TILDE_DELIMITER = "\\~"; // NOI18N
37.84 -
37.85 - public static final String ENDPOINT_SELECTION_SESSION_KEY = "EndpointsSelected"; // NOI18N
37.86 - public static final String ENDPOINT_MANAGER_SESSION_KEY = "EndpointManager"; // NOI18N
37.87 - public static final String CONNECTION_METADATA_HELPER_SESSION_KEY = "ConnectionMetadataHelper"; // NOI18N
37.88 -
37.89 -// public static final String ASPECT_PACKAGER_METADATA_SESSION_KEY = "AspectPackagerMetadata";
37.90 -// public static final String ASPECT_CONFIGURATION_PROPERTIES_SESSION_KEY = "AspectConfigurationProperties";
37.91 -
37.92 - public static final String GOVERNANCE_CONFIGURATION_SESSION_KEY = "GovernanceConfiguration"; // NOI18N
37.93 - public static final String GOVERNANCE_CURRENT_SERVICE_ASSEMBLY_SESSION_KEY = "GovernanceCurrentServiceAssembly"; // NOI18N
37.94 - public static final String GOVERNANCE_CURRENT_SERVICE_UNIT_LIST_SESSION_KEY = "GovernanceCurrentServiceUnitList"; // NOI18N
37.95 -
37.96 -
37.97 -
37.98 - public static final String CONNECTION_PROPERTIES_KEY = "connection.properties"; // NOI18N
37.99 - public static final String SERVER_INFORMATION_KEY = "SERVER_INFORMATION"; // NOI18N
37.100 -
37.101 - public static final String SERVICE_UNIT_NAME_PARAMETER_KEY = "serviceUnitName"; // NOI18N
37.102 -
37.103 - public static final String NAME_PARAMETER_KEY = "name"; // NOI18N
37.104 - public static final String OPERATION_PARAMETER_KEY = "operation"; // NOI18N
37.105 - public static final String INPUT_PARAMETER_KEY = "input"; // NOI18N
37.106 - public static final String TYPE_PARAMETER_KEY = "type"; // NOI18N
37.107 - public static final String COMPONENT_NAME_KEY = "componentName"; // NOI18N
37.108 - public static final String SHOW_PARAMETER_KEY = "show"; // NOI18N
37.109 - public static final String KEY_PARAMETER_KEY = "key"; // NOI18N
37.110 - public static final String CLEAN_PARAMETER_KEY = "clean"; // NOI18N
37.111 - public static final String FILE_NAME_PARAMETER_KEY = "fileName"; // NOI18N
37.112 - public static final String ACTION_NAME_PARAMETER_KEY = "actionName"; // NOI18N
37.113 - public static final String REMOVE_PARAMETER_KEY = "remove"; // NOI18N
37.114 - public static final String CONFIGURE_PARAMETER_KEY = "configure"; // NOI18N
37.115 -
37.116 - public static final String TYPE_PARAMETER_KEY_VALUE = "ServiceEngine"; // NOI18N
37.117 - public static final String SHOW_CONFIG_PROPERTIES_PARAMETER_KEY_VALUE = "ConfigProperties"; // NOI18N
37.118 - public static final String SHOW_PORTMAP_URL_PARAMETER_KEY_VALUE = "PortMapURL"; // NOI18N
37.119 -
37.120 - public static final String PROVISIONING_ID = "Provider"; // NOI18N
37.121 - public static final String CONSUMING_ID = "Consumer"; // NOI18N
37.122 -
37.123 - public static final String PROVISIONING_SERVICE_NAME = "com.sun.ProvisioningService"; // NOI18N
37.124 - public static final String PROVISIONING_SERVICE_UNIT_SUFFIX = "-ProvisioningServiceUnit"; // NOI18N
37.125 -
37.126 - /** Deployment Type */
37.127 - public static final String DEPLOYMENT_TYPE = "service-assembly"; // NOI18N
37.128 - /** unknown type */
37.129 - public static final String UNKNOWN_TYPE = "unknown"; // NOI18N
37.130 - /** Binding type */
37.131 - public static final String BINDING_TYPE = "binding-component"; // NOI18N
37.132 - /** Engine Type */
37.133 - public static final String ENGINE_TYPE = "service-engine"; // NOI18N
37.134 - /** Namespace Type */
37.135 - public static final String NAMESPACE_TYPE = "shared-library"; // NOI18N
37.136 -
37.137 - /** state Loaded status. */
37.138 - public static final String UNKNOWN_STATE = "Unknown"; // NOI18N
37.139 - /** Installed status */
37.140 - public static final String SHUTDOWN_STATE = "Shutdown"; // NOI18N
37.141 - /** Stopped status */
37.142 - public static final String STOPPED_STATE = "Stopped"; // NOI18N
37.143 - /** Started status */
37.144 - public static final String STARTED_STATE = "Started"; // NOI18N
37.145 -
37.146 -
37.147 -
37.148 -
37.149 - public static final String SOAP_ENCODING_SCHEMA_URL = "http://schemas.xmlsoap.org/soap/encoding/"; // NOI18N
37.150 - public static final String WSDL_SOAP_SCHEMA_URL = "http://schemas.xmlsoap.org/wsdl/soap/"; // NOI18N
37.151 - public static final String WSDL_MODEL_SESSION_ATTRIBUTE_KEY = "WSDL_MODEL_SESSION_ATTRIBUTE"; // NOI18N
37.152 - public static final String WSDL_MODEL_DOCUMENT_SESSION_ATTRIBUTE_KEY = "WSDL_MODEL_DOCUMENT_SESSION_ATTRIBUTE"; // NOI18N
37.153 - public static final String RESULT_SESSION_ATTRIBUTE_KEY = "RESULT"; // NOI18N
37.154 - public static final String SOAP_TRANSPORT_KEY = "http://schemas.xmlsoap.org/soap/http"; // NOI18N
37.155 - public static final String HTTP_URL_PREFIX_KEY = "http://"; // NOI18N
37.156 - public static final String FILE_URL_REFIX_KEY = "file:///"; // NOI18N
37.157 - public static final String WSDL_VERBOSE_KEY = "javax.wsdl.verbose"; // NOI18N
37.158 - public static final String WSDL_IMPORT_DOCUMENTS_KEY = "javax.wsdl.importDocuments"; // NOI18N
37.159 - public static final String WSDL_SCHEMA_URL = "http://schemas.xmlsoap.org/wsdl/"; // NOI18N
37.160 -
37.161 -
37.162 - public static final String LIST_BINDING_COMPONENTS_OPERATION_NAME = "listBindingComponents"; // NOI18N
37.163 - public static final String LIST_SERVICE_ENGINES_OPERATION_NAME = "listServiceEngines"; // NOI18N
37.164 - public static final String LIST_SHARED_LIBRARIES_OPERATION_NAME = "listSharedLibraries"; // NOI18N
37.165 - public static final String LIST_SERVICE_ASSEMBLIES_OPERATION_NAME = "listServiceAssemblies"; // NOI18N
37.166 - public static final String LIST_SHARED_LIBRARY_DEPENDENTS_OPERATION_NAME = "listSharedLibraryDependents"; // NOI18N
37.167 -
37.168 - public static final String DEPLOY_SERVICE_ASSEMBLY_OPERATION_NAME = "deployServiceAssembly"; // NOI18N
37.169 - public static final String INSTALL_COMPONENT_OPERATION_NAME = "installComponent"; // NOI18N
37.170 - public static final String INSTALL_SHARED_LIBRARY_OPERATION_NAME = "installSharedLibrary"; // NOI18N
37.171 - public static final String SHUTDOWN_COMPONENT_OPERATION_NAME = "shutdownComponent"; // NOI18N
37.172 - public static final String START_COMPONENT_OPERATION_NAME = "startComponent"; // NOI18N
37.173 - public static final String STOP_COMPONENT_OPERATION_NAME = "stopComponent"; // NOI18N
37.174 -
37.175 - public static final String START_SERVICE_ASSEMBLY_OPERATION_NAME = "startServiceAssembly"; // NOI18N
37.176 - public static final String STOP_SERVICE_ASSEMBLY_OPERATION_NAME = "stopServiceAssembly"; // NOI18N
37.177 - public static final String SHUTDOWN_SERVICE_ASSEMBLY_OPERATION_NAME = "shutdownServiceAssembly"; // NOI18N
37.178 -
37.179 - public static final String UNDEPLOY_SERVICE_ASSEMBLY_OPERATION_NAME = "undeployServiceAssembly"; // NOI18N
37.180 - public static final String UNINSTALL_COMPONENT_OPERATION_NAME = "uninstallComponent"; // NOI18N
37.181 - public static final String UNINSTALL_SHARED_LIBRARY_OPERATION_NAME = "uninstallSharedLibrary"; // NOI18N
37.182 -
37.183 - public static final String DEPLOY_FOLDER_NAME = "deploy"; // NOI18N
37.184 - public static final String BINDING_COMPONENTS_FOLDER_NAME = "bindingComponents"; // NOI18N
37.185 - public static final String SERVICE_ENGINES_FOLDER_NAME = "serviceEngines"; // NOI18N
37.186 - public static final String SHARED_LIBRARIES_FOLDER_NAME = "sharedLibraries"; // NOI18N
37.187 - public static final String SERVICE_ASSEMBLIES_FOLDER_NAME = "serviceAssemblies"; // NOI18N
37.188 -
37.189 - public static final String SUN_JBI_DOMAIN_NAME = "com.sun.jbi"; // NOI18N
37.190 - public static final String STC_EBI_DOMAIN_NAME = "com.sun.ebi"; // NOI18N
37.191 -
37.192 - public static final String EM_DOMAIN_NOTIFICATION_HANDLER = "com.sun.eManager:name=DomainNotificationHandler,ServiceType=eManagerAdministration"; // NOI18N
37.193 -
37.194 - // MBean Open Type class names
37.195 - public static final String OPEN_TYPE_CLASS_VOID = "java.lang.Void"; // NOI18N
37.196 - public static final String OPEN_TYPE_CLASS_BOOLEAN = "java.lang.Boolean"; // NOI18N
37.197 - public static final String OPEN_TYPE_CLASS_CHARACTER = "java.lang.Character"; // NOI18N
37.198 - public static final String OPEN_TYPE_CLASS_BYTE = "java.lang.Byte"; // NOI18N
37.199 - public static final String OPEN_TYPE_CLASS_SHORT = "java.lang.Short"; // NOI18N
37.200 - public static final String OPEN_TYPE_CLASS_INTEGER = "java.lang.Integer"; // NOI18N
37.201 - public static final String OPEN_TYPE_CLASS_LONG = "java.lang.Long"; // NOI18N
37.202 - public static final String OPEN_TYPE_CLASS_FLOAT = "java.lang.Float"; // NOI18N
37.203 - public static final String OPEN_TYPE_CLASS_DOUBLE = "java.lang.Double"; // NOI18N
37.204 - public static final String OPEN_TYPE_CLASS_STRING = "java.lang.String"; // NOI18N
37.205 - public static final String OPEN_TYPE_CLASS_BIGDECIMAL = "java.math.BigDecimal"; // NOI18N
37.206 - public static final String OPEN_TYPE_CLASS_BIGINTEGER = "java.math.BigInteger"; // NOI18N
37.207 - public static final String OPEN_TYPE_CLASS_DATE = "java.util.Date"; // NOI18N
37.208 - public static final String OPEN_TYPE_CLASS_OBJECTNAME = "javax.management.ObjectName"; // NOI18N
37.209 -
37.210 - // MBean Server Object Name
37.211 - public static final String MBEAN_SERVER_OBJECT_NAME = "JMImplementation:type=MBeanServerDelegate"; // NOI18N
37.212 -
37.213 - /////////////////////////////////////
37.214 - // Local JVM Management Object Names
37.215 - /////////////////////////////////////
37.216 - // Local JVM Management java.lang.management.ManagementFactory MXBeans Object Names
37.217 - public static final String CLASS_LOADING_MXBEAN_NAME = "java.lang:type=ClassLoading"; // NOI18N
37.218 - public static final String COMPILATION_MXBEAN_NAME = "java.lang:type=Compilation"; // NOI18N
37.219 - public static final String GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE = "java.lang:type=GarbageCollector"; // NOI18N
37.220 - public static final String MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE = "java.lang:type=MemoryManager"; // NOI18N
37.221 - public static final String MEMORY_MXBEAN_NAME = "java.lang:type=Memory"; // NOI18N
37.222 - public static final String MEMORY_POOL_MXBEAN_DOMAIN_TYPE = "java.lang:type=MemoryPool"; // NOI18N
37.223 - public static final String OPERATING_SYSTEM_MXBEAN_NAME = "java.lang:type=OperatingSystem"; // NOI18N
37.224 - public static final String RUNTIME_MXBEAN_NAME = "java.lang:type=Runtime"; // NOI18N
37.225 - public static final String THREAD_MXBEAN_NAME = "java.lang:type=Threading"; // NOI18N
37.226 -
37.227 - // Local JVM Management java.lang.management.MemoryNotificationInfo MXBeans Object Names
37.228 - public static final String MEMORY_COLLECTION_THRESHOLD_EXCEEDED = "java.management.memory.collection.threshold.exceeded"; // NOI18N
37.229 - public static final String MEMORY_THRESHOLD_EXCEEDED = "java.management.memory.threshold.exceeded"; // NOI18N
37.230 -
37.231 - /////////////////////////////////////
37.232 - // JBI Framework MBeans Object Names
37.233 - /////////////////////////////////////
37.234 - // Services
37.235 - public static final String JBI_ADMINISTRATION_SERVICE_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=AdministrationService,ServiceName=AdminService"; // NOI18N
37.236 - public static final String JBI_CONFIGURATION_SERVICE_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=ConfigurationService,ServiceName=ConfigurationService"; // NOI18N
37.237 - public static final String JBI_DEPLOYMENT_SERVICE_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=DeploymentService,ServiceName=DeploymentService"; // NOI18N
37.238 - public static final String JBI_INSTALLATION_SERVICE_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=InstallationService,ServiceName=InstallationService"; // NOI18N
37.239 - public static final String JBI_MESSAGE_SERVICE_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=MessageService,ServiceName=MessageService"; // NOI18N
37.240 - public static final String JBI_LOGGING_SERVICE_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=LoggingService,ServiceName=LoggingService"; // NOI18N
37.241 -
37.242 - public static final String JBI_FRAMEWORK_STATISTICS_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=Statistics,ServiceName=Framework"; // NOI18N
37.243 -
37.244 - // Heartbeat
37.245 - public static final String JBI_HEART_BEAT_ADMIN_SERVICE_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=HeartBeat,ServiceName=AdminService"; // NOI18N
37.246 -
37.247 - // Configuration
37.248 - public static final String JBI_ADMINISTRATION_SERVICE_CONFIGURATION_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=Configuration,ServiceName=AdminService"; // NOI18N
37.249 - public static final String JBI_CONFIGURATION_SERVICE_SYSTEM_CONFIG_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=Configuration,ServiceName=ConfigurationService"; // NOI18N
37.250 - public static final String JBI_DEPLOYMENT_SERVICE_SYSTEM_CONFIG_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=Configuration,ServiceName=DeploymentService"; // NOI18N
37.251 - public static final String JBI_INSTALLATION_SERVICE_SYSTEM_CONFIG_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=Configuration,ServiceName=InstallationService"; // NOI18N
37.252 - public static final String JBI_LOGGING_SERVICE_SYSTEM_CONFIG_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=Configuration,ServiceName=LoggingService"; // NOI18N
37.253 - public static final String JBI_MESSAGE_SERVICE_SYSTEM_CONFIG_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=Configuration,ServiceName=MessageService"; // NOI18N
37.254 -
37.255 - // Lifecycle
37.256 - public static final String JBI_ADMINISTRATION_SERVICE_LIFECYCLE_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=Lifecycle,ServiceName=AdminService"; // NOI18N
37.257 - public static final String JBI_CONFIGURATION_SERVICE_LIFECYCLE_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=Lifecycle,ServiceName=ConfigurationService"; // NOI18N
37.258 - public static final String JBI_DEPLOYMENT_SERVICE_LIFECYCLE_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=Lifecycle,ServiceName=DeploymentService"; // NOI18N
37.259 - public static final String JBI_INSTALLATION_SERVICE_LIFECYCLE_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=Lifecycle,ServiceName=InstallationService"; // NOI18N
37.260 - public static final String JBI_LOGGING_SERVICE_LIFECYCLE_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=Lifecycle,ServiceName=LoggingService"; // NOI18N
37.261 - public static final String JBI_MESSAGE_SERVICE_LIFECYCLE_OBJECT_NAME = "com.sun.jbi:ComponentType=System,ControlType=Lifecycle,ServiceName=MessageService"; // NOI18N
37.262 -}
38.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/actions/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
38.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
38.3 @@ -1,27 +0,0 @@
38.4 -#
38.5 -# The contents of this file are subject to the terms of the Common Development
38.6 -# and Distribution License (the License). You may not use this file except in
38.7 -# compliance with the License.
38.8 -#
38.9 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
38.10 -# or http://www.netbeans.org/cddl.txt.
38.11 -
38.12 -# When distributing Covered Code, include this CDDL Header Notice in each file
38.13 -# and include the License file at http://www.netbeans.org/cddl.txt.
38.14 -# If applicable, add the following below the CDDL Header, with the fields
38.15 -# enclosed by brackets [] replaced by your own identifying information:
38.16 -# "Portions Copyrighted [year] [name of copyright owner]"
38.17 -#
38.18 -# The Original Software is NetBeans. The Initial Developer of the Original
38.19 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
38.20 -# Microsystems, Inc. All Rights Reserved.
38.21 -#
38.22 -LBL_StartAction=Start
38.23 -LBL_StopAction=Stop
38.24 -LBL_ShutdownAction=Shutdown
38.25 -LBL_UninstallAction=Uninstall
38.26 -LBL_UndeployAction=Undeploy
38.27 -LBL_InstallServiceEngineAction=Install New Service Engine
38.28 -LBL_InstallBindingComponentAction=Install New Binding Component
38.29 -LBL_InstallSharedLibraryAction=Install New Shared Library
38.30 -LBL_DeployAction=Deploy New Service Assembly
39.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/actions/DeployAction.java Wed Feb 21 08:53:38 2007 +0000
39.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
39.3 @@ -1,107 +0,0 @@
39.4 -/*
39.5 - * The contents of this file are subject to the terms of the Common Development
39.6 - * and Distribution License (the License). You may not use this file except in
39.7 - * compliance with the License.
39.8 - *
39.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
39.10 - * or http://www.netbeans.org/cddl.txt.
39.11 -
39.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
39.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
39.14 - * If applicable, add the following below the CDDL Header, with the fields
39.15 - * enclosed by brackets [] replaced by your own identifying information:
39.16 - * "Portions Copyrighted [year] [name of copyright owner]"
39.17 - *
39.18 - * The Original Software is NetBeans. The Initial Developer of the Original
39.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
39.20 - * Microsystems, Inc. All Rights Reserved.
39.21 - */
39.22 -
39.23 -package org.netbeans.modules.sun.manager.jbi.actions;
39.24 -
39.25 -import javax.swing.SwingUtilities;
39.26 -
39.27 -import org.netbeans.modules.j2ee.sun.bridge.apis.RefreshCookie;
39.28 -import org.netbeans.modules.sun.manager.jbi.nodes.Deployable;
39.29 -import org.openide.nodes.Node;
39.30 -import org.openide.util.HelpCtx;
39.31 -import org.openide.util.Lookup;
39.32 -import org.openide.util.NbBundle;
39.33 -import org.openide.util.RequestProcessor;
39.34 -import org.openide.util.actions.NodeAction;
39.35 -
39.36 -/**
39.37 - *
39.38 - * @author jqian
39.39 - */
39.40 -public class DeployAction extends NodeAction {
39.41 -
39.42 - /**
39.43 - *
39.44 - *
39.45 - */
39.46 - protected void performAction(Node[] activatedNodes) {
39.47 - final Node node = activatedNodes[0];
39.48 - Lookup lookup = node.getLookup();
39.49 - final Object obj = lookup.lookup(Deployable.class);
39.50 -
39.51 - RequestProcessor.getDefault().post(new Runnable() {
39.52 - public void run() {
39.53 - try {
39.54 - if (obj instanceof Deployable) {
39.55 - Deployable deployable = (Deployable)obj;
39.56 - deployable.deploy();
39.57 -
39.58 - SwingUtilities.invokeLater(new Runnable() {
39.59 - public void run() {
39.60 - RefreshCookie refreshAction =
39.61 - (RefreshCookie) node.getCookie(
39.62 - RefreshCookie.class);
39.63 - if (refreshAction != null){
39.64 - refreshAction.refresh();
39.65 - }
39.66 - }
39.67 - });
39.68 - }
39.69 - } catch(java.lang.RuntimeException rex) {
39.70 - //gobble up exception
39.71 - }
39.72 - }
39.73 - });
39.74 - }
39.75 -
39.76 - /**
39.77 - *
39.78 - *
39.79 - */
39.80 - protected boolean enable(Node[] nodes) {
39.81 - return nodes != null && nodes.length == 1;
39.82 - }
39.83 -
39.84 -
39.85 - /**
39.86 - *
39.87 - *
39.88 - */
39.89 - protected boolean asynchronous() {
39.90 - return false;
39.91 - }
39.92 -
39.93 -
39.94 - /**
39.95 - *
39.96 - *
39.97 - */
39.98 - public HelpCtx getHelpCtx() {
39.99 - return HelpCtx.DEFAULT_HELP;
39.100 - }
39.101 -
39.102 -
39.103 - /**
39.104 - *
39.105 - */
39.106 - public String getName() {
39.107 - return NbBundle.getMessage(DeployAction.class, "LBL_DeployAction"); // NOI18N
39.108 - }
39.109 -
39.110 -}
40.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/actions/InstallAction.java Wed Feb 21 08:53:38 2007 +0000
40.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
40.3 @@ -1,130 +0,0 @@
40.4 -/*
40.5 - * The contents of this file are subject to the terms of the Common Development
40.6 - * and Distribution License (the License). You may not use this file except in
40.7 - * compliance with the License.
40.8 - *
40.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
40.10 - * or http://www.netbeans.org/cddl.txt.
40.11 -
40.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
40.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
40.14 - * If applicable, add the following below the CDDL Header, with the fields
40.15 - * enclosed by brackets [] replaced by your own identifying information:
40.16 - * "Portions Copyrighted [year] [name of copyright owner]"
40.17 - *
40.18 - * The Original Software is NetBeans. The Initial Developer of the Original
40.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
40.20 - * Microsystems, Inc. All Rights Reserved.
40.21 - */
40.22 -
40.23 -package org.netbeans.modules.sun.manager.jbi.actions;
40.24 -
40.25 -import javax.swing.SwingUtilities;
40.26 -
40.27 -import org.netbeans.modules.j2ee.sun.bridge.apis.RefreshCookie;
40.28 -import org.netbeans.modules.sun.manager.jbi.nodes.Installable;
40.29 -import org.openide.nodes.Node;
40.30 -import org.openide.util.HelpCtx;
40.31 -import org.openide.util.Lookup;
40.32 -import org.openide.util.NbBundle;
40.33 -import org.openide.util.RequestProcessor;
40.34 -import org.openide.util.actions.NodeAction;
40.35 -
40.36 -/**
40.37 - *
40.38 - * @author jqian
40.39 - */
40.40 -public abstract class InstallAction extends NodeAction {
40.41 -
40.42 - /**
40.43 - *
40.44 - *
40.45 - */
40.46 - protected void performAction(Node[] activatedNodes) {
40.47 - final Node node = activatedNodes[0];
40.48 - Lookup lookup = node.getLookup();
40.49 - final Object obj = lookup.lookup(Installable.class);
40.50 -
40.51 - RequestProcessor.getDefault().post(new Runnable() {
40.52 - public void run() {
40.53 - try {
40.54 - if (obj instanceof Installable) {
40.55 - Installable installable = (Installable)obj;
40.56 - installable.install();
40.57 -
40.58 - SwingUtilities.invokeLater(new Runnable() {
40.59 - public void run() {
40.60 - RefreshCookie refreshAction =
40.61 - (RefreshCookie) node.getCookie(
40.62 - RefreshCookie.class);
40.63 - if (refreshAction != null){
40.64 - refreshAction.refresh();
40.65 - }
40.66 - }
40.67 - });
40.68 - }
40.69 - } catch(java.lang.RuntimeException rex) {
40.70 - //gobble up exception
40.71 - }
40.72 - }
40.73 - });
40.74 - }
40.75 -
40.76 - /**
40.77 - *
40.78 - *
40.79 - */
40.80 - protected boolean enable(Node[] nodes) {
40.81 - return nodes != null && nodes.length == 1;
40.82 - }
40.83 -
40.84 -
40.85 - /**
40.86 - *
40.87 - *
40.88 - */
40.89 - protected boolean asynchronous() {
40.90 - return false;
40.91 - }
40.92 -
40.93 -
40.94 - /**
40.95 - *
40.96 - *
40.97 - */
40.98 - public HelpCtx getHelpCtx() {
40.99 - return HelpCtx.DEFAULT_HELP;
40.100 - }
40.101 -
40.102 - //==========================================================================
40.103 -
40.104 - /**
40.105 - * Action for installing Service Engine.
40.106 - */
40.107 - public static class ServiceEngine extends InstallAction {
40.108 - public String getName() {
40.109 - return NbBundle.getMessage(InstallAction.class,
40.110 - "LBL_InstallServiceEngineAction"); // NOI18N
40.111 - }
40.112 - }
40.113 -
40.114 - /**
40.115 - * Action for installing Binding Component.
40.116 - */
40.117 - public static class BindingComponent extends InstallAction {
40.118 - public String getName() {
40.119 - return NbBundle.getMessage(InstallAction.class,
40.120 - "LBL_InstallBindingComponentAction"); // NOI18N
40.121 - }
40.122 - }
40.123 -
40.124 - /**
40.125 - * Action for installing Shared Library
40.126 - */
40.127 - public static class SharedLibrary extends InstallAction {
40.128 - public String getName() {
40.129 - return NbBundle.getMessage(InstallAction.class,
40.130 - "LBL_InstallSharedLibraryAction"); // NOI18N
40.131 - }
40.132 - }
40.133 -}
41.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/actions/ShutdownAction.java Wed Feb 21 08:53:38 2007 +0000
41.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
41.3 @@ -1,146 +0,0 @@
41.4 -/*
41.5 - * The contents of this file are subject to the terms of the Common Development
41.6 - * and Distribution License (the License). You may not use this file except in
41.7 - * compliance with the License.
41.8 - *
41.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
41.10 - * or http://www.netbeans.org/cddl.txt.
41.11 -
41.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
41.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
41.14 - * If applicable, add the following below the CDDL Header, with the fields
41.15 - * enclosed by brackets [] replaced by your own identifying information:
41.16 - * "Portions Copyrighted [year] [name of copyright owner]"
41.17 - *
41.18 - * The Original Software is NetBeans. The Initial Developer of the Original
41.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
41.20 - * Microsystems, Inc. All Rights Reserved.
41.21 - */
41.22 -
41.23 -package org.netbeans.modules.sun.manager.jbi.actions;
41.24 -
41.25 -import javax.swing.SwingUtilities;
41.26 -
41.27 -import org.netbeans.modules.j2ee.sun.bridge.apis.RefreshCookie;
41.28 -import org.netbeans.modules.sun.manager.jbi.nodes.Shutdownable;
41.29 -import org.openide.nodes.Node;
41.30 -import org.openide.util.HelpCtx;
41.31 -import org.openide.util.Lookup;
41.32 -import org.openide.util.NbBundle;
41.33 -import org.openide.util.RequestProcessor;
41.34 -import org.openide.util.actions.NodeAction;
41.35 -
41.36 -/**
41.37 - *
41.38 - * @author jqian
41.39 - */
41.40 -public class ShutdownAction extends NodeAction {
41.41 -
41.42 - /**
41.43 - *
41.44 - */
41.45 - protected void performAction(final Node[] activatedNodes) {
41.46 -
41.47 - RequestProcessor.getDefault().post(new Runnable() {
41.48 - public void run() {
41.49 - try {
41.50 - for (int i = 0; i < activatedNodes.length; i++) {
41.51 - Node node = activatedNodes[i];
41.52 - Lookup lookup = node.getLookup();
41.53 - Object obj = lookup.lookup(Shutdownable.class);
41.54 -
41.55 - if (obj instanceof Shutdownable) {
41.56 - Shutdownable shutdownable = (Shutdownable)obj;
41.57 - shutdownable.shutdown();
41.58 -
41.59 -// if (node.getChildren().getNodesCount() > 0) {
41.60 - final RefreshCookie refreshAction =
41.61 - (RefreshCookie) node.getCookie(RefreshCookie.class);
41.62 - if (refreshAction != null){
41.63 - SwingUtilities.invokeLater(new Runnable() {
41.64 - public void run() {
41.65 - refreshAction.refresh();
41.66 - }
41.67 - });
41.68 - }
41.69 -// }
41.70 - }
41.71 - }
41.72 -
41.73 -// if (needRefresh) {
41.74 -// Node parentNode = activatedNodes[0]; //.getParentNode();
41.75 -// if (parentNode != null) {
41.76 -// final RefreshCookie refreshAction =
41.77 -// (RefreshCookie)parentNode.getCookie(RefreshCookie.class);
41.78 -// if (refreshAction != null){
41.79 -// SwingUtilities.invokeLater(new Runnable() {
41.80 -// public void run() {
41.81 -// refreshAction.refresh();
41.82 -// }
41.83 -// });
41.84 -// }
41.85 -// }
41.86 -// }
41.87 - } catch(java.lang.RuntimeException rex) {
41.88 - //gobble up exception
41.89 - }
41.90 - }
41.91 - });
41.92 - }
41.93 -
41.94 -
41.95 - protected boolean enable(Node[] nodes) {
41.96 - boolean ret = false;
41.97 -
41.98 - if (nodes != null && nodes.length > 0) {
41.99 -
41.100 - ret = true;
41.101 -
41.102 - for (int i = 0; i < nodes.length; i++) {
41.103 - Node node = nodes[i];
41.104 - Lookup lookup = node.getLookup();
41.105 - Object obj = lookup.lookup(Shutdownable.class);
41.106 -
41.107 - try {
41.108 - if(obj instanceof Shutdownable) {
41.109 - Shutdownable shutdownable = (Shutdownable)obj;
41.110 - if (!shutdownable.canShutdown()) {
41.111 - ret = false;
41.112 - break;
41.113 - }
41.114 - }
41.115 - } catch(java.lang.RuntimeException rex) {
41.116 - //gobble up exception
41.117 - }
41.118 - }
41.119 - }
41.120 -
41.121 - return ret;
41.122 - }
41.123 -
41.124 - /**
41.125 - *
41.126 - *
41.127 - */
41.128 - protected boolean asynchronous() {
41.129 - return false;
41.130 - }
41.131 -
41.132 -
41.133 - /**
41.134 - *
41.135 - *
41.136 - */
41.137 - public HelpCtx getHelpCtx() {
41.138 - return HelpCtx.DEFAULT_HELP;
41.139 - }
41.140 -
41.141 -
41.142 - /**
41.143 - *
41.144 - */
41.145 - public String getName() {
41.146 - return NbBundle.getMessage(ShutdownAction.class, "LBL_ShutdownAction"); // NOI18N
41.147 - }
41.148 -
41.149 -}
42.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/actions/StartAction.java Wed Feb 21 08:53:38 2007 +0000
42.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
42.3 @@ -1,143 +0,0 @@
42.4 -/*
42.5 - * The contents of this file are subject to the terms of the Common Development
42.6 - * and Distribution License (the License). You may not use this file except in
42.7 - * compliance with the License.
42.8 - *
42.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
42.10 - * or http://www.netbeans.org/cddl.txt.
42.11 -
42.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
42.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
42.14 - * If applicable, add the following below the CDDL Header, with the fields
42.15 - * enclosed by brackets [] replaced by your own identifying information:
42.16 - * "Portions Copyrighted [year] [name of copyright owner]"
42.17 - *
42.18 - * The Original Software is NetBeans. The Initial Developer of the Original
42.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
42.20 - * Microsystems, Inc. All Rights Reserved.
42.21 - */
42.22 -
42.23 -package org.netbeans.modules.sun.manager.jbi.actions;
42.24 -
42.25 -import javax.swing.SwingUtilities;
42.26 -
42.27 -import org.netbeans.modules.j2ee.sun.bridge.apis.RefreshCookie;
42.28 -import org.netbeans.modules.sun.manager.jbi.nodes.Startable;
42.29 -import org.openide.nodes.Node;
42.30 -import org.openide.util.HelpCtx;
42.31 -import org.openide.util.Lookup;
42.32 -import org.openide.util.NbBundle;
42.33 -import org.openide.util.RequestProcessor;
42.34 -import org.openide.util.actions.NodeAction;
42.35 -
42.36 -/**
42.37 - *
42.38 - * @author jqian
42.39 - */
42.40 -public class StartAction extends NodeAction {
42.41 -
42.42 - /**
42.43 - *
42.44 - */
42.45 - protected void performAction(final Node[] activatedNodes) {
42.46 - RequestProcessor.getDefault().post(new Runnable() {
42.47 - public void run() {
42.48 - try {
42.49 - for (int i = 0; i < activatedNodes.length; i++) {
42.50 - Node node = activatedNodes[i];
42.51 - Lookup lookup = node.getLookup();
42.52 - Object obj = lookup.lookup(Startable.class);
42.53 -
42.54 - if (obj instanceof Startable) {
42.55 - Startable startable = (Startable)obj;
42.56 - startable.start();
42.57 -
42.58 -// if (node.getChildren().getNodesCount() > 0) {
42.59 - final RefreshCookie refreshAction =
42.60 - (RefreshCookie) node.getCookie(RefreshCookie.class);
42.61 - if (refreshAction != null){
42.62 - SwingUtilities.invokeLater(new Runnable() {
42.63 - public void run() {
42.64 - refreshAction.refresh();
42.65 - }
42.66 - });
42.67 - }
42.68 -// }
42.69 - }
42.70 - }
42.71 -
42.72 -// if (needRefresh) {
42.73 -// Node parentNode = activatedNodes[0]; //.getParentNode();
42.74 -// if (parentNode != null) {
42.75 -// final RefreshCookie refreshAction =
42.76 -// (RefreshCookie)parentNode.getCookie(RefreshCookie.class);
42.77 -// if (refreshAction != null){
42.78 -// SwingUtilities.invokeLater(new Runnable() {
42.79 -// public void run() {
42.80 -// refreshAction.refresh();
42.81 -// }
42.82 -// });
42.83 -// }
42.84 -// }
42.85 -// }
42.86 - } catch(java.lang.RuntimeException rex) {
42.87 - //gobble up exception
42.88 - }
42.89 - }
42.90 - });
42.91 - }
42.92 -
42.93 - protected boolean enable(Node[] nodes) {
42.94 - boolean ret = false;
42.95 -
42.96 - if (nodes != null && nodes.length > 0) {
42.97 -
42.98 - ret = true;
42.99 -
42.100 - for (int i = 0; i < nodes.length; i++) {
42.101 - Node node = nodes[i];
42.102 - Lookup lookup = node.getLookup();
42.103 - Object obj = lookup.lookup(Startable.class);
42.104 -
42.105 - try {
42.106 - if(obj instanceof Startable) {
42.107 - Startable startable = (Startable)obj;
42.108 - if (!startable.canStart()) {
42.109 - ret = false;
42.110 - break;
42.111 - }
42.112 - }
42.113 - } catch(java.lang.RuntimeException rex) {
42.114 - //gobble up exception
42.115 - }
42.116 - }
42.117 - }
42.118 -
42.119 - return ret;
42.120 - }
42.121 -
42.122 - /**
42.123 - *
42.124 - *
42.125 - */
42.126 - protected boolean asynchronous() {
42.127 - return false;
42.128 - }
42.129 -
42.130 -
42.131 - /**
42.132 - *
42.133 - *
42.134 - */
42.135 - public HelpCtx getHelpCtx() {
42.136 - return HelpCtx.DEFAULT_HELP;
42.137 - }
42.138 -
42.139 - /**
42.140 - *
42.141 - */
42.142 - public String getName() {
42.143 - return NbBundle.getMessage(StartAction.class, "LBL_StartAction"); // NOI18N
42.144 - }
42.145 -
42.146 -}
43.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/actions/StopAction.java Wed Feb 21 08:53:38 2007 +0000
43.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
43.3 @@ -1,144 +0,0 @@
43.4 -/*
43.5 - * The contents of this file are subject to the terms of the Common Development
43.6 - * and Distribution License (the License). You may not use this file except in
43.7 - * compliance with the License.
43.8 - *
43.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
43.10 - * or http://www.netbeans.org/cddl.txt.
43.11 -
43.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
43.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
43.14 - * If applicable, add the following below the CDDL Header, with the fields
43.15 - * enclosed by brackets [] replaced by your own identifying information:
43.16 - * "Portions Copyrighted [year] [name of copyright owner]"
43.17 - *
43.18 - * The Original Software is NetBeans. The Initial Developer of the Original
43.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
43.20 - * Microsystems, Inc. All Rights Reserved.
43.21 - */
43.22 -
43.23 -package org.netbeans.modules.sun.manager.jbi.actions;
43.24 -
43.25 -import javax.swing.SwingUtilities;
43.26 -
43.27 -import org.netbeans.modules.j2ee.sun.bridge.apis.RefreshCookie;
43.28 -import org.netbeans.modules.sun.manager.jbi.nodes.Stoppable;
43.29 -import org.openide.nodes.Node;
43.30 -import org.openide.util.HelpCtx;
43.31 -import org.openide.util.Lookup;
43.32 -import org.openide.util.NbBundle;
43.33 -import org.openide.util.RequestProcessor;
43.34 -import org.openide.util.actions.NodeAction;
43.35 -
43.36 -/**
43.37 - *
43.38 - * @author jqian
43.39 - */
43.40 -public class StopAction extends NodeAction {
43.41 -
43.42 - /**
43.43 - *
43.44 - */
43.45 - protected void performAction(final Node[] activatedNodes) {
43.46 -
43.47 - RequestProcessor.getDefault().post(new Runnable() {
43.48 - public void run() {
43.49 - try {
43.50 - for (int i = 0; i < activatedNodes.length; i++) {
43.51 - Node node = activatedNodes[i];
43.52 - Lookup lookup = node.getLookup();
43.53 - Object obj = lookup.lookup(Stoppable.class);
43.54 -
43.55 - if (obj instanceof Stoppable) {
43.56 - Stoppable stoppable = (Stoppable)obj;
43.57 - stoppable.stop();
43.58 -
43.59 -// if (node.getChildren().getNodesCount() > 0) {
43.60 - final RefreshCookie refreshAction =
43.61 - (RefreshCookie) node.getCookie(RefreshCookie.class);
43.62 - if (refreshAction != null){
43.63 - SwingUtilities.invokeLater(new Runnable() {
43.64 - public void run() {
43.65 - refreshAction.refresh();
43.66 - }
43.67 - });
43.68 - }
43.69 -// }
43.70 - }
43.71 - }
43.72 -
43.73 -// if (needRefresh) {
43.74 -// Node parentNode = activatedNodes[0]; //.getParentNode();
43.75 -// if (parentNode != null) {
43.76 -// final RefreshCookie refreshAction =
43.77 -// (RefreshCookie)parentNode.getCookie(RefreshCookie.class);
43.78 -// if (refreshAction != null){
43.79 -// SwingUtilities.invokeLater(new Runnable() {
43.80 -// public void run() {
43.81 -// refreshAction.refresh();
43.82 -// }
43.83 -// });
43.84 -// }
43.85 -// }
43.86 -// }
43.87 - } catch(java.lang.RuntimeException rex) {
43.88 - //gobble up exception
43.89 - }
43.90 - }
43.91 - });
43.92 - }
43.93 -
43.94 - protected boolean enable(Node[] nodes) {
43.95 - boolean ret = false;
43.96 -
43.97 - if (nodes != null && nodes.length > 0) {
43.98 -
43.99 - ret = true;
43.100 -
43.101 - for (int i = 0; i < nodes.length; i++) {
43.102 - Node node = nodes[i];
43.103 - Lookup lookup = node.getLookup();
43.104 - Object obj = lookup.lookup(Stoppable.class);
43.105 -
43.106 - try {
43.107 - if(obj instanceof Stoppable) {
43.108 - Stoppable stopable = (Stoppable)obj;
43.109 - if (!stopable.canStop()) {
43.110 - ret = false;
43.111 - break;
43.112 - }
43.113 - }
43.114 - } catch(java.lang.RuntimeException rex) {
43.115 - //gobble up exception
43.116 - }
43.117 - }
43.118 - }
43.119 -
43.120 - return ret;
43.121 - }
43.122 -
43.123 - /**
43.124 - *
43.125 - *
43.126 - */
43.127 - protected boolean asynchronous() {
43.128 - return false;
43.129 - }
43.130 -
43.131 -
43.132 - /**
43.133 - *
43.134 - *
43.135 - */
43.136 - public HelpCtx getHelpCtx() {
43.137 - return HelpCtx.DEFAULT_HELP;
43.138 - }
43.139 -
43.140 - /**
43.141 - *
43.142 - */
43.143 - public String getName() {
43.144 - return NbBundle.getMessage(StopAction.class, "LBL_StopAction"); // NOI18N
43.145 - }
43.146 -
43.147 -}
44.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/actions/UndeployAction.java Wed Feb 21 08:53:38 2007 +0000
44.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
44.3 @@ -1,142 +0,0 @@
44.4 -/*
44.5 - * The contents of this file are subject to the terms of the Common Development
44.6 - * and Distribution License (the License). You may not use this file except in
44.7 - * compliance with the License.
44.8 - *
44.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
44.10 - * or http://www.netbeans.org/cddl.txt.
44.11 -
44.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
44.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
44.14 - * If applicable, add the following below the CDDL Header, with the fields
44.15 - * enclosed by brackets [] replaced by your own identifying information:
44.16 - * "Portions Copyrighted [year] [name of copyright owner]"
44.17 - *
44.18 - * The Original Software is NetBeans. The Initial Developer of the Original
44.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
44.20 - * Microsystems, Inc. All Rights Reserved.
44.21 - */
44.22 -
44.23 -package org.netbeans.modules.sun.manager.jbi.actions;
44.24 -
44.25 -import javax.swing.SwingUtilities;
44.26 -
44.27 -import org.netbeans.modules.j2ee.sun.bridge.apis.RefreshCookie;
44.28 -import org.netbeans.modules.sun.manager.jbi.nodes.Undeployable;
44.29 -import org.openide.nodes.Node;
44.30 -import org.openide.util.HelpCtx;
44.31 -import org.openide.util.Lookup;
44.32 -import org.openide.util.NbBundle;
44.33 -import org.openide.util.RequestProcessor;
44.34 -import org.openide.util.actions.NodeAction;
44.35 -
44.36 -/**
44.37 - *
44.38 - * @author jqian
44.39 - */
44.40 -public class UndeployAction extends NodeAction {
44.41 -
44.42 - /**
44.43 - *
44.44 - *
44.45 - */
44.46 - protected void performAction(final Node[] activatedNodes) {
44.47 - RequestProcessor.getDefault().post(new Runnable() {
44.48 - public void run() {
44.49 - try {
44.50 - Node parentNode = null; // the node that needs refreshing
44.51 - for (int i = 0; i < activatedNodes.length; i++) {
44.52 - Node node = activatedNodes[i];
44.53 - Lookup lookup = node.getLookup();
44.54 - Object obj = lookup.lookup(Undeployable.class);
44.55 -
44.56 - if (obj instanceof Undeployable) {
44.57 - Undeployable undeployable = (Undeployable)obj;
44.58 - undeployable.undeploy();
44.59 - // There will be at most one parent node that
44.60 - // needs refreshing
44.61 - if (parentNode == null) {
44.62 - parentNode = node.getParentNode();
44.63 - }
44.64 - }
44.65 - }
44.66 -
44.67 - if (parentNode != null) {
44.68 - final RefreshCookie refreshAction =
44.69 - (RefreshCookie) parentNode.getCookie(RefreshCookie.class);
44.70 - if (refreshAction != null){
44.71 - SwingUtilities.invokeLater(new Runnable() {
44.72 - public void run() {
44.73 - refreshAction.refresh();
44.74 - }
44.75 - });
44.76 - }
44.77 - }
44.78 - } catch(java.lang.RuntimeException rex) {
44.79 - //gobble up exception
44.80 - }
44.81 - }
44.82 - });
44.83 - }
44.84 -
44.85 -
44.86 - /**
44.87 - *
44.88 - *
44.89 - */
44.90 - protected boolean enable(Node[] nodes) {
44.91 - boolean ret = false;
44.92 -
44.93 - if (nodes != null && nodes.length > 0) {
44.94 -
44.95 - ret = true;
44.96 -
44.97 - for (int i = 0; i < nodes.length; i++) {
44.98 - Node node = nodes[i];
44.99 - Lookup lookup = node.getLookup();
44.100 - Object obj = lookup.lookup(Undeployable.class);
44.101 -
44.102 - try {
44.103 - if(obj instanceof Undeployable) {
44.104 - Undeployable undeployable = (Undeployable)obj;
44.105 - if (!undeployable.canUndeploy()) {
44.106 - ret = false;
44.107 - break;
44.108 - }
44.109 - }
44.110 - } catch(java.lang.RuntimeException rex) {
44.111 - //gobble up exception
44.112 - }
44.113 - }
44.114 - }
44.115 -
44.116 - return ret;
44.117 - }
44.118 -
44.119 -
44.120 - /**
44.121 - *
44.122 - *
44.123 - */
44.124 - protected boolean asynchronous() {
44.125 - return false;
44.126 - }
44.127 -
44.128 -
44.129 - /**
44.130 - *
44.131 - *
44.132 - */
44.133 - public HelpCtx getHelpCtx() {
44.134 - return HelpCtx.DEFAULT_HELP;
44.135 - }
44.136 -
44.137 -
44.138 - /**
44.139 - *
44.140 - */
44.141 - public String getName() {
44.142 - return NbBundle.getMessage(UndeployAction.class, "LBL_UndeployAction"); // NOI18N
44.143 - }
44.144 -
44.145 -}
45.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/actions/UninstallAction.java Wed Feb 21 08:53:38 2007 +0000
45.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
45.3 @@ -1,142 +0,0 @@
45.4 -/*
45.5 - * The contents of this file are subject to the terms of the Common Development
45.6 - * and Distribution License (the License). You may not use this file except in
45.7 - * compliance with the License.
45.8 - *
45.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
45.10 - * or http://www.netbeans.org/cddl.txt.
45.11 -
45.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
45.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
45.14 - * If applicable, add the following below the CDDL Header, with the fields
45.15 - * enclosed by brackets [] replaced by your own identifying information:
45.16 - * "Portions Copyrighted [year] [name of copyright owner]"
45.17 - *
45.18 - * The Original Software is NetBeans. The Initial Developer of the Original
45.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
45.20 - * Microsystems, Inc. All Rights Reserved.
45.21 - */
45.22 -
45.23 -package org.netbeans.modules.sun.manager.jbi.actions;
45.24 -
45.25 -import java.util.ArrayList;
45.26 -import java.util.Iterator;
45.27 -import java.util.List;
45.28 -import javax.swing.SwingUtilities;
45.29 -
45.30 -import org.netbeans.modules.j2ee.sun.bridge.apis.RefreshCookie;
45.31 -import org.netbeans.modules.sun.manager.jbi.nodes.Uninstallable;
45.32 -import org.openide.nodes.Node;
45.33 -import org.openide.util.HelpCtx;
45.34 -import org.openide.util.Lookup;
45.35 -import org.openide.util.NbBundle;
45.36 -import org.openide.util.RequestProcessor;
45.37 -import org.openide.util.actions.NodeAction;
45.38 -
45.39 -/**
45.40 - *
45.41 - * @author jqian
45.42 - */
45.43 -public class UninstallAction extends NodeAction {
45.44 -
45.45 - /**
45.46 - *
45.47 - */
45.48 - protected void performAction(final Node[] activatedNodes) {
45.49 - RequestProcessor.getDefault().post(new Runnable() {
45.50 - public void run() {
45.51 - try {
45.52 - // a list of nodes that need refreshing
45.53 - final List<Node> parentNodes = new ArrayList<Node>();
45.54 - for (int i = 0; i < activatedNodes.length; i++) {
45.55 - Node node = activatedNodes[i];
45.56 - Lookup lookup = node.getLookup();
45.57 - Object obj = lookup.lookup(Uninstallable.class);
45.58 -
45.59 - if (obj instanceof Uninstallable) {
45.60 - Uninstallable uninstallable = (Uninstallable)obj;
45.61 - uninstallable.uninstall();
45.62 - // There will be at most one parent node that
45.63 - // needs refreshing
45.64 - Node parentNode = node.getParentNode();
45.65 - if (!parentNodes.contains(parentNode)) {
45.66 - parentNodes.add(parentNode);
45.67 - }
45.68 - }
45.69 - }
45.70 -
45.71 - SwingUtilities.invokeLater(new Runnable() {
45.72 - public void run() {
45.73 - for (Iterator<Node> it = parentNodes.iterator(); it.hasNext();) {
45.74 - Node parentNode = it.next();
45.75 - final RefreshCookie refreshAction =
45.76 - (RefreshCookie) parentNode.getCookie(RefreshCookie.class);
45.77 - if (refreshAction != null){
45.78 - refreshAction.refresh();
45.79 - }
45.80 - }
45.81 - }
45.82 - });
45.83 -
45.84 - } catch(java.lang.RuntimeException rex) {
45.85 - //gobble up exception
45.86 - }
45.87 - }
45.88 - });
45.89 - }
45.90 -
45.91 - protected boolean enable(Node[] nodes) {
45.92 - boolean ret = false;
45.93 -
45.94 - if (nodes != null && nodes.length > 0) {
45.95 -
45.96 - ret = true;
45.97 -
45.98 - for (int i = 0; i < nodes.length; i++) {
45.99 - Node node = nodes[i];
45.100 - Lookup lookup = node.getLookup();
45.101 - Object obj = lookup.lookup(Uninstallable.class);
45.102 -
45.103 - try {
45.104 - if(obj instanceof Uninstallable) {
45.105 - Uninstallable uninstallable = (Uninstallable)obj;
45.106 - if (!uninstallable.canUninstall()) {
45.107 - ret = false;
45.108 - break;
45.109 - }
45.110 - }
45.111 - } catch(java.lang.RuntimeException rex) {
45.112 - //gobble up exception
45.113 - }
45.114 - }
45.115 - }
45.116 -
45.117 - return ret;
45.118 - }
45.119 -
45.120 - /**
45.121 - *
45.122 - *
45.123 - */
45.124 - protected boolean asynchronous() {
45.125 - return false;
45.126 - }
45.127 -
45.128 -
45.129 - /**
45.130 - *
45.131 - *
45.132 - */
45.133 - public HelpCtx getHelpCtx() {
45.134 - return HelpCtx.DEFAULT_HELP;
45.135 - }
45.136 -
45.137 -
45.138 - /**
45.139 - *
45.140 - */
45.141 - public String getName() {
45.142 - return NbBundle.getMessage(UninstallAction.class, "LBL_UninstallAction"); // NOI18N
45.143 - }
45.144 -
45.145 -}
46.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/editors/JBILogLevelEditor.java Wed Feb 21 08:53:38 2007 +0000
46.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
46.3 @@ -1,97 +0,0 @@
46.4 -/*
46.5 - * The contents of this file are subject to the terms of the Common Development
46.6 - * and Distribution License (the License). You may not use this file except in
46.7 - * compliance with the License.
46.8 - *
46.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
46.10 - * or http://www.netbeans.org/cddl.txt.
46.11 -
46.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
46.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
46.14 - * If applicable, add the following below the CDDL Header, with the fields
46.15 - * enclosed by brackets [] replaced by your own identifying information:
46.16 - * "Portions Copyrighted [year] [name of copyright owner]"
46.17 - *
46.18 - * The Original Software is NetBeans. The Initial Developer of the Original
46.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
46.20 - * Microsystems, Inc. All Rights Reserved.
46.21 - */
46.22 -
46.23 -package org.netbeans.modules.sun.manager.jbi.editors;
46.24 -
46.25 -import java.awt.Component;
46.26 -import java.beans.PropertyEditorSupport;
46.27 -import org.openide.explorer.propertysheet.editors.EnhancedPropertyEditor;
46.28 -
46.29 -/**
46.30 - * Custom Editor for Server component's log levels
46.31 - * @author ludo
46.32 - * @author nityad
46.33 - */
46.34 -public class JBILogLevelEditor extends PropertyEditorSupport implements EnhancedPropertyEditor {
46.35 -
46.36 - public String curr_Sel;
46.37 - public String[] choices = {
46.38 - "FINEST", // NOI18N
46.39 - "FINER", // NOI18N
46.40 - "FINE", // NOI18N
46.41 - "INFO", // NOI18N
46.42 - "WARNING", // NOI18N
46.43 - "SEVERE", // NOI18N
46.44 - "OFF", // NOI18N
46.45 - };
46.46 -
46.47 - public JBILogLevelEditor() {
46.48 - curr_Sel = null;
46.49 - }
46.50 -
46.51 - public String getAsText() {
46.52 - return curr_Sel;
46.53 - }
46.54 -
46.55 - public void setAsText(String string) throws IllegalArgumentException {
46.56 - if((string==null)||(string.equals(""))) // NOI18N
46.57 - throw new IllegalArgumentException();
46.58 - else
46.59 - curr_Sel = string;
46.60 - this.firePropertyChange();
46.61 - }
46.62 -
46.63 - public void setValue(Object val) {
46.64 - if (! (val instanceof String)) {
46.65 - throw new IllegalArgumentException();
46.66 - }
46.67 -
46.68 - curr_Sel = (String) val;
46.69 - super.setValue(curr_Sel);
46.70 - }
46.71 -
46.72 - public Object getValue() {
46.73 - return curr_Sel;
46.74 - }
46.75 -
46.76 - public String getJavaInitializationString() {
46.77 - return getAsText();
46.78 - }
46.79 -
46.80 - public String[] getTags() {
46.81 - return choices;
46.82 - }
46.83 -
46.84 - public Component getInPlaceCustomEditor() {
46.85 - return null;
46.86 - }
46.87 -
46.88 -
46.89 - public boolean hasInPlaceCustomEditor() {
46.90 - return false;
46.91 - }
46.92 -
46.93 - public boolean supportsEditingTaggedValues() {
46.94 - return false;
46.95 - }
46.96 -
46.97 -}
46.98 -
46.99 -
46.100 -
47.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/editors/PasswordEditor.java Wed Feb 21 08:53:38 2007 +0000
47.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
47.3 @@ -1,104 +0,0 @@
47.4 -/*
47.5 - * The contents of this file are subject to the terms of the Common Development
47.6 - * and Distribution License (the License). You may not use this file except in
47.7 - * compliance with the License.
47.8 - *
47.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
47.10 - * or http://www.netbeans.org/cddl.txt.
47.11 -
47.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
47.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
47.14 - * If applicable, add the following below the CDDL Header, with the fields
47.15 - * enclosed by brackets [] replaced by your own identifying information:
47.16 - * "Portions Copyrighted [year] [name of copyright owner]"
47.17 - *
47.18 - * The Original Software is NetBeans. The Initial Developer of the Original
47.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
47.20 - * Microsystems, Inc. All Rights Reserved.
47.21 - */
47.22 -
47.23 -package org.netbeans.modules.sun.manager.jbi.editors;
47.24 -
47.25 -
47.26 -import java.awt.Component;
47.27 -import java.awt.KeyboardFocusManager;
47.28 -import java.awt.event.KeyAdapter;
47.29 -import java.awt.event.KeyEvent;
47.30 -import java.beans.PropertyEditorSupport;
47.31 -
47.32 -import javax.swing.JPasswordField;
47.33 -
47.34 -import org.openide.explorer.propertysheet.editors.EnhancedPropertyEditor;
47.35 -
47.36 -/**
47.37 - *
47.38 - * @author nityad
47.39 - */
47.40 -
47.41 -public class PasswordEditor extends PropertyEditorSupport
47.42 - implements EnhancedPropertyEditor {
47.43 -
47.44 - private String value;
47.45 -
47.46 - public String getAsText() {
47.47 - if (value != null) {
47.48 - return value.replaceAll(".", "*"); // NOI18N
47.49 - } else {
47.50 - return null;
47.51 - }
47.52 - }
47.53 -
47.54 - public void setAsText(String value) throws IllegalArgumentException {
47.55 - if (value != null && !value.trim().equals("")){ // NOI18N
47.56 - this.value = value;
47.57 - firePropertyChange();
47.58 - }
47.59 - }
47.60 -
47.61 - public void setValue(Object value) {
47.62 -// this.value = (String) value;
47.63 - setAsText((String)value);
47.64 - }
47.65 -
47.66 - public Object getValue() {
47.67 - return value;
47.68 - }
47.69 -
47.70 - public Component getInPlaceCustomEditor() {
47.71 - JPasswordField textfield = new JPasswordField(value);
47.72 - textfield.setEchoChar('*'); // NOI18N
47.73 - textfield.selectAll();
47.74 - textfield.addKeyListener(new KeyAdapter() {
47.75 - public void keyReleased(KeyEvent evt) {
47.76 - JPasswordField source = (JPasswordField)evt.getSource();
47.77 - // value = new String(source.getPassword());
47.78 - setValue(new String(source.getPassword()));
47.79 - // CR 5055478/6199209 cb.setText(curValue);
47.80 - //firePropertyChange();
47.81 - if (evt.getKeyCode() == KeyEvent.VK_ENTER){
47.82 - KeyEvent esc = new KeyEvent(evt.getComponent(),
47.83 - KeyEvent.KEY_PRESSED, 0, 0,
47.84 - KeyEvent.VK_ESCAPE,
47.85 - KeyEvent.CHAR_UNDEFINED);
47.86 - KeyboardFocusManager.getCurrentKeyboardFocusManager()
47.87 - .dispatchKeyEvent(esc);
47.88 - //firePropertyChange();
47.89 - }
47.90 - }
47.91 - });
47.92 - return textfield;
47.93 - }
47.94 -
47.95 - public boolean hasInPlaceCustomEditor() {
47.96 - return true;
47.97 - }
47.98 -
47.99 - public boolean supportsEditingTaggedValues() {
47.100 - return false;
47.101 - }
47.102 -}
47.103 -
47.104 -
47.105 -
47.106 -
47.107 -
48.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/layer.xml Wed Feb 21 08:53:38 2007 +0000
48.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
48.3 @@ -1,34 +0,0 @@
48.4 -<?xml version="1.0" encoding="UTF-8"?>
48.5 -
48.6 -<!--
48.7 -The contents of this file are subject to the terms of the Common Development
48.8 -and Distribution License (the License). You may not use this file except in
48.9 -compliance with the License.
48.10 -
48.11 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
48.12 -or http://www.netbeans.org/cddl.txt.
48.13 -
48.14 -When distributing Covered Code, include this CDDL Header Notice in each file
48.15 -and include the License file at http://www.netbeans.org/cddl.txt.
48.16 -If applicable, add the following below the CDDL Header, with the fields
48.17 -enclosed by brackets [] replaced by your own identifying information:
48.18 -"Portions Copyrighted [year] [name of copyright owner]"
48.19 -
48.20 - The Original Software is NetBeans. The Initial Developer of the Original
48.21 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
48.22 - Microsystems, Inc. All Rights Reserved.
48.23 --->
48.24 -
48.25 -<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
48.26 -<filesystem>
48.27 - <folder name="J2EE">
48.28 - <folder name="SunAppServer">
48.29 - <folder name="Bridge">
48.30 - <file name="JBIBridge">
48.31 - <attr name="jar.location" stringvalue="modules/org-netbeans-modules-sun-manager-jbi.jar"/>
48.32 - </file>
48.33 - </folder>
48.34 - </folder>
48.35 - </folder>
48.36 -</filesystem>
48.37 -
49.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/management/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
49.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
49.3 @@ -1,40 +0,0 @@
49.4 -#
49.5 -# The contents of this file are subject to the terms of the Common Development
49.6 -# and Distribution License (the License). You may not use this file except in
49.7 -# compliance with the License.
49.8 -#
49.9 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
49.10 -# or http://www.netbeans.org/cddl.txt.
49.11 -
49.12 -# When distributing Covered Code, include this CDDL Header Notice in each file
49.13 -# and include the License file at http://www.netbeans.org/cddl.txt.
49.14 -# If applicable, add the following below the CDDL Header, with the fields
49.15 -# enclosed by brackets [] replaced by your own identifying information:
49.16 -# "Portions Copyrighted [year] [name of copyright owner]"
49.17 -#
49.18 -# The Original Software is NetBeans. The Initial Developer of the Original
49.19 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
49.20 -# Microsystems, Inc. All Rights Reserved.
49.21 -#
49.22 -#Bean Info for JBIFrameworkService
49.23 -LBL_LOG_LEVEL=Log Level
49.24 -LBL_CLASS_NAME=Class Name
49.25 -LBL_CLASSPATH=Classpath
49.26 -LBL_DESCRIPTION=Description
49.27 -LBL_LOAD_ORDER=Load Order
49.28 -LBL_NAME=Name
49.29 -LBL_ENABLED=Enabled
49.30 -LBL_FAILURE_FATAL=Failure Fatal
49.31 -LBL_JBI_FRAMEWORK_ENABLED=JBI Framework Enabled
49.32 -
49.33 -DSC_LOG_LEVEL=JBI log level
49.34 -DSC_CLASS_NAME=JBI class name
49.35 -DSC_CLASSPATH=JBI classpath
49.36 -DSC_DESCRIPTION=Description of the Lifecycle Module
49.37 -DSC_LOAD_ORDER=Load order
49.38 -DSC_NAME=Name of the Lifecycle Module
49.39 -DSC_ENABLED=Is enabled
49.40 -DSC_FAILURE_FATAL=Is failure fatal
49.41 -DSC_JBI_FRAMEWORK_ENABLED=Is JBI framework enabled
49.42 -
49.43 -Connection_Failed=Connection Failed
50.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/management/JBIFrameworkService.java Wed Feb 21 08:53:38 2007 +0000
50.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
50.3 @@ -1,589 +0,0 @@
50.4 -/*
50.5 - * The contents of this file are subject to the terms of the Common Development
50.6 - * and Distribution License (the License). You may not use this file except in
50.7 - * compliance with the License.
50.8 - *
50.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
50.10 - * or http://www.netbeans.org/cddl.txt.
50.11 -
50.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
50.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
50.14 - * If applicable, add the following below the CDDL Header, with the fields
50.15 - * enclosed by brackets [] replaced by your own identifying information:
50.16 - * "Portions Copyrighted [year] [name of copyright owner]"
50.17 - *
50.18 - * The Original Software is NetBeans. The Initial Developer of the Original
50.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
50.20 - * Microsystems, Inc. All Rights Reserved.
50.21 - */
50.22 -
50.23 -package org.netbeans.modules.sun.manager.jbi.management;
50.24 -
50.25 -import java.io.IOException;
50.26 -import java.io.Serializable;
50.27 -import java.util.HashMap;
50.28 -import java.util.Iterator;
50.29 -import java.util.Map;
50.30 -import java.util.Set;
50.31 -
50.32 -import javax.management.Attribute;
50.33 -import javax.management.AttributeNotFoundException;
50.34 -import javax.management.InstanceNotFoundException;
50.35 -import javax.management.MBeanException;
50.36 -import javax.management.MBeanServerConnection;
50.37 -import javax.management.MalformedObjectNameException;
50.38 -import javax.management.ObjectName;
50.39 -import javax.management.QueryExp;
50.40 -import javax.management.ReflectionException;
50.41 -import javax.management.remote.JMXConnector;
50.42 -import javax.management.remote.JMXConnectorFactory;
50.43 -import javax.management.remote.JMXServiceURL;
50.44 -
50.45 -/**
50.46 - * Queries the runtime server to ensure that the JBI Container
50.47 - * is installed and is enabled. The JBI Container is installed as a
50.48 - * Lifecycle module on the server. This class also helps in configuring
50.49 - * the JBI Container at runtime.
50.50 - *
50.51 - * @author Graj
50.52 - *
50.53 - */
50.54 -public class JBIFrameworkService implements Serializable {
50.55 -
50.56 - /**
50.57 - * com.sun.jbi.home
50.58 - */
50.59 - public static final String JBI_CLASS_NAME_KEY = "class-name"; // NOI18N
50.60 -
50.61 - /**
50.62 - * com.sun.jbi.binding.proxy.connection
50.63 - */
50.64 - public static final String JBI_CLASSPATH_KEY = "classpath"; // NOI18N
50.65 -
50.66 - /**
50.67 - * disable-timeout-in-minutes - String - 30
50.68 - */
50.69 - public static final String DESCRIPTION_KEY = "description"; // NOI18N
50.70 -
50.71 - /**
50.72 - * enabled - boolean - true
50.73 - */
50.74 - public static final String ENABLED_KEY = "enabled"; // NOI18N
50.75 -
50.76 - /**
50.77 - * lb-enabled - boolean - false
50.78 - */
50.79 - public static final String IS_FAILURE_FATAL_KEY = "is-failure-fatal"; // NOI18N
50.80 -
50.81 - /**
50.82 - * ref - String - JBIFramework
50.83 - */
50.84 - public static final String LOAD_ORDER_KEY = "load-order"; // NOI18N
50.85 -
50.86 - /**
50.87 - * virtual-servers - String
50.88 - */
50.89 - public static final String NAME_KEY = "name"; // NOI18N
50.90 -
50.91 - /**
50.92 - * DOCUMENT ME!
50.93 - */
50.94 - public static final String JBI_CONFIG_OBJECTNAME = "com.sun.appserv:name=JBIFramework,type=lifecycle-module,category=config"; // NOI18N
50.95 -
50.96 - public static final String JBI_LOG_DEFAULT_PROPERTY_NAME = "com.sun.jbi.defaultLogLevel"; // NOI18N
50.97 -
50.98 - public static final String LOG_LEVEL_INFO_KEY = "INFO"; // NOI18N
50.99 - public static final String LOG_LEVEL_FINEST_KEY = "FINEST"; // NOI18N
50.100 - public static final String LOG_LEVEL_FINER_KEY = "FINER"; // NOI18N
50.101 - public static final String LOG_LEVEL_FINE_KEY = "FINE"; // NOI18N
50.102 - public static final String LOG_WARNING_INFO_KEY = "WARNING"; // NOI18N
50.103 - public static final String LOG_SEVERE_INFO_KEY = "SEVERE"; // NOI18N
50.104 - public static final String LOG_OFF_INFO_KEY = "OFF"; // NOI18N
50.105 - /**
50.106 - * DOCUMENT ME!
50.107 - */
50.108 - public static final String JBI_GETPROPERTYVALUE_OPERATION_NAME = "getPropertyValue"; // NOI18N
50.109 - public static final String JBI_SETPROPERTY_OPERATION_NAME = "setProperty"; // NOI18N
50.110 - private MBeanServerConnection serverConnection = null;
50.111 -
50.112 -
50.113 - /**
50.114 - * DOCUMENT ME!
50.115 - */
50.116 - String className;
50.117 -
50.118 - /**
50.119 - * DOCUMENT ME!
50.120 - */
50.121 - String classpath;
50.122 -
50.123 - /**
50.124 - * DOCUMENT ME!
50.125 - */
50.126 - String description;
50.127 -
50.128 - /**
50.129 - * DOCUMENT ME!
50.130 - */
50.131 - boolean enabled;
50.132 -
50.133 - /**
50.134 - * DOCUMENT ME!
50.135 - */
50.136 - boolean failureFatal;
50.137 -
50.138 - /**
50.139 - * DOCUMENT ME!
50.140 - */
50.141 - String loadOrder;
50.142 -
50.143 - /**
50.144 - * DOCUMENT ME!
50.145 - */
50.146 - String name;
50.147 -
50.148 - boolean jbiFrameworkEnabled;
50.149 -
50.150 - boolean isUIMBeanRegistered;
50.151 -
50.152 -
50.153 - /**
50.154 - *
50.155 - */
50.156 - public JBIFrameworkService(MBeanServerConnection connection) {
50.157 - super();
50.158 - this.serverConnection = connection;
50.159 - this.initialize();
50.160 - }
50.161 -
50.162 - /**
50.163 - * DOCUMENT ME!
50.164 - */
50.165 - void initialize() {
50.166 - try {
50.167 - this.jbiInitialize();
50.168 - } catch (MalformedObjectNameException e) {
50.169 - // TODO Auto-generated catch block
50.170 - e.printStackTrace();
50.171 - } catch (AttributeNotFoundException e) {
50.172 - // TODO Auto-generated catch block
50.173 - e.printStackTrace();
50.174 - } catch (InstanceNotFoundException e) {
50.175 - // TODO Auto-generated catch block
50.176 - e.printStackTrace();
50.177 - } catch (NullPointerException e) {
50.178 - // TODO Auto-generated catch block
50.179 - e.printStackTrace();
50.180 - } catch (MBeanException e) {
50.181 - // TODO Auto-generated catch block
50.182 - e.printStackTrace();
50.183 - } catch (ReflectionException e) {
50.184 - // TODO Auto-generated catch block
50.185 - e.printStackTrace();
50.186 - } catch (IOException e) {
50.187 - // TODO Auto-generated catch block
50.188 - e.printStackTrace();
50.189 - }
50.190 - }
50.191 -
50.192 - /**
50.193 - * DOCUMENT ME!
50.194 - *
50.195 - * @throws MalformedObjectNameException DOCUMENT ME!
50.196 - * @throws NullPointerException DOCUMENT ME!
50.197 - * @throws IOException DOCUMENT ME!
50.198 - * @throws InstanceNotFoundException DOCUMENT ME!
50.199 - * @throws MBeanException DOCUMENT ME!
50.200 - * @throws ReflectionException DOCUMENT ME!
50.201 - */
50.202 - void jbiInitialize() throws MalformedObjectNameException, NullPointerException, AttributeNotFoundException, InstanceNotFoundException, MBeanException, ReflectionException, IOException {
50.203 - QueryExp queryExpression = null;
50.204 - Set set = null;
50.205 - ObjectName objectName = null;
50.206 - String resultObject = null;
50.207 - objectName = new ObjectName(JBIFrameworkService.JBI_CONFIG_OBJECTNAME);
50.208 - ObjectName uiMBeanObjectName = new ObjectName(AdministrationService.ADMIN_SERVICE_OBJECTNAME);
50.209 -
50.210 - if (this.serverConnection != null) {
50.211 - try {
50.212 - isUIMBeanRegistered = this.serverConnection.isRegistered(uiMBeanObjectName);
50.213 - } catch (IOException ex) {
50.214 - // ignore
50.215 - }
50.216 -
50.217 - set = this.serverConnection.queryNames(objectName, queryExpression);
50.218 -
50.219 - Iterator iterator = set.iterator();
50.220 -
50.221 - if ((iterator != null) && (iterator.hasNext() == true)) {
50.222 - objectName = (ObjectName) iterator.next();
50.223 - }
50.224 -
50.225 - if (objectName != null) {
50.226 -
50.227 - this.className = (String) this.serverConnection.getAttribute(objectName, JBIFrameworkService.JBI_CLASS_NAME_KEY);
50.228 - this.description = (String) this.serverConnection.getAttribute(objectName, JBIFrameworkService.DESCRIPTION_KEY);
50.229 - String value = (String) this.serverConnection.getAttribute(objectName, JBIFrameworkService.ENABLED_KEY);
50.230 - if(value != null) {
50.231 - if(value.equalsIgnoreCase("True") == true) { // NOI18N
50.232 - this.enabled = true;
50.233 - } else {
50.234 - this.enabled = false;
50.235 - }
50.236 - }
50.237 - this.classpath = (String) this.serverConnection.getAttribute(objectName, JBIFrameworkService.JBI_CLASSPATH_KEY);
50.238 - value = (String) this.serverConnection.getAttribute(objectName, JBIFrameworkService.IS_FAILURE_FATAL_KEY);
50.239 - if(value != null) {
50.240 - if(value.equalsIgnoreCase("True") == true) { // NOI18N
50.241 - this.failureFatal = true;
50.242 - } else {
50.243 - this.failureFatal = false;
50.244 - }
50.245 - }
50.246 - this.loadOrder = (String) this.serverConnection.getAttribute(objectName, JBIFrameworkService.LOAD_ORDER_KEY);
50.247 - this.name = (String) this.serverConnection.getAttribute(objectName, JBIFrameworkService.NAME_KEY);
50.248 - this.jbiFrameworkEnabled = true;
50.249 - } else {
50.250 - this.jbiFrameworkEnabled = false;
50.251 - System.out.println("Cound not find the JBI Configuration MBean"); // NOI18N
50.252 - }
50.253 - } else {
50.254 - System.out.println("Could not connect to application server"); // NOI18N
50.255 - }
50.256 - }
50.257 -
50.258 - /**
50.259 - * DOCUMENT ME!
50.260 - *
50.261 - * @param objectName DOCUMENT ME!
50.262 - * @param paramObject DOCUMENT ME!
50.263 - *
50.264 - * @return DOCUMENT ME!
50.265 - *
50.266 - * @throws InstanceNotFoundException DOCUMENT ME!
50.267 - * @throws MBeanException DOCUMENT ME!
50.268 - * @throws ReflectionException DOCUMENT ME!
50.269 - * @throws IOException DOCUMENT ME!
50.270 - */
50.271 - Object invoke(ObjectName objectName, String paramObject) {
50.272 - String operationName = JBIFrameworkService.JBI_GETPROPERTYVALUE_OPERATION_NAME;
50.273 - Object resultObject = null;
50.274 - String[] params = {paramObject};
50.275 - String[] signature = {"java.lang.String"}; // NOI18N
50.276 -
50.277 - try {
50.278 - resultObject = (String) this.serverConnection.invoke(objectName, operationName, params, signature);
50.279 - } catch (InstanceNotFoundException e) {
50.280 - // TODO Auto-generated catch block
50.281 - e.printStackTrace();
50.282 - } catch (MBeanException e) {
50.283 - // TODO Auto-generated catch block
50.284 - e.printStackTrace();
50.285 - } catch (ReflectionException e) {
50.286 - // TODO Auto-generated catch block
50.287 - e.printStackTrace();
50.288 - } catch (IOException e) {
50.289 - // TODO Auto-generated catch block
50.290 - e.printStackTrace();
50.291 - }
50.292 -
50.293 - return resultObject;
50.294 - }
50.295 -
50.296 - /**
50.297 - * DOCUMENT ME!
50.298 - *
50.299 - * @return Returns the serverConnection.
50.300 - */
50.301 - public MBeanServerConnection getServerConnection() {
50.302 - return this.serverConnection;
50.303 - }
50.304 -
50.305 - /**
50.306 - * DOCUMENT ME!
50.307 - *
50.308 - * @param serverConnection The serverConnection to set.
50.309 - */
50.310 -// public void setServerConnection(MBeanServerConnection serverConnection) {
50.311 -// this.serverConnection = serverConnection;
50.312 -// }
50.313 -
50.314 - public String getDefaultLogPropertyValue() {
50.315 - String operationName = JBIFrameworkService.JBI_GETPROPERTYVALUE_OPERATION_NAME;
50.316 - ObjectName objectName = null;
50.317 - try {
50.318 - objectName = new ObjectName(JBIFrameworkService.JBI_CONFIG_OBJECTNAME);
50.319 - } catch (MalformedObjectNameException ex) {
50.320 - ex.printStackTrace();
50.321 - } catch (NullPointerException ex) {
50.322 - ex.printStackTrace();
50.323 - }
50.324 - String resultObject = null;
50.325 - String[] params = {JBIFrameworkService.JBI_LOG_DEFAULT_PROPERTY_NAME};
50.326 - String[] signature = {"java.lang.String"}; // NOI18N
50.327 -
50.328 - try {
50.329 - resultObject = (String) this.serverConnection.invoke(objectName, operationName, params, signature);
50.330 - } catch (InstanceNotFoundException e) {
50.331 - // TODO Auto-generated catch block
50.332 - e.printStackTrace();
50.333 - } catch (MBeanException e) {
50.334 - // TODO Auto-generated catch block
50.335 - e.printStackTrace();
50.336 - } catch (ReflectionException e) {
50.337 - // TODO Auto-generated catch block
50.338 - e.printStackTrace();
50.339 - } catch (IOException e) {
50.340 - // TODO Auto-generated catch block
50.341 - e.printStackTrace();
50.342 - }
50.343 -
50.344 - return resultObject;
50.345 - }
50.346 -
50.347 - public void setDefaultLogPropertyValue(String logLevelString) {
50.348 - String operationName = JBIFrameworkService.JBI_SETPROPERTY_OPERATION_NAME;
50.349 - ObjectName objectName = null;
50.350 - try {
50.351 - objectName = new ObjectName(JBIFrameworkService.JBI_CONFIG_OBJECTNAME);
50.352 - } catch (MalformedObjectNameException ex) {
50.353 - ex.printStackTrace();
50.354 - } catch (NullPointerException ex) {
50.355 - ex.printStackTrace();
50.356 - }
50.357 -
50.358 - Attribute attribute = new Attribute(JBIFrameworkService.JBI_LOG_DEFAULT_PROPERTY_NAME, logLevelString);
50.359 - String resultObject = null;
50.360 - Object[] params = {attribute};
50.361 - String[] signature = {attribute.getClass().getName()};
50.362 -
50.363 - try {
50.364 - resultObject = (String) this.serverConnection.invoke(objectName, operationName, params, signature);
50.365 - } catch (InstanceNotFoundException e) {
50.366 - // TODO Auto-generated catch block
50.367 - e.printStackTrace();
50.368 - } catch (MBeanException e) {
50.369 - // TODO Auto-generated catch block
50.370 - e.printStackTrace();
50.371 - } catch (ReflectionException e) {
50.372 - // TODO Auto-generated catch block
50.373 - e.printStackTrace();
50.374 - } catch (IOException e) {
50.375 - // TODO Auto-generated catch block
50.376 - e.printStackTrace();
50.377 - }
50.378 - }
50.379 -
50.380 - /**
50.381 - * @return Returns the className.
50.382 - */
50.383 - public String getClassName() {
50.384 - return this.className;
50.385 - }
50.386 -
50.387 - /**
50.388 - * @param className The className to set.
50.389 - */
50.390 -// public void setClassName(String className) {
50.391 -// this.className = className;
50.392 -// }
50.393 -
50.394 - /**
50.395 - * @return Returns the classpath.
50.396 - */
50.397 - public String getClasspath() {
50.398 - return this.classpath;
50.399 - }
50.400 -
50.401 - /**
50.402 - * @param classpath The classpath to set.
50.403 - */
50.404 -// public void setClasspath(String classpath) {
50.405 -// this.classpath = classpath;
50.406 -// }
50.407 -
50.408 - /**
50.409 - * @return Returns the description.
50.410 - */
50.411 - public String getDescription() {
50.412 - return this.description;
50.413 - }
50.414 -
50.415 - /**
50.416 - * @param description The description to set.
50.417 - */
50.418 -// public void setDescription(String description) {
50.419 -// this.description = description;
50.420 -// }
50.421 -
50.422 - /**
50.423 - * @return Returns the enabled.
50.424 - */
50.425 - public boolean isEnabled() {
50.426 - return this.enabled;
50.427 - }
50.428 -
50.429 - /**
50.430 - * @param enabled The enabled to set.
50.431 - */
50.432 -// public void setEnabled(boolean enabled) {
50.433 -// this.enabled = enabled;
50.434 -// }
50.435 -
50.436 - /**
50.437 - * @return Returns the failureFatal.
50.438 - */
50.439 - public boolean isFailureFatal() {
50.440 - return this.failureFatal;
50.441 - }
50.442 -
50.443 - /**
50.444 - * @param failureFatal The failureFatal to set.
50.445 - */
50.446 -// public void setFailureFatal(boolean failureFatal) {
50.447 -// this.failureFatal = failureFatal;
50.448 -// }
50.449 -
50.450 - /**
50.451 - * @return Returns the loadOrder.
50.452 - */
50.453 - public String getLoadOrder() {
50.454 - return this.loadOrder;
50.455 - }
50.456 -
50.457 - /**
50.458 - * @param loadOrder The loadOrder to set.
50.459 - */
50.460 -// public void setLoadOrder(String loadOrder) {
50.461 -// this.loadOrder = loadOrder;
50.462 -// }
50.463 -
50.464 - /**
50.465 - * @return Returns the name.
50.466 - */
50.467 - public String getName() {
50.468 - return this.name;
50.469 - }
50.470 -
50.471 - /**
50.472 - * @param name The name to set.
50.473 - */
50.474 -// public void setName(String name) {
50.475 -// this.name = name;
50.476 -// }
50.477 -
50.478 - /**
50.479 - * @return Returns the jbiFrameworkEnabled.
50.480 - */
50.481 - public boolean isJbiFrameworkEnabled() {
50.482 - return this.jbiFrameworkEnabled && this.isUIMBeanRegistered && this.isEnabled();
50.483 - }
50.484 -
50.485 - /**
50.486 - * DOCUMENT ME!
50.487 - */
50.488 - public void printOut() {
50.489 - System.out.println("//////////////////////////////////////////////////////////////////"); // NOI18N
50.490 - System.out.println("// -- JBI Configuration -- //"); // NOI18N
50.491 - System.out.println("//////////////////////////////////////////////////////////////////"); // NOI18N
50.492 - System.out.println("// " + JBIFrameworkService.DESCRIPTION_KEY + " is: " +this.getDescription()); // NOI18N
50.493 - System.out.println("// " + JBIFrameworkService.ENABLED_KEY + " is: " +this.isEnabled()); // NOI18N
50.494 - System.out.println("// " + JBIFrameworkService.IS_FAILURE_FATAL_KEY + " is: " +this.isFailureFatal()); // NOI18N
50.495 - System.out.println("// " + JBIFrameworkService.JBI_CLASS_NAME_KEY + " is: " + this.getClassName()); // NOI18N
50.496 - System.out.println("// " + JBIFrameworkService.JBI_CLASSPATH_KEY + " is: " +this.getClasspath()); // NOI18N
50.497 - System.out.println("// " + JBIFrameworkService.LOAD_ORDER_KEY + " is: " +this.getLoadOrder()); // NOI18N
50.498 - System.out.println("// " + JBIFrameworkService.NAME_KEY + " is: " +this.getName()); // NOI18N
50.499 -
50.500 - System.out.println("//////////////////////////////////////////////////////////////////"); // NOI18N
50.501 - }
50.502 -
50.503 - /**
50.504 - * DOCUMENT ME!
50.505 - *
50.506 - * @return DOCUMENT ME!
50.507 - */
50.508 - public static JBIFrameworkService getJBIConfiguration() {
50.509 - JBIFrameworkService configuration = null;
50.510 - return configuration;
50.511 - }
50.512 -
50.513 - /**
50.514 - *
50.515 - * @param connection
50.516 - */
50.517 - public static void test(MBeanServerConnection connection) {
50.518 - /*
50.519 - String LOG_LEVEL_INFO_KEY = "INFO";
50.520 - String LOG_LEVEL_FINEST_KEY = "FINEST";
50.521 - String LOG_LEVEL_FINER_KEY = "FINER";
50.522 - String LOG_LEVEL_FINE_KEY = "FINE";
50.523 - String LOG_WARNING_INFO_KEY = "WARNING";
50.524 - String LOG_SEVERE_INFO_KEY = "SEVERE";
50.525 - String LOG_OFF_INFO_KEY = "OFF";
50.526 - */
50.527 - if(connection != null) {
50.528 - JBIFrameworkService service = new JBIFrameworkService(connection);
50.529 - service.printOut();
50.530 - if(service.isJbiFrameworkEnabled() == true) {
50.531 - System.out.println("**** JBI Framework is Enabled ****"); // NOI18N
50.532 - } else {
50.533 - System.out.println("**** JBI Framework is NOT Enabled ****"); // NOI18N
50.534 - }
50.535 -
50.536 - String level = service.getDefaultLogPropertyValue();
50.537 - service.setDefaultLogPropertyValue(LOG_SEVERE_INFO_KEY);
50.538 - }
50.539 - }
50.540 -
50.541 -
50.542 -
50.543 - /**
50.544 - * Run an ant script. Starts a separate process to do so. This prevents potential undesireable
50.545 - * interactions, but it also means it should only be used in 'low-frequency' situations to
50.546 - * avoid performance issues with continually creating new processes.
50.547 - *
50.548 - * @param args full path to the ant script file
50.549 - *
50.550 - * @throws Exception DOCUMENT ME!
50.551 - */
50.552 - public static void main(String[] args) throws Exception {
50.553 - String PROTOCOL_CLASS = "com.sun.enterprise.admin.jmx.remote.protocol"; // NOI18N
50.554 - String HTTP_AUTH_PROPERTY_NAME = "com.sun.enterprise.as.http.auth"; // NOI18N
50.555 - String DEFAULT_HTTP_AUTH_SCHEME = "BASIC"; // NOI18N
50.556 - String ADMIN_USER_ENV_PROPERTY_NAME = "USER"; // NOI18N
50.557 - String ADMIN_PASSWORD_ENV_PROPERTY_NAME = "PASSWORD"; // NOI18N
50.558 - String RTS_HTTP_CONNECTOR = "s1ashttp"; // NOI18N
50.559 -
50.560 - String hostName = null;
50.561 - String port = null;
50.562 - String userName = null;
50.563 - String password = null;
50.564 -
50.565 - hostName = "localhost"; // NOI18N
50.566 - port = "4848"; // NOI18N
50.567 - userName = "admin"; // NOI18N
50.568 - password = "adminadmin"; // NOI18N
50.569 -
50.570 - final Map<String, String> environment = new HashMap<String, String>();
50.571 - environment.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES, PROTOCOL_CLASS);
50.572 - environment.put(HTTP_AUTH_PROPERTY_NAME, DEFAULT_HTTP_AUTH_SCHEME);
50.573 - environment.put(ADMIN_USER_ENV_PROPERTY_NAME, userName);
50.574 - environment.put(ADMIN_PASSWORD_ENV_PROPERTY_NAME, password);
50.575 -
50.576 - try {
50.577 - int portValue = new Integer(port).intValue();
50.578 - MBeanServerConnection connection = null;
50.579 - JMXServiceURL serviceURL = new JMXServiceURL(RTS_HTTP_CONNECTOR, hostName, portValue);
50.580 - JMXConnector connector = JMXConnectorFactory.connect(serviceURL, environment);
50.581 - connection = connector.getMBeanServerConnection();
50.582 -
50.583 - System.out.println("Connection Retrieved."+connection.toString()); // NOI18N
50.584 - JBIFrameworkService.test(connection);
50.585 -
50.586 - } catch (Exception ex) {
50.587 - ex.printStackTrace();
50.588 - System.out.println("Connection Failed "+ex.getMessage()); // NOI18N
50.589 - }
50.590 -
50.591 - }
50.592 -}
51.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/management/JBIMBeanTaskResultHandler.java Wed Feb 21 08:53:38 2007 +0000
51.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
51.3 @@ -1,363 +0,0 @@
51.4 -/*
51.5 - * The contents of this file are subject to the terms of the Common Development
51.6 - * and Distribution License (the License). You may not use this file except in
51.7 - * compliance with the License.
51.8 - *
51.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
51.10 - * or http://www.netbeans.org/cddl.txt.
51.11 -
51.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
51.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
51.14 - * If applicable, add the following below the CDDL Header, with the fields
51.15 - * enclosed by brackets [] replaced by your own identifying information:
51.16 - * "Portions Copyrighted [year] [name of copyright owner]"
51.17 - *
51.18 - * The Original Software is NetBeans. The Initial Developer of the Original
51.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
51.20 - * Microsystems, Inc. All Rights Reserved.
51.21 - */
51.22 -
51.23 -package org.netbeans.modules.sun.manager.jbi.management;
51.24 -
51.25 -import java.io.File;
51.26 -import java.io.FileReader;
51.27 -import java.io.StringReader;
51.28 -import java.util.List;
51.29 -import java.util.ArrayList;
51.30 -import javax.xml.parsers.DocumentBuilder;
51.31 -import javax.xml.parsers.DocumentBuilderFactory;
51.32 -import javax.xml.xpath.XPath;
51.33 -import javax.xml.xpath.XPathConstants;
51.34 -import javax.xml.xpath.XPathExpressionException;
51.35 -import javax.xml.xpath.XPathFactory;
51.36 -import org.openide.DialogDisplayer;
51.37 -import org.openide.NotifyDescriptor;
51.38 -import org.w3c.dom.Document;
51.39 -import org.w3c.dom.Node;
51.40 -import org.w3c.dom.NodeList;
51.41 -import org.xml.sax.InputSource;
51.42 -
51.43 -/**
51.44 - *
51.45 - * @author jqian
51.46 - */
51.47 -public class JBIMBeanTaskResultHandler {
51.48 -
51.49 - public static final String LINE_SEPARATOR =
51.50 - System.getProperty("line.separator"); // NOI18N
51.51 -
51.52 - /**
51.53 - * @param actionName remote action name
51.54 - * @param target action target (JBI component name,
51.55 - * service assembly name, or the artifact)
51.56 - * @param result remote invocation result
51.57 - */
51.58 - public static void showRemoteInvokationResult(String actionName,
51.59 - String target, String result) {
51.60 -
51.61 - if (result == null || result.trim().length() == 0) {
51.62 - return;
51.63 - }
51.64 -
51.65 - System.out.println(result);
51.66 -
51.67 - StringBuffer ret = new StringBuffer();
51.68 - ret = ret.append("<html>"); // NOI18N
51.69 -
51.70 - boolean failed = false;
51.71 -
51.72 - if (result.indexOf("<?xml") == -1) { // NOI18N
51.73 - // No XML, certain exception (IO) occurred during invoke()
51.74 - if (result.indexOf("Exception") == -1) {
51.75 - return;
51.76 - } else {
51.77 - failed = true;
51.78 - ret = ret.append(result);
51.79 - }
51.80 - } else {
51.81 - // Need to extract info from the XML result
51.82 - result = result.substring(result.indexOf("<?xml")); // NOI18N
51.83 - Document document = getDocument(result);
51.84 -
51.85 - failed = !JBIMBeanTaskResultHandler.isFrameworkTaskResultSuccessful(document);
51.86 -
51.87 - List<TaskResult> frameworkTaskResults =
51.88 - JBIMBeanTaskResultHandler.getTaskResultProblems(document, true);
51.89 -
51.90 - if (failed) {
51.91 - ret = ret.append("Failed execution of "); // NOI18N
51.92 - } else if (frameworkTaskResults != null && frameworkTaskResults.size() > 0) {
51.93 - ret = ret.append("Successful execution of "); // NOI18N
51.94 - } else { // complete success
51.95 - return;
51.96 - }
51.97 -
51.98 - ret = ret.append(actionName);
51.99 - ret = ret.append(": "); // NOI18N
51.100 - ret = ret.append(target);
51.101 -
51.102 -// if (partialSuccess) {
51.103 -// ret = ret.append(" (partial success)"); // NOI18N
51.104 -// }
51.105 -
51.106 - List<TaskResult> componentTaskResults =
51.107 - JBIMBeanTaskResultHandler.getTaskResultProblems(document, false);
51.108 -
51.109 - for (TaskResult frameworkTaskResult : frameworkTaskResults) {
51.110 - ret = ret.append("<br>"); // NOI18N
51.111 - ret = ret.append(frameworkTaskResult.toHtmlString());
51.112 - }
51.113 -
51.114 - ret = ret.append("<ul>"); // NOI18N
51.115 - for (TaskResult componentTaskResult : componentTaskResults) {
51.116 - ret = ret.append(componentTaskResult.toHtmlString());
51.117 - }
51.118 - ret = ret.append("</ul>"); // NOI18N
51.119 - }
51.120 -
51.121 - ret.append("</html>");
51.122 -
51.123 - int msgType = failed ? NotifyDescriptor.ERROR_MESSAGE : NotifyDescriptor.WARNING_MESSAGE;
51.124 - NotifyDescriptor d = new NotifyDescriptor.Message(ret.toString(), msgType);
51.125 - DialogDisplayer.getDefault().notify(d);
51.126 - }
51.127 -
51.128 - public static boolean isFrameworkTaskResultSuccessful(Document document) {
51.129 - XPathFactory xpathFactory = XPathFactory.newInstance();
51.130 - XPath xpath = xpathFactory.newXPath();
51.131 -
51.132 - try {
51.133 - String frameworkTaskResult = xpath.evaluate(
51.134 - "//frmwk-task-result/frmwk-task-result-details/task-result-details/task-result/text()", document); // NOI18N
51.135 - return frameworkTaskResult.equals("SUCCESS"); // NOI18N
51.136 - } catch (XPathExpressionException ex) {
51.137 - ex.printStackTrace();
51.138 - }
51.139 -
51.140 - return false;
51.141 - }
51.142 -
51.143 - public static List<TaskResult> getTaskResultProblems(Document document, boolean framework) {
51.144 - List<TaskResult> ret = new ArrayList<TaskResult>();
51.145 -
51.146 - ret.addAll(getTaskResultExceptions(document, framework));
51.147 - ret.addAll(getTaskResultErrors(document, framework));
51.148 - ret.addAll(getTaskResultWarnings(document, framework));
51.149 - ret.addAll(getTaskResultInfos(document, framework));
51.150 -
51.151 - return ret;
51.152 - }
51.153 -
51.154 - public static List<TaskResult> getTaskResultExceptions(Document document, boolean framework) {
51.155 - String expression = getMyXPathExpression("EXCEPTION", framework);
51.156 - return getMsgLocInfoOfType("ERROR", document, expression, framework);
51.157 - }
51.158 -
51.159 - public static List<TaskResult> getTaskResultErrors(Document document, boolean framework) {
51.160 - String expression = getMyXPathExpression("ERROR", framework);
51.161 - return getMsgLocInfoOfType("ERROR", document, expression, framework);
51.162 - }
51.163 -
51.164 - public static List<TaskResult> getTaskResultWarnings(Document document, boolean framework) {
51.165 - String expression = getMyXPathExpression("WARNING", framework);
51.166 - return getMsgLocInfoOfType("WARNING", document, expression, framework);
51.167 - }
51.168 -
51.169 - public static List<TaskResult> getTaskResultInfos(Document document, boolean framework) {
51.170 - String expression = getMyXPathExpression("INFO", framework);
51.171 - return getMsgLocInfoOfType("INFO", document, expression, framework);
51.172 - }
51.173 -
51.174 -
51.175 - private static String getMyXPathExpression(String messageType, boolean framework) {
51.176 - String ret = null;
51.177 -
51.178 - String taskResult = framework? "frmwk-task-result" : "component-task-result";
51.179 - if (messageType.equals("EXCEPTION")) {
51.180 - ret = "//" + taskResult + "/*/task-result-details/exception-info/msg-loc-info"; // NOI18N
51.181 - } else {
51.182 - ret = "//" + taskResult + "/*/task-result-details[message-type='" + messageType +"']/task-status-msg/msg-loc-info"; // NOI18N
51.183 - }
51.184 -
51.185 - return ret;
51.186 - }
51.187 -
51.188 -
51.189 - private static List<TaskResult> getMsgLocInfoOfType(String type,
51.190 - Document document, String expression, boolean framework) {
51.191 -
51.192 - List<TaskResult> ret = new ArrayList<TaskResult>();
51.193 -
51.194 - try {
51.195 - XPathFactory xpathFactory = XPathFactory.newInstance();
51.196 - XPath xpath = xpathFactory.newXPath();
51.197 -
51.198 - NodeList msgLocInfoNodeList = (NodeList) xpath.evaluate(expression,
51.199 - document, XPathConstants.NODESET);
51.200 -
51.201 - if (msgLocInfoNodeList != null) {
51.202 - int length = msgLocInfoNodeList.getLength();
51.203 - for (int i = 0; i < length; i++) {
51.204 - Node msgLocInfoNode = msgLocInfoNodeList.item(i);
51.205 - String locTokenValue = xpath.evaluate("loc-token/text()", msgLocInfoNode); // NOI18N
51.206 - String locMessageValue = xpath.evaluate("loc-message/text()", msgLocInfoNode); // NOI18N
51.207 -
51.208 - if (locTokenValue != null || locMessageValue != null) {
51.209 -
51.210 - if (framework) {
51.211 - ret.add(new TaskResult(type, locTokenValue, locMessageValue));
51.212 - } else {
51.213 - Node parent = msgLocInfoNode;
51.214 - while (!parent.getNodeName().equals("component-task-result")) {
51.215 - parent = parent.getParentNode();
51.216 - }
51.217 - String componentName =
51.218 - xpath.evaluate("component-name/text()", parent); // NOI18N
51.219 -
51.220 -
51.221 - ret.add(new ComponentTaskResult(type, locTokenValue,
51.222 - locMessageValue, componentName));
51.223 - }
51.224 - }
51.225 - }
51.226 - }
51.227 - } catch (XPathExpressionException e) {
51.228 - e.printStackTrace();
51.229 - }
51.230 -
51.231 - return ret;
51.232 - }
51.233 -
51.234 - private static Document getDocument(String xmlString) {
51.235 - try {
51.236 - DocumentBuilderFactory documentBuilderFactory =
51.237 - DocumentBuilderFactory.newInstance();
51.238 - DocumentBuilder documentBuilder =
51.239 - documentBuilderFactory.newDocumentBuilder();
51.240 - return documentBuilder.parse(new InputSource(new StringReader(xmlString)));
51.241 -
51.242 - } catch (Exception e) {
51.243 - System.out.println("Error parsing XML string: " + e); // NOI18N
51.244 - return null;
51.245 - }
51.246 - }
51.247 -
51.248 - public static Document getDocument(File xmlFile) {
51.249 - try {
51.250 - DocumentBuilderFactory documentBuilderFactory =
51.251 - DocumentBuilderFactory.newInstance();
51.252 - DocumentBuilder documentBuilder =
51.253 - documentBuilderFactory.newDocumentBuilder();
51.254 - return documentBuilder.parse(new InputSource(new FileReader(xmlFile)));
51.255 - } catch (Exception e) {
51.256 - System.out.println("Error parsing XML file: " + e); // NOI18N
51.257 - return null;
51.258 - }
51.259 - }
51.260 -
51.261 -}
51.262 -
51.263 -class TaskResult {
51.264 - private String messageType;
51.265 - private String locToken;
51.266 - private String locMessage;
51.267 -
51.268 - TaskResult(String messageType, String locToken, String locMessage) {
51.269 - this.messageType = messageType;
51.270 - this.locToken = locToken;
51.271 - this.locMessage = locMessage;
51.272 - }
51.273 -
51.274 - public String getMessageType() {
51.275 - return messageType;
51.276 - }
51.277 -
51.278 - public void setMessageType(String messageType) {
51.279 - this.messageType = messageType;
51.280 - }
51.281 -
51.282 - public String getLocToken() {
51.283 - return locToken;
51.284 - }
51.285 -
51.286 - public void setLocToken(String locToken) {
51.287 - this.locToken = locToken;
51.288 - }
51.289 -
51.290 - public String getLocMessage() {
51.291 - return locMessage;
51.292 - }
51.293 -
51.294 - public void setLocMessage(String locMessage) {
51.295 - this.locMessage = locMessage;
51.296 - }
51.297 -
51.298 - public String toString() {
51.299 - StringBuffer ret = new StringBuffer();
51.300 -
51.301 - ret = ret.append(getMessageType());
51.302 - ret = ret.append(": ("); // NOI18N
51.303 - ret = ret.append(getLocToken());
51.304 - ret = ret.append(") "); // NOI18N
51.305 - ret = ret.append(getLocMessage());
51.306 -
51.307 - return ret.toString();
51.308 - }
51.309 -
51.310 - public String toHtmlString() {
51.311 - StringBuffer ret = new StringBuffer();
51.312 -
51.313 - ret = ret.append("<b>"); // NOI18N
51.314 - ret = ret.append(getMessageType());
51.315 - ret = ret.append("</b>"); // NOI18N
51.316 - ret = ret.append(": ("); // NOI18N
51.317 - ret = ret.append(getLocToken());
51.318 - ret = ret.append(") "); // NOI18N
51.319 - ret = ret.append(getLocMessage());
51.320 -
51.321 - return ret.toString();
51.322 - }
51.323 -}
51.324 -
51.325 -class ComponentTaskResult extends TaskResult {
51.326 - private String componentName;
51.327 -
51.328 - ComponentTaskResult(String messageType, String locToken, String locMessage, String componentName) {
51.329 - super(messageType, locToken, locMessage);
51.330 - this.setComponentName(componentName);
51.331 - }
51.332 -
51.333 - public String getComponentName() {
51.334 - return componentName;
51.335 - }
51.336 -
51.337 - public void setComponentName(String componentName) {
51.338 - this.componentName = componentName;
51.339 - }
51.340 -
51.341 - public String toString() {
51.342 - StringBuffer ret = new StringBuffer();
51.343 -
51.344 - ret = ret.append(" * Component: "); // NOI18N
51.345 - ret = ret.append(getComponentName());
51.346 - ret = ret.append(JBIMBeanTaskResultHandler.LINE_SEPARATOR);
51.347 - ret = ret.append(" "); // NOI18N
51.348 - ret = ret.append(super.toString());
51.349 -
51.350 - return ret.toString();
51.351 - }
51.352 -
51.353 - public String toHtmlString() {
51.354 - StringBuffer ret = new StringBuffer();
51.355 -
51.356 - ret = ret.append("<li>"); // NOI18N
51.357 - ret = ret.append("Component: "); // NOI18N
51.358 - ret = ret.append(getComponentName());
51.359 - ret = ret.append("<br>"); // NOI18N
51.360 - ret = ret.append(" "); // NOI18N
51.361 - ret = ret.append(super.toHtmlString());
51.362 - ret = ret.append("</li>"); // NOI18N
51.363 -
51.364 - return ret.toString();
51.365 - }
51.366 -}
51.367 \ No newline at end of file
52.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/management/connectors/HTTPServerConnector.java Wed Feb 21 08:53:38 2007 +0000
52.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
52.3 @@ -1,189 +0,0 @@
52.4 -/*
52.5 - * The contents of this file are subject to the terms of the Common Development
52.6 - * and Distribution License (the License). You may not use this file except in
52.7 - * compliance with the License.
52.8 - *
52.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
52.10 - * or http://www.netbeans.org/cddl.txt.
52.11 -
52.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
52.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
52.14 - * If applicable, add the following below the CDDL Header, with the fields
52.15 - * enclosed by brackets [] replaced by your own identifying information:
52.16 - * "Portions Copyrighted [year] [name of copyright owner]"
52.17 - *
52.18 - * The Original Software is NetBeans. The Initial Developer of the Original
52.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
52.20 - * Microsystems, Inc. All Rights Reserved.
52.21 - */
52.22 -
52.23 -
52.24 -/*
52.25 - * Created on Dec 22, 2004
52.26 - *
52.27 - * TODO To change the template for this generated file go to
52.28 - * Window - Preferences - Java - Code Style - Code Templates
52.29 - */
52.30 -package org.netbeans.modules.sun.manager.jbi.management.connectors;
52.31 -
52.32 -import java.io.Serializable;
52.33 -
52.34 -import java.util.HashMap;
52.35 -import java.util.Map;
52.36 -
52.37 -import javax.management.MBeanServerConnection;
52.38 -import javax.management.remote.JMXConnector;
52.39 -import javax.management.remote.JMXConnectorFactory;
52.40 -import javax.management.remote.JMXServiceURL;
52.41 -
52.42 -
52.43 -/**
52.44 - * DOCUMENT ME!
52.45 - *
52.46 - * @author Graj TODO To change the template for this generated type comment go to Window -
52.47 - * Preferences - Java - Code Style - Code Templates
52.48 - */
52.49 -public class HTTPServerConnector extends ServerConnector implements Serializable {
52.50 - /**
52.51 - * DOCUMENT ME!
52.52 - */
52.53 - static final String PROTOCOL_CLASS = "com.sun.enterprise.admin.jmx.remote.protocol"; // NOI18N
52.54 -
52.55 - /**
52.56 - * DOCUMENT ME!
52.57 - */
52.58 - static final String HTTP_AUTH_PROPERTY_NAME = "com.sun.enterprise.as.http.auth"; // NOI18N
52.59 -
52.60 - /**
52.61 - * DOCUMENT ME!
52.62 - */
52.63 - static final String DEFAULT_HTTP_AUTH_SCHEME = "BASIC"; // NOI18N
52.64 -
52.65 - /**
52.66 - * DOCUMENT ME!
52.67 - */
52.68 - static final String ADMIN_USER_ENV_PROPERTY_NAME = "USER"; // NOI18N
52.69 -
52.70 - /**
52.71 - * DOCUMENT ME!
52.72 - */
52.73 - static final String ADMIN_PASSWORD_ENV_PROPERTY_NAME = "PASSWORD"; // NOI18N
52.74 -
52.75 - /**
52.76 - * DOCUMENT ME!
52.77 - */
52.78 - static final String RTS_HTTP_CONNECTOR = "s1ashttp"; // NOI18N
52.79 -
52.80 - /**
52.81 - * DOCUMENT ME!
52.82 - */
52.83 - transient MBeanServerConnection connection;
52.84 -
52.85 - private ClassLoader jbiClassLoader;
52.86 -
52.87 - /**
52.88 - * DOCUMENT ME!
52.89 - *
52.90 - * @param hostNameParam
52.91 - * @param portParam
52.92 - * @param userNameParam
52.93 - * @param passwordParam
52.94 - */
52.95 - public HTTPServerConnector(
52.96 - String hostNameParam, String portParam, String userNameParam, String passwordParam,
52.97 - ClassLoader jbiClassLoader
52.98 - ) {
52.99 - super(hostNameParam, portParam, userNameParam, passwordParam);
52.100 -
52.101 - this.jbiClassLoader = jbiClassLoader;
52.102 -
52.103 - try {
52.104 - initialize();
52.105 - } catch (Exception e) {
52.106 - e.printStackTrace();
52.107 - }
52.108 - }
52.109 -
52.110 - /**
52.111 - * DOCUMENT ME!
52.112 - *
52.113 - * @param hostNameParam
52.114 - * @param portParam
52.115 - * @param userNameParam
52.116 - * @param passwordParam
52.117 - */
52.118 - public void setParameters(
52.119 - String hostNameParam, String portParam, String userNameParam, String passwordParam
52.120 - ) {
52.121 - this.hostName = hostNameParam;
52.122 - this.port = portParam;
52.123 - this.userName = userNameParam;
52.124 - this.password = passwordParam;
52.125 -
52.126 - try {
52.127 - initialize();
52.128 - } catch (Exception e) {
52.129 - e.printStackTrace();
52.130 - }
52.131 - }
52.132 -
52.133 - /**
52.134 - * DOCUMENT ME!
52.135 - *
52.136 - * @return Returns the connection.
52.137 - */
52.138 - public MBeanServerConnection getConnection() {
52.139 - return this.connection;
52.140 - }
52.141 -
52.142 - /**
52.143 - * This method returns the MBeanServerConnection to used to invoke the MBean methods via HTPP
52.144 - * connector.
52.145 - *
52.146 - * @throws Exception DOCUMENT ME!
52.147 - */
52.148 - public void initialize() throws Exception {
52.149 - boolean result = true;
52.150 - final Map<String, Object> environment = new HashMap<String, Object>();
52.151 - environment.put(
52.152 - JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES, HTTPServerConnector.PROTOCOL_CLASS
52.153 - );
52.154 - environment.put(
52.155 - HTTPServerConnector.HTTP_AUTH_PROPERTY_NAME,
52.156 - HTTPServerConnector.DEFAULT_HTTP_AUTH_SCHEME
52.157 - );
52.158 - environment.put(HTTPServerConnector.ADMIN_USER_ENV_PROPERTY_NAME, this.getUserName());
52.159 - environment.put(HTTPServerConnector.ADMIN_PASSWORD_ENV_PROPERTY_NAME, this.getPassword());
52.160 -
52.161 - environment.put(JMXConnectorFactory.PROTOCOL_PROVIDER_CLASS_LOADER, jbiClassLoader);
52.162 -
52.163 - try {
52.164 - int portValue = new Integer(this.getPort()).intValue();
52.165 - JMXServiceURL serviceURL = new JMXServiceURL(
52.166 - HTTPServerConnector.RTS_HTTP_CONNECTOR, this.getHostName(), portValue
52.167 - );
52.168 - JMXConnector connector = JMXConnectorFactory.connect(serviceURL, environment);
52.169 - this.connection = connector.getMBeanServerConnection();
52.170 - } catch (Exception exception) {
52.171 - throw exception;
52.172 - }
52.173 - }
52.174 -
52.175 - /**
52.176 - * DOCUMENT ME!
52.177 - *
52.178 - * @param args DOCUMENT ME!
52.179 - */
52.180 - public static void main(String[] args) {
52.181 - HTTPServerConnector connector = new HTTPServerConnector(
52.182 - "GRajGX270.stc.com", "4848", "admin", "adminadmin", null // NOI18N
52.183 - );
52.184 -
52.185 - if (connector.getConnection() != null) {
52.186 - System.out.println("Connection Retrieved." + connector.toString()); // NOI18N
52.187 - connector.printOut();
52.188 - } else {
52.189 - System.out.println("Connection Failed"); // NOI18N
52.190 - }
52.191 - }
52.192 -}
53.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/management/connectors/ServerConnector.java Wed Feb 21 08:53:38 2007 +0000
53.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
53.3 @@ -1,164 +0,0 @@
53.4 -/*
53.5 - * The contents of this file are subject to the terms of the Common Development
53.6 - * and Distribution License (the License). You may not use this file except in
53.7 - * compliance with the License.
53.8 - *
53.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
53.10 - * or http://www.netbeans.org/cddl.txt.
53.11 -
53.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
53.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
53.14 - * If applicable, add the following below the CDDL Header, with the fields
53.15 - * enclosed by brackets [] replaced by your own identifying information:
53.16 - * "Portions Copyrighted [year] [name of copyright owner]"
53.17 - *
53.18 - * The Original Software is NetBeans. The Initial Developer of the Original
53.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
53.20 - * Microsystems, Inc. All Rights Reserved.
53.21 - */
53.22 -
53.23 -
53.24 -/*
53.25 - * Created on Dec 22, 2004
53.26 - *
53.27 - * TODO To change the template for this generated file go to
53.28 - * Window - Preferences - Java - Code Style - Code Templates
53.29 - */
53.30 -package org.netbeans.modules.sun.manager.jbi.management.connectors;
53.31 -
53.32 -import java.io.Serializable;
53.33 -
53.34 -
53.35 -/**
53.36 - * DOCUMENT ME!
53.37 - *
53.38 - * @author Graj TODO To change the template for this generated type comment go to Window -
53.39 - * Preferences - Java - Code Style - Code Templates
53.40 - */
53.41 -public class ServerConnector implements Serializable {
53.42 - /**
53.43 - * DOCUMENT ME!
53.44 - */
53.45 - String hostName;
53.46 -
53.47 - /**
53.48 - * DOCUMENT ME!
53.49 - */
53.50 - String port;
53.51 -
53.52 - /**
53.53 - * DOCUMENT ME!
53.54 - */
53.55 - String userName;
53.56 -
53.57 - /**
53.58 - * DOCUMENT ME!
53.59 - */
53.60 - String password;
53.61 -
53.62 - /**
53.63 - *
53.64 - */
53.65 - public ServerConnector(
53.66 - String hostNameParam, String portParam, String userNameParam, String passwordParam
53.67 - ) {
53.68 - this.hostName = hostNameParam;
53.69 - this.port = portParam;
53.70 - this.userName = userNameParam;
53.71 - this.password = passwordParam;
53.72 - }
53.73 -
53.74 - /**
53.75 - * DOCUMENT ME!
53.76 - *
53.77 - * @param password The password to set.
53.78 - */
53.79 - public void setPassword(String password) {
53.80 - this.password = password;
53.81 - }
53.82 -
53.83 - /**
53.84 - * DOCUMENT ME!
53.85 - *
53.86 - * @param userName The userName to set.
53.87 - */
53.88 - public void setUserName(String userName) {
53.89 - this.userName = userName;
53.90 - }
53.91 -
53.92 - /**
53.93 - * DOCUMENT ME!
53.94 - *
53.95 - * @return Returns the password.
53.96 - */
53.97 - public String getPassword() {
53.98 - return this.password;
53.99 - }
53.100 -
53.101 - /**
53.102 - * DOCUMENT ME!
53.103 - *
53.104 - * @return Returns the userName.
53.105 - */
53.106 - public String getUserName() {
53.107 - return this.userName;
53.108 - }
53.109 -
53.110 - /**
53.111 - * DOCUMENT ME!
53.112 - *
53.113 - * @return Returns the hostName.
53.114 - */
53.115 - public String getHostName() {
53.116 - return this.hostName;
53.117 - }
53.118 -
53.119 - /**
53.120 - * DOCUMENT ME!
53.121 - *
53.122 - * @param hostName The hostName to set.
53.123 - */
53.124 - public void setHostName(String hostName) {
53.125 - this.hostName = hostName;
53.126 - }
53.127 -
53.128 - /**
53.129 - * DOCUMENT ME!
53.130 - *
53.131 - * @return Returns the port.
53.132 - */
53.133 - public String getPort() {
53.134 - return this.port;
53.135 - }
53.136 -
53.137 - /**
53.138 - * DOCUMENT ME!
53.139 - *
53.140 - * @param port The port to set.
53.141 - */
53.142 - public void setPort(String port) {
53.143 - this.port = port;
53.144 - }
53.145 -
53.146 - /**
53.147 - * DOCUMENT ME!
53.148 - */
53.149 - public void printOut() {
53.150 - System.out.println("/////////////////////////////////"); // NOI18N
53.151 - System.out.println("// -- Server Connector -- //"); // NOI18N
53.152 - System.out.println("/////////////////////////////////"); // NOI18N
53.153 - System.out.println("// HostName is: " + hostName); // NOI18N
53.154 - System.out.println("// Port is: " + port); // NOI18N
53.155 - System.out.println("// UserName is: " + userName); // NOI18N
53.156 - System.out.println("// Password is: " + password); // NOI18N
53.157 - System.out.println("/////////////////////////////////"); // NOI18N
53.158 - }
53.159 -
53.160 - /**
53.161 - * DOCUMENT ME!
53.162 - *
53.163 - * @param args DOCUMENT ME!
53.164 - */
53.165 - public static void main(String[] args) {
53.166 - }
53.167 -}
54.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/management/model/JBIComponentDocument.java Wed Feb 21 08:53:38 2007 +0000
54.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
54.3 @@ -1,84 +0,0 @@
54.4 -/*
54.5 - * The contents of this file are subject to the terms of the Common Development
54.6 - * and Distribution License (the License). You may not use this file except in
54.7 - * compliance with the License.
54.8 - *
54.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
54.10 - * or http://www.netbeans.org/cddl.txt.
54.11 -
54.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
54.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
54.14 - * If applicable, add the following below the CDDL Header, with the fields
54.15 - * enclosed by brackets [] replaced by your own identifying information:
54.16 - * "Portions Copyrighted [year] [name of copyright owner]"
54.17 - *
54.18 - * The Original Software is NetBeans. The Initial Developer of the Original
54.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
54.20 - * Microsystems, Inc. All Rights Reserved.
54.21 - */
54.22 -
54.23 -package org.netbeans.modules.sun.manager.jbi.management.model;
54.24 -
54.25 -import java.io.Serializable;
54.26 -import java.util.ArrayList;
54.27 -import java.util.Iterator;
54.28 -import java.util.List;
54.29 -
54.30 -
54.31 -/**
54.32 - * Retrieves the list of JBI Components like JBI Service Engines,
54.33 - * JBI Binding Components, and JBI Shared Libraries installed
54.34 - * on the JBI Container
54.35 - *
54.36 - * @author Graj
54.37 - */
54.38 -public class JBIComponentDocument implements Serializable {
54.39 -
54.40 - public static final String COMP_INFO_LIST_NODE_NAME = "component-info-list"; // NOI18N
54.41 - public static final String COMP_INFO_NODE_NAME = "component-info"; // NOI18N
54.42 -// public static final String ID_NODE_NAME = "id";
54.43 - public static final String NAME_NODE_NAME = "name"; // NOI18N
54.44 - public static final String TYPE_NODE_NAME = "type"; // NOI18N
54.45 - public static final String STATUS_NODE_NAME = "state"; // NOI18N
54.46 - public static final String DESCRIPTION_NODE_NAME = "description"; // NOI18N
54.47 - public static final String VERSION_NODE_NAME = "version"; // NOI18N
54.48 - public static final String NAMESPACE_NODE_NAME = "xmlns"; // NOI18N
54.49 -
54.50 - List<JBIComponentStatus> jbiComponentList = new ArrayList<JBIComponentStatus>();
54.51 -
54.52 -
54.53 - /**
54.54 - *
54.55 - */
54.56 - public JBIComponentDocument() {
54.57 - super();
54.58 - // TODO Auto-generated constructor stub
54.59 - }
54.60 -
54.61 -
54.62 -
54.63 - /**
54.64 - * @return Returns the jbiComponentList.
54.65 - */
54.66 - public List<JBIComponentStatus> getJbiComponentList() {
54.67 - return this.jbiComponentList;
54.68 - }
54.69 - /**
54.70 - * @param jbiComponentList The jbiComponentList to set.
54.71 - */
54.72 - public void setJbiComponentList(List<JBIComponentStatus> jbiComponentList) {
54.73 - this.jbiComponentList = jbiComponentList;
54.74 - }
54.75 -
54.76 - public void dump() {
54.77 - Iterator<JBIComponentStatus> iterator = this.jbiComponentList.iterator();
54.78 - JBIComponentStatus component = null;
54.79 - while((iterator != null) && (iterator.hasNext() == true)) {
54.80 - component = iterator.next();
54.81 - component.dump();
54.82 - }
54.83 - }
54.84 -
54.85 - public static void main(String[] args) {
54.86 - }
54.87 -}
55.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/management/model/JBIComponentStatus.java Wed Feb 21 08:53:38 2007 +0000
55.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
55.3 @@ -1,168 +0,0 @@
55.4 -/*
55.5 - * The contents of this file are subject to the terms of the Common Development
55.6 - * and Distribution License (the License). You may not use this file except in
55.7 - * compliance with the License.
55.8 - *
55.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
55.10 - * or http://www.netbeans.org/cddl.txt.
55.11 -
55.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
55.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
55.14 - * If applicable, add the following below the CDDL Header, with the fields
55.15 - * enclosed by brackets [] replaced by your own identifying information:
55.16 - * "Portions Copyrighted [year] [name of copyright owner]"
55.17 - *
55.18 - * The Original Software is NetBeans. The Initial Developer of the Original
55.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
55.20 - * Microsystems, Inc. All Rights Reserved.
55.21 - */
55.22 -
55.23 -package org.netbeans.modules.sun.manager.jbi.management.model;
55.24 -import java.io.Serializable;
55.25 -
55.26 -/**
55.27 - * Retrieves the status of JBI components installed on the
55.28 - * JBI Container on the Server
55.29 - *
55.30 - * @author Graj
55.31 - */
55.32 -public class JBIComponentStatus implements Serializable {
55.33 -
55.34 - /** Deployment Type */
55.35 - public static final String DEPLOYMENT_TYPE = "service-assembly"; // NOI18N
55.36 -// public static final String DEPLOYMENT_TYPE = "Deployment";
55.37 - /** unknown type */
55.38 - public static final String UNKNOWN_TYPE = "unknown"; // NOI18N
55.39 - /** Binding type */
55.40 - public static final String BINDING_TYPE = "binding-component"; // NOI18N
55.41 -// public static final String BINDING_TYPE = "Binding";
55.42 - /** Engine Type */
55.43 - public static final String ENGINE_TYPE = "service-engine"; // NOI18N
55.44 -// public static final String ENGINE_TYPE = "Engine";
55.45 - /** Namespace Type */
55.46 - public static final String NAMESPACE_TYPE = "shared-library"; // NOI18N
55.47 -// public static final String NAMESPACE_TYPE = "SharedLibrary";
55.48 -
55.49 - /** state Loaded state. */
55.50 - public static final String UNKNOWN_STATE = "Unknown"; // NOI18N
55.51 - /** state loaded */
55.52 - public static final String LOADED_STATE = "Loaded"; // NOI18N
55.53 - /** Installed state */
55.54 -// public static final String INSTALLED_STATE = "Installed";
55.55 - public static final String INSTALLED_STATE = "Shutdown"; // NOI18N
55.56 - /** Stopped state */
55.57 - public static final String STOPPED_STATE = "Stopped"; // NOI18N
55.58 - /** Started state */
55.59 - public static final String STARTED_STATE = "Started"; // NOI18N
55.60 -
55.61 - String componentId;
55.62 - String state;
55.63 - String name;
55.64 - String description;
55.65 - String type;
55.66 -
55.67 - /**
55.68 - *
55.69 - */
55.70 - public JBIComponentStatus() {
55.71 - super();
55.72 - }
55.73 -
55.74 -
55.75 -
55.76 - /**
55.77 - * @param componentId
55.78 - * @param state
55.79 - * @param name
55.80 - * @param description
55.81 - * @param type
55.82 - */
55.83 - public JBIComponentStatus(String componentId, String name, String description, String type, String state) {
55.84 - super();
55.85 - this.componentId = componentId;
55.86 - this.name = name;
55.87 - this.description = description;
55.88 - this.type = type;
55.89 - this.state = state;
55.90 - }
55.91 - /**
55.92 - * @return Returns the componentId.
55.93 - */
55.94 - public String getComponentId() {
55.95 - return this.componentId;
55.96 - }
55.97 - /**
55.98 - * @param componentId The componentId to set.
55.99 - */
55.100 - public void setComponentId(String componentId) {
55.101 - this.componentId = componentId;
55.102 - }
55.103 - /**
55.104 - * @return Returns the description.
55.105 - */
55.106 - public String getDescription() {
55.107 - return this.description;
55.108 - }
55.109 - /**
55.110 - * @param description The description to set.
55.111 - */
55.112 - public void setDescription(String description) {
55.113 - if((description != null) && (description.length() > 0)) {
55.114 - this.description = description;
55.115 - }
55.116 - }
55.117 - /**
55.118 - * @return Returns the name.
55.119 - */
55.120 - public String getName() {
55.121 - return this.name;
55.122 - }
55.123 - /**
55.124 - * @param name The name to set.
55.125 - */
55.126 - public void setName(String name) {
55.127 - this.name = name;
55.128 - }
55.129 - /**
55.130 - * @return Returns the state.
55.131 - */
55.132 - public String getState() {
55.133 - return this.state;
55.134 - }
55.135 - /**
55.136 - * @param state The state to set.
55.137 - */
55.138 - public void setState(String status) {
55.139 - this.state = status;
55.140 - }
55.141 -
55.142 -
55.143 - /**
55.144 - * @return Returns the type.
55.145 - */
55.146 - public String getType() {
55.147 - return this.type;
55.148 - }
55.149 - /**
55.150 - * @param type The type to set.
55.151 - */
55.152 - public void setType(String type) {
55.153 - this.type = type;
55.154 - }
55.155 -
55.156 - public void dump() {
55.157 - System.out.println("/////////////////////////////////////////////////"); // NOI18N
55.158 - System.out.println("// -- JBI Component -- //"); // NOI18N
55.159 - System.out.println("/////////////////////////////////////////////////"); // NOI18N
55.160 - //System.out.println("// componentId is: "+ this.componentId);
55.161 - System.out.println("// name is: "+ this.name); // NOI18N
55.162 - System.out.println("// description is: "+ this.description); // NOI18N
55.163 - System.out.println("// type is: "+ this.type); // NOI18N
55.164 - System.out.println("// state is: "+ this.state); // NOI18N
55.165 - System.out.println("/////////////////////////////////////////////////"); // NOI18N
55.166 - }
55.167 -
55.168 - public static void main(String[] args) {
55.169 - }
55.170 -}
55.171 -
56.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/nodes/AppserverJBIMgmtContainerNode.java Wed Feb 21 08:53:38 2007 +0000
56.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
56.3 @@ -1,126 +0,0 @@
56.4 -/*
56.5 - * The contents of this file are subject to the terms of the Common Development
56.6 - * and Distribution License (the License). You may not use this file except in
56.7 - * compliance with the License.
56.8 - *
56.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
56.10 - * or http://www.netbeans.org/cddl.txt.
56.11 -
56.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
56.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
56.14 - * If applicable, add the following below the CDDL Header, with the fields
56.15 - * enclosed by brackets [] replaced by your own identifying information:
56.16 - * "Portions Copyrighted [year] [name of copyright owner]"
56.17 - *
56.18 - * The Original Software is NetBeans. The Initial Developer of the Original
56.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
56.20 - * Microsystems, Inc. All Rights Reserved.
56.21 - */
56.22 -
56.23 -package org.netbeans.modules.sun.manager.jbi.nodes;
56.24 -
56.25 -import java.util.Collections;
56.26 -import java.util.logging.Level;
56.27 -
56.28 -import javax.swing.Action;
56.29 -
56.30 -import org.netbeans.modules.j2ee.sun.bridge.apis.RefreshAction;
56.31 -import org.netbeans.modules.j2ee.sun.bridge.apis.RefreshCookie;
56.32 -import org.netbeans.modules.sun.manager.jbi.util.AppserverJBIMgmtController;
56.33 -import org.netbeans.modules.sun.manager.jbi.util.JBIContainerChildFactory;
56.34 -import org.openide.nodes.Children;
56.35 -import org.openide.nodes.Node;
56.36 -import org.openide.util.actions.SystemAction;
56.37 -
56.38 -
56.39 -/**
56.40 - * Abstract super class for all container node in JBI Manager.
56.41 - *
56.42 - * @author jqian
56.43 - */
56.44 -public abstract class AppserverJBIMgmtContainerNode extends AppserverJBIMgmtNode
56.45 - implements RefreshCookie {
56.46 -
56.47 - /**
56.48 - *
56.49 - */
56.50 - public AppserverJBIMgmtContainerNode(
56.51 - final AppserverJBIMgmtController controller, final String type) {
56.52 - super(controller, getChildren(controller, type), type);
56.53 - }
56.54 -
56.55 -
56.56 - /**
56.57 - * Return the actions associated with the menu drop down seen when
56.58 - * a user right-clicks on an Applications node in the plugin.
56.59 - *
56.60 - * @param boolean true/false
56.61 - * @return An array of Action objects.
56.62 - */
56.63 - public Action[] getActions(boolean flag) {
56.64 - return new SystemAction[] {
56.65 - SystemAction.get(RefreshAction.class)
56.66 - };
56.67 - }
56.68 -
56.69 - /**
56.70 - *
56.71 - */
56.72 - static Children getChildren(final AppserverJBIMgmtController controller,
56.73 - final String type){
56.74 - return new JBIContainerChildren(controller, type);
56.75 - }
56.76 -
56.77 -
56.78 - /**
56.79 - *
56.80 - *
56.81 - */
56.82 - public void refresh(){
56.83 - setChildren(new JBIContainerChildren(getAppserverJBIMgmtController(), getNodeType()));
56.84 - JBIContainerChildren ch = (JBIContainerChildren)getChildren();
56.85 - ch.updateKeys();
56.86 - }
56.87 -
56.88 -
56.89 - /**
56.90 - *
56.91 - *
56.92 - */
56.93 - public static class JBIContainerChildren extends Children.Keys {
56.94 - String type;
56.95 - JBIContainerChildFactory cfactory;
56.96 - public JBIContainerChildren(AppserverJBIMgmtController controller, String type) {
56.97 - if(controller == null) {
56.98 - getLogger().log(Level.FINE, "Controller for child factory " + "is null"); // NOI18N
56.99 - getLogger().log(Level.FINE, "Type: " + type); // NOI18N
56.100 - }
56.101 - this.type = type;
56.102 - this.cfactory = new JBIContainerChildFactory(controller);
56.103 - }
56.104 - protected void addNotify() {
56.105 - try {
56.106 - setKeys(this.cfactory.getChildrenObject(getNode(), this.type));
56.107 - } catch (RuntimeException e) {
56.108 - getLogger().log(Level.FINE, e.getMessage(), e);
56.109 - }
56.110 - }
56.111 - protected void removeNotify() {
56.112 - setKeys(Collections.EMPTY_SET);
56.113 - }
56.114 - public void updateKeys() {
56.115 - refresh();
56.116 - }
56.117 - protected org.openide.nodes.Node[] createNodes(Object obj) {
56.118 - try {
56.119 - return new Node[] { (Node)obj };
56.120 - } catch(RuntimeException rex) {
56.121 - getLogger().log(Level.FINE, rex.getMessage(), rex);
56.122 - return new Node[] {};
56.123 - } catch(Exception e) {
56.124 - getLogger().log(Level.FINE, e.getMessage(), e);
56.125 - return new Node[] {};
56.126 - }
56.127 - }
56.128 - }
56.129 -}
57.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/nodes/AppserverJBIMgmtLeafNode.java Wed Feb 21 08:53:38 2007 +0000
57.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
57.3 @@ -1,66 +0,0 @@
57.4 -/*
57.5 - * The contents of this file are subject to the terms of the Common Development
57.6 - * and Distribution License (the License). You may not use this file except in
57.7 - * compliance with the License.
57.8 - *
57.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
57.10 - * or http://www.netbeans.org/cddl.txt.
57.11 -
57.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
57.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
57.14 - * If applicable, add the following below the CDDL Header, with the fields
57.15 - * enclosed by brackets [] replaced by your own identifying information:
57.16 - * "Portions Copyrighted [year] [name of copyright owner]"
57.17 - *
57.18 - * The Original Software is NetBeans. The Initial Developer of the Original
57.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
57.20 - * Microsystems, Inc. All Rights Reserved.
57.21 - */
57.22 -
57.23 -package org.netbeans.modules.sun.manager.jbi.nodes;
57.24 -
57.25 -import javax.swing.Action;
57.26 -
57.27 -import org.netbeans.modules.sun.manager.jbi.util.AppserverJBIMgmtController;
57.28 -import org.openide.actions.PropertiesAction;
57.29 -import org.openide.nodes.Children;
57.30 -import org.openide.util.actions.SystemAction;
57.31 -
57.32 -/**
57.33 - *
57.34 - * @author jqian
57.35 - */
57.36 -public abstract class AppserverJBIMgmtLeafNode extends AppserverJBIMgmtNode {
57.37 -
57.38 - /**
57.39 - * Abstract constructor for an AppserverLeafNode called by subclass.
57.40 - *
57.41 - * @param nodeType The type of leaf node to construct (e.g. JVM, etc.)
57.42 - */
57.43 - public AppserverJBIMgmtLeafNode(final AppserverJBIMgmtController controller,
57.44 - final String nodeType) {
57.45 - super(controller, Children.LEAF, nodeType);
57.46 - }
57.47 -
57.48 -
57.49 - /**
57.50 - * Return the actions associated with the menu drop down seen when
57.51 - * a user right-clicks on a node in the plugin.
57.52 - *
57.53 - * @param boolean true/false
57.54 - * @return An array of Action objects.
57.55 - */
57.56 - public Action[] getActions(boolean flag) {
57.57 - return new SystemAction[] {
57.58 - SystemAction.get(PropertiesAction.class)
57.59 - };
57.60 - }
57.61 -
57.62 - /**
57.63 - * Return the default action for the node
57.64 - * a user double-clicks on a node in the plugin.
57.65 - */
57.66 - public Action getPreferredAction(){
57.67 - return SystemAction.get(PropertiesAction.class);
57.68 - }
57.69 -}
58.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/nodes/AppserverJBIMgmtNode.java Wed Feb 21 08:53:38 2007 +0000
58.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
58.3 @@ -1,159 +0,0 @@
58.4 -/*
58.5 - * The contents of this file are subject to the terms of the Common Development
58.6 - * and Distribution License (the License). You may not use this file except in
58.7 - * compliance with the License.
58.8 - *
58.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
58.10 - * or http://www.netbeans.org/cddl.txt.
58.11 -
58.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
58.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
58.14 - * If applicable, add the following below the CDDL Header, with the fields
58.15 - * enclosed by brackets [] replaced by your own identifying information:
58.16 - * "Portions Copyrighted [year] [name of copyright owner]"
58.17 - *
58.18 - * The Original Software is NetBeans. The Initial Developer of the Original
58.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
58.20 - * Microsystems, Inc. All Rights Reserved.
58.21 - */
58.22 -
58.23 -package org.netbeans.modules.sun.manager.jbi.nodes;
58.24 -
58.25 -import java.util.Iterator;
58.26 -import java.util.Map;
58.27 -import java.util.logging.Level;
58.28 -
58.29 -import javax.management.Attribute;
58.30 -import javax.management.MBeanAttributeInfo;
58.31 -
58.32 -import org.netbeans.modules.j2ee.sun.bridge.apis.AppserverMgmtNode;
58.33 -import org.netbeans.modules.sun.manager.jbi.util.AppserverJBIMgmtController;
58.34 -import org.netbeans.modules.sun.manager.jbi.util.JBIPropertySupportFactory;
58.35 -import org.openide.nodes.Children;
58.36 -import org.openide.nodes.PropertySupport;
58.37 -import org.openide.nodes.Sheet;
58.38 -import org.openide.util.NbBundle;
58.39 -
58.40 -/**
58.41 - * Abstract super class for all nodes in JBI manager.
58.42 - *
58.43 - * @author jqian
58.44 - */
58.45 -public abstract class AppserverJBIMgmtNode extends AppserverMgmtNode {
58.46 -
58.47 - private AppserverJBIMgmtController appsrvrJBIMgmtController;
58.48 -
58.49 - private JBIPropertySupportFactory propSupportFactory =
58.50 - JBIPropertySupportFactory.getInstance();
58.51 -
58.52 -
58.53 - /**
58.54 - *
58.55 - *
58.56 - */
58.57 - public AppserverJBIMgmtNode(final AppserverJBIMgmtController controller,
58.58 - final Children children, final String nodeType) {
58.59 - super(children, nodeType);
58.60 - appsrvrJBIMgmtController = controller;
58.61 - }
58.62 -
58.63 -
58.64 - /**
58.65 - *
58.66 - *
58.67 - */
58.68 - public AppserverJBIMgmtController getAppserverJBIMgmtController() {
58.69 - try {
58.70 - if(appsrvrJBIMgmtController == null) {
58.71 - getLogger().log(Level.FINE, "AppserverJBIMgmtController is " + "null for [" + getNodeType() + "]"); // NOI18N
58.72 - }
58.73 - } catch(Exception e) {
58.74 - getLogger().log(Level.FINE, e.getMessage(), e);
58.75 - }
58.76 - return appsrvrJBIMgmtController;
58.77 - }
58.78 -
58.79 - /**
58.80 - *
58.81 - */
58.82 - protected String getNodeDisplayName() {
58.83 - return NbBundle.getMessage(AppserverJBIMgmtNode.class, getNodeType());
58.84 - }
58.85 -
58.86 -
58.87 - /**
58.88 - *
58.89 - */
58.90 - protected String getNodeShortDescription() {
58.91 - return NbBundle.getMessage(AppserverJBIMgmtNode.class, getNodeType() + "_SHORT_DESC"); // NOI18N
58.92 - }
58.93 -
58.94 - /**
58.95 - * Creates a properties Sheet for viewing when a user chooses the option
58.96 - * from the right-click menu.
58.97 - *
58.98 - * @returns the Sheet to display when Properties is chosen by the user.
58.99 - */
58.100 - protected Sheet createSheet() {
58.101 - Sheet sheet = Sheet.createDefault();
58.102 -
58.103 - ClassLoader origClassLoader=Thread.currentThread().getContextClassLoader();
58.104 -
58.105 - try {
58.106 - Thread.currentThread().setContextClassLoader(
58.107 - this.getClass().getClassLoader());
58.108 -
58.109 - Sheet.Set props = sheet.get(Sheet.PROPERTIES);
58.110 - props.put(createPropertySupportArray(getSheetProperties()));
58.111 - return sheet;
58.112 - } catch(RuntimeException rex) {
58.113 - return sheet;
58.114 - } finally {
58.115 - Thread.currentThread().setContextClassLoader(origClassLoader);
58.116 - }
58.117 - }
58.118 -
58.119 -
58.120 - /**
58.121 - * Creates a PropertySupport array from a map of component properties.
58.122 - *
58.123 - * @param properties The properties of the component.
58.124 - * @return An array of PropertySupport objects.
58.125 - */
58.126 - private PropertySupport[] createPropertySupportArray(final Map attrMap) {
58.127 - PropertySupport[] supports = new PropertySupport[attrMap.size()];
58.128 - int i = 0;
58.129 -
58.130 - for(Iterator itr = attrMap.keySet().iterator(); itr.hasNext(); ) {
58.131 - Attribute attr = (Attribute) itr.next();
58.132 - MBeanAttributeInfo info = (MBeanAttributeInfo) attrMap.get(attr);
58.133 - supports[i] =
58.134 - propSupportFactory.getPropertySupport(this, attr, info);
58.135 - i++;
58.136 - }
58.137 - return supports;
58.138 - }
58.139 -
58.140 -
58.141 - /**
58.142 - * Returns all the properties of the leaf node to disply in the properties
58.143 - * window (or Sheet). This must be overriden in order for the Sheet to be
58.144 - * processed.
58.145 - *
58.146 - * @returns a java.util.Map of all properties to be accessed from the Sheet.
58.147 - */
58.148 - protected abstract Map getSheetProperties();
58.149 -
58.150 - /**
58.151 - * Sets the property as an attribute to the underlying AMX mbeans. It
58.152 - * usually will delegate to the controller object which is responsible for
58.153 - * finding the correct AMX mbean objectname in order to execute a
58.154 - * JMX setAttribute.
58.155 - *
58.156 - * @param attrName The name of the property to be set.
58.157 - * @param value The value retrieved from the property sheet to be set in the
58.158 - * backend.
58.159 - * @returns the updated Attribute accessed from the Sheet.
58.160 - */
58.161 - public abstract Attribute setSheetProperty(String attrName, Object value);
58.162 -}
59.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/nodes/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
59.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
59.3 @@ -1,74 +0,0 @@
59.4 -#
59.5 -# The contents of this file are subject to the terms of the Common Development
59.6 -# and Distribution License (the License). You may not use this file except in
59.7 -# compliance with the License.
59.8 -#
59.9 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
59.10 -# or http://www.netbeans.org/cddl.txt.
59.11 -
59.12 -# When distributing Covered Code, include this CDDL Header Notice in each file
59.13 -# and include the License file at http://www.netbeans.org/cddl.txt.
59.14 -# If applicable, add the following below the CDDL Header, with the fields
59.15 -# enclosed by brackets [] replaced by your own identifying information:
59.16 -# "Portions Copyrighted [year] [name of copyright owner]"
59.17 -#
59.18 -# The Original Software is NetBeans. The Initial Developer of the Original
59.19 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
59.20 -# Microsystems, Inc. All Rights Reserved.
59.21 -#
59.22 -# Node Names
59.23 -JBI=JBI
59.24 -SERVICE_ENGINES=Service Engines
59.25 -SERVICE_ENGINE=Service Engine
59.26 -BINDING_COMPONENTS=Binding Components
59.27 -BINDING_COMPONENT=Binding Component
59.28 -SHARED_LIBRARIES=Shared Libraries
59.29 -SHARED_LIBRARY=Shared Library
59.30 -SERVICE_ASSEMBLIES=Service Assemblies
59.31 -SERVICE_ASSEMBLY=Service Assembly
59.32 -SERVICE_UNIT=Service Unit
59.33 -
59.34 -
59.35 -JBI_SHORT_DESC=JBI meta-container
59.36 -SERVICE_ENGINES_SHORT_DESC=Service Engines are containers that provide services for Business Logic, Processing, transformation, and routing services.
59.37 -SERVICE_ENGINE_SHORT_DESC=Service Engine (short desc. here)
59.38 -BINDING_COMPONENTS_SHORT_DESC=Binding Components provide a proxy for services in the JBI environment to access remote services requiring a particular protocol. They can also facilitate a remote service consumer to access services in the JBI environment.
59.39 -BINDING_COMPONENT_SHORT_DESC=Binding Component (short desc. here)
59.40 -SHARED_LIBRARIES_SHORT_DESC=Shared Libraries contain common code shared by multiple JBI container components deployed on the JBI meta-container.
59.41 -SHARED_LIBRARY_SHORT_DESC=Shared Library (short desc. here)
59.42 -SERVICE_ASSEMBLIES_SHORT_DESC=Service Assemblies are deployment artifacts. Each Service Assemby can package one or more Service Units and defines the target components (SEs or BCs) to deploy the Service Units to.
59.43 -SERVICE_ASSEMBLY_SHORT_DESC=Service Assembly (short desc. here)
59.44 -SERVICE_UNIT_SHORT_DESC=Service Units can be deployed to installed JBI component containers like Binding Components and Service Engines.
59.45 -
59.46 -#progress
59.47 -LBL_Installing_Service_Engine=Installing Service Engine(s)...
59.48 -LBL_Starting_Service_Engine=Starting Service Engine {0}...
59.49 -LBL_Stopping_Service_Engine=Stopping Service Engine {0}...
59.50 -LBL_Shutting_Down_Service_Engine=Shutting down Service Engine {0}...
59.51 -LBL_Uninstalling_Service_Engine=Uninstalling Service Engine {0}...
59.52 -
59.53 -LBL_Installing_Binding_Component=Installing Binding Component(s)...
59.54 -LBL_Starting_Binding_Component=Starting Binding Component {0}...
59.55 -LBL_Stopping_Binding_Component=Stopping Binding Component {0}...
59.56 -LBL_Shutting_Down_Binding_Component=Shutting down Binding Component {0}...
59.57 -LBL_Uninstalling_Binding_Component=Uninstalling Binding Component {0}...
59.58 -
59.59 -LBL_Installing_Shared_Library=Installing Shared Libraries...
59.60 -LBL_Uninstalling_Shared_Library=Uninstalling Shared Library {0}...
59.61 -
59.62 -LBL_Deploying_Service_Assembly=Deploying Service Assemblies...
59.63 -LBL_Starting_Service_Assembly=Starting Service Assembly {0}...
59.64 -LBL_Stopping_Service_Assembly=Stopping Service Assembly {0}...
59.65 -LBL_Shutting_Down_Service_Assembly=Shutting down Service Assembly {0}...
59.66 -LBL_Undeploying_Service_Assembly=Undeploying Service Assembly {0}...
59.67 -
59.68 -#misc
59.69 -LBL_Deploy_Service_Assembly_Chooser_Name=Choose Service Assembly
59.70 -LBL_Deploy_Service_Assembly_Button=Deploy
59.71 -Deploy_Service_Assembly_Button_Mnemonic=d
59.72 -
59.73 -LBL_Install_Service_Engine_Chooser_Name=Choose Service Engine
59.74 -LBL_Install_Binding_Component_Chooser_Name=Choose Binding Component
59.75 -LBL_Install_Shared_Library_Chooser_Name=Choose Shared Library
59.76 -LBL_Install_JBI_Component_Button=Install
59.77 -Install_JBI_Component_Button_Mnemonic=i
60.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/nodes/Deployable.java Wed Feb 21 08:53:38 2007 +0000
60.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
60.3 @@ -1,37 +0,0 @@
60.4 -/*
60.5 - * The contents of this file are subject to the terms of the Common Development
60.6 - * and Distribution License (the License). You may not use this file except in
60.7 - * compliance with the License.
60.8 - *
60.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
60.10 - * or http://www.netbeans.org/cddl.txt.
60.11 -
60.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
60.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
60.14 - * If applicable, add the following below the CDDL Header, with the fields
60.15 - * enclosed by brackets [] replaced by your own identifying information:
60.16 - * "Portions Copyrighted [year] [name of copyright owner]"
60.17 - *
60.18 - * The Original Software is NetBeans. The Initial Developer of the Original
60.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
60.20 - * Microsystems, Inc. All Rights Reserved.
60.21 - */
60.22 -
60.23 -package org.netbeans.modules.sun.manager.jbi.nodes;
60.24 -
60.25 -
60.26 -/**
60.27 - *
60.28 - * @author jqian
60.29 - */
60.30 -public interface Deployable {
60.31 -
60.32 -
60.33 - /**
60.34 - *
60.35 - *
60.36 - */
60.37 - public void deploy();
60.38 -
60.39 -
60.40 -}
61.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/nodes/IconConstants.java Wed Feb 21 08:53:38 2007 +0000
61.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
61.3 @@ -1,49 +0,0 @@
61.4 -/*
61.5 - * The contents of this file are subject to the terms of the Common Development
61.6 - * and Distribution License (the License). You may not use this file except in
61.7 - * compliance with the License.
61.8 - *
61.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
61.10 - * or http://www.netbeans.org/cddl.txt.
61.11 -
61.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
61.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
61.14 - * If applicable, add the following below the CDDL Header, with the fields
61.15 - * enclosed by brackets [] replaced by your own identifying information:
61.16 - * "Portions Copyrighted [year] [name of copyright owner]"
61.17 - *
61.18 - * The Original Software is NetBeans. The Initial Developer of the Original
61.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
61.20 - * Microsystems, Inc. All Rights Reserved.
61.21 - */
61.22 -
61.23 -package org.netbeans.modules.sun.manager.jbi.nodes;
61.24 -
61.25 -/**
61.26 - * Defines all the icons used in the JBI Manager.
61.27 - *
61.28 - * @author jqian
61.29 - */
61.30 -public interface IconConstants {
61.31 -
61.32 - public static final String JBI_ICON = "resources/JBI.png"; // NOI18N
61.33 -
61.34 - public static final String SERVICE_ENGINES_BADGE_ICON = "resources/ServiceEngineBadge.png"; // NOI18N
61.35 - public static final String BINDING_COMPONENTS_BADGE_ICON = "resources/BindingComponentBadge.png"; // NOI18N
61.36 - public static final String SHARED_LIBRARIES_BADGE_ICON = "resources/SharedLibraryBadge.png"; // NOI18N
61.37 - public static final String SERVICE_ASSEMBLIES_BADGE_ICON = "resources/ServiceAssemblyBadge.png"; // NOI18N
61.38 -
61.39 - public static final String SERVICE_ENGINE_ICON = "resources/ServiceEngine.png"; // NOI18N
61.40 - public static final String BINDING_COMPONENT_ICON = "resources/BindingComponent.png"; // NOI18N
61.41 - public static final String SHARED_LIBRARY_ICON = "resources/SharedLibrary.png"; // NOI18N
61.42 - public static final String SERVICE_ASSEMBLY_ICON = "resources/ServiceAssembly.png"; // NOI18N
61.43 - public static final String SERVICE_UNIT_ICON = "resources/ServiceUnit.png"; // NOI18N
61.44 -
61.45 - public static final String FOLDER_ICON = "resources/folder.png"; // NOI18N
61.46 -
61.47 - public static final String INSTALLED_ICON = "resources/not_deployed.png"; // NOI18N
61.48 - public static final String STOPPED_ICON = "resources/down.png"; // NOI18N
61.49 - public static final String UNKNOWN_ICON = "resources/unknown.png"; // NOI18N
61.50 -
61.51 - public static final String BUSY_ICON = "resources/waiting.png"; // NOI18N
61.52 -}
62.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/nodes/Installable.java Wed Feb 21 08:53:38 2007 +0000
62.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
62.3 @@ -1,37 +0,0 @@
62.4 -/*
62.5 - * The contents of this file are subject to the terms of the Common Development
62.6 - * and Distribution License (the License). You may not use this file except in
62.7 - * compliance with the License.
62.8 - *
62.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
62.10 - * or http://www.netbeans.org/cddl.txt.
62.11 -
62.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
62.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
62.14 - * If applicable, add the following below the CDDL Header, with the fields
62.15 - * enclosed by brackets [] replaced by your own identifying information:
62.16 - * "Portions Copyrighted [year] [name of copyright owner]"
62.17 - *
62.18 - * The Original Software is NetBeans. The Initial Developer of the Original
62.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
62.20 - * Microsystems, Inc. All Rights Reserved.
62.21 - */
62.22 -
62.23 -package org.netbeans.modules.sun.manager.jbi.nodes;
62.24 -
62.25 -
62.26 -/**
62.27 - *
62.28 - * @author jqian
62.29 - */
62.30 -public interface Installable {
62.31 -
62.32 -
62.33 - /**
62.34 - *
62.35 - *
62.36 - */
62.37 - public void install();
62.38 -
62.39 -
62.40 -}
63.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/nodes/JBIComponentContainerNode.java Wed Feb 21 08:53:38 2007 +0000
63.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
63.3 @@ -1,324 +0,0 @@
63.4 -/*
63.5 - * The contents of this file are subject to the terms of the Common Development
63.6 - * and Distribution License (the License). You may not use this file except in
63.7 - * compliance with the License.
63.8 - *
63.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
63.10 - * or http://www.netbeans.org/cddl.txt.
63.11 -
63.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
63.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
63.14 - * If applicable, add the following below the CDDL Header, with the fields
63.15 - * enclosed by brackets [] replaced by your own identifying information:
63.16 - * "Portions Copyrighted [year] [name of copyright owner]"
63.17 - *
63.18 - * The Original Software is NetBeans. The Initial Developer of the Original
63.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
63.20 - * Microsystems, Inc. All Rights Reserved.
63.21 - */
63.22 -
63.23 -package org.netbeans.modules.sun.manager.jbi.nodes;
63.24 -
63.25 -import java.awt.Image;
63.26 -import java.io.File;
63.27 -import java.util.Map;
63.28 -import java.util.ResourceBundle;
63.29 -
63.30 -import javax.management.Attribute;
63.31 -import javax.swing.Action;
63.32 -import javax.swing.JFileChooser;
63.33 -import javax.swing.SwingUtilities;
63.34 -
63.35 -import org.netbeans.modules.j2ee.sun.bridge.apis.RefreshAction;
63.36 -import org.netbeans.modules.sun.manager.jbi.GenericConstants;
63.37 -import org.netbeans.modules.sun.manager.jbi.management.JBIMBeanTaskResultHandler;
63.38 -import org.netbeans.modules.sun.manager.jbi.util.ProgressUI;
63.39 -import org.netbeans.modules.sun.manager.jbi.actions.InstallAction;
63.40 -import org.netbeans.modules.sun.manager.jbi.management.AdministrationService;
63.41 -import org.netbeans.modules.sun.manager.jbi.util.AppserverJBIMgmtController;
63.42 -import org.netbeans.modules.sun.manager.jbi.util.JarFileFilter;
63.43 -import org.netbeans.modules.sun.manager.jbi.util.NodeTypes;
63.44 -import org.netbeans.modules.sun.manager.jbi.util.Utils;
63.45 -import org.openide.util.NbBundle;
63.46 -import org.openide.util.actions.SystemAction;
63.47 -import org.openide.util.HelpCtx;
63.48 -
63.49 -/**
63.50 - * Container node for all JBI Components of the same type.
63.51 - *
63.52 - * @author jqian
63.53 - */
63.54 -public abstract class JBIComponentContainerNode extends AppserverJBIMgmtContainerNode
63.55 - implements Installable {
63.56 -
63.57 - private static String lastInstallDir = null;
63.58 -
63.59 - private boolean busy;
63.60 -
63.61 - public JBIComponentContainerNode(final AppserverJBIMgmtController controller,
63.62 - final String type, final String name) {
63.63 - super(controller, type);
63.64 - setDisplayName(name);
63.65 - }
63.66 -
63.67 - /**
63.68 - * Return the actions associated with the menu drop down seen when
63.69 - * a user right-clicks on a node in the plugin.
63.70 - *
63.71 - * @param boolean true/false
63.72 - * @return An array of Action objects.
63.73 - */
63.74 - public Action[] getActions(boolean flag) {
63.75 - return new SystemAction[] {
63.76 - SystemAction.get(getInstallActionClass()),
63.77 - SystemAction.get(RefreshAction.class),
63.78 - };
63.79 - }
63.80 -
63.81 - /**
63.82 - *
63.83 - */
63.84 - public Image getIcon(int type) {
63.85 - String iconName = IconConstants.FOLDER_ICON;
63.86 - String badgeIconName = getBadgeIconName();
63.87 - String externalBadgeIconName = busy ? IconConstants.BUSY_ICON : null;
63.88 - return Utils.getBadgedIcon(getClass(), iconName, badgeIconName, externalBadgeIconName);
63.89 - }
63.90 -
63.91 - /**
63.92 - *
63.93 - */
63.94 - public Image getOpenedIcon(int type) {
63.95 - return getIcon(type);
63.96 - }
63.97 -
63.98 - /**
63.99 - *
63.100 - * @param busy
63.101 - */
63.102 - private void setBusy(boolean busy) {
63.103 - this.busy = busy;
63.104 - fireIconChange();
63.105 - }
63.106 -
63.107 - protected Map getSheetProperties() {
63.108 - return null;
63.109 - }
63.110 -
63.111 - public Attribute setSheetProperty(String attrName, Object value) {
63.112 - return null;
63.113 - }
63.114 -
63.115 - /**
63.116 - * Installs new JBI Component(s).
63.117 - */
63.118 - public void install() {
63.119 -
63.120 - AdministrationService adminService =
63.121 - getAppserverJBIMgmtController().getJBIAdministrationService();
63.122 -
63.123 - if (adminService != null) {
63.124 - JFileChooser chooser = getJFileChooser();
63.125 - int returnValue = chooser.showDialog(null,
63.126 - NbBundle.getMessage(JBIComponentContainerNode.class, "LBL_Install_JBI_Component_Button")); //NOI18N
63.127 -
63.128 - if (returnValue == JFileChooser.APPROVE_OPTION){
63.129 - File[] selectedFiles = chooser.getSelectedFiles();
63.130 -
63.131 - String progressLabel = getInstallProgressMessageLabel();
63.132 - String message = NbBundle.getMessage(JBIComponentContainerNode.class, progressLabel);
63.133 - final ProgressUI progressUI = new ProgressUI(message, false);
63.134 -
63.135 - SwingUtilities.invokeLater(new Runnable() {
63.136 - public void run() {
63.137 - setBusy(true);
63.138 - progressUI.start();
63.139 - }
63.140 - });
63.141 -
63.142 - for (int i = 0; i < selectedFiles.length; i++) {
63.143 - final String jarFilePath = selectedFiles[i].getAbsolutePath();
63.144 - final String result = installJBIComponent(jarFilePath);
63.145 -
63.146 - SwingUtilities.invokeLater(new Runnable() {
63.147 - public void run() {
63.148 - JBIMBeanTaskResultHandler.showRemoteInvokationResult(
63.149 - GenericConstants.INSTALL_COMPONENT_OPERATION_NAME,
63.150 - jarFilePath, result);
63.151 - }
63.152 - });
63.153 -
63.154 - if (i == 0) {
63.155 - lastInstallDir = selectedFiles[0].getParent();
63.156 - }
63.157 - }
63.158 -
63.159 - SwingUtilities.invokeLater(new Runnable() {
63.160 - public void run() {
63.161 - progressUI.finish();
63.162 - setBusy(false);
63.163 - }
63.164 - });
63.165 - }
63.166 - }
63.167 - }
63.168 -
63.169 - protected AdministrationService getJBIAdministrationService() {
63.170 - return getAppserverJBIMgmtController().getJBIAdministrationService();
63.171 - }
63.172 -
63.173 - private JFileChooser getJFileChooser(){
63.174 - JFileChooser chooser = new JFileChooser();
63.175 -
63.176 - ResourceBundle bundle = NbBundle.getBundle(JBIComponentContainerNode.class);
63.177 -
63.178 - String titleLabel = getFileChooserTitleLabel();
63.179 - chooser.setDialogTitle(bundle.getString(titleLabel));
63.180 - chooser.setDialogType(JFileChooser.CUSTOM_DIALOG);
63.181 -
63.182 - chooser.setApproveButtonMnemonic(
63.183 - bundle.getString("Install_JBI_Component_Button_Mnemonic").charAt(0)); //NOI18N
63.184 - chooser.setMultiSelectionEnabled(true);
63.185 - chooser.addChoosableFileFilter(JarFileFilter.getInstance());
63.186 - chooser.setAcceptAllFileFilterUsed(false);
63.187 - chooser.setApproveButtonToolTipText(
63.188 - bundle.getString("LBL_Install_JBI_Component_Button")); //NOI18N
63.189 -
63.190 - chooser.getAccessibleContext().setAccessibleName(
63.191 - bundle.getString(titleLabel));
63.192 - chooser.getAccessibleContext().setAccessibleDescription(
63.193 - bundle.getString(titleLabel));
63.194 -
63.195 - if (lastInstallDir != null) {
63.196 - chooser.setCurrentDirectory(new File(lastInstallDir));
63.197 - }
63.198 -
63.199 - return chooser;
63.200 - }
63.201 -
63.202 - protected abstract Class getInstallActionClass();
63.203 -
63.204 - protected abstract String installJBIComponent(String jarFilePath);
63.205 -
63.206 - protected abstract String getFileChooserTitleLabel();
63.207 -
63.208 - protected abstract String getInstallProgressMessageLabel();
63.209 -
63.210 - protected abstract String getBadgeIconName();
63.211 -
63.212 - //==========================================================================
63.213 -
63.214 -
63.215 - /**
63.216 - * Container node for all JBI Service Engines.
63.217 - */
63.218 - public static class ServiceEngines extends JBIComponentContainerNode {
63.219 -
63.220 - public ServiceEngines(final AppserverJBIMgmtController controller) {
63.221 - super(controller,
63.222 - NodeTypes.SERVICE_ENGINES,
63.223 - NbBundle.getMessage(JBIComponentContainerNode.class, "SERVICE_ENGINES")); // NOI18N
63.224 - }
63.225 -
63.226 - protected Class getInstallActionClass() {
63.227 - return InstallAction.ServiceEngine.class;
63.228 - }
63.229 -
63.230 - protected String installJBIComponent(String jarFilePath) {
63.231 - AdministrationService adminService = getJBIAdministrationService();
63.232 - return adminService.installComponent(jarFilePath);
63.233 - }
63.234 -
63.235 - protected String getFileChooserTitleLabel() {
63.236 - return "LBL_Install_Service_Engine_Chooser_Name"; // NOI18N
63.237 - }
63.238 -
63.239 - protected String getInstallProgressMessageLabel() {
63.240 - return "LBL_Installing_Service_Engine"; // NOI18N
63.241 - }
63.242 -
63.243 - protected String getBadgeIconName() {
63.244 - return IconConstants.SERVICE_ENGINES_BADGE_ICON;
63.245 - }
63.246 -
63.247 - public HelpCtx getHelpCtx() {
63.248 - return new HelpCtx(this.getClass());
63.249 - }
63.250 - }
63.251 -
63.252 -
63.253 - /**
63.254 - * Container node for all JBI Binding Components.
63.255 - */
63.256 - public static class BindingComponents extends JBIComponentContainerNode {
63.257 -
63.258 - public BindingComponents(final AppserverJBIMgmtController controller) {
63.259 - super(controller,
63.260 - NodeTypes.BINDING_COMPONENTS,
63.261 - NbBundle.getMessage(JBIComponentContainerNode.class, "BINDING_COMPONENTS")); // NOI18N
63.262 - }
63.263 -
63.264 - protected Class getInstallActionClass() {
63.265 - return InstallAction.BindingComponent.class;
63.266 - }
63.267 -
63.268 - protected String installJBIComponent(String jarFilePath) {
63.269 - AdministrationService adminService = getJBIAdministrationService();
63.270 - return adminService.installComponent(jarFilePath);
63.271 - }
63.272 -
63.273 - protected String getFileChooserTitleLabel() {
63.274 - return "LBL_Install_Binding_Component_Chooser_Name"; // NOI18N
63.275 - }
63.276 -
63.277 - protected String getInstallProgressMessageLabel() {
63.278 - return "LBL_Installing_Binding_Component"; // NOI18N
63.279 - }
63.280 -
63.281 - protected String getBadgeIconName() {
63.282 - return IconConstants.BINDING_COMPONENTS_BADGE_ICON;
63.283 - }
63.284 -
63.285 - public HelpCtx getHelpCtx() {
63.286 - return new HelpCtx(this.getClass());
63.287 - }
63.288 - }
63.289 -
63.290 -
63.291 - /**
63.292 - * Container node for all JBI Shared Libraries.
63.293 - */
63.294 - public static class SharedLibraries extends JBIComponentContainerNode {
63.295 -
63.296 - public SharedLibraries(final AppserverJBIMgmtController controller) {
63.297 - super(controller,
63.298 - NodeTypes.SHARED_LIBRARIES,
63.299 - NbBundle.getMessage(JBIComponentContainerNode.class, "SHARED_LIBRARIES")); // NOI18N
63.300 - }
63.301 -
63.302 - protected Class getInstallActionClass() {
63.303 - return InstallAction.SharedLibrary.class;
63.304 - }
63.305 -
63.306 - protected String installJBIComponent(String jarFilePath) {
63.307 - AdministrationService adminService = getJBIAdministrationService();
63.308 - return adminService.installSharedLibrary(jarFilePath);
63.309 - }
63.310 -
63.311 - protected String getFileChooserTitleLabel() {
63.312 - return "LBL_Install_Shared_Library_Chooser_Name"; // NOI18N
63.313 - }
63.314 -
63.315 - protected String getInstallProgressMessageLabel() {
63.316 - return "LBL_Installing_Shared_Library"; // NOI18N
63.317 - }
63.318 -
63.319 - protected String getBadgeIconName() {
63.320 - return IconConstants.SHARED_LIBRARIES_BADGE_ICON;
63.321 - }
63.322 -
63.323 - public HelpCtx getHelpCtx() {
63.324 - return new HelpCtx(this.getClass());
63.325 - }
63.326 - }
63.327 -}
64.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/nodes/JBIComponentNode.java Wed Feb 21 08:53:38 2007 +0000
64.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
64.3 @@ -1,603 +0,0 @@
64.4 -/*
64.5 - * The contents of this file are subject to the terms of the Common Development
64.6 - * and Distribution License (the License). You may not use this file except in
64.7 - * compliance with the License.
64.8 - *
64.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
64.10 - * or http://www.netbeans.org/cddl.txt.
64.11 -
64.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
64.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
64.14 - * If applicable, add the following below the CDDL Header, with the fields
64.15 - * enclosed by brackets [] replaced by your own identifying information:
64.16 - * "Portions Copyrighted [year] [name of copyright owner]"
64.17 - *
64.18 - * The Original Software is NetBeans. The Initial Developer of the Original
64.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
64.20 - * Microsystems, Inc. All Rights Reserved.
64.21 - */
64.22 -
64.23 -package org.netbeans.modules.sun.manager.jbi.nodes;
64.24 -
64.25 -import java.awt.Image;
64.26 -import java.util.HashMap;
64.27 -import java.util.Map;
64.28 -
64.29 -import javax.management.Attribute;
64.30 -import javax.management.MBeanAttributeInfo;
64.31 -import javax.swing.Action;
64.32 -import javax.swing.SwingUtilities;
64.33 -import org.netbeans.modules.sun.manager.jbi.management.JBIMBeanTaskResultHandler;
64.34 -import org.netbeans.modules.sun.manager.jbi.management.model.JBIServiceAssemblyStatus;
64.35 -
64.36 -import org.netbeans.modules.sun.manager.jbi.util.ProgressUI;
64.37 -import org.netbeans.modules.sun.manager.jbi.GenericConstants;
64.38 -import org.netbeans.modules.sun.manager.jbi.actions.ShutdownAction;
64.39 -import org.netbeans.modules.sun.manager.jbi.actions.StartAction;
64.40 -import org.netbeans.modules.sun.manager.jbi.actions.StopAction;
64.41 -import org.netbeans.modules.sun.manager.jbi.actions.UninstallAction;
64.42 -import org.netbeans.modules.sun.manager.jbi.management.AdministrationService;
64.43 -import org.netbeans.modules.sun.manager.jbi.management.model.JBIComponentStatus;
64.44 -import org.netbeans.modules.sun.manager.jbi.util.AppserverJBIMgmtController;
64.45 -import org.netbeans.modules.sun.manager.jbi.util.NodeTypes;
64.46 -import org.netbeans.modules.sun.manager.jbi.util.Utils;
64.47 -import org.openide.nodes.Sheet;
64.48 -import org.openide.DialogDisplayer;
64.49 -import org.openide.NotifyDescriptor;
64.50 -import org.openide.actions.PropertiesAction;
64.51 -import org.openide.util.NbBundle;
64.52 -import org.openide.util.actions.SystemAction;
64.53 -
64.54 -/**
64.55 - * Abstract Node class for a JBI Component.
64.56 - *
64.57 - * @author jqian
64.58 - */
64.59 -public abstract class JBIComponentNode extends AppserverJBIMgmtLeafNode
64.60 - implements /*RefreshCookie,*/ Startable, Stoppable, Shutdownable, Uninstallable {
64.61 -
64.62 - private boolean busy;
64.63 -
64.64 - private JBIComponentStatus cachedComponentStatus;
64.65 -
64.66 - public JBIComponentNode(final AppserverJBIMgmtController controller,
64.67 - final String nodeType,
64.68 - final String name,
64.69 - final String description) {
64.70 - super(controller, nodeType);
64.71 - setName(name);
64.72 - setDisplayName(name);
64.73 - setShortDescription(description);
64.74 - }
64.75 -
64.76 - /**
64.77 - * Return the SheetProperties to be displayed for this JBIComponent.
64.78 - *
64.79 - * @return A java.util.Map containing all JBIComponent properties.
64.80 - */
64.81 - protected Map<Attribute, MBeanAttributeInfo> getSheetProperties() {
64.82 - JBIComponentStatus jbiComponent = getJBIComponentStatus();
64.83 - Map<Attribute, MBeanAttributeInfo> map = Utils.getIntrospectedPropertyMap(jbiComponent, true);
64.84 -
64.85 - AppserverJBIMgmtController controller = getAppserverJBIMgmtController();
64.86 -
64.87 - try {
64.88 - String containerType = getContainerType();
64.89 - Map<Attribute, MBeanAttributeInfo> configMap =
64.90 - controller.getJBIComponentConfigProperties(containerType, getName(), true);
64.91 - if (configMap != null) {
64.92 - map.putAll(configMap);
64.93 - }
64.94 - } catch (Exception e) {
64.95 - NotifyDescriptor d = new NotifyDescriptor.Message(e.getMessage(),
64.96 - NotifyDescriptor.ERROR_MESSAGE);
64.97 - DialogDisplayer.getDefault().notify(d);
64.98 - }
64.99 - return map;
64.100 - }
64.101 -
64.102 - /**
64.103 - * Sets the property as an attribute to the underlying AMX mbeans. It
64.104 - * usually will delegate to the controller object which is responsible for
64.105 - * finding the correct AMX mbean objectname in order to execute a
64.106 - * JMX setAttribute.
64.107 - *
64.108 - * @param attrName The name of the property to be set.
64.109 - * @param value The value retrieved from the property sheet to be set in the
64.110 - * backend.
64.111 - * @returns the updated Attribute accessed from the Sheet.
64.112 - */
64.113 - public Attribute setSheetProperty(String attrName, Object value) {
64.114 -
64.115 - try {
64.116 - String containerType = getContainerType();
64.117 - AppserverJBIMgmtController controller = getAppserverJBIMgmtController();
64.118 - controller.setJBIComponentConfigProperty(
64.119 - containerType, getName(), attrName, value);
64.120 -
64.121 - // Get the new value
64.122 - Object newValue = controller.getJBIComponentConfigPropertyValue(
64.123 - containerType, getName(), attrName);
64.124 -
64.125 - updatePropertySheet();
64.126 -
64.127 - return new Attribute(attrName, newValue);
64.128 - } catch (Exception e) {
64.129 - NotifyDescriptor d = new NotifyDescriptor.Message(e.getMessage(),
64.130 - NotifyDescriptor.ERROR_MESSAGE);
64.131 - DialogDisplayer.getDefault().notify(d);
64.132 - }
64.133 -
64.134 - return null;
64.135 - }
64.136 -
64.137 - /**
64.138 - *
64.139 - */
64.140 - public Image getIcon(int type) {
64.141 - String state = getState(false);
64.142 - String iconName = getIconName(state);
64.143 -
64.144 - String externalBadgeIconName = null;
64.145 - if (busy) {
64.146 - externalBadgeIconName = IconConstants.BUSY_ICON;
64.147 - } else {
64.148 - if (JBIComponentStatus.INSTALLED_STATE.equals(state)) {
64.149 - externalBadgeIconName = getInstalledIconBadgeName();
64.150 - } else if (JBIComponentStatus.STOPPED_STATE.equals(state)) {
64.151 - externalBadgeIconName = getStoppedIconBadgeName();
64.152 - } else if (!JBIComponentStatus.STARTED_STATE.equals(state)) {
64.153 - externalBadgeIconName = getUnknownIconBadgeName();
64.154 - }
64.155 - }
64.156 -
64.157 - return Utils.getBadgedIcon(getClass(), iconName, null, externalBadgeIconName);
64.158 - }
64.159 -
64.160 - protected String getInstalledIconBadgeName() {
64.161 - return IconConstants.INSTALLED_ICON;
64.162 - }
64.163 -
64.164 - protected String getStoppedIconBadgeName() {
64.165 - return IconConstants.STOPPED_ICON;
64.166 - }
64.167 -
64.168 - protected String getUnknownIconBadgeName() {
64.169 - return IconConstants.UNKNOWN_ICON;
64.170 - }
64.171 -
64.172 - /**
64.173 - *
64.174 - * @param busy
64.175 - */
64.176 - private void setBusy(boolean busy) {
64.177 - this.busy = busy;
64.178 - fireIconChange();
64.179 - }
64.180 -
64.181 - /**
64.182 - *
64.183 - * @return
64.184 - */
64.185 - private JBIComponentStatus getJBIComponentStatus() {
64.186 - return getJBIComponentStatus(false); // non-cached by default
64.187 - }
64.188 -
64.189 - private JBIComponentStatus getJBIComponentStatus(boolean cached) {
64.190 - if (cachedComponentStatus == null || !cached) {
64.191 - cachedComponentStatus =
64.192 - getAppserverJBIMgmtController().getJBIComponentStatus(getName());
64.193 - }
64.194 -
64.195 - return cachedComponentStatus;
64.196 - }
64.197 -
64.198 - /**
64.199 - *
64.200 - * @return
64.201 - */
64.202 - private String getState(boolean cached) {
64.203 - String ret = null;
64.204 -
64.205 - JBIComponentStatus status = getJBIComponentStatus(cached);
64.206 - if (status != null) {
64.207 - ret = status.getState();
64.208 - }
64.209 -
64.210 - return ret;
64.211 - }
64.212 -
64.213 - private void updatePropertySheet() {
64.214 - Sheet sheet = createSheet();
64.215 - setSheet(sheet);
64.216 - firePropertySetsChange(null, null);
64.217 - }
64.218 -
64.219 - //========================== Startable =====================================
64.220 -
64.221 - /**
64.222 - *
64.223 - */
64.224 - public boolean canStart() {
64.225 - String state = getState(false);
64.226 - return !busy &&
64.227 - (JBIComponentStatus.STOPPED_STATE.equals(state) ||
64.228 - JBIComponentStatus.INSTALLED_STATE.equals(state));
64.229 - }
64.230 -
64.231 - /**
64.232 - *
64.233 - */
64.234 - public void start() {
64.235 - final AdministrationService adminService =
64.236 - getAppserverJBIMgmtController().getJBIAdministrationService();
64.237 -
64.238 - if (adminService != null) {
64.239 -
64.240 - String progressLabel = getStartProgressLabel();
64.241 - final String componentName = getName();
64.242 - String title =
64.243 - NbBundle.getMessage(JBIComponentNode.class, progressLabel,
64.244 - new Object[] {componentName});
64.245 - final ProgressUI progressUI = new ProgressUI(title, false);
64.246 -
64.247 - SwingUtilities.invokeLater(new Runnable() {
64.248 - public void run() {
64.249 - setBusy(true);
64.250 - progressUI.start();
64.251 - }
64.252 - });
64.253 -
64.254 - final String result = adminService.startComponent(componentName);
64.255 -
64.256 - SwingUtilities.invokeLater(new Runnable() {
64.257 - public void run() {
64.258 - progressUI.finish();
64.259 - JBIMBeanTaskResultHandler.showRemoteInvokationResult(
64.260 - GenericConstants.START_COMPONENT_OPERATION_NAME,
64.261 - componentName, result);
64.262 - setBusy(false);
64.263 - }
64.264 - });
64.265 -
64.266 - updatePropertySheet();
64.267 - }
64.268 - }
64.269 -
64.270 - //========================== Stoppable =====================================
64.271 -
64.272 - /**
64.273 - *
64.274 - */
64.275 - public boolean canStop() {
64.276 - return !busy && JBIComponentStatus.STARTED_STATE.equals(getState(true)); // cached
64.277 - }
64.278 -
64.279 - /**
64.280 - *
64.281 - */
64.282 - public void stop() {
64.283 - AdministrationService adminService =
64.284 - getAppserverJBIMgmtController().getJBIAdministrationService();
64.285 -
64.286 - if (adminService != null) {
64.287 -
64.288 - String progressLabel = getStopProgressLabel();
64.289 - final String componentName = getName();
64.290 - String title =
64.291 - NbBundle.getMessage(JBIComponentNode.class, progressLabel,
64.292 - new Object[] {componentName});
64.293 - final ProgressUI progressUI = new ProgressUI(title, false);
64.294 -
64.295 - SwingUtilities.invokeLater(new Runnable() {
64.296 - public void run() {
64.297 - setBusy(true);
64.298 - progressUI.start();
64.299 - }
64.300 - });
64.301 -
64.302 - final String result = adminService.stopComponent(componentName);
64.303 -
64.304 - SwingUtilities.invokeLater(new Runnable() {
64.305 - public void run() {
64.306 - progressUI.finish();
64.307 - JBIMBeanTaskResultHandler.showRemoteInvokationResult(
64.308 - GenericConstants.STOP_COMPONENT_OPERATION_NAME,
64.309 - componentName, result);
64.310 - setBusy(false);
64.311 - }
64.312 - });
64.313 -
64.314 - updatePropertySheet();
64.315 - }
64.316 - }
64.317 -
64.318 - //========================== Shutdownable ==================================
64.319 -
64.320 - /**
64.321 - *
64.322 - */
64.323 - public boolean canShutdown() {
64.324 - return !busy && JBIComponentStatus.STOPPED_STATE.equals(getState(true)); // cached
64.325 - }
64.326 -
64.327 - /**
64.328 - *
64.329 - */
64.330 - public void shutdown() {
64.331 - AdministrationService adminService =
64.332 - getAppserverJBIMgmtController().getJBIAdministrationService();
64.333 -
64.334 - if (adminService != null) {
64.335 -
64.336 - String progressLabel = getShutdownProgressLabel();
64.337 - final String componentName = getName();
64.338 - String title =
64.339 - NbBundle.getMessage(JBIComponentNode.class, progressLabel,
64.340 - new Object[] {componentName});
64.341 - final ProgressUI progressUI = new ProgressUI(title, false);
64.342 -
64.343 - SwingUtilities.invokeLater(new Runnable() {
64.344 - public void run() {
64.345 - setBusy(true);
64.346 - progressUI.start();
64.347 - }
64.348 - });
64.349 -
64.350 - final String result = adminService.shutdownComponent(componentName);
64.351 -
64.352 - SwingUtilities.invokeLater(new Runnable() {
64.353 - public void run() {
64.354 - progressUI.finish();
64.355 - JBIMBeanTaskResultHandler.showRemoteInvokationResult(
64.356 - GenericConstants.SHUTDOWN_COMPONENT_OPERATION_NAME,
64.357 - componentName, result);
64.358 - setBusy(false);
64.359 - }
64.360 - });
64.361 -
64.362 - updatePropertySheet();
64.363 - }
64.364 - }
64.365 -
64.366 - //========================== Uninstallable =================================
64.367 -
64.368 - /**
64.369 - *
64.370 - */
64.371 - public boolean canUninstall() {
64.372 - return !busy && JBIComponentStatus.INSTALLED_STATE.equals(getState(true)); // cached
64.373 - }
64.374 -
64.375 - /**
64.376 - *
64.377 - */
64.378 - public void uninstall() {
64.379 - AdministrationService adminService =
64.380 - getAppserverJBIMgmtController().getJBIAdministrationService();
64.381 -
64.382 - if (adminService != null) {
64.383 -
64.384 - String progressLabel = getUninstallProgressLabel();
64.385 - final String componentName = getName();
64.386 - String title =
64.387 - NbBundle.getMessage(JBIComponentNode.class, progressLabel,
64.388 - new Object[] {componentName});
64.389 - final ProgressUI progressUI = new ProgressUI(title, false);
64.390 -
64.391 - SwingUtilities.invokeLater(new Runnable() {
64.392 - public void run() {
64.393 - progressUI.start();
64.394 - }
64.395 - });
64.396 -
64.397 - final String result = uninstallComponent(adminService, componentName);
64.398 -
64.399 - SwingUtilities.invokeLater(new Runnable() {
64.400 - public void run() {
64.401 - progressUI.finish();
64.402 - JBIMBeanTaskResultHandler.showRemoteInvokationResult(
64.403 - GenericConstants.UNINSTALL_COMPONENT_OPERATION_NAME,
64.404 - componentName, result);
64.405 - }
64.406 - });
64.407 -
64.408 - updatePropertySheet();
64.409 - }
64.410 - }
64.411 -
64.412 - //===================== Abstract Methods ===================================
64.413 -
64.414 - protected abstract String getContainerType();
64.415 -
64.416 - protected abstract String getIconName(String state);
64.417 -
64.418 - protected abstract String getStartProgressLabel();
64.419 -
64.420 - protected abstract String getStopProgressLabel();
64.421 -
64.422 - protected abstract String getShutdownProgressLabel();
64.423 -
64.424 - protected abstract String getUninstallProgressLabel();
64.425 -
64.426 - protected abstract String uninstallComponent(
64.427 - AdministrationService adminService, String componentName);
64.428 -
64.429 - //==========================================================================
64.430 -
64.431 -
64.432 -
64.433 - //========================= Concrete Nodes =================================
64.434 -
64.435 - /**
64.436 - * Node class for a Service Engine.
64.437 - */
64.438 - public static class ServiceEngine extends JBIComponentNode {
64.439 -
64.440 - private static final String NODE_TYPE = NodeTypes.SERVICE_ENGINE;
64.441 -
64.442 - public ServiceEngine(final AppserverJBIMgmtController controller,
64.443 - final String name, final String description) {
64.444 - super(controller, NODE_TYPE, name, description);
64.445 - }
64.446 -
64.447 - public Action[] getActions(boolean flag) {
64.448 - return new SystemAction[] {
64.449 - SystemAction.get(StartAction.class),
64.450 - SystemAction.get(StopAction.class),
64.451 - SystemAction.get(ShutdownAction.class),
64.452 - SystemAction.get(UninstallAction.class),
64.453 - null,
64.454 - SystemAction.get(PropertiesAction.class),
64.455 - };
64.456 - }
64.457 -
64.458 - protected String uninstallComponent(
64.459 - AdministrationService adminService, String componentName) {
64.460 - return adminService.uninstallComponent(componentName);
64.461 - }
64.462 -
64.463 - protected String getContainerType() {
64.464 - return GenericConstants.SERVICE_ENGINES_FOLDER_NAME;
64.465 - }
64.466 -
64.467 - protected String getIconName(String state) {
64.468 - return IconConstants.SERVICE_ENGINE_ICON;
64.469 - }
64.470 -
64.471 - protected String getStartProgressLabel() {
64.472 - return "LBL_Starting_Service_Engine"; // NOI18N
64.473 - }
64.474 -
64.475 - protected String getStopProgressLabel() {
64.476 - return "LBL_Stopping_Service_Engine"; // NOI18N
64.477 - }
64.478 -
64.479 - protected String getShutdownProgressLabel() {
64.480 - return "LBL_Shutting_Down_Service_Engine"; // NOI18N
64.481 - }
64.482 -
64.483 - protected String getUninstallProgressLabel() {
64.484 - return "LBL_Uninstalling_Service_Engine"; // NOI18N
64.485 - }
64.486 - }
64.487 -
64.488 - //==========================================================================
64.489 -
64.490 - /**
64.491 - * Node class for a Binding Component.
64.492 - */
64.493 - public static class BindingComponent extends JBIComponentNode {
64.494 -
64.495 - private static final String NODE_TYPE = NodeTypes.BINDING_COMPONENT;
64.496 -
64.497 - public BindingComponent(final AppserverJBIMgmtController controller,
64.498 - final String name, final String description) {
64.499 - super(controller, NODE_TYPE, name, description);
64.500 - }
64.501 -
64.502 - public Action[] getActions(boolean flag) {
64.503 - return new SystemAction[] {
64.504 - SystemAction.get(StartAction.class),
64.505 - SystemAction.get(StopAction.class),
64.506 - SystemAction.get(ShutdownAction.class),
64.507 - SystemAction.get(UninstallAction.class),
64.508 - null,
64.509 - SystemAction.get(PropertiesAction.class),
64.510 - };
64.511 - }
64.512 -
64.513 - protected String uninstallComponent(
64.514 - AdministrationService adminService, String componentName) {
64.515 - return adminService.uninstallComponent(componentName);
64.516 - }
64.517 -
64.518 - protected String getContainerType() {
64.519 - return GenericConstants.BINDING_COMPONENTS_FOLDER_NAME;
64.520 - }
64.521 -
64.522 - protected String getIconName(String state) {
64.523 - return IconConstants.BINDING_COMPONENT_ICON;
64.524 - }
64.525 -
64.526 - protected String getStartProgressLabel() {
64.527 - return "LBL_Starting_Binding_Component"; // NOI18N
64.528 - }
64.529 -
64.530 - protected String getStopProgressLabel() {
64.531 - return "LBL_Stopping_Binding_Component"; // NOI18N
64.532 - }
64.533 -
64.534 - protected String getShutdownProgressLabel() {
64.535 - return "LBL_Shutting_Down_Binding_Component"; // NOI18N
64.536 - }
64.537 -
64.538 - protected String getUninstallProgressLabel() {
64.539 - return "LBL_Uninstalling_Binding_Component"; // NOI18N
64.540 - }
64.541 - }
64.542 -
64.543 - //==========================================================================
64.544 -
64.545 - /**
64.546 - * Node class for a Shared Library.
64.547 - */
64.548 - public static class SharedLibrary extends JBIComponentNode {
64.549 -
64.550 - private static final String NODE_TYPE = NodeTypes.SHARED_LIBRARY;
64.551 -
64.552 - public SharedLibrary(final AppserverJBIMgmtController controller,
64.553 - final String name, final String description) {
64.554 - super(controller, NODE_TYPE, name, description);
64.555 - }
64.556 -
64.557 - public Action[] getActions(boolean flag) {
64.558 - return new SystemAction[] {
64.559 - SystemAction.get(UninstallAction.class),
64.560 - null,
64.561 - SystemAction.get(PropertiesAction.class),
64.562 - };
64.563 - }
64.564 -
64.565 - protected String uninstallComponent(
64.566 - AdministrationService adminService, String componentName) {
64.567 - return adminService.uninstallSharedLibrary(componentName);
64.568 - }
64.569 -
64.570 - protected String getContainerType() {
64.571 - return GenericConstants.SHARED_LIBRARIES_FOLDER_NAME;
64.572 - }
64.573 -
64.574 - protected String getIconName(String state) {
64.575 - return IconConstants.SHARED_LIBRARY_ICON;
64.576 - }
64.577 -
64.578 - protected String getStartProgressLabel() {
64.579 - return null;
64.580 - }
64.581 -
64.582 - protected String getStopProgressLabel() {
64.583 - return null;
64.584 - }
64.585 -
64.586 - protected String getShutdownProgressLabel() {
64.587 - return null;
64.588 - }
64.589 -
64.590 - protected String getUninstallProgressLabel() {
64.591 - return "LBL_Uninstalling_Shared_Library"; // NOI18N
64.592 - }
64.593 -
64.594 - protected String getInstalledIconBadgeName() {
64.595 - return null;
64.596 - }
64.597 -
64.598 - protected String getStoppedIconBadgeName() {
64.599 - return null;
64.600 - }
64.601 -
64.602 - protected String getUnknownIconBadgeName() {
64.603 - return null;
64.604 - }
64.605 - }
64.606 -}
65.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/nodes/JBINode.java Wed Feb 21 08:53:38 2007 +0000
65.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
65.3 @@ -1,120 +0,0 @@
65.4 -/*
65.5 - * The contents of this file are subject to the terms of the Common Development
65.6 - * and Distribution License (the License). You may not use this file except in
65.7 - * compliance with the License.
65.8 - *
65.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
65.10 - * or http://www.netbeans.org/cddl.txt.
65.11 -
65.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
65.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
65.14 - * If applicable, add the following below the CDDL Header, with the fields
65.15 - * enclosed by brackets [] replaced by your own identifying information:
65.16 - * "Portions Copyrighted [year] [name of copyright owner]"
65.17 - *
65.18 - * The Original Software is NetBeans. The Initial Developer of the Original
65.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
65.20 - * Microsystems, Inc. All Rights Reserved.
65.21 - */
65.22 -
65.23 -package org.netbeans.modules.sun.manager.jbi.nodes;
65.24 -
65.25 -import java.awt.Image;
65.26 -import java.util.Map;
65.27 -
65.28 -import javax.management.Attribute;
65.29 -import javax.swing.Action;
65.30 -import javax.swing.ImageIcon;
65.31 -import javax.swing.SwingUtilities;
65.32 -
65.33 -import org.netbeans.modules.j2ee.sun.bridge.apis.AppserverMgmtController;
65.34 -import org.netbeans.modules.j2ee.sun.bridge.apis.RefreshAction;
65.35 -import org.netbeans.modules.sun.manager.jbi.management.JBIFrameworkService;
65.36 -import org.netbeans.modules.sun.manager.jbi.util.AppserverJBIMgmtController;
65.37 -import org.netbeans.modules.sun.manager.jbi.util.NodeTypes;
65.38 -import org.netbeans.modules.sun.manager.jbi.util.Utils;
65.39 -import org.openide.actions.PropertiesAction;
65.40 -import org.openide.util.actions.SystemAction;
65.41 -import org.openide.util.HelpCtx;
65.42 -
65.43 -/**
65.44 - * Top node for the JBI lifecycle module.
65.45 - *
65.46 - * @author jqian
65.47 - */
65.48 -public class JBINode extends AppserverJBIMgmtContainerNode {
65.49 -
65.50 - /** Creates a new instance of JBINode */
65.51 - public JBINode(final AppserverJBIMgmtController controller) {
65.52 - super(controller, NodeTypes.JBI);
65.53 -
65.54 -// SwingUtilities.invokeLater(new Runnable() {
65.55 -// public void run() {
65.56 -//// String serverDisplayName = getParentNode().getName();
65.57 -//// controller.setServerInstanceDisplayName(serverDisplayName);
65.58 -// controller.setJBINode(JBINode.this);
65.59 -// }
65.60 -// });
65.61 - }
65.62 -
65.63 - /**
65.64 - * Return the actions associated with the menu drop down seen when
65.65 - * a user right-clicks on an Applications node in the plugin.
65.66 - *
65.67 - * @param boolean true/false
65.68 - * @return An array of Action objects.
65.69 - */
65.70 - public Action[] getActions(boolean flag) {
65.71 - return new SystemAction[] {
65.72 - SystemAction.get(PropertiesAction.class),
65.73 - SystemAction.get(RefreshAction.class)
65.74 - };
65.75 - }
65.76 -
65.77 - /**
65.78 - *
65.79 - */
65.80 - public Image getIcon(int type) {
65.81 - return new ImageIcon(JBINode.class.getResource(IconConstants.JBI_ICON)).getImage();
65.82 - }
65.83 -
65.84 - // For now, use the same open for open/closed state
65.85 - public Image getOpenedIcon(int type) {
65.86 - return getIcon(type);
65.87 - }
65.88 -
65.89 - /**
65.90 - * Return the SheetProperties to be displayed for this JVM.
65.91 - *
65.92 - * @return A java.util.Map containing all JVM properties.
65.93 - */
65.94 - protected Map getSheetProperties() {
65.95 - JBIFrameworkService frameworkService = getJBIFrameworkService();
65.96 - Map map = Utils.getIntrospectedPropertyMap(frameworkService, true);
65.97 - return map;
65.98 - }
65.99 -
65.100 - // FIXME
65.101 - public Attribute setSheetProperty(String attrName, Object value) {
65.102 - AppserverJBIMgmtController controller = getAppserverJBIMgmtController();
65.103 - controller.setJBIFrameworkServiceDefaultLogProperty((String)value);
65.104 -
65.105 - // Get the new value
65.106 - Object newValue = getDefaultLogPropertyValue();
65.107 - return new Attribute(attrName, newValue);
65.108 - }
65.109 -
65.110 - private String getDefaultLogPropertyValue() {
65.111 - JBIFrameworkService frameworkService = getJBIFrameworkService();
65.112 - return frameworkService.getDefaultLogPropertyValue();
65.113 - }
65.114 -
65.115 - private JBIFrameworkService getJBIFrameworkService() {
65.116 - AppserverJBIMgmtController controller = getAppserverJBIMgmtController();
65.117 - return controller.getJBIFrameworkService();
65.118 - }
65.119 -
65.120 - public HelpCtx getHelpCtx() {
65.121 - return new HelpCtx(JBINode.class);
65.122 - }
65.123 -}
66.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/nodes/JBIServiceAssembliesNode.java Wed Feb 21 08:53:38 2007 +0000
66.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
66.3 @@ -1,202 +0,0 @@
66.4 -/*
66.5 - * The contents of this file are subject to the terms of the Common Development
66.6 - * and Distribution License (the License). You may not use this file except in
66.7 - * compliance with the License.
66.8 - *
66.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
66.10 - * or http://www.netbeans.org/cddl.txt.
66.11 -
66.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
66.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
66.14 - * If applicable, add the following below the CDDL Header, with the fields
66.15 - * enclosed by brackets [] replaced by your own identifying information:
66.16 - * "Portions Copyrighted [year] [name of copyright owner]"
66.17 - *
66.18 - * The Original Software is NetBeans. The Initial Developer of the Original
66.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
66.20 - * Microsystems, Inc. All Rights Reserved.
66.21 - */
66.22 -
66.23 -package org.netbeans.modules.sun.manager.jbi.nodes;
66.24 -
66.25 -import java.awt.Image;
66.26 -import java.io.File;
66.27 -import java.util.Map;
66.28 -import java.util.ResourceBundle;
66.29 -
66.30 -import javax.management.Attribute;
66.31 -import javax.swing.Action;
66.32 -import javax.swing.JFileChooser;
66.33 -import javax.swing.SwingUtilities;
66.34 -
66.35 -import org.netbeans.modules.j2ee.sun.bridge.apis.RefreshAction;
66.36 -import org.netbeans.modules.sun.manager.jbi.GenericConstants;
66.37 -import org.netbeans.modules.sun.manager.jbi.management.JBIMBeanTaskResultHandler;
66.38 -import org.netbeans.modules.sun.manager.jbi.util.ProgressUI;
66.39 -import org.netbeans.modules.sun.manager.jbi.actions.DeployAction;
66.40 -import org.netbeans.modules.sun.manager.jbi.management.AdministrationService;
66.41 -import org.netbeans.modules.sun.manager.jbi.util.AppserverJBIMgmtController;
66.42 -import org.netbeans.modules.sun.manager.jbi.util.NodeTypes;
66.43 -import org.netbeans.modules.sun.manager.jbi.util.Utils;
66.44 -import org.netbeans.modules.sun.manager.jbi.util.ZipFileFilter;
66.45 -import org.openide.util.NbBundle;
66.46 -import org.openide.util.actions.SystemAction;
66.47 -import org.openide.util.HelpCtx;
66.48 -
66.49 -/**
66.50 - * Container node for all JBI Service Assemblies.
66.51 - *
66.52 - * @author jqian
66.53 - */
66.54 -public class JBIServiceAssembliesNode extends AppserverJBIMgmtContainerNode
66.55 - implements Deployable {
66.56 -
66.57 - private static final String NODE_TYPE = NodeTypes.SERVICE_ASSEMBLIES;
66.58 -
66.59 - private static String lastInstallDir = null;
66.60 -
66.61 - private boolean busy;
66.62 -
66.63 -
66.64 - public JBIServiceAssembliesNode(final AppserverJBIMgmtController controller) {
66.65 - super(controller, NODE_TYPE);
66.66 -
66.67 - setDisplayName(NbBundle.getMessage(JBIServiceAssembliesNode.class, "SERVICE_ASSEMBLIES")); // NOI18N
66.68 - }
66.69 -
66.70 - /**
66.71 - * Return the actions associated with the menu drop down seen when
66.72 - * a user right-clicks on a node in the plugin.
66.73 - *
66.74 - * @param boolean true/false
66.75 - * @return An array of Action objects.
66.76 - */
66.77 - public Action[] getActions(boolean flag) {
66.78 - return new SystemAction[] {
66.79 - SystemAction.get(DeployAction.class),
66.80 - SystemAction.get(RefreshAction.class),
66.81 - };
66.82 - }
66.83 -
66.84 - /**
66.85 - *
66.86 - */
66.87 - public Image getIcon(int type) {
66.88 - String iconName = IconConstants.FOLDER_ICON;
66.89 - String badgeIconName = IconConstants.SERVICE_ASSEMBLIES_BADGE_ICON;
66.90 - String externalBadgeIconName = busy ? IconConstants.BUSY_ICON : null;
66.91 - return Utils.getBadgedIcon(getClass(), iconName, badgeIconName, externalBadgeIconName);
66.92 - }
66.93 -
66.94 - /**
66.95 - *
66.96 - */
66.97 - public Image getOpenedIcon(int type) {
66.98 - return getIcon(type);
66.99 - }
66.100 -
66.101 - /**
66.102 - *
66.103 - * @param busy
66.104 - */
66.105 - private void setBusy(boolean busy) {
66.106 - this.busy = busy;
66.107 - fireIconChange();
66.108 - }
66.109 -
66.110 -
66.111 - /**
66.112 - * Deploys new Service Assemblies.
66.113 - */
66.114 - public void deploy() {
66.115 -
66.116 - AdministrationService adminService =
66.117 - getAppserverJBIMgmtController().getJBIAdministrationService();
66.118 -
66.119 - if (adminService != null) {
66.120 -
66.121 - JFileChooser chooser = getJFileChooser();
66.122 -
66.123 - int returnValue = chooser.showDialog(null,
66.124 - NbBundle.getMessage(JBIServiceAssembliesNode.class, "LBL_Deploy_Service_Assembly_Button")); //NOI18N
66.125 -
66.126 - if (returnValue == JFileChooser.APPROVE_OPTION){
66.127 - File[] selectedFiles = chooser.getSelectedFiles();
66.128 -
66.129 - String message =
66.130 - NbBundle.getMessage(JBIServiceAssembliesNode.class, "LBL_Deploying_Service_Assembly"); // NOI18N
66.131 - final ProgressUI progressUI = new ProgressUI(message, false);
66.132 -
66.133 - SwingUtilities.invokeLater(new Runnable() {
66.134 - public void run() {
66.135 - setBusy(true);
66.136 - progressUI.start();
66.137 - }
66.138 - });
66.139 -
66.140 - for (int i = 0; i < selectedFiles.length; i++) {
66.141 - final String zipFilePath = selectedFiles[i].getAbsolutePath();
66.142 - final String result = adminService.deployServiceAssembly(zipFilePath);
66.143 -
66.144 - SwingUtilities.invokeLater(new Runnable() {
66.145 - public void run() {
66.146 - JBIMBeanTaskResultHandler.showRemoteInvokationResult(
66.147 - GenericConstants.DEPLOY_SERVICE_ASSEMBLY_OPERATION_NAME,
66.148 - zipFilePath, result);
66.149 - }
66.150 - });
66.151 -
66.152 - if (i == 0) {
66.153 - lastInstallDir = selectedFiles[0].getParent();
66.154 - }
66.155 - }
66.156 -
66.157 - SwingUtilities.invokeLater(new Runnable() {
66.158 - public void run() {
66.159 - progressUI.finish();
66.160 - setBusy(false);
66.161 - }
66.162 - });
66.163 - }
66.164 - }
66.165 - }
66.166 -
66.167 - protected Map getSheetProperties() {
66.168 - return null;
66.169 - }
66.170 -
66.171 - public Attribute setSheetProperty(String attrName, Object value) {
66.172 - return null;
66.173 - }
66.174 -
66.175 - private JFileChooser getJFileChooser(){
66.176 - JFileChooser chooser = new JFileChooser();
66.177 -
66.178 - ResourceBundle bundle = NbBundle.getBundle(JBIComponentContainerNode.class);
66.179 -
66.180 - chooser.setDialogTitle(
66.181 - bundle.getString("LBL_Deploy_Service_Assembly_Chooser_Name")); //NOI18N
66.182 - chooser.setDialogType(JFileChooser.CUSTOM_DIALOG);
66.183 - chooser.setApproveButtonMnemonic(
66.184 - bundle.getString("Deploy_Service_Assembly_Button_Mnemonic").charAt(0)); //NOI18N
66.185 - chooser.setMultiSelectionEnabled(true);
66.186 - chooser.addChoosableFileFilter(ZipFileFilter.getInstance());
66.187 - chooser.setAcceptAllFileFilterUsed(false);
66.188 - chooser.setApproveButtonToolTipText(
66.189 - bundle.getString("LBL_Deploy_Service_Assembly_Button")); //NOI18N
66.190 - chooser.getAccessibleContext().setAccessibleName(
66.191 - bundle.getString("LBL_Deploy_Service_Assembly_Chooser_Name")); //NOI18N
66.192 - chooser.getAccessibleContext().setAccessibleDescription(
66.193 - bundle.getString("LBL_Deploy_Service_Assembly_Chooser_Name")); //NOI18N
66.194 -
66.195 - if (lastInstallDir != null) {
66.196 - chooser.setCurrentDirectory(new File(lastInstallDir));
66.197 - }
66.198 -
66.199 - return chooser;
66.200 - }
66.201 -
66.202 - public HelpCtx getHelpCtx() {
66.203 - return new HelpCtx(JBIServiceAssembliesNode.class);
66.204 - }
66.205 -}
67.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/nodes/JBIServiceAssemblyNode.java Wed Feb 21 08:53:38 2007 +0000
67.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
67.3 @@ -1,426 +0,0 @@
67.4 -/*
67.5 - * The contents of this file are subject to the terms of the Common Development
67.6 - * and Distribution License (the License). You may not use this file except in
67.7 - * compliance with the License.
67.8 - *
67.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
67.10 - * or http://www.netbeans.org/cddl.txt.
67.11 -
67.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
67.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
67.14 - * If applicable, add the following below the CDDL Header, with the fields
67.15 - * enclosed by brackets [] replaced by your own identifying information:
67.16 - * "Portions Copyrighted [year] [name of copyright owner]"
67.17 - *
67.18 - * The Original Software is NetBeans. The Initial Developer of the Original
67.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
67.20 - * Microsystems, Inc. All Rights Reserved.
67.21 - */
67.22 -
67.23 -package org.netbeans.modules.sun.manager.jbi.nodes;
67.24 -
67.25 -import java.awt.Image;
67.26 -import java.util.Iterator;
67.27 -import java.util.List;
67.28 -import java.util.Map;
67.29 -
67.30 -import javax.management.Attribute;
67.31 -import javax.swing.Action;
67.32 -import javax.swing.SwingUtilities;
67.33 -import org.netbeans.modules.sun.manager.jbi.GenericConstants;
67.34 -import org.netbeans.modules.sun.manager.jbi.management.JBIMBeanTaskResultHandler;
67.35 -
67.36 -import org.netbeans.modules.sun.manager.jbi.util.ProgressUI;
67.37 -import org.netbeans.modules.sun.manager.jbi.actions.ShutdownAction;
67.38 -import org.netbeans.modules.sun.manager.jbi.actions.StartAction;
67.39 -import org.netbeans.modules.sun.manager.jbi.actions.StopAction;
67.40 -import org.netbeans.modules.sun.manager.jbi.actions.UndeployAction;
67.41 -import org.netbeans.modules.sun.manager.jbi.management.AdministrationService;
67.42 -import org.netbeans.modules.sun.manager.jbi.management.model.JBIComponentStatus;
67.43 -import org.netbeans.modules.sun.manager.jbi.management.model.JBIServiceAssemblyStatus;
67.44 -import org.netbeans.modules.sun.manager.jbi.management.model.JBIServiceUnitStatus;
67.45 -import org.netbeans.modules.sun.manager.jbi.util.AppserverJBIMgmtController;
67.46 -import org.netbeans.modules.sun.manager.jbi.util.NodeTypes;
67.47 -import org.netbeans.modules.sun.manager.jbi.util.Utils;
67.48 -import org.openide.nodes.Sheet;
67.49 -import org.openide.actions.PropertiesAction;
67.50 -import org.openide.util.NbBundle;
67.51 -import org.openide.util.actions.SystemAction;
67.52 -
67.53 -/**
67.54 - * Node for one JBI Service Assembly.
67.55 - *
67.56 - * @author jqian
67.57 - */
67.58 -public class JBIServiceAssemblyNode extends AppserverJBIMgmtContainerNode
67.59 - implements Startable, Stoppable, Shutdownable, Undeployable {
67.60 -
67.61 - private boolean busy;
67.62 -
67.63 - private JBIServiceAssemblyStatus cachedAssemblyStatus;
67.64 -
67.65 - /** Creates a new instance of ServiceAssemblyNode */
67.66 - public JBIServiceAssemblyNode(final AppserverJBIMgmtController controller,
67.67 - final String name,
67.68 - final String description) {
67.69 - super(controller, NodeTypes.SERVICE_ASSEMBLY);
67.70 - setName(name);
67.71 - setDisplayName(name);
67.72 - setShortDescription(description);
67.73 - }
67.74 -
67.75 - public JBIServiceAssemblyStatus getAssembly() {
67.76 - return getAssembly(false); // non-cached by default
67.77 - }
67.78 -
67.79 - private JBIServiceAssemblyStatus getAssembly(boolean cached) {
67.80 - if (cachedAssemblyStatus == null || !cached) {
67.81 - cachedAssemblyStatus =
67.82 - getAppserverJBIMgmtController().getJBIServiceAssemblyStatus(getName());
67.83 - }
67.84 -
67.85 - return cachedAssemblyStatus;
67.86 - }
67.87 -
67.88 - /**
67.89 - *
67.90 - */
67.91 - public Image getIcon(int type) {
67.92 -
67.93 - String baseIconName = IconConstants.SERVICE_ASSEMBLY_ICON;
67.94 -
67.95 - String status = getAssemblyStatus(false);
67.96 -
67.97 - String externalBadgeIconName = null;
67.98 - if (busy) {
67.99 - externalBadgeIconName = IconConstants.BUSY_ICON;
67.100 - } else {
67.101 - if (JBIComponentStatus.INSTALLED_STATE.equals(status)) {
67.102 - externalBadgeIconName = IconConstants.INSTALLED_ICON;
67.103 - } else if (JBIComponentStatus.STOPPED_STATE.equals(status)) {
67.104 - externalBadgeIconName = IconConstants.STOPPED_ICON;
67.105 - } else if (!JBIComponentStatus.STARTED_STATE.equals(status)) {
67.106 - externalBadgeIconName = IconConstants.UNKNOWN_ICON;
67.107 - }
67.108 - }
67.109 -
67.110 - return Utils.getBadgedIcon(getClass(), baseIconName, null, externalBadgeIconName);
67.111 - }
67.112 -
67.113 - // For now, use the same open for open/closed state
67.114 - public Image getOpenedIcon(int type) {
67.115 - return getIcon(type);
67.116 - }
67.117 -
67.118 - /**
67.119 - * Return the actions associated with the menu drop down seen when
67.120 - * a user right-clicks on a node in the plugin.
67.121 - *
67.122 - * @param boolean true/false
67.123 - * @return An array of Action objects.
67.124 - */
67.125 - public Action[] getActions(boolean flag) {
67.126 - return new SystemAction[] {
67.127 - SystemAction.get(StartAction.class),
67.128 - SystemAction.get(StopAction.class),
67.129 - SystemAction.get(ShutdownAction.class),
67.130 - SystemAction.get(UndeployAction.class),
67.131 - null,
67.132 - SystemAction.get(PropertiesAction.class),
67.133 - };
67.134 - }
67.135 -
67.136 - /**
67.137 - * Return the SheetProperties to be displayed for this JVM.
67.138 - *
67.139 - * @return A java.util.Map containing all JVM properties.
67.140 - */
67.141 - protected Map getSheetProperties() {
67.142 - JBIServiceAssemblyStatus assemblyStatus =
67.143 - getAppserverJBIMgmtController().getJBIServiceAssemblyStatus(getName());
67.144 - Map map = Utils.getIntrospectedPropertyMap(assemblyStatus, true);
67.145 - return map;
67.146 - }
67.147 -
67.148 - public Attribute setSheetProperty(String attrName, Object value) {
67.149 - return null;
67.150 - }
67.151 -
67.152 - /**
67.153 - *
67.154 - * @param busy
67.155 - */
67.156 - private void setBusy(boolean busy) {
67.157 - this.busy = busy;
67.158 - fireIconChange();
67.159 - }
67.160 -
67.161 - private String getAssemblyStatus(boolean cached) {
67.162 - JBIServiceAssemblyStatus assembly = getAssembly(cached);
67.163 - if (assembly != null) {
67.164 - return assembly.getStatus();
67.165 - } else {
67.166 - return null;
67.167 - }
67.168 - }
67.169 -
67.170 - private void updatePropertySheet() {
67.171 - Sheet sheet = createSheet();
67.172 - setSheet(sheet);
67.173 - firePropertySetsChange(null, null);
67.174 - }
67.175 -
67.176 - private AdministrationService getAdminService() {
67.177 - return getAppserverJBIMgmtController().getJBIAdministrationService();
67.178 - }
67.179 -
67.180 - //========================== Startable =====================================
67.181 -
67.182 - public boolean canStart() {
67.183 -// String status = getAssemblyStatus();
67.184 -// return !busy &&
67.185 -// (JBIServiceAssemblyStatus.STOP_STATUS.equals(status) ||
67.186 -// JBIServiceAssemblyStatus.SHUTDOWN_STATUS.equals(status));
67.187 -
67.188 - boolean ret = false;
67.189 -
67.190 - if (!busy) {
67.191 - JBIServiceAssemblyStatus assembly = getAssembly(false);
67.192 - String assemblyStatus = (assembly != null) ? assembly.getStatus() : null;
67.193 -
67.194 - if (JBIServiceAssemblyStatus.STOP_STATUS.equals(assemblyStatus)) {
67.195 - ret = true;
67.196 - } else if (JBIServiceAssemblyStatus.SHUTDOWN_STATUS.equals(assemblyStatus)) {
67.197 - ret = true;
67.198 - } else if (JBIServiceAssemblyStatus.START_STATUS.equals(assemblyStatus)) {
67.199 - List units = assembly.getJbiServiceUnitStatusList();
67.200 - if (units != null) {
67.201 - for (Iterator it = units.iterator(); it.hasNext();) {
67.202 - JBIServiceUnitStatus unit = (JBIServiceUnitStatus) it.next();
67.203 - String unitStatus = unit.getStatus();
67.204 - if (JBIServiceAssemblyStatus.STOP_STATUS.equals(unitStatus) ||
67.205 - JBIServiceAssemblyStatus.SHUTDOWN_STATUS.equals(unitStatus)) {
67.206 - ret = true;
67.207 - break;
67.208 - }
67.209 - }
67.210 - }
67.211 - }
67.212 - }
67.213 -
67.214 - return ret;
67.215 - }
67.216 -
67.217 -
67.218 - public void start() {
67.219 - AdministrationService adminService = getAdminService();
67.220 -
67.221 - if (adminService != null) {
67.222 - final String assemblyName = getName();
67.223 -
67.224 - String title =
67.225 - NbBundle.getMessage(JBIServiceAssemblyNode.class,
67.226 - "LBL_Starting_Service_Assembly", // NOI18N
67.227 - new Object[] {assemblyName});
67.228 - final ProgressUI progressUI = new ProgressUI(title, false);
67.229 -
67.230 - SwingUtilities.invokeLater(new Runnable() {
67.231 - public void run() {
67.232 - setBusy(true);
67.233 - progressUI.start();
67.234 - }
67.235 - });
67.236 -
67.237 - final String result = adminService.startServiceAssembly(assemblyName);
67.238 -
67.239 - SwingUtilities.invokeLater(new Runnable() {
67.240 - public void run() {
67.241 - progressUI.finish();
67.242 - JBIMBeanTaskResultHandler.showRemoteInvokationResult(
67.243 - GenericConstants.START_SERVICE_ASSEMBLY_OPERATION_NAME,
67.244 - assemblyName, result);
67.245 - setBusy(false);
67.246 - }
67.247 - });
67.248 -
67.249 - updatePropertySheet();
67.250 - }
67.251 - }
67.252 -
67.253 - //========================== Stoppable =====================================
67.254 -
67.255 - public boolean canStop() {
67.256 -// return !busy && JBIServiceAssemblyStatus.START_STATUS.equals(getAssemblyStatus());
67.257 -
67.258 - boolean ret = false;
67.259 -
67.260 - if (!busy) {
67.261 - JBIServiceAssemblyStatus assembly = getAssembly(true); // cached
67.262 - String assemblyStatus = (assembly != null) ? assembly.getStatus() : null;
67.263 -
67.264 - if (JBIServiceAssemblyStatus.START_STATUS.equals(assemblyStatus)) {
67.265 - ret = true;
67.266 - } else if (JBIServiceAssemblyStatus.STOP_STATUS.equals(assemblyStatus)) {
67.267 - List units = assembly.getJbiServiceUnitStatusList();
67.268 - if (units != null) {
67.269 - for (Iterator it = units.iterator(); it.hasNext();) {
67.270 - JBIServiceUnitStatus unit = (JBIServiceUnitStatus) it.next();
67.271 - String unitStatus = unit.getStatus();
67.272 - if (JBIServiceAssemblyStatus.START_STATUS.equals(unitStatus)) {
67.273 - ret = true;
67.274 - break;
67.275 - }
67.276 - }
67.277 - }
67.278 - }
67.279 - }
67.280 -
67.281 - return ret;
67.282 - }
67.283 -
67.284 - public void stop() {
67.285 - AdministrationService adminService = getAdminService();
67.286 -
67.287 - if (adminService != null) {
67.288 - final String assemblyName = getName();
67.289 -
67.290 - String title =
67.291 - NbBundle.getMessage(JBIServiceAssemblyNode.class,
67.292 - "LBL_Stopping_Service_Assembly", // NOI18N
67.293 - new Object[] {assemblyName});
67.294 - final ProgressUI progressUI = new ProgressUI(title, false);
67.295 -
67.296 - SwingUtilities.invokeLater(new Runnable() {
67.297 - public void run() {
67.298 - setBusy(true);
67.299 - progressUI.start();
67.300 - }
67.301 - });
67.302 -
67.303 - final String result = adminService.stopServiceAssembly(assemblyName);
67.304 -
67.305 - SwingUtilities.invokeLater(new Runnable() {
67.306 - public void run() {
67.307 - progressUI.finish();
67.308 - JBIMBeanTaskResultHandler.showRemoteInvokationResult(
67.309 - GenericConstants.STOP_SERVICE_ASSEMBLY_OPERATION_NAME,
67.310 - assemblyName, result);
67.311 - setBusy(false);
67.312 - }
67.313 - });
67.314 -
67.315 - updatePropertySheet();
67.316 - }
67.317 - }
67.318 -
67.319 - //========================== Shutdownable ==================================
67.320 -
67.321 - public boolean canShutdown() {
67.322 -// return !busy && JBIServiceAssemblyStatus.STOP_STATUS.equals(getAssemblyStatus());
67.323 -
67.324 - boolean ret = false;
67.325 -
67.326 - if (!busy) {
67.327 - JBIServiceAssemblyStatus assembly = getAssembly(true); // cached
67.328 - String assemblyStatus = (assembly != null) ? assembly.getStatus() : null;
67.329 -
67.330 - if (JBIServiceAssemblyStatus.STOP_STATUS.equals(assemblyStatus)) {
67.331 - ret = true;
67.332 - } else if (JBIServiceAssemblyStatus.SHUTDOWN_STATUS.equals(assemblyStatus)) {
67.333 - List units = assembly.getJbiServiceUnitStatusList();
67.334 - if (units != null) {
67.335 - for (Iterator it = units.iterator(); it.hasNext();) {
67.336 - JBIServiceUnitStatus unit = (JBIServiceUnitStatus) it.next();
67.337 - String unitStatus = unit.getStatus();
67.338 - if (JBIServiceAssemblyStatus.START_STATUS.equals(unitStatus) ||
67.339 - JBIServiceAssemblyStatus.STOP_STATUS.equals(unitStatus)) {
67.340 - ret = true;
67.341 - break;
67.342 - }
67.343 - }
67.344 - }
67.345 - }
67.346 - }
67.347 -
67.348 - return ret;
67.349 - }
67.350 -
67.351 - public void shutdown() {
67.352 - AdministrationService adminService = getAdminService();
67.353 -
67.354 - if (adminService != null) {
67.355 - final String assemblyName = getName();
67.356 -
67.357 - String title =
67.358 - NbBundle.getMessage(JBIServiceAssemblyNode.class,
67.359 - "LBL_Shutting_Down_Service_Assembly", // NOI18N
67.360 - new Object[] {assemblyName});
67.361 - final ProgressUI progressUI = new ProgressUI(title, false);
67.362 -
67.363 - SwingUtilities.invokeLater(new Runnable() {
67.364 - public void run() {
67.365 - setBusy(true);
67.366 - progressUI.start();
67.367 - }
67.368 - });
67.369 -
67.370 - final String result =
67.371 - adminService.shutdownServiceAssembly(assemblyName);
67.372 -
67.373 - SwingUtilities.invokeLater(new Runnable() {
67.374 - public void run() {
67.375 - progressUI.finish();
67.376 - JBIMBeanTaskResultHandler.showRemoteInvokationResult(
67.377 - GenericConstants.SHUTDOWN_SERVICE_ASSEMBLY_OPERATION_NAME,
67.378 - assemblyName, result);
67.379 - setBusy(false);
67.380 - }
67.381 - });
67.382 -
67.383 - updatePropertySheet();
67.384 - }
67.385 - }
67.386 -
67.387 - //========================== Undeployable =================================
67.388 -
67.389 - public boolean canUndeploy() {
67.390 - String assemblyStatus = getAssemblyStatus(true); // cached
67.391 - return !busy && JBIServiceAssemblyStatus.SHUTDOWN_STATUS.equals(assemblyStatus);
67.392 - }
67.393 -
67.394 - public void undeploy() {
67.395 - AdministrationService adminService = getAdminService();
67.396 -
67.397 - if (adminService != null) {
67.398 - final String assemblyName = getName();
67.399 -
67.400 - String title =
67.401 - NbBundle.getMessage(JBIServiceAssemblyNode.class,
67.402 - "LBL_Undeploying_Service_Assembly", // NOI18N
67.403 - new Object[] {assemblyName});
67.404 - final ProgressUI progressUI = new ProgressUI(title, false);
67.405 -
67.406 - SwingUtilities.invokeLater(new Runnable() {
67.407 - public void run() {
67.408 - setBusy(true);
67.409 - progressUI.start();
67.410 - }
67.411 - });
67.412 -
67.413 - final String result =
67.414 - adminService.undeployServiceAssembly(assemblyName);
67.415 -
67.416 - SwingUtilities.invokeLater(new Runnable() {
67.417 - public void run() {
67.418 - progressUI.finish();
67.419 - JBIMBeanTaskResultHandler.showRemoteInvokationResult(
67.420 - GenericConstants.UNDEPLOY_SERVICE_ASSEMBLY_OPERATION_NAME,
67.421 - assemblyName, result);
67.422 - setBusy(false);
67.423 - }
67.424 - });
67.425 -
67.426 - updatePropertySheet();
67.427 - }
67.428 - }
67.429 -}
68.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/nodes/JBIServiceUnitNode.java Wed Feb 21 08:53:38 2007 +0000
68.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
68.3 @@ -1,101 +0,0 @@
68.4 -/*
68.5 - * The contents of this file are subject to the terms of the Common Development
68.6 - * and Distribution License (the License). You may not use this file except in
68.7 - * compliance with the License.
68.8 - *
68.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
68.10 - * or http://www.netbeans.org/cddl.txt.
68.11 -
68.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
68.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
68.14 - * If applicable, add the following below the CDDL Header, with the fields
68.15 - * enclosed by brackets [] replaced by your own identifying information:
68.16 - * "Portions Copyrighted [year] [name of copyright owner]"
68.17 - *
68.18 - * The Original Software is NetBeans. The Initial Developer of the Original
68.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
68.20 - * Microsystems, Inc. All Rights Reserved.
68.21 - */
68.22 -
68.23 -package org.netbeans.modules.sun.manager.jbi.nodes;
68.24 -
68.25 -import java.awt.Image;
68.26 -import java.util.Map;
68.27 -
68.28 -import javax.management.Attribute;
68.29 -
68.30 -import org.netbeans.modules.sun.manager.jbi.management.model.JBIComponentStatus;
68.31 -import org.netbeans.modules.sun.manager.jbi.management.model.JBIServiceUnitStatus;
68.32 -import org.netbeans.modules.sun.manager.jbi.util.AppserverJBIMgmtController;
68.33 -import org.netbeans.modules.sun.manager.jbi.util.NodeTypes;
68.34 -import org.netbeans.modules.sun.manager.jbi.util.Utils;
68.35 -
68.36 -/**
68.37 - * Node for one JBI Service Unit.
68.38 - *
68.39 - * @author jqian
68.40 - */
68.41 -public class JBIServiceUnitNode extends AppserverJBIMgmtLeafNode {
68.42 -
68.43 - private static final String NODE_TYPE = NodeTypes.SERVICE_UNIT;
68.44 -
68.45 - public JBIServiceUnitNode(final AppserverJBIMgmtController controller,
68.46 - final String name,
68.47 - final String displayName,
68.48 - final String description) {
68.49 - super(controller, NODE_TYPE);
68.50 - setName(name);
68.51 - setDisplayName(displayName);
68.52 - setShortDescription(description);
68.53 - }
68.54 -
68.55 - /**
68.56 - * Return the SheetProperties to be displayed for this JVM.
68.57 - *
68.58 - * @return A java.util.Map containing all JVM properties.
68.59 - */
68.60 - protected Map getSheetProperties() {
68.61 - JBIServiceUnitStatus serviceUnit = getServiceUnitStatus();
68.62 - Map map = Utils.getIntrospectedPropertyMap(serviceUnit, true);
68.63 - return map;
68.64 - }
68.65 -
68.66 - /**
68.67 - *
68.68 - */
68.69 - public Attribute setSheetProperty(String attrName, Object value) {
68.70 - return null;
68.71 - }
68.72 -
68.73 - /**
68.74 - *
68.75 - * @return
68.76 - */
68.77 - private JBIServiceUnitStatus getServiceUnitStatus() {
68.78 - AppserverJBIMgmtController controller = getAppserverJBIMgmtController();
68.79 - String assemblyName = getParentNode().getName();
68.80 - return controller.getJBIServiceUnitStatus(assemblyName, getName());
68.81 - }
68.82 -
68.83 - /**
68.84 - *
68.85 - */
68.86 - public Image getIcon(int type) {
68.87 -
68.88 - String baseIconName = IconConstants.SERVICE_UNIT_ICON;
68.89 -
68.90 - JBIServiceUnitStatus unitStatus = getServiceUnitStatus();
68.91 - String status = (unitStatus == null) ? null : unitStatus.getStatus();
68.92 -
68.93 - String externalBadgeIconName = null;
68.94 - if (JBIComponentStatus.INSTALLED_STATE.equals(status)) {
68.95 - externalBadgeIconName = IconConstants.INSTALLED_ICON;
68.96 - } else if (JBIComponentStatus.STOPPED_STATE.equals(status)) {
68.97 - externalBadgeIconName = IconConstants.STOPPED_ICON;
68.98 - } else if (!JBIComponentStatus.STARTED_STATE.equals(status)) {
68.99 - externalBadgeIconName = IconConstants.UNKNOWN_ICON;
68.100 - }
68.101 -
68.102 - return Utils.getBadgedIcon(getClass(), baseIconName, null, externalBadgeIconName);
68.103 - }
68.104 -}
69.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/nodes/Shutdownable.java Wed Feb 21 08:53:38 2007 +0000
69.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
69.3 @@ -1,38 +0,0 @@
69.4 -/*
69.5 - * The contents of this file are subject to the terms of the Common Development
69.6 - * and Distribution License (the License). You may not use this file except in
69.7 - * compliance with the License.
69.8 - *
69.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
69.10 - * or http://www.netbeans.org/cddl.txt.
69.11 -
69.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
69.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
69.14 - * If applicable, add the following below the CDDL Header, with the fields
69.15 - * enclosed by brackets [] replaced by your own identifying information:
69.16 - * "Portions Copyrighted [year] [name of copyright owner]"
69.17 - *
69.18 - * The Original Software is NetBeans. The Initial Developer of the Original
69.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
69.20 - * Microsystems, Inc. All Rights Reserved.
69.21 - */
69.22 -
69.23 -package org.netbeans.modules.sun.manager.jbi.nodes;
69.24 -
69.25 -
69.26 -/**
69.27 - *
69.28 - * @author jqian
69.29 - */
69.30 -public interface Shutdownable {
69.31 -
69.32 -
69.33 - /**
69.34 - *
69.35 - *
69.36 - */
69.37 - public void shutdown();
69.38 -
69.39 -
69.40 - public boolean canShutdown();
69.41 -}
70.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/nodes/Startable.java Wed Feb 21 08:53:38 2007 +0000
70.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
70.3 @@ -1,39 +0,0 @@
70.4 -/*
70.5 - * The contents of this file are subject to the terms of the Common Development
70.6 - * and Distribution License (the License). You may not use this file except in
70.7 - * compliance with the License.
70.8 - *
70.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
70.10 - * or http://www.netbeans.org/cddl.txt.
70.11 -
70.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
70.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
70.14 - * If applicable, add the following below the CDDL Header, with the fields
70.15 - * enclosed by brackets [] replaced by your own identifying information:
70.16 - * "Portions Copyrighted [year] [name of copyright owner]"
70.17 - *
70.18 - * The Original Software is NetBeans. The Initial Developer of the Original
70.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
70.20 - * Microsystems, Inc. All Rights Reserved.
70.21 - */
70.22 -
70.23 -package org.netbeans.modules.sun.manager.jbi.nodes;
70.24 -
70.25 -
70.26 -/**
70.27 - *
70.28 - * @author jqian
70.29 - */
70.30 -public interface Startable {
70.31 -
70.32 -
70.33 - /**
70.34 - *
70.35 - *
70.36 - */
70.37 - public void start();
70.38 -
70.39 - public boolean canStart();
70.40 -
70.41 -
70.42 -}
71.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/nodes/Stoppable.java Wed Feb 21 08:53:38 2007 +0000
71.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
71.3 @@ -1,38 +0,0 @@
71.4 -/*
71.5 - * The contents of this file are subject to the terms of the Common Development
71.6 - * and Distribution License (the License). You may not use this file except in
71.7 - * compliance with the License.
71.8 - *
71.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
71.10 - * or http://www.netbeans.org/cddl.txt.
71.11 -
71.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
71.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
71.14 - * If applicable, add the following below the CDDL Header, with the fields
71.15 - * enclosed by brackets [] replaced by your own identifying information:
71.16 - * "Portions Copyrighted [year] [name of copyright owner]"
71.17 - *
71.18 - * The Original Software is NetBeans. The Initial Developer of the Original
71.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
71.20 - * Microsystems, Inc. All Rights Reserved.
71.21 - */
71.22 -
71.23 -package org.netbeans.modules.sun.manager.jbi.nodes;
71.24 -
71.25 -
71.26 -/**
71.27 - *
71.28 - * @author jqian
71.29 - */
71.30 -public interface Stoppable {
71.31 -
71.32 -
71.33 - /**
71.34 - *
71.35 - *
71.36 - */
71.37 - public void stop();
71.38 -
71.39 -
71.40 - public boolean canStop();
71.41 -}
72.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/nodes/Undeployable.java Wed Feb 21 08:53:38 2007 +0000
72.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
72.3 @@ -1,39 +0,0 @@
72.4 -/*
72.5 - * The contents of this file are subject to the terms of the Common Development
72.6 - * and Distribution License (the License). You may not use this file except in
72.7 - * compliance with the License.
72.8 - *
72.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
72.10 - * or http://www.netbeans.org/cddl.txt.
72.11 -
72.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
72.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
72.14 - * If applicable, add the following below the CDDL Header, with the fields
72.15 - * enclosed by brackets [] replaced by your own identifying information:
72.16 - * "Portions Copyrighted [year] [name of copyright owner]"
72.17 - *
72.18 - * The Original Software is NetBeans. The Initial Developer of the Original
72.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
72.20 - * Microsystems, Inc. All Rights Reserved.
72.21 - */
72.22 -
72.23 -package org.netbeans.modules.sun.manager.jbi.nodes;
72.24 -
72.25 -
72.26 -/**
72.27 - *
72.28 - * @author jqian
72.29 - */
72.30 -public interface Undeployable {
72.31 -
72.32 -
72.33 - /**
72.34 - *
72.35 - *
72.36 - */
72.37 - public void undeploy();
72.38 -
72.39 - public boolean canUndeploy();
72.40 -
72.41 -
72.42 -}
73.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/nodes/Uninstallable.java Wed Feb 21 08:53:38 2007 +0000
73.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
73.3 @@ -1,37 +0,0 @@
73.4 -/*
73.5 - * The contents of this file are subject to the terms of the Common Development
73.6 - * and Distribution License (the License). You may not use this file except in
73.7 - * compliance with the License.
73.8 - *
73.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
73.10 - * or http://www.netbeans.org/cddl.txt.
73.11 -
73.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
73.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
73.14 - * If applicable, add the following below the CDDL Header, with the fields
73.15 - * enclosed by brackets [] replaced by your own identifying information:
73.16 - * "Portions Copyrighted [year] [name of copyright owner]"
73.17 - *
73.18 - * The Original Software is NetBeans. The Initial Developer of the Original
73.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
73.20 - * Microsystems, Inc. All Rights Reserved.
73.21 - */
73.22 -
73.23 -package org.netbeans.modules.sun.manager.jbi.nodes;
73.24 -
73.25 -
73.26 -/**
73.27 - *
73.28 - * @author jqian
73.29 - */
73.30 -public interface Uninstallable {
73.31 -
73.32 -
73.33 - /**
73.34 - *
73.35 - *
73.36 - */
73.37 - public void uninstall();
73.38 -
73.39 - public boolean canUninstall();
73.40 -}
74.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/util/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
74.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
74.3 @@ -1,22 +0,0 @@
74.4 -#
74.5 -# The contents of this file are subject to the terms of the Common Development
74.6 -# and Distribution License (the License). You may not use this file except in
74.7 -# compliance with the License.
74.8 -#
74.9 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
74.10 -# or http://www.netbeans.org/cddl.txt.
74.11 -
74.12 -# When distributing Covered Code, include this CDDL Header Notice in each file
74.13 -# and include the License file at http://www.netbeans.org/cddl.txt.
74.14 -# If applicable, add the following below the CDDL Header, with the fields
74.15 -# enclosed by brackets [] replaced by your own identifying information:
74.16 -# "Portions Copyrighted [year] [name of copyright owner]"
74.17 -#
74.18 -# The Original Software is NetBeans. The Initial Developer of the Original
74.19 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
74.20 -# Microsystems, Inc. All Rights Reserved.
74.21 -#
74.22 -LBL_JARType=JAR files (*.jar)
74.23 -LBL_ZIPType=ZIP files (*.zip)
74.24 -
74.25 -LBL_JBI_Console=JBI Console
74.26 \ No newline at end of file
75.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/util/ComparableAttribute.java Wed Feb 21 08:53:38 2007 +0000
75.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
75.3 @@ -1,39 +0,0 @@
75.4 -/*
75.5 - * The contents of this file are subject to the terms of the Common Development
75.6 - * and Distribution License (the License). You may not use this file except in
75.7 - * compliance with the License.
75.8 - *
75.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
75.10 - * or http://www.netbeans.org/cddl.txt.
75.11 -
75.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
75.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
75.14 - * If applicable, add the following below the CDDL Header, with the fields
75.15 - * enclosed by brackets [] replaced by your own identifying information:
75.16 - * "Portions Copyrighted [year] [name of copyright owner]"
75.17 - *
75.18 - * The Original Software is NetBeans. The Initial Developer of the Original
75.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
75.20 - * Microsystems, Inc. All Rights Reserved.
75.21 - */
75.22 -
75.23 -package org.netbeans.modules.sun.manager.jbi.util;
75.24 -
75.25 -import javax.management.Attribute;
75.26 -
75.27 -public class ComparableAttribute extends Attribute implements Comparable {
75.28 -
75.29 - /** Creates a new instance of ComparableAttribute */
75.30 - public ComparableAttribute(Attribute attr) {
75.31 - super(attr.getName(), attr.getValue());
75.32 - }
75.33 -
75.34 - public int compareTo(Object another) {
75.35 - if (!(another instanceof Attribute)) {
75.36 - throw new ClassCastException("Wrong class: " + another.getClass().getName()); // NOI18N
75.37 - }
75.38 -
75.39 - Attribute anotherAttr = (Attribute) another;
75.40 - return getName().compareTo(anotherAttr.getName());
75.41 - }
75.42 -}
76.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/util/MBeanUtil.java Wed Feb 21 08:53:38 2007 +0000
76.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
76.3 @@ -1,98 +0,0 @@
76.4 -/*
76.5 - * The contents of this file are subject to the terms of the Common Development
76.6 - * and Distribution License (the License). You may not use this file except in
76.7 - * compliance with the License.
76.8 - *
76.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
76.10 - * or http://www.netbeans.org/cddl.txt.
76.11 -
76.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
76.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
76.14 - * If applicable, add the following below the CDDL Header, with the fields
76.15 - * enclosed by brackets [] replaced by your own identifying information:
76.16 - * "Portions Copyrighted [year] [name of copyright owner]"
76.17 - *
76.18 - * The Original Software is NetBeans. The Initial Developer of the Original
76.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
76.20 - * Microsystems, Inc. All Rights Reserved.
76.21 - */
76.22 -package org.netbeans.modules.sun.manager.jbi.util;
76.23 -
76.24 -import java.util.ArrayList;
76.25 -import java.util.Collection;
76.26 -import java.util.List;
76.27 -import java.util.Set;
76.28 -
76.29 -import javax.management.Attribute;
76.30 -import javax.management.AttributeList;
76.31 -import javax.management.MBeanAttributeInfo;
76.32 -import javax.management.MBeanInfo;
76.33 -import javax.management.MBeanServerConnection;
76.34 -import javax.management.ObjectName;
76.35 -
76.36 -public class MBeanUtil {
76.37 -
76.38 - public ObjectName[] getAllObjectNames(MBeanServerConnection connection) throws Exception {
76.39 - Set<ObjectName> set = (Set<ObjectName>) connection.queryNames(null, null);
76.40 - return (ObjectName[]) set.toArray(new ObjectName[0]);
76.41 - }
76.42 -
76.43 - public String[] getAttributeNames(MBeanServerConnection connection, ObjectName objectName) throws Exception {
76.44 - Collection<String> list = new ArrayList<String>();
76.45 - MBeanInfo info = connection.getMBeanInfo(objectName);
76.46 - MBeanAttributeInfo[] attributes = info.getAttributes();
76.47 - for (int i = 0; i < attributes.length; i++) {
76.48 - MBeanAttributeInfo attributeInfo = (MBeanAttributeInfo) attributes[i];
76.49 - String attributeName = attributeInfo.getName();
76.50 - list.add(attributeName);
76.51 - }
76.52 - return list.toArray(new String[0]);
76.53 - }
76.54 -
76.55 - public Object getAttributeValue(MBeanServerConnection connection, ObjectName objectName, String attributeName) throws Exception {
76.56 - return connection.getAttribute(objectName, attributeName);
76.57 - }
76.58 -
76.59 - public Object[] getAttributeValues(MBeanServerConnection connection, ObjectName name, String[] attributeNames) throws Exception {
76.60 - Collection<Object> list = new ArrayList<Object>();
76.61 - Attribute[] attributes = getAttributes(connection, name, attributeNames);
76.62 - for (int i = 0; i < attributes.length; i++) {
76.63 - Attribute attribute = attributes[i];
76.64 - list.add(attribute.getValue());
76.65 - }
76.66 - return list.toArray(new Object[0]);
76.67 - }
76.68 -
76.69 - public Attribute[] getAttributes(MBeanServerConnection connection, ObjectName objectName, String[] attributeNames) throws Exception {
76.70 - List<Attribute> list = (List<Attribute>) connection.getAttributes(objectName, attributeNames);
76.71 - return (Attribute[]) list.toArray(new Attribute[0]);
76.72 - }
76.73 -
76.74 - public void print(MBeanServerConnection connection) throws Exception {
76.75 - print(connection, null, null, null);
76.76 - }
76.77 -
76.78 - public void print(MBeanServerConnection connection, String objectNameFilter, String attributeNameFilter, String attributeValueFilter) throws Exception {
76.79 - ObjectName[] objectNames = getAllObjectNames(connection);
76.80 - for (int i = 0; i < objectNames.length; i++) {
76.81 - ObjectName objectName = objectNames[i];
76.82 - if (objectNameFilter == null || String.valueOf(objectName).indexOf(objectNameFilter)!=-1) {
76.83 - String[] attributeNames = getAttributeNames(connection, objectName);
76.84 - for (int j = 0; j < attributeNames.length; j++) {
76.85 - String attributeName = attributeNames[j];
76.86 - if (attributeNameFilter == null || attributeName.indexOf(attributeNameFilter)!=-1) {
76.87 - Object attributeValue;
76.88 - try {
76.89 - attributeValue = getAttributeValue(connection, objectName, attributeName);
76.90 - } catch (Exception e) {
76.91 - attributeValue = e.getMessage();
76.92 - }
76.93 - if (attributeValueFilter == null || String.valueOf(attributeValue).indexOf(attributeValueFilter)!=-1) {
76.94 - System.out.println("objectName: " + objectName + " attributeName: " + attributeName + " attributeValue: " + attributeValue); // NOI18N
76.95 - }
76.96 - }
76.97 - }
76.98 - }
76.99 - }
76.100 - }
76.101 -}
77.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/util/ProgressUI.java Wed Feb 21 08:53:38 2007 +0000
77.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
77.3 @@ -1,228 +0,0 @@
77.4 -/*
77.5 - * The contents of this file are subject to the terms of the Common Development
77.6 - * and Distribution License (the License). You may not use this file except in
77.7 - * compliance with the License.
77.8 - *
77.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
77.10 - * or http://www.netbeans.org/cddl.txt.
77.11 -
77.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
77.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
77.14 - * If applicable, add the following below the CDDL Header, with the fields
77.15 - * enclosed by brackets [] replaced by your own identifying information:
77.16 - * "Portions Copyrighted [year] [name of copyright owner]"
77.17 - *
77.18 - * The Original Software is NetBeans. The Initial Developer of the Original
77.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
77.20 - * Microsystems, Inc. All Rights Reserved.
77.21 - */
77.22 -
77.23 -package org.netbeans.modules.sun.manager.jbi.util;
77.24 -
77.25 -import java.awt.GridBagConstraints;
77.26 -import java.awt.Insets;
77.27 -import java.awt.event.ActionEvent;
77.28 -import java.awt.event.ActionListener;
77.29 -
77.30 -import javax.enterprise.deploy.shared.StateType;
77.31 -import javax.enterprise.deploy.spi.status.DeploymentStatus;
77.32 -import javax.enterprise.deploy.spi.status.ProgressEvent;
77.33 -import javax.enterprise.deploy.spi.status.ProgressListener;
77.34 -import javax.enterprise.deploy.spi.status.ProgressObject;
77.35 -import javax.swing.JButton;
77.36 -import javax.swing.JComponent;
77.37 -import javax.swing.JDialog;
77.38 -import javax.swing.JLabel;
77.39 -import javax.swing.JPanel;
77.40 -
77.41 -import org.netbeans.api.progress.ProgressHandle;
77.42 -import org.netbeans.api.progress.ProgressHandleFactory;
77.43 -import org.netbeans.modules.sun.manager.jbi.util.Utils;
77.44 -import org.openide.util.NbBundle;
77.45 -//import org.openide.util.Utilities;
77.46 -//import org.openide.windows.WindowManager;
77.47 -
77.48 -
77.49 -/**
77.50 - * Progress UI provides a feedback for long lasting taks like deploying to a server,
77.51 - * starting or stopping a server, etc. The progress bar is indeterminate, displayed
77.52 - * in the status bar if in non-modal mode, otherwise in a modal dialog.
77.53 - *
77.54 - * @author sherold
77.55 - */
77.56 -public class ProgressUI implements ProgressListener {
77.57 -
77.58 - private String title;
77.59 - private boolean modal;
77.60 -// private Deployment.Logger logger;
77.61 -
77.62 - private ProgressHandle handle;
77.63 - private ProgressObject progObj;
77.64 -
77.65 - private JDialog dialog;
77.66 - private JLabel messageLabel;
77.67 - private String lastMessage;
77.68 - private JComponent progressComponent;
77.69 - private boolean finished;
77.70 -
77.71 - /** Creates a new instance of ProgressUI */
77.72 - public ProgressUI(String title, boolean modal) {
77.73 -// this(title, modal, null);
77.74 -// }
77.75 -//
77.76 -// public ProgressUI(String title, boolean modal, Deployment.Logger logger) {
77.77 - this.modal = modal;
77.78 - this.title = title;
77.79 -// this.logger = logger;
77.80 - handle = ProgressHandleFactory.createHandle(title);
77.81 - }
77.82 -
77.83 - /** Start the progress indication for indeterminate task. */
77.84 - public void start() {
77.85 - if (modal) {
77.86 - progressComponent = ProgressHandleFactory.createProgressComponent(handle);
77.87 - }
77.88 - handle.start();
77.89 - }
77.90 -
77.91 - /** Display the modal progress dialog. This method should be called from the
77.92 - AWT Event Dispatch thread. */
77.93 -// public void showProgressDialog() {
77.94 -// if (finished) {
77.95 -// return; // do not display the dialog if we are done
77.96 -// }
77.97 -// dialog = new JDialog(WindowManager.getDefault().getMainWindow(), title, true);
77.98 -// dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
77.99 -// dialog.getContentPane().add(createProgressDialog(
77.100 -// handle,
77.101 -// lastMessage != null ? lastMessage : title));
77.102 -// dialog.pack();
77.103 -// dialog.setBounds(Utilities.findCenterBounds(dialog.getSize()));
77.104 -// dialog.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
77.105 -// dialog.setVisible(true);
77.106 -// }
77.107 -
77.108 - /** Displays a specified progress message. */
77.109 - public void progress(final String message) {
77.110 - handle.progress(message);
77.111 - if (modal) {
77.112 - Utils.runInEventDispatchThread(new Runnable() {
77.113 - public void run() {
77.114 - if (messageLabel != null) {
77.115 - messageLabel.setText(message);
77.116 - } else {
77.117 - lastMessage = message;
77.118 - }
77.119 - }
77.120 - });
77.121 - }
77.122 -// log(message);
77.123 - }
77.124 -
77.125 - /** Finish the task, unregister the progress object listener and dispose the ui. */
77.126 - public void finish() {
77.127 - handle.finish();
77.128 - if (progObj != null) {
77.129 - progObj.removeProgressListener(this);
77.130 - progObj = null;
77.131 - }
77.132 - Utils.runInEventDispatchThread(new Runnable() {
77.133 - public void run() {
77.134 - finished = true;
77.135 - if (dialog != null) {
77.136 - dialog.setVisible(false);
77.137 - dialog.dispose();
77.138 - dialog = null;
77.139 - }
77.140 - }
77.141 - });
77.142 - }
77.143 -
77.144 - /** Display a failure dialog with the specified message and call finish. */
77.145 - public void failed(String message) {
77.146 - finish();
77.147 -// if (logger != null) {
77.148 -// log(message);
77.149 -// }
77.150 - }
77.151 -
77.152 - /** Set a progress object this progress UI will monitor. */
77.153 - public void setProgressObject(ProgressObject obj) {
77.154 - // do not listen to the old progress object anymore
77.155 - if (progObj != null) {
77.156 - progObj.removeProgressListener(this);
77.157 - }
77.158 - progObj = obj;
77.159 - if (progObj != null) {
77.160 - progObj.addProgressListener(this);
77.161 - }
77.162 - }
77.163 -
77.164 -// /** Set a logger to where all the progress messages will be copied. */
77.165 -// public void setLogger(Deployment.Logger logger) {
77.166 -// this.logger = logger;
77.167 -// }
77.168 -//
77.169 -// // private helper methods
77.170 -//
77.171 -// private void log(String msg) {
77.172 -// if (logger != null && msg != null) {
77.173 -// logger.log(msg);
77.174 -// }
77.175 -// }
77.176 -
77.177 - private JComponent createProgressDialog(ProgressHandle handle, String message) {
77.178 - JPanel panel = new JPanel();
77.179 - messageLabel = new JLabel();
77.180 -
77.181 - panel.setLayout(new java.awt.GridBagLayout());
77.182 -
77.183 - messageLabel.setText(message);
77.184 - GridBagConstraints gridBagConstraints = new GridBagConstraints();
77.185 - gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
77.186 - gridBagConstraints.insets = new Insets(12, 12, 0, 12);
77.187 - panel.add(messageLabel, gridBagConstraints);
77.188 -
77.189 - gridBagConstraints = new GridBagConstraints();
77.190 - gridBagConstraints.gridx = 0;
77.191 - gridBagConstraints.gridy = 1;
77.192 - gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
77.193 - gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
77.194 - gridBagConstraints.weightx = 1.0;
77.195 - gridBagConstraints.insets = new Insets(5, 12, 0, 12);
77.196 - panel.add(progressComponent, gridBagConstraints);
77.197 -
77.198 - gridBagConstraints = new GridBagConstraints();
77.199 - gridBagConstraints.gridx = 0;
77.200 - gridBagConstraints.gridy = 2;
77.201 - gridBagConstraints.anchor = GridBagConstraints.CENTER;
77.202 - gridBagConstraints.weightx = 1.0;
77.203 - gridBagConstraints.insets = new Insets(11, 12, 12, 12);
77.204 - JButton cancel = new JButton(NbBundle.getMessage(ProgressUI.class,"LBL_Cancel")); // NOI18N
77.205 - cancel.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(ProgressUI.class,"AD_Cancel")); // NOI18N
77.206 - cancel.addActionListener(new ActionListener() {
77.207 - public void actionPerformed(ActionEvent e) {
77.208 - finish();
77.209 - }
77.210 - });
77.211 - panel.add(cancel, gridBagConstraints);
77.212 -
77.213 - return panel;
77.214 - }
77.215 -
77.216 - // ProgressListener implementation ----------------------------------------
77.217 -
77.218 - public void handleProgressEvent(ProgressEvent progressEvent) {
77.219 - DeploymentStatus status = progressEvent.getDeploymentStatus();
77.220 - StateType state = status.getState();
77.221 - if (state == StateType.COMPLETED) {
77.222 - progress(status.getMessage());
77.223 - } else if (state == StateType.RUNNING) {
77.224 - progress(status.getMessage());
77.225 - } else if (state == StateType.FAILED) {
77.226 - failed(status.getMessage());
77.227 - } else if (state == StateType.RELEASED) {
77.228 - failed(status.getMessage());
77.229 - }
77.230 - }
77.231 -}
78.1 --- a/compapp.manager.jbi/src/org/netbeans/modules/sun/manager/jbi/util/Utils.java Wed Feb 21 08:53:38 2007 +0000
78.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
78.3 @@ -1,168 +0,0 @@
78.4 -/*
78.5 - * The contents of this file are subject to the terms of the Common Development
78.6 - * and Distribution License (the License). You may not use this file except in
78.7 - * compliance with the License.
78.8 - *
78.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
78.10 - * or http://www.netbeans.org/cddl.txt.
78.11 -
78.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
78.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
78.14 - * If applicable, add the following below the CDDL Header, with the fields
78.15 - * enclosed by brackets [] replaced by your own identifying information:
78.16 - * "Portions Copyrighted [year] [name of copyright owner]"
78.17 - *
78.18 - * The Original Software is NetBeans. The Initial Developer of the Original
78.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
78.20 - * Microsystems, Inc. All Rights Reserved.
78.21 - */
78.22 -
78.23 -package org.netbeans.modules.sun.manager.jbi.util;
78.24 -
78.25 -import java.awt.Image;
78.26 -import java.beans.BeanInfo;
78.27 -import java.beans.IntrospectionException;
78.28 -import java.beans.Introspector;
78.29 -import java.beans.PropertyDescriptor;
78.30 -import java.io.StringReader;
78.31 -import java.lang.reflect.InvocationTargetException;
78.32 -import java.lang.reflect.Method;
78.33 -import java.util.HashMap;
78.34 -import java.util.List;
78.35 -import java.util.Map;
78.36 -import java.util.TreeMap;
78.37 -
78.38 -import javax.management.Attribute;
78.39 -import javax.management.MBeanAttributeInfo;
78.40 -import javax.swing.ImageIcon;
78.41 -import javax.swing.SwingUtilities;
78.42 -import javax.xml.parsers.DocumentBuilder;
78.43 -import javax.xml.parsers.DocumentBuilderFactory;
78.44 -import javax.xml.xpath.XPath;
78.45 -import javax.xml.xpath.XPathConstants;
78.46 -import javax.xml.xpath.XPathFactory;
78.47 -import org.netbeans.modules.sun.manager.jbi.management.JBIMBeanTaskResultHandler;
78.48 -
78.49 -import org.netbeans.modules.sun.manager.jbi.nodes.JBIComponentNode;
78.50 -import org.openide.DialogDisplayer;
78.51 -import org.openide.NotifyDescriptor;
78.52 -import org.openide.util.NbBundle;
78.53 -import org.openide.util.Utilities;
78.54 -import org.openide.windows.IOProvider;
78.55 -import org.openide.windows.InputOutput;
78.56 -import org.openide.windows.OutputWriter;
78.57 -import org.w3c.dom.Document;
78.58 -import org.w3c.dom.Node;
78.59 -import org.w3c.dom.NodeList;
78.60 -import org.xml.sax.InputSource;
78.61 -
78.62 -/**
78.63 - *
78.64 - * @author jqian
78.65 - */
78.66 -public class Utils {
78.67 -
78.68 - public static Image getBadgedIcon(Class clazz, String iconName,
78.69 - String internalBadgeIconName, String externalBadgeIconName) {
78.70 -
78.71 - Image ret = new ImageIcon(clazz.getResource(iconName)).getImage();
78.72 -
78.73 - if (internalBadgeIconName != null) {
78.74 - Image internalBadgeImg = new ImageIcon(clazz.getResource(internalBadgeIconName)).getImage();
78.75 - ret = Utilities.mergeImages(ret, internalBadgeImg, 7, 7);
78.76 - }
78.77 -
78.78 - if (externalBadgeIconName != null) {
78.79 - Image externalBadgeImg = new ImageIcon(clazz.getResource(externalBadgeIconName)).getImage();
78.80 - ret = Utilities.mergeImages(ret, externalBadgeImg, 15, 8);
78.81 - }
78.82 -
78.83 - return ret;
78.84 - }
78.85 -
78.86 - /**
78.87 - * Ensure that the specified ruannable task will run only in the event dispatch
78.88 - * thread.
78.89 - */
78.90 - public static void runInEventDispatchThread(Runnable runnable) {
78.91 - if (SwingUtilities.isEventDispatchThread()) {
78.92 - runnable.run();
78.93 - } else {
78.94 - SwingUtilities.invokeLater(runnable);
78.95 - }
78.96 - }
78.97 -
78.98 - public static Map<Attribute, MBeanAttributeInfo> getIntrospectedPropertyMap(Object bean) {
78.99 - return getIntrospectedPropertyMap(bean, false);
78.100 - }
78.101 -
78.102 - public static Map<Attribute, MBeanAttributeInfo> getIntrospectedPropertyMap(Object bean, boolean sort) {
78.103 -
78.104 - Class beanClass = bean.getClass();
78.105 - BeanInfo beanInfo = null;
78.106 - try {
78.107 - beanInfo = Introspector.getBeanInfo(beanClass, Object.class);
78.108 - } catch (IntrospectionException ex) {
78.109 - System.err.println("Couldn't introspect " + beanClass.getName()); // NOI18N
78.110 - return null;
78.111 - }
78.112 -
78.113 -// Map map = sort ? new TreeMap() : new HashMap(); // NB IDE BUG
78.114 -
78.115 - Map<Attribute, MBeanAttributeInfo> map = null;
78.116 - if (sort) {
78.117 - map = new TreeMap<Attribute, MBeanAttributeInfo>();
78.118 - } else {
78.119 - map = new HashMap<Attribute, MBeanAttributeInfo>();
78.120 - }
78.121 -
78.122 - PropertyDescriptor[] propDescriptors = beanInfo.getPropertyDescriptors();
78.123 -
78.124 - for (int i = 0; i < propDescriptors.length; i++) {
78.125 - Class propertyTypeClass = propDescriptors[i].getPropertyType();
78.126 - Method readMethod = propDescriptors[i].getReadMethod();
78.127 - Method writeMethod = propDescriptors[i].getWriteMethod();
78.128 -
78.129 - if (readMethod != null) {
78.130 - String propertyType = propertyTypeClass.getName();
78.131 - String propertyName = propDescriptors[i].getName();
78.132 - String propertyDesc = propDescriptors[i].getShortDescription();
78.133 - Object propertyValue = null;
78.134 - try {
78.135 - propertyValue = readMethod.invoke(bean, (Object[])null);
78.136 - } catch (IllegalArgumentException e) {
78.137 - e.printStackTrace();
78.138 - } catch (IllegalAccessException e) {
78.139 - e.printStackTrace();
78.140 - } catch (InvocationTargetException e) {
78.141 - e.printStackTrace();
78.142 - }
78.143 - Attribute attr = new Attribute(propertyName, propertyValue);
78.144 - if (sort) {
78.145 - attr = new ComparableAttribute(attr);
78.146 - }
78.147 - map.put(attr,
78.148 - new MBeanAttributeInfo(propertyName, propertyType,
78.149 - propertyDesc,
78.150 - readMethod != null, writeMethod != null,
78.151 - readMethod.getName().startsWith("is"))); // NOI18N
78.152 - }
78.153 - }
78.154 -
78.155 - return map;
78.156 - }
78.157 -
78.158 - private static Document getDocument(String xmlString) {
78.159 - try {
78.160 - DocumentBuilderFactory documentBuilderFactory =
78.161 - DocumentBuilderFactory.newInstance();
78.162 - DocumentBuilder documentBuilder =
78.163 - documentBuilderFactory.newDocumentBuilder();
78.164 - return documentBuilder.parse(new InputSource(new StringReader(xmlString)));
78.165 -
78.166 - } catch (Exception e) {
78.167 - System.out.println("Error parsing XML string: " + e); // NOI18N
78.168 - return null;
78.169 - }
78.170 - }
78.171 -}
79.1 --- a/soa.ui/build.xml Wed Feb 21 08:53:38 2007 +0000
79.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
79.3 @@ -1,28 +0,0 @@
79.4 -<?xml version="1.0" encoding="UTF-8"?>
79.5 -<!--
79.6 - The contents of this file are subject to the terms of the Common Development
79.7 - and Distribution License (the License). You may not use this file except in
79.8 - compliance with the License.
79.9 -
79.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
79.11 - or http://www.netbeans.org/cddl.txt.
79.12 -
79.13 - When distributing Covered Code, include this CDDL Header Notice in each file
79.14 - and include the License file at http://www.netbeans.org/cddl.txt.
79.15 - If applicable, add the following below the CDDL Header, with the fields
79.16 - enclosed by brackets [] replaced by your own identifying information:
79.17 - "Portions Copyrighted [year] [name of copyright owner]"
79.18 -
79.19 - The Original Software is NetBeans. The Initial Developer of the Original
79.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
79.21 - Microsystems, Inc. All Rights Reserved.
79.22 --->
79.23 -<project name="ui" default="netbeans" basedir=".">
79.24 - <import file="nbproject/build-impl.xml"/>
79.25 -
79.26 - <target name="check">
79.27 - <ant dir="../../../_codereview" inheritAll="true">
79.28 - <property name="check.dir" value="${basedir}"/>
79.29 - </ant>
79.30 - </target>
79.31 -</project>
80.1 --- a/soa.ui/manifest.mf Wed Feb 21 08:53:38 2007 +0000
80.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
80.3 @@ -1,4 +0,0 @@
80.4 -Manifest-Version: 1.0
80.5 -OpenIDE-Module: org.netbeans.modules.soa.ui/1
80.6 -OpenIDE-Module-Specification-Version: 1.1
80.7 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/soa/ui/resources/Bundle.properties
81.1 --- a/soa.ui/nbproject/project.properties Wed Feb 21 08:53:38 2007 +0000
81.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
81.3 @@ -1,19 +0,0 @@
81.4 -#
81.5 -# The contents of this file are subject to the terms of the Common Development
81.6 -# and Distribution License (the License). You may not use this file except in
81.7 -# compliance with the License.
81.8 -#
81.9 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
81.10 -# or http://www.netbeans.org/cddl.txt.
81.11 -#
81.12 -# When distributing Covered Code, include this CDDL Header Notice in each file
81.13 -# and include the License file at http://www.netbeans.org/cddl.txt.
81.14 -# If applicable, add the following below the CDDL Header, with the fields
81.15 -# enclosed by brackets [] replaced by your own identifying information:
81.16 -# "Portions Copyrighted [year] [name of copyright owner]"
81.17 -#
81.18 -# The Original Software is NetBeans. The Initial Developer of the Original
81.19 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
81.20 -# Microsystems, Inc. All Rights Reserved.
81.21 -
81.22 -javac.source=1.5
82.1 --- a/soa.ui/nbproject/project.xml Wed Feb 21 08:53:38 2007 +0000
82.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
82.3 @@ -1,110 +0,0 @@
82.4 -<?xml version="1.0" encoding="UTF-8"?>
82.5 -<!--
82.6 - The contents of this file are subject to the terms of the Common Development
82.7 - and Distribution License (the License). You may not use this file except in
82.8 - compliance with the License.
82.9 -
82.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
82.11 - or http://www.netbeans.org/cddl.txt.
82.12 -
82.13 - When distributing Covered Code, include this CDDL Header Notice in each file
82.14 - and include the License file at http://www.netbeans.org/cddl.txt.
82.15 - If applicable, add the following below the CDDL Header, with the fields
82.16 - enclosed by brackets [] replaced by your own identifying information:
82.17 - "Portions Copyrighted [year] [name of copyright owner]"
82.18 -
82.19 - The Original Software is NetBeans. The Initial Developer of the Original
82.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
82.21 - Microsystems, Inc. All Rights Reserved.
82.22 --->
82.23 -<project xmlns="http://www.netbeans.org/ns/project/1">
82.24 - <type>org.netbeans.modules.apisupport.project</type>
82.25 - <configuration>
82.26 - <data xmlns="http://www.netbeans.org/ns/nb-module-project/2">
82.27 - <code-name-base>org.netbeans.modules.soa.ui</code-name-base>
82.28 - <suite-component/>
82.29 - <module-dependencies>
82.30 - <dependency>
82.31 - <code-name-base>org.netbeans.modules.xml.axi</code-name-base>
82.32 - <build-prerequisite/>
82.33 - <compile-dependency/>
82.34 - <run-dependency>
82.35 - <specification-version>1.2</specification-version>
82.36 - </run-dependency>
82.37 - </dependency>
82.38 - <dependency>
82.39 - <code-name-base>org.netbeans.modules.xml.schema.model</code-name-base>
82.40 - <build-prerequisite/>
82.41 - <compile-dependency/>
82.42 - <run-dependency>
82.43 - <release-version>1</release-version>
82.44 - <specification-version>1.1.21</specification-version>
82.45 - </run-dependency>
82.46 - </dependency>
82.47 - <dependency>
82.48 - <code-name-base>org.netbeans.modules.xml.wsdl.model</code-name-base>
82.49 - <build-prerequisite/>
82.50 - <compile-dependency/>
82.51 - <run-dependency>
82.52 - <release-version>1</release-version>
82.53 - <specification-version>1.1.21</specification-version>
82.54 - </run-dependency>
82.55 - </dependency>
82.56 - <dependency>
82.57 - <code-name-base>org.netbeans.modules.xml.xam</code-name-base>
82.58 - <build-prerequisite/>
82.59 - <compile-dependency/>
82.60 - <run-dependency>
82.61 - <release-version>1</release-version>
82.62 - <specification-version>1.1.21</specification-version>
82.63 - </run-dependency>
82.64 - </dependency>
82.65 - <dependency>
82.66 - <code-name-base>org.openide.dialogs</code-name-base>
82.67 - <build-prerequisite/>
82.68 - <compile-dependency/>
82.69 - <run-dependency>
82.70 - <specification-version>6.5.22</specification-version>
82.71 - </run-dependency>
82.72 - </dependency>
82.73 - <dependency>
82.74 - <code-name-base>org.openide.explorer</code-name-base>
82.75 - <build-prerequisite/>
82.76 - <compile-dependency/>
82.77 - <run-dependency>
82.78 - <specification-version>6.5.22</specification-version>
82.79 - </run-dependency>
82.80 - </dependency>
82.81 - <dependency>
82.82 - <code-name-base>org.openide.nodes</code-name-base>
82.83 - <build-prerequisite/>
82.84 - <compile-dependency/>
82.85 - <run-dependency>
82.86 - <specification-version>6.7.22</specification-version>
82.87 - </run-dependency>
82.88 - </dependency>
82.89 - <dependency>
82.90 - <code-name-base>org.openide.util</code-name-base>
82.91 - <build-prerequisite/>
82.92 - <compile-dependency/>
82.93 - <run-dependency>
82.94 - <specification-version>6.2</specification-version>
82.95 - </run-dependency>
82.96 - </dependency>
82.97 - </module-dependencies>
82.98 - <friend-packages>
82.99 - <friend>org.netbeans.modules.bpel.core</friend>
82.100 - <friend>org.netbeans.modules.bpel.debugger</friend>
82.101 - <friend>org.netbeans.modules.bpel.editors</friend>
82.102 - <friend>org.netbeans.modules.bpel.editors.api</friend>
82.103 - <friend>org.netbeans.modules.bpel.xpath</friend>
82.104 - <friend>org.netbeans.modules.xslt.mapper</friend>
82.105 - <package>org.netbeans.modules.soa.ui</package>
82.106 - <package>org.netbeans.modules.soa.ui.axinodes</package>
82.107 - <package>org.netbeans.modules.soa.ui.form</package>
82.108 - <package>org.netbeans.modules.soa.ui.form.valid</package>
82.109 - <package>org.netbeans.modules.soa.ui.nodes</package>
82.110 - </friend-packages>
82.111 - </data>
82.112 - </configuration>
82.113 -</project>
83.1 --- a/soa.ui/src/org/netbeans/modules/soa/ui/resources/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
83.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
83.3 @@ -1,23 +0,0 @@
83.4 -#
83.5 -# The contents of this file are subject to the terms of the Common Development
83.6 -# and Distribution License (the License). You may not use this file except in
83.7 -# compliance with the License.
83.8 -#
83.9 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
83.10 -# or http://www.netbeans.org/cddl.txt.
83.11 -#
83.12 -# When distributing Covered Code, include this CDDL Header Notice in each file
83.13 -# and include the License file at http://www.netbeans.org/cddl.txt.
83.14 -# If applicable, add the following below the CDDL Header, with the fields
83.15 -# enclosed by brackets [] replaced by your own identifying information:
83.16 -# "Portions Copyrighted [year] [name of copyright owner]"
83.17 -#
83.18 -# The Original Software is NetBeans. The Initial Developer of the Original
83.19 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
83.20 -# Microsystems, Inc. All Rights Reserved.
83.21 -
83.22 -# manifest
83.23 -OpenIDE-Module-Name=SOA UI
83.24 -OpenIDE-Module-Display-Category=Service-Oriented Architecture
83.25 -OpenIDE-Module-Short-Description=SOA UI.
83.26 -OpenIDE-Module-Long-Description=SOA UI.
84.1 --- a/xslt.core/build.xml Wed Feb 21 08:53:38 2007 +0000
84.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
84.3 @@ -1,8 +0,0 @@
84.4 -<?xml version="1.0" encoding="UTF-8"?>
84.5 -<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
84.6 -<!-- for some information on what you could do (e.g. targets to override). -->
84.7 -<!-- If you delete this file and reopen the project it will be recreated. -->
84.8 -<project name="org.netbeans.modules.xslt.core" default="netbeans" basedir=".">
84.9 - <description>Builds, tests, and runs the project org.netbeans.modules.xslt.core.</description>
84.10 - <import file="nbproject/build-impl.xml"/>
84.11 -</project>
85.1 --- a/xslt.core/manifest.mf Wed Feb 21 08:53:38 2007 +0000
85.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
85.3 @@ -1,10 +0,0 @@
85.4 -Manifest-Version: 1.0
85.5 -OpenIDE-Module: org.netbeans.modules.xslt.core/1
85.6 -OpenIDE-Module-Layer: org/netbeans/modules/xslt/core/resources/layer.xml
85.7 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/xslt/core/resources/Bundle.properties
85.8 -OpenIDE-Module-Specification-Version: 1.0
85.9 -
85.10 -Name: org/netbeans/modules/xslt/core/XSLTDataLoader.class
85.11 -Install-Before: org.netbeans.modules.xsl.XSLDataObject, org.openide.loaders.XMLDataObject, org.netbeans.modules.xml.core.XMLDataObject
85.12 -OpenIDE-Module-Class: Loader
85.13 -
86.1 --- a/xslt.core/nbproject/project.properties Wed Feb 21 08:53:38 2007 +0000
86.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
86.3 @@ -1,20 +0,0 @@
86.4 -#
86.5 -# The contents of this file are subject to the terms of the Common Development
86.6 -# and Distribution License (the License). You may not use this file except in
86.7 -# compliance with the License.
86.8 -#
86.9 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
86.10 -# or http://www.netbeans.org/cddl.txt.
86.11 -#
86.12 -# When distributing Covered Code, include this CDDL Header Notice in each file
86.13 -# and include the License file at http://www.netbeans.org/cddl.txt.
86.14 -# If applicable, add the following below the CDDL Header, with the fields
86.15 -# enclosed by brackets [] replaced by your own identifying information:
86.16 -# "Portions Copyrighted [year] [name of copyright owner]"
86.17 -#
86.18 -# The Original Software is NetBeans. The Initial Developer of the Original
86.19 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
86.20 -# Microsystems, Inc. All Rights Reserved.
86.21 -
86.22 -javac.source=1.5
86.23 -javadoc.arch=${basedir}/arch.xml
87.1 --- a/xslt.core/nbproject/project.xml Wed Feb 21 08:53:38 2007 +0000
87.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
87.3 @@ -1,226 +0,0 @@
87.4 -<?xml version="1.0" encoding="UTF-8"?>
87.5 -<project xmlns="http://www.netbeans.org/ns/project/1">
87.6 - <type>org.netbeans.modules.apisupport.project</type>
87.7 - <configuration>
87.8 - <data xmlns="http://www.netbeans.org/ns/nb-module-project/2">
87.9 - <code-name-base>org.netbeans.modules.xslt.core</code-name-base>
87.10 - <suite-component/>
87.11 - <module-dependencies>
87.12 - <dependency>
87.13 - <code-name-base>org.netbeans.api.xml</code-name-base>
87.14 - <build-prerequisite/>
87.15 - <compile-dependency/>
87.16 - <run-dependency>
87.17 - <release-version>1</release-version>
87.18 - <specification-version>1.13.21</specification-version>
87.19 - </run-dependency>
87.20 - </dependency>
87.21 - <dependency>
87.22 - <code-name-base>org.netbeans.core.multiview</code-name-base>
87.23 - <build-prerequisite/>
87.24 - <compile-dependency/>
87.25 - <run-dependency>
87.26 - <release-version>1</release-version>
87.27 - <specification-version>1.7.1</specification-version>
87.28 - </run-dependency>
87.29 - </dependency>
87.30 - <dependency>
87.31 - <code-name-base>org.netbeans.modules.print.api</code-name-base>
87.32 - <build-prerequisite/>
87.33 - <compile-dependency/>
87.34 - <run-dependency>
87.35 - <release-version>1</release-version>
87.36 - <specification-version>1.1</specification-version>
87.37 - </run-dependency>
87.38 - </dependency>
87.39 - <dependency>
87.40 - <code-name-base>org.netbeans.modules.projectapi</code-name-base>
87.41 - <build-prerequisite/>
87.42 - <compile-dependency/>
87.43 - <run-dependency>
87.44 - <release-version>1</release-version>
87.45 - </run-dependency>
87.46 - </dependency>
87.47 - <dependency>
87.48 - <code-name-base>org.netbeans.modules.soa.mapper</code-name-base>
87.49 - <build-prerequisite/>
87.50 - <compile-dependency/>
87.51 - <run-dependency>
87.52 - <specification-version>1.0</specification-version>
87.53 - </run-dependency>
87.54 - </dependency>
87.55 - <dependency>
87.56 - <code-name-base>org.netbeans.modules.soa.ui</code-name-base>
87.57 - <build-prerequisite/>
87.58 - <compile-dependency/>
87.59 - <run-dependency>
87.60 - <release-version>1</release-version>
87.61 - <specification-version>1.1</specification-version>
87.62 - </run-dependency>
87.63 - </dependency>
87.64 - <dependency>
87.65 - <code-name-base>org.netbeans.modules.xml.axi</code-name-base>
87.66 - <build-prerequisite/>
87.67 - <compile-dependency/>
87.68 - <run-dependency>
87.69 - <specification-version>1.2</specification-version>
87.70 - </run-dependency>
87.71 - </dependency>
87.72 - <dependency>
87.73 - <code-name-base>org.netbeans.modules.xml.core</code-name-base>
87.74 - <build-prerequisite/>
87.75 - <compile-dependency/>
87.76 - <run-dependency>
87.77 - <release-version>2</release-version>
87.78 - <specification-version>1.12.21.4</specification-version>
87.79 - </run-dependency>
87.80 - </dependency>
87.81 - <dependency>
87.82 - <code-name-base>org.netbeans.modules.xml.retriever</code-name-base>
87.83 - <build-prerequisite/>
87.84 - <compile-dependency/>
87.85 - <run-dependency>
87.86 - <release-version>1</release-version>
87.87 - </run-dependency>
87.88 - </dependency>
87.89 - <dependency>
87.90 - <code-name-base>org.netbeans.modules.xml.schema.model</code-name-base>
87.91 - <build-prerequisite/>
87.92 - <compile-dependency/>
87.93 - <run-dependency>
87.94 - <release-version>1</release-version>
87.95 - <specification-version>1.1.21</specification-version>
87.96 - </run-dependency>
87.97 - </dependency>
87.98 - <dependency>
87.99 - <code-name-base>org.netbeans.modules.xml.validation</code-name-base>
87.100 - <build-prerequisite/>
87.101 - <compile-dependency/>
87.102 - <run-dependency>
87.103 - <specification-version>1.0</specification-version>
87.104 - </run-dependency>
87.105 - </dependency>
87.106 - <dependency>
87.107 - <code-name-base>org.netbeans.modules.xml.wsdl.model</code-name-base>
87.108 - <build-prerequisite/>
87.109 - <compile-dependency/>
87.110 - <run-dependency>
87.111 - <release-version>1</release-version>
87.112 - </run-dependency>
87.113 - </dependency>
87.114 - <dependency>
87.115 - <code-name-base>org.netbeans.modules.xml.xam</code-name-base>
87.116 - <build-prerequisite/>
87.117 - <compile-dependency/>
87.118 - <run-dependency>
87.119 - <release-version>1</release-version>
87.120 - <specification-version>1.1.21</specification-version>
87.121 - </run-dependency>
87.122 - </dependency>
87.123 - <dependency>
87.124 - <code-name-base>org.netbeans.modules.xml.xam.ui</code-name-base>
87.125 - <build-prerequisite/>
87.126 - <compile-dependency/>
87.127 - <run-dependency>
87.128 - <release-version>1</release-version>
87.129 - <specification-version>1.0</specification-version>
87.130 - </run-dependency>
87.131 - </dependency>
87.132 - <dependency>
87.133 - <code-name-base>org.netbeans.modules.xslt.mapper</code-name-base>
87.134 - <build-prerequisite/>
87.135 - <compile-dependency/>
87.136 - <run-dependency>
87.137 - <specification-version>1.0</specification-version>
87.138 - </run-dependency>
87.139 - </dependency>
87.140 - <dependency>
87.141 - <code-name-base>org.netbeans.modules.xslt.model</code-name-base>
87.142 - <build-prerequisite/>
87.143 - <compile-dependency/>
87.144 - <run-dependency>
87.145 - <release-version>1</release-version>
87.146 - </run-dependency>
87.147 - </dependency>
87.148 - <dependency>
87.149 - <code-name-base>org.netbeans.spi.palette</code-name-base>
87.150 - <build-prerequisite/>
87.151 - <compile-dependency/>
87.152 - <run-dependency>
87.153 - <release-version>1</release-version>
87.154 - <specification-version>1.6.1</specification-version>
87.155 - </run-dependency>
87.156 - </dependency>
87.157 - <dependency>
87.158 - <code-name-base>org.openide.awt</code-name-base>
87.159 - <build-prerequisite/>
87.160 - <compile-dependency/>
87.161 - <run-dependency>
87.162 - <specification-version>6.2</specification-version>
87.163 - </run-dependency>
87.164 - </dependency>
87.165 - <dependency>
87.166 - <code-name-base>org.openide.dialogs</code-name-base>
87.167 - <build-prerequisite/>
87.168 - <compile-dependency/>
87.169 - <run-dependency>
87.170 - <specification-version>6.2</specification-version>
87.171 - </run-dependency>
87.172 - </dependency>
87.173 - <dependency>
87.174 - <code-name-base>org.openide.filesystems</code-name-base>
87.175 - <build-prerequisite/>
87.176 - <compile-dependency/>
87.177 - <run-dependency>
87.178 - <specification-version>6.2</specification-version>
87.179 - </run-dependency>
87.180 - </dependency>
87.181 - <dependency>
87.182 - <code-name-base>org.openide.loaders</code-name-base>
87.183 - <build-prerequisite/>
87.184 - <compile-dependency/>
87.185 - <run-dependency>
87.186 - <specification-version>5.8.1</specification-version>
87.187 - </run-dependency>
87.188 - </dependency>
87.189 - <dependency>
87.190 - <code-name-base>org.openide.nodes</code-name-base>
87.191 - <build-prerequisite/>
87.192 - <compile-dependency/>
87.193 - <run-dependency>
87.194 - <specification-version>6.2</specification-version>
87.195 - </run-dependency>
87.196 - </dependency>
87.197 - <dependency>
87.198 - <code-name-base>org.openide.text</code-name-base>
87.199 - <build-prerequisite/>
87.200 - <compile-dependency/>
87.201 - <run-dependency>
87.202 - <specification-version>6.9.22</specification-version>
87.203 - </run-dependency>
87.204 - </dependency>
87.205 - <dependency>
87.206 - <code-name-base>org.openide.util</code-name-base>
87.207 - <build-prerequisite/>
87.208 - <compile-dependency/>
87.209 - <run-dependency>
87.210 - <specification-version>6.2</specification-version>
87.211 - </run-dependency>
87.212 - </dependency>
87.213 - <dependency>
87.214 - <code-name-base>org.openide.windows</code-name-base>
87.215 - <build-prerequisite/>
87.216 - <compile-dependency/>
87.217 - <run-dependency>
87.218 - <specification-version>6.5.22</specification-version>
87.219 - </run-dependency>
87.220 - </dependency>
87.221 - </module-dependencies>
87.222 - <friend-packages>
87.223 - <friend>org.netbeans.modules.xslt.project</friend>
87.224 - <package>org.netbeans.modules.xslt.core.xsltmap</package>
87.225 - <package>org.netbeans.modules.xslt.core.xsltmap.util</package>
87.226 - </friend-packages>
87.227 - </data>
87.228 - </configuration>
87.229 -</project>
88.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/XSLTDataEditorSupport.java Wed Feb 21 08:53:38 2007 +0000
88.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
88.3 @@ -1,725 +0,0 @@
88.4 -/*
88.5 - * The contents of this file are subject to the terms of the Common Development
88.6 - * and Distribution License (the License). You may not use this file except in
88.7 - * compliance with the License.
88.8 - *
88.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
88.10 - * or http://www.netbeans.org/cddl.txt.
88.11 -
88.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
88.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
88.14 - * If applicable, add the following below the CDDL Header, with the fields
88.15 - * enclosed by brackets [] replaced by your own identifying information:
88.16 - * "Portions Copyrighted [year] [name of copyright owner]"
88.17 - *
88.18 - * The Original Software is NetBeans. The Initial Developer of the Original
88.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
88.20 - * Microsystems, Inc. All Rights Reserved.
88.21 - */
88.22 -package org.netbeans.modules.xslt.core;
88.23 -
88.24 -import java.awt.EventQueue;
88.25 -import java.io.IOException;
88.26 -import java.io.Serializable;
88.27 -import java.util.ArrayList;
88.28 -import java.util.List;
88.29 -import java.util.Set;
88.30 -import javax.swing.text.AbstractDocument;
88.31 -import javax.swing.text.StyledDocument;
88.32 -import org.netbeans.api.project.Project;
88.33 -import org.netbeans.api.xml.cookies.CookieObserver;
88.34 -import org.netbeans.api.xml.cookies.ValidateXMLCookie;
88.35 -import org.netbeans.core.api.multiview.MultiViewHandler;
88.36 -import org.netbeans.core.api.multiview.MultiViews;
88.37 -import org.netbeans.core.spi.multiview.CloseOperationHandler;
88.38 -import org.netbeans.core.spi.multiview.CloseOperationState;
88.39 -import org.netbeans.modules.print.spi.PrintProvider;
88.40 -import org.netbeans.modules.print.spi.PrintProviderCookie;
88.41 -import org.netbeans.modules.xml.axi.AXIComponent;
88.42 -import org.netbeans.modules.xml.axi.AXIModel;
88.43 -import org.netbeans.modules.xml.retriever.catalog.Utilities;
88.44 -import org.netbeans.modules.xml.validation.ShowCookie;
88.45 -import org.netbeans.modules.xml.validation.ui.ValidationAnnotation;
88.46 -import org.netbeans.modules.xml.xam.AbstractModel;
88.47 -import org.netbeans.modules.xml.xam.Component;
88.48 -import org.netbeans.modules.xml.xam.Model.State;
88.49 -import org.netbeans.modules.xml.xam.ModelSource;
88.50 -import org.netbeans.modules.xml.xam.spi.Validator.ResultItem;
88.51 -import org.netbeans.modules.xml.xam.ui.undo.QuietUndoManager;
88.52 -import org.netbeans.modules.xslt.core.multiview.source.XSLTSourceMultiViewElementDesc;
88.53 -import org.netbeans.modules.xslt.core.multiview.XsltMultiViewSupport;
88.54 -import org.netbeans.modules.xslt.core.xsltmap.MapperContextImpl;
88.55 -import org.netbeans.modules.xslt.core.xsltmap.util.Util;
88.56 -import org.netbeans.modules.xslt.core.xsltmap.TransformationDesc;
88.57 -import org.netbeans.modules.xslt.core.xsltmap.XsltMapAccessor;
88.58 -import org.netbeans.modules.xslt.core.xsltmap.XsltMapModel;
88.59 -import org.netbeans.modules.xslt.mapper.model.MapperContext;
88.60 -import org.netbeans.modules.xslt.model.XslModel;
88.61 -import org.netbeans.modules.xslt.model.spi.XslModelFactory;
88.62 -import org.openide.ErrorManager;
88.63 -import org.openide.awt.UndoRedo;
88.64 -import org.openide.cookies.EditCookie;
88.65 -import org.openide.cookies.EditorCookie;
88.66 -import org.openide.cookies.LineCookie;
88.67 -import org.openide.cookies.OpenCookie;
88.68 -import org.openide.filesystems.FileLock;
88.69 -import org.openide.filesystems.FileObject;
88.70 -import org.openide.loaders.DataObject;
88.71 -import org.openide.loaders.MultiDataObject;
88.72 -import org.openide.text.CloneableEditor;
88.73 -import org.openide.text.CloneableEditorSupport;
88.74 -import org.openide.text.CloneableEditorSupport.Pane;
88.75 -import org.openide.text.DataEditorSupport;
88.76 -import org.openide.util.Lookup;
88.77 -import org.openide.util.Task;
88.78 -import org.openide.util.TaskListener;
88.79 -import org.openide.windows.Mode;
88.80 -import org.openide.windows.TopComponent;
88.81 -import org.openide.windows.WindowManager;
88.82 -
88.83 -/**
88.84 - *
88.85 - * @author Vitaly Bychkov
88.86 - * @version 1.0
88.87 - *
88.88 - * TODO add ValidateXMLCookie when becomes friend ...
88.89 - */
88.90 -public class XSLTDataEditorSupport extends DataEditorSupport implements
88.91 - OpenCookie, EditCookie, EditorCookie.Observable, PrintProviderCookie,
88.92 - ShowCookie, ValidateXMLCookie
88.93 -{
88.94 -
88.95 - public XSLTDataEditorSupport(XSLTDataObject dObj) {
88.96 - super(dObj, new XSLTEnv(dObj));
88.97 - setMIMEType(XSLTDataLoader.MIME_TYPE);
88.98 - }
88.99 -
88.100 - /**
88.101 - * Implements PrintProviderCookie interface {@inheritDoc}
88.102 - */
88.103 - public PrintProvider getPrintProvider() {
88.104 - //TODO a
88.105 - return null;
88.106 - }
88.107 -
88.108 - /** {@inheritDoc} */
88.109 - public void saveDocument() throws IOException {
88.110 - super.saveDocument();
88.111 - syncModel();
88.112 - getDataObject().setModified(false);
88.113 - }
88.114 -
88.115 -
88.116 - /**
88.117 - * Sync Xsl model with source.
88.118 - */
88.119 - public void syncModel() {
88.120 - try {
88.121 - XslModel model = null;//getXslModel();
88.122 - if (model != null) {
88.123 - model.sync();
88.124 - }
88.125 - }
88.126 - catch (IOException e) {
88.127 - ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
88.128 - // assert false;
88.129 - }
88.130 - }
88.131 -
88.132 - public QuietUndoManager getUndoManager() {
88.133 - return (QuietUndoManager) getUndoRedo();
88.134 - }
88.135 -
88.136 - /**
88.137 - * @return Xsl Model for this editor.
88.138 - */
88.139 - public XslModel getXslModel() {
88.140 - XSLTDataObject dataObject = getEnv().getXsltDataObject();
88.141 - ModelSource modelSource = Utilities.getModelSource(dataObject
88.142 - .getPrimaryFile(), true);
88.143 - return getModelFactory().getModel(modelSource);
88.144 - }
88.145 -
88.146 - /**
88.147 - * Implements ShowCookie interface used to open editor for the object containing xam Component
88.148 - *
88.149 - * Opens the editor for the file pointed by this resultItem.
88.150 - * @param resultItem Contains the error/warning source, message.
88.151 - */
88.152 - public void show(final ResultItem resultItem) {
88.153 - if (!(resultItem.getModel() instanceof AbstractModel))
88.154 - return;
88.155 -
88.156 - final Component componentEntity = resultItem.getComponents();
88.157 -
88.158 - // Get the edit and line cookies.
88.159 - DataObject d = getDataObject();
88.160 - final LineCookie lc = (LineCookie) d.getCookie(LineCookie.class);
88.161 - final EditCookie ec = (EditCookie) d.getCookie(EditCookie.class);
88.162 - if (lc == null || ec == null) {
88.163 - return;
88.164 - }
88.165 -
88.166 - javax.swing.SwingUtilities.invokeLater(new Runnable() {
88.167 - public void run() {
88.168 - // Opens the editor or brings it into focus
88.169 - // and makes it the activated topcomponent.
88.170 - ec.edit();
88.171 -
88.172 - TopComponent tc = WindowManager.getDefault().getRegistry()
88.173 - .getActivated();
88.174 - MultiViewHandler mvh = MultiViews.findMultiViewHandler(tc);
88.175 -
88.176 - if (mvh == null) {
88.177 - return;
88.178 - }
88.179 -
88.180 - // If model is broken
88.181 - // OR if the resultItem.getComponents() is null which
88.182 - // means the resultItem was generated when the model was broken.
88.183 - // In the above cases switch to the source multiview.
88.184 - if(resultItem.getModel().getState().equals(State.NOT_WELL_FORMED) ||
88.185 - resultItem.getComponents() == null) {
88.186 - for(int index1=0 ; index1<mvh.getPerspectives().length ; index1++) {
88.187 - if(mvh.getPerspectives()[index1].preferredID().equals(
88.188 - XSLTSourceMultiViewElementDesc.PREFERED_ID))
88.189 - mvh.requestActive(mvh.getPerspectives()[index1]);
88.190 - }
88.191 - }
88.192 -
88.193 -
88.194 -//TODO a
88.195 - // Set annotation or select element in the multiview.
88.196 -// MultiViewPerspective mvp = mvh.getSelectedPerspective();
88.197 -// if (mvp.preferredID().equals("xslt-designer")) {
88.198 -// List<TopComponent> list = getAssociatedTopComponents();
88.199 -// for (TopComponent topComponent : list) {
88.200 -// // Make sure this is a multiview window, and not just
88.201 -// // some
88.202 -// // window that has our DataObject (e.g. Projects,Files).
88.203 -// MultiViewHandler handler = MultiViews
88.204 -// .findMultiViewHandler(topComponent);
88.205 -// if (handler != null && topComponent != null) {
88.206 -// SelectXsltElement selectElement =
88.207 -// (SelectXsltElement) topComponent.getLookup()
88.208 -// .lookup(SelectXsltElement.class);
88.209 -// if (selectElement == null)
88.210 -// return;
88.211 -// selectElement.select(XSLTComponent);
88.212 -// }
88.213 -// }
88.214 -// } else if (mvp.preferredID().equals("xslt-mapper")) {
88.215 -// List<TopComponent> list = getAssociatedTopComponents();
88.216 -// for (TopComponent topComponent : list) {
88.217 -// // Make sure this is a multiview window, and not just
88.218 -// // some
88.219 -// // window that has our DataObject (e.g. Projects,Files).
88.220 -// MultiViewHandler handler = MultiViews
88.221 -// .findMultiViewHandler(topComponent);
88.222 -// if (handler != null && topComponent != null) {
88.223 -// SelectXsltElement selectElement =
88.224 -// (SelectXsltElement) topComponent.getLookup()
88.225 -// .lookup(SelectXsltElement.class);
88.226 -// if (selectElement == null)
88.227 -// return;
88.228 -// selectElement.select(XSLTComponent);
88.229 -// }
88.230 -// }
88.231 -// } else if (mvp.preferredID().equals(
88.232 -// XSLTSourceMultiViewElementDesc.PREFERED_ID)) {
88.233 -//
88.234 -// // Get the line number.
88.235 -// int lineNum;
88.236 -// if(resultItem.getComponents() != null) {
88.237 -// lineNum = getLineNumber((XSLTComponent)resultItem.getComponents());
88.238 -// } else {
88.239 -// lineNum = resultItem.getLineNumber() - 1;
88.240 -// }
88.241 -// if (lineNum < 1) {
88.242 -// return;
88.243 -// }
88.244 -// Line l = lc.getLineSet().getCurrent(lineNum);
88.245 -// l.show(Line.SHOW_GOTO);
88.246 -// annotation.show(l, resultItem.getDescription());
88.247 -//
88.248 -// }
88.249 - }
88.250 - });
88.251 -
88.252 - }
88.253 -
88.254 - /**
88.255 - * Supports one use case for one xsl file
88.256 - * If xslt file is used more than one time than first use case will be returned
88.257 - *
88.258 - * @return MapperContext wrapped first founded use case
88.259 - */
88.260 - public MapperContext getMapperContext() {
88.261 - return getEnv().getMapperContext();
88.262 - }
88.263 -
88.264 - private List<TopComponent> getAssociatedTopComponents() {
88.265 - // Create a list of TopComponents associated with the
88.266 - // editor's schema data object, starting with the the
88.267 - // active TopComponent. Add all open TopComponents in
88.268 - // any mode that are associated with the DataObject.
88.269 - // [Note that EDITOR_MODE does not contain editors in
88.270 - // split mode.]
88.271 - List<TopComponent> associatedTCs = new ArrayList<TopComponent>();
88.272 - DataObject targetDO = getDataObject();
88.273 - TopComponent activeTC = TopComponent.getRegistry().getActivated();
88.274 - if (activeTC != null
88.275 - && targetDO == (DataObject) activeTC.getLookup().lookup(
88.276 - DataObject.class)) {
88.277 - associatedTCs.add(activeTC);
88.278 - }
88.279 - Set openTCs = TopComponent.getRegistry().getOpened();
88.280 - for (Object tc : openTCs) {
88.281 - TopComponent tcc = (TopComponent) tc;
88.282 - if (targetDO == (DataObject) tcc.getLookup().lookup(
88.283 - DataObject.class)) {
88.284 - associatedTCs.add(tcc);
88.285 - }
88.286 - }
88.287 - return associatedTCs;
88.288 - }
88.289 -
88.290 - public boolean validateXML(CookieObserver observer) {
88.291 - // TODO a
88.292 - return true;
88.293 - }
88.294 -
88.295 - protected CloneableEditorSupport.Pane createPane() {
88.296 - TopComponent multiview = XsltMultiViewSupport
88.297 - .createMultiView((XSLTDataObject) getDataObject());
88.298 -
88.299 - Mode editorMode = WindowManager.getDefault().findMode(EDITOR_MODE);
88.300 - if (editorMode != null) {
88.301 - editorMode.dockInto(multiview);
88.302 - }
88.303 -
88.304 - return (Pane) multiview;
88.305 - }
88.306 -
88.307 - @Override
88.308 - protected void notifyClosed() {
88.309 - QuietUndoManager undo = getUndoManager();
88.310 - StyledDocument doc = getDocument();
88.311 - synchronized (undo) {
88.312 - // May be null when closing the editor.
88.313 - if (doc != null) {
88.314 - doc.removeUndoableEditListener(undo);
88.315 - undo.endCompound();
88.316 - undo.setDocument(null);
88.317 - }
88.318 -
88.319 - XslModel model = getXslModel();
88.320 - if (model != null) {
88.321 - model.removeUndoableEditListener(undo);
88.322 - }
88.323 - // Must unset the model when no longer listening to it.
88.324 - undo.setModel(null);
88.325 -
88.326 - }
88.327 - super.notifyClosed();
88.328 - getUndoManager().discardAllEdits();
88.329 -
88.330 - // all editors are closed so we don't need to keep this task.
88.331 - prepareTask = null;
88.332 -
88.333 -// getValidationController().detach();
88.334 -
88.335 - }
88.336 -
88.337 - /*
88.338 - * This method is redefined for marking big TopCompenent as modified (
88.339 - * asterik (*) needs to be appended to name of bpel file ). Without this
88.340 - * overriding file will be marked as modified only when source multiview is
88.341 - * edited. Modification in design view will not lead to marking TopComponent
88.342 - * as modified. see bug description for #6421669. (non-Javadoc)
88.343 - *
88.344 - * @see org.openide.text.CloneableEditorSupport#updateTitles()
88.345 - */
88.346 - @Override
88.347 - protected void updateTitles()
88.348 - {
88.349 - /* This method is invoked by DataEditorSupport.DataNodeListener
88.350 - * whenever the DataNode displayName property is changed. It is
88.351 - * also called when the CloneableEditorSupport is (un)modified.
88.352 - */
88.353 -
88.354 - // Let the superclass handle the CloneableEditor instances.
88.355 - super.updateTitles();
88.356 -
88.357 - // We need to get the title updated on the MultiViewTopComponent.
88.358 - EventQueue.invokeLater(new Runnable() {
88.359 -
88.360 - public void run() {
88.361 - List<TopComponent> list = getAssociatedTopComponents();
88.362 - for (TopComponent topComponent : list) {
88.363 - // Make sure this is a multiview window, and not just some
88.364 - // window that has our DataObject (e.g. Projects, Files).
88.365 - MultiViewHandler handler = MultiViews
88.366 - .findMultiViewHandler(topComponent);
88.367 - if (handler != null && topComponent != null) {
88.368 - topComponent.setHtmlDisplayName(messageHtmlName());
88.369 - String name = messageName();
88.370 - topComponent.setDisplayName(name);
88.371 - topComponent.setName(name);
88.372 - topComponent.setToolTipText(messageToolTip());
88.373 - }
88.374 - }
88.375 - }
88.376 - });
88.377 - }
88.378 -
88.379 - protected XSLTEnv getEnv() {
88.380 - return (XSLTEnv) env;
88.381 - }
88.382 -
88.383 - @Override
88.384 - protected UndoRedo.Manager createUndoRedoManager()
88.385 - {
88.386 - // Override so the superclass will use our proxy undo manager
88.387 - // instead of the default, then we can intercept edits.
88.388 - return new QuietUndoManager(super.createUndoRedoManager());
88.389 - // Note we cannot set the document on the undo manager right
88.390 - // now, as CES is probably trying to open the document.
88.391 - }
88.392 -
88.393 - /**
88.394 - * Environment that connects the dataobject and ClonneableEditorSupport
88.395 - */
88.396 - private static class XSLTEnv extends DataEditorSupport.Env {
88.397 -
88.398 - private static final long serialVersionUID = 835762240381934851L;
88.399 -
88.400 - public XSLTEnv(XSLTDataObject dObj) {
88.401 - super(dObj);
88.402 - }
88.403 -
88.404 - public XSLTDataObject getXsltDataObject() {
88.405 - return (XSLTDataObject) getDataObject();
88.406 - }
88.407 -
88.408 - protected FileObject getFile() {
88.409 - return getDataObject().getPrimaryFile();
88.410 - }
88.411 -
88.412 - protected FileLock takeLock() throws IOException {
88.413 - return ((MultiDataObject) getDataObject()).getPrimaryEntry()
88.414 - .takeLock();
88.415 - }
88.416 -
88.417 - public MapperContext getMapperContext() {
88.418 - FileObject xsltFo = getFile();
88.419 - FileObject xsltMapFo = Util.getXsltMapFo(xsltFo);
88.420 - FileObject projectRoot = Util.getProjectRoot(xsltFo);
88.421 - Project project = Util.getProject(xsltFo);
88.422 -
88.423 - if (xsltMapFo == null || projectRoot == null) {
88.424 - // TODO m
88.425 - try {
88.426 - return new MapperContextImpl(XsltMapModel.getDefault(project));
88.427 - } catch (IOException ex) {
88.428 - ex.printStackTrace();
88.429 - ErrorManager.getDefault().notify(ex);
88.430 - return null;
88.431 - }
88.432 - }
88.433 -
88.434 - XsltMapModel xsltMapModel = XsltMapAccessor.getXsltMapModel(xsltMapFo);
88.435 - if (xsltMapModel == null) {
88.436 - // TODO m
88.437 - try {
88.438 - return new MapperContextImpl(XsltMapModel.getDefault(project));
88.439 - } catch (IOException ex) {
88.440 - ex.printStackTrace();
88.441 - ErrorManager.getDefault().notify(ex);
88.442 - return null;
88.443 - }
88.444 - }
88.445 -
88.446 - MapperContext mapperContext = null;
88.447 - TransformationDesc tDesc = xsltMapModel.getFirstTransformationDesc(xsltFo);
88.448 - if (tDesc == null) {
88.449 - // TODO m
88.450 - try {
88.451 - return new MapperContextImpl(XsltMapModel.getDefault(project));
88.452 - } catch (IOException ex) {
88.453 - ex.printStackTrace();
88.454 - ErrorManager.getDefault().notify(ex);
88.455 - return null;
88.456 - }
88.457 - }
88.458 -
88.459 -// AXIModel sourceAxiModel = tDesc.getSourceAxiModel(projectRoot);
88.460 -// AXIModel targetAxiModel = tDesc.getTargetAxiModel(projectRoot);
88.461 - AXIComponent sourceComponent = tDesc.getSourceAXIType(projectRoot);
88.462 - AXIComponent targetComponent = tDesc.getTargetAXIType(projectRoot);
88.463 - // TODO m
88.464 - XslModel xslModel = Util.getXslModel(xsltFo);
88.465 - mapperContext = new MapperContextImpl( tDesc, xslModel, sourceComponent, targetComponent);
88.466 -
88.467 - return mapperContext;
88.468 - }
88.469 - }
88.470 -
88.471 - public void initializeCloneableEditor(CloneableEditor editor) {
88.472 - super.initializeCloneableEditor(editor);
88.473 - // Force the title to update so the * left over from when the
88.474 - // modified data object was discarded is removed from the title.
88.475 - if (!getEnv().getXsltDataObject().isModified()) {
88.476 - // Update later to avoid an infinite loop.
88.477 - EventQueue.invokeLater(new Runnable() {
88.478 - public void run() {
88.479 - updateTitles();
88.480 - }
88.481 - });
88.482 - }
88.483 -
88.484 - // TODO a
88.485 -// /*
88.486 -// * I put this code here because it is called each time when
88.487 -// * editor is opened. This can happened omn first open,
88.488 -// * on reopen, on deserialization.
88.489 -// * CTOR of BPELDataEditorSupport is called only once due lifecycle
88.490 -// * data object, so it cannot be used on attach after reopening.
88.491 -// * Method "open" doesn't called after deser-ion.
88.492 -// * But this method is called always on editor opening.
88.493 -// */
88.494 -// getValidationController().attach();
88.495 - }
88.496 -
88.497 - @Override
88.498 - public Task prepareDocument()
88.499 - {
88.500 - Task task = super.prepareDocument();
88.501 - // Avoid listening to the same task more than once.
88.502 - if (task == prepareTask) {
88.503 - return task;
88.504 - }
88.505 - task.addTaskListener(new TaskListener() {
88.506 -
88.507 - public void taskFinished( Task task ) {
88.508 - /* The superclass prepareDocument() adds the undo/redo
88.509 - * manager as a listener -- we need to remove it since
88.510 - * the views will add and remove it as needed.
88.511 - */
88.512 - QuietUndoManager undo = (QuietUndoManager) getUndoRedo();
88.513 - StyledDocument doc = getDocument();
88.514 - synchronized (undo) {
88.515 - // Now that the document is ready, pass it to the manager.
88.516 - undo.setDocument((AbstractDocument) doc);
88.517 - if (!undo.isCompound()) {
88.518 - /* The superclass prepareDocument() adds the undo/redo
88.519 - * manager as a listener -- we need to remove it since
88.520 - * we will initially listen to the model instead.
88.521 - */
88.522 - doc.removeUndoableEditListener(undo);
88.523 - // If not listening to document, then listen to model.
88.524 - addUndoManagerToModel(undo);
88.525 - }
88.526 - }
88.527 - }
88.528 - });
88.529 - return task;
88.530 - }
88.531 -
88.532 - @Override
88.533 - public Task reloadDocument()
88.534 - {
88.535 - Task task = super.reloadDocument();
88.536 - task.addTaskListener(new TaskListener() {
88.537 -
88.538 - public void taskFinished( Task task ) {
88.539 - EventQueue.invokeLater(new Runnable() {
88.540 -
88.541 - public void run() {
88.542 - QuietUndoManager undo = getUndoManager();
88.543 - StyledDocument doc = getDocument();
88.544 - /* The superclass reloadDocument() adds the undo
88.545 - * manager as an undoable edit listener.
88.546 - */
88.547 - synchronized (undo) {
88.548 - if (!undo.isCompound()) {
88.549 - doc.removeUndoableEditListener(undo);
88.550 - }
88.551 - }
88.552 - }
88.553 - });
88.554 - }
88.555 - });
88.556 - return task;
88.557 - }
88.558 -
88.559 - /**
88.560 - * Adds the undo/redo manager to the document as an undoable edit listener,
88.561 - * so it receives the edits onto the queue. The manager will be removed from
88.562 - * the model as an undoable edit listener.
88.563 - * <p>
88.564 - * This method may be called repeatedly.
88.565 - * </p>
88.566 - */
88.567 - public void addUndoManagerToDocument() {
88.568 - /*
88.569 - * This method may be called repeatedly.
88.570 - * Stop the undo manager from listening to the model, as it will
88.571 - * be listening to the document now.
88.572 - */
88.573 - QuietUndoManager undo = getUndoManager();
88.574 - StyledDocument doc = getDocument();
88.575 - synchronized (undo) {
88.576 -
88.577 - removeUndoManagerFromModel();
88.578 -
88.579 - /*
88.580 - * Document may be null if the cloned views are not behaving
88.581 - * correctly.
88.582 - */
88.583 - if (doc != null) {
88.584 - // Ensure the listener is not added twice.
88.585 - doc.removeUndoableEditListener(undo);
88.586 - doc.addUndoableEditListener(undo);
88.587 - /*
88.588 - * Start the compound mode of the undo manager, such that when
88.589 - * we are hidden, we will treat all of the edits as a single
88.590 - * compound edit. This avoids having the user invoke undo
88.591 - * numerous times when in the model view.
88.592 - */
88.593 - undo.beginCompound();
88.594 - }
88.595 - }
88.596 - }
88.597 -
88.598 - /**
88.599 - * Add the undo/redo manager undoable edit listener to the model.
88.600 - * <p>
88.601 - * Caller should synchronize on the undo manager prior to calling this
88.602 - * method, to avoid thread concurrency issues.
88.603 - * </p>
88.604 - *
88.605 - * @param undo
88.606 - * the undo manager.
88.607 - */
88.608 - public void addUndoManagerToModel( QuietUndoManager undo ) {
88.609 - XslModel model = getXslModel();
88.610 - if (model != null) {
88.611 - // Ensure the listener is not added twice.
88.612 - removeUndoManagerFromModel();
88.613 - model.addUndoableEditListener(undo);
88.614 - /* Ensure the model is sync'd when undo/redo is invoked,
88.615 - * otherwise the edits are added to the queue and eventually
88.616 - * cause exceptions.
88.617 - */
88.618 - undo.setModel(model);
88.619 -
88.620 - }
88.621 - }
88.622 -
88.623 - /**
88.624 - * Removes the undo/redo manager undoable edit listener from the document,
88.625 - * to stop receiving undoable edits. The manager will be added to the model
88.626 - * as an undoable edit listener.
88.627 - * <p>
88.628 - * This method may be called repeatedly.
88.629 - * </p>
88.630 - */
88.631 - public void removeUndoManagerFromDocument() {
88.632 - // This method may be called repeatedly.
88.633 - QuietUndoManager undo = getUndoManager();
88.634 - StyledDocument doc = getDocument();
88.635 - synchronized (undo) {
88.636 - // May be null when closing the editor.
88.637 - if (doc != null) {
88.638 - doc.removeUndoableEditListener(undo);
88.639 - undo.endCompound();
88.640 - }
88.641 - // Have the undo manager listen to the model when it is not
88.642 - // listening to the document.
88.643 - addUndoManagerToModel(undo);
88.644 - }
88.645 - }
88.646 -
88.647 - /**
88.648 - * Removes the undo/redo manager undoable edit listener from the bpel model,
88.649 - * to stop receiving undoable edits.
88.650 - */
88.651 - private void removeUndoManagerFromModel() {
88.652 - XslModel model = getXslModel();
88.653 - if (model != null) {
88.654 - QuietUndoManager undo = getUndoManager();
88.655 - model.removeUndoableEditListener(undo);
88.656 - // Must unset the model when leaving model view.
88.657 - undo.setModel(null);
88.658 - }
88.659 - }
88.660 -
88.661 - private XslModelFactory getModelFactory() {
88.662 - XslModelFactory factory = (XslModelFactory) Lookup.getDefault()
88.663 - .lookup(XslModelFactory.class);
88.664 - return factory;
88.665 - }
88.666 -
88.667 - /**
88.668 - * This method allows the close behavior of CloneableEditorSupport to be
88.669 - * invoked from the SourceMultiViewElement. The close method of
88.670 - * CloneableEditorSupport at least clears the undo queue and releases the
88.671 - * swing document.
88.672 - */
88.673 - public boolean silentClose() {
88.674 - return super.close(false);
88.675 - }
88.676 -
88.677 -/**
88.678 - * Handles closing of the MultiView component globally. Each opened {@link org.netbeans.core.spi.multiview.MultiViewElement}
88.679 - * creates a {@link org.netbeans.core.spi.multiview.CloseOperationState} instance to notify the environment of it's internal state.
88.680 - *
88.681 - */
88.682 - public static class CloseHandler implements CloseOperationHandler,
88.683 - Serializable
88.684 - {
88.685 -
88.686 - private static final long serialVersionUID = -4621077799099893176L;
88.687 -
88.688 - private CloseHandler() {
88.689 - // CTOR for deser
88.690 - }
88.691 -
88.692 - public CloseHandler( XSLTDataObject obj ) {
88.693 - myDataObject = obj;
88.694 - }
88.695 -
88.696 - public boolean resolveCloseOperation( CloseOperationState[] elements ) {
88.697 - XSLTDataEditorSupport support = myDataObject == null ? null
88.698 - : (XSLTDataEditorSupport) myDataObject
88.699 - .getCookie(XSLTDataEditorSupport.class);
88.700 - if (support == null) {
88.701 - return true;
88.702 - }
88.703 - boolean close = support.canClose();
88.704 - if (close) {
88.705 - if (myDataObject.isValid()) {
88.706 -// In odrer to clear the undo queue of orphaned edits, let's always
88.707 -// reload the document, which discards the edits on the undo queue.
88.708 -// The critical part is that BeforeSaveEdit gets added to the queue.
88.709 -// // In case user discarded edits, need to reload.
88.710 -// if (dataObject.isModified()) {
88.711 - support.reloadDocument().waitFinished();
88.712 -// }
88.713 - }
88.714 -
88.715 - myDataObject.setModified(false); // Issue 85629
88.716 - }
88.717 - return close;
88.718 - }
88.719 -
88.720 - private XSLTDataObject myDataObject;
88.721 - }
88.722 -
88.723 -
88.724 - /** Used for managing the prepareTask listener. */
88.725 - private transient Task prepareTask;
88.726 -
88.727 - private ValidationAnnotation myAnnotation = new ValidationAnnotation();
88.728 -}
89.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/XSLTDataLoader.java Wed Feb 21 08:53:38 2007 +0000
89.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
89.3 @@ -1,161 +0,0 @@
89.4 -/*
89.5 - * The contents of this file are subject to the terms of the Common Development
89.6 - * and Distribution License (the License). You may not use this file except in
89.7 - * compliance with the License.
89.8 - *
89.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
89.10 - * or http://www.netbeans.org/cddl.txt.
89.11 -
89.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
89.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
89.14 - * If applicable, add the following below the CDDL Header, with the fields
89.15 - * enclosed by brackets [] replaced by your own identifying information:
89.16 - * "Portions Copyrighted [year] [name of copyright owner]"
89.17 - *
89.18 - * The Original Software is NetBeans. The Initial Developer of the Original
89.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
89.20 - * Microsystems, Inc. All Rights Reserved.
89.21 - */
89.22 -package org.netbeans.modules.xslt.core;
89.23 -
89.24 -import java.io.IOException;
89.25 -import org.netbeans.modules.xslt.core.xsltmap.XsltMapAccessor;
89.26 -import org.netbeans.modules.xslt.core.xsltmap.XsltMapModel;
89.27 -import org.openide.ErrorManager;
89.28 -import org.openide.filesystems.FileObject;
89.29 -import org.openide.filesystems.FileStateInvalidException;
89.30 -import org.openide.loaders.DataObjectExistsException;
89.31 -import org.openide.loaders.FileEntry;
89.32 -import org.openide.loaders.MultiDataObject;
89.33 -import org.openide.loaders.UniFileLoader;
89.34 -import org.openide.util.NbBundle;
89.35 -
89.36 -/**
89.37 - *
89.38 - * @author Vitaly Bychkov
89.39 - * @version 1.0
89.40 - *
89.41 - * Temporary use UniFileLoader until the role
89.42 - * of secondary file becomes clear...
89.43 - *
89.44 - */
89.45 -public class XSLTDataLoader extends UniFileLoader {
89.46 - private static final long serialVersionUID = 1L;
89.47 -
89.48 - public static final String MIME_TYPE = "application/xslt+xml";
89.49 - static final String PRIMARY_EXTENSION = "xsl"; // NOI18N
89.50 - static final String PRIMARY_EXTENSION2 = "xslt"; // NOI18N
89.51 -
89.52 - // TODO m
89.53 - static final String XSLT_MAP_FILE = "xsltmap.xml"; // NOI18N
89.54 -
89.55 - // TODO r | m
89.56 -// static final String SECONDARY_EXTENSION = "N/A"; // NOI18N
89.57 - public static final String ACTION_CONTEXT = "Loaders/" + // NOI18N
89.58 - MIME_TYPE + "/Actions"; // NOI18N
89.59 - static final String LOADER_NAME ="LBL_loader_name"; // NOI18N
89.60 - private static final String DATAOBJECT_CLASS_NAME =
89.61 - XSLTDataObject.class.getCanonicalName();
89.62 -
89.63 -
89.64 - public XSLTDataLoader() {
89.65 - super(DATAOBJECT_CLASS_NAME);
89.66 - }
89.67 -
89.68 - /** Does initialization. Initializes display name,
89.69 - * extension list and the actions. */
89.70 - protected void initialize() {
89.71 - super.initialize();
89.72 - getExtensions().addMimeType(XSLTDataLoader.MIME_TYPE);
89.73 - }
89.74 -
89.75 - /**
89.76 - * Lazy init name.
89.77 - */
89.78 - protected String defaultDisplayName() {
89.79 - return NbBundle.getMessage(XSLTDataLoader.class, LOADER_NAME );
89.80 - }
89.81 -
89.82 -
89.83 - /** Creates the right data object for given primary file.
89.84 - * It is guaranteed that the provided file is realy primary file
89.85 - * returned from the method findPrimaryFile.
89.86 - *
89.87 - * @param primaryFile the primary file
89.88 - * @return the data object for this file
89.89 - * @exception DataObjectExistsException if the primary file already has data object
89.90 - */
89.91 - protected MultiDataObject createMultiObject( FileObject primaryFile )
89.92 - throws DataObjectExistsException, IOException
89.93 - {
89.94 - return new XSLTDataObject(primaryFile, this);
89.95 - }
89.96 -
89.97 - protected FileObject findPrimaryFile( FileObject fo ) {
89.98 - FileObject primaryFo = null;
89.99 - String extension = fo.getExt();
89.100 - if (extension.equals(PRIMARY_EXTENSION)
89.101 - || extension.equals(PRIMARY_EXTENSION2))
89.102 - {
89.103 - // recognize xslt file only in context of XSLT project
89.104 - primaryFo = isXsltProjectContext(fo) ? fo : null;
89.105 - }
89.106 - return primaryFo;
89.107 - }
89.108 -
89.109 - private boolean isXsltProjectContext(FileObject fo) {
89.110 - boolean isContext = false;
89.111 - try {
89.112 - if (!fo.getFileSystem().isDefault() && !fo.isFolder()) {
89.113 - String extension = fo.getExt();
89.114 - if (extension.equals(PRIMARY_EXTENSION)
89.115 - || extension.equals(PRIMARY_EXTENSION2))
89.116 - {
89.117 - isContext = fo.getParent().getFileObject(XSLT_MAP_FILE) != null;
89.118 - }
89.119 - }
89.120 -
89.121 -// TODO r
89.122 -// if (isContext) {
89.123 -// XsltMapModel xsltMapModel = XsltMapAccessor.
89.124 -// getXsltMapModel(getXsltMapFo(fo));
89.125 -// isContext = xsltMapModel != null && xsltMapModel.getFirstTransformationDesc(fo) != null;
89.126 -// }
89.127 - } catch (FileStateInvalidException ex) {
89.128 - ErrorManager.getDefault().notify(ex);
89.129 - }
89.130 -
89.131 - return isContext;
89.132 - }
89.133 -
89.134 - private boolean isEqualInputFile(String inputFile, FileObject xmlFile) {
89.135 - return inputFile != null
89.136 - && xmlFile != null
89.137 - && inputFile.equals(xmlFile.getNameExt());
89.138 - }
89.139 -
89.140 - private FileObject getXsltMapFo(FileObject xsltFo) {
89.141 - return xsltFo.getParent().getFileObject(XSLT_MAP_FILE);
89.142 - }
89.143 -
89.144 - protected MultiDataObject.Entry createPrimaryEntry(MultiDataObject obj,
89.145 - FileObject primaryFile)
89.146 - {
89.147 -// return new XMLDataLoader.XMLFileEntry (obj, primaryFile); //adds smart templating
89.148 - return new FileEntry(obj, primaryFile);
89.149 - }
89.150 -
89.151 - protected MultiDataObject.Entry createSecondaryEntry(MultiDataObject obj,
89.152 - FileObject secondaryFile)
89.153 - {
89.154 - return new FileEntry(obj, secondaryFile);
89.155 - }
89.156 -
89.157 - /**
89.158 - * other modules can decorate with Special Actions
89.159 - * to see the default actions look in the layer.xml
89.160 - */
89.161 - protected String actionsContext() {
89.162 - return ACTION_CONTEXT;
89.163 - }
89.164 -}
90.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/XSLTDataLoaderBeanInfo.java Wed Feb 21 08:53:38 2007 +0000
90.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
90.3 @@ -1,58 +0,0 @@
90.4 -/*
90.5 - * The contents of this file are subject to the terms of the Common Development
90.6 - * and Distribution License (the License). You may not use this file except in
90.7 - * compliance with the License.
90.8 - *
90.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
90.10 - * or http://www.netbeans.org/cddl.txt.
90.11 -
90.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
90.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
90.14 - * If applicable, add the following below the CDDL Header, with the fields
90.15 - * enclosed by brackets [] replaced by your own identifying information:
90.16 - * "Portions Copyrighted [year] [name of copyright owner]"
90.17 - *
90.18 - * The Original Software is NetBeans. The Initial Developer of the Original
90.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
90.20 - * Microsystems, Inc. All Rights Reserved.
90.21 - */
90.22 -package org.netbeans.modules.xslt.core;
90.23 -
90.24 -import java.awt.Image;
90.25 -import java.beans.BeanInfo;
90.26 -import java.beans.Introspector;
90.27 -import java.beans.SimpleBeanInfo;
90.28 -import java.beans.IntrospectionException;
90.29 -import org.openide.loaders.DataLoader;
90.30 -import org.openide.util.Utilities;
90.31 -
90.32 -/**
90.33 - *
90.34 - * @author Vitaly Bychkov
90.35 - * @version 1.0
90.36 - */
90.37 -public class XSLTDataLoaderBeanInfo extends SimpleBeanInfo {
90.38 -
90.39 - public static final String PATH_TO_IMAGE =
90.40 - "org/netbeans/modules/xslt/core/resources/xslt_file.gif"; // NOI18N
90.41 -
90.42 - /** {@inheritDoc} */
90.43 - public BeanInfo[] getAdditionalBeanInfo() {
90.44 - try {
90.45 - return new BeanInfo[] {Introspector.getBeanInfo(DataLoader.class)};
90.46 - } catch (IntrospectionException e) {
90.47 -// ErrorManager.getDefault().notify(ie);
90.48 -// return null;
90.49 - throw new AssertionError(e);
90.50 - }
90.51 - }
90.52 -
90.53 - public Image getIcon(int type) {
90.54 - if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) {
90.55 - return Utilities.loadImage(PATH_TO_IMAGE);
90.56 - } else {
90.57 - return null;
90.58 - }
90.59 -
90.60 - }
90.61 -}
91.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/XSLTDataObject.java Wed Feb 21 08:53:38 2007 +0000
91.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
91.3 @@ -1,214 +0,0 @@
91.4 -/*
91.5 - * The contents of this file are subject to the terms of the Common Development
91.6 - * and Distribution License (the License). You may not use this file except in
91.7 - * compliance with the License.
91.8 - *
91.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
91.10 - * or http://www.netbeans.org/cddl.txt.
91.11 -
91.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
91.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
91.14 - * If applicable, add the following below the CDDL Header, with the fields
91.15 - * enclosed by brackets [] replaced by your own identifying information:
91.16 - * "Portions Copyrighted [year] [name of copyright owner]"
91.17 - *
91.18 - * The Original Software is NetBeans. The Initial Developer of the Original
91.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
91.20 - * Microsystems, Inc. All Rights Reserved.
91.21 - */
91.22 -package org.netbeans.modules.xslt.core;
91.23 -
91.24 -import java.awt.event.ActionEvent;
91.25 -import java.io.IOException;
91.26 -import java.util.LinkedList;
91.27 -import java.util.List;
91.28 -import java.util.concurrent.atomic.AtomicBoolean;
91.29 -import java.util.concurrent.atomic.AtomicReference;
91.30 -import javax.swing.AbstractAction;
91.31 -import javax.swing.Action;
91.32 -import org.netbeans.modules.xslt.core.multiview.XsltMultiViewSupport;
91.33 -import org.netbeans.modules.xslt.mapper.model.MapperContext;
91.34 -import org.openide.cookies.SaveCookie;
91.35 -import org.openide.filesystems.FileObject;
91.36 -import org.openide.loaders.DataNode;
91.37 -import org.openide.loaders.DataObjectExistsException;
91.38 -import org.openide.loaders.MultiDataObject;
91.39 -import org.openide.loaders.MultiFileLoader;
91.40 -import org.openide.nodes.Children;
91.41 -import org.openide.nodes.CookieSet;
91.42 -import org.openide.nodes.Node;
91.43 -import org.openide.text.DataEditorSupport;
91.44 -import org.openide.util.Lookup;
91.45 -import org.openide.util.lookup.AbstractLookup;
91.46 -import org.openide.util.lookup.InstanceContent;
91.47 -import org.openide.util.lookup.Lookups;
91.48 -import org.openide.util.lookup.ProxyLookup;
91.49 -
91.50 -/**
91.51 - *
91.52 - * @author Vitaly Bychkov
91.53 - * @version 1.0
91.54 - */
91.55 -public class XSLTDataObject extends MultiDataObject implements Lookup.Provider {
91.56 -
91.57 - private static final long serialVersionUID = 1L;
91.58 -
91.59 -// private transient final DataObjectCookieManager cookieManager;
91.60 - private static final String FILE_DESC = "LBL_FileNode_desc"; // NOI18N
91.61 - private transient AtomicReference<Lookup> myLookup =
91.62 - new AtomicReference<Lookup>();
91.63 - private transient AtomicBoolean isLookupInit = new AtomicBoolean( false );
91.64 - private XSLTDataEditorSupport myDataEditorSupport;
91.65 - private transient AtomicReference<InstanceContent> myServices =
91.66 - new AtomicReference<InstanceContent>();
91.67 -
91.68 -
91.69 - public XSLTDataObject( final FileObject pf, final MultiFileLoader loader )
91.70 - throws DataObjectExistsException
91.71 - {
91.72 - super(pf, loader);
91.73 - myDataEditorSupport = new XSLTDataEditorSupport(this);
91.74 -
91.75 - CookieSet cookies = getCookieSet();
91.76 - cookies.add( getEditorSupport() );
91.77 -
91.78 -// cookies.add((Node.Cookie) DataEditorSupport.create(this, getPrimaryEntry(), cookies));
91.79 - }
91.80 -
91.81 - public Lookup getLookup() {
91.82 - MapperContext mapperContext = getEditorSupport().getMapperContext();
91.83 -
91.84 - Lookup lookup;
91.85 - List<Lookup> list = new LinkedList<Lookup>();
91.86 - //TODO m
91.87 - if (myLookup.get() == null) {
91.88 - if (mapperContext == null) {
91.89 - list.add(Lookups.fixed( new Object[]{this,
91.90 - getEditorSupport()
91.91 -
91.92 -
91.93 - }));
91.94 - } else {
91.95 - list.add(Lookups.fixed( new Object[]{this,
91.96 - getEditorSupport(),
91.97 - mapperContext
91.98 -
91.99 - }));
91.100 - }
91.101 -
91.102 - list.add(Lookups.fixed( new Object[]{this ,
91.103 - // getEditorSupport() is needed for retrieving Editor Support as PrintProvider.
91.104 - // This lookup will be put into Design Nodes, so they will have the same lookup.
91.105 - getEditorSupport(),
91.106 - // Model is needed by all design. Design is used lookup for accessing to model.
91.107 - getEditorSupport().getXslModel()
91.108 -// TODO a
91.109 - // Add Validation Controller.
91.110 -// new XSLTValidationController(getEditorSupport().getXslModel())
91.111 - }));
91.112 - //
91.113 - // WARNING
91.114 - // CANNOT add Lookups.singleton(getNodeDelegate()) or will stack
91.115 - // overflow
91.116 - // WARNING
91.117 - //
91.118 -
91.119 - /*
91.120 - * Services are used for push/pop SaveCookie in lookup. This allow to work
91.121 - * "Save" action on diagram.
91.122 - */
91.123 - myServices.compareAndSet( null, new InstanceContent() );
91.124 - myServices.get().add( new Empty() ); // FIX for #IZ78702
91.125 - list.add(new AbstractLookup(myServices.get()));
91.126 -
91.127 - lookup = new ProxyLookup(list.toArray(new Lookup[list.size()]));
91.128 -
91.129 - // Lookup is now available from this Lookup.Provider but only from this
91.130 - // same thread which has the lock on Lookup
91.131 - //
91.132 - myLookup.compareAndSet(null, lookup);
91.133 - isLookupInit.compareAndSet( false, true );
91.134 - }
91.135 - return myLookup.get();
91.136 - }
91.137 -
91.138 - @Override
91.139 - public void setModified(boolean modified) {
91.140 - super.setModified(modified);
91.141 - if (modified) {
91.142 - getCookieSet().add(getSaveCookie());
91.143 - if ( isLookupInit.get() ) {
91.144 - myServices.get().add(getSaveCookie());
91.145 - }
91.146 - }
91.147 - else {
91.148 - getCookieSet().remove(getSaveCookie());
91.149 - if ( isLookupInit.get() ) {
91.150 - myServices.get().remove( getSaveCookie());
91.151 - }
91.152 - }
91.153 - }
91.154 -
91.155 - protected Node createNodeDelegate() {
91.156 - return new XSLTDataNode(this);
91.157 - }
91.158 -
91.159 - public XSLTDataEditorSupport getEditorSupport() {
91.160 - return myDataEditorSupport;
91.161 - }
91.162 -
91.163 - private SaveCookie getSaveCookie() {
91.164 - return new SaveCookie() {
91.165 -
91.166 - public void save() throws IOException {
91.167 - getEditorSupport().saveDocument();
91.168 - }
91.169 -
91.170 - @Override
91.171 - public int hashCode()
91.172 - {
91.173 - return getClass().hashCode();
91.174 - }
91.175 -
91.176 - @Override
91.177 - public boolean equals( Object other )
91.178 - {
91.179 - return other != null && getClass().equals(other.getClass());
91.180 - }
91.181 - };
91.182 - }
91.183 -
91.184 - private static class XSLTDataNode extends DataNode {
91.185 - XSLTDataEditorSupport myEditorSupport;
91.186 -
91.187 - public XSLTDataNode(XSLTDataObject obj) {
91.188 - super(obj, Children.LEAF);
91.189 - setIconBaseWithExtension(XSLTDataLoaderBeanInfo.PATH_TO_IMAGE);
91.190 - }
91.191 -
91.192 -// public Action getPreferredAction() {
91.193 -// return new AbstractAction() {
91.194 -// private static final long serialVersionUID = 1L;
91.195 -// public void actionPerformed(ActionEvent e) {
91.196 -// // Fix for #81066
91.197 -// if ( myEditorSupport.getOpenedPanes()==null ||
91.198 -// myEditorSupport.getOpenedPanes().length==0 ) {
91.199 -// myEditorSupport.open();
91.200 -// XsltMultiViewSupport support = XsltMultiViewSupport.getInstance();
91.201 -// support.requestViewOpen(myEditorSupport);
91.202 -// } else {
91.203 -// myEditorSupport.open();
91.204 -// }
91.205 -// }
91.206 -// };
91.207 -// }
91.208 -//
91.209 -
91.210 - }
91.211 -
91.212 - private static class Empty {
91.213 -
91.214 - }
91.215 -
91.216 -
91.217 -}
92.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/multiview/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
92.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
92.3 @@ -1,17 +0,0 @@
92.4 -# The contents of this file are subject to the terms of the Common Development
92.5 -# and Distribution License (the License). You may not use this file except in
92.6 -# compliance with the License.
92.7 -#
92.8 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
92.9 -# or http://www.netbeans.org/cddl.txt.
92.10 -
92.11 -# When distributing Covered Code, include this CDDL Header Notice in each file
92.12 -# and include the License file at http://www.netbeans.org/cddl.txt.
92.13 -# If applicable, add the following below the CDDL Header, with the fields
92.14 -# enclosed by brackets [] replaced by your own identifying information:
92.15 -# "Portions Copyrighted [year] [name of copyright owner]"
92.16 -#
92.17 -# The Original Software is NetBeans. The Initial Developer of the Original
92.18 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
92.19 -# Microsystems, Inc. All Rights Reserved.
92.20 -
93.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/multiview/XsltMultiViewSupport.java Wed Feb 21 08:53:38 2007 +0000
93.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
93.3 @@ -1,134 +0,0 @@
93.4 -/*
93.5 - * The contents of this file are subject to the terms of the Common Development
93.6 - * and Distribution License (the License). You may not use this file except in
93.7 - * compliance with the License.
93.8 - *
93.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
93.10 - * or http://www.netbeans.org/cddl.txt.
93.11 -
93.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
93.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
93.14 - * If applicable, add the following below the CDDL Header, with the fields
93.15 - * enclosed by brackets [] replaced by your own identifying information:
93.16 - * "Portions Copyrighted [year] [name of copyright owner]"
93.17 - *
93.18 - * The Original Software is NetBeans. The Initial Developer of the Original
93.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
93.20 - * Microsystems, Inc. All Rights Reserved.
93.21 - */
93.22 -
93.23 -package org.netbeans.modules.xslt.core.multiview;
93.24 -
93.25 -import java.util.ArrayList;
93.26 -import java.util.Collection;
93.27 -import java.util.List;
93.28 -import java.util.Set;
93.29 -
93.30 -import org.netbeans.core.api.multiview.MultiViewHandler;
93.31 -import org.netbeans.core.api.multiview.MultiViewPerspective;
93.32 -import org.netbeans.core.api.multiview.MultiViews;
93.33 -import org.netbeans.core.spi.multiview.MultiViewDescription;
93.34 -import org.netbeans.core.spi.multiview.MultiViewFactory;
93.35 -import org.netbeans.modules.xslt.core.XSLTDataEditorSupport;
93.36 -import org.netbeans.modules.xslt.core.XSLTDataObject;
93.37 -import org.netbeans.modules.xslt.core.multiview.source.XSLTSourceMultiViewElementDesc;
93.38 -import org.netbeans.modules.xslt.core.multiview.designer.DesignerMultiViewElement;
93.39 -import org.netbeans.modules.xslt.core.multiview.designer.DesignerMultiViewElementDesc;
93.40 -import org.netbeans.modules.xslt.core.multiview.mapper.MapperMultiViewElementDesc;
93.41 -import org.netbeans.modules.xslt.core.multiview.spi.XsltMultiviewProvider;
93.42 -import org.openide.loaders.DataObject;
93.43 -import org.openide.util.Lookup;
93.44 -import org.openide.util.Lookup.Result;
93.45 -import org.openide.windows.CloneableTopComponent;
93.46 -import org.openide.windows.TopComponent;
93.47 -
93.48 -
93.49 -/**
93.50 - *
93.51 - * @author Vitaly Bychkov
93.52 - * @version 1.0
93.53 - */
93.54 -public class XsltMultiViewSupport {
93.55 - private final static XsltMultiViewSupport INSTANCE = new XsltMultiViewSupport();
93.56 -
93.57 - private XsltMultiViewSupport() {
93.58 - }
93.59 -
93.60 - public static final XsltMultiViewSupport getInstance() {
93.61 - return INSTANCE;
93.62 - }
93.63 -
93.64 - public static CloneableTopComponent createMultiView( final XSLTDataObject
93.65 - dataObject ) {
93.66 - Collection coll = getMultiviewProviders();
93.67 -// MultiViewDescription views[] = new MultiViewDescription[coll.size()+1];
93.68 - MultiViewDescription views[] = {
93.69 - new XSLTSourceMultiViewElementDesc( dataObject ),
93.70 - new MapperMultiViewElementDesc( dataObject)
93.71 - };
93.72 - // TODO a
93.73 -// int i=0;
93.74 -// for ( Object provider : coll ) {
93.75 -// views[++i] = ((XsltMultiviewProvider)provider).
93.76 -// createMultiview(dataObject);
93.77 -// }
93.78 -
93.79 - CloneableTopComponent multiview =
93.80 - MultiViewFactory.createCloneableMultiView(
93.81 - views,
93.82 - views[0],
93.83 - new XSLTDataEditorSupport.CloseHandler( dataObject ));
93.84 - String name = dataObject.getNodeDelegate().getDisplayName();
93.85 - multiview.setDisplayName(name);
93.86 - multiview.setName(name);
93.87 - return multiview;
93.88 - }
93.89 -
93.90 - public void requestViewOpen(XSLTDataEditorSupport support) {
93.91 -
93.92 - List<TopComponent> associatedTCs = new ArrayList<TopComponent>();
93.93 - DataObject targetDO = support.getDataObject();
93.94 - TopComponent activeTC = TopComponent.getRegistry().getActivated();
93.95 - if (targetDO == (DataObject) activeTC.getLookup().lookup(DataObject.class)) {
93.96 - associatedTCs.add(activeTC);
93.97 - }
93.98 - Set openTCs = TopComponent.getRegistry().getOpened();
93.99 - for (Object tc : openTCs) {
93.100 - TopComponent topComponent = (TopComponent) tc;
93.101 - if (targetDO == (DataObject)topComponent.getLookup().lookup(
93.102 - DataObject.class)) {
93.103 - associatedTCs.add(topComponent);
93.104 - }
93.105 - }
93.106 -
93.107 - // Use the first TC in the list that has the desired perspective
93.108 - boolean found = false;
93.109 - for (TopComponent targetTC: associatedTCs){
93.110 - MultiViewHandler handler =
93.111 - MultiViews.findMultiViewHandler(targetTC);
93.112 - if ( handler==null) {
93.113 - continue;
93.114 - }
93.115 - MultiViewPerspective[] p = handler.getPerspectives();
93.116 - for (MultiViewPerspective mvp : p) {
93.117 - if ( !mvp.preferredID().equals(
93.118 - XSLTSourceMultiViewElementDesc.PREFERED_ID)) {
93.119 - handler.requestActive(mvp);
93.120 - found = true;
93.121 - break;
93.122 - }
93.123 - }
93.124 - if (found){
93.125 - break;
93.126 - }
93.127 - }
93.128 -
93.129 - }
93.130 -
93.131 - private static Collection getMultiviewProviders() {
93.132 - Result result = Lookup.getDefault().lookup(
93.133 - new Lookup.Template(XsltMultiviewProvider.class));
93.134 - return result.allInstances();
93.135 - }
93.136 -
93.137 -}
94.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/multiview/mapper/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
94.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
94.3 @@ -1,18 +0,0 @@
94.4 -# The contents of this file are subject to the terms of the Common Development
94.5 -# and Distribution License (the License). You may not use this file except in
94.6 -# compliance with the License.
94.7 -#
94.8 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
94.9 -# or http://www.netbeans.org/cddl.txt.
94.10 -
94.11 -# When distributing Covered Code, include this CDDL Header Notice in each file
94.12 -# and include the License file at http://www.netbeans.org/cddl.txt.
94.13 -# If applicable, add the following below the CDDL Header, with the fields
94.14 -# enclosed by brackets [] replaced by your own identifying information:
94.15 -# "Portions Copyrighted [year] [name of copyright owner]"
94.16 -#
94.17 -# The Original Software is NetBeans. The Initial Developer of the Original
94.18 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
94.19 -# Microsystems, Inc. All Rights Reserved.
94.20 -
94.21 -LBL_TAB_Mapper=Mapper
95.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/multiview/mapper/MapperMultiViewElement.java Wed Feb 21 08:53:38 2007 +0000
95.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
95.3 @@ -1,369 +0,0 @@
95.4 -/*
95.5 - * The contents of this file are subject to the terms of the Common Development
95.6 - * and Distribution License (the License). You may not use this file except in
95.7 - * compliance with the License.
95.8 - *
95.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
95.10 - * or http://www.netbeans.org/cddl.txt.
95.11 -
95.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
95.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
95.14 - * If applicable, add the following below the CDDL Header, with the fields
95.15 - * enclosed by brackets [] replaced by your own identifying information:
95.16 - * "Portions Copyrighted [year] [name of copyright owner]"
95.17 - *
95.18 - * The Original Software is NetBeans. The Initial Developer of the Original
95.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
95.20 - * Microsystems, Inc. All Rights Reserved.
95.21 - */
95.22 -
95.23 -package org.netbeans.modules.xslt.core.multiview.mapper;
95.24 -
95.25 -import java.awt.BorderLayout;
95.26 -import java.awt.Component;
95.27 -import java.awt.Dimension;
95.28 -import java.awt.GridBagConstraints;
95.29 -import java.io.IOException;
95.30 -import java.io.ObjectInput;
95.31 -import java.io.ObjectOutput;
95.32 -import javax.swing.Box;
95.33 -import javax.swing.JToggleButton;
95.34 -import org.netbeans.core.spi.multiview.CloseOperationState;
95.35 -import org.netbeans.core.spi.multiview.MultiViewElement;
95.36 -import org.netbeans.core.spi.multiview.MultiViewElementCallback;
95.37 -import org.netbeans.modules.xslt.core.XSLTDataEditorSupport;
95.38 -import org.netbeans.modules.xslt.core.XSLTDataObject;
95.39 -import org.netbeans.modules.xslt.mapper.model.MapperContext;
95.40 -import org.openide.windows.TopComponent;
95.41 -import java.io.Serializable;
95.42 -import java.util.Enumeration;
95.43 -import java.util.Iterator;
95.44 -import javax.swing.JButton;
95.45 -
95.46 -import javax.swing.JComponent;
95.47 -import javax.swing.JSlider;
95.48 -import javax.swing.JToolBar;
95.49 -import javax.swing.text.JTextComponent;
95.50 -import org.netbeans.core.api.multiview.MultiViewHandler;
95.51 -import org.netbeans.core.api.multiview.MultiViewPerspective;
95.52 -import org.netbeans.core.api.multiview.MultiViews;
95.53 -
95.54 -import org.netbeans.core.spi.multiview.MultiViewFactory;
95.55 -import org.netbeans.modules.xslt.mapper.palette.XsltPaletteFactory;
95.56 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
95.57 -import org.openide.util.Lookup;
95.58 -import org.openide.util.lookup.ProxyLookup;
95.59 -import org.openide.nodes.Node;
95.60 -import org.openide.util.lookup.Lookups;
95.61 -import org.openide.windows.CloneableTopComponent;
95.62 -import org.openide.windows.Mode;
95.63 -import org.openide.windows.TopComponentGroup;
95.64 -import org.openide.windows.WindowManager;
95.65 -
95.66 -/**
95.67 - *
95.68 - * @author Vitaly Bychkov
95.69 - * @version 1.0
95.70 - *
95.71 - */
95.72 -public class MapperMultiViewElement extends TopComponent
95.73 - implements MultiViewElement, Serializable
95.74 -{
95.75 - private static final long serialVersionUID = 1L;
95.76 - private transient MultiViewElementCallback myMultiViewObserver;
95.77 - private transient XsltMapper myMapperView;
95.78 -
95.79 - private XSLTDataObject myDataObject;
95.80 - private transient JComponent myToolBarPanel;
95.81 - private static Boolean groupVisible = null;
95.82 -
95.83 - // for deserialization
95.84 - private MapperMultiViewElement() {
95.85 - super();
95.86 - }
95.87 -
95.88 - /** Creates a new instance of MapperMultiViewElement. This is the visual
95.89 - * canvas 'Mapper' view in the multiview
95.90 - */
95.91 - public MapperMultiViewElement(XSLTDataObject dataObject) {
95.92 - myDataObject = dataObject;
95.93 - initializeLookup();
95.94 - initializeUI();
95.95 - }
95.96 -
95.97 - public void writeExternal(ObjectOutput out) throws IOException {
95.98 - super.writeExternal(out);
95.99 - out.writeObject(myDataObject);
95.100 - }
95.101 -
95.102 - /**
95.103 - * we are using Externalization semantics so that we can get a hook to call
95.104 - * initialize() upon deserialization
95.105 - */
95.106 - public void readExternal( ObjectInput in ) throws IOException,
95.107 - ClassNotFoundException {
95.108 - super.readExternal(in);
95.109 - myDataObject = (XSLTDataObject) in.readObject();
95.110 - initializeLookup();
95.111 - initializeUI();
95.112 - }
95.113 -
95.114 - private GridBagConstraints createGBConstraints() {
95.115 - GridBagConstraints gc = new GridBagConstraints();
95.116 - gc.fill = java.awt.GridBagConstraints.BOTH;
95.117 - gc.insets = new java.awt.Insets(0, 0, 0, 0);
95.118 - gc.weightx = 1.0;
95.119 - gc.weighty = 1.0;
95.120 - gc.anchor = GridBagConstraints.NORTHWEST;
95.121 - return gc;
95.122 - }
95.123 -
95.124 - ////////////////////////////////////////////////////////////////////////////
95.125 - // MultiViewElement
95.126 - ////////////////////////////////////////////////////////////////////////////
95.127 - public int getPersistenceType() {
95.128 - return TopComponent.PERSISTENCE_NEVER;
95.129 - }
95.130 -
95.131 - public CloseOperationState canCloseElement() {
95.132 - //
95.133 - // actually if there are any visual changed NOT committed to the model
95.134 - // then we may need to flush something here or something
95.135 - //
95.136 - boolean lastView = isLastView();
95.137 -
95.138 - if(!lastView) {
95.139 - return CloseOperationState.STATE_OK;
95.140 - }
95.141 -
95.142 - XSLTDataEditorSupport editorSupport = myDataObject.getEditorSupport();
95.143 - boolean modified = editorSupport.isModified();
95.144 -
95.145 - if(!modified) {
95.146 - return CloseOperationState.STATE_OK;
95.147 - } else {
95.148 - return MultiViewFactory.createUnsafeCloseState(
95.149 - "Data Object Modified", null, null); // NOI18N
95.150 - }
95.151 - }
95.152 -
95.153 - public void componentActivated() {
95.154 - super.componentActivated();
95.155 - }
95.156 -
95.157 - public void componentClosed() {
95.158 - super.componentClosed();
95.159 - myMapperView = null;
95.160 - }
95.161 -
95.162 - public void componentDeactivated() {
95.163 - super.componentDeactivated();
95.164 - }
95.165 -
95.166 - public void componentHidden() {
95.167 - super.componentHidden();
95.168 - if (myMapperView != null) {
95.169 - myMapperView.setVisible(false);
95.170 - }
95.171 - updateXsltTcGroupVisibility(false);
95.172 - }
95.173 -
95.174 - public void componentOpened() {
95.175 - super.componentOpened();
95.176 - }
95.177 -
95.178 - public void componentShowing() {
95.179 - super.componentShowing();
95.180 - if (myMapperView != null) {
95.181 - myMapperView.setVisible(true);
95.182 - }
95.183 - updateXsltTcGroupVisibility(true);
95.184 - }
95.185 -
95.186 - public JComponent getToolbarRepresentation() {
95.187 - if ( myToolBarPanel == null ) {
95.188 - JToolBar toolbar = new JToolBar();
95.189 - toolbar.setFloatable(false);
95.190 - toolbar.addSeparator();
95.191 -
95.192 - toolbar.add(Box.createHorizontalStrut(1));
95.193 -// TODO r | m
95.194 -// toolbar.add(new JButton("testButton"));
95.195 - toolbar.addSeparator();
95.196 - int maxButtonHeight = 0;
95.197 -
95.198 - for (Component c : toolbar.getComponents()) {
95.199 - if (c instanceof JButton || c instanceof JToggleButton) {
95.200 - maxButtonHeight = Math.max(c.getPreferredSize().height,
95.201 - maxButtonHeight);
95.202 - }
95.203 - }
95.204 -
95.205 - for (Component c : toolbar.getComponents()) {
95.206 - if (c instanceof JButton || c instanceof JToggleButton) {
95.207 - Dimension size = c.getMaximumSize();
95.208 - size.height = maxButtonHeight;
95.209 - c.setMaximumSize(size);
95.210 - c.setMinimumSize(c.getPreferredSize());
95.211 - } else if (c instanceof JTextComponent) {
95.212 - c.setMaximumSize(c.getPreferredSize());
95.213 - c.setMinimumSize(c.getPreferredSize());
95.214 - } else if (c instanceof JSlider) {
95.215 - Dimension size;
95.216 - size = c.getMaximumSize();
95.217 - size.width = 160;
95.218 - c.setMaximumSize(size);
95.219 -
95.220 - size = c.getPreferredSize();
95.221 - size.width = 160;
95.222 - c.setPreferredSize(size);
95.223 - } else {
95.224 - c.setMinimumSize(c.getPreferredSize());
95.225 - }
95.226 - }
95.227 - myToolBarPanel = toolbar;
95.228 - }
95.229 - return myToolBarPanel;
95.230 - }
95.231 -
95.232 - public JComponent getVisualRepresentation() {
95.233 - return this;
95.234 - }
95.235 -
95.236 - public void setMultiViewCallback(MultiViewElementCallback callback) {
95.237 - myMultiViewObserver = callback;
95.238 - }
95.239 -
95.240 - public void requestVisible() {
95.241 - if (myMultiViewObserver != null) {
95.242 - myMultiViewObserver.requestVisible();
95.243 - } else {
95.244 - super.requestVisible();
95.245 - }
95.246 - }
95.247 -
95.248 - public void requestActive() {
95.249 - if (myMultiViewObserver != null) {
95.250 - myMultiViewObserver.requestActive();
95.251 - } else {
95.252 - super.requestActive();
95.253 - }
95.254 - }
95.255 -
95.256 - protected boolean closeLast() {
95.257 - return true;
95.258 - }
95.259 -
95.260 - private XsltMapper createMapperView() {
95.261 - return new XsltMapper(getLookup()); // got TC's lookup or no Palette
95.262 -
95.263 - }
95.264 -
95.265 - private void initializeUI() {
95.266 - setLayout(new BorderLayout());
95.267 - myMapperView = createMapperView();
95.268 - add(myMapperView, BorderLayout.CENTER);
95.269 -
95.270 - setVisible(true);
95.271 - }
95.272 -
95.273 - /**
95.274 - * Open or close the xslt_mapper TopComponentGroup.
95.275 - */
95.276 - private static void updateXsltTcGroupVisibility(final boolean show) {
95.277 - // when active TopComponent changes, check if we should open or close
95.278 - // the XSLT editor group of windows
95.279 - WindowManager wm = WindowManager.getDefault();
95.280 - final TopComponentGroup group = wm.findTopComponentGroup("xslt_mapper"); // NOI18N
95.281 - if (group == null) {
95.282 - return; // group not found (should not happen)
95.283 - }
95.284 - //
95.285 - boolean mapperSelected = false;
95.286 - Iterator it = wm.getModes().iterator();
95.287 - while (it.hasNext()) {
95.288 - Mode mode = (Mode) it.next();
95.289 - TopComponent selected = mode.getSelectedTopComponent();
95.290 - if (selected != null) {
95.291 - MultiViewHandler mvh = MultiViews.findMultiViewHandler(selected);
95.292 - if (mvh != null) {
95.293 - MultiViewPerspective mvp = mvh.getSelectedPerspective();
95.294 - if (mvp != null) {
95.295 - String id = mvp.preferredID();
95.296 - if (MapperMultiViewElementDesc.PREFERRED_ID.equals(id)) {
95.297 - mapperSelected = true;
95.298 - break;
95.299 - }
95.300 - }
95.301 - }
95.302 - }
95.303 - }
95.304 - //
95.305 - if (mapperSelected && !Boolean.TRUE.equals(groupVisible)) {
95.306 - group.open();
95.307 - } else if (!mapperSelected && !Boolean.FALSE.equals(groupVisible)) {
95.308 - group.close();
95.309 - }
95.310 - //
95.311 - groupVisible = mapperSelected ? Boolean.TRUE : Boolean.FALSE;
95.312 - }
95.313 -
95.314 - public static String getMVEditorActivePanelPrefferedId() {
95.315 - TopComponent activeTC = WindowManager.getDefault().getRegistry()
95.316 - .getActivated();
95.317 - MultiViewHandler mvh = MultiViews.findMultiViewHandler(activeTC);
95.318 - if (mvh == null) {
95.319 - return null;
95.320 - }
95.321 -
95.322 - MultiViewPerspective mvp = mvh.getSelectedPerspective();
95.323 - if (mvp != null) {
95.324 - return mvp.preferredID();
95.325 - }
95.326 -
95.327 - return null;
95.328 - }
95.329 -
95.330 - private boolean isLastView() {
95.331 - boolean oneOrLess = true;
95.332 - Enumeration en =
95.333 - ((CloneableTopComponent)myMultiViewObserver.getTopComponent()
95.334 - ).getReference().getComponents();
95.335 - if (en.hasMoreElements()) {
95.336 - en.nextElement();
95.337 - if (en.hasMoreElements()) {
95.338 - oneOrLess = false;
95.339 - }
95.340 - }
95.341 -
95.342 - return oneOrLess;
95.343 - }
95.344 -
95.345 - private XSLTDataObject getDataObject() {
95.346 - return myDataObject;
95.347 - }
95.348 -
95.349 - private void initializeLookup() {
95.350 - associateLookup(createAssociateLookup());
95.351 - setActivatedNodes(new Node[] {getDataObject().getNodeDelegate()});
95.352 - }
95.353 -
95.354 - private Lookup createAssociateLookup() {
95.355 - MapperContext mapperContext = (MapperContext) myDataObject.getLookup().lookup(MapperContext.class);
95.356 -// System.out.println("test xslt lookup: "+mapperContext);
95.357 - if (mapperContext != null) {
95.358 -// System.out.println("sourceComponent: "+mapperContext.getSourceType());
95.359 -// System.out.println("targetComponent "+mapperContext.getTargetType());
95.360 -// System.out.println("xslModel "+mapperContext.getXSLModel());
95.361 - }
95.362 -
95.363 -
95.364 - //
95.365 - // see http://www.netbeans.org/issues/show_bug.cgi?id=67257
95.366 - //
95.367 - return new ProxyLookup(new Lookup[] {
95.368 - myDataObject.getLookup(), // this lookup contain objects that are used in OM clients
95.369 - Lookups.singleton(XsltPaletteFactory.getPalette())
95.370 - });
95.371 - }
95.372 -}
96.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/multiview/mapper/MapperMultiViewElementDesc.java Wed Feb 21 08:53:38 2007 +0000
96.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
96.3 @@ -1,81 +0,0 @@
96.4 -/*
96.5 - * The contents of this file are subject to the terms of the Common Development
96.6 - * and Distribution License (the License). You may not use this file except in
96.7 - * compliance with the License.
96.8 - *
96.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
96.10 - * or http://www.netbeans.org/cddl.txt.
96.11 -
96.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
96.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
96.14 - * If applicable, add the following below the CDDL Header, with the fields
96.15 - * enclosed by brackets [] replaced by your own identifying information:
96.16 - * "Portions Copyrighted [year] [name of copyright owner]"
96.17 - *
96.18 - * The Original Software is NetBeans. The Initial Developer of the Original
96.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
96.20 - * Microsystems, Inc. All Rights Reserved.
96.21 - */
96.22 -
96.23 -package org.netbeans.modules.xslt.core.multiview.mapper;
96.24 -
96.25 -import java.awt.Image;
96.26 -import java.beans.BeanInfo;
96.27 -import java.io.Serializable;
96.28 -
96.29 -import org.netbeans.core.spi.multiview.MultiViewDescription;
96.30 -import org.netbeans.core.spi.multiview.MultiViewElement;
96.31 -import org.netbeans.modules.xslt.core.XSLTDataObject;
96.32 -import org.openide.util.HelpCtx;
96.33 -import org.openide.util.NbBundle;
96.34 -import org.openide.windows.TopComponent;
96.35 -
96.36 -/**
96.37 - *
96.38 - * @author Vitaly Bychkov
96.39 - * @version 1.0
96.40 - *
96.41 - */
96.42 -public class MapperMultiViewElementDesc implements MultiViewDescription,
96.43 - Serializable
96.44 -{
96.45 -
96.46 - private static final long serialVersionUID = 1L;
96.47 - public static final String PREFERRED_ID = "xslt-mapper";
96.48 - private static final String LBL_MAPPER = "LBL_TAB_Mapper";
96.49 - private XSLTDataObject myDataObject;
96.50 -
96.51 - // for deserialization
96.52 - private MapperMultiViewElementDesc() {
96.53 - super();
96.54 - }
96.55 -
96.56 - public MapperMultiViewElementDesc(XSLTDataObject dataObject) {
96.57 - myDataObject = dataObject;
96.58 - }
96.59 -
96.60 - public MultiViewElement createElement() {
96.61 - return new MapperMultiViewElement(myDataObject);
96.62 - }
96.63 -
96.64 - public String getDisplayName() {
96.65 - return NbBundle.getBundle(getClass()).getString(LBL_MAPPER);
96.66 - }
96.67 -
96.68 - public org.openide.util.HelpCtx getHelpCtx() {
96.69 - return HelpCtx.DEFAULT_HELP;
96.70 - }
96.71 -
96.72 - public Image getIcon() {
96.73 - return myDataObject.getNodeDelegate().getIcon(BeanInfo.ICON_COLOR_16x16);
96.74 -
96.75 - }
96.76 -
96.77 - public int getPersistenceType() {
96.78 - return TopComponent.PERSISTENCE_ONLY_OPENED;
96.79 - }
96.80 -
96.81 - public String preferredID() {
96.82 - return PREFERRED_ID;
96.83 - }
96.84 -}
97.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/multiview/source/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
97.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
97.3 @@ -1,18 +0,0 @@
97.4 -# The contents of this file are subject to the terms of the Common Development
97.5 -# and Distribution License (the License). You may not use this file except in
97.6 -# compliance with the License.
97.7 -#
97.8 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
97.9 -# or http://www.netbeans.org/cddl.txt.
97.10 -
97.11 -# When distributing Covered Code, include this CDDL Header Notice in each file
97.12 -# and include the License file at http://www.netbeans.org/cddl.txt.
97.13 -# If applicable, add the following below the CDDL Header, with the fields
97.14 -# enclosed by brackets [] replaced by your own identifying information:
97.15 -# "Portions Copyrighted [year] [name of copyright owner]"
97.16 -#
97.17 -# The Original Software is NetBeans. The Initial Developer of the Original
97.18 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
97.19 -# Microsystems, Inc. All Rights Reserved.
97.20 -
97.21 -LBL_SourceMultiview_DisplayName=Source
98.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/multiview/source/XSLTSourceMultiViewElement.java Wed Feb 21 08:53:38 2007 +0000
98.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
98.3 @@ -1,372 +0,0 @@
98.4 -/*
98.5 - * The contents of this file are subject to the terms of the Common Development
98.6 - * and Distribution License (the License). You may not use this file except in
98.7 - * compliance with the License.
98.8 - *
98.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
98.10 - * or http://www.netbeans.org/cddl.txt.
98.11 -
98.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
98.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
98.14 - * If applicable, add the following below the CDDL Header, with the fields
98.15 - * enclosed by brackets [] replaced by your own identifying information:
98.16 - * "Portions Copyrighted [year] [name of copyright owner]"
98.17 - *
98.18 - * The Original Software is NetBeans. The Initial Developer of the Original
98.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
98.20 - * Microsystems, Inc. All Rights Reserved.
98.21 - */
98.22 -
98.23 -package org.netbeans.modules.xslt.core.multiview.source;
98.24 -import java.io.IOException;
98.25 -import java.io.ObjectInput;
98.26 -import java.io.ObjectOutput;
98.27 -import java.util.ArrayList;
98.28 -import java.util.Arrays;
98.29 -import java.util.Enumeration;
98.30 -import java.util.List;
98.31 -import javax.swing.Action;
98.32 -
98.33 -import javax.swing.JComponent;
98.34 -import javax.swing.JEditorPane;
98.35 -import javax.swing.JToolBar;
98.36 -import javax.swing.text.Document;
98.37 -import javax.swing.text.StyledDocument;
98.38 -
98.39 -import org.netbeans.core.spi.multiview.CloseOperationState;
98.40 -import org.netbeans.core.spi.multiview.MultiViewElement;
98.41 -import org.netbeans.core.spi.multiview.MultiViewElementCallback;
98.42 -import org.netbeans.core.spi.multiview.MultiViewFactory;
98.43 -import org.netbeans.modules.xml.xam.ui.undo.QuietUndoManager;
98.44 -import org.netbeans.modules.xslt.core.XSLTDataEditorSupport;
98.45 -import org.netbeans.modules.xslt.core.XSLTDataObject;
98.46 -import org.openide.awt.UndoRedo;
98.47 -import org.openide.nodes.Node;
98.48 -import org.openide.text.CloneableEditor;
98.49 -import org.openide.text.NbDocument;
98.50 -import org.openide.util.Lookup;
98.51 -import org.openide.util.lookup.Lookups;
98.52 -import org.openide.util.lookup.ProxyLookup;
98.53 -import org.openide.windows.CloneableTopComponent;
98.54 -import org.openide.windows.TopComponent;
98.55 -
98.56 -/**
98.57 - *
98.58 - * @author Vitaly Bychkov
98.59 - * @version 1.0
98.60 - */
98.61 -public class XSLTSourceMultiViewElement extends CloneableEditor
98.62 - implements MultiViewElement
98.63 -{
98.64 -
98.65 - private static final long serialVersionUID = 1L;
98.66 - static final String PREFERED_ID="XsltSourceView"; // NOI18N
98.67 - private transient MultiViewElementCallback myMultiViewObserver;
98.68 - private XSLTDataObject myDataObject;
98.69 - private transient JToolBar myToolBar;
98.70 -
98.71 - // for deserialization
98.72 - private XSLTSourceMultiViewElement() {
98.73 - super();
98.74 - }
98.75 -
98.76 - public XSLTSourceMultiViewElement( XSLTDataObject dataObject ) {
98.77 - super(dataObject.getEditorSupport());
98.78 - myDataObject = dataObject;
98.79 - // ================================================================
98.80 - // Initialize the editor support properly, which only needs to be
98.81 - // done when the editor is created (deserialization is working
98.82 - // due to CloneableEditor.readResolve() initializing the editor).
98.83 - // Note that this relies on the source view being the first in the
98.84 - // array of MultiViewDescription instances in XsltMultiViewSupport,
98.85 - // since that results in the source view being created and opened
98.86 - // by default, only to be hidden when the DataObject default action
98.87 - // makes the columns view appear.
98.88 - // This initialization fixes CR 6349089 by ensuring that the Node
98.89 - // listener is registered with the DataObject Node delegate.
98.90 - getDataObject().getEditorSupport().initializeCloneableEditor(this);
98.91 -
98.92 - initialize();
98.93 - }
98.94 -
98.95 - private XSLTDataObject getDataObject() {
98.96 - return myDataObject;
98.97 - }
98.98 -
98.99 - private void initialize() {
98.100 - /**
98.101 - * only thing which works to make the XmlNav show for this MVElement see
98.102 - * (http://www.netbeans.org/issues/show_bug.cgi?id=67257)
98.103 - */
98.104 - associateLookup(new ProxyLookup(new Lookup[] {
98.105 - // Lookups.singleton(getDataObject().getNodeDelegate())
98.106 - Lookups.fixed(new Object[] {
98.107 - // Need ActionMap in lookup so editor actions work.
98.108 - // Fix for #85512.
98.109 - getActionMap(),
98.110 - getDataObject(),
98.111 - getDataObject().getNodeDelegate() }) }));
98.112 - /*
98.113 - * getDataObject() is put here because method createMultiView in
98.114 - * XsltMultiviewSupport is create TopComponent with lookup
98.115 - * that retrieved from defaultDesc . This defaultDesc is source
98.116 - * description. So I put into lookup dataOject.
98.117 - * It will be used later for activate Design view.
98.118 - * Second object in lookup is "hack" that described above.
98.119 - */
98.120 -
98.121 - }
98.122 -
98.123 - public void writeExternal(ObjectOutput out) throws IOException {
98.124 - super.writeExternal(out);
98.125 - out.writeObject(myDataObject);
98.126 - }
98.127 -
98.128 - /**
98.129 - * we are using Externalization semantics so that we can get a hook to call
98.130 - * initialize() upon deserialization
98.131 - */
98.132 - public void readExternal(ObjectInput in)
98.133 - throws IOException, ClassNotFoundException {
98.134 - super.readExternal(in);
98.135 - Object obj = in.readObject();
98.136 - if ( obj instanceof XSLTDataObject) {
98.137 - myDataObject = (XSLTDataObject) obj;
98.138 - }
98.139 - initialize();
98.140 - }
98.141 -
98.142 - public int getPersistenceType() {
98.143 - return TopComponent.PERSISTENCE_ONLY_OPENED;
98.144 - }
98.145 -
98.146 - ////////////////////////////////////////////////////////////////////////////
98.147 - /////////////////////////// MultiViewElement //////////////////////////////
98.148 - ////////////////////////////////////////////////////////////////////////////
98.149 -
98.150 - /**
98.151 - * Adds the undo/redo manager to the document as an undoable
98.152 - * edit listener, so it receives the edits onto the queue.
98.153 - */
98.154 - private void addUndoManager() {
98.155 - XSLTDataEditorSupport editor = getDataObject().getEditorSupport();
98.156 - QuietUndoManager undo = editor.getUndoManager();
98.157 - StyledDocument doc = editor.getDocument();
98.158 - // Unlikely to be null, but could be if the cloned views are not
98.159 - // behaving correctly.
98.160 - if (doc != null) {
98.161 - // Ensure the listener is not added twice.
98.162 - doc.removeUndoableEditListener(undo);
98.163 - doc.addUndoableEditListener(undo);
98.164 - // Start the compound mode of the undo manager, such that when
98.165 - // we are hidden, we will treat all of the edits as a single
98.166 - // compound edit. This avoids having the user invoke undo
98.167 - // numerous times when in the model view.
98.168 - undo.beginCompound();
98.169 - }
98.170 - }
98.171 -
98.172 - /**
98.173 - * Removes the undo/redo manager undoable edit listener from the
98.174 - * document, to stop receiving undoable edits.
98.175 - */
98.176 - private void removeUndoManager() {
98.177 - XSLTDataEditorSupport editor = getDataObject().getEditorSupport();
98.178 - StyledDocument doc = editor.getDocument();
98.179 - // May be null when closing the editor.
98.180 - if (doc != null) {
98.181 - QuietUndoManager undo = editor.getUndoManager();
98.182 - doc.removeUndoableEditListener(undo);
98.183 - undo.endCompound();
98.184 - }
98.185 - }
98.186 -
98.187 - private boolean isLastView() {
98.188 - boolean oneOrLess = true;
98.189 - Enumeration en =
98.190 - ((CloneableTopComponent)myMultiViewObserver.getTopComponent()).
98.191 - getReference().getComponents();
98.192 - if (en.hasMoreElements()) {
98.193 - en.nextElement();
98.194 - if (en.hasMoreElements()) {
98.195 - oneOrLess = false;
98.196 - }
98.197 - }
98.198 -
98.199 - return oneOrLess;
98.200 - }
98.201 -
98.202 - private Action[] getNodeActions() {
98.203 - if (myMultiViewObserver == null) {
98.204 - return null;
98.205 - }
98.206 - Node[] activeNodes = myMultiViewObserver.getTopComponent().getActivatedNodes();;
98.207 - if (activeNodes != null && activeNodes.length > 0) {
98.208 - return activeNodes[0].getActions(true);
98.209 - }
98.210 - return null;
98.211 - }
98.212 -
98.213 - public CloseOperationState canCloseElement() {
98.214 - boolean lastView = isLastView();
98.215 - if(!lastView) {
98.216 - return CloseOperationState.STATE_OK;
98.217 - }
98.218 -
98.219 - //
98.220 - // not sure if we need to be intelligent here; other MV examples suggest
98.221 - // that you can just return dummy UnSafeCloseState() and delegate to the
98.222 - // closeHandler - for now we will be more intelligent and redundant here
98.223 - //
98.224 - boolean modified = cloneableEditorSupport().isModified();
98.225 - if(!modified) {
98.226 - return CloseOperationState.STATE_OK;
98.227 - } else {
98.228 - return MultiViewFactory.createUnsafeCloseState(
98.229 - "Data Object Modified", // NOI18N
98.230 - MultiViewFactory.NOOP_CLOSE_ACTION,
98.231 - MultiViewFactory.NOOP_CLOSE_ACTION);
98.232 - }
98.233 - }
98.234 -
98.235 - @Override
98.236 - public Action[] getActions() {
98.237 - Action[] retAction;
98.238 -
98.239 - if (myMultiViewObserver != null) {
98.240 - Action[] defActions = myMultiViewObserver.createDefaultActions();
98.241 - Action[] nodeActions = getNodeActions();
98.242 - if ( nodeActions != null && nodeActions.length > 0) {
98.243 - List<Action> actionsList = new ArrayList<Action>();
98.244 - actionsList.addAll(Arrays.asList(defActions));
98.245 - actionsList.addAll(Arrays.asList(nodeActions));
98.246 -
98.247 - retAction = new Action[actionsList.size()];
98.248 - retAction = actionsList.toArray(retAction);
98.249 - } else {
98.250 - retAction = defActions;
98.251 - }
98.252 - } else {
98.253 - retAction = super.getActions();
98.254 - }
98.255 - return retAction;
98.256 - }
98.257 -
98.258 - public void componentActivated() {
98.259 - super.componentActivated();
98.260 - // Set our activated nodes to kick Undo/Redo into action.
98.261 - // Need to do it twice in the event we are switching from another
98.262 - // multiview element that has the same activated nodes, in which
98.263 - // case no events are fired and so the UndoAction does not
98.264 - // register for changes with our undo manager.
98.265 - setActivatedNodes(new Node[0]);
98.266 - setActivatedNodes(new Node[] { getDataObject().getNodeDelegate() });
98.267 - addUndoManager();
98.268 - }
98.269 -
98.270 - public void componentClosed() {
98.271 - super.componentClosed();
98.272 -
98.273 - /*
98.274 - * Avoid memory leak. The first call is good it seems.
98.275 - *
98.276 - * The second is like a hack. But this works and could be a problem
98.277 - * only when this MultiviewElement will be reused after reopening.
98.278 - * It seems this is not a case - each time when editor is opened it is
98.279 - * instantiated.
98.280 - */
98.281 - setMultiViewCallback( null );
98.282 - if ( getParent()!= null ){
98.283 - getParent().remove( this );
98.284 - }
98.285 -
98.286 - }
98.287 -
98.288 - public JComponent getToolbarRepresentation() {
98.289 - Document doc = getEditorPane().getDocument();
98.290 - if (doc instanceof NbDocument.CustomToolbar) {
98.291 - if (myToolBar == null) {
98.292 - myToolBar = ((NbDocument.CustomToolbar) doc).createToolbar(getEditorPane());
98.293 - }
98.294 - return myToolBar;
98.295 - }
98.296 - return null;
98.297 - }
98.298 -
98.299 - public JComponent getVisualRepresentation() {
98.300 - return this;
98.301 - }
98.302 -
98.303 - public void componentDeactivated() {
98.304 - super.componentDeactivated();
98.305 - removeUndoManager();
98.306 - getDataObject().getEditorSupport().syncModel();
98.307 - }
98.308 -
98.309 -
98.310 - public void componentHidden() {
98.311 - super.componentHidden();
98.312 - removeUndoManager();
98.313 - getDataObject().getEditorSupport().syncModel();
98.314 - }
98.315 -
98.316 - public void componentOpened() {
98.317 - super.componentOpened();
98.318 - }
98.319 -
98.320 - public void componentShowing() {
98.321 - super.componentShowing();
98.322 - addUndoManager();
98.323 - }
98.324 -
98.325 - public void setMultiViewCallback( final MultiViewElementCallback callback) {
98.326 - myMultiViewObserver = callback;
98.327 - }
98.328 -
98.329 - public void requestVisible() {
98.330 - if (myMultiViewObserver != null) {
98.331 - myMultiViewObserver.requestVisible();
98.332 - } else {
98.333 - super.requestVisible();
98.334 - }
98.335 - }
98.336 -
98.337 - public void requestActive() {
98.338 - if (myMultiViewObserver != null) {
98.339 - myMultiViewObserver.requestActive();
98.340 - } else {
98.341 - super.requestActive();
98.342 - }
98.343 - }
98.344 -
98.345 - public UndoRedo getUndoRedo() {
98.346 - XSLTDataEditorSupport editor = myDataObject.getEditorSupport();
98.347 - return editor.getUndoManager();
98.348 - }
98.349 -
98.350 - protected String preferredID() {
98.351 - return PREFERED_ID;
98.352 - }
98.353 -
98.354 - /**
98.355 - * The close last method should be called only for the last clone.
98.356 - * If there are still existing clones this method must return false. The
98.357 - * implementation from the FormEditor always returns true but this is
98.358 - * not the expected behavior. The intention is to close the editor support
98.359 - * once the last editor has been closed, using the silent close to avoid
98.360 - * displaying a new dialog which is already being displayed via the
98.361 - * close handler.
98.362 - */
98.363 - protected boolean closeLast() {
98.364 - XSLTDataEditorSupport editor = getDataObject().getEditorSupport();
98.365 - JEditorPane[] editors = editor.getOpenedPanes();
98.366 - if (editors == null || editors.length == 0) {
98.367 - return editor.silentClose();
98.368 - }
98.369 - return false;
98.370 - }
98.371 -}
98.372 -
98.373 -
98.374 -
98.375 -
99.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/multiview/source/XSLTSourceMultiViewElementDesc.java Wed Feb 21 08:53:38 2007 +0000
99.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
99.3 @@ -1,91 +0,0 @@
99.4 -/*
99.5 - * The contents of this file are subject to the terms of the Common Development
99.6 - * and Distribution License (the License). You may not use this file except in
99.7 - * compliance with the License.
99.8 - *
99.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
99.10 - * or http://www.netbeans.org/cddl.txt.
99.11 -
99.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
99.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
99.14 - * If applicable, add the following below the CDDL Header, with the fields
99.15 - * enclosed by brackets [] replaced by your own identifying information:
99.16 - * "Portions Copyrighted [year] [name of copyright owner]"
99.17 - *
99.18 - * The Original Software is NetBeans. The Initial Developer of the Original
99.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
99.20 - * Microsystems, Inc. All Rights Reserved.
99.21 - */
99.22 -
99.23 -package org.netbeans.modules.xslt.core.multiview.source;
99.24 -
99.25 -import java.awt.Image;
99.26 -import java.beans.BeanInfo;
99.27 -import java.io.Serializable;
99.28 -
99.29 -import org.netbeans.core.spi.multiview.MultiViewDescription;
99.30 -import org.netbeans.core.spi.multiview.MultiViewElement;
99.31 -import org.netbeans.core.spi.multiview.MultiViewFactory;
99.32 -import org.netbeans.modules.xslt.core.XSLTDataObject;
99.33 -import org.openide.util.HelpCtx;
99.34 -import org.openide.util.NbBundle;
99.35 -import org.openide.windows.TopComponent;
99.36 -
99.37 -
99.38 -/**
99.39 - *
99.40 - * @author Vitaly Bychkov
99.41 - * @version 1.0
99.42 - */
99.43 -public class XSLTSourceMultiViewElementDesc
99.44 - implements MultiViewDescription, Serializable
99.45 -{
99.46 -
99.47 - private static final long serialVersionUID = 1L;
99.48 - public static final String PREFERED_ID = "xsltsource"; //NOI18N
99.49 - private static final String DISPLAY_NAME =
99.50 - "LBL_SourceMultiview_DisplayName"; //NOI18N
99.51 - private XSLTDataObject myDataObject;
99.52 -
99.53 - // need for serialization
99.54 - private XSLTSourceMultiViewElementDesc() {
99.55 - super();
99.56 - }
99.57 -
99.58 - public XSLTSourceMultiViewElementDesc( XSLTDataObject dataObject ) {
99.59 - super();
99.60 - myDataObject = dataObject;
99.61 - }
99.62 -
99.63 - public MultiViewElement createElement() {
99.64 - if ( myDataObject.getEditorSupport()!=null ) {
99.65 - return new XSLTSourceMultiViewElement( myDataObject );
99.66 - }
99.67 - return MultiViewFactory.BLANK_ELEMENT;
99.68 - }
99.69 -
99.70 - public String getDisplayName() {
99.71 - return NbBundle.getMessage(getClass(), DISPLAY_NAME );
99.72 - }
99.73 -
99.74 - public HelpCtx getHelpCtx() {
99.75 - return new HelpCtx(XSLTDataObject.class);
99.76 - }
99.77 -
99.78 - public Image getIcon() {
99.79 - return getDataObject().getNodeDelegate().getIcon(
99.80 - BeanInfo.ICON_COLOR_16x16);
99.81 - }
99.82 -
99.83 - public int getPersistenceType() {
99.84 - return TopComponent.PERSISTENCE_ONLY_OPENED;
99.85 - }
99.86 -
99.87 - public String preferredID() {
99.88 - return PREFERED_ID;
99.89 - }
99.90 -
99.91 - private XSLTDataObject getDataObject() {
99.92 - return myDataObject;
99.93 - }
99.94 -}
100.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/multiview/spi/XsltMultiviewProvider.java Wed Feb 21 08:53:38 2007 +0000
100.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
100.3 @@ -1,38 +0,0 @@
100.4 -/*
100.5 - * The contents of this file are subject to the terms of the Common Development
100.6 - * and Distribution License (the License). You may not use this file except in
100.7 - * compliance with the License.
100.8 - *
100.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
100.10 - * or http://www.netbeans.org/cddl.txt.
100.11 -
100.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
100.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
100.14 - * If applicable, add the following below the CDDL Header, with the fields
100.15 - * enclosed by brackets [] replaced by your own identifying information:
100.16 - * "Portions Copyrighted [year] [name of copyright owner]"
100.17 - *
100.18 - * The Original Software is NetBeans. The Initial Developer of the Original
100.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
100.20 - * Microsystems, Inc. All Rights Reserved.
100.21 - */
100.22 -package org.netbeans.modules.xslt.core.multiview.spi;
100.23 -
100.24 -import org.netbeans.core.spi.multiview.MultiViewDescription;
100.25 -import org.netbeans.modules.xslt.core.XSLTDataObject;
100.26 -
100.27 -
100.28 -/**
100.29 - *
100.30 - * @author Vitaly Bychkov
100.31 - * @version 1.0
100.32 - */
100.33 -public interface XsltMultiviewProvider {
100.34 -
100.35 - /**
100.36 - * Creates Multiview that will be used in editor for xslt file.
100.37 - * @param dataObject Xslt data object.
100.38 - * @return Multiview description for some multiview.
100.39 - */
100.40 - MultiViewDescription createMultiview( XSLTDataObject dataObject );
100.41 -}
101.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/resources/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
101.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
101.3 @@ -1,7 +0,0 @@
101.4 -OpenIDE-Module-Display-Category=XML
101.5 -OpenIDE-Module-Long-Description=\
101.6 - Dataobject and dataloader for XSL files.
101.7 -OpenIDE-Module-Name=XSLT Dataobject
101.8 -OpenIDE-Module-Short-Description=Dataobject and dataloader for XSL files.
101.9 -
101.10 -Services/MIMEResolver/org-netbeans-modules-xslt-dataobject-mime-resolver.xml=XSL Files
102.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/resources/layer.xml Wed Feb 21 08:53:38 2007 +0000
102.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
102.3 @@ -1,90 +0,0 @@
102.4 -<?xml version="1.0" encoding="UTF-8"?>
102.5 -<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
102.6 -<filesystem>
102.7 - <folder name="Loaders">
102.8 - <folder name="application">
102.9 - <folder name="xslt+xml">
102.10 - <folder name="Actions">
102.11 - <file name="org-openide-actions-EditAction.instance"/>
102.12 - <attr name="org-openide-actions-EditAction.instance/org-openide-actions-FileSystemAction.instance" boolvalue="true"/>
102.13 - <file name="org-openide-actions-FileSystemAction.instance"/>
102.14 - <attr name="org-openide-actions-FileSystemAction.instance/sep-1.instance" boolvalue="true"/>
102.15 - <file name="sep-1.instance">
102.16 - <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
102.17 - </file>
102.18 - <attr name="sep-1.instance/org-netbeans-modules-xml-core-actions-CollectXMLAction.instance" boolvalue="true"/>
102.19 - <file name="org-netbeans-modules-xml-core-actions-CollectXMLAction.instance"/>
102.20 - <attr name="org-netbeans-modules-xml-core-actions-CollectXMLAction.instance/sep-2.instance" boolvalue="true" />
102.21 - <file name="sep-2.instance">
102.22 - <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
102.23 - </file>
102.24 - <attr name="sep-2.instance/org-openide-actions-CutAction.instance" boolvalue="true"/>
102.25 - <file name="org-openide-actions-CutAction.instance"/>
102.26 - <attr name="org-openide-actions-CutAction.instance/org-openide-actions-CopyAction.instance" boolvalue="true"/>
102.27 - <file name="org-openide-actions-CopyAction.instance"/>
102.28 - <attr name="org-openide-actions-CopyAction.instance/org-openide-actions-PasteAction.instance" boolvalue="true" />
102.29 - <file name="org-openide-actions-PasteAction.instance"/>
102.30 - <attr name="org-openide-actions-PasteAction.instance/sep-3.instance" boolvalue="true" />
102.31 - <file name="sep-3.instance">
102.32 - <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
102.33 - </file>
102.34 - <attr name="sep-3.instance/org-openide-actions-DeleteAction.instance" boolvalue="true"/>
102.35 - <file name="org-openide-actions-DeleteAction.instance"/>
102.36 - <attr name="org-openide-actions-DeleteAction.instance/org-openide-actions-RenameAction.instance" boolvalue="true"/>
102.37 - <file name="org-openide-actions-RenameAction.instance"/>
102.38 - <attr name="org-openide-actions-RenameAction.instance/sep-4.instance" boolvalue="true"/>
102.39 - <file name="sep-4.instance">
102.40 - <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
102.41 - </file>
102.42 - <attr name="sep-4.instance/org-openide-actions-SaveAsTemplateAction.instance" boolvalue="true"/>
102.43 - <file name="org-openide-actions-SaveAsTemplateAction.instance"/>
102.44 - <attr name="org-openide-actions-SaveAsTemplateAction.instance/sep-5.instance" boolvalue="true"/>
102.45 - <file name="sep-5.instance">
102.46 - <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
102.47 - </file>
102.48 - <attr name="sep-5.instance/org-openide-actions-ToolsAction.instance" boolvalue="true"/>
102.49 - <file name="org-openide-actions-ToolsAction.instance"/>
102.50 - <attr name="org-openide-actions-ToolsAction.instance/org-openide-actions-PropertiesAction.instance" boolvalue="true"/>
102.51 - <file name="org-openide-actions-PropertiesAction.instance"/>
102.52 - </folder>
102.53 - </folder>
102.54 - </folder>
102.55 - </folder>
102.56 -
102.57 - <folder name="Services">
102.58 - <!-- Recognize application/xslt+xml: -->
102.59 - <folder name="MIMEResolver">
102.60 - <file name="org-netbeans-modules-xslt-core-mime-resolver.xml" url="mime-resolver.xml">
102.61 - <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/modules/xslt/core/resources/xslt_file.gif"/>
102.62 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.core.resources.Bundle"/>
102.63 - </file>
102.64 - </folder>
102.65 - </folder>
102.66 -
102.67 - <folder name="Navigator">
102.68 - <folder name="Panels">
102.69 - <folder name="application">
102.70 - <folder name="xslt+xml">
102.71 - <file name="org-netbeans-modules-xml-text-navigator-XMLNavigatorPanel.instance"/>
102.72 - </folder>
102.73 - </folder>
102.74 - </folder>
102.75 - </folder>
102.76 -
102.77 - <folder name="Windows2">
102.78 - <folder name="Groups">
102.79 - <file name="xslt_designer.wsgrp" url="windowmanager/xslt_designer.wsgrp"/>
102.80 - <file name="xslt_mapper.wsgrp" url="windowmanager/xslt_mapper.wsgrp"/>
102.81 - <folder name="xslt_designer">
102.82 - <file name="properties.wstcgrp" url="windowmanager/properties.wstcgrp"/>
102.83 - <file name="navigatorTC.wstcgrp" url="windowmanager/navigatorTC.wstcgrp"/>
102.84 - </folder>
102.85 - <folder name="xslt_mapper">
102.86 - <file name="properties.wstcgrp" url="windowmanager/properties.wstcgrp"/>
102.87 - <file name="navigatorTC.wstcgrp" url="windowmanager/navigatorTC.wstcgrp"/>
102.88 - </folder>
102.89 - </folder>
102.90 - </folder>
102.91 -
102.92 -</filesystem>
102.93 -
103.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/resources/mime-resolver.xml Wed Feb 21 08:53:38 2007 +0000
103.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
103.3 @@ -1,39 +0,0 @@
103.4 -<?xml version="1.0" encoding="UTF-8" ?>
103.5 -<!--
103.6 -The contents of this file are subject to the terms of the Common Development
103.7 -and Distribution License (the License). You may not use this file except in
103.8 -compliance with the License.
103.9 -
103.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
103.11 -or http://www.netbeans.org/cddl.txt.
103.12 -
103.13 -When distributing Covered Code, include this CDDL Header Notice in each file
103.14 -and include the License file at http://www.netbeans.org/cddl.txt.
103.15 -If applicable, add the following below the CDDL Header, with the fields
103.16 -enclosed by brackets [] replaced by your own identifying information:
103.17 -"Portions Copyrighted [year] [name of copyright owner]"
103.18 -
103.19 - The Original Software is NetBeans. The Initial Developer of the Original
103.20 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
103.21 - Microsystems, Inc. All Rights Reserved.
103.22 --->
103.23 -<!DOCTYPE MIME-resolver PUBLIC "-//NetBeans//DTD MIME Resolver 1.0//EN" "http://www.netbeans.org/dtds/mime-resolver-1_0.dtd">
103.24 -
103.25 -<MIME-resolver>
103.26 -
103.27 - <!-- Mark all XSLT with "application/xslt+xml" MIME content type -->
103.28 - <file>
103.29 - <ext name="xsl"/>
103.30 - <ext name="xslt"/>
103.31 - <resolver mime="application/xslt+xml"/>
103.32 - </file>
103.33 - <file>
103.34 - <ext name="xml"/>
103.35 - <resolver mime="application/xslt+xml">
103.36 - <xml-rule>
103.37 - <element ns="http://www.w3.org/1999/XSL/Transform"/>
103.38 - </xml-rule>
103.39 - </resolver>
103.40 - </file>
103.41 -
103.42 -</MIME-resolver>
104.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/resources/windowmanager/navigatorTC.wstcgrp Wed Feb 21 08:53:38 2007 +0000
104.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
104.3 @@ -1,10 +0,0 @@
104.4 -<?xml version="1.0" encoding="UTF-8" ?>
104.5 -
104.6 -<!DOCTYPE tc-group PUBLIC
104.7 - "-//NetBeans//DTD Top Component in Group Properties 2.0//EN"
104.8 - "http://www.netbeans.org/dtds/tc-group2_0.dtd">
104.9 -
104.10 -<tc-group version="2.0">
104.11 - <tc-id id="navigatorTC" />
104.12 - <open-close-behavior open="true" close="true" />
104.13 -</tc-group>
105.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/resources/windowmanager/properties.wstcgrp Wed Feb 21 08:53:38 2007 +0000
105.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
105.3 @@ -1,10 +0,0 @@
105.4 -<?xml version="1.0" encoding="UTF-8" ?>
105.5 -
105.6 -<!DOCTYPE tc-group PUBLIC
105.7 - "-//NetBeans//DTD Top Component in Group Properties 2.0//EN"
105.8 - "http://www.netbeans.org/dtds/tc-group2_0.dtd">
105.9 -
105.10 -<tc-group version="2.0">
105.11 - <tc-id id="properties" />
105.12 - <open-close-behavior open="true" close="true" />
105.13 -</tc-group>
105.14 \ No newline at end of file
106.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/resources/windowmanager/xslt_mapper.wsgrp Wed Feb 21 08:53:38 2007 +0000
106.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
106.3 @@ -1,11 +0,0 @@
106.4 -<?xml version="1.0" encoding="UTF-8"?>
106.5 -
106.6 -<!DOCTYPE group PUBLIC
106.7 - "-//NetBeans//DTD Group Properties 2.0//EN"
106.8 - "http://www.netbeans.org/dtds/group-properties2_0.dtd">
106.9 -
106.10 -<group version="2.0">
106.11 - <module name="org.netbeans.modules.xslt.core/1" spec="1.0" />
106.12 - <name unique="xslt_mapper" />
106.13 - <state opened="false" />
106.14 -</group>
107.1 --- a/xslt.mapper/build.xml Wed Feb 21 08:53:38 2007 +0000
107.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
107.3 @@ -1,8 +0,0 @@
107.4 -<?xml version="1.0" encoding="UTF-8"?>
107.5 -<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
107.6 -<!-- for some information on what you could do (e.g. targets to override). -->
107.7 -<!-- If you delete this file and reopen the project it will be recreated. -->
107.8 -<project name="org.netbeans.modules.xslt.mapper" default="netbeans" basedir=".">
107.9 - <description>Builds, tests, and runs the project org.netbeans.modules.xslt.mapper.</description>
107.10 - <import file="nbproject/build-impl.xml"/>
107.11 -</project>
108.1 --- a/xslt.mapper/manifest.mf Wed Feb 21 08:53:38 2007 +0000
108.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
108.3 @@ -1,6 +0,0 @@
108.4 -Manifest-Version: 1.0
108.5 -OpenIDE-Module: org.netbeans.modules.xslt.mapper
108.6 -OpenIDE-Module-Layer: org/netbeans/modules/xslt/mapper/layer.xml
108.7 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/xslt/mapper/Bundle.properties
108.8 -OpenIDE-Module-Specification-Version: 1.0
108.9 -
109.1 --- a/xslt.mapper/nbproject/project.properties Wed Feb 21 08:53:38 2007 +0000
109.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
109.3 @@ -1,2 +0,0 @@
109.4 -javac.compilerargs=-Xlint:unchecked
109.5 -javac.source=1.5
110.1 --- a/xslt.mapper/nbproject/project.xml Wed Feb 21 08:53:38 2007 +0000
110.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
110.3 @@ -1,169 +0,0 @@
110.4 -<?xml version="1.0" encoding="UTF-8"?>
110.5 -<project xmlns="http://www.netbeans.org/ns/project/1">
110.6 - <type>org.netbeans.modules.apisupport.project</type>
110.7 - <configuration>
110.8 - <data xmlns="http://www.netbeans.org/ns/nb-module-project/2">
110.9 - <code-name-base>org.netbeans.modules.xslt.mapper</code-name-base>
110.10 - <suite-component/>
110.11 - <module-dependencies>
110.12 - <dependency>
110.13 - <code-name-base>org.jdesktop.layout</code-name-base>
110.14 - <build-prerequisite/>
110.15 - <compile-dependency/>
110.16 - <run-dependency>
110.17 - <release-version>1</release-version>
110.18 - <specification-version>1.3.23</specification-version>
110.19 - </run-dependency>
110.20 - </dependency>
110.21 - <dependency>
110.22 - <code-name-base>org.netbeans.modules.soa.mapper</code-name-base>
110.23 - <build-prerequisite/>
110.24 - <compile-dependency/>
110.25 - <run-dependency>
110.26 - <specification-version>1.0</specification-version>
110.27 - </run-dependency>
110.28 - </dependency>
110.29 - <dependency>
110.30 - <code-name-base>org.netbeans.modules.soa.ui</code-name-base>
110.31 - <build-prerequisite/>
110.32 - <compile-dependency/>
110.33 - <run-dependency>
110.34 - <release-version>1</release-version>
110.35 - <specification-version>1.1</specification-version>
110.36 - </run-dependency>
110.37 - </dependency>
110.38 - <dependency>
110.39 - <code-name-base>org.netbeans.modules.xml.axi</code-name-base>
110.40 - <build-prerequisite/>
110.41 - <compile-dependency/>
110.42 - <run-dependency>
110.43 - <specification-version>1.2</specification-version>
110.44 - </run-dependency>
110.45 - </dependency>
110.46 - <dependency>
110.47 - <code-name-base>org.netbeans.modules.xml.retriever</code-name-base>
110.48 - <build-prerequisite/>
110.49 - <compile-dependency/>
110.50 - <run-dependency>
110.51 - <release-version>1</release-version>
110.52 - <specification-version>1.0.11</specification-version>
110.53 - </run-dependency>
110.54 - </dependency>
110.55 - <dependency>
110.56 - <code-name-base>org.netbeans.modules.xml.schema.model</code-name-base>
110.57 - <build-prerequisite/>
110.58 - <compile-dependency/>
110.59 - <run-dependency>
110.60 - <release-version>1</release-version>
110.61 - <specification-version>1.1.21</specification-version>
110.62 - </run-dependency>
110.63 - </dependency>
110.64 - <dependency>
110.65 - <code-name-base>org.netbeans.modules.xml.xam</code-name-base>
110.66 - <build-prerequisite/>
110.67 - <compile-dependency/>
110.68 - <run-dependency>
110.69 - <release-version>1</release-version>
110.70 - <specification-version>1.1.21</specification-version>
110.71 - </run-dependency>
110.72 - </dependency>
110.73 - <dependency>
110.74 - <code-name-base>org.netbeans.modules.xml.xpath</code-name-base>
110.75 - <build-prerequisite/>
110.76 - <compile-dependency/>
110.77 - <run-dependency>
110.78 - <specification-version>1.1</specification-version>
110.79 - </run-dependency>
110.80 - </dependency>
110.81 - <dependency>
110.82 - <code-name-base>org.netbeans.modules.xslt.model</code-name-base>
110.83 - <build-prerequisite/>
110.84 - <compile-dependency/>
110.85 - <run-dependency>
110.86 - <release-version>1</release-version>
110.87 - <specification-version>1.0</specification-version>
110.88 - </run-dependency>
110.89 - </dependency>
110.90 - <dependency>
110.91 - <code-name-base>org.netbeans.spi.palette</code-name-base>
110.92 - <build-prerequisite/>
110.93 - <compile-dependency/>
110.94 - <run-dependency>
110.95 - <release-version>1</release-version>
110.96 - <specification-version>1.6.1</specification-version>
110.97 - </run-dependency>
110.98 - </dependency>
110.99 - <dependency>
110.100 - <code-name-base>org.openide.awt</code-name-base>
110.101 - <build-prerequisite/>
110.102 - <compile-dependency/>
110.103 - <run-dependency>
110.104 - <specification-version>6.7.22</specification-version>
110.105 - </run-dependency>
110.106 - </dependency>
110.107 - <dependency>
110.108 - <code-name-base>org.openide.dialogs</code-name-base>
110.109 - <build-prerequisite/>
110.110 - <compile-dependency/>
110.111 - <run-dependency>
110.112 - <specification-version>6.5.22</specification-version>
110.113 - </run-dependency>
110.114 - </dependency>
110.115 - <dependency>
110.116 - <code-name-base>org.openide.filesystems</code-name-base>
110.117 - <build-prerequisite/>
110.118 - <compile-dependency/>
110.119 - <run-dependency>
110.120 - <specification-version>6.4.22</specification-version>
110.121 - </run-dependency>
110.122 - </dependency>
110.123 - <dependency>
110.124 - <code-name-base>org.openide.loaders</code-name-base>
110.125 - <build-prerequisite/>
110.126 - <compile-dependency/>
110.127 - <run-dependency>
110.128 - <specification-version>5.9.22</specification-version>
110.129 - </run-dependency>
110.130 - </dependency>
110.131 - <dependency>
110.132 - <code-name-base>org.openide.nodes</code-name-base>
110.133 - <build-prerequisite/>
110.134 - <compile-dependency/>
110.135 - <run-dependency>
110.136 - <specification-version>6.7.22</specification-version>
110.137 - </run-dependency>
110.138 - </dependency>
110.139 - <dependency>
110.140 - <code-name-base>org.openide.text</code-name-base>
110.141 - <build-prerequisite/>
110.142 - <compile-dependency/>
110.143 - <run-dependency>
110.144 - <specification-version>6.9.22</specification-version>
110.145 - </run-dependency>
110.146 - </dependency>
110.147 - <dependency>
110.148 - <code-name-base>org.openide.util</code-name-base>
110.149 - <build-prerequisite/>
110.150 - <compile-dependency/>
110.151 - <run-dependency>
110.152 - <specification-version>6.8.22</specification-version>
110.153 - </run-dependency>
110.154 - </dependency>
110.155 - <dependency>
110.156 - <code-name-base>org.openide.windows</code-name-base>
110.157 - <build-prerequisite/>
110.158 - <compile-dependency/>
110.159 - <run-dependency>
110.160 - <specification-version>6.5.22</specification-version>
110.161 - </run-dependency>
110.162 - </dependency>
110.163 - </module-dependencies>
110.164 - <friend-packages>
110.165 - <friend>org.netbeans.modules.xslt.core</friend>
110.166 - <package>org.netbeans.modules.xslt.mapper.palette</package>
110.167 - <package>org.netbeans.modules.xslt.mapper.view</package>
110.168 - <package>org.netbeans.modules.xslt.mapper.model</package>
110.169 - </friend-packages>
110.170 - </data>
110.171 - </configuration>
110.172 -</project>
111.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
111.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
111.3 @@ -1,1 +0,0 @@
111.4 -OpenIDE-Module-Name=XSLT Mapper
112.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/layer.xml Wed Feb 21 08:53:38 2007 +0000
112.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
112.3 @@ -1,1317 +0,0 @@
112.4 -<?xml version="1.0" encoding="UTF-8"?>
112.5 -<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
112.6 -<filesystem>
112.7 -
112.8 - <folder name="XsltPalette">
112.9 - <folder name="Operator">
112.10 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle"/>
112.11 - <attr name="metainfo" stringvalue="XPathMetainfo/Operator"/>
112.12 -
112.13 - <file name="equal.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/equal.xml">
112.14 - <attr name="metainfo" stringvalue="XPathMetainfo/Operator/equal"/>
112.15 - </file>
112.16 - <file name="not_equal.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/not_equal.xml">
112.17 - <attr name="metainfo" stringvalue="XPathMetainfo/Operator/not_equal"/>
112.18 - </file>
112.19 - <file name="less_than.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/less_than.xml">
112.20 - <attr name="metainfo" stringvalue="XPathMetainfo/Operator/less_than"/>
112.21 - </file>
112.22 - <file name="less_or_equal.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/less_or_equal.xml">
112.23 - <attr name="metainfo" stringvalue="XPathMetainfo/Operator/less_or_equal"/>
112.24 - </file>
112.25 - <file name="greater_than.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/greater_than.xml">
112.26 - <attr name="metainfo" stringvalue="XPathMetainfo/Operator/greater_than"/>
112.27 - </file>
112.28 - <file name="greater_or_equal.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/greater_or_equal.xml">
112.29 - <attr name="metainfo" stringvalue="XPathMetainfo/Operator/greater_or_equal"/>
112.30 - </file>
112.31 - <file name="addition.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/addition.xml">
112.32 - <attr name="metainfo" stringvalue="XPathMetainfo/Operator/addition"/>
112.33 - </file>
112.34 - <file name="subtraction.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/subtraction.xml">
112.35 - <attr name="metainfo" stringvalue="XPathMetainfo/Operator/subtraction"/>
112.36 - </file>
112.37 - <file name="multiplication.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/multiplication.xml">
112.38 - <attr name="metainfo" stringvalue="XPathMetainfo/Operator/multiplication"/>
112.39 - </file>
112.40 - <file name="division.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/division.xml">
112.41 - <attr name="metainfo" stringvalue="XPathMetainfo/Operator/division"/>
112.42 - </file>
112.43 - <file name="mod.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/mod.xml">
112.44 - <attr name="metainfo" stringvalue="XPathMetainfo/Operator/mod"/>
112.45 - </file>
112.46 - <file name="negative.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/negative.xml">
112.47 - <attr name="metainfo" stringvalue="XPathMetainfo/Operator/negative"/>
112.48 - </file>
112.49 -
112.50 - <!-- sorting -->
112.51 - <attr name="equal.xml/not_equal.xml" boolvalue="true"/>
112.52 - <attr name="not_equal.xml/less_than.xml" boolvalue="true"/>
112.53 - <attr name="less_than.xml/less_or_equal.xml" boolvalue="true"/>
112.54 - <attr name="less_or_equal.xml/addition.xml" boolvalue="true"/>
112.55 - <attr name="addition.xml/subtraction.xml" boolvalue="true"/>
112.56 - <attr name="subtraction.xml/multiplication.xml" boolvalue="true"/>
112.57 - <attr name="multiplication.xml/division.xml" boolvalue="true"/>
112.58 - <attr name="division.xml/mod.xml" boolvalue="true"/>
112.59 - <attr name="mod.xml/negative.xml" boolvalue="true"/>
112.60 - </folder>
112.61 -
112.62 - <folder name="String">
112.63 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle"/>
112.64 - <attr name="metainfo" stringvalue="XPathMetainfo/String"/>
112.65 -
112.66 - <file name="string-literal.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/string-literal.xml">
112.67 - <attr name="metainfo" stringvalue="XPathMetainfo/String/string-literal"/>
112.68 - </file>
112.69 - <file name="string.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/string.xml">
112.70 - <attr name="metainfo" stringvalue="XPathMetainfo/String/string"/>
112.71 - </file>
112.72 - <file name="concat.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/concat.xml">
112.73 - <attr name="metainfo" stringvalue="XPathMetainfo/String/concat"/>
112.74 - </file>
112.75 - <file name="starts-with.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/starts-with.xml">
112.76 - <attr name="metainfo" stringvalue="XPathMetainfo/String/starts-with"/>
112.77 - </file>
112.78 - <file name="contains.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/contains.xml">
112.79 - <attr name="metainfo" stringvalue="XPathMetainfo/String/contains"/>
112.80 - </file>
112.81 - <file name="substring-before.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/substring-before.xml">
112.82 - <attr name="metainfo" stringvalue="XPathMetainfo/String/substring-before"/>
112.83 - </file>
112.84 - <file name="substring-after.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/substring-after.xml">
112.85 - <attr name="metainfo" stringvalue="XPathMetainfo/String/substring-after"/>
112.86 - </file>
112.87 - <file name="substring.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/substring.xml">
112.88 - <attr name="metainfo" stringvalue="XPathMetainfo/String/substring"/>
112.89 - </file>
112.90 - <file name="normalize-space.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/normalize-space.xml">
112.91 - <attr name="metainfo" stringvalue="XPathMetainfo/String/normalize-space"/>
112.92 - </file>
112.93 - <file name="translate.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/translate.xml">
112.94 - <attr name="metainfo" stringvalue="XPathMetainfo/String/translate"/>
112.95 - </file>
112.96 - <file name="string-length.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/string-length.xml">
112.97 - <attr name="metainfo" stringvalue="XPathMetainfo/String/string-length"/>
112.98 - </file>
112.99 -
112.100 - <!-- sorting -->
112.101 - <attr name="string-literal.xml/string.xml" boolvalue="true"/>
112.102 - <attr name="string.xml/concat.xml" boolvalue="true"/>
112.103 - <attr name="concat.xml/starts-with.xml" boolvalue="true"/>
112.104 - <attr name="starts-with.xml/contains.xml" boolvalue="true"/>
112.105 - <attr name="contains.xml/substring-before.xml" boolvalue="true"/>
112.106 - <attr name="substring-before.xml/substring-after.xml" boolvalue="true"/>
112.107 - <attr name="substring-after.xml/substring.xml" boolvalue="true"/>
112.108 - <attr name="substring.xml/normalize-space.xml" boolvalue="true"/>
112.109 - <attr name="normalize-space.xml/translate.xml" boolvalue="true"/>
112.110 - <attr name="translate.xml/string-length.xml" boolvalue="true"/>
112.111 - </folder>
112.112 -
112.113 - <folder name="Number">
112.114 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle"/>
112.115 - <attr name="metainfo" stringvalue="XPathMetainfo/Number"/>
112.116 -
112.117 - <file name="number.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/number.xml">
112.118 - <attr name="metainfo" stringvalue="XPathMetainfo/Number/number"/>
112.119 - </file>
112.120 - <file name="sum.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/sum.xml">
112.121 - <attr name="metainfo" stringvalue="XPathMetainfo/Number/sum"/>
112.122 - </file>
112.123 - <file name="floor.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/floor.xml">
112.124 - <attr name="metainfo" stringvalue="XPathMetainfo/Number/floor"/>
112.125 - </file>
112.126 - <file name="ceiling.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/ceiling.xml">
112.127 - <attr name="metainfo" stringvalue="XPathMetainfo/Number/ceiling"/>
112.128 - </file>
112.129 - <file name="round.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/round.xml">
112.130 - <attr name="metainfo" stringvalue="XPathMetainfo/Number/round"/>
112.131 - </file>
112.132 - <file name="number-literal.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/number-literal.xml">
112.133 - <attr name="metainfo" stringvalue="XPathMetainfo/Number/number-literal"/>
112.134 - </file>
112.135 -
112.136 - <!-- sorting -->
112.137 - <attr name="number.xml/sum.xml" boolvalue="true"/>
112.138 - <attr name="sum.xml/floor.xml" boolvalue="true"/>
112.139 - <attr name="floor.xml/ceiling.xml" boolvalue="true"/>
112.140 - <attr name="ceiling.xml/round.xml" boolvalue="true"/>
112.141 - <attr name="round.xml/number-literal.xml" boolvalue="true"/>
112.142 - </folder>
112.143 -
112.144 - <folder name="Boolean">
112.145 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle"/>
112.146 - <attr name="metainfo" stringvalue="XPathMetainfo/Boolean"/>
112.147 -
112.148 - <file name="boolean.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/boolean.xml">
112.149 - <attr name="metainfo" stringvalue="XPathMetainfo/Boolean/boolean"/>
112.150 - </file>
112.151 - <file name="not.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/not.xml">
112.152 - <attr name="metainfo" stringvalue="XPathMetainfo/Boolean/not"/>
112.153 - </file>
112.154 - <file name="true.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/true.xml">
112.155 - <attr name="metainfo" stringvalue="XPathMetainfo/Boolean/true"/>
112.156 - </file>
112.157 - <file name="false.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/false.xml">
112.158 - <attr name="metainfo" stringvalue="XPathMetainfo/Boolean/false"/>
112.159 - </file>
112.160 - <file name="lang.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/lang.xml">
112.161 - <attr name="metainfo" stringvalue="XPathMetainfo/Boolean/lang"/>
112.162 - </file>
112.163 - <file name="or.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/or.xml">
112.164 - <attr name="metainfo" stringvalue="XPathMetainfo/Boolean/or"/>
112.165 - </file>
112.166 - <file name="and.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/and.xml">
112.167 - <attr name="metainfo" stringvalue="XPathMetainfo/Boolean/and"/>
112.168 - </file>
112.169 -
112.170 - <!-- sorting -->
112.171 - <attr name="boolean.xml/not.xml" boolvalue="true"/>
112.172 - <attr name="not.xml/true.xml" boolvalue="true"/>
112.173 - <attr name="true.xml/false.xml" boolvalue="true"/>
112.174 - <attr name="false.xml/lang.xml" boolvalue="true"/>
112.175 - <attr name="lang.xml/or.xml" boolvalue="true"/>
112.176 - <attr name="or.xml/and.xml" boolvalue="true"/>
112.177 - </folder>
112.178 -
112.179 - <folder name="Nodes">
112.180 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle"/>
112.181 - <attr name="metainfo" stringvalue="XPathMetainfo/Nodes"/>
112.182 -
112.183 - <file name="last.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/last.xml">
112.184 - <attr name="metainfo" stringvalue="XPathMetainfo/Nodes/last"/>
112.185 - </file>
112.186 - <file name="position.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/position.xml">
112.187 - <attr name="metainfo" stringvalue="XPathMetainfo/Nodes/position"/>
112.188 - </file>
112.189 - <file name="count.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/count.xml">
112.190 - <attr name="metainfo" stringvalue="XPathMetainfo/Nodes/count"/>
112.191 - </file>
112.192 - <file name="local-name.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/local-name.xml">
112.193 - <attr name="metainfo" stringvalue="XPathMetainfo/Nodes/local-name"/>
112.194 - </file>
112.195 - <file name="namespace-uri.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/namespace-uri.xml">
112.196 - <attr name="metainfo" stringvalue="XPathMetainfo/Nodes/namespace-uri"/>
112.197 - </file>
112.198 - <file name="name.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/name.xml">
112.199 - <attr name="metainfo" stringvalue="XPathMetainfo/Nodes/name"/>
112.200 - </file>
112.201 - <file name="xpath_expression.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/xpath_expression.xml">
112.202 - <attr name="metainfo" stringvalue="XPathMetainfo/Nodes/xpath_expression"/>
112.203 - </file>
112.204 -
112.205 - <!-- sorting -->
112.206 - <attr name="last.xml/position.xml" boolvalue="true"/>
112.207 - <attr name="position.xml/count.xml" boolvalue="true"/>
112.208 - <attr name="count.xml/local-name.xml" boolvalue="true"/>
112.209 - <attr name="local-name.xml/namespace-uri.xml" boolvalue="true"/>
112.210 - <attr name="namespace-uri.xml/name.xml" boolvalue="true"/>
112.211 - <attr name="name.xml/xpath_expression.xml" boolvalue="true"/>
112.212 - </folder>
112.213 -
112.214 -<!--
112.215 - <folder name="Datetime">
112.216 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle"/>
112.217 - <attr name="metainfo" stringvalue="XPathMetainfo/Datetime"/>
112.218 -
112.219 - <file name="current-dateTime.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/current-dateTime.xml">
112.220 - <attr name="metainfo" stringvalue="XPathMetainfo/Datetime/current-dateTime"/>
112.221 - </file>
112.222 - <file name="current-date.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/current-date.xml">
112.223 - <attr name="metainfo" stringvalue="XPathMetainfo/Datetime/current-date"/>
112.224 - </file>
112.225 - <file name="current-time.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/current-time.xml">
112.226 - <attr name="metainfo" stringvalue="XPathMetainfo/Datetime/current-time"/>
112.227 - </file>
112.228 - <file name="duration-literal.xml" url="nbresloc:/org/netbeans/modules/xslt/mapper/palette/duration-literal.xml">
112.229 - <attr name="metainfo" stringvalue="XPathMetainfo/Datetime/duration-literal"/>
112.230 - </file>
112.231 -
112.232 - <attr name="current-dateTime.xml/current-date.xml" boolvalue="true"/>
112.233 - <attr name="current-date.xml/current-time.xml" boolvalue="true"/>
112.234 - <attr name="current-time.xml/duration-literal.xml" boolvalue="true"/>
112.235 - </folder>
112.236 --->
112.237 - <!-- sorting -->
112.238 - <attr name="Operator/String" boolvalue="true"/>
112.239 - <attr name="String/Number" boolvalue="true"/>
112.240 - <attr name="Number/Boolean" boolvalue="true"/>
112.241 - <attr name="Boolean/Nodes" boolvalue="true"/>
112.242 -<!-- <attr name="Nodes/Datetime" boolvalue="true"/> -->
112.243 - </folder>
112.244 -
112.245 - <folder name="XPathMetainfo">
112.246 - <!-- commented last two categories -->
112.247 - <attr name="TotalCategories" intvalue="5" />
112.248 -
112.249 -
112.250 - <folder name="Operator">
112.251 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle"/>
112.252 - <attr name="Icon" stringvalue="Category_Operator_Icon"/>
112.253 - <attr name="A11yName" stringvalue="Category_Operator_A11yName"/>
112.254 - <attr name="A11yDesc" stringvalue="Category_Operator_A11yDesc"/>
112.255 - <file name="equal">
112.256 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.257 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/equal16.png" />
112.258 - <attr name="Class" stringvalue="Operator" />
112.259 - <attr name="Method" stringvalue="equal" />
112.260 - <attr name="Operator" stringvalue="==" />
112.261 - <attr name="InputNum" stringvalue="2" />
112.262 - <attr name="OutputNum" stringvalue="1" />
112.263 - <attr name="InputParam1" stringvalue="any1" />
112.264 - <attr name="InputType1" stringvalue="any" />
112.265 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Operator_equal_inputParm1" />
112.266 - <attr name="InputParam2" stringvalue="any2" />
112.267 - <attr name="InputType2" stringvalue="any" />
112.268 - <attr name="InputTooltip2" stringvalue="TOOLTIP_Operator_equal_inputParm2" />
112.269 - <attr name="OutputParam1" stringvalue="return boolean" />
112.270 - <attr name="OutputType1" stringvalue="boolean" />
112.271 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Operator_equal_outputParm" />
112.272 - <attr name="Tooltip" stringvalue="TOOLTIP_Operator_equal" />
112.273 - <attr name="LocalName" stringvalue="LBL_Operator_equal" />
112.274 - <attr name="Checked" boolvalue="true" />
112.275 - <attr name="A11yName" stringvalue="A11yName_Operator_equal"/>
112.276 - <attr name="A11yDesc" stringvalue="A11yDesc_Operator_equal"/>
112.277 - </file>
112.278 - <file name="not_equal">
112.279 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.280 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/not_equal16.png" />
112.281 - <attr name="Class" stringvalue="Operator" />
112.282 - <attr name="Method" stringvalue="not_equal" />
112.283 - <attr name="Operator" stringvalue="!=" />
112.284 - <attr name="InputNum" stringvalue="2" />
112.285 - <attr name="OutputNum" stringvalue="1" />
112.286 - <attr name="InputParam1" stringvalue="any1" />
112.287 - <attr name="InputType1" stringvalue="any" />
112.288 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Operator_not_equal_inputParm1" />
112.289 - <attr name="InputParam2" stringvalue="any2" />
112.290 - <attr name="InputType2" stringvalue="any" />
112.291 - <attr name="InputTooltip2" stringvalue="TOOLTIP_Operator_not_equal_inputParm2" />
112.292 - <attr name="OutputParam1" stringvalue="return not_equal:boolean" />
112.293 - <attr name="OutputType1" stringvalue="not_equal:boolean" />
112.294 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Operator_not_equal_outputParm" />
112.295 - <attr name="Tooltip" stringvalue="TOOLTIP_Operator_not_equal" />
112.296 - <attr name="LocalName" stringvalue="LBL_Operator_not_equal" />
112.297 - <attr name="Checked" boolvalue="true" />
112.298 - <attr name="A11yName" stringvalue="A11yName_Operator_not_equal"/>
112.299 - <attr name="A11yDesc" stringvalue="A11yDesc_Operator_not_equal"/>
112.300 - </file>
112.301 - <file name="less_than">
112.302 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.303 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/less_than16.png" />
112.304 - <attr name="Class" stringvalue="Operator" />
112.305 - <attr name="Method" stringvalue="less_than" />
112.306 - <attr name="Operator" stringvalue="<" />
112.307 - <attr name="InputNum" stringvalue="2" />
112.308 - <attr name="OutputNum" stringvalue="1" />
112.309 - <attr name="InputParam1" stringvalue="any1" />
112.310 - <attr name="InputType1" stringvalue="any" />
112.311 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Operator_less_than_inputParm1" />
112.312 - <attr name="InputParam2" stringvalue="any2" />
112.313 - <attr name="InputType2" stringvalue="any" />
112.314 - <attr name="InputTooltip2" stringvalue="TOOLTIP_Operator_less_than_inputParm2" />
112.315 - <attr name="OutputParam1" stringvalue="return boolean" />
112.316 - <attr name="OutputType1" stringvalue="boolean" />
112.317 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Operator_less_than_outputParm" />
112.318 - <attr name="Tooltip" stringvalue="TOOLTIP_Operator_less_than" />
112.319 - <attr name="LocalName" stringvalue="LBL_Operator_less_than" />
112.320 - <attr name="Checked" boolvalue="true" />
112.321 - <attr name="A11yName" stringvalue="A11yName_Operator_less_than"/>
112.322 - <attr name="A11yDesc" stringvalue="A11yDesc_Operator_less_than"/>
112.323 - </file>
112.324 - <file name="less_or_equal">
112.325 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.326 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/less_or_equal16.png" />
112.327 - <attr name="Class" stringvalue="Operator" />
112.328 - <attr name="Method" stringvalue="less_or_equal" />
112.329 - <attr name="Operator" stringvalue="<=" />
112.330 - <attr name="InputNum" stringvalue="2" />
112.331 - <attr name="OutputNum" stringvalue="1" />
112.332 - <attr name="InputParam1" stringvalue="any1" />
112.333 - <attr name="InputType1" stringvalue="any" />
112.334 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Operator_less_or_equal_inputParm1" />
112.335 - <attr name="InputParam2" stringvalue="any2" />
112.336 - <attr name="InputType2" stringvalue="any" />
112.337 - <attr name="InputTooltip2" stringvalue="TOOLTIP_Operator_less_or_equal_inputParm2" />
112.338 - <attr name="OutputParam1" stringvalue="return boolean" />
112.339 - <attr name="OutputType1" stringvalue="boolean" />
112.340 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Operator_less_or_equal_outputParm" />
112.341 - <attr name="Tooltip" stringvalue="TOOLTIP_Operator_less_or_equal" />
112.342 - <attr name="LocalName" stringvalue="LBL_Operator_less_or_equal" />
112.343 - <attr name="Checked" boolvalue="true" />
112.344 - <attr name="A11yName" stringvalue="A11yName_Operator_less_or_equal"/>
112.345 - <attr name="A11yDesc" stringvalue="A11yDesc_Operator_less_or_equal"/>
112.346 - </file>
112.347 - <file name="greater_than">
112.348 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.349 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/greater_than16.png" />
112.350 - <attr name="Class" stringvalue="Operator" />
112.351 - <attr name="Method" stringvalue="greater_than" />
112.352 - <attr name="Operator" stringvalue=">" />
112.353 - <attr name="InputNum" stringvalue="2" />
112.354 - <attr name="OutputNum" stringvalue="1" />
112.355 - <attr name="InputParam1" stringvalue="any1" />
112.356 - <attr name="InputType1" stringvalue="any" />
112.357 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Operator_greater_than_inputParm1" />
112.358 - <attr name="InputParam2" stringvalue="any2" />
112.359 - <attr name="InputType2" stringvalue="any" />
112.360 - <attr name="InputTooltip2" stringvalue="TOOLTIP_Operator_greater_than_inputParm2" />
112.361 - <attr name="OutputParam1" stringvalue="return boolean" />
112.362 - <attr name="OutputType1" stringvalue="boolean" />
112.363 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Operator_greater_than_outputParm" />
112.364 - <attr name="Tooltip" stringvalue="TOOLTIP_Operator_greater_than" />
112.365 - <attr name="LocalName" stringvalue="LBL_Operator_greater_than" />
112.366 - <attr name="Checked" boolvalue="true" />
112.367 - <attr name="A11yName" stringvalue="A11yName_Operator_greater_than"/>
112.368 - <attr name="A11yDesc" stringvalue="A11yDesc_Operator_greater_than"/>
112.369 - </file>
112.370 - <file name="greater_or_equal">
112.371 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.372 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/greater_or_equal16.png" />
112.373 - <attr name="Class" stringvalue="Operator" />
112.374 - <attr name="Method" stringvalue="greater_or_equal" />
112.375 - <attr name="Operator" stringvalue=">=" />
112.376 - <attr name="InputNum" stringvalue="2" />
112.377 - <attr name="OutputNum" stringvalue="1" />
112.378 - <attr name="InputParam1" stringvalue="any1" />
112.379 - <attr name="InputType1" stringvalue="any" />
112.380 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Operator_greater_or_equal_inputParm1" />
112.381 - <attr name="InputParam2" stringvalue="any2" />
112.382 - <attr name="InputType2" stringvalue="any" />
112.383 - <attr name="InputTooltip2" stringvalue="TOOLTIP_Operator_greater_or_equal_inputParm2" />
112.384 - <attr name="OutputParam1" stringvalue="return boolean" />
112.385 - <attr name="OutputType1" stringvalue="boolean" />
112.386 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Operator_greater_or_equal_outputParm" />
112.387 - <attr name="Tooltip" stringvalue="TOOLTIP_Operator_greater_or_equal" />
112.388 - <attr name="LocalName" stringvalue="LBL_Operator_greater_or_equal" />
112.389 - <attr name="Checked" boolvalue="true" />
112.390 - <attr name="A11yName" stringvalue="A11yName_Operator_greater_or_equal"/>
112.391 - <attr name="A11yDesc" stringvalue="A11yDesc_Operator_greater_or_equal"/>
112.392 - </file>
112.393 - <file name="addition">
112.394 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.395 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/addition16.png" />
112.396 - <attr name="Class" stringvalue="Operator" />
112.397 - <attr name="Method" stringvalue="addition" />
112.398 - <attr name="Operator" stringvalue="+" />
112.399 - <attr name="InputNum" stringvalue="2" />
112.400 - <attr name="OutputNum" stringvalue="1" />
112.401 - <attr name="InputParam1" stringvalue="number1" />
112.402 - <attr name="InputType1" stringvalue="number" />
112.403 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Operator_addition_inputParm1" />
112.404 - <attr name="InputParam2" stringvalue="number2" />
112.405 - <attr name="InputType2" stringvalue="number" />
112.406 - <attr name="InputTooltip2" stringvalue="TOOLTIP_Operator_addition_inputParm2" />
112.407 - <attr name="OutputParam1" stringvalue="return number" />
112.408 - <attr name="OutputType1" stringvalue="number" />
112.409 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Operator_addition_outputParm" />
112.410 - <attr name="Tooltip" stringvalue="TOOLTIP_Operator_addition" />
112.411 - <attr name="LocalName" stringvalue="LBL_Operator_addition" />
112.412 - <attr name="Checked" boolvalue="true" />
112.413 - <attr name="A11yName" stringvalue="A11yName_Operator_addition"/>
112.414 - <attr name="A11yDesc" stringvalue="A11yDesc_Operator_addition"/>
112.415 - </file>
112.416 - <file name="subtraction">
112.417 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.418 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/subtraction16.png" />
112.419 - <attr name="Class" stringvalue="Operator" />
112.420 - <attr name="Method" stringvalue="subtraction" />
112.421 - <attr name="Operator" stringvalue="-" />
112.422 - <attr name="InputNum" stringvalue="2" />
112.423 - <attr name="OutputNum" stringvalue="1" />
112.424 - <attr name="InputParam1" stringvalue="number1" />
112.425 - <attr name="InputType1" stringvalue="number" />
112.426 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Operator_subtraction_inputParm1" />
112.427 - <attr name="InputParam2" stringvalue="number2" />
112.428 - <attr name="InputType2" stringvalue="number" />
112.429 - <attr name="InputTooltip2" stringvalue="TOOLTIP_Operator_subtraction_inputParm2" />
112.430 - <attr name="OutputParam1" stringvalue="return number" />
112.431 - <attr name="OutputType1" stringvalue="number" />
112.432 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Operator_subtraction_outputParm" />
112.433 - <attr name="Tooltip" stringvalue="TOOLTIP_Operator_subtraction" />
112.434 - <attr name="LocalName" stringvalue="LBL_Operator_subtraction" />
112.435 - <attr name="Checked" boolvalue="true" />
112.436 - <attr name="A11yName" stringvalue="A11yName_Operator_subtraction"/>
112.437 - <attr name="A11yDesc" stringvalue="A11yDesc_Operator_subtraction"/>
112.438 - </file>
112.439 - <file name="multiplication">
112.440 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.441 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/multiplication16.png" />
112.442 - <attr name="Class" stringvalue="Operator" />
112.443 - <attr name="Method" stringvalue="multiplication" />
112.444 - <attr name="Operator" stringvalue="*" />
112.445 - <attr name="InputNum" stringvalue="2" />
112.446 - <attr name="OutputNum" stringvalue="1" />
112.447 - <attr name="InputParam1" stringvalue="number1" />
112.448 - <attr name="InputType1" stringvalue="number" />
112.449 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Operator_multiplication_inputParm1" />
112.450 - <attr name="InputParam2" stringvalue="number2" />
112.451 - <attr name="InputType2" stringvalue="number" />
112.452 - <attr name="InputTooltip2" stringvalue="TOOLTIP_Operator_multiplication_inputParm2" />
112.453 - <attr name="OutputParam1" stringvalue="return number" />
112.454 - <attr name="OutputType1" stringvalue="number" />
112.455 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Operator_multiplication_outputParm" />
112.456 - <attr name="Tooltip" stringvalue="TOOLTIP_Operator_multiplication" />
112.457 - <attr name="LocalName" stringvalue="LBL_Operator_multiplication" />
112.458 - <attr name="Checked" boolvalue="true" />
112.459 - <attr name="A11yName" stringvalue="A11yName_Operator_multiplication"/>
112.460 - <attr name="A11yDesc" stringvalue="A11yDesc_Operator_multiplication"/>
112.461 - </file>
112.462 - <file name="division">
112.463 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.464 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/division16.png" />
112.465 - <attr name="Class" stringvalue="Operator" />
112.466 - <attr name="Method" stringvalue="division" />
112.467 - <attr name="Operator" stringvalue="div" />
112.468 - <attr name="InputNum" stringvalue="2" />
112.469 - <attr name="OutputNum" stringvalue="1" />
112.470 - <attr name="InputParam1" stringvalue="number1" />
112.471 - <attr name="InputType1" stringvalue="number" />
112.472 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Operator_div_inputParm1" />
112.473 - <attr name="InputParam2" stringvalue="number2" />
112.474 - <attr name="InputType2" stringvalue="number" />
112.475 - <attr name="InputTooltip2" stringvalue="TOOLTIP_Operator_div_inputParm2" />
112.476 - <attr name="OutputParam1" stringvalue="return number" />
112.477 - <attr name="OutputType1" stringvalue="number" />
112.478 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Operator_div_outputParm" />
112.479 - <attr name="Tooltip" stringvalue="TOOLTIP_Operator_div" />
112.480 - <attr name="LocalName" stringvalue="LBL_Operator_div" />
112.481 - <attr name="Checked" boolvalue="true" />
112.482 - <attr name="A11yName" stringvalue="A11yName_Operator_div"/>
112.483 - <attr name="A11yDesc" stringvalue="A11yDesc_Operator_div"/>
112.484 - </file>
112.485 - <file name="mod">
112.486 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.487 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/remainder16.png" />
112.488 - <attr name="Class" stringvalue="Operator" />
112.489 - <attr name="Method" stringvalue="remainder" />
112.490 - <attr name="Operator" stringvalue="mod" />
112.491 - <attr name="InputNum" stringvalue="2" />
112.492 - <attr name="OutputNum" stringvalue="1" />
112.493 - <attr name="InputParam1" stringvalue="number1" />
112.494 - <attr name="InputType1" stringvalue="number" />
112.495 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Operator_mod_inputParm1" />
112.496 - <attr name="InputParam2" stringvalue="number2" />
112.497 - <attr name="InputType2" stringvalue="number" />
112.498 - <attr name="InputTooltip2" stringvalue="TOOLTIP_Operator_mod_inputParm2" />
112.499 - <attr name="OutputParam1" stringvalue="return number" />
112.500 - <attr name="OutputType1" stringvalue="number" />
112.501 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Operator_mod_outputParm" />
112.502 - <attr name="Tooltip" stringvalue="TOOLTIP_Operator_mod" />
112.503 - <attr name="LocalName" stringvalue="LBL_Operator_mod" />
112.504 - <attr name="Checked" boolvalue="true" />
112.505 - <attr name="A11yName" stringvalue="A11yName_Operator_mod"/>
112.506 - <attr name="A11yDesc" stringvalue="A11yDesc_Operator_mod"/>
112.507 - </file>
112.508 - <file name="negative">
112.509 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.510 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/negative16.png" />
112.511 - <attr name="Class" stringvalue="Operator" />
112.512 - <attr name="Method" stringvalue="negative" />
112.513 - <attr name="Operator" stringvalue="negative" />
112.514 - <attr name="InputNum" stringvalue="1" />
112.515 - <attr name="OutputNum" stringvalue="1" />
112.516 - <attr name="InputParam1" stringvalue="number" />
112.517 - <attr name="InputType1" stringvalue="number" />
112.518 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Operator_negative_inputParm1" />
112.519 - <attr name="OutputParam1" stringvalue="return number" />
112.520 - <attr name="OutputType1" stringvalue="number" />
112.521 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Operator_negative_outputParm" />
112.522 - <attr name="Tooltip" stringvalue="TOOLTIP_Operator_negative" />
112.523 - <attr name="LocalName" stringvalue="LBL_Operator_negative" />
112.524 - <attr name="Checked" boolvalue="true" />
112.525 - <attr name="A11yName" stringvalue="A11yName_Operator_negative"/>
112.526 - <attr name="A11yDesc" stringvalue="A11yDesc_Operator_negative"/>
112.527 - </file>
112.528 -
112.529 - <attr name="equal/not_equal" boolvalue="true" />
112.530 - <attr name="not_equal/greater_than" boolvalue="true" />
112.531 - <attr name="greater_than/greater_or_equal" boolvalue="true" />
112.532 - <attr name="greater_or_equal/less_than" boolvalue="true" />
112.533 - <attr name="less_than/less_or_equal" boolvalue="true" />
112.534 - <attr name="less_or_equal/addition" boolvalue="true" />
112.535 - <attr name="addition/subtraction" boolvalue="true" />
112.536 - <attr name="subtraction/multiplication" boolvalue="true" />
112.537 - <attr name="multiplication/division" boolvalue="true" />
112.538 - <attr name="division/mod" boolvalue="true" />
112.539 - <attr name="mod/negative" boolvalue="true" />
112.540 -
112.541 - </folder>
112.542 -
112.543 -
112.544 - <folder name="String">
112.545 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle"/>
112.546 - <attr name="Icon" stringvalue="Category_String_Icon"/>
112.547 - <attr name="A11yName" stringvalue="Category_String_A11yName"/>
112.548 - <attr name="A11yDesc" stringvalue="Category_String_A11yDesc"/>
112.549 - <file name="string-literal">
112.550 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.551 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/string-literal16.png" />
112.552 - <attr name="Class" stringvalue="String" />
112.553 - <attr name="Method" stringvalue="string-literal" />
112.554 - <attr name="InputNum" stringvalue="0" />
112.555 - <attr name="OutputNum" stringvalue="1" />
112.556 - <attr name="OutputParam1" stringvalue="return_string" />
112.557 - <attr name="OutputType1" stringvalue="string" />
112.558 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_String_string-literal_outputParm" />
112.559 - <attr name="Tooltip" stringvalue="TOOLTIP_String_string-literal" />
112.560 - <attr name="LocalName" stringvalue="LBL_String_string-literal" />
112.561 - <attr name="EditableLiteral" boolvalue="true"/>
112.562 - <attr name="Checked" boolvalue="true" />
112.563 - <attr name="A11yName" stringvalue="A11yName_String_string-literal"/>
112.564 - <attr name="A11yDesc" stringvalue="A11yDesc_String_string-literal"/>
112.565 - </file>
112.566 - <file name="string">
112.567 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.568 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/string16.png" />
112.569 - <attr name="Class" stringvalue="String" />
112.570 - <attr name="Method" stringvalue="string" />
112.571 - <attr name="Function" stringvalue="string" />
112.572 - <attr name="InputNum" stringvalue="1" />
112.573 - <attr name="OutputNum" stringvalue="1" />
112.574 - <attr name="InputParam1" stringvalue="object?" />
112.575 - <attr name="InputType1" stringvalue="object" />
112.576 - <attr name="InputTooltip1" stringvalue="TOOLTIP_String_string_inputParm1" />
112.577 - <attr name="OutputParam1" stringvalue="return string" />
112.578 - <attr name="OutputType1" stringvalue="string" />
112.579 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_String_string_outputParm" />
112.580 - <attr name="Tooltip" stringvalue="TOOLTIP_String_string" />
112.581 - <attr name="LocalName" stringvalue="LBL_String_string" />
112.582 - <attr name="Checked" boolvalue="true" />
112.583 - <attr name="A11yName" stringvalue="A11yName_String_string"/>
112.584 - <attr name="A11yDesc" stringvalue="A11yDesc_String_string"/>
112.585 - </file>
112.586 - <file name="concat">
112.587 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.588 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/concat16.png" />
112.589 - <attr name="Class" stringvalue="String" />
112.590 - <attr name="Method" stringvalue="concat" />
112.591 - <attr name="Function" stringvalue="concat" />
112.592 - <attr name="InputNum" stringvalue="2" />
112.593 - <attr name="OutputNum" stringvalue="1" />
112.594 - <attr name="InputParam1" stringvalue="string1" />
112.595 - <attr name="InputType1" stringvalue="string" />
112.596 - <attr name="InputTooltip1" stringvalue="TOOLTIP_String_concat_inputParm1" />
112.597 - <attr name="InputParam2" stringvalue="string#" />
112.598 - <attr name="InputType2" stringvalue="string" />
112.599 - <attr name="InputTooltip2" stringvalue="TOOLTIP_String_concat_inputParm2" />
112.600 - <attr name="OutputParam1" stringvalue="return string" />
112.601 - <attr name="OutputType1" stringvalue="string" />
112.602 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_String_concat_outputParm" />
112.603 - <attr name="Tooltip" stringvalue="TOOLTIP_String_concat" />
112.604 - <attr name="LocalName" stringvalue="LBL_String_concat" />
112.605 - <attr name="Checked" boolvalue="true" />
112.606 - <attr name="Accumulative" boolvalue="true" />
112.607 - <attr name="A11yName" stringvalue="A11yName_String_concat"/>
112.608 - <attr name="A11yDesc" stringvalue="A11yDesc_String_concat"/>
112.609 - </file>
112.610 - <file name="starts-with">
112.611 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.612 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/starts-with16.png" />
112.613 - <attr name="Class" stringvalue="String" />
112.614 - <attr name="Method" stringvalue="starts-with" />
112.615 - <attr name="Function" stringvalue="starts-with" />
112.616 - <attr name="InputNum" stringvalue="2" />
112.617 - <attr name="OutputNum" stringvalue="1" />
112.618 - <attr name="InputParam1" stringvalue="string1" />
112.619 - <attr name="InputType1" stringvalue="string" />
112.620 - <attr name="InputTooltip1" stringvalue="TOOLTIP_String_starts-with_inputParm1" />
112.621 - <attr name="InputParam2" stringvalue="string2" />
112.622 - <attr name="InputType2" stringvalue="string" />
112.623 - <attr name="InputTooltip2" stringvalue="TOOLTIP_String_starts-with_inputParm2" />
112.624 - <attr name="OutputParam1" stringvalue="return boolean" />
112.625 - <attr name="OutputType1" stringvalue="boolean" />
112.626 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_String_starts-with_outputParm" />
112.627 - <attr name="Tooltip" stringvalue="TOOLTIP_String_starts-with" />
112.628 - <attr name="LocalName" stringvalue="LBL_String_starts-with" />
112.629 - <attr name="Checked" boolvalue="true" />
112.630 - <attr name="A11yName" stringvalue="A11yName_String_starts-with"/>
112.631 - <attr name="A11yDesc" stringvalue="A11yDesc_String_starts-with"/>
112.632 - </file>
112.633 - <file name="contains">
112.634 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.635 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/contains16.png" />
112.636 - <attr name="Class" stringvalue="String" />
112.637 - <attr name="Method" stringvalue="contains" />
112.638 - <attr name="Function" stringvalue="contains" />
112.639 - <attr name="InputNum" stringvalue="2" />
112.640 - <attr name="OutputNum" stringvalue="1" />
112.641 - <attr name="InputParam1" stringvalue="string1" />
112.642 - <attr name="InputType1" stringvalue="string" />
112.643 - <attr name="InputTooltip1" stringvalue="TOOLTIP_String_contains_inputParm1" />
112.644 - <attr name="InputParam2" stringvalue="string2" />
112.645 - <attr name="InputType2" stringvalue="string" />
112.646 - <attr name="InputTooltip2" stringvalue="TOOLTIP_String_contains_inputParm2" />
112.647 - <attr name="OutputParam1" stringvalue="return boolean" />
112.648 - <attr name="OutputType1" stringvalue="boolean" />
112.649 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_String_contains_outputParm" />
112.650 - <attr name="Tooltip" stringvalue="TOOLTIP_String_contains" />
112.651 - <attr name="LocalName" stringvalue="LBL_String_contains" />
112.652 - <attr name="Checked" boolvalue="true" />
112.653 - <attr name="A11yName" stringvalue="A11yName_String_contains"/>
112.654 - <attr name="A11yDesc" stringvalue="A11yDesc_String_contains"/>
112.655 - </file>
112.656 - <file name="substring-before">
112.657 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.658 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/substring-before16.png" />
112.659 - <attr name="Class" stringvalue="String" />
112.660 - <attr name="Method" stringvalue="substring-before" />
112.661 - <attr name="Function" stringvalue="substring-before" />
112.662 - <attr name="InputNum" stringvalue="2" />
112.663 - <attr name="OutputNum" stringvalue="1" />
112.664 - <attr name="InputParam1" stringvalue="string1" />
112.665 - <attr name="InputType1" stringvalue="string" />
112.666 - <attr name="InputTooltip1" stringvalue="TOOLTIP_String_substring-before_inputParm1" />
112.667 - <attr name="InputParam2" stringvalue="string2" />
112.668 - <attr name="InputType2" stringvalue="string" />
112.669 - <attr name="InputTooltip2" stringvalue="TOOLTIP_String_substring-before_inputParm2" />
112.670 - <attr name="OutputParam1" stringvalue="return string" />
112.671 - <attr name="OutputType1" stringvalue="string" />
112.672 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_String_substring-before_outputParm" />
112.673 - <attr name="Tooltip" stringvalue="TOOLTIP_String_substring-before" />
112.674 - <attr name="LocalName" stringvalue="LBL_String_substring-before" />
112.675 - <attr name="Checked" boolvalue="true" />
112.676 - <attr name="A11yName" stringvalue="A11yName_String_substring-before"/>
112.677 - <attr name="A11yDesc" stringvalue="A11yDesc_String_substring-before"/>
112.678 - </file>
112.679 - <file name="substring-after">
112.680 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.681 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/substing_after16.png" />
112.682 - <attr name="Class" stringvalue="String" />
112.683 - <attr name="Method" stringvalue="substring-after" />
112.684 - <attr name="Function" stringvalue="substring-after" />
112.685 - <attr name="InputNum" stringvalue="2" />
112.686 - <attr name="OutputNum" stringvalue="1" />
112.687 - <attr name="InputParam1" stringvalue="string1" />
112.688 - <attr name="InputType1" stringvalue="string" />
112.689 - <attr name="InputTooltip1" stringvalue="TOOLTIP_String_substring-after_inputParm1" />
112.690 - <attr name="InputParam2" stringvalue="string2" />
112.691 - <attr name="InputType2" stringvalue="string" />
112.692 - <attr name="InputTooltip2" stringvalue="TOOLTIP_String_substring-after_inputParm2" />
112.693 - <attr name="OutputParam1" stringvalue="return string" />
112.694 - <attr name="OutputType1" stringvalue="string" />
112.695 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_String_substring-after_outputParm" />
112.696 - <attr name="Tooltip" stringvalue="TOOLTIP_String_substring-after" />
112.697 - <attr name="LocalName" stringvalue="LBL_String_substring-after" />
112.698 - <attr name="Checked" boolvalue="true" />
112.699 - <attr name="A11yName" stringvalue="A11yName_String_substring-after"/>
112.700 - <attr name="A11yDesc" stringvalue="A11yDesc_String_substring-after"/>
112.701 - </file>
112.702 - <file name="substring">
112.703 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.704 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/substring16.png" />
112.705 - <attr name="Class" stringvalue="String" />
112.706 - <attr name="Method" stringvalue="substring" />
112.707 - <attr name="Function" stringvalue="substring" />
112.708 - <attr name="InputNum" stringvalue="3" />
112.709 - <attr name="OutputNum" stringvalue="1" />
112.710 - <attr name="InputParam1" stringvalue="string" />
112.711 - <attr name="InputType1" stringvalue="string" />
112.712 - <attr name="InputTooltip1" stringvalue="TOOLTIP_String_substring_inputParm1" />
112.713 - <attr name="InputParam2" stringvalue="number" />
112.714 - <attr name="InputType2" stringvalue="number" />
112.715 - <attr name="InputTooltip2" stringvalue="TOOLTIP_String_substring_inputParm2" />
112.716 - <attr name="InputParam3" stringvalue="number?" />
112.717 - <attr name="InputType3" stringvalue="number" />
112.718 - <attr name="InputTooltip3" stringvalue="TOOLTIP_String_substring_inputParm3" />
112.719 - <attr name="OutputParam1" stringvalue="return string" />
112.720 - <attr name="OutputType1" stringvalue="string" />
112.721 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_String_substring_outputParm" />
112.722 - <attr name="Tooltip" stringvalue="TOOLTIP_String_substring" />
112.723 - <attr name="LocalName" stringvalue="LBL_String_substring" />
112.724 - <attr name="Checked" boolvalue="true" />
112.725 - <attr name="A11yName" stringvalue="A11yName_String_substring"/>
112.726 - <attr name="A11yDesc" stringvalue="A11yDesc_String_substring"/>
112.727 - </file>
112.728 - <file name="normalize-space">
112.729 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.730 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/normalize-space16.png" />
112.731 - <attr name="Class" stringvalue="String" />
112.732 - <attr name="Method" stringvalue="normalize-space" />
112.733 - <attr name="Function" stringvalue="normalize-space" />
112.734 - <attr name="InputNum" stringvalue="1" />
112.735 - <attr name="OutputNum" stringvalue="1" />
112.736 - <attr name="InputParam1" stringvalue="string?" />
112.737 - <attr name="InputType1" stringvalue="string" />
112.738 - <attr name="InputTooltip1" stringvalue="TOOLTIP_String_normalize-space_inputParm1" />
112.739 - <attr name="OutputParam1" stringvalue="return string" />
112.740 - <attr name="OutputType1" stringvalue="string" />
112.741 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_String_normalize-space_outputParm" />
112.742 - <attr name="Tooltip" stringvalue="TOOLTIP_String_normalize-space" />
112.743 - <attr name="LocalName" stringvalue="LBL_String_normalize-space" />
112.744 - <attr name="Checked" boolvalue="true" />
112.745 - <attr name="A11yName" stringvalue="A11yName_String_normalize-space"/>
112.746 - <attr name="A11yDesc" stringvalue="A11yDesc_String_normalize-space"/>
112.747 - </file>
112.748 - <file name="translate">
112.749 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.750 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/translate16.png" />
112.751 - <attr name="Class" stringvalue="String" />
112.752 - <attr name="Method" stringvalue="translate" />
112.753 - <attr name="Function" stringvalue="translate" />
112.754 - <attr name="InputNum" stringvalue="3" />
112.755 - <attr name="OutputNum" stringvalue="1" />
112.756 - <attr name="InputParam1" stringvalue="string1" />
112.757 - <attr name="InputType1" stringvalue="string" />
112.758 - <attr name="InputTooltip1" stringvalue="TOOLTIP_String_translate_inputParm1" />
112.759 - <attr name="InputParam2" stringvalue="string2" />
112.760 - <attr name="InputType2" stringvalue="string" />
112.761 - <attr name="InputTooltip2" stringvalue="TOOLTIP_String_translate_inputParm2" />
112.762 - <attr name="InputParam3" stringvalue="string3" />
112.763 - <attr name="InputType3" stringvalue="string" />
112.764 - <attr name="InputTooltip3" stringvalue="TOOLTIP_String_translate_inputParm3" />
112.765 - <attr name="OutputParam1" stringvalue="return string" />
112.766 - <attr name="OutputType1" stringvalue="string" />
112.767 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_String_translate_outputParm" />
112.768 - <attr name="Tooltip" stringvalue="TOOLTIP_String_translate" />
112.769 - <attr name="LocalName" stringvalue="LBL_String_translate" />
112.770 - <attr name="Checked" boolvalue="true" />
112.771 - <attr name="A11yName" stringvalue="A11yName_String_translate"/>
112.772 - <attr name="A11yDesc" stringvalue="A11yDesc_String_translate"/>
112.773 - </file>
112.774 - <file name="string-length">
112.775 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.776 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/string-length16.png" />
112.777 - <attr name="Class" stringvalue="String" />
112.778 - <attr name="Method" stringvalue="string-length" />
112.779 - <attr name="Function" stringvalue="string-length" />
112.780 - <attr name="InputNum" stringvalue="1" />
112.781 - <attr name="OutputNum" stringvalue="1" />
112.782 - <attr name="InputParam1" stringvalue="string?" />
112.783 - <attr name="InputType1" stringvalue="string" />
112.784 - <attr name="InputTooltip1" stringvalue="TOOLTIP_String_string-length_inputParm1" />
112.785 - <attr name="OutputParam1" stringvalue="return number" />
112.786 - <attr name="OutputType1" stringvalue="number" />
112.787 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_String_string-length_outputParm" />
112.788 - <attr name="Tooltip" stringvalue="TOOLTIP_String_string-length" />
112.789 - <attr name="LocalName" stringvalue="LBL_String_string-length" />
112.790 - <attr name="Checked" boolvalue="true" />
112.791 - <attr name="A11yName" stringvalue="A11yName_String_string-length"/>
112.792 - <attr name="A11yDesc" stringvalue="A11yDesc_String_string-length"/>
112.793 - </file>
112.794 -
112.795 - <attr name="string-literal/contains" boolvalue="true" />
112.796 - <attr name="string-literal/concat" boolvalue="true" />
112.797 - <attr name="concat/contains" boolvalue="true" />
112.798 - <attr name="contains/normalize-space" boolvalue="true" />
112.799 - <attr name="normalize-space/string" boolvalue="true" />
112.800 - <attr name="string/starts-with" boolvalue="true" />
112.801 - <attr name="starts-with/string-length" boolvalue="true" />
112.802 - <attr name="string-length/substring" boolvalue="true" />
112.803 - <attr name="substring/substring-before" boolvalue="true" />
112.804 - <attr name="substring-before/substring-after" boolvalue="true" />
112.805 - <attr name="substring-after/translate" boolvalue="true" />
112.806 -
112.807 - </folder>
112.808 -
112.809 -
112.810 - <folder name="Number">
112.811 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle"/>
112.812 - <attr name="Icon" stringvalue="Category_Number_Icon"/>
112.813 - <attr name="A11yName" stringvalue="Category_Number_A11yName"/>
112.814 - <attr name="A11yDesc" stringvalue="Category_Number_A11yDesc"/>
112.815 - <file name="number">
112.816 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.817 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/number16.png" />
112.818 - <attr name="Class" stringvalue="Number" />
112.819 - <attr name="Method" stringvalue="number" />
112.820 - <attr name="Function" stringvalue="number" />
112.821 - <attr name="InputNum" stringvalue="1" />
112.822 - <attr name="OutputNum" stringvalue="1" />
112.823 - <attr name="InputParam1" stringvalue="object?" />
112.824 - <attr name="InputType1" stringvalue="object" />
112.825 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Number_number_inputParm1" />
112.826 - <attr name="OutputParam1" stringvalue="return number" />
112.827 - <attr name="OutputType1" stringvalue="number" />
112.828 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Number_number_outputParm" />
112.829 - <attr name="Tooltip" stringvalue="TOOLTIP_Number_number" />
112.830 - <attr name="LocalName" stringvalue="LBL_Number_number" />
112.831 - <attr name="Checked" boolvalue="true" />
112.832 - <attr name="A11yName" stringvalue="A11yName_Number_number"/>
112.833 - <attr name="A11yDesc" stringvalue="A11yDesc_Number_number"/>
112.834 - </file>
112.835 - <file name="sum">
112.836 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.837 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/sum16.png" />
112.838 - <attr name="Class" stringvalue="Number" />
112.839 - <attr name="Method" stringvalue="sum" />
112.840 - <attr name="Function" stringvalue="sum" />
112.841 - <attr name="InputNum" stringvalue="1" />
112.842 - <attr name="OutputNum" stringvalue="1" />
112.843 - <attr name="InputParam1" stringvalue="node-set" />
112.844 - <attr name="InputType1" stringvalue="node-set" />
112.845 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Number_sum_inputParm1" />
112.846 - <attr name="OutputParam1" stringvalue="return number" />
112.847 - <attr name="OutputType1" stringvalue="number" />
112.848 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Number_sum_outputParm" />
112.849 - <attr name="Tooltip" stringvalue="TOOLTIP_Number_sum" />
112.850 - <attr name="LocalName" stringvalue="LBL_Number_sum" />
112.851 - <attr name="Checked" boolvalue="true" />
112.852 - <attr name="A11yName" stringvalue="A11yName_Number_sum"/>
112.853 - <attr name="A11yDesc" stringvalue="A11yDesc_Number_sum"/>
112.854 - </file>
112.855 - <file name="floor">
112.856 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.857 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/floor16.png" />
112.858 - <attr name="Class" stringvalue="Number" />
112.859 - <attr name="Method" stringvalue="floor" />
112.860 - <attr name="Function" stringvalue="floor" />
112.861 - <attr name="InputNum" stringvalue="1" />
112.862 - <attr name="OutputNum" stringvalue="1" />
112.863 - <attr name="InputParam1" stringvalue="number" />
112.864 - <attr name="InputType1" stringvalue="number" />
112.865 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Number_floor_inputParm1" />
112.866 - <attr name="OutputParam1" stringvalue="return number" />
112.867 - <attr name="OutputType1" stringvalue="number" />
112.868 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Number_floor_outputParm" />
112.869 - <attr name="Tooltip" stringvalue="TOOLTIP_Number_floor" />
112.870 - <attr name="LocalName" stringvalue="LBL_Number_floor" />
112.871 - <attr name="Checked" boolvalue="true" />
112.872 - <attr name="A11yName" stringvalue="A11yName_Number_floor"/>
112.873 - <attr name="A11yDesc" stringvalue="A11yDesc_Number_floor"/>
112.874 - </file>
112.875 - <file name="ceiling">
112.876 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.877 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/ceiling16.png" />
112.878 - <attr name="Class" stringvalue="Number" />
112.879 - <attr name="Method" stringvalue="ceiling" />
112.880 - <attr name="Function" stringvalue="ceiling" />
112.881 - <attr name="InputNum" stringvalue="1" />
112.882 - <attr name="OutputNum" stringvalue="1" />
112.883 - <attr name="InputParam1" stringvalue="number" />
112.884 - <attr name="InputType1" stringvalue="number" />
112.885 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Number_ceiling_inputParm1" />
112.886 - <attr name="OutputParam1" stringvalue="return number" />
112.887 - <attr name="OutputType1" stringvalue="number" />
112.888 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Number_ceiling_outputParm" />
112.889 - <attr name="Tooltip" stringvalue="TOOLTIP_Number_ceiling" />
112.890 - <attr name="LocalName" stringvalue="LBL_Number_ceiling" />
112.891 - <attr name="Checked" boolvalue="true" />
112.892 - <attr name="A11yName" stringvalue="A11yName_Number_ceiling"/>
112.893 - <attr name="A11yDesc" stringvalue="A11yDesc_Number_ceiling"/>
112.894 - </file>
112.895 - <file name="round">
112.896 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.897 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/round16.png" />
112.898 - <attr name="Class" stringvalue="Number" />
112.899 - <attr name="Method" stringvalue="round" />
112.900 - <attr name="Function" stringvalue="round" />
112.901 - <attr name="InputNum" stringvalue="1" />
112.902 - <attr name="OutputNum" stringvalue="1" />
112.903 - <attr name="InputParam1" stringvalue="number" />
112.904 - <attr name="InputType1" stringvalue="number" />
112.905 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Number_round_inputParm1" />
112.906 - <attr name="OutputParam1" stringvalue="return number" />
112.907 - <attr name="OutputType1" stringvalue="number" />
112.908 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Number_round_outputParm" />
112.909 - <attr name="Tooltip" stringvalue="TOOLTIP_Number_round" />
112.910 - <attr name="LocalName" stringvalue="LBL_Number_round" />
112.911 - <attr name="Checked" boolvalue="true" />
112.912 - <attr name="A11yName" stringvalue="A11yName_Number_round"/>
112.913 - <attr name="A11yDesc" stringvalue="A11yDesc_Number_round"/>
112.914 - </file>
112.915 - <file name="number-literal">
112.916 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.917 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/number-literal16.png" />
112.918 - <attr name="Class" stringvalue="Number" />
112.919 - <attr name="Method" stringvalue="number-literal" />
112.920 - <attr name="InputNum" stringvalue="0" />
112.921 - <attr name="OutputNum" stringvalue="1" />
112.922 - <attr name="OutputParam1" stringvalue="return number" />
112.923 - <attr name="OutputType1" stringvalue="number" />
112.924 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Number_number-literal_outputParm" />
112.925 - <attr name="Tooltip" stringvalue="TOOLTIP_Number_number-literal" />
112.926 - <attr name="LocalName" stringvalue="LBL_Number_number-literal" />
112.927 - <attr name="EditableLiteral" boolvalue="true"/>
112.928 - <attr name="Checked" boolvalue="true" />
112.929 - <attr name="A11yName" stringvalue="A11yName_Number_number-literal"/>
112.930 - <attr name="A11yDesc" stringvalue="A11yDesc_Number_number-literal"/>
112.931 - </file>
112.932 - </folder>
112.933 -
112.934 -
112.935 - <folder name="Boolean">
112.936 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle"/>
112.937 - <attr name="Icon" stringvalue="Category_Boolean_Icon"/>
112.938 - <attr name="A11yName" stringvalue="Category_Boolean_A11yName"/>
112.939 - <attr name="A11yDesc" stringvalue="Category_Boolean_A11yDesc"/>
112.940 - <file name="boolean">
112.941 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.942 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/boolean16.png" />
112.943 - <attr name="Class" stringvalue="Boolean" />
112.944 - <attr name="Method" stringvalue="boolean" />
112.945 - <attr name="Function" stringvalue="boolean" />
112.946 - <attr name="InputNum" stringvalue="1" />
112.947 - <attr name="OutputNum" stringvalue="1" />
112.948 - <attr name="InputParam1" stringvalue="object" />
112.949 - <attr name="InputType1" stringvalue="object" />
112.950 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Boolean_boolean_inputParm1" />
112.951 - <attr name="OutputParam1" stringvalue="return boolean" />
112.952 - <attr name="OutputType1" stringvalue="boolean" />
112.953 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Boolean_boolean_outputParm" />
112.954 - <attr name="Tooltip" stringvalue="TOOLTIP_Boolean_boolean" />
112.955 - <attr name="LocalName" stringvalue="LBL_Boolean_boolean" />
112.956 - <attr name="Checked" boolvalue="true" />
112.957 - <attr name="A11yName" stringvalue="A11yName_Boolean_boolean"/>
112.958 - <attr name="A11yDesc" stringvalue="A11yDesc_Boolean_boolean"/>
112.959 - </file>
112.960 - <file name="not">
112.961 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.962 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/not16.png" />
112.963 - <attr name="Class" stringvalue="Boolean" />
112.964 - <attr name="Method" stringvalue="not" />
112.965 - <attr name="Function" stringvalue="not" />
112.966 - <attr name="InputNum" stringvalue="1" />
112.967 - <attr name="OutputNum" stringvalue="1" />
112.968 - <attr name="InputParam1" stringvalue="boolean" />
112.969 - <attr name="InputType1" stringvalue="boolean" />
112.970 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Boolean_not_inputParm1" />
112.971 - <attr name="OutputParam1" stringvalue="return boolean" />
112.972 - <attr name="OutputType1" stringvalue="boolean" />
112.973 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Boolean_not_outputParm" />
112.974 - <attr name="Tooltip" stringvalue="TOOLTIP_Boolean_not" />
112.975 - <attr name="LocalName" stringvalue="LBL_Boolean_not" />
112.976 - <attr name="Checked" boolvalue="true" />
112.977 - <attr name="A11yName" stringvalue="A11yName_Boolean_not"/>
112.978 - <attr name="A11yDesc" stringvalue="A11yDesc_Boolean_not"/>
112.979 - </file>
112.980 - <file name="true">
112.981 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.982 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/true16.png" />
112.983 - <attr name="Class" stringvalue="Boolean" />
112.984 - <attr name="Method" stringvalue="true" />
112.985 - <attr name="Function" stringvalue="true" />
112.986 - <attr name="InputNum" stringvalue="0" />
112.987 - <attr name="OutputNum" stringvalue="1" />
112.988 - <attr name="OutputParam1" stringvalue="return boolean" />
112.989 - <attr name="OutputType1" stringvalue="boolean" />
112.990 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Boolean_true_outputParm" />
112.991 - <attr name="Tooltip" stringvalue="TOOLTIP_Boolean_true" />
112.992 - <attr name="LocalName" stringvalue="LBL_Boolean_true" />
112.993 - <attr name="Checked" boolvalue="true" />
112.994 - <attr name="A11yName" stringvalue="A11yName_Boolean_true"/>
112.995 - <attr name="A11yDesc" stringvalue="A11yDesc_Boolean_true"/>
112.996 - </file>
112.997 - <file name="false">
112.998 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.999 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/false16.png" />
112.1000 - <attr name="Class" stringvalue="Boolean" />
112.1001 - <attr name="Method" stringvalue="false" />
112.1002 - <attr name="Function" stringvalue="false" />
112.1003 - <attr name="InputNum" stringvalue="0" />
112.1004 - <attr name="OutputNum" stringvalue="1" />
112.1005 - <attr name="OutputParam1" stringvalue="return boolean" />
112.1006 - <attr name="OutputType1" stringvalue="boolean" />
112.1007 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Boolean_false_outputParm" />
112.1008 - <attr name="Tooltip" stringvalue="TOOLTIP_Boolean_false" />
112.1009 - <attr name="LocalName" stringvalue="LBL_Boolean_false" />
112.1010 - <attr name="Checked" boolvalue="true" />
112.1011 - <attr name="A11yName" stringvalue="A11yName_Boolean_false"/>
112.1012 - <attr name="A11yDesc" stringvalue="A11yDesc_Boolean_false"/>
112.1013 - </file>
112.1014 - <file name="lang">
112.1015 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.1016 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/lang16.png" />
112.1017 - <attr name="Class" stringvalue="Boolean" />
112.1018 - <attr name="Method" stringvalue="lang" />
112.1019 - <attr name="InputNum" stringvalue="1" />
112.1020 - <attr name="Function" stringvalue="lang" />
112.1021 - <attr name="OutputNum" stringvalue="1" />
112.1022 - <attr name="InputParam1" stringvalue="string" />
112.1023 - <attr name="InputType1" stringvalue="string" />
112.1024 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Boolean_lang_inputParm1" />
112.1025 - <attr name="OutputParam1" stringvalue="return boolean" />
112.1026 - <attr name="OutputType1" stringvalue="boolean" />
112.1027 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Boolean_lang_outputParm" />
112.1028 - <attr name="Tooltip" stringvalue="TOOLTIP_Boolean_lang" />
112.1029 - <attr name="LocalName" stringvalue="LBL_Boolean_lang" />
112.1030 - <attr name="Checked" boolvalue="true" />
112.1031 - <attr name="A11yName" stringvalue="A11yName_Boolean_lang"/>
112.1032 - <attr name="A11yDesc" stringvalue="A11yDesc_Boolean_lang"/>
112.1033 - </file>
112.1034 - <file name="or">
112.1035 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.1036 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/or16.png" />
112.1037 - <attr name="Class" stringvalue="Boolean" />
112.1038 - <attr name="Method" stringvalue="or" />
112.1039 - <attr name="Operator" stringvalue="or" />
112.1040 - <attr name="InputNum" stringvalue="2" />
112.1041 - <attr name="OutputNum" stringvalue="1" />
112.1042 - <attr name="InputParam1" stringvalue="boolean1" />
112.1043 - <attr name="InputType1" stringvalue="boolean" />
112.1044 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Operator_or_inputParm1" />
112.1045 - <attr name="InputParam2" stringvalue="boolean2" />
112.1046 - <attr name="InputType2" stringvalue="boolean" />
112.1047 - <attr name="InputTooltip2" stringvalue="TOOLTIP_Operator_or_inputParm2" />
112.1048 - <attr name="OutputParam1" stringvalue="return boolean" />
112.1049 - <attr name="OutputType1" stringvalue="boolean" />
112.1050 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Operator_or_outputParm" />
112.1051 - <attr name="Tooltip" stringvalue="TOOLTIP_Operator_or" />
112.1052 - <attr name="LocalName" stringvalue="LBL_Operator_or" />
112.1053 - <attr name="Checked" boolvalue="true" />
112.1054 - <attr name="A11yName" stringvalue="A11yName_Operator_or"/>
112.1055 - <attr name="A11yDesc" stringvalue="A11yDesc_Operator_or"/>
112.1056 - </file>
112.1057 - <file name="and">
112.1058 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.1059 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/and16.png" />
112.1060 - <attr name="Class" stringvalue="Boolean" />
112.1061 - <attr name="Method" stringvalue="and" />
112.1062 - <attr name="Operator" stringvalue="and" />
112.1063 - <attr name="InputNum" stringvalue="2" />
112.1064 - <attr name="OutputNum" stringvalue="1" />
112.1065 - <attr name="InputParam1" stringvalue="boolean1" />
112.1066 - <attr name="InputType1" stringvalue="boolean" />
112.1067 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Operator_and_inputParm1" />
112.1068 - <attr name="InputParam2" stringvalue="boolean2" />
112.1069 - <attr name="InputType2" stringvalue="boolean" />
112.1070 - <attr name="InputTooltip2" stringvalue="TOOLTIP_Operator_and_inputParm2" />
112.1071 - <attr name="OutputParam1" stringvalue="return boolean" />
112.1072 - <attr name="OutputType1" stringvalue="boolean" />
112.1073 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Operator_and_outputParm" />
112.1074 - <attr name="Tooltip" stringvalue="TOOLTIP_Operator_and" />
112.1075 - <attr name="LocalName" stringvalue="LBL_Operator_and" />
112.1076 - <attr name="Checked" boolvalue="true" />
112.1077 - <attr name="A11yName" stringvalue="A11yName_Operator_and"/>
112.1078 - <attr name="A11yDesc" stringvalue="A11yDesc_Operator_and"/>
112.1079 - </file>
112.1080 -
112.1081 - <attr name="boolean/true" boolvalue="true" />
112.1082 - <attr name="true/false" boolvalue="true" />
112.1083 - <attr name="false/and" boolvalue="true" />
112.1084 - <attr name="and/or" boolvalue="true" />
112.1085 - <attr name="or/not" boolvalue="true" />
112.1086 -
112.1087 - </folder>
112.1088 -
112.1089 -
112.1090 - <folder name="Nodes">
112.1091 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle"/>
112.1092 - <attr name="Icon" stringvalue="Category_Nodes_Icon"/>
112.1093 - <attr name="A11yName" stringvalue="Category_Nodes_A11yName"/>
112.1094 - <attr name="A11yDesc" stringvalue="Category_Nodes_A11yDesc"/>
112.1095 - <file name="last">
112.1096 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.1097 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/last16.png" />
112.1098 - <attr name="Class" stringvalue="Nodes" />
112.1099 - <attr name="Method" stringvalue="last" />
112.1100 - <attr name="Function" stringvalue="last" />
112.1101 - <attr name="InputNum" stringvalue="0" />
112.1102 - <attr name="OutputNum" stringvalue="1" />
112.1103 - <attr name="OutputParam1" stringvalue="return number" />
112.1104 - <attr name="OutputType1" stringvalue="number" />
112.1105 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Nodes_last_outputParm" />
112.1106 - <attr name="Tooltip" stringvalue="TOOLTIP_Nodes_last" />
112.1107 - <attr name="LocalName" stringvalue="LBL_Nodes_last" />
112.1108 - <attr name="Checked" boolvalue="true" />
112.1109 - <attr name="A11yName" stringvalue="A11yName_Nodes_last"/>
112.1110 - <attr name="A11yDesc" stringvalue="A11yDesc_Nodes_last"/>
112.1111 - </file>
112.1112 - <file name="position">
112.1113 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.1114 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/position16.png" />
112.1115 - <attr name="Class" stringvalue="Nodes" />
112.1116 - <attr name="Method" stringvalue="position" />
112.1117 - <attr name="Function" stringvalue="position" />
112.1118 - <attr name="InputNum" stringvalue="0" />
112.1119 - <attr name="OutputNum" stringvalue="1" />
112.1120 - <attr name="OutputParam1" stringvalue="return number" />
112.1121 - <attr name="OutputType1" stringvalue="number" />
112.1122 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Nodes_position_outputParm" />
112.1123 - <attr name="Tooltip" stringvalue="TOOLTIP_Nodes_position" />
112.1124 - <attr name="LocalName" stringvalue="LBL_Nodes_position" />
112.1125 - <attr name="Checked" boolvalue="true" />
112.1126 - <attr name="A11yName" stringvalue="A11yName_Nodes_position"/>
112.1127 - <attr name="A11yDesc" stringvalue="A11yDesc_Nodes_position"/>
112.1128 - </file>
112.1129 - <file name="count">
112.1130 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.1131 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/count16.png" />
112.1132 - <attr name="Class" stringvalue="Nodes" />
112.1133 - <attr name="Method" stringvalue="count" />
112.1134 - <attr name="Function" stringvalue="count" />
112.1135 - <attr name="InputNum" stringvalue="1" />
112.1136 - <attr name="OutputNum" stringvalue="1" />
112.1137 - <attr name="InputParam1" stringvalue="node-set" />
112.1138 - <attr name="InputType1" stringvalue="node-set" />
112.1139 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Nodes_count_inputParm1" />
112.1140 - <attr name="OutputParam1" stringvalue="return number" />
112.1141 - <attr name="OutputType1" stringvalue="number" />
112.1142 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Nodes_count_outputParm" />
112.1143 - <attr name="Tooltip" stringvalue="TOOLTIP_Nodes_count" />
112.1144 - <attr name="LocalName" stringvalue="LBL_Nodes_count" />
112.1145 - <attr name="Checked" boolvalue="true" />
112.1146 - <attr name="A11yName" stringvalue="A11yName_Nodes_count"/>
112.1147 - <attr name="A11yDesc" stringvalue="A11yDesc_Nodes_count"/>
112.1148 - </file>
112.1149 - <file name="local-name">
112.1150 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.1151 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/local_name16.png" />
112.1152 - <attr name="Class" stringvalue="Nodes" />
112.1153 - <attr name="Method" stringvalue="local-name" />
112.1154 - <attr name="Function" stringvalue="local-name" />
112.1155 - <attr name="InputNum" stringvalue="1" />
112.1156 - <attr name="OutputNum" stringvalue="1" />
112.1157 - <attr name="InputParam1" stringvalue="node-set?" />
112.1158 - <attr name="InputType1" stringvalue="node-set" />
112.1159 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Nodes_local-name_inputParm1" />
112.1160 - <attr name="OutputParam1" stringvalue="return string" />
112.1161 - <attr name="OutputType1" stringvalue="string" />
112.1162 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Nodes_local-name_outputParm" />
112.1163 - <attr name="Tooltip" stringvalue="TOOLTIP_Nodes_local-name" />
112.1164 - <attr name="LocalName" stringvalue="LBL_Nodes_local-name" />
112.1165 - <attr name="Checked" boolvalue="true" />
112.1166 - <attr name="A11yName" stringvalue="A11yName_Nodes_local-name"/>
112.1167 - <attr name="A11yDesc" stringvalue="A11yDesc_Nodes_local-name"/>
112.1168 - </file>
112.1169 - <file name="namespace-uri">
112.1170 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.1171 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/namespace-uri16.png" />
112.1172 - <attr name="Class" stringvalue="Nodes" />
112.1173 - <attr name="Method" stringvalue="namespace-uri" />
112.1174 - <attr name="Function" stringvalue="namespace-uri" />
112.1175 - <attr name="InputNum" stringvalue="1" />
112.1176 - <attr name="OutputNum" stringvalue="1" />
112.1177 - <attr name="InputParam1" stringvalue="node-set?" />
112.1178 - <attr name="InputType1" stringvalue="node-set" />
112.1179 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Nodes_namespace-uri_inputParm1" />
112.1180 - <attr name="OutputParam1" stringvalue="return string" />
112.1181 - <attr name="OutputType1" stringvalue="string" />
112.1182 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Nodes_namespace-uri_outputParm" />
112.1183 - <attr name="Tooltip" stringvalue="TOOLTIP_Nodes_namespace-uri" />
112.1184 - <attr name="LocalName" stringvalue="LBL_Nodes_namespace-uri" />
112.1185 - <attr name="Checked" boolvalue="true" />
112.1186 - <attr name="A11yName" stringvalue="A11yName_Nodes_namespace-uri"/>
112.1187 - <attr name="A11yDesc" stringvalue="A11yDesc_Nodes_namespace-uri"/>
112.1188 - </file>
112.1189 - <file name="name">
112.1190 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.1191 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/name16.png" />
112.1192 - <attr name="Class" stringvalue="Nodes" />
112.1193 - <attr name="Method" stringvalue="name" />
112.1194 - <attr name="Function" stringvalue="name" />
112.1195 - <attr name="InputNum" stringvalue="1" />
112.1196 - <attr name="OutputNum" stringvalue="1" />
112.1197 - <attr name="InputParam1" stringvalue="node-set?" />
112.1198 - <attr name="InputType1" stringvalue="node-set" />
112.1199 - <attr name="InputTooltip1" stringvalue="TOOLTIP_Nodes_name_inputParm1" />
112.1200 - <attr name="OutputParam1" stringvalue="return string" />
112.1201 - <attr name="OutputType1" stringvalue="string" />
112.1202 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Nodes_name_outputParm" />
112.1203 - <attr name="Tooltip" stringvalue="TOOLTIP_Nodes_name" />
112.1204 - <attr name="LocalName" stringvalue="LBL_Nodes_name" />
112.1205 - <attr name="Checked" boolvalue="true" />
112.1206 - <attr name="A11yName" stringvalue="A11yName_Nodes_name"/>
112.1207 - <attr name="A11yDesc" stringvalue="A11yDesc_Nodes_name"/>
112.1208 - </file>
112.1209 - <file name="xpath_expression">
112.1210 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.1211 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/xpath_expression16.png" />
112.1212 - <attr name="Class" stringvalue="Nodes" />
112.1213 - <attr name="Method" stringvalue="xpath_expression" />
112.1214 - <attr name="InputNum" stringvalue="0" />
112.1215 - <attr name="OutputNum" stringvalue="1" />
112.1216 - <attr name="OutputParam1" stringvalue="return xpath expression" />
112.1217 - <attr name="OutputType1" stringvalue="xpath" />
112.1218 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Nodes_xpath_expression_outputParm" />
112.1219 - <attr name="Tooltip" stringvalue="TOOLTIP_Nodes_xpath_expression" />
112.1220 - <attr name="LocalName" stringvalue="LBL_Nodes_xpath_expression" />
112.1221 - <attr name="EditableLiteral" boolvalue="true"/>
112.1222 - <attr name="Checked" boolvalue="true" />
112.1223 - <attr name="A11yName" stringvalue="A11yName_Nodes_xpath_expression"/>
112.1224 - <attr name="A11yDesc" stringvalue="A11yDesc_Nodes_xpath_expression"/>
112.1225 - </file>
112.1226 - </folder>
112.1227 -
112.1228 -
112.1229 - <folder name="Datetime">
112.1230 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle"/>
112.1231 - <attr name="Icon" stringvalue="Category_Datetime_Icon"/>
112.1232 - <attr name="A11yName" stringvalue="Category_Datetime_A11yName"/>
112.1233 - <attr name="A11yDesc" stringvalue="Category_Datetime_A11yDesc"/>
112.1234 - <file name="current-dateTime">
112.1235 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.1236 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/current-dateTime16.png" />
112.1237 - <attr name="Class" stringvalue="Datetime" />
112.1238 - <attr name="Method" stringvalue="current-dateTime" />
112.1239 - <attr name="Function" stringvalue="current-dateTime" />
112.1240 - <attr name="InputNum" stringvalue="0" />
112.1241 - <attr name="OutputNum" stringvalue="1" />
112.1242 - <attr name="OutputParam1" stringvalue="return string" />
112.1243 - <attr name="OutputType1" stringvalue="string" />
112.1244 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Datetime_current-dateTime_outputParm" />
112.1245 - <attr name="Tooltip" stringvalue="TOOLTIP_Datetime_current-dateTime" />
112.1246 - <attr name="LocalName" stringvalue="LBL_Datetime_current-dateTime" />
112.1247 - <attr name="Checked" boolvalue="true" />
112.1248 - <attr name="A11yName" stringvalue="A11yName_Datetime_current-dateTime"/>
112.1249 - <attr name="A11yDesc" stringvalue="A11yDesc_Datetime_current-dateTime"/>
112.1250 - </file>
112.1251 - <file name="current-date">
112.1252 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.1253 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/current-date16.png" />
112.1254 - <attr name="Class" stringvalue="Datetime" />
112.1255 - <attr name="Method" stringvalue="current-date" />
112.1256 - <attr name="Function" stringvalue="current-date" />
112.1257 - <attr name="InputNum" stringvalue="0" />
112.1258 - <attr name="OutputNum" stringvalue="1" />
112.1259 - <attr name="OutputParam1" stringvalue="return string" />
112.1260 - <attr name="OutputType1" stringvalue="string" />
112.1261 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Datetime_current-date_outputParm" />
112.1262 - <attr name="Tooltip" stringvalue="TOOLTIP_Datetime_current-date" />
112.1263 - <attr name="LocalName" stringvalue="LBL_Datetime_current-date" />
112.1264 - <attr name="Checked" boolvalue="true" />
112.1265 - <attr name="A11yName" stringvalue="A11yName_Datetime_current-date"/>
112.1266 - <attr name="A11yDesc" stringvalue="A11yDesc_Datetime_current-date"/>
112.1267 - </file>
112.1268 - <file name="current-time">
112.1269 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.1270 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/current-time16.png" />
112.1271 - <attr name="Class" stringvalue="Datetime" />
112.1272 - <attr name="Method" stringvalue="current-time" />
112.1273 - <attr name="Function" stringvalue="current-time" />
112.1274 - <attr name="InputNum" stringvalue="0" />
112.1275 - <attr name="OutputNum" stringvalue="1" />
112.1276 - <attr name="OutputParam1" stringvalue="return string" />
112.1277 - <attr name="OutputType1" stringvalue="string" />
112.1278 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Datetime_current-time_outputParm" />
112.1279 - <attr name="Tooltip" stringvalue="TOOLTIP_Datetime_current-time" />
112.1280 - <attr name="LocalName" stringvalue="LBL_Datetime_current-time" />
112.1281 - <attr name="Checked" boolvalue="true" />
112.1282 - <attr name="A11yName" stringvalue="A11yName_Datetime_current-time"/>
112.1283 - <attr name="A11yDesc" stringvalue="A11yDesc_Datetime_current-time"/>
112.1284 - </file>
112.1285 - <file name="duration-literal">
112.1286 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.mapper.palette.Bundle" />
112.1287 - <attr name="SystemFileSystem.icon" urlvalue="nbres:org/netbeans/modules/xslt/mapper/palette/icons/duration-literal16.png" />
112.1288 - <attr name="Class" stringvalue="Datetime" />
112.1289 - <attr name="Method" stringvalue="duration-literal" />
112.1290 - <attr name="InputNum" stringvalue="0" />
112.1291 - <attr name="OutputNum" stringvalue="1" />
112.1292 - <attr name="OutputParam1" stringvalue="return_string" />
112.1293 - <attr name="OutputType1" stringvalue="string" />
112.1294 - <attr name="OutputTooltip1" stringvalue="TOOLTIP_Datetime_duration-literal_outputParm" />
112.1295 - <attr name="Tooltip" stringvalue="TOOLTIP_Datetime_duration-literal" />
112.1296 - <attr name="LocalName" stringvalue="LBL_Datetime_duration-literal" />
112.1297 - <attr name="EditableLiteral" boolvalue="true"/>
112.1298 - <attr name="Checked" boolvalue="true" />
112.1299 - <attr name="A11yName" stringvalue="A11yName_Datetime_duration-literal"/>
112.1300 - <attr name="A11yDesc" stringvalue="A11yDesc_Datetime_duration-literal"/>
112.1301 - </file>
112.1302 -
112.1303 - <attr name="current-dateTime/current-date" boolvalue="true" />
112.1304 - <attr name="current-date/current-time" boolvalue="true" />
112.1305 - <attr name="duration-literal/current-time" boolvalue="true" />
112.1306 -
112.1307 - </folder>
112.1308 -
112.1309 -
112.1310 - <attr name="Datetime/Operator" boolvalue="true"/>
112.1311 - <attr name="Operator/Boolean" boolvalue="true"/>
112.1312 - <attr name="Boolean/String" boolvalue="true"/>
112.1313 - <attr name="String/Nodes" boolvalue="true"/>
112.1314 - <attr name="Nodes/Number" boolvalue="true"/>
112.1315 -
112.1316 -
112.1317 - </folder>
112.1318 -
112.1319 -</filesystem>
112.1320 -
113.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/methoid/AbstractLiteralUpdater.java Wed Feb 21 08:53:38 2007 +0000
113.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
113.3 @@ -1,153 +0,0 @@
113.4 -/*
113.5 - * The contents of this file are subject to the terms of the Common Development
113.6 - * and Distribution License (the License). You may not use this file except in
113.7 - * compliance with the License.
113.8 - *
113.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
113.10 - * or http://www.netbeans.org/cddl.txt.
113.11 -
113.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
113.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
113.14 - * If applicable, add the following below the CDDL Header, with the fields
113.15 - * enclosed by brackets [] replaced by your own identifying information:
113.16 - * "Portions Copyrighted [year] [name of copyright owner]"
113.17 - *
113.18 - * The Original Software is NetBeans. The Initial Developer of the Original
113.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
113.20 - * Microsystems, Inc. All Rights Reserved.
113.21 - */
113.22 -
113.23 -package org.netbeans.modules.xslt.mapper.methoid;
113.24 -
113.25 -import java.util.Iterator;
113.26 -import org.netbeans.modules.soa.mapper.common.IMapperGroupNode;
113.27 -import org.netbeans.modules.soa.mapper.common.IMapperLink;
113.28 -import org.netbeans.modules.soa.mapper.common.IMapperNode;
113.29 -import org.netbeans.modules.soa.mapper.common.basicmapper.literal.ILiteralUpdater;
113.30 -import org.netbeans.modules.soa.mapper.common.basicmapper.literal.ILiteralUpdater.LiteralSubTypeInfo;
113.31 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IFieldNode;
113.32 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IMethoid;
113.33 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IMethoidNode;
113.34 -import org.openide.nodes.Node;
113.35 -
113.36 -
113.37 -/**
113.38 - * Handles creation of literal editors for the BPEL editor as well
113.39 - * as what to do when the resulting editor value is applied.
113.40 - * Whenever support for a new literal type is added, an editor as well
113.41 - * as an updater must be created to handle it. Editors are the UI
113.42 - * for the visual mapper editor. They allow users to enter a new
113.43 - * literal value or modify an existing one. Updaters are responsible
113.44 - * for changing the model expression once the user has finished
113.45 - * editing the value.
113.46 - *
113.47 - * @author Josh Sandusky
113.48 - */
113.49 -public abstract class AbstractLiteralUpdater implements ILiteralUpdater {
113.50 -
113.51 - protected XPathNodeExpressionUpdater mProcessor;
113.52 -
113.53 - public AbstractLiteralUpdater() {
113.54 - }
113.55 -
113.56 -
113.57 - public boolean hasEditor() {
113.58 - return true;
113.59 - }
113.60 -
113.61 -// TODO reimplement
113.62 -// protected void applyLiteral(IFieldNode fieldNode,
113.63 -// String newValue,
113.64 -// XPathLiteralNode literalNode) {
113.65 -// updateModelLiteral(
113.66 -// fieldNode,
113.67 -// literalNode,
113.68 -// false);
113.69 -// fieldNode.setLiteralName(newValue);
113.70 -// updateToolTip(fieldNode, newValue);
113.71 -// if (mProcessor != null) {
113.72 -// mProcessor.updateNodeExpression(fieldNode);
113.73 -// }
113.74 -// }
113.75 -
113.76 - public void setXPathProcessor(XPathNodeExpressionUpdater processor) {
113.77 - mProcessor = processor;
113.78 - }
113.79 -
113.80 - protected void updateToolTip(IFieldNode fieldNode, String newValue) {
113.81 - IMethoidNode methoidNode = (IMethoidNode) fieldNode.getGroupNode();
113.82 - IMethoid methoid = (IMethoid) methoidNode.getMethoidObject();
113.83 - if (methoid.isLiteral()) {
113.84 - fieldNode.setToolTipText(newValue);
113.85 - }
113.86 - }
113.87 -
113.88 - public void literalUnset(IFieldNode fieldNode) {
113.89 -// TODO reimplement
113.90 -// updateModelLiteral(
113.91 -// fieldNode,
113.92 -// (XPathLiteralNode) fieldNode.getNodeObject(),
113.93 -// true);
113.94 - fieldNode.setLiteralName(null);
113.95 - if (mProcessor != null) {
113.96 - mProcessor.updateNodeExpression(fieldNode);
113.97 - }
113.98 - }
113.99 -
113.100 - public String getLiteralDisplayText(String literalText) {
113.101 - return literalText;
113.102 - }
113.103 -
113.104 - public LiteralSubTypeInfo getLiteralSubType(String freeTextValue) {
113.105 - // default case is no special sub-type information
113.106 - return null;
113.107 - }
113.108 -
113.109 -// TODO reimplement
113.110 -// private void updateModelLiteral(IFieldNode fieldNode,
113.111 -// XPathLiteralNode literalNode,
113.112 -// boolean isRemove) {
113.113 -// boolean linksNeedRemoving = false;
113.114 -// IMapperGroupNode groupNode = fieldNode.getGroupNode();
113.115 -// Node groupNodeObject = (Node) groupNode.getNodeObject();
113.116 -// if (groupNodeObject instanceof XPathOperatorNode) {
113.117 -// XPathOperatorNode operatorNode = (XPathOperatorNode) groupNodeObject;
113.118 -// int fieldIndex = MapperUtil.findFieldIndex(groupNode, fieldNode);
113.119 -// if (isRemove) {
113.120 -// if (literalNode != null) {
113.121 -// fieldNode.setNodeObject(null);
113.122 -// operatorNode.removeInput(literalNode);
113.123 -// }
113.124 -// } else {
113.125 -// linksNeedRemoving = true;
113.126 -// fieldNode.setNodeObject(literalNode);
113.127 -// operatorNode.addInput(fieldIndex, literalNode);
113.128 -// }
113.129 -// } else if (groupNodeObject instanceof XPathLiteralNode) {
113.130 -// if (isRemove) {
113.131 -// groupNode.setNodeObject(null);
113.132 -// } else {
113.133 -// groupNode.setNodeObject(literalNode);
113.134 -// }
113.135 -// }
113.136 -//
113.137 -// if (linksNeedRemoving) {
113.138 -// // Now for each link connected to the field node, we remove the
113.139 -// // link's starting node's output.
113.140 -// for (Iterator iter=fieldNode.getLinks().iterator(); iter.hasNext();) {
113.141 -// IMapperLink link = (IMapperLink) iter.next();
113.142 -// IMapperNode startNode = link.getStartNode();
113.143 -// Node modelNode = MapperUtil.getMapperNodeObject(startNode);
113.144 -// if (modelNode instanceof CanvasNode) {
113.145 -// CanvasNode modelCanvasNode = (CanvasNode) modelNode;
113.146 -// modelCanvasNode.removeOutput(groupNodeObject);
113.147 -// }
113.148 -// }
113.149 -// }
113.150 -// }
113.151 -
113.152 -
113.153 - public interface XPathNodeExpressionUpdater {
113.154 - public void updateNodeExpression(IFieldNode sourceNode);
113.155 - }
113.156 -}
114.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/methoid/Constants.java Wed Feb 21 08:53:38 2007 +0000
114.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
114.3 @@ -1,101 +0,0 @@
114.4 -/*
114.5 - * The contents of this file are subject to the terms of the Common Development
114.6 - * and Distribution License (the License). You may not use this file except in
114.7 - * compliance with the License.
114.8 - *
114.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
114.10 - * or http://www.netbeans.org/cddl.txt.
114.11 -
114.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
114.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
114.14 - * If applicable, add the following below the CDDL Header, with the fields
114.15 - * enclosed by brackets [] replaced by your own identifying information:
114.16 - * "Portions Copyrighted [year] [name of copyright owner]"
114.17 - *
114.18 - * The Original Software is NetBeans. The Initial Developer of the Original
114.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
114.20 - * Microsystems, Inc. All Rights Reserved.
114.21 - */
114.22 -
114.23 -package org.netbeans.modules.xslt.mapper.methoid;
114.24 -
114.25 -/**
114.26 - *
114.27 - * @author nk160297
114.28 - */
114.29 -public interface Constants {
114.30 -
114.31 - String XSLT_PALETTE_FOLDER = "XsltPalette"; // NOI18N
114.32 - String XSLT_PALETTE_METAINFO = "XPathMetainfo"; // NOI18N
114.33 - String METAINFO_REF = "metainfo"; // NOI18N
114.34 -
114.35 - String XPATH_OPERATOR = "Operator"; // NOI18N
114.36 - String XPATH_MAXINPUT = "InputNum"; // NOI18N
114.37 - String XPATH_FUNCTION = "Function"; // NOI18N
114.38 - String XPATH_BOOLEAN = "Boolean"; // NOI18N
114.39 - String XPATH_NUMBER = "Number"; // NOI18N
114.40 - String XPATH_STRING = "String"; // NOI18N
114.41 -
114.42 - String CATEGORY_ICON = "Icon"; // NOI18N
114.43 -
114.44 - String LITERAL_FLAG = "EditableLiteral"; // NOI18N
114.45 -
114.46 - String INPUT_PARAM = "InputParam"; // NOI18N
114.47 - String INPUT_TYPE = "InputType"; // NOI18N
114.48 - String INPUT_TOOLTIP = "InputTooltip"; // NOI18N
114.49 -
114.50 - String INPUT_THIS = "InputThis"; // NOI18N
114.51 - String THIS_CLASS = "Class"; // NOI18N
114.52 - String THIS_TOOLTIP = "InputThisTooltip"; // NOI18N
114.53 -// String = ""; // NOI18N
114.54 -
114.55 -
114.56 -
114.57 - String OUTPUT_PARAM = "OutputParam"; // NOI18N
114.58 - String OUTPUT_TYPE = "OutputType"; // NOI18N
114.59 - String OUTPUT_TOOLTIP = "OutputTooltip"; // NOI18N
114.60 - String OUTPUT_NUM = "OutputNum"; // NOI18N
114.61 -
114.62 - String ACCUMULATIVE = "Accumulative"; // NOI18N
114.63 - String TOOLTIP = "Tooltip"; // NOI18N
114.64 - String LOCAL_NAME = "LocalName"; // NOI18N
114.65 -
114.66 - String BUNDLE_CLASS = "SystemFileSystem.localizingBundle"; // NOI18N
114.67 - String FILE_ICON = "SystemFileSystem.icon"; // NOI18N
114.68 -
114.69 - String STRING_LITERAL = "string-literal";
114.70 - String NUMBER_LITERAL = "number-literal";
114.71 - String DURATION_LITERAL = "duration-literal";
114.72 - String XPATH_LITERAL = "xpath_expression";
114.73 -
114.74 -
114.75 - enum LiteralType {
114.76 - NUMBER_LITERAL_TYPE("number"),
114.77 - STRING_LITERAL_TYPE("string"),
114.78 - XPATH_LITERAL_TYPE("xpath");
114.79 -
114.80 - private String myName;
114.81 -
114.82 - private LiteralType(String name) {
114.83 - myName = name;
114.84 - }
114.85 -
114.86 - public String getName() {
114.87 - return myName;
114.88 - }
114.89 -
114.90 - public static LiteralType findByName(String name) {
114.91 - if (name == null || name.length() == 0) {
114.92 - return null;
114.93 - }
114.94 - //
114.95 - for (LiteralType type : values()) {
114.96 - if (type.getName().equals(name)) {
114.97 - return type;
114.98 - }
114.99 - }
114.100 - //
114.101 - return null;
114.102 - }
114.103 - }
114.104 -}
115.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/methoid/LiteralUpdaterFactory.java Wed Feb 21 08:53:38 2007 +0000
115.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
115.3 @@ -1,115 +0,0 @@
115.4 -/*
115.5 - * The contents of this file are subject to the terms of the Common Development
115.6 - * and Distribution License (the License). You may not use this file except in
115.7 - * compliance with the License.
115.8 - *
115.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
115.10 - * or http://www.netbeans.org/cddl.txt.
115.11 -
115.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
115.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
115.14 - * If applicable, add the following below the CDDL Header, with the fields
115.15 - * enclosed by brackets [] replaced by your own identifying information:
115.16 - * "Portions Copyrighted [year] [name of copyright owner]"
115.17 - *
115.18 - * The Original Software is NetBeans. The Initial Developer of the Original
115.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
115.20 - * Microsystems, Inc. All Rights Reserved.
115.21 - */
115.22 -
115.23 -package org.netbeans.modules.xslt.mapper.methoid;
115.24 -
115.25 -import org.netbeans.modules.soa.mapper.basicmapper.util.MapperUtilities;
115.26 -import org.netbeans.modules.soa.mapper.common.IMapperEvent;
115.27 -import org.netbeans.modules.soa.mapper.common.IMapperGroupNode;
115.28 -import org.netbeans.modules.soa.mapper.common.basicmapper.IBasicMapper;
115.29 -import org.netbeans.modules.soa.mapper.common.basicmapper.literal.ILiteralUpdater;
115.30 -import org.netbeans.modules.soa.mapper.common.basicmapper.literal.ILiteralUpdaterFactory;
115.31 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IFieldNode;
115.32 -import org.openide.util.NbBundle;
115.33 -
115.34 -
115.35 -/**
115.36 - * Constructs literal updaters for different literal types.
115.37 - *
115.38 - * @author nk160297
115.39 - */
115.40 -public class LiteralUpdaterFactory implements ILiteralUpdaterFactory {
115.41 -
115.42 - private StringLiteralUpdater mStringUpdater;
115.43 - private NumericLiteralUpdater mNumericUpdater;
115.44 - private XPathLiteralUpdater mXPathUpdater;
115.45 - private IBasicMapper mMapper;
115.46 - private AbstractLiteralUpdater.XPathNodeExpressionUpdater mXPathNodeExpressionUpdater;
115.47 -
115.48 - public LiteralUpdaterFactory(IBasicMapper mapper) {
115.49 - mMapper = mapper;
115.50 - }
115.51 -
115.52 - public ILiteralUpdater getStringUpdater() {
115.53 - if (mStringUpdater == null) {
115.54 - mStringUpdater = new StringLiteralUpdater();
115.55 - mStringUpdater.setXPathProcessor(getExpressionUpdater());
115.56 - }
115.57 - return mStringUpdater;
115.58 - }
115.59 -
115.60 - public ILiteralUpdater getNumericUpdater() {
115.61 - if (mNumericUpdater == null) {
115.62 - mNumericUpdater = new NumericLiteralUpdater();
115.63 - mNumericUpdater.setXPathProcessor(getExpressionUpdater());
115.64 - }
115.65 - return mNumericUpdater;
115.66 - }
115.67 -
115.68 - public ILiteralUpdater getXPathUpdater() {
115.69 - if (mXPathUpdater == null) {
115.70 - mXPathUpdater = new XPathLiteralUpdater();
115.71 - mXPathUpdater.setXPathProcessor(getExpressionUpdater());
115.72 - }
115.73 - return mXPathUpdater;
115.74 - }
115.75 -
115.76 - private AbstractLiteralUpdater.XPathNodeExpressionUpdater getExpressionUpdater() {
115.77 - if (mXPathNodeExpressionUpdater == null) {
115.78 - mXPathNodeExpressionUpdater = new AbstractLiteralUpdater.XPathNodeExpressionUpdater() {
115.79 - public void updateNodeExpression(IFieldNode sourceFieldNode) {
115.80 - IMapperGroupNode groupNode = sourceFieldNode.getGroupNode();
115.81 - mMapper.getMapperViewManager().postMapperEvent(
115.82 - MapperUtilities.getMapperEvent(
115.83 - this,
115.84 - groupNode,
115.85 - IMapperEvent.REQ_UPDATE_NODE,
115.86 - NbBundle.getMessage(LiteralUpdaterFactory.class,
115.87 - "STR_X_REQUESTING_UPDATE_NODE_Y", // NOI18N
115.88 - getClass().getName(), groupNode)));
115.89 - }
115.90 - };
115.91 - }
115.92 - return mXPathNodeExpressionUpdater;
115.93 - }
115.94 -
115.95 - /**
115.96 - * Returns the literal updater corresponding to the specified type.
115.97 - */
115.98 - public ILiteralUpdater createLiteralUpdater(String type) {
115.99 - Constants.LiteralType typeObj = Constants.LiteralType.findByName(type);
115.100 - return createLiteralUpdater(typeObj);
115.101 - }
115.102 -
115.103 - public ILiteralUpdater createLiteralUpdater(Constants.LiteralType type) {
115.104 - ILiteralUpdater updater = null;
115.105 - switch (type) {
115.106 - case NUMBER_LITERAL_TYPE:
115.107 - updater = getNumericUpdater();
115.108 - break;
115.109 - case STRING_LITERAL_TYPE:
115.110 - updater = getStringUpdater();
115.111 - break;
115.112 - case XPATH_LITERAL_TYPE:
115.113 - updater = getXPathUpdater();
115.114 - break;
115.115 - }
115.116 - return updater;
115.117 - }
115.118 -}
116.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/methoid/MethoidLoader.java Wed Feb 21 08:53:38 2007 +0000
116.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
116.3 @@ -1,240 +0,0 @@
116.4 -/*
116.5 - * The contents of this file are subject to the terms of the Common Development
116.6 - * and Distribution License (the License). You may not use this file except in
116.7 - * compliance with the License.
116.8 - *
116.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
116.10 - * or http://www.netbeans.org/cddl.txt.
116.11 -
116.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
116.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
116.14 - * If applicable, add the following below the CDDL Header, with the fields
116.15 - * enclosed by brackets [] replaced by your own identifying information:
116.16 - * "Portions Copyrighted [year] [name of copyright owner]"
116.17 - *
116.18 - * The Original Software is NetBeans. The Initial Developer of the Original
116.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
116.20 - * Microsystems, Inc. All Rights Reserved.
116.21 - */
116.22 -
116.23 -package org.netbeans.modules.xslt.mapper.methoid;
116.24 -
116.25 -import java.awt.Image;
116.26 -import java.awt.Toolkit;
116.27 -import java.net.URL;
116.28 -import java.util.ArrayList;
116.29 -import java.util.List;
116.30 -import java.util.ResourceBundle;
116.31 -import javax.swing.Icon;
116.32 -import javax.swing.ImageIcon;
116.33 -import org.netbeans.modules.soa.mapper.basicmapper.util.MapperUtilities;
116.34 -import org.netbeans.modules.soa.mapper.basicmapper.methoid.BasicField;
116.35 -import org.netbeans.modules.soa.mapper.basicmapper.methoid.BasicMethoid;
116.36 -import org.netbeans.modules.soa.mapper.common.basicmapper.literal.ILiteralUpdater;
116.37 -import org.netbeans.modules.soa.mapper.common.basicmapper.literal.ILiteralUpdaterFactory;
116.38 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IField;
116.39 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IMethoid;
116.40 -import org.openide.ErrorManager;
116.41 -import org.openide.filesystems.FileObject;
116.42 -import org.openide.filesystems.Repository;
116.43 -
116.44 -/**
116.45 - * This class is intended to load meta-information from the layer.xml
116.46 - * The only public method returns the IMethoid object which contains all
116.47 - * meta-information. The object of this type is required by Mapper Core
116.48 - * as a transferable data for DnD operation
116.49 - * (dragging an element from the palette to canvas view).
116.50 - *
116.51 - * @author nk160297
116.52 - */
116.53 -
116.54 -public class MethoidLoader {
116.55 -
116.56 - public static IMethoid loadMethoid(FileObject fileObject) {
116.57 - IMethoid methoid = generateMethoid(fileObject);
116.58 - return methoid;
116.59 - }
116.60 -
116.61 - public static IMethoid loadMethoid(String xpathOperator){
116.62 - FileObject metainfoFo = Repository.getDefault().
116.63 - getDefaultFileSystem().findResource(Constants.XSLT_PALETTE_METAINFO);
116.64 - for(FileObject subfolder: metainfoFo.getChildren()){
116.65 - for (FileObject methoidfile: subfolder.getChildren()){
116.66 - if (xpathOperator.equals(methoidfile.getName())){
116.67 - return MethoidLoader.loadMethoid(methoidfile);
116.68 - }
116.69 - }
116.70 -
116.71 - }
116.72 - return null;
116.73 -
116.74 - }
116.75 -
116.76 - private static IField generateField(FileObject fo,
116.77 - String attrName,
116.78 - String attrType,
116.79 - String attrToolTip,
116.80 - boolean isInput,
116.81 - boolean isOutput,
116.82 - ResourceBundle bundle,
116.83 - boolean isLiteral,
116.84 - ILiteralUpdaterFactory literalUpdaterFactory) {
116.85 - String fieldName = "";
116.86 - String fieldTooltip = "";
116.87 - String fieldType = "";
116.88 - String tooltipKey = "";
116.89 -
116.90 - if ((fieldName = (String) fo.getAttribute(attrName)) != null) {
116.91 - if (
116.92 - (fieldName == null) ||
116.93 - (fieldName.length() == 0) ||
116.94 - // java expression, no "this"
116.95 - (attrName.equals("Class") && fieldName.equals("javaExp"))) {
116.96 - return null;
116.97 - }
116.98 -
116.99 - fieldType = (String) fo.getAttribute(attrType);
116.100 - tooltipKey = (String) fo.getAttribute(attrToolTip);
116.101 -
116.102 - if (tooltipKey == null) {
116.103 - ErrorManager.getDefault().log(
116.104 - "Unable to find tooltip name:[" + attrToolTip + "]"); // NOi18N
116.105 - } else {
116.106 - try {
116.107 - fieldTooltip = bundle.getString(tooltipKey);
116.108 - } catch (Exception e) {
116.109 - }
116.110 - }
116.111 -
116.112 - ILiteralUpdater literalUpdater = null;
116.113 - if ((isInput || isLiteral) && literalUpdaterFactory != null) {
116.114 - // literal updater will be non-null if field type supports literals
116.115 - literalUpdater = literalUpdaterFactory.createLiteralUpdater(fieldType);
116.116 - }
116.117 -
116.118 - IField field = new BasicField(
116.119 - fieldName,
116.120 - fieldType,
116.121 - fieldTooltip,
116.122 - null,
116.123 - isInput,
116.124 - isOutput,
116.125 - literalUpdater);
116.126 -
116.127 - return field;
116.128 - }
116.129 -
116.130 - return null;
116.131 - }
116.132 -
116.133 - private static IMethoid generateMethoid(FileObject fo) {
116.134 -
116.135 - boolean isEditableLiteral = false;
116.136 - Object literalObj = fo.getAttribute(Constants.LITERAL_FLAG);
116.137 - if (literalObj != null && literalObj instanceof Boolean) {
116.138 - isEditableLiteral = ((Boolean) literalObj).booleanValue();
116.139 - }
116.140 -
116.141 - String bundleRef = (String)fo.getAttribute(Constants.BUNDLE_CLASS);
116.142 - ResourceBundle bundle = ResourceBundle.getBundle(bundleRef);
116.143 -
116.144 - // creating funtoid namespace (this) field
116.145 - String fieldName = null;
116.146 - String fieldTooltip = null;
116.147 - String fieldType = null;
116.148 - IField thisField = generateField(
116.149 - fo,
116.150 - Constants.INPUT_THIS,
116.151 - Constants.THIS_CLASS,
116.152 - Constants.THIS_TOOLTIP,
116.153 - true,
116.154 - false,
116.155 - bundle,
116.156 - isEditableLiteral,
116.157 - null);
116.158 -
116.159 - // creating input fields
116.160 - List fieldList = new ArrayList();
116.161 - IField field = null;
116.162 - int i = 1;
116.163 - int inputNum = 0;
116.164 -
116.165 - try {
116.166 - inputNum = Integer.parseInt((String) fo.getAttribute("InputNum"));
116.167 - } catch (java.lang.Throwable t) {
116.168 - t.printStackTrace(System.err);
116.169 - }
116.170 -
116.171 - for (; i <= inputNum; i++) {
116.172 - field = generateField(
116.173 - fo,
116.174 - Constants.INPUT_PARAM + i,
116.175 - Constants.INPUT_TYPE + i,
116.176 - Constants.INPUT_TOOLTIP + i,
116.177 - true,
116.178 - false,
116.179 - bundle,
116.180 - isEditableLiteral,
116.181 - null);
116.182 -
116.183 - if (field != null) {
116.184 - fieldList.add(field);
116.185 - }
116.186 - }
116.187 -
116.188 - List input = new ArrayList(fieldList);
116.189 - fieldList.clear();
116.190 -
116.191 - // creating output fields
116.192 - i = 1;
116.193 -
116.194 - int outputNum = 0;
116.195 -
116.196 - try {
116.197 - outputNum = Integer.parseInt(
116.198 - (String)fo.getAttribute(Constants.OUTPUT_NUM));
116.199 - } catch (java.lang.Throwable t) {
116.200 - t.printStackTrace(System.err);
116.201 - }
116.202 -
116.203 - for (; i <= outputNum; i++) {
116.204 - field = generateField(
116.205 - fo,
116.206 - Constants.OUTPUT_PARAM + i,
116.207 - Constants.OUTPUT_TYPE + i,
116.208 - Constants.OUTPUT_TOOLTIP + i,
116.209 - false,
116.210 - true,
116.211 - bundle,
116.212 - isEditableLiteral,
116.213 - null); // new BpelLiteralHandler()
116.214 -
116.215 - if (field != null) {
116.216 - fieldList.add(field);
116.217 - }
116.218 - }
116.219 -
116.220 - List output = new ArrayList(fieldList);
116.221 -
116.222 - boolean isAccumulative = false;
116.223 - Object accumObj = fo.getAttribute(Constants.ACCUMULATIVE);
116.224 - if (accumObj != null && accumObj instanceof Boolean) {
116.225 - isAccumulative = ((Boolean) accumObj).booleanValue();
116.226 - }
116.227 - //
116.228 - String tooltip = (String)fo.getAttribute(Constants.TOOLTIP);
116.229 - tooltip = bundle.getString(tooltip);
116.230 - //
116.231 - String name = (String)fo.getAttribute(Constants.LOCAL_NAME);
116.232 - name = bundle.getString(name);
116.233 - //
116.234 - URL iconUrl = (URL)fo.getAttribute(Constants.FILE_ICON);
116.235 - Image img = Toolkit.getDefaultToolkit().getImage(iconUrl);
116.236 - Icon icon = new ImageIcon(img);
116.237 - //
116.238 - return new BasicMethoid(icon,
116.239 - MapperUtilities.cutAmpersand(name),
116.240 - tooltip, fo, thisField, input, output,
116.241 - isAccumulative, isEditableLiteral);
116.242 - }
116.243 -}
117.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/methoid/NumericLiteralUpdater.java Wed Feb 21 08:53:38 2007 +0000
117.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
117.3 @@ -1,110 +0,0 @@
117.4 -/*
117.5 - * The contents of this file are subject to the terms of the Common Development
117.6 - * and Distribution License (the License). You may not use this file except in
117.7 - * compliance with the License.
117.8 - *
117.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
117.10 - * or http://www.netbeans.org/cddl.txt.
117.11 -
117.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
117.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
117.14 - * If applicable, add the following below the CDDL Header, with the fields
117.15 - * enclosed by brackets [] replaced by your own identifying information:
117.16 - * "Portions Copyrighted [year] [name of copyright owner]"
117.17 - *
117.18 - * The Original Software is NetBeans. The Initial Developer of the Original
117.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
117.20 - * Microsystems, Inc. All Rights Reserved.
117.21 - */
117.22 -
117.23 -package org.netbeans.modules.xslt.mapper.methoid;
117.24 -
117.25 -import java.text.NumberFormat;
117.26 -import java.text.ParseException;
117.27 -import org.netbeans.modules.soa.mapper.common.basicmapper.IBasicMapper;
117.28 -import org.netbeans.modules.soa.mapper.common.basicmapper.literal.BasicLiteralEditorFactory;
117.29 -import org.netbeans.modules.soa.mapper.common.basicmapper.literal.ILiteralEditor;
117.30 -import org.netbeans.modules.soa.mapper.common.basicmapper.literal.ILiteralUpdater.LiteralSubTypeInfo;
117.31 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IFieldNode;
117.32 -
117.33 -import org.netbeans.modules.xml.xpath.AbstractXPathModelHelper;
117.34 -import org.netbeans.modules.xml.xpath.XPathNumericLiteral;
117.35 -
117.36 -
117.37 -/**
117.38 - * Updates the xpath expression for number literals.
117.39 - *
117.40 - * @author jsandusky
117.41 - */
117.42 -public class NumericLiteralUpdater extends AbstractLiteralUpdater {
117.43 -
117.44 - private final String TYPE_LONG = "Long"; // NOI18N
117.45 - private final String TYPE_DOUBLE = "Double"; // NOI18N
117.46 -
117.47 -
117.48 - public ILiteralEditor getEditor(IBasicMapper basicMapper, IFieldNode field) {
117.49 - return BasicLiteralEditorFactory.createStrictNumericEditor(basicMapper, field, this);
117.50 - }
117.51 -
117.52 - public String literalSet(IFieldNode fieldNode, String newValue) {
117.53 - LiteralSubTypeInfo typeInfo = getLiteralSubType(newValue);
117.54 - String newType = typeInfo.getType();
117.55 - // TODO reimplement
117.56 -// XPathLiteralNodeImpl literalNode = (XPathLiteralNodeImpl) fieldNode.getNodeObject();
117.57 -// if (literalNode == null) {
117.58 -// if (TYPE_LONG.equals(typeInfo.getType())) {
117.59 -// XPathNumericLiteral literal = AbstractXPathModelHelper.getInstance().newXPathNumericLiteral(new Long(newValue));
117.60 -// literalNode = new XPathLiteralNodeImpl(literal);
117.61 -// } else {
117.62 -// XPathNumericLiteral literal = AbstractXPathModelHelper.getInstance().newXPathNumericLiteral(new Double(newValue));
117.63 -// literalNode = new XPathLiteralNodeImpl(literal);
117.64 -// }
117.65 -// } else {
117.66 -// XPathNumericLiteral literal = (XPathNumericLiteral) literalNode.getLiteral();
117.67 -// if (TYPE_LONG.equals(newType)) {
117.68 -// literal.setValue(new Long(newValue));
117.69 -// } else {
117.70 -// literal.setValue(new Double(newValue));
117.71 -// }
117.72 -// }
117.73 -// super.applyLiteral(fieldNode, newValue, literalNode);
117.74 - return newValue;
117.75 - }
117.76 -
117.77 - public LiteralSubTypeInfo getLiteralSubType(String freeTextValue) {
117.78 - if (freeTextValue == null || freeTextValue.length() < 1) {
117.79 - return null;
117.80 - }
117.81 - String value = freeTextValue.trim().toUpperCase();
117.82 - Number number = null;
117.83 - try {
117.84 - // This parsing returns a Long or Double.
117.85 - // The format of value may still be invalid because
117.86 - // unintelligable characters may still exist in value.
117.87 - number = NumberFormat.getInstance().parse(value);
117.88 - } catch (ParseException pe) {
117.89 - return null;
117.90 - }
117.91 - LiteralSubTypeInfo info = null;
117.92 -
117.93 - try {
117.94 - if (value.indexOf(".") > 0) {
117.95 - Double.parseDouble(value);
117.96 - return new LiteralSubTypeInfo(TYPE_DOUBLE, value);
117.97 - }
117.98 - if (number instanceof Long) {
117.99 - Long.parseLong(value); // ensure value has all valid characters
117.100 - info = new LiteralSubTypeInfo(TYPE_LONG, new Long(value).toString());
117.101 - }
117.102 - else {
117.103 - Double.parseDouble(value); // ensure value has all valid characters
117.104 - info = new LiteralSubTypeInfo(TYPE_DOUBLE, value);
117.105 - }
117.106 - } catch (NumberFormatException nfe) {
117.107 - // just return null to indicate no valid number
117.108 - return null;
117.109 - }
117.110 -
117.111 - return info;
117.112 - }
117.113 -}
118.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/methoid/StringLiteralUpdater.java Wed Feb 21 08:53:38 2007 +0000
118.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
118.3 @@ -1,196 +0,0 @@
118.4 -/*
118.5 - * The contents of this file are subject to the terms of the Common Development
118.6 - * and Distribution License (the License). You may not use this file except in
118.7 - * compliance with the License.
118.8 - *
118.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
118.10 - * or http://www.netbeans.org/cddl.txt.
118.11 -
118.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
118.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
118.14 - * If applicable, add the following below the CDDL Header, with the fields
118.15 - * enclosed by brackets [] replaced by your own identifying information:
118.16 - * "Portions Copyrighted [year] [name of copyright owner]"
118.17 - *
118.18 - * The Original Software is NetBeans. The Initial Developer of the Original
118.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
118.20 - * Microsystems, Inc. All Rights Reserved.
118.21 - */
118.22 -
118.23 -package org.netbeans.modules.xslt.mapper.methoid;
118.24 -
118.25 -import java.awt.Component;
118.26 -import java.awt.Window;
118.27 -import javax.swing.JOptionPane;
118.28 -
118.29 -import org.netbeans.modules.xml.xpath.AbstractXPathModelHelper;
118.30 -import org.netbeans.modules.xml.xpath.XPathStringLiteral;
118.31 -import org.openide.util.NbBundle;
118.32 -import org.openide.windows.WindowManager;
118.33 -
118.34 -import java.util.ArrayList;
118.35 -import java.util.List;
118.36 -import javax.xml.datatype.Duration;
118.37 -import org.netbeans.modules.soa.mapper.common.basicmapper.IBasicMapper;
118.38 -import org.netbeans.modules.soa.mapper.common.basicmapper.literal.BasicLiteralEditorFactory;
118.39 -import org.netbeans.modules.soa.mapper.common.basicmapper.literal.ILiteralEditor;
118.40 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IFieldNode;
118.41 -
118.42 -
118.43 -/**
118.44 - * Updates the xpath expression for string literals.
118.45 - *
118.46 - * @author jsandusky
118.47 - */
118.48 -public class StringLiteralUpdater extends AbstractLiteralUpdater {
118.49 -
118.50 - public ILiteralEditor getEditor(IBasicMapper basicMapper, IFieldNode field) {
118.51 - // Check if the field represents a duration.
118.52 - String literalName = field.getLiteralName();
118.53 - String name = field.getName();
118.54 - List<String> names = new ArrayList<String>();
118.55 - if (literalName != null) {
118.56 - if (!names.contains(literalName)) {
118.57 - names.add(literalName);
118.58 - }
118.59 - }
118.60 - if (name != null) {
118.61 - if (!names.contains(name)) {
118.62 - names.add(name);
118.63 - }
118.64 - }
118.65 -// TODO reimplement
118.66 -// for (String value: names) {
118.67 -// try {
118.68 -// Duration duration = Duration.parse(value);
118.69 -// return new DurationLiteralEditor(getWindowOwner(basicMapper),
118.70 -// basicMapper, field, this);
118.71 -// } catch (Throwable t) {
118.72 -// // value does not represent a XML Schema duration, continue.
118.73 -// }
118.74 -// }
118.75 - return BasicLiteralEditorFactory.createBasicStringEditor(basicMapper, field, this);
118.76 - }
118.77 -
118.78 - private static Window getWindowOwner(IBasicMapper basicMapper) {
118.79 - Window window = null;
118.80 - Component parent =
118.81 - basicMapper.getMapperViewManager().getCanvasView().getCanvas().getUIComponent();
118.82 - while (
118.83 - parent != null &&
118.84 - !(parent instanceof Window)) {
118.85 - parent = parent.getParent();
118.86 - }
118.87 - if (parent == null) {
118.88 - parent = WindowManager.getDefault().getMainWindow();
118.89 - }
118.90 - return (Window) parent;
118.91 - }
118.92 -
118.93 - public String getLiteralDisplayText(String literalText) {
118.94 - return getQuotedString(literalText).string;
118.95 - }
118.96 -
118.97 - public String literalSet(IFieldNode fieldNode, String newValue) {
118.98 - if (!isValidStringLiteral(newValue)) {
118.99 - String title = NbBundle.getMessage(StringLiteralUpdater.class,
118.100 - "STR_INVALID_STRING_LITERAL_TITLE"); // NOI18N
118.101 - String msg = NbBundle.getMessage(StringLiteralUpdater.class,
118.102 - "STR_INVALID_STRING_LITERAL_MSG", newValue); // NOI18N
118.103 - JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), msg, title,
118.104 - JOptionPane.ERROR_MESSAGE);
118.105 - return null;
118.106 - }
118.107 -// TODO reimplement
118.108 -// XPathLiteralNodeImpl literalNode = (XPathLiteralNodeImpl) fieldNode.getNodeObject();
118.109 -// if (literalNode == null) {
118.110 -// XPathStringLiteral stringLiteral = AbstractXPathModelHelper.getInstance().newXPathStringLiteral(newValue);
118.111 -// literalNode = new XPathLiteralNodeImpl(stringLiteral);
118.112 -// } else {
118.113 -// XPathStringLiteral stringLiteral = (XPathStringLiteral) literalNode.getLiteral();
118.114 -// stringLiteral.setValue(newValue);
118.115 -// }
118.116 -// super.applyLiteral(fieldNode, newValue, literalNode);
118.117 - return newValue;
118.118 - }
118.119 -
118.120 - private boolean isValidStringLiteral(String literal) {
118.121 - // by this point, string is quoted
118.122 - // now we validate that the string follows xpath 1.0 spec
118.123 - // - josh
118.124 - QuotedString quotedString = getQuotedString(literal);
118.125 - return quotedString.quote.isQuotingValid(quotedString.string);
118.126 -
118.127 - }
118.128 -
118.129 - private QuotedString getQuotedString(String literal) {
118.130 - QuoteType quoteType = QuoteType.getQuoteType(literal);
118.131 - if (quoteType == QuoteType.UNQUOTED) {
118.132 - if (literal.indexOf(QuoteType.SINGLE.quote) >= 0) {
118.133 - // string contains a single-quote,
118.134 - // it must be quoted with double-quotes
118.135 - literal = QuoteType.DOUBLE.quote + literal + QuoteType.DOUBLE.quote;
118.136 - quoteType = QuoteType.DOUBLE;
118.137 - } else {
118.138 - // by default, single-quote the string
118.139 - literal = QuoteType.SINGLE.quote + literal + QuoteType.SINGLE.quote;
118.140 - quoteType = QuoteType.SINGLE;
118.141 - }
118.142 - }
118.143 - return new QuotedString(literal, quoteType);
118.144 - }
118.145 -
118.146 -
118.147 - private static final class QuotedString {
118.148 - public final String string;
118.149 - public final QuoteType quote;
118.150 - public QuotedString(String quotedString, QuoteType quoteType) {
118.151 - string = quotedString;
118.152 - quote = quoteType;
118.153 - }
118.154 - }
118.155 -
118.156 - private static final class QuoteType {
118.157 - private static final QuoteType SINGLE = new QuoteType("'"); // NOI18N
118.158 - private static final QuoteType DOUBLE = new QuoteType("\""); // NOI18N
118.159 - private static final QuoteType UNQUOTED = new QuoteType();
118.160 - public final String quote;
118.161 - private QuoteType(String quoteString) {
118.162 - quote = quoteString;
118.163 - }
118.164 - private QuoteType() {
118.165 - quote = null;
118.166 - }
118.167 - public boolean isStringQuoted(String literal) {
118.168 - if (quote == null) {
118.169 - return false;
118.170 - }
118.171 - if (literal.length() >= 2) {
118.172 - if (literal.startsWith(quote) && literal.endsWith(quote)) {
118.173 - return true;
118.174 - }
118.175 - }
118.176 - return false;
118.177 - }
118.178 - public boolean isQuotingValid(String literal) {
118.179 - if (quote == null) {
118.180 - return false;
118.181 - }
118.182 - // ensure that we have only our beginning quote and end quote
118.183 - // any more than that and our number of sections will be greater than 3
118.184 - // any less than that and our number of sections will be less than 3
118.185 - String[] quoteSections = literal.split(quote, 4);
118.186 - return quoteSections.length == 3;
118.187 - }
118.188 - public static QuoteType getQuoteType(String literal) {
118.189 - QuoteType quoteType = UNQUOTED;
118.190 - // if string is already quoted, mark as such
118.191 - if (SINGLE.isStringQuoted(literal)) {
118.192 - quoteType = SINGLE;
118.193 - } else if (DOUBLE.isStringQuoted(literal)) {
118.194 - quoteType = DOUBLE;
118.195 - }
118.196 - return quoteType;
118.197 - }
118.198 - }
118.199 -}
119.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/methoid/XPathLiteralUpdater.java Wed Feb 21 08:53:38 2007 +0000
119.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
119.3 @@ -1,169 +0,0 @@
119.4 -/*
119.5 - * The contents of this file are subject to the terms of the Common Development
119.6 - * and Distribution License (the License). You may not use this file except in
119.7 - * compliance with the License.
119.8 - *
119.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
119.10 - * or http://www.netbeans.org/cddl.txt.
119.11 -
119.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
119.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
119.14 - * If applicable, add the following below the CDDL Header, with the fields
119.15 - * enclosed by brackets [] replaced by your own identifying information:
119.16 - * "Portions Copyrighted [year] [name of copyright owner]"
119.17 - *
119.18 - * The Original Software is NetBeans. The Initial Developer of the Original
119.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
119.20 - * Microsystems, Inc. All Rights Reserved.
119.21 - */
119.22 -
119.23 -package org.netbeans.modules.xslt.mapper.methoid;
119.24 -
119.25 -import java.awt.Component;
119.26 -import java.awt.Window;
119.27 -import javax.swing.JOptionPane;
119.28 -import org.openide.util.NbBundle;
119.29 -import org.openide.windows.WindowManager;
119.30 -
119.31 -import java.util.ArrayList;
119.32 -import java.util.List;
119.33 -import org.netbeans.modules.soa.mapper.common.basicmapper.IBasicMapper;
119.34 -import org.netbeans.modules.soa.mapper.common.basicmapper.literal.ILiteralEditor;
119.35 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IFieldNode;
119.36 -import org.netbeans.modules.xslt.mapper.xpatheditor.XPathLiteralEditor;
119.37 -
119.38 -
119.39 -/**
119.40 - * Updates the xpath expression for string literals.
119.41 - *
119.42 - * @author jsandusky
119.43 - */
119.44 -public class XPathLiteralUpdater extends AbstractLiteralUpdater {
119.45 -
119.46 - public ILiteralEditor getEditor(IBasicMapper basicMapper, IFieldNode field) {
119.47 - return new XPathLiteralEditor(getWindowOwner(basicMapper),
119.48 - basicMapper, field, this);
119.49 - }
119.50 -
119.51 - private static Window getWindowOwner(IBasicMapper basicMapper) {
119.52 - Window window = null;
119.53 - Component parent =
119.54 - basicMapper.getMapperViewManager().getCanvasView().getCanvas().getUIComponent();
119.55 - while (
119.56 - parent != null &&
119.57 - !(parent instanceof Window)) {
119.58 - parent = parent.getParent();
119.59 - }
119.60 - if (parent == null) {
119.61 - parent = WindowManager.getDefault().getMainWindow();
119.62 - }
119.63 - return (Window) parent;
119.64 - }
119.65 -
119.66 - public String getLiteralDisplayText(String literalText) {
119.67 - return getQuotedString(literalText).string;
119.68 - }
119.69 -
119.70 - public String literalSet(IFieldNode fieldNode, String newValue) {
119.71 - if (!isValidStringLiteral(newValue)) {
119.72 - String title = NbBundle.getMessage(StringLiteralUpdater.class,
119.73 - "STR_INVALID_STRING_LITERAL_TITLE"); // NOI18N
119.74 - String msg = NbBundle.getMessage(StringLiteralUpdater.class,
119.75 - "STR_INVALID_STRING_LITERAL_MSG", newValue); // NOI18N
119.76 - JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), msg, title,
119.77 - JOptionPane.ERROR_MESSAGE);
119.78 - return null;
119.79 - }
119.80 -// TODO reimplement
119.81 -// XPathLiteralNodeImpl literalNode = (XPathLiteralNodeImpl) fieldNode.getNodeObject();
119.82 -// if (literalNode == null) {
119.83 -// XPathStringLiteral stringLiteral = AbstractXPathModelHelper.getInstance().newXPathStringLiteral(newValue);
119.84 -// literalNode = new XPathLiteralNodeImpl(stringLiteral);
119.85 -// } else {
119.86 -// XPathStringLiteral stringLiteral = (XPathStringLiteral) literalNode.getLiteral();
119.87 -// stringLiteral.setValue(newValue);
119.88 -// }
119.89 -// super.applyLiteral(fieldNode, newValue, literalNode);
119.90 - return newValue;
119.91 - }
119.92 -
119.93 - private boolean isValidStringLiteral(String literal) {
119.94 - // by this point, string is quoted
119.95 - // now we validate that the string follows xpath 1.0 spec
119.96 - // - josh
119.97 - QuotedString quotedString = getQuotedString(literal);
119.98 - return quotedString.quote.isQuotingValid(quotedString.string);
119.99 -
119.100 - }
119.101 -
119.102 - private QuotedString getQuotedString(String literal) {
119.103 - QuoteType quoteType = QuoteType.getQuoteType(literal);
119.104 - if (quoteType == QuoteType.UNQUOTED) {
119.105 - if (literal.indexOf(QuoteType.SINGLE.quote) >= 0) {
119.106 - // string contains a single-quote,
119.107 - // it must be quoted with double-quotes
119.108 - literal = QuoteType.DOUBLE.quote + literal + QuoteType.DOUBLE.quote;
119.109 - quoteType = QuoteType.DOUBLE;
119.110 - } else {
119.111 - // by default, single-quote the string
119.112 - literal = QuoteType.SINGLE.quote + literal + QuoteType.SINGLE.quote;
119.113 - quoteType = QuoteType.SINGLE;
119.114 - }
119.115 - }
119.116 - return new QuotedString(literal, quoteType);
119.117 - }
119.118 -
119.119 -
119.120 - private static final class QuotedString {
119.121 - public final String string;
119.122 - public final QuoteType quote;
119.123 - public QuotedString(String quotedString, QuoteType quoteType) {
119.124 - string = quotedString;
119.125 - quote = quoteType;
119.126 - }
119.127 - }
119.128 -
119.129 - private static final class QuoteType {
119.130 - private static final QuoteType SINGLE = new QuoteType("'"); // NOI18N
119.131 - private static final QuoteType DOUBLE = new QuoteType("\""); // NOI18N
119.132 - private static final QuoteType UNQUOTED = new QuoteType();
119.133 - public final String quote;
119.134 - private QuoteType(String quoteString) {
119.135 - quote = quoteString;
119.136 - }
119.137 - private QuoteType() {
119.138 - quote = null;
119.139 - }
119.140 - public boolean isStringQuoted(String literal) {
119.141 - if (quote == null) {
119.142 - return false;
119.143 - }
119.144 - if (literal.length() >= 2) {
119.145 - if (literal.startsWith(quote) && literal.endsWith(quote)) {
119.146 - return true;
119.147 - }
119.148 - }
119.149 - return false;
119.150 - }
119.151 - public boolean isQuotingValid(String literal) {
119.152 - if (quote == null) {
119.153 - return false;
119.154 - }
119.155 - // ensure that we have only our beginning quote and end quote
119.156 - // any more than that and our number of sections will be greater than 3
119.157 - // any less than that and our number of sections will be less than 3
119.158 - String[] quoteSections = literal.split(quote, 4);
119.159 - return quoteSections.length == 3;
119.160 - }
119.161 - public static QuoteType getQuoteType(String literal) {
119.162 - QuoteType quoteType = UNQUOTED;
119.163 - // if string is already quoted, mark as such
119.164 - if (SINGLE.isStringQuoted(literal)) {
119.165 - quoteType = SINGLE;
119.166 - } else if (DOUBLE.isStringQuoted(literal)) {
119.167 - quoteType = DOUBLE;
119.168 - }
119.169 - return quoteType;
119.170 - }
119.171 - }
119.172 -}
120.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/MapperContext.java Wed Feb 21 08:53:38 2007 +0000
120.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
120.3 @@ -1,33 +0,0 @@
120.4 -/*
120.5 - * MapperData.java
120.6 - *
120.7 - * Created on 19 Äåêàáðü 2006 ã., 18:41
120.8 - *
120.9 - * To change this template, choose Tools | Template Manager
120.10 - * and open the template in the editor.
120.11 - */
120.12 -
120.13 -package org.netbeans.modules.xslt.mapper.model;
120.14 -
120.15 -import org.netbeans.modules.xml.axi.AXIComponent;
120.16 -import org.netbeans.modules.xslt.model.XslModel;
120.17 -
120.18 -/**
120.19 - *
120.20 - * @author Alexey
120.21 - */
120.22 -public interface MapperContext<T> {
120.23 -
120.24 - T getTransformDesc();
120.25 -
120.26 - XslModel getXSLModel();
120.27 -
120.28 - AXIComponent getTargetType();
120.29 -
120.30 - AXIComponent getSourceType();
120.31 -
120.32 - void addMapperContextChangeListener(MapperContextChangeListener listener);
120.33 -
120.34 - void removeMapperContextChangeListener(MapperContextChangeListener listener);
120.35 -
120.36 -}
121.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/MapperContextChangeListener.java Wed Feb 21 08:53:38 2007 +0000
121.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
121.3 @@ -1,33 +0,0 @@
121.4 -/*
121.5 - * The contents of this file are subject to the terms of the Common Development
121.6 - * and Distribution License (the License). You may not use this file except in
121.7 - * compliance with the License.
121.8 - *
121.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
121.10 - * or http://www.netbeans.org/cddl.txt.
121.11 -
121.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
121.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
121.14 - * If applicable, add the following below the CDDL Header, with the fields
121.15 - * enclosed by brackets [] replaced by your own identifying information:
121.16 - * "Portions Copyrighted [year] [name of copyright owner]"
121.17 - *
121.18 - * The Original Software is NetBeans. The Initial Developer of the Original
121.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
121.20 - * Microsystems, Inc. All Rights Reserved.
121.21 - */
121.22 -package org.netbeans.modules.xslt.mapper.model;
121.23 -
121.24 -import org.netbeans.modules.xml.axi.AXIComponent;
121.25 -import org.netbeans.modules.xslt.model.XslModel;
121.26 -
121.27 -/**
121.28 - *
121.29 - * @author Vitaly Bychkov
121.30 - * @version 1.0
121.31 - */
121.32 -public interface MapperContextChangeListener {
121.33 - void sourceTypeChanged(AXIComponent oldComponent, AXIComponent newComponent);
121.34 - void targetTypeChanged(AXIComponent oldComponent, AXIComponent newComponent);
121.35 - void xslModelChanged(XslModel oldModel, XslModel newModel);
121.36 -}
122.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/MapperContextChangeSupport.java Wed Feb 21 08:53:38 2007 +0000
122.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
122.3 @@ -1,84 +0,0 @@
122.4 -/*
122.5 - * The contents of this file are subject to the terms of the Common Development
122.6 - * and Distribution License (the License). You may not use this file except in
122.7 - * compliance with the License.
122.8 - *
122.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
122.10 - * or http://www.netbeans.org/cddl.txt.
122.11 -
122.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
122.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
122.14 - * If applicable, add the following below the CDDL Header, with the fields
122.15 - * enclosed by brackets [] replaced by your own identifying information:
122.16 - * "Portions Copyrighted [year] [name of copyright owner]"
122.17 - *
122.18 - * The Original Software is NetBeans. The Initial Developer of the Original
122.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
122.20 - * Microsystems, Inc. All Rights Reserved.
122.21 - */
122.22 -package org.netbeans.modules.xslt.mapper.model;
122.23 -
122.24 -import java.util.ArrayList;
122.25 -import java.util.List;
122.26 -import java.util.concurrent.locks.Lock;
122.27 -import java.util.concurrent.locks.ReentrantReadWriteLock;
122.28 -import org.netbeans.modules.xml.axi.AXIComponent;
122.29 -
122.30 -/**
122.31 - *
122.32 - * @author Vitaly Bychkov
122.33 - * @version 1.0
122.34 - */
122.35 -public class MapperContextChangeSupport {
122.36 - private Lock writeLock = new ReentrantReadWriteLock().writeLock();
122.37 - private List<MapperContextChangeListener> myListeners = new ArrayList<MapperContextChangeListener>();
122.38 -
122.39 - public MapperContextChangeSupport() {
122.40 - }
122.41 -
122.42 - public void addPropertyChangeListener(MapperContextChangeListener changeListener) {
122.43 - assert changeListener != null : "Try to add null listener."; // NOI18N
122.44 - writeLock.lock();
122.45 - try {
122.46 - myListeners.add(changeListener);
122.47 - } finally {
122.48 - writeLock.unlock();
122.49 - }
122.50 - }
122.51 -
122.52 - public void removePropertyChangeListener(MapperContextChangeListener changeListener) {
122.53 - assert changeListener != null : "Try to remove null listener."; // NOI18N
122.54 - writeLock.lock();
122.55 - try {
122.56 - myListeners.remove(changeListener);
122.57 - } finally {
122.58 - writeLock.unlock();
122.59 - }
122.60 - }
122.61 -
122.62 - public void fireSourceTypeChanged(AXIComponent oldComponent, AXIComponent newComponent) {
122.63 - MapperContextChangeListener[] tmp = new MapperContextChangeListener[myListeners.size()];
122.64 - synchronized (myListeners){
122.65 - tmp = myListeners.toArray(tmp);
122.66 - }
122.67 -
122.68 - for (MapperContextChangeListener listener : tmp) {
122.69 - listener.sourceTypeChanged(oldComponent, newComponent);
122.70 - }
122.71 - }
122.72 -
122.73 - public void fireTargetTypeChanged(AXIComponent oldComponent, AXIComponent newComponent) {
122.74 - MapperContextChangeListener[] tmp = new MapperContextChangeListener[myListeners.size()];
122.75 - synchronized (myListeners){
122.76 - tmp = myListeners.toArray(tmp);
122.77 - }
122.78 -
122.79 - for (MapperContextChangeListener listener : tmp) {
122.80 - listener.targetTypeChanged(oldComponent, newComponent);
122.81 - }
122.82 - }
122.83 -
122.84 - public void fireMapperContextChanged(MapperContext oldContext, MapperContext newContext) {
122.85 - throw new UnsupportedOperationException();
122.86 - }
122.87 -}
123.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/MapperTreeNodeResolver.java Wed Feb 21 08:53:38 2007 +0000
123.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
123.3 @@ -1,28 +0,0 @@
123.4 -/*
123.5 - * MapperTreeNodeResolver.java
123.6 - *
123.7 - * Created on 22 ßíâàðü 2007 ã., 16:21
123.8 - *
123.9 - * To change this template, choose Tools | Template Manager
123.10 - * and open the template in the editor.
123.11 - */
123.12 -
123.13 -package org.netbeans.modules.xslt.mapper.model;
123.14 -
123.15 -import javax.swing.tree.TreePath;
123.16 -import org.netbeans.modules.soa.mapper.common.IMapperNode;
123.17 -import org.netbeans.modules.soa.mapper.common.basicmapper.tree.IMapperTreeView;
123.18 -import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
123.19 -
123.20 -/**
123.21 - *
123.22 - * @author Alexey
123.23 - */
123.24 -public class MapperTreeNodeResolver {
123.25 -
123.26 -
123.27 - public MapperTreeNodeResolver() {
123.28 - }
123.29 -
123.30 -
123.31 -}
124.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/SourceTreeModel.java Wed Feb 21 08:53:38 2007 +0000
124.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
124.3 @@ -1,80 +0,0 @@
124.4 -/*
124.5 - * SourceTreeModel.java
124.6 - *
124.7 - * Created on 19 Äåêàáðü 2006 ã., 19:50
124.8 - *
124.9 - * To change this template, choose Tools | Template Manager
124.10 - * and open the template in the editor.
124.11 - */
124.12 -
124.13 -package org.netbeans.modules.xslt.mapper.model;
124.14 -
124.15 -import java.net.URL;
124.16 -import org.netbeans.modules.xml.axi.AXIComponent;
124.17 -import org.netbeans.modules.xml.axi.AXIModel;
124.18 -import org.netbeans.modules.xml.axi.AXIModelFactory;
124.19 -import org.netbeans.modules.xml.retriever.catalog.Utilities;
124.20 -import org.netbeans.modules.xml.schema.model.SchemaModel;
124.21 -import org.netbeans.modules.xml.schema.model.SchemaModelFactory;
124.22 -import org.netbeans.modules.xml.xam.ModelSource;
124.23 -import org.netbeans.modules.xslt.mapper.model.nodes.Node;
124.24 -import org.netbeans.modules.xslt.mapper.model.nodes.NodeFactory;
124.25 -import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
124.26 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
124.27 -import org.openide.filesystems.FileObject;
124.28 -import org.openide.filesystems.URLMapper;
124.29 -
124.30 -/**
124.31 - *
124.32 - * @author Alexey
124.33 - */
124.34 -public class SourceTreeModel extends XsltNodesTreeModel {
124.35 -
124.36 - private XsltMapper myMapper;
124.37 -
124.38 - public SourceTreeModel(XsltMapper mapper) {
124.39 - myMapper = mapper;
124.40 -
124.41 - MapperContext context = myMapper.getContext();
124.42 - //
124.43 - // STUB
124.44 - //
124.45 - AXIComponent sourceType = null;
124.46 - if (context == null || context.getSourceType() == null) {
124.47 - sourceType = constructFakeComponent();
124.48 - } else {
124.49 - sourceType = context.getSourceType();
124.50 - }
124.51 - //
124.52 - Node rootNode = NodeFactory.createNode(sourceType, myMapper);
124.53 - //
124.54 - assert rootNode instanceof TreeNode;
124.55 - setRootNode((TreeNode)rootNode);
124.56 - }
124.57 -
124.58 - public static AXIComponent constructFakeComponent() {
124.59 - AXIComponent sourceType = null;
124.60 - try {
124.61 - //
124.62 - // Load fake model temporary
124.63 - String packageName = SourceTreeModel.class.getPackage().getName();
124.64 - String packagePath = packageName.replace('.', '/');
124.65 - String schemaPath = packagePath + "/" + "OTA_TravelItinerary.xsd"; // NOI18N
124.66 - ClassLoader cl = SourceTreeModel.class.getClassLoader();
124.67 - URL schemaUrl = cl.getResource(schemaPath);
124.68 - FileObject fo = URLMapper.findFileObject(schemaUrl);
124.69 - ModelSource mSource = Utilities.getModelSource(fo, false);
124.70 - SchemaModel schemaModel =
124.71 - SchemaModelFactory.getDefault().getModel(mSource);
124.72 - AXIModel sourceModel = AXIModelFactory.getDefault().
124.73 - getModel(schemaModel);
124.74 - sourceType = sourceModel.getRoot().getElements().get(0);
124.75 - //
124.76 - } catch (Exception ex) {
124.77 - // ErrorManager.getDefault().notify(ex);
124.78 - // do nothing here
124.79 - }
124.80 - return sourceType;
124.81 - }
124.82 -
124.83 -}
125.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/XsltNodesTreeModel.java Wed Feb 21 08:53:38 2007 +0000
125.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
125.3 @@ -1,85 +0,0 @@
125.4 -/*
125.5 - * SourceTreeModel.java
125.6 - *
125.7 - * Created on 19 Äåêàáðü 2006 ã., 19:50
125.8 - *
125.9 - * To change this template, choose Tools | Template Manager
125.10 - * and open the template in the editor.
125.11 - */
125.12 -
125.13 -package org.netbeans.modules.xslt.mapper.model;
125.14 -
125.15 -import java.util.List;
125.16 -import javax.swing.event.EventListenerList;
125.17 -import javax.swing.event.TreeModelListener;
125.18 -import javax.swing.tree.TreeModel;
125.19 -import javax.swing.tree.TreePath;
125.20 -import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
125.21 -
125.22 -/**
125.23 - *
125.24 - * @author nk160297
125.25 - */
125.26 -public class XsltNodesTreeModel implements TreeModel {
125.27 -
125.28 - private TreeNode myRootNode;
125.29 - private EventListenerList listenerList = new EventListenerList();
125.30 -
125.31 - public XsltNodesTreeModel() {
125.32 - }
125.33 -
125.34 - public XsltNodesTreeModel(TreeNode rootNode) {
125.35 - myRootNode = rootNode;
125.36 - }
125.37 -
125.38 - public void setRootNode(TreeNode rootNode) {
125.39 - myRootNode = rootNode;
125.40 - }
125.41 -
125.42 - public Object getRoot() {
125.43 - return myRootNode;
125.44 - }
125.45 -
125.46 - public int getIndexOfChild(Object parent, Object requiredChild) {
125.47 - assert parent instanceof TreeNode;
125.48 - assert requiredChild instanceof TreeNode;
125.49 - //
125.50 - List<TreeNode> children = ((TreeNode)parent).getChildren();
125.51 -
125.52 - return children.indexOf(requiredChild);
125.53 -
125.54 - }
125.55 -
125.56 - public Object getChild(Object parent, int index) {
125.57 - assert parent instanceof TreeNode;
125.58 -
125.59 - //
125.60 - List<TreeNode> children = ((TreeNode)parent).getChildren();
125.61 - return children.get(index);
125.62 - }
125.63 -
125.64 - public boolean isLeaf(Object node) {
125.65 - assert node instanceof TreeNode;
125.66 - //
125.67 - return ((TreeNode) node).getChildren().isEmpty();
125.68 - }
125.69 -
125.70 - public int getChildCount(Object parent) {
125.71 - assert parent instanceof TreeNode;
125.72 - //
125.73 - return ((TreeNode) parent).getChildren().size();
125.74 - }
125.75 -
125.76 - public void removeTreeModelListener(TreeModelListener l) {
125.77 - listenerList.remove(TreeModelListener.class, l);
125.78 - }
125.79 -
125.80 - public void addTreeModelListener(TreeModelListener l) {
125.81 - listenerList.add(TreeModelListener.class, l);
125.82 - }
125.83 -
125.84 - public void valueForPathChanged(TreePath path, Object newValue) {
125.85 - // do nothing for a while
125.86 - }
125.87 -
125.88 -}
126.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/XsltNodesTreeRenderer.java Wed Feb 21 08:53:38 2007 +0000
126.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
126.3 @@ -1,67 +0,0 @@
126.4 -/*
126.5 - * The contents of this file are subject to the terms of the Common Development
126.6 - * and Distribution License (the License). You may not use this file except in
126.7 - * compliance with the License.
126.8 - *
126.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
126.10 - * or http://www.netbeans.org/cddl.txt.
126.11 -
126.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
126.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
126.14 - * If applicable, add the following below the CDDL Header, with the fields
126.15 - * enclosed by brackets [] replaced by your own identifying information:
126.16 - * "Portions Copyrighted [year] [name of copyright owner]"
126.17 - *
126.18 - * The Original Software is NetBeans. The Initial Developer of the Original
126.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
126.20 - * Microsystems, Inc. All Rights Reserved.
126.21 - */
126.22 -
126.23 -package org.netbeans.modules.xslt.mapper.model;
126.24 -
126.25 -import java.awt.Component;
126.26 -import java.awt.Image;
126.27 -import java.beans.BeanInfo;
126.28 -import javax.swing.ImageIcon;
126.29 -import javax.swing.JTree;
126.30 -import javax.swing.tree.DefaultTreeCellRenderer;
126.31 -import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
126.32 -
126.33 -/**
126.34 - * Tree renderer is intended to be used together with the XsltNodesTreeModel.
126.35 - *
126.36 - * @author nk160297
126.37 - */
126.38 -public class XsltNodesTreeRenderer extends DefaultTreeCellRenderer {
126.39 -
126.40 - public XsltNodesTreeRenderer() {
126.41 - }
126.42 -
126.43 - public Component getTreeCellRendererComponent(
126.44 - JTree tree, Object value,
126.45 - boolean sel, boolean expanded,
126.46 - boolean leaf, int row, boolean hasFocus) {
126.47 - //
126.48 - super.getTreeCellRendererComponent(
126.49 - tree, value, sel, expanded, leaf, row, hasFocus);
126.50 - //
126.51 - if (value instanceof TreeNode) {
126.52 - TreeNode node = (TreeNode)value;
126.53 - //
126.54 - String name = node.getName();
126.55 - if (name != null && name.length() != 0) {
126.56 - this.setText(name);
126.57 - }
126.58 - //
126.59 - Image img = node.getIcon();
126.60 - if (img != null) {
126.61 - this.setIcon(new ImageIcon(img));
126.62 - }
126.63 - }
126.64 - //
126.65 - return this;
126.66 - }
126.67 -
126.68 -
126.69 -
126.70 -}
127.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/nodes/CanvasNode.java Wed Feb 21 08:53:38 2007 +0000
127.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
127.3 @@ -1,121 +0,0 @@
127.4 -/*
127.5 - * The contents of this file are subject to the terms of the Common Development
127.6 - * and Distribution License (the License). You may not use this file except in
127.7 - * compliance with the License.
127.8 - *
127.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
127.10 - * or http://www.netbeans.org/cddl.txt.
127.11 -
127.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
127.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
127.14 - * If applicable, add the following below the CDDL Header, with the fields
127.15 - * enclosed by brackets [] replaced by your own identifying information:
127.16 - * "Portions Copyrighted [year] [name of copyright owner]"
127.17 - *
127.18 - * The Original Software is NetBeans. The Initial Developer of the Original
127.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
127.20 - * Microsystems, Inc. All Rights Reserved.
127.21 - */
127.22 -
127.23 -package org.netbeans.modules.xslt.mapper.model.nodes;
127.24 -
127.25 -import java.util.ArrayList;
127.26 -import java.util.List;
127.27 -import org.netbeans.modules.soa.mapper.common.IMapperNode;
127.28 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IFieldNode;
127.29 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IMethoidNode;
127.30 -import org.netbeans.modules.xml.xpath.XPathExpression;
127.31 -import org.netbeans.modules.xslt.mapper.model.nodes.visitor.NodeVisitor;
127.32 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
127.33 -
127.34 -
127.35 -public class CanvasNode extends Node {
127.36 -
127.37 - protected List<Node> mInputList = new ArrayList<Node>();
127.38 - protected List<Node> mOutputList = new ArrayList<Node>();
127.39 -
127.40 -
127.41 - public CanvasNode(XPathExpression dataObject, XsltMapper mapper) {
127.42 - super((Object)dataObject, mapper);
127.43 - }
127.44 -
127.45 - public IMapperNode getOutputNode() {
127.46 - IMethoidNode node = (IMethoidNode) getMapperNode();
127.47 - if (node != null) {
127.48 - return (IMapperNode) node.getOutputFieldNodes().get(0);
127.49 - }
127.50 - return null;
127.51 - }
127.52 -
127.53 - public IMapperNode getInputNode(Node node_from) {
127.54 -
127.55 - IMethoidNode node = (IMethoidNode) getMapperNode();
127.56 - if (node != null) {
127.57 - for(Object fn: node.getInputFieldNodes()){
127.58 - if (fn instanceof IFieldNode){
127.59 - Object data = ((IFieldNode) fn).getNodeObject();
127.60 - if (data == node_from){
127.61 - return (IFieldNode) fn;
127.62 - }
127.63 - }
127.64 - }
127.65 - }
127.66 - return null;
127.67 - }
127.68 -
127.69 -
127.70 -
127.71 - public void addInput(Node input) {
127.72 - this.mInputList.add(input);
127.73 - }
127.74 -
127.75 - public void addOutput(Node output) {
127.76 - this.mOutputList.add(output);
127.77 - }
127.78 - /**
127.79 - * List of input Node which are
127.80 - * connected to this operator
127.81 - * @return
127.82 - */
127.83 - public List<Node> getInputs() {
127.84 - return this.mInputList;
127.85 - }
127.86 -
127.87 - /**
127.88 - * List of output Node where this node
127.89 - * is connected.
127.90 - * @return
127.91 - */
127.92 - public List<Node> getOutputs() {
127.93 - return this.mOutputList;
127.94 - }
127.95 -
127.96 - public void removeInput(Node input) {
127.97 - if(this.mInputList.contains(input)) {
127.98 - this.mInputList.remove(input);
127.99 - }
127.100 - }
127.101 -
127.102 - public void removeOutput(Node output) {
127.103 - if(this.mOutputList.contains(output)) {
127.104 - this.mOutputList.remove(output);
127.105 - }
127.106 - }
127.107 -
127.108 - protected void visitInputs(NodeVisitor visitor) {
127.109 - for(Node n: getInputs()) {
127.110 - n.accept(visitor);
127.111 - }
127.112 - }
127.113 -
127.114 - protected void visitOutputs(NodeVisitor visitor) {
127.115 -
127.116 - for(Node n: getOutputs()) {
127.117 - n.accept(visitor);
127.118 - }
127.119 - }
127.120 -
127.121 - public void accept(NodeVisitor visitor) {
127.122 - visitor.visit(this);
127.123 - }
127.124 -}
128.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/nodes/Node.java Wed Feb 21 08:53:38 2007 +0000
128.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
128.3 @@ -1,119 +0,0 @@
128.4 -/*
128.5 - * The contents of this file are subject to the terms of the Common Development
128.6 - * and Distribution License (the License). You may not use this file except in
128.7 - * compliance with the License.
128.8 - *
128.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
128.10 - * or http://www.netbeans.org/cddl.txt.
128.11 -
128.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
128.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
128.14 - * If applicable, add the following below the CDDL Header, with the fields
128.15 - * enclosed by brackets [] replaced by your own identifying information:
128.16 - * "Portions Copyrighted [year] [name of copyright owner]"
128.17 - *
128.18 - * The Original Software is NetBeans. The Initial Developer of the Original
128.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
128.20 - * Microsystems, Inc. All Rights Reserved.
128.21 - */
128.22 -
128.23 -package org.netbeans.modules.xslt.mapper.model.nodes;
128.24 -
128.25 -import java.util.ArrayList;
128.26 -import java.util.List;
128.27 -
128.28 -import org.netbeans.modules.xslt.mapper.model.nodes.visitor.NodeVisitor;
128.29 -
128.30 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IFieldNode;
128.31 -import org.netbeans.modules.soa.mapper.common.IMapperNode;
128.32 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IMethoidNode;
128.33 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
128.34 -
128.35 -
128.36 -public abstract class Node {
128.37 -
128.38 -
128.39 -
128.40 -
128.41 - private XsltMapper mapper;
128.42 - private IMapperNode mMapperNode;
128.43 - private Object dataObject;
128.44 -
128.45 -
128.46 - public Node(Object dataObject, XsltMapper mapper) {
128.47 - this.dataObject = dataObject;
128.48 - this.mapper = mapper;
128.49 - }
128.50 -
128.51 -
128.52 -
128.53 - /**
128.54 - * Get the GUI Node for this Node.
128.55 - * @return
128.56 - */
128.57 - public IMapperNode getMapperNode() {
128.58 - return this.mMapperNode;
128.59 - }
128.60 -
128.61 - public void setMapperNode(IMapperNode node) {
128.62 - this.mMapperNode = node;
128.63 - }
128.64 -
128.65 - public XsltMapper getMapper(){
128.66 - return mapper;
128.67 - }
128.68 -
128.69 -
128.70 - public List<Node> getNextNodes() {
128.71 - ArrayList<Node> result = new ArrayList<Node>();
128.72 -
128.73 - IMapperNode node = getMapperNode();
128.74 -
128.75 - for (Object n: node.getNextNodes()){
128.76 - result.add((Node) ((IMapperNode) n).getNodeObject());
128.77 - }
128.78 - return result;
128.79 - }
128.80 -
128.81 - public List<Node> getPreviousNodes(){
128.82 - ArrayList<Node> result = new ArrayList<Node>();
128.83 -
128.84 - IMapperNode node = getMapperNode();
128.85 -
128.86 - for (Object n: node.getPreviousNodes()){
128.87 - result.add((Node) ((IMapperNode) n).getNodeObject());
128.88 - }
128.89 - return result;
128.90 - }
128.91 -
128.92 -
128.93 - public abstract IMapperNode getOutputNode();
128.94 - public abstract IMapperNode getInputNode(Node node_from);
128.95 -
128.96 -
128.97 -
128.98 - /**
128.99 - * Returns element of domain-specific object model, associated with this Node
128.100 - * @returns AXIComponent, XSLComponent or XPAthexpression
128.101 - **/
128.102 -
128.103 - public Object getDataObject() {
128.104 - return this.dataObject;
128.105 - }
128.106 -
128.107 -// public void setSataObject(Object dataObject) {
128.108 -// this.dataObject = dataObject;
128.109 -// }
128.110 -
128.111 - /**
128.112 - * Gets the name of the node.
128.113 - *
128.114 - * @return String The name of the node
128.115 - */
128.116 -
128.117 - public String getName() {
128.118 - return "UNKNOWN NODE"; // NOI18N
128.119 - }
128.120 -
128.121 - public abstract void accept(NodeVisitor visitor);
128.122 -}
129.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/nodes/NodeFactory.java Wed Feb 21 08:53:38 2007 +0000
129.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
129.3 @@ -1,62 +0,0 @@
129.4 -/*
129.5 - * The contents of this file are subject to the terms of the Common Development
129.6 - * and Distribution License (the License). You may not use this file except in
129.7 - * compliance with the License.
129.8 - *
129.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
129.10 - * or http://www.netbeans.org/cddl.txt.
129.11 -
129.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
129.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
129.14 - * If applicable, add the following below the CDDL Header, with the fields
129.15 - * enclosed by brackets [] replaced by your own identifying information:
129.16 - * "Portions Copyrighted [year] [name of copyright owner]"
129.17 - *
129.18 - * The Original Software is NetBeans. The Initial Developer of the Original
129.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
129.20 - * Microsystems, Inc. All Rights Reserved.
129.21 - */
129.22 -
129.23 -package org.netbeans.modules.xslt.mapper.model.nodes;
129.24 -
129.25 -
129.26 -import org.netbeans.modules.xml.axi.AXIComponent;
129.27 -import org.netbeans.modules.xml.xpath.XPathExpression;
129.28 -import org.netbeans.modules.xslt.mapper.model.targettree.AttributeDeclarationNode;
129.29 -import org.netbeans.modules.xslt.mapper.model.targettree.ElementDeclarationNode;
129.30 -import org.netbeans.modules.xslt.mapper.model.targettree.RuleNode;
129.31 -import org.netbeans.modules.xslt.mapper.model.targettree.SchemaNode;
129.32 -import org.netbeans.modules.xslt.mapper.model.targettree.TemplateNode;
129.33 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
129.34 -import org.netbeans.modules.xslt.model.Attribute;
129.35 -import org.netbeans.modules.xslt.model.Element;
129.36 -import org.netbeans.modules.xslt.model.LiteralResultElement;
129.37 -import org.netbeans.modules.xslt.model.Template;
129.38 -import org.netbeans.modules.xslt.model.XslComponent;
129.39 -
129.40 -/**
129.41 - *
129.42 - * @author radval
129.43 - *
129.44 - */
129.45 -public class NodeFactory {
129.46 -
129.47 -
129.48 - public static Node createNode(Object obj, XsltMapper mapper){
129.49 - if (obj instanceof AXIComponent){
129.50 - return new SchemaNode((AXIComponent)obj, mapper);
129.51 - } else if (obj instanceof Element || obj instanceof LiteralResultElement) {
129.52 - return new ElementDeclarationNode((XslComponent)obj, mapper);
129.53 - } else if (obj instanceof Attribute) {
129.54 - return new AttributeDeclarationNode((XslComponent)obj, mapper);
129.55 - } else if(obj instanceof Template) {
129.56 - return new TemplateNode((XslComponent)obj, mapper);
129.57 - } else if (obj instanceof XslComponent) {
129.58 - return new RuleNode((XslComponent)obj, mapper);
129.59 - } else if (obj instanceof XPathExpression) {
129.60 - return new CanvasNode((XPathExpression)obj, mapper);
129.61 - }
129.62 - return null;
129.63 - }
129.64 -
129.65 -}
130.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/nodes/SourceTypeFinder.java Wed Feb 21 08:53:38 2007 +0000
130.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
130.3 @@ -1,77 +0,0 @@
130.4 -/*
130.5 - * SourceTypeFinder.java
130.6 - *
130.7 - * Created on 19 ßíâàðü 2007 ã., 12:23
130.8 - *
130.9 - * To change this template, choose Tools | Template Manager
130.10 - * and open the template in the editor.
130.11 - */
130.12 -
130.13 -package org.netbeans.modules.xslt.mapper.model.nodes;
130.14 -
130.15 -import javax.swing.JTree;
130.16 -import org.netbeans.modules.xml.axi.AXIComponent;
130.17 -import org.netbeans.modules.xml.axi.AXIType;
130.18 -import org.netbeans.modules.xml.xpath.LocationStep;
130.19 -import org.netbeans.modules.xml.xpath.XPathExpressionPath;
130.20 -import org.netbeans.modules.xml.xpath.XPathLocationPath;
130.21 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
130.22 -
130.23 -/**
130.24 - *
130.25 - * @author Alexey
130.26 - */
130.27 -public class SourceTypeFinder {
130.28 - private XsltMapper mapper;
130.29 -
130.30 - private LocationStep[] locationSteps;
130.31 - /** Creates a new instance of SourceTypeFinder */
130.32 - public SourceTypeFinder(XsltMapper mapper){
130.33 - this.mapper = mapper;
130.34 -
130.35 - }
130.36 -
130.37 - public TreeNode findNode(XPathLocationPath path){
130.38 - JTree sourceTree = mapper.
130.39 - getMapperViewManager().
130.40 - getSourceView().
130.41 - getTree();
130.42 -
130.43 -
130.44 -
130.45 - this.locationSteps = path.getSteps();
130.46 -
130.47 - return findImpl((TreeNode) sourceTree.getModel().getRoot(), 0);
130.48 -
130.49 - }
130.50 -
130.51 - private TreeNode findImpl(TreeNode currentNode, int depth){
130.52 - LocationStep step = locationSteps[depth];
130.53 -
130.54 - String typeName = ((AXIType) currentNode.getType()).getName();
130.55 -
130.56 - String testName = step.getNodeTest().toString();
130.57 -
130.58 - if (typeName.equals(testName)){
130.59 -
130.60 - if (depth == (locationSteps.length - 1)) {
130.61 - //last step in path
130.62 - return currentNode;
130.63 - }
130.64 -
130.65 - if (!currentNode.getChildren().isEmpty()){
130.66 - //perform recursion
130.67 - for (TreeNode tn: currentNode.getChildren()){
130.68 - TreeNode result = findImpl(tn, depth + 1);
130.69 - if (result != null){
130.70 - return result;
130.71 - }
130.72 - }
130.73 - }
130.74 - }
130.75 -
130.76 - return null;
130.77 - }
130.78 -
130.79 -
130.80 -}
131.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/nodes/TreeNode.java Wed Feb 21 08:53:38 2007 +0000
131.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
131.3 @@ -1,129 +0,0 @@
131.4 -/*
131.5 - * The contents of this file are subject to the terms of the Common Development
131.6 - * and Distribution License (the License). You may not use this file except in
131.7 - * compliance with the License.
131.8 - *
131.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
131.10 - * or http://www.netbeans.org/cddl.txt.
131.11 -
131.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
131.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
131.14 - * If applicable, add the following below the CDDL Header, with the fields
131.15 - * enclosed by brackets [] replaced by your own identifying information:
131.16 - * "Portions Copyrighted [year] [name of copyright owner]"
131.17 - *
131.18 - * The Original Software is NetBeans. The Initial Developer of the Original
131.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
131.20 - * Microsystems, Inc. All Rights Reserved.
131.21 - */
131.22 -
131.23 -package org.netbeans.modules.xslt.mapper.model.nodes;
131.24 -
131.25 -import java.awt.Color;
131.26 -import java.awt.Image;
131.27 -import java.util.List;
131.28 -import javax.swing.tree.TreePath;
131.29 -import org.netbeans.modules.soa.mapper.common.IMapperNode;
131.30 -import org.netbeans.modules.soa.mapper.common.basicmapper.tree.IMapperTreeNode;
131.31 -import org.netbeans.modules.xml.axi.AXIComponent;
131.32 -import org.netbeans.modules.xml.xam.Component;
131.33 -import org.netbeans.modules.xslt.mapper.model.nodes.actions.ActionDescriptor;
131.34 -import org.netbeans.modules.xslt.mapper.model.nodes.actions.ActionType;
131.35 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
131.36 -
131.37 -/**
131.38 - *
131.39 - * @author radval
131.40 - *
131.41 - */
131.42 -public abstract class TreeNode extends Node {
131.43 -
131.44 - private TreeNode parent;
131.45 - private List<TreeNode> children;
131.46 -
131.47 - protected abstract List<TreeNode> loadChildren();
131.48 -
131.49 - public abstract AXIComponent getType();
131.50 -
131.51 - public TreeNode(Component component, XsltMapper mapper){
131.52 - super(component, mapper);
131.53 - }
131.54 - /**
131.55 - * Gets the parent node for this node.
131.56 - *
131.57 - * @return the parent node, or null if none
131.58 - */
131.59 - public TreeNode getParent(){
131.60 - return this.parent;
131.61 - }
131.62 -
131.63 -
131.64 - public void setParent(TreeNode parent){
131.65 - this.parent = parent;
131.66 - }
131.67 -
131.68 -
131.69 - public List<TreeNode> getChildren(){
131.70 - if (children == null){
131.71 - children = loadChildren();
131.72 - }
131.73 - return children;
131.74 - }
131.75 -
131.76 -
131.77 -
131.78 -
131.79 - /**
131.80 - * Whether this tree node is mappable.
131.81 - * A tree node that is not mappable cannot be linked to or from.
131.82 - */
131.83 - public abstract boolean isMappable();
131.84 -
131.85 - /**
131.86 - * The current highlight color, i.e. from a search.
131.87 - */
131.88 - public Color getHighlightColor(){
131.89 - return new Color(0);
131.90 - }
131.91 -
131.92 - /**
131.93 - * This Icon can be used to represent the node in a tree view.
131.94 - */
131.95 - public Image getIcon() {
131.96 - return null;
131.97 - }
131.98 -
131.99 - public String getName() {
131.100 - return toString();
131.101 - }
131.102 -
131.103 - public IMapperNode getMapperNode(){
131.104 - if (super.getMapperNode() == null) {
131.105 - super.setMapperNode(getMapper().getMapperNode(this));
131.106 - }
131.107 - return super.getMapperNode();
131.108 - }
131.109 -
131.110 - public static TreePath getTreePath(TreeNode node){
131.111 - if (node.getParent() != null){
131.112 - return getTreePath(node.getParent()).pathByAddingChild(node);
131.113 - }
131.114 - return new TreePath(node);
131.115 - }
131.116 -
131.117 - public IMapperNode getOutputNode() {
131.118 - return this.getMapperNode();
131.119 - }
131.120 -
131.121 - public IMapperNode getInputNode(Node node) {
131.122 - return this.getMapperNode();
131.123 - }
131.124 -
131.125 - public ActionDescriptor<ActionType>[] getActionDescriptorArr() {
131.126 - return null;
131.127 - }
131.128 -
131.129 - public boolean isSourceViewNode() {
131.130 - return ((IMapperTreeNode)getMapperNode()).isSourceTreeNode();
131.131 - }
131.132 -}
132.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/nodes/actions/ActionConst.java Wed Feb 21 08:53:38 2007 +0000
132.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
132.3 @@ -1,30 +0,0 @@
132.4 -/*
132.5 - * The contents of this file are subject to the terms of the Common Development
132.6 - * and Distribution License (the License). You may not use this file except in
132.7 - * compliance with the License.
132.8 - *
132.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
132.10 - * or http://www.netbeans.org/cddl.txt.
132.11 -
132.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
132.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
132.14 - * If applicable, add the following below the CDDL Header, with the fields
132.15 - * enclosed by brackets [] replaced by your own identifying information:
132.16 - * "Portions Copyrighted [year] [name of copyright owner]"
132.17 - *
132.18 - * The Original Software is NetBeans. The Initial Developer of the Original
132.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
132.20 - * Microsystems, Inc. All Rights Reserved.
132.21 - */
132.22 -
132.23 -package org.netbeans.modules.xslt.mapper.model.nodes.actions;
132.24 -
132.25 -/**
132.26 - *
132.27 - * @author nk160297
132.28 - */
132.29 -public interface ActionConst {
132.30 - String ADD_MENU = "ADD_MENU"; // NOI18N
132.31 - String ADD_RULE = "ADD_RULE"; // NOI18N
132.32 - String ADD_SCHEMA = "ADD_SCHEMA"; // NOI18N
132.33 -}
133.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/nodes/actions/ActionGroupConstructor.java Wed Feb 21 08:53:38 2007 +0000
133.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
133.3 @@ -1,33 +0,0 @@
133.4 -/*
133.5 - * The contents of this file are subject to the terms of the Common Development
133.6 - * and Distribution License (the License). You may not use this file except in
133.7 - * compliance with the License.
133.8 - *
133.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
133.10 - * or http://www.netbeans.org/cddl.txt.
133.11 -
133.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
133.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
133.14 - * If applicable, add the following below the CDDL Header, with the fields
133.15 - * enclosed by brackets [] replaced by your own identifying information:
133.16 - * "Portions Copyrighted [year] [name of copyright owner]"
133.17 - *
133.18 - * The Original Software is NetBeans. The Initial Developer of the Original
133.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
133.20 - * Microsystems, Inc. All Rights Reserved.
133.21 - */
133.22 -
133.23 -package org.netbeans.modules.xslt.mapper.model.nodes.actions;
133.24 -
133.25 -import javax.swing.Action;
133.26 -
133.27 -/**
133.28 - * Instances of the interface are intended to construct a group of actions.
133.29 - *
133.30 - * @author nk160297
133.31 - */
133.32 -public interface ActionGroupConstructor {
133.33 -
133.34 - Action[] getActions();
133.35 -
133.36 -}
134.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/nodes/actions/AddNestedAxiAttribute.java Wed Feb 21 08:53:38 2007 +0000
134.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
134.3 @@ -1,62 +0,0 @@
134.4 -/*
134.5 - * The contents of this file are subject to the terms of the Common Development
134.6 - * and Distribution License (the License). You may not use this file except in
134.7 - * compliance with the License.
134.8 - *
134.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
134.10 - * or http://www.netbeans.org/cddl.txt.
134.11 -
134.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
134.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
134.14 - * If applicable, add the following below the CDDL Header, with the fields
134.15 - * enclosed by brackets [] replaced by your own identifying information:
134.16 - * "Portions Copyrighted [year] [name of copyright owner]"
134.17 - *
134.18 - * The Original Software is NetBeans. The Initial Developer of the Original
134.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
134.20 - * Microsystems, Inc. All Rights Reserved.
134.21 - */
134.22 -
134.23 -package org.netbeans.modules.xslt.mapper.model.nodes.actions;
134.24 -
134.25 -import java.awt.event.ActionEvent;
134.26 -import javax.swing.AbstractAction;
134.27 -import javax.swing.Action;
134.28 -import javax.swing.Icon;
134.29 -import javax.swing.ImageIcon;
134.30 -import org.netbeans.modules.soa.ui.axinodes.NodeType;
134.31 -import org.netbeans.modules.xml.axi.Attribute;
134.32 -import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
134.33 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
134.34 -
134.35 -/**
134.36 - *
134.37 - * @author nk160297
134.38 - */
134.39 -public class AddNestedAxiAttribute extends AbstractAction {
134.40 -
134.41 - private static final long serialVersionUID = 1L;
134.42 -
134.43 - protected XsltMapper myXsltMapper;
134.44 - protected TreeNode myTreeNode;
134.45 - protected Attribute myAttribute;
134.46 -
134.47 - public AddNestedAxiAttribute(XsltMapper xsltMapper, TreeNode node,
134.48 - Attribute attribute) {
134.49 - super();
134.50 - //
134.51 - myXsltMapper = xsltMapper;
134.52 - myTreeNode = node;
134.53 - myAttribute = attribute;
134.54 - //
134.55 - putValue(Action.NAME, myAttribute.getName());
134.56 - Icon icon = new ImageIcon(NodeType.ATTRIBUTE.getImage());
134.57 - putValue(Action.SMALL_ICON, icon);
134.58 - }
134.59 -
134.60 - public void actionPerformed(ActionEvent e) {
134.61 - // TODO delete
134.62 - System.out.println("AddNestedAxiAttribute");
134.63 - }
134.64 -
134.65 -}
135.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/nodes/actions/AddNestedAxiElement.java Wed Feb 21 08:53:38 2007 +0000
135.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
135.3 @@ -1,62 +0,0 @@
135.4 -/*
135.5 - * The contents of this file are subject to the terms of the Common Development
135.6 - * and Distribution License (the License). You may not use this file except in
135.7 - * compliance with the License.
135.8 - *
135.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
135.10 - * or http://www.netbeans.org/cddl.txt.
135.11 -
135.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
135.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
135.14 - * If applicable, add the following below the CDDL Header, with the fields
135.15 - * enclosed by brackets [] replaced by your own identifying information:
135.16 - * "Portions Copyrighted [year] [name of copyright owner]"
135.17 - *
135.18 - * The Original Software is NetBeans. The Initial Developer of the Original
135.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
135.20 - * Microsystems, Inc. All Rights Reserved.
135.21 - */
135.22 -
135.23 -package org.netbeans.modules.xslt.mapper.model.nodes.actions;
135.24 -
135.25 -import java.awt.event.ActionEvent;
135.26 -import javax.swing.AbstractAction;
135.27 -import javax.swing.Action;
135.28 -import javax.swing.Icon;
135.29 -import javax.swing.ImageIcon;
135.30 -import org.netbeans.modules.soa.ui.axinodes.NodeType;
135.31 -import org.netbeans.modules.xml.axi.Element;
135.32 -import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
135.33 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
135.34 -
135.35 -/**
135.36 - *
135.37 - * @author nk160297
135.38 - */
135.39 -public class AddNestedAxiElement extends AbstractAction {
135.40 -
135.41 - private static final long serialVersionUID = 1L;
135.42 -
135.43 - protected XsltMapper myXsltMapper;
135.44 - protected TreeNode myTreeNode;
135.45 - protected Element myElement;
135.46 -
135.47 - public AddNestedAxiElement(XsltMapper xsltMapper, TreeNode node,
135.48 - Element element) {
135.49 - super();
135.50 - //
135.51 - myXsltMapper = xsltMapper;
135.52 - myTreeNode = node;
135.53 - myElement = element;
135.54 - //
135.55 - putValue(Action.NAME, myElement.getName());
135.56 - Icon icon = new ImageIcon(NodeType.ELEMENT.getImage());
135.57 - putValue(Action.SMALL_ICON, icon);
135.58 - }
135.59 -
135.60 - public void actionPerformed(ActionEvent e) {
135.61 - // TODO delete
135.62 - System.out.println("AddNestedAxiElement");
135.63 - }
135.64 -
135.65 -}
136.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/nodes/actions/AddNestedAxiGroup.java Wed Feb 21 08:53:38 2007 +0000
136.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
136.3 @@ -1,79 +0,0 @@
136.4 -/*
136.5 - * The contents of this file are subject to the terms of the Common Development
136.6 - * and Distribution License (the License). You may not use this file except in
136.7 - * compliance with the License.
136.8 - *
136.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
136.10 - * or http://www.netbeans.org/cddl.txt.
136.11 -
136.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
136.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
136.14 - * If applicable, add the following below the CDDL Header, with the fields
136.15 - * enclosed by brackets [] replaced by your own identifying information:
136.16 - * "Portions Copyrighted [year] [name of copyright owner]"
136.17 - *
136.18 - * The Original Software is NetBeans. The Initial Developer of the Original
136.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
136.20 - * Microsystems, Inc. All Rights Reserved.
136.21 - */
136.22 -
136.23 -package org.netbeans.modules.xslt.mapper.model.nodes.actions;
136.24 -
136.25 -import java.util.ArrayList;
136.26 -import java.util.List;
136.27 -import javax.swing.Action;
136.28 -import org.netbeans.modules.xml.axi.AXIComponent;
136.29 -import org.netbeans.modules.xml.axi.AbstractAttribute;
136.30 -import org.netbeans.modules.xml.axi.AbstractElement;
136.31 -import org.netbeans.modules.xml.axi.Attribute;
136.32 -import org.netbeans.modules.xml.axi.Element;
136.33 -import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
136.34 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
136.35 -
136.36 -/**
136.37 - *
136.38 - * @author nk160297
136.39 - */
136.40 -public class AddNestedAxiGroup implements ActionGroupConstructor {
136.41 -
136.42 - protected XsltMapper myXsltMapper;
136.43 - protected TreeNode myTreeNode;
136.44 -
136.45 - public AddNestedAxiGroup(XsltMapper xsltMapper, TreeNode node) {
136.46 - myXsltMapper = xsltMapper;
136.47 - myTreeNode = node;
136.48 - }
136.49 -
136.50 - public Action[] getActions() {
136.51 - AXIComponent type = myTreeNode.getType();
136.52 - if (type == null || !(type instanceof Element)) {
136.53 - return null;
136.54 - }
136.55 - //
136.56 - List<Action> actions = new ArrayList<Action>();
136.57 - Element parentElement = (Element)type;
136.58 - //
136.59 - List<AbstractAttribute> attributes = parentElement.getAttributes();
136.60 - for (AbstractAttribute attribute : attributes) {
136.61 - if (attribute instanceof Attribute) {
136.62 - Action newAction = new AddNestedAxiAttribute(
136.63 - myXsltMapper, myTreeNode, (Attribute)attribute);
136.64 - actions.add(newAction);
136.65 - }
136.66 - }
136.67 - //
136.68 - List<AbstractElement> elements = parentElement.getChildElements();
136.69 - for (AbstractElement element : elements) {
136.70 - if (element instanceof Element) {
136.71 - Action newAction = new AddNestedAxiElement(
136.72 - myXsltMapper, myTreeNode, (Element)element);
136.73 - actions.add(newAction);
136.74 - }
136.75 - }
136.76 - //
136.77 - Action[] result = actions.toArray(new Action[actions.size()]);
136.78 - //
136.79 - return result;
136.80 - }
136.81 -
136.82 -}
137.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/nodes/actions/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
137.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
137.3 @@ -1,4 +0,0 @@
137.4 -REMOVE=Delete
137.5 -ADD_MENU=Add...
137.6 -ADD_RULE=Rule...
137.7 -ADD_SCHEMA=Schema Component...
137.8 \ No newline at end of file
138.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/nodes/actions/DeleteAction.java Wed Feb 21 08:53:38 2007 +0000
138.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
138.3 @@ -1,52 +0,0 @@
138.4 -/*
138.5 - * The contents of this file are subject to the terms of the Common Development
138.6 - * and Distribution License (the License). You may not use this file except in
138.7 - * compliance with the License.
138.8 - *
138.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
138.10 - * or http://www.netbeans.org/cddl.txt.
138.11 -
138.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
138.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
138.14 - * If applicable, add the following below the CDDL Header, with the fields
138.15 - * enclosed by brackets [] replaced by your own identifying information:
138.16 - * "Portions Copyrighted [year] [name of copyright owner]"
138.17 - *
138.18 - * The Original Software is NetBeans. The Initial Developer of the Original
138.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
138.20 - * Microsystems, Inc. All Rights Reserved.
138.21 - */
138.22 -
138.23 -package org.netbeans.modules.xslt.mapper.model.nodes.actions;
138.24 -
138.25 -import java.awt.event.ActionEvent;
138.26 -import javax.swing.KeyStroke;
138.27 -import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
138.28 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
138.29 -import org.openide.nodes.Node;
138.30 -import org.openide.util.NbBundle;
138.31 -
138.32 -/**
138.33 - *
138.34 - * @author nk160297
138.35 - */
138.36 -public class DeleteAction extends XsltNodeAction {
138.37 -
138.38 - private static final long serialVersionUID = 1L;
138.39 - private static final String DELETE_KEYSTROKE = "DELETE"; // NOI18N
138.40 -
138.41 - public DeleteAction(XsltMapper xsltMapper, TreeNode node) {
138.42 - super(xsltMapper, node);
138.43 - putValue(DeleteAction.ACCELERATOR_KEY, KeyStroke.getKeyStroke(DELETE_KEYSTROKE));
138.44 - }
138.45 -
138.46 - public ActionType getType() {
138.47 - return ActionType.REMOVE;
138.48 - }
138.49 -
138.50 - public void actionPerformed(ActionEvent e) {
138.51 - // TODO delete
138.52 - System.out.println("DeleteAction");
138.53 - }
138.54 -
138.55 -}
139.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/nodes/actions/XsltNodeAction.java Wed Feb 21 08:53:38 2007 +0000
139.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
139.3 @@ -1,51 +0,0 @@
139.4 -/*
139.5 - * The contents of this file are subject to the terms of the Common Development
139.6 - * and Distribution License (the License). You may not use this file except in
139.7 - * compliance with the License.
139.8 - *
139.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
139.10 - * or http://www.netbeans.org/cddl.txt.
139.11 -
139.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
139.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
139.14 - * If applicable, add the following below the CDDL Header, with the fields
139.15 - * enclosed by brackets [] replaced by your own identifying information:
139.16 - * "Portions Copyrighted [year] [name of copyright owner]"
139.17 - *
139.18 - * The Original Software is NetBeans. The Initial Developer of the Original
139.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
139.20 - * Microsystems, Inc. All Rights Reserved.
139.21 - */
139.22 -
139.23 -package org.netbeans.modules.xslt.mapper.model.nodes.actions;
139.24 -
139.25 -import javax.swing.AbstractAction;
139.26 -import javax.swing.Action;
139.27 -import javax.swing.Icon;
139.28 -import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
139.29 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
139.30 -
139.31 -/**
139.32 - *
139.33 - * @author nk160297
139.34 - */
139.35 -public abstract class XsltNodeAction extends AbstractAction {
139.36 -
139.37 - protected XsltMapper myXsltMapper;
139.38 - protected TreeNode myTreeNode;
139.39 -
139.40 - public XsltNodeAction(XsltMapper xsltMapper, TreeNode node) {
139.41 - super();
139.42 - myXsltMapper = xsltMapper;
139.43 - myTreeNode = node;
139.44 - //
139.45 - putValue(Action.NAME, getType().getDisplayName());
139.46 - putValue(Action.SMALL_ICON, getIcon());
139.47 - }
139.48 -
139.49 - protected abstract ActionType getType();
139.50 -
139.51 - protected Icon getIcon() {
139.52 - return null;
139.53 - }
139.54 -}
140.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/nodes/visitor/AbstractNodeVisitor.java Wed Feb 21 08:53:38 2007 +0000
140.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
140.3 @@ -1,82 +0,0 @@
140.4 -/*
140.5 - * The contents of this file are subject to the terms of the Common Development
140.6 - * and Distribution License (the License). You may not use this file except in
140.7 - * compliance with the License.
140.8 - *
140.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
140.10 - * or http://www.netbeans.org/cddl.txt.
140.11 -
140.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
140.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
140.14 - * If applicable, add the following below the CDDL Header, with the fields
140.15 - * enclosed by brackets [] replaced by your own identifying information:
140.16 - * "Portions Copyrighted [year] [name of copyright owner]"
140.17 - *
140.18 - * The Original Software is NetBeans. The Initial Developer of the Original
140.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
140.20 - * Microsystems, Inc. All Rights Reserved.
140.21 - */
140.22 -
140.23 -package org.netbeans.modules.xslt.mapper.model.nodes.visitor;
140.24 -
140.25 -import org.netbeans.modules.xslt.mapper.model.nodes.Node;
140.26 -import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
140.27 -import org.netbeans.modules.xslt.mapper.model.targettree.AttributeDeclarationNode;
140.28 -import org.netbeans.modules.xslt.mapper.model.targettree.ElementDeclarationNode;
140.29 -import org.netbeans.modules.xslt.mapper.model.targettree.RuleNode;
140.30 -import org.netbeans.modules.xslt.mapper.model.targettree.SchemaNode;
140.31 -
140.32 -
140.33 -/**
140.34 - *
140.35 - * @author radval
140.36 - *
140.37 - */
140.38 -public abstract class AbstractNodeVisitor implements NodeVisitor {
140.39 -
140.40 - public void visitNode(Node node){
140.41 - };
140.42 -
140.43 -
140.44 - public void visit(SchemaNode node) {
140.45 - visitNode(node);
140.46 - }
140.47 -
140.48 - public void visit(ElementDeclarationNode node){
140.49 - visitNode(node);
140.50 - }
140.51 -
140.52 - public void visit(AttributeDeclarationNode node){
140.53 - visitNode(node);
140.54 - }
140.55 -
140.56 - public void visit(RuleNode node){
140.57 - visitNode(node);
140.58 - }
140.59 -
140.60 -
140.61 -
140.62 - public void acceptUpstream(Node node){
140.63 - for (Node n: node.getPreviousNodes()){
140.64 - n.accept(this);
140.65 - }
140.66 - }
140.67 - public void acceptDowntream(Node node){
140.68 - for (Node n: node.getNextNodes()){
140.69 - n.accept(this);
140.70 - }
140.71 - }
140.72 - public void acceptDownTree(TreeNode node){
140.73 - TreeNode parent = node.getParent();
140.74 - if (parent != null){
140.75 - parent.accept(this);
140.76 - }
140.77 - }
140.78 - public void acceptUpTree(TreeNode node){
140.79 - for (TreeNode child: node.getChildren()){
140.80 - child.accept(this);
140.81 - }
140.82 - }
140.83 -
140.84 -
140.85 -}
141.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/nodes/visitor/NodeVisitor.java Wed Feb 21 08:53:38 2007 +0000
141.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
141.3 @@ -1,47 +0,0 @@
141.4 -/*
141.5 - * The contents of this file are subject to the terms of the Common Development
141.6 - * and Distribution License (the License). You may not use this file except in
141.7 - * compliance with the License.
141.8 - *
141.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
141.10 - * or http://www.netbeans.org/cddl.txt.
141.11 -
141.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
141.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
141.14 - * If applicable, add the following below the CDDL Header, with the fields
141.15 - * enclosed by brackets [] replaced by your own identifying information:
141.16 - * "Portions Copyrighted [year] [name of copyright owner]"
141.17 - *
141.18 - * The Original Software is NetBeans. The Initial Developer of the Original
141.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
141.20 - * Microsystems, Inc. All Rights Reserved.
141.21 - */
141.22 -
141.23 -package org.netbeans.modules.xslt.mapper.model.nodes.visitor;
141.24 -
141.25 -
141.26 -
141.27 -import org.netbeans.modules.xslt.mapper.model.nodes.CanvasNode;
141.28 -import org.netbeans.modules.xslt.mapper.model.targettree.AttributeDeclarationNode;
141.29 -import org.netbeans.modules.xslt.mapper.model.targettree.ElementDeclarationNode;
141.30 -import org.netbeans.modules.xslt.mapper.model.targettree.RuleNode;
141.31 -import org.netbeans.modules.xslt.mapper.model.targettree.SchemaNode;
141.32 -
141.33 -/**
141.34 - *
141.35 - * @author radval
141.36 - *
141.37 - */
141.38 -public interface NodeVisitor {
141.39 -
141.40 - void visit(SchemaNode node);
141.41 -
141.42 - void visit(RuleNode node);
141.43 -
141.44 - void visit(AttributeDeclarationNode node);
141.45 -
141.46 - void visit(ElementDeclarationNode node);
141.47 -
141.48 - void visit(CanvasNode node);
141.49 -
141.50 -}
142.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/targettree/AXIUtils.java Wed Feb 21 08:53:38 2007 +0000
142.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
142.3 @@ -1,96 +0,0 @@
142.4 -/*
142.5 - * AXIUtils.java
142.6 - *
142.7 - * Created on 16 ßíâàðü 2007 ã., 15:33
142.8 - *
142.9 - * To change this template, choose Tools | Template Manager
142.10 - * and open the template in the editor.
142.11 - */
142.12 -
142.13 -package org.netbeans.modules.xslt.mapper.model.targettree;
142.14 -
142.15 -import org.netbeans.modules.xml.axi.AXIComponent;
142.16 -import org.netbeans.modules.xml.axi.AXIType;
142.17 -import org.netbeans.modules.xml.axi.AbstractAttribute;
142.18 -import org.netbeans.modules.xml.axi.AbstractElement;
142.19 -import org.netbeans.modules.xml.axi.Attribute;
142.20 -import org.netbeans.modules.xml.axi.Element;
142.21 -import org.netbeans.modules.xslt.model.LiteralResultElement;
142.22 -import org.netbeans.modules.xslt.model.XslComponent;
142.23 -import org.netbeans.modules.xslt.model.XslVisitorAdapter;
142.24 -
142.25 -/**
142.26 - *
142.27 - * @author Alexey
142.28 - */
142.29 -public class AXIUtils {
142.30 -
142.31 - /**
142.32 - * Checks if XSL component this node represents creates an element in output tree of given schema type
142.33 - * @returns true if types are the same
142.34 - **/
142.35 - public static boolean isSameSchemaType(XslComponent xslc, AXIComponent axic){
142.36 - TypeCheckVisitor visitor = new TypeCheckVisitor(axic);
142.37 - xslc.accept(visitor);
142.38 - return visitor.isMatching();
142.39 - }
142.40 -
142.41 - public static class TypeCheckVisitor extends XslVisitorAdapter{
142.42 - private AXIComponent axic;
142.43 - private boolean isMatching = false;
142.44 - public TypeCheckVisitor(AXIComponent axic){
142.45 - this.axic = axic;
142.46 - }
142.47 - public boolean isMatching(){
142.48 - return isMatching;
142.49 - }
142.50 -
142.51 - public void visit(org.netbeans.modules.xslt.model.Attribute attribute) {
142.52 - if (axic instanceof org.netbeans.modules.xml.axi.Attribute){
142.53 - isMatching = compareName(attribute.getName().toString());
142.54 - }
142.55 - }
142.56 -
142.57 - public void visit(org.netbeans.modules.xslt.model.Element element) {
142.58 - if (axic instanceof org.netbeans.modules.xml.axi.Element){
142.59 - isMatching = compareName(element.getName().toString());
142.60 - }
142.61 - }
142.62 -
142.63 -
142.64 - public void visit(org.netbeans.modules.xslt.model.LiteralResultElement element) {
142.65 - if (axic instanceof org.netbeans.modules.xml.axi.Element){
142.66 - isMatching = compareName(element.getQName().toString());
142.67 - }
142.68 - }
142.69 - private boolean compareName(String name){
142.70 - return name.equals(((AXIType) axic).getName());
142.71 - }
142.72 - }
142.73 - /**
142.74 - * Call visitor for all children of type Attribute and Element
142.75 - **/
142.76 -
142.77 -
142.78 - public static abstract class ElementVisitor {
142.79 - public abstract void visit(AXIComponent component);
142.80 - public void visitSubelements(Element element){
142.81 - for (AbstractAttribute a : element.getAttributes()){
142.82 - if (a instanceof Attribute){
142.83 - visit(a);
142.84 - }
142.85 - }
142.86 -
142.87 - for (AbstractElement e : element.getChildElements()){
142.88 - if (e instanceof Element){
142.89 - visit(e);
142.90 - }
142.91 - }
142.92 -
142.93 -
142.94 -
142.95 - }
142.96 -
142.97 - }
142.98 -
142.99 -}
143.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/targettree/AttributeDeclarationNode.java Wed Feb 21 08:53:38 2007 +0000
143.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
143.3 @@ -1,111 +0,0 @@
143.4 -/*
143.5 - * AttributeDeclarationNode.java
143.6 - *
143.7 - * Created on 11 ßíâàðü 2007 ã., 14:19
143.8 - *
143.9 - * To change this template, choose Tools | Template Manager
143.10 - * and open the template in the editor.
143.11 - */
143.12 -
143.13 -package org.netbeans.modules.xslt.mapper.model.targettree;
143.14 -
143.15 -import java.awt.ComponentOrientation;
143.16 -import java.awt.Image;
143.17 -import java.util.ArrayList;
143.18 -import java.util.List;
143.19 -import org.netbeans.modules.soa.ui.SoaUiUtil;
143.20 -import org.netbeans.modules.soa.ui.axinodes.AxiomUtils;
143.21 -import org.netbeans.modules.soa.ui.axinodes.NodeType;
143.22 -import org.netbeans.modules.xml.axi.AXIComponent;
143.23 -import org.netbeans.modules.xml.axi.Element;
143.24 -import org.netbeans.modules.xslt.mapper.model.nodes.NodeFactory;
143.25 -import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
143.26 -import org.netbeans.modules.xslt.mapper.model.nodes.actions.ActionDescriptor;
143.27 -import org.netbeans.modules.xslt.mapper.model.nodes.actions.ActionDescriptor.LeafActionDescriptor;
143.28 -import org.netbeans.modules.xslt.mapper.model.nodes.actions.ActionType;
143.29 -import org.netbeans.modules.xslt.mapper.model.nodes.visitor.NodeVisitor;
143.30 -import org.netbeans.modules.xslt.mapper.view.GetExpressionVisitor;
143.31 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
143.32 -import org.netbeans.modules.xslt.model.Attribute;
143.33 -import org.netbeans.modules.xslt.model.XslComponent;
143.34 -
143.35 -/**
143.36 - *
143.37 - * @author Alexey
143.38 - */
143.39 -public class AttributeDeclarationNode extends DeclarationNode {
143.40 -
143.41 - /** Creates a new instance of AttributeDeclarationNode */
143.42 - public AttributeDeclarationNode(XslComponent component, XsltMapper mapper) {
143.43 - super(component, mapper);
143.44 - }
143.45 - /**
143.46 - * attribute element has no children
143.47 - * @returns empty list
143.48 - **/
143.49 - protected List<TreeNode> loadChildren() {
143.50 - Attribute myself = (Attribute) getDataObject();
143.51 -
143.52 - if (GetExpressionVisitor.isValueOfContainer(myself) != null) {
143.53 - //do not show child elements, if value-of element
143.54 - //is the the only eleemnt inside this container
143.55 - return new ArrayList<TreeNode>();
143.56 - }
143.57 -
143.58 - List<XslComponent> children = myself.getChildren();
143.59 - final List<TreeNode> result = new ArrayList<TreeNode>(children.size());
143.60 -
143.61 -
143.62 - for(XslComponent c: children){
143.63 - TreeNode newNode = (TreeNode) NodeFactory.createNode(c, getMapper());
143.64 -
143.65 - if (newNode != null){
143.66 - newNode.setParent(this);
143.67 - result.add(newNode);
143.68 - }
143.69 - }
143.70 - return result;
143.71 -
143.72 -
143.73 - }
143.74 - public AXIComponent getType() {
143.75 - Element parent_type = (Element) getParent().getType();
143.76 -
143.77 - if (parent_type != null){
143.78 - Attribute attr = (Attribute) getComponent();
143.79 - for (org.netbeans.modules.xml.axi.AbstractAttribute a: parent_type.getAttributes()){
143.80 - if (a.getName().equals(attr.getName())){
143.81 - return a;
143.82 - }
143.83 - }
143.84 - }
143.85 - return null;
143.86 - }
143.87 - public Image getIcon() {
143.88 -
143.89 - return NodeType.ATTRIBUTE.getImage();
143.90 - }
143.91 - public void accept(NodeVisitor visitor) {
143.92 - visitor.visit(this);
143.93 - }
143.94 -
143.95 - public String getName(){
143.96 - AXIComponent axiComponent = getType();
143.97 - if (axiComponent instanceof org.netbeans.modules.xml.axi.Attribute) {
143.98 - return AxiomUtils.getAttributeHtmlDisplayName(
143.99 - (org.netbeans.modules.xml.axi.Attribute) axiComponent,
143.100 - ComponentOrientation.RIGHT_TO_LEFT);
143.101 - } else {
143.102 - return SoaUiUtil.getFormattedHtmlString(true,
143.103 - new SoaUiUtil.TextChunk(toString(), SoaUiUtil.MISTAKE_RED));
143.104 - }
143.105 - }
143.106 -
143.107 - public ActionDescriptor<ActionType>[] getActionDescriptorArr() {
143.108 - ActionDescriptor<ActionType>[] retValue = new ActionDescriptor[] {
143.109 - new LeafActionDescriptor(ActionType.REMOVE)
143.110 - };
143.111 - return retValue;
143.112 - }
143.113 -
143.114 -}
144.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/targettree/DeclarationNode.java Wed Feb 21 08:53:38 2007 +0000
144.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
144.3 @@ -1,37 +0,0 @@
144.4 -/*
144.5 - * DeclarationNode.java
144.6 - *
144.7 - * Created on 22 Äåêàáðü 2006 ã., 13:57
144.8 - *
144.9 - * To change this template, choose Tools | Template Manager
144.10 - * and open the template in the editor.
144.11 - */
144.12 -
144.13 -package org.netbeans.modules.xslt.mapper.model.targettree;
144.14 -
144.15 -import org.netbeans.modules.xml.axi.AXIComponent;
144.16 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
144.17 -
144.18 -import org.netbeans.modules.xslt.model.Attribute;
144.19 -import org.netbeans.modules.xslt.model.Element;
144.20 -import org.netbeans.modules.xslt.model.XslComponent;
144.21 -
144.22 -/**
144.23 - *
144.24 - * @author Alexey
144.25 - */
144.26 -public abstract class DeclarationNode extends StylesheetNode {
144.27 -
144.28 - /** Creates a new instance of DeclarationNode */
144.29 - public DeclarationNode(XslComponent component, XsltMapper mapper) {
144.30 - super(component, mapper);
144.31 - }
144.32 -
144.33 -
144.34 - public boolean isMappable() {
144.35 - return true;
144.36 - }
144.37 -
144.38 -
144.39 -
144.40 -}
145.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/targettree/ElementDeclarationNode.java Wed Feb 21 08:53:38 2007 +0000
145.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
145.3 @@ -1,165 +0,0 @@
145.4 -/*
145.5 - * ElementDeclarationNodes.java
145.6 - *
145.7 - * Created on 11 ßíâàðü 2007 ã., 14:27
145.8 - *
145.9 - * To change this template, choose Tools | Template Manager
145.10 - * and open the template in the editor.
145.11 - */
145.12 -
145.13 -package org.netbeans.modules.xslt.mapper.model.targettree;
145.14 -
145.15 -import java.awt.ComponentOrientation;
145.16 -import java.awt.Image;
145.17 -import java.util.ArrayList;
145.18 -import java.util.Collection;
145.19 -import java.util.List;
145.20 -import org.netbeans.modules.soa.ui.SoaUiUtil;
145.21 -import org.netbeans.modules.soa.ui.axinodes.AxiomUtils;
145.22 -import org.netbeans.modules.soa.ui.axinodes.NodeType;
145.23 -import org.netbeans.modules.xml.axi.AXIComponent;
145.24 -import org.netbeans.modules.xslt.mapper.model.nodes.NodeFactory;
145.25 -import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
145.26 -import org.netbeans.modules.xslt.mapper.model.nodes.actions.ActionConst;
145.27 -import org.netbeans.modules.xslt.mapper.model.nodes.actions.ActionDescriptor;
145.28 -import org.netbeans.modules.xslt.mapper.model.nodes.actions.ActionDescriptor.LeafActionDescriptor;
145.29 -import org.netbeans.modules.xslt.mapper.model.nodes.actions.ActionDescriptor.SubMenuDescriptor;
145.30 -import org.netbeans.modules.xslt.mapper.model.nodes.actions.ActionType;
145.31 -import org.netbeans.modules.xslt.mapper.model.nodes.visitor.NodeVisitor;
145.32 -import org.netbeans.modules.xslt.mapper.view.GetExpressionVisitor;
145.33 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
145.34 -import org.netbeans.modules.xslt.model.Element;
145.35 -import org.netbeans.modules.xslt.model.LiteralResultElement;
145.36 -import org.netbeans.modules.xslt.model.XslComponent;
145.37 -
145.38 -/**
145.39 - *
145.40 - * @author Alexey
145.41 - */
145.42 -public class ElementDeclarationNode extends DeclarationNode{
145.43 -
145.44 -
145.45 - public ElementDeclarationNode(XslComponent component, XsltMapper mapper) {
145.46 - super(component, mapper);
145.47 - }
145.48 - protected List<TreeNode> loadChildren() {
145.49 - XslComponent myself = (XslComponent) getDataObject();
145.50 -
145.51 -
145.52 -
145.53 -
145.54 - if (GetExpressionVisitor.isValueOfContainer(myself) != null) {
145.55 - //do not show child elements, if value-of element
145.56 - //is the the only eleemnt inside this container
145.57 - return new ArrayList<TreeNode>();
145.58 - }
145.59 -
145.60 - List<XslComponent> children = myself.getChildren();
145.61 -
145.62 - final List<TreeNode> result = new ArrayList<TreeNode>(children.size());
145.63 -
145.64 -
145.65 - final Collection<AXIComponent> declaredTypes
145.66 - = new ArrayList<AXIComponent>(children.size());
145.67 -
145.68 - for(XslComponent c: children){
145.69 - TreeNode newNode = (TreeNode) NodeFactory.createNode(c, getMapper());
145.70 -
145.71 - if (newNode != null){
145.72 - newNode.setParent(this);
145.73 - result.add(newNode);
145.74 - declaredTypes.add(newNode.getType());
145.75 - }
145.76 - }
145.77 -
145.78 - AXIComponent axic = getType();
145.79 -
145.80 - if (axic != null) {
145.81 - new AXIUtils.ElementVisitor(){
145.82 - public void visit(AXIComponent c){
145.83 - if (!declaredTypes.contains(c)){
145.84 - TreeNode newNode = (TreeNode) NodeFactory.createNode(c, getMapper());
145.85 - if (newNode != null){
145.86 - newNode.setParent(ElementDeclarationNode.this);
145.87 - result.add(newNode);
145.88 - }
145.89 -
145.90 - }
145.91 - }
145.92 - }.visitSubelements((org.netbeans.modules.xml.axi.Element) axic);
145.93 -
145.94 -
145.95 - }
145.96 - return result;
145.97 - }
145.98 -
145.99 - public AXIComponent getType() {
145.100 - AXIComponent parent_type = getParent().getType();
145.101 - XslComponent component = getComponent();
145.102 -
145.103 - if (parent_type == null){ //no declaration nodes fond downtree
145.104 - AXIComponent axi_root =
145.105 - getMapper().getContext().getTargetType();
145.106 - if( axi_root == null){
145.107 - return null;
145.108 - }
145.109 -
145.110 - if (AXIUtils.isSameSchemaType(component, axi_root)) {
145.111 - return axi_root;
145.112 - }
145.113 -
145.114 - } else {
145.115 -
145.116 - for (AXIComponent c: parent_type.getChildElements()){
145.117 - if (AXIUtils.isSameSchemaType(component, c)){
145.118 - return c;
145.119 - }
145.120 - }
145.121 - }
145.122 - return null;
145.123 - }
145.124 -
145.125 - public void accept(NodeVisitor visitor) {
145.126 - visitor.visit(this);
145.127 - }
145.128 - public String toString(){
145.129 - XslComponent comp = getComponent();
145.130 - if (comp instanceof Element) {
145.131 - return ((Element) comp).getName().toString();
145.132 - } else if (comp instanceof LiteralResultElement) {
145.133 - return ((LiteralResultElement) comp).getQName().toString();
145.134 - }
145.135 - return comp.toString();
145.136 - }
145.137 -
145.138 - public Image getIcon() {
145.139 -
145.140 - return NodeType.ELEMENT.getImage();
145.141 - }
145.142 -
145.143 - public String getName() {
145.144 - AXIComponent axiComponent = getType();
145.145 - if (axiComponent instanceof org.netbeans.modules.xml.axi.Element) {
145.146 - return AxiomUtils.getElementHtmlDisplayName(
145.147 - (org.netbeans.modules.xml.axi.Element)axiComponent,
145.148 - ComponentOrientation.RIGHT_TO_LEFT);
145.149 - } else {
145.150 - return SoaUiUtil.getFormattedHtmlString(true,
145.151 - new SoaUiUtil.TextChunk(toString(), SoaUiUtil.MISTAKE_RED));
145.152 - }
145.153 - }
145.154 -
145.155 - public ActionDescriptor<ActionType>[] getActionDescriptorArr() {
145.156 - ActionDescriptor<ActionType>[] retValue = new ActionDescriptor[] {
145.157 - new LeafActionDescriptor(ActionType.REMOVE),
145.158 - new SubMenuDescriptor(ActionConst.ADD_MENU,
145.159 - new SubMenuDescriptor(ActionConst.ADD_RULE),
145.160 - new SubMenuDescriptor(ActionConst.ADD_SCHEMA,
145.161 - new LeafActionDescriptor(ActionType.ADD_NESTED_AXI_OBJECT)
145.162 - )
145.163 - )
145.164 - };
145.165 - return retValue;
145.166 - }
145.167 -
145.168 -}
146.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/targettree/RuleNode.java Wed Feb 21 08:53:38 2007 +0000
146.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
146.3 @@ -1,100 +0,0 @@
146.4 -/*
146.5 - * RuleNode.java
146.6 - *
146.7 - * Created on 22 Äåêàáðü 2006 ã., 13:58
146.8 - *
146.9 - * To change this template, choose Tools | Template Manager
146.10 - * and open the template in the editor.
146.11 - */
146.12 -
146.13 -package org.netbeans.modules.xslt.mapper.model.targettree;
146.14 -
146.15 -import java.awt.Image;
146.16 -import java.util.ArrayList;
146.17 -import java.util.List;
146.18 -import org.netbeans.modules.soa.ui.SoaUiUtil;
146.19 -import org.netbeans.modules.xml.axi.AXIComponent;
146.20 -import org.netbeans.modules.xslt.mapper.model.nodes.NodeFactory;
146.21 -import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
146.22 -import org.netbeans.modules.xslt.mapper.model.nodes.actions.ActionConst;
146.23 -import org.netbeans.modules.xslt.mapper.model.nodes.actions.ActionDescriptor;
146.24 -import org.netbeans.modules.xslt.mapper.model.nodes.actions.ActionDescriptor.LeafActionDescriptor;
146.25 -import org.netbeans.modules.xslt.mapper.model.nodes.actions.ActionDescriptor.SubMenuDescriptor;
146.26 -import org.netbeans.modules.xslt.mapper.model.nodes.actions.ActionType;
146.27 -import org.netbeans.modules.xslt.mapper.model.nodes.visitor.NodeVisitor;
146.28 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
146.29 -import org.netbeans.modules.xslt.model.XslComponent;
146.30 -
146.31 -/**
146.32 - *
146.33 - * @author Alexey
146.34 - */
146.35 -public class RuleNode extends StylesheetNode {
146.36 -
146.37 -
146.38 - public RuleNode(XslComponent component, XsltMapper mapper) {
146.39 - super(component, mapper);
146.40 - }
146.41 -
146.42 - protected List<TreeNode> loadChildren() {
146.43 - XslComponent myself = (XslComponent) getDataObject();
146.44 - List<XslComponent> children = myself.getChildren();
146.45 -
146.46 - List<TreeNode> result = new ArrayList<TreeNode>(children.size());
146.47 -
146.48 -
146.49 - for(XslComponent c: children){
146.50 - TreeNode newNode = (TreeNode) NodeFactory.createNode(c, getMapper());
146.51 -
146.52 - if (newNode != null){
146.53 - newNode.setParent(this);
146.54 - result.add(newNode);
146.55 - }
146.56 - }
146.57 -
146.58 - return result;
146.59 - }
146.60 -
146.61 - public AXIComponent getType() {
146.62 - return (getParent() != null) ? getParent().getType():null;
146.63 - }
146.64 -
146.65 - public boolean isMappable() {
146.66 - return false;
146.67 - }
146.68 -
146.69 - public void accept(NodeVisitor visitor) {
146.70 - visitor.visit(this);
146.71 - }
146.72 -
146.73 - public String toString(){
146.74 - return getComponent().getComponentType().getSimpleName();
146.75 - }
146.76 -
146.77 - public Image getIcon() {
146.78 - return super.getIcon();
146.79 - }
146.80 -
146.81 - public String getName() {
146.82 - if (getType() == null) {
146.83 - return SoaUiUtil.getFormattedHtmlString(true,
146.84 - new SoaUiUtil.TextChunk(toString(), SoaUiUtil.MISTAKE_RED));
146.85 - } else {
146.86 - return toString();
146.87 - }
146.88 - }
146.89 -
146.90 - public ActionDescriptor<ActionType>[] getActionDescriptorArr() {
146.91 - ActionDescriptor<ActionType>[] retValue = new ActionDescriptor[] {
146.92 - new LeafActionDescriptor(ActionType.REMOVE),
146.93 - new SubMenuDescriptor(ActionConst.ADD_MENU,
146.94 - new SubMenuDescriptor(ActionConst.ADD_RULE),
146.95 - new SubMenuDescriptor(ActionConst.ADD_SCHEMA,
146.96 - new LeafActionDescriptor(ActionType.ADD_NESTED_AXI_OBJECT)
146.97 - )
146.98 - )
146.99 - };
146.100 - return retValue;
146.101 - }
146.102 -
146.103 -}
147.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/targettree/SchemaNode.java Wed Feb 21 08:53:38 2007 +0000
147.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
147.3 @@ -1,140 +0,0 @@
147.4 -/*
147.5 - * PlaceholderNode.java
147.6 - *
147.7 - * Created on 22 Äåêàáðü 2006 ã., 13:57
147.8 - *
147.9 - * To change this template, choose Tools | Template Manager
147.10 - * and open the template in the editor.
147.11 - */
147.12 -
147.13 -package org.netbeans.modules.xslt.mapper.model.targettree;
147.14 -
147.15 -import java.awt.ComponentOrientation;
147.16 -import java.awt.Image;
147.17 -import java.util.ArrayList;
147.18 -import java.util.List;
147.19 -import org.netbeans.modules.soa.ui.SoaUiUtil;
147.20 -import org.netbeans.modules.soa.ui.axinodes.AxiomUtils;
147.21 -import org.netbeans.modules.soa.ui.axinodes.NodeType;
147.22 -import org.netbeans.modules.xml.axi.AXIComponent;
147.23 -import org.netbeans.modules.xml.axi.AXIType;
147.24 -import org.netbeans.modules.xml.axi.Attribute;
147.25 -import org.netbeans.modules.xml.axi.Element;
147.26 -import org.netbeans.modules.xslt.mapper.model.nodes.NodeFactory;
147.27 -import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
147.28 -import org.netbeans.modules.xslt.mapper.model.nodes.visitor.NodeVisitor;
147.29 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
147.30 -
147.31 -/**
147.32 - *
147.33 - * @author Alexey
147.34 - */
147.35 -public class SchemaNode extends TreeNode {
147.36 -
147.37 -// private transient Boolean isSourceViewNode = null;
147.38 -
147.39 - /** Creates a new instance of PlaceholderNode */
147.40 - public SchemaNode(AXIComponent component, XsltMapper mapper) {
147.41 - super(component, mapper);
147.42 - }
147.43 -
147.44 - public void accept(NodeVisitor visitor) {
147.45 - visitor.visit(this);
147.46 - }
147.47 -
147.48 - public AXIComponent getType() {
147.49 - return (AXIComponent) getDataObject();
147.50 - }
147.51 -
147.52 - public boolean isMappable() {
147.53 - return true;
147.54 - }
147.55 - public String toString(){
147.56 - String name = ((AXIType) getType()).getName();
147.57 - return ((getDataObject() instanceof Attribute) ? "[@" : "[")+ name +"]";
147.58 - }
147.59 - protected List<TreeNode> loadChildren() {
147.60 - final ArrayList<TreeNode> result = new ArrayList<TreeNode>();
147.61 -
147.62 - AXIComponent axic = (AXIComponent) getDataObject();
147.63 -
147.64 - if(axic instanceof Element){
147.65 - new AXIUtils.ElementVisitor(){
147.66 - public void visit(AXIComponent c){
147.67 - TreeNode newNode = (TreeNode) NodeFactory.createNode(c, getMapper());
147.68 - if (newNode != null){
147.69 - newNode.setParent(SchemaNode.this);
147.70 - result.add(newNode);
147.71 - }
147.72 - }
147.73 - }.visitSubelements((Element) axic);
147.74 - }
147.75 - return result;
147.76 -
147.77 - }
147.78 -
147.79 - public Image getIcon() {
147.80 - Object dataObject = getDataObject();
147.81 - if (dataObject instanceof Element) {
147.82 - return NodeType.ELEMENT.getImage();
147.83 - } else if (dataObject instanceof Attribute) {
147.84 - return NodeType.ATTRIBUTE.getImage();
147.85 - } else {
147.86 - return null;
147.87 - }
147.88 - }
147.89 -
147.90 - public String getName() {
147.91 - Object dataObject = getDataObject();
147.92 - boolean isSourceViewNode = isSourceViewNode();
147.93 - //
147.94 - if (isSourceViewNode) {
147.95 - if (dataObject instanceof Element) {
147.96 - return AxiomUtils.getElementHtmlDisplayName(
147.97 - (Element)dataObject, ComponentOrientation.LEFT_TO_RIGHT);
147.98 - } else if (dataObject instanceof Attribute) {
147.99 - return AxiomUtils.getAttributeHtmlDisplayName(
147.100 - (Attribute)dataObject, ComponentOrientation.LEFT_TO_RIGHT);
147.101 - }
147.102 - } else {
147.103 - if (dataObject instanceof Element) {
147.104 - return AxiomUtils.getElementHtmlDisplayName((Element)dataObject,
147.105 - ComponentOrientation.RIGHT_TO_LEFT,
147.106 - SoaUiUtil.INACTIVE_BLUE);
147.107 - } else if (dataObject instanceof Attribute) {
147.108 - return AxiomUtils.getAttributeHtmlDisplayName(
147.109 - (Attribute)dataObject,
147.110 - ComponentOrientation.RIGHT_TO_LEFT,
147.111 - SoaUiUtil.INACTIVE_BLUE);
147.112 - }
147.113 - }
147.114 - //
147.115 - return null;
147.116 - }
147.117 -
147.118 -// public boolean isSourceViewNode() {
147.119 -// if (isSourceViewNode == null) {
147.120 -// isSourceViewNode = calculateIsSourceViewNode() ?
147.121 -// Boolean.TRUE : Boolean.FALSE;
147.122 -// }
147.123 -// return isSourceViewNode;
147.124 -// }
147.125 -//
147.126 -// public boolean calculateIsSourceViewNode() {
147.127 -// TreeNode tempNode = this;
147.128 -// while (tempNode.getParent() != null) {
147.129 -// tempNode = tempNode.getParent();
147.130 -// }
147.131 -// //
147.132 -// if (tempNode instanceof SchemaNode) {
147.133 -// AXIComponent sourceType = getMapper().getContext().getSourceType();
147.134 -// AXIComponent rootNodeType = tempNode.getType();
147.135 -// if (rootNodeType.equals(sourceType)) {
147.136 -// return true;
147.137 -// }
147.138 -// }
147.139 -// //
147.140 -// return false;
147.141 -// }
147.142 -
147.143 -}
148.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/targettree/StylesheetNode.java Wed Feb 21 08:53:38 2007 +0000
148.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
148.3 @@ -1,35 +0,0 @@
148.4 -/*
148.5 - * StylesheetNode.java
148.6 - *
148.7 - * Created on 22 Äåêàáðü 2006 ã., 13:56
148.8 - *
148.9 - * To change this template, choose Tools | Template Manager
148.10 - * and open the template in the editor.
148.11 - */
148.12 -
148.13 -package org.netbeans.modules.xslt.mapper.model.targettree;
148.14 -
148.15 -import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
148.16 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
148.17 -import org.netbeans.modules.xslt.model.XslComponent;
148.18 -
148.19 -/**
148.20 - *
148.21 - * @author Alexey
148.22 - */
148.23 -public abstract class StylesheetNode extends TreeNode {
148.24 -
148.25 -
148.26 -
148.27 - public StylesheetNode(XslComponent component, XsltMapper mapper) {
148.28 - super(component, mapper);
148.29 - }
148.30 -
148.31 - public XslComponent getComponent(){
148.32 - return (XslComponent) super.getDataObject();
148.33 - }
148.34 -
148.35 -
148.36 -
148.37 -
148.38 -}
149.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/targettree/TargetTreeModel.java Wed Feb 21 08:53:38 2007 +0000
149.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
149.3 @@ -1,49 +0,0 @@
149.4 -/*
149.5 - * SourceTreeModel.java
149.6 - *
149.7 - * Created on 19 Äåêàáðü 2006 ã., 19:50
149.8 - *
149.9 - * To change this template, choose Tools | Template Manager
149.10 - * and open the template in the editor.
149.11 - */
149.12 -
149.13 -package org.netbeans.modules.xslt.mapper.model.targettree;
149.14 -
149.15 -import java.util.List;
149.16 -import org.netbeans.modules.xslt.mapper.model.XsltNodesTreeModel;
149.17 -
149.18 -import org.netbeans.modules.xslt.mapper.model.nodes.NodeFactory;
149.19 -import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
149.20 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
149.21 -import org.netbeans.modules.xslt.model.Stylesheet;
149.22 -import org.netbeans.modules.xslt.model.Template;
149.23 -
149.24 -/**
149.25 - *
149.26 - * @author Alexey
149.27 - */
149.28 -public class TargetTreeModel extends XsltNodesTreeModel {
149.29 -
149.30 - private XsltMapper mapper;
149.31 -
149.32 - public TargetTreeModel(XsltMapper mapper) {
149.33 - this.mapper = mapper;
149.34 - if (mapper.getContext().getXSLModel() != null &&
149.35 - mapper.getContext().getXSLModel().getStylesheet() != null){
149.36 - Stylesheet stylesheet = mapper.getContext().getXSLModel().getStylesheet();
149.37 -
149.38 -
149.39 - List<Template> templates = stylesheet.getChildren(Template.class);
149.40 - for (Template t: templates){
149.41 - if (t.getMatch().equals("/")){
149.42 - TreeNode rootNode = (TreeNode) NodeFactory.createNode(t, mapper);
149.43 - setRootNode(rootNode);
149.44 - break;
149.45 - }
149.46 - }
149.47 - } else {
149.48 - //rootNode = new textNode("XSLT Model is not available");
149.49 - }
149.50 - }
149.51 -
149.52 -}
150.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/targettree/TemplateNode.java Wed Feb 21 08:53:38 2007 +0000
150.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
150.3 @@ -1,61 +0,0 @@
150.4 -/*
150.5 - * TemplateNode.java
150.6 - *
150.7 - * Created on 15 ßíâàðü 2007 ã., 16:48
150.8 - *
150.9 - * To change this template, choose Tools | Template Manager
150.10 - * and open the template in the editor.
150.11 - */
150.12 -
150.13 -package org.netbeans.modules.xslt.mapper.model.targettree;
150.14 -
150.15 -import java.util.ArrayList;
150.16 -import java.util.List;
150.17 -import org.netbeans.modules.xml.axi.AXIComponent;
150.18 -import org.netbeans.modules.xslt.mapper.model.nodes.NodeFactory;
150.19 -import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
150.20 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
150.21 -import org.netbeans.modules.xslt.model.XslComponent;
150.22 -
150.23 -/**
150.24 - *
150.25 - * @author Alexey
150.26 - */
150.27 -public class TemplateNode extends RuleNode{
150.28 -
150.29 - /** Creates a new instance of TemplateNode **/
150.30 - public TemplateNode(XslComponent component, XsltMapper mapper) {
150.31 - super(component, mapper);
150.32 - }
150.33 - /** Root template is combining behaviors of schema placeholder node and rule node:
150.34 - * it adds schema placeholdeers to the list of XSLT children
150.35 - **/
150.36 - protected List<TreeNode> loadChildren() {
150.37 - XslComponent myself = (XslComponent) getDataObject();
150.38 - List<TreeNode> result = super.loadChildren();
150.39 -
150.40 - AXIComponent rootType = getMapper().getContext().getTargetType();
150.41 -
150.42 - if (rootType == null){
150.43 - return result;
150.44 - }
150.45 -
150.46 - boolean hasRootType = false;
150.47 -
150.48 - for(TreeNode t: result){
150.49 - AXIComponent type = t.getType();
150.50 - if (type != null && type.equals(rootType)){
150.51 - hasRootType = true;
150.52 - }
150.53 - }
150.54 -
150.55 - if (!hasRootType){
150.56 - TreeNode newNode = (TreeNode) NodeFactory.
150.57 - createNode(rootType, getMapper());
150.58 - newNode.setParent(this);
150.59 - result.add(newNode);
150.60 - }
150.61 -
150.62 - return result;
150.63 - }
150.64 -}
151.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
151.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
151.3 @@ -1,618 +0,0 @@
151.4 -#
151.5 -# The contents of this file are subject to the terms of the Common Development
151.6 -# and Distribution License (the License). You may not use this file except in
151.7 -# compliance with the License.
151.8 -#
151.9 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
151.10 -# or http://www.netbeans.org/cddl.txt.
151.11 -#
151.12 -# When distributing Covered Code, include this CDDL Header Notice in each file
151.13 -# and include the License file at http://www.netbeans.org/cddl.txt.
151.14 -# If applicable, add the following below the CDDL Header, with the fields
151.15 -# enclosed by brackets [] replaced by your own identifying information:
151.16 -# "Portions Copyrighted [year] [name of copyright owner]"
151.17 -#
151.18 -# The Original Software is NetBeans. The Initial Developer of the Original
151.19 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
151.20 -# Microsystems, Inc. All Rights Reserved.
151.21 -
151.22 -XSLTPalette/Operator=Operators
151.23 -
151.24 -Name-equal=equal
151.25 -Hint-equal=equal
151.26 -
151.27 -Name-not_equal=not_equal
151.28 -Hint-not_equal=not_equal
151.29 -
151.30 -Name-less_than=less_than
151.31 -Hint-less_than=less_than
151.32 -
151.33 -Name-less_or_equal=less_or_equal
151.34 -Hint-less_or_equal=less_or_equal
151.35 -
151.36 -Name-greater_than=greater_than
151.37 -Hint-greater_than=greater_than
151.38 -
151.39 -Name-greater_or_equal=greater_or_equal
151.40 -Hint-greater_or_equal=greater_or_equal
151.41 -
151.42 -Name-addition=addition
151.43 -Hint-addition=addition
151.44 -
151.45 -Name-subtraction=subtraction
151.46 -Hint-subtraction=subtraction
151.47 -
151.48 -Name-multiplication=multiplication
151.49 -Hint-multiplication=multiplication
151.50 -
151.51 -Name-division=division
151.52 -Hint-division=division
151.53 -
151.54 -Name-mod=mod
151.55 -Hint-mod=mod
151.56 -
151.57 -Name-negative=negative
151.58 -Hint-negative=negative
151.59 -
151.60 -#-------------------------------------------------------------------------------
151.61 -
151.62 -XSLTPalette/String=String Functions
151.63 -
151.64 -Name-string-literal=string-literal
151.65 -Hint-string-literal=string-literal
151.66 -
151.67 -Name-string=string
151.68 -Hint-string=string
151.69 -
151.70 -Name-concat=concat
151.71 -Hint-concat=concat
151.72 -
151.73 -Name-starts-with=starts-with
151.74 -Hint-starts-with=starts-with
151.75 -
151.76 -Name-contains=contains
151.77 -Hint-contains=contains
151.78 -
151.79 -Name-substring-before=substring-before
151.80 -Hint-substring-before=substring-before
151.81 -
151.82 -Name-substring-after=substring-after
151.83 -Hint-substring-after=substring-after
151.84 -
151.85 -Name-substring=substring
151.86 -Hint-substring=substring
151.87 -
151.88 -Name-normalize-space=normalize-space
151.89 -Hint-normalize-space=normalize-space
151.90 -
151.91 -Name-translate=translate
151.92 -Hint-translate=translate
151.93 -
151.94 -Name-string-length=string-length
151.95 -Hint-string-length=string-length
151.96 -
151.97 -#-------------------------------------------------------------------------------
151.98 -
151.99 -XSLTPalette/Number=Number Functions
151.100 -
151.101 -Name-number=number
151.102 -Hint-number=number
151.103 -
151.104 -Name-sum=sum
151.105 -Hint-sum=sum
151.106 -
151.107 -Name-floor=floor
151.108 -Hint-floor=floor
151.109 -
151.110 -Name-ceiling=ceiling
151.111 -Hint-ceiling=ceiling
151.112 -
151.113 -Name-round=round
151.114 -Hint-round=round
151.115 -
151.116 -Name-number-literal=number-literal
151.117 -Hint-number-literal=number-literal
151.118 -
151.119 -#-------------------------------------------------------------------------------
151.120 -
151.121 -XSLTPalette/Boolean=Boolean Functions
151.122 -
151.123 -Name-boolean=boolean
151.124 -Hint-boolean=boolean
151.125 -
151.126 -Name-not=not
151.127 -Hint-not=not
151.128 -
151.129 -Name-true=true
151.130 -Hint-true=true
151.131 -
151.132 -Name-false=false
151.133 -Hint-false=false
151.134 -
151.135 -Name-lang=lang
151.136 -Hint-lang=lang
151.137 -
151.138 -Name-or=or
151.139 -Hint-or=or
151.140 -
151.141 -Name-and=and
151.142 -Hint-and=and
151.143 -
151.144 -#-------------------------------------------------------------------------------
151.145 -
151.146 -XSLTPalette/Nodes=Nodes Functions
151.147 -
151.148 -Name-last=last
151.149 -Hint-last=last
151.150 -
151.151 -Name-position=position
151.152 -Hint-position=position
151.153 -
151.154 -Name-count=count
151.155 -Hint-count=count
151.156 -
151.157 -Name-local-name=local-name
151.158 -Hint-local-name=local-name
151.159 -
151.160 -Name-namespace-uri=namespace-uri
151.161 -Hint-namespace-uri=namespace-uri
151.162 -
151.163 -Name-name=name
151.164 -Hint-name=name
151.165 -
151.166 -Name-xpath_expression=XPath Expression
151.167 -Hint-xpath_expression=XPath Expression
151.168 -
151.169 -#-------------------------------------------------------------------------------
151.170 -
151.171 -XSLTPalette/Datetime=Datetime Functions
151.172 -
151.173 -Name-current-dateTime=current-dateTime
151.174 -Hint-current-dateTime=current-dateTime
151.175 -
151.176 -Name-current-date=current-date
151.177 -Hint-current-date=current-date
151.178 -
151.179 -Name-current-time=current-time
151.180 -Hint-current-time=current-time
151.181 -
151.182 -Name-duration-literal=duration-literal
151.183 -Hint-duration-literal=duration-literal
151.184 -
151.185 -#-------------------------------------------------------------------------------
151.186 -# Copied from BPEL XPath
151.187 -#-------------------------------------------------------------------------------
151.188 -
151.189 -# Filenames
151.190 -TOOLTIP_Operator_or_inputParm1=boolean value
151.191 -TOOLTIP_Operator_or_inputParm2=boolean value
151.192 -TOOLTIP_Operator_or_outputParm=boolean value
151.193 -TOOLTIP_Operator_or=or function
151.194 -TOOLTIP_Operator_and_inputParm1=boolean value
151.195 -TOOLTIP_Operator_and_inputParm2=boolean value
151.196 -TOOLTIP_Operator_and_outputParm=boolean value
151.197 -TOOLTIP_Operator_and=and function
151.198 -TOOLTIP_Operator_equal_inputParm1=any value
151.199 -TOOLTIP_Operator_equal_inputParm2=any value
151.200 -TOOLTIP_Operator_equal_outputParm=boolean value
151.201 -TOOLTIP_Operator_equal=equal function
151.202 -TOOLTIP_Operator_not_equal_inputParm1=any value
151.203 -TOOLTIP_Operator_not_equal_inputParm2=any value
151.204 -TOOLTIP_Operator_not_equal_outputParm=not equal:boolean value
151.205 -TOOLTIP_Operator_not_equal=not equal function
151.206 -TOOLTIP_Operator_less_than_inputParm1=any value
151.207 -TOOLTIP_Operator_less_than_inputParm2=any value
151.208 -TOOLTIP_Operator_less_than_outputParm=boolean value
151.209 -TOOLTIP_Operator_less_than=less than function
151.210 -TOOLTIP_Operator_less_or_equal_inputParm1=any value
151.211 -TOOLTIP_Operator_less_or_equal_inputParm2=any value
151.212 -TOOLTIP_Operator_less_or_equal_outputParm=boolean value
151.213 -TOOLTIP_Operator_less_or_equal=less or equal function
151.214 -TOOLTIP_Operator_greater_than_inputParm1=any value
151.215 -TOOLTIP_Operator_greater_than_inputParm2=any value
151.216 -TOOLTIP_Operator_greater_than_outputParm=boolean value
151.217 -TOOLTIP_Operator_greater_than=greater than function
151.218 -TOOLTIP_Operator_greater_or_equal_inputParm1=any value
151.219 -TOOLTIP_Operator_greater_or_equal_inputParm2=any value
151.220 -TOOLTIP_Operator_greater_or_equal_outputParm=boolean value
151.221 -TOOLTIP_Operator_greater_or_equal=greater or equal function
151.222 -TOOLTIP_Operator_addition_inputParm1=number value
151.223 -TOOLTIP_Operator_addition_inputParm2=number value
151.224 -TOOLTIP_Operator_addition_outputParm=number value
151.225 -TOOLTIP_Operator_addition=addition function
151.226 -TOOLTIP_Operator_subtraction_inputParm1=number value
151.227 -TOOLTIP_Operator_subtraction_inputParm2=number value
151.228 -TOOLTIP_Operator_subtraction_outputParm=number value
151.229 -TOOLTIP_Operator_subtraction=subtraction function
151.230 -TOOLTIP_Operator_multiplication_inputParm1=number value
151.231 -TOOLTIP_Operator_multiplication_inputParm2=number value
151.232 -TOOLTIP_Operator_multiplication_outputParm=number value
151.233 -TOOLTIP_Operator_multiplication=multiplication function
151.234 -TOOLTIP_Operator_div_inputParm1=number value
151.235 -TOOLTIP_Operator_div_inputParm2=number value
151.236 -TOOLTIP_Operator_div_outputParm=number value
151.237 -TOOLTIP_Operator_div=div function
151.238 -TOOLTIP_Operator_mod_inputParm1=number value
151.239 -TOOLTIP_Operator_mod_inputParm2=number value
151.240 -TOOLTIP_Operator_mod_outputParm=number value
151.241 -TOOLTIP_Operator_mod=mod function
151.242 -TOOLTIP_Operator_negative_inputParm1=number value
151.243 -TOOLTIP_Operator_negative_outputParm=number value
151.244 -TOOLTIP_Operator_negative=negative function
151.245 -TOOLTIP_String_format-number_inputParm1=number value
151.246 -TOOLTIP_String_format-number_inputParm2=string value
151.247 -TOOLTIP_String_format-number_inputParm3=string value
151.248 -TOOLTIP_String_format-number_outputParm=string value
151.249 -TOOLTIP_String_format-number=format number function
151.250 -TOOLTIP_String_string_inputParm1=object value
151.251 -TOOLTIP_String_string_outputParm=string value
151.252 -TOOLTIP_String_string=string function
151.253 -TOOLTIP_String_concat_inputParm1=string value
151.254 -TOOLTIP_String_concat_inputParm2=string value
151.255 -TOOLTIP_String_concat_inputParm3=string value
151.256 -TOOLTIP_String_concat_outputParm=string value
151.257 -TOOLTIP_String_concat=concat function
151.258 -TOOLTIP_String_substring-before_inputParm1=string value
151.259 -TOOLTIP_String_substring-before_inputParm2=string value
151.260 -TOOLTIP_String_substring-before_outputParm=string value
151.261 -TOOLTIP_String_substring-before=substring before function
151.262 -TOOLTIP_String_substring-after_inputParm1=string value
151.263 -TOOLTIP_String_substring-after_inputParm2=string value
151.264 -TOOLTIP_String_substring-after_outputParm=string value
151.265 -TOOLTIP_String_substring-after=substring after function
151.266 -TOOLTIP_String_substring_inputParm1=string value
151.267 -TOOLTIP_String_substring_inputParm2=number value
151.268 -TOOLTIP_String_substring_inputParm3=number value
151.269 -TOOLTIP_String_substring_outputParm=string value
151.270 -TOOLTIP_String_substring=substring function
151.271 -TOOLTIP_String_normalize-space_inputParm1=string value
151.272 -TOOLTIP_String_normalize-space_outputParm=string value
151.273 -TOOLTIP_String_normalize-space=normalize space function
151.274 -TOOLTIP_String_translate_inputParm1=string value
151.275 -TOOLTIP_String_translate_inputParm2=string value
151.276 -TOOLTIP_String_translate_inputParm3=string value
151.277 -TOOLTIP_String_translate_outputParm=string value
151.278 -TOOLTIP_String_translate=translate function
151.279 -TOOLTIP_String_string-length_inputParm1=string value
151.280 -TOOLTIP_String_string-length_outputParm=number value
151.281 -TOOLTIP_String_string-length=string length function
151.282 -TOOLTIP_String_unparsed-entity-uri_inputParm1=string value
151.283 -TOOLTIP_String_unparsed-entity-uri_outputParm=string value
151.284 -TOOLTIP_String_unparsed-entity-uri=unparsed entity uri function
151.285 -TOOLTIP_String_system-property_inputParm1=string value
151.286 -TOOLTIP_String_system-property_outputParm=object value
151.287 -TOOLTIP_String_system-property=system property function
151.288 -TOOLTIP_String_string-literal_outputParm=string value
151.289 -TOOLTIP_String_string-literal=string literal function
151.290 -TOOLTIP_Number_number_inputParm1=object value
151.291 -TOOLTIP_Number_number_outputParm=number value
151.292 -TOOLTIP_Number_number=number function
151.293 -TOOLTIP_Number_sum_inputParm1=node set value
151.294 -TOOLTIP_Number_sum_outputParm=number value
151.295 -TOOLTIP_Number_sum=sum function
151.296 -TOOLTIP_Number_floor_inputParm1=number value
151.297 -TOOLTIP_Number_floor_outputParm=number value
151.298 -TOOLTIP_Number_floor=floor function
151.299 -TOOLTIP_Number_ceiling_inputParm1=number value
151.300 -TOOLTIP_Number_ceiling_outputParm=number value
151.301 -TOOLTIP_Number_ceiling=ceiling function
151.302 -TOOLTIP_Number_round_inputParm1=number value
151.303 -TOOLTIP_Number_round_outputParm=number value
151.304 -TOOLTIP_Number_round=round function
151.305 -TOOLTIP_Number_number-literal_outputParm=number value
151.306 -TOOLTIP_Number_number-literal=number literal function
151.307 -TOOLTIP_Boolean_boolean_inputParm1=object value
151.308 -TOOLTIP_Boolean_boolean_outputParm=boolean value
151.309 -TOOLTIP_Boolean_boolean=boolean function
151.310 -TOOLTIP_Boolean_not_inputParm1=boolean value
151.311 -TOOLTIP_Boolean_not_outputParm=boolean value
151.312 -TOOLTIP_Boolean_not=not function
151.313 -TOOLTIP_Boolean_true_outputParm=boolean value
151.314 -TOOLTIP_Boolean_true=true function
151.315 -TOOLTIP_Boolean_false_outputParm=boolean value
151.316 -TOOLTIP_Boolean_false=false function
151.317 -TOOLTIP_Boolean_lang_inputParm1=string value
151.318 -TOOLTIP_Boolean_lang_outputParm=boolean value
151.319 -TOOLTIP_Boolean_lang=lang function
151.320 -TOOLTIP_Boolean_starts-with_inputParm1=string value
151.321 -TOOLTIP_Boolean_starts-with_inputParm2=string value
151.322 -TOOLTIP_Boolean_starts-with_outputParm=boolean value
151.323 -TOOLTIP_Boolean_starts-with=starts with function
151.324 -TOOLTIP_Boolean_contains_inputParm1=string value
151.325 -TOOLTIP_Boolean_contains_inputParm2=string value
151.326 -TOOLTIP_Boolean_contains_outputParm=boolean value
151.327 -TOOLTIP_Boolean_contains=contains function
151.328 -TOOLTIP_Boolean_element-available_inputParm1=string value
151.329 -TOOLTIP_Boolean_element-available_outputParm=boolean value
151.330 -TOOLTIP_Boolean_element-available=element available function
151.331 -TOOLTIP_Boolean_function-available_inputParm1=string value
151.332 -TOOLTIP_Boolean_function-available_outputParm=boolean value
151.333 -TOOLTIP_Boolean_function-available=function available function
151.334 -TOOLTIP_Nodes_document_inputParm1=object value
151.335 -TOOLTIP_Nodes_document_inputParm2=node set value
151.336 -TOOLTIP_Nodes_document_outputParm=node set value
151.337 -TOOLTIP_Nodes_document=Document Function
151.338 -TOOLTIP_Nodes_key_inputParm1=string value
151.339 -TOOLTIP_Nodes_key_inputParm2=object value
151.340 -TOOLTIP_Nodes_key_outputParm=node set value
151.341 -TOOLTIP_Nodes_key=Key Function
151.342 -TOOLTIP_Nodes_current_outputParm=node set value
151.343 -TOOLTIP_Nodes_current=Current Function
151.344 -TOOLTIP_Nodes_id_inputParm1=object value
151.345 -TOOLTIP_Nodes_id_outputParm=node set value
151.346 -TOOLTIP_Nodes_id=ID Function
151.347 -TOOLTIP_Nodes_last_outputParm=number value
151.348 -TOOLTIP_Nodes_last=Last Function
151.349 -TOOLTIP_Nodes_position_outputParm=number value
151.350 -TOOLTIP_Nodes_position=Position Function
151.351 -TOOLTIP_Nodes_count_inputParm1=node set value
151.352 -TOOLTIP_Nodes_count_outputParm=number value
151.353 -TOOLTIP_Nodes_count=Count Function
151.354 -TOOLTIP_Nodes_generate-id_inputParm1=node set value
151.355 -TOOLTIP_Nodes_generate-id_outputParm=string value
151.356 -TOOLTIP_Nodes_generate-id=Generate ID Function
151.357 -TOOLTIP_Nodes_local-name_inputParm1=node set value
151.358 -TOOLTIP_Nodes_local-name_outputParm=string value
151.359 -TOOLTIP_Nodes_local-name=Local Name Function
151.360 -TOOLTIP_Nodes_namespace-uri_inputParm1=node set value
151.361 -TOOLTIP_Nodes_namespace-uri_outputParm=string value
151.362 -TOOLTIP_Nodes_namespace-uri=namespace uri function
151.363 -TOOLTIP_Nodes_name_inputParm1=node set value
151.364 -TOOLTIP_Nodes_name_outputParm=string value
151.365 -TOOLTIP_Nodes_name=name function
151.366 -TOOLTIP_Nodes_xpath_expression=XPath Expression
151.367 -TOOLTIP_String_bytes_to_string=bytes to text
151.368 -TOOLTIP_String_string_to_bytes=text to bytes
151.369 -TOOLTIP_String_copy_from=copy from function
151.370 -TOOLTIP_String_copy_to=copy to function
151.371 -TOOLTIP_String_contains=contains
151.372 -TOOLTIP_String_starts-with= starts with function
151.373 -
151.374 -#datetime
151.375 -TOOLTIP_Datetime_duration-literal_outputParm=string value
151.376 -TOOLTIP_Datetime_duration-literal=duration literal function
151.377 -TOOLTIP_Datetime_current-dateTime_outputParm=string value
151.378 -TOOLTIP_Datetime_current-dateTime=current date and time function
151.379 -TOOLTIP_Datetime_current-date_outputParm=string value
151.380 -TOOLTIP_Datetime_current-date=current date function
151.381 -TOOLTIP_Datetime_current-time_outputParm=string value
151.382 -TOOLTIP_Datetime_current-time=current time function
151.383 -
151.384 -LBL_Operator_or=&OR
151.385 -LBL_Operator_and=&AND
151.386 -LBL_Operator_equal=&EQUAL
151.387 -LBL_Operator_not_equal=Not E&qual
151.388 -LBL_Operator_less_than=&Less Than
151.389 -LBL_Operator_less_or_equal=Less &or Equal
151.390 -LBL_Operator_greater_than=&Greater Than
151.391 -LBL_Operator_greater_or_equal=G&reater or Equal
151.392 -LBL_Operator_addition=&Addition
151.393 -LBL_Operator_subtraction=&Subtraction
151.394 -LBL_Operator_multiplication=Multi&plication
151.395 -LBL_Operator_div=&Div
151.396 -LBL_Operator_mod=&Mod
151.397 -LBL_Operator_negative=&Negative
151.398 -LBL_String_format-number=Format Number
151.399 -LBL_String_string=&String
151.400 -LBL_String_concat=C&oncat
151.401 -LBL_String_substring-before=Substring &Before
151.402 -LBL_String_substring-after=Substring &After
151.403 -LBL_String_substring=S&ubstring
151.404 -LBL_String_normalize-space=&Normalize Space
151.405 -LBL_String_translate=&Translate
151.406 -LBL_String_string-length=String &Length
151.407 -LBL_String_unparsed-entity-uri=unparsed entity uri
151.408 -LBL_String_system-property=System Property
151.409 -LBL_String_string-literal=St&ring Literal
151.410 -LBL_String_copy_from=copy from
151.411 -LBL_String_copy_to=copy to
151.412 -LBL_String_bytes_to_string=bytes to text
151.413 -LBL_String_string_to_bytes=text to bytes
151.414 -LBL_String_contains=&Contains
151.415 -LBL_String_starts-with=Starts &With
151.416 -LBL_String_format-number=Format Number
151.417 -
151.418 -LBL_Number_number=&Number
151.419 -LBL_Number_sum=&Sum
151.420 -LBL_Number_floor=&Floor
151.421 -LBL_Number_ceiling=&Ceiling
151.422 -LBL_Number_round=&Round
151.423 -LBL_Number_number-literal=Number &Literal
151.424 -LBL_Boolean_boolean=&Boolean
151.425 -LBL_Boolean_not=&Not
151.426 -LBL_Boolean_true=&True
151.427 -LBL_Boolean_false=&False
151.428 -LBL_Boolean_lang=&Lang
151.429 -LBL_Boolean_starts-with=Starts With
151.430 -LBL_Boolean_contains=Contains
151.431 -LBL_Boolean_element-available=Element Available
151.432 -LBL_Boolean_function-available=Function Available
151.433 -LBL_Nodes_document=Document
151.434 -LBL_Nodes_key=Key
151.435 -LBL_Nodes_current=current
151.436 -LBL_Nodes_id=ID
151.437 -LBL_Nodes_last=Las&t
151.438 -LBL_Nodes_position=&Position
151.439 -LBL_Nodes_count=&Count
151.440 -LBL_Nodes_generate-id=Generate ID
151.441 -LBL_Nodes_local-name=&Local Name
151.442 -LBL_Nodes_namespace-uri=Namespace &URI
151.443 -LBL_Nodes_name=&Name
151.444 -LBL_Nodes_xpath_expression=&XPath Expression
151.445 -
151.446 -#Datetime
151.447 -LBL_Datetime_duration-literal=Duration &Literal
151.448 -LBL_Datetime_current-dateTime=&Current Date & Time
151.449 -LBL_Datetime_current-date=Current &Date
151.450 -LBL_Datetime_current-time=Current &Time
151.451 -
151.452 -Category_Boolean_Icon=/org/netbeans/modules/xslt/mapper/palette/icons/category_boolean.png
151.453 -Category_String_Icon=/org/netbeans/modules/xslt/mapper/palette/icons/category_string.png
151.454 -Category_Datetime_Icon=/org/netbeans/modules/xslt/mapper/palette/icons/category_date.png
151.455 -Category_Operator_Icon=/org/netbeans/modules/xslt/mapper/palette/icons/category_operators.png
151.456 -Category_Nodes_Icon=/org/netbeans/modules/xslt/mapper/palette/icons/category_nodes.png
151.457 -Category_Number_Icon=/org/netbeans/modules/xslt/mapper/palette/icons/category_number.png
151.458 -
151.459 -#Localization for BPEL Mapper-->Datetime palette drop-down menu
151.460 -XPathMetainfo/Datetime=&Datetime
151.461 -
151.462 -#Localization for BPEL Mapper-->Operator palette drop-down menu
151.463 -XPathMetainfo/Operator=O&perator
151.464 -
151.465 -# Localization for BPEL Mapper-->String palette drop-down menu
151.466 -XPathMetainfo/String=Str&ing
151.467 -
151.468 -# Localization for BPEL Mapper-->Number palette drop-down menu
151.469 -XPathMetainfo/Number=Nu&mber
151.470 -
151.471 -# Localization for BPEL Mapper-->Boolean palette drop-down menu
151.472 -XPathMetainfo/Boolean=Boo&lean
151.473 -
151.474 -# Localization for BPEL Mapper-->Nodes palette drop-down menu
151.475 -XPathMetainfo/Nodes=N&odes
151.476 -
151.477 -Category_Boolean_A11yName=Boolean
151.478 -Category_Boolean_A11yDesc=Boolean
151.479 -Category_Datetime_A11yDesc=Datetime
151.480 -Category_Datetime_A11yName=Datetime
151.481 -Category_Nodes_A11yDesc=Nodes
151.482 -Category_Nodes_A11yName=Nodes
151.483 -Category_Number_A11yDesc=Number
151.484 -Category_Number_A11yName=Number
151.485 -Category_Operator_A11yDesc=Operator
151.486 -Category_Operator_A11yName=Operator
151.487 -Category_String_A11yDesc=String
151.488 -Category_String_A11yName=String
151.489 -
151.490 -A11yDesc_Operator_or=OR
151.491 -A11yName_Operator_or=OR
151.492 -A11yDesc_Operator_and=AND
151.493 -A11yName_Operator_and=AND
151.494 -A11yDesc_Operator_equal=EQUAL
151.495 -A11yName_Operator_equal=EQUAL
151.496 -A11yDesc_Operator_not_equal=Not Equal
151.497 -A11yName_Operator_not_equal=Not Equal
151.498 -A11yDesc_Operator_less_than=Less Than
151.499 -A11yName_Operator_less_than=Less Than
151.500 -A11yDesc_Operator_less_or_equal=Less or Equal
151.501 -A11yName_Operator_less_or_equal=Less or Equal
151.502 -A11yDesc_Operator_greater_than=Greater Than
151.503 -A11yName_Operator_greater_than=Greater Than
151.504 -A11yDesc_Operator_greater_or_equal=Greater or Equal
151.505 -A11yName_Operator_greater_or_equal=Greater or Equal
151.506 -A11yDesc_Operator_addition=Addition
151.507 -A11yName_Operator_addition=Addition
151.508 -A11yDesc_Operator_subtraction=Subtraction
151.509 -A11yName_Operator_subtraction=Subtraction
151.510 -A11yDesc_Operator_multiplication=Multiplication
151.511 -A11yName_Operator_multiplication=Multiplication
151.512 -A11yDesc_Operator_div=Div
151.513 -A11yName_Operator_div=Div
151.514 -A11yDesc_Operator_mod=Mod
151.515 -A11yName_Operator_mod=Mod
151.516 -A11yDesc_Operator_negative=Negative
151.517 -A11yName_Operator_negative=Negative
151.518 -A11yDesc_String_format-number=Format Number
151.519 -A11yName_String_format-number=Format Number
151.520 -A11yDesc_String_string=String
151.521 -A11yName_String_string=String
151.522 -A11yDesc_String_concat=Concat
151.523 -A11yName_String_concat=Concat
151.524 -A11yDesc_String_substring-before=Substring Before
151.525 -A11yName_String_substring-before=Substring Before
151.526 -A11yDesc_String_substring-after=Substring After
151.527 -A11yName_String_substring-after=Substring After
151.528 -A11yDesc_String_substring=Substring
151.529 -A11yName_String_substring=Substring
151.530 -A11yDesc_String_normalize-space=Normalize Space
151.531 -A11yName_String_normalize-space=Normalize Space
151.532 -A11yDesc_String_translate=Translate
151.533 -A11yName_String_translate=Translate
151.534 -A11yDesc_String_string-length=String Length
151.535 -A11yName_String_string-length=String Length
151.536 -A11yDesc_String_unparsed-entity-uri=unparsed entity uri
151.537 -A11yName_String_unparsed-entity-uri=unparsed entity uri
151.538 -A11yDesc_String_system-property=System Property
151.539 -A11yName_String_system-property=System Property
151.540 -A11yDesc_String_string-literal=String Literal
151.541 -A11yName_String_string-literal=String Literal
151.542 -A11yDesc_String_copy_from=copy from
151.543 -A11yName_String_copy_from=copy from
151.544 -A11yDesc_String_copy_to=copy to
151.545 -A11yName_String_copy_to=copy to
151.546 -A11yDesc_String_bytes_to_string=bytes to text
151.547 -A11yName_String_bytes_to_string=bytes to text
151.548 -A11yDesc_String_string_to_bytes=text to bytes
151.549 -A11yName_String_string_to_bytes=text to bytes
151.550 -A11yDesc_String_contains=Contains
151.551 -A11yName_String_contains=Contains
151.552 -A11yDesc_String_starts-with=Starts With
151.553 -A11yName_String_starts-with=Starts With
151.554 -A11yDesc_String_format-number=Format Number
151.555 -A11yName_String_format-number=Format Number
151.556 -
151.557 -A11yDesc_Number_number=Number
151.558 -A11yName_Number_number=Number
151.559 -A11yDesc_Number_sum=Sum
151.560 -A11yName_Number_sum=Sum
151.561 -A11yDesc_Number_floor=Floor
151.562 -A11yName_Number_floor=Floor
151.563 -A11yDesc_Number_ceiling=Ceiling
151.564 -A11yName_Number_ceiling=Ceiling
151.565 -A11yDesc_Number_round=Round
151.566 -A11yName_Number_round=Round
151.567 -A11yDesc_Number_number-literal=Number Literal
151.568 -A11yName_Number_number-literal=Number Literal
151.569 -A11yDesc_Boolean_boolean=Boolean
151.570 -A11yName_Boolean_boolean=Boolean
151.571 -A11yDesc_Boolean_not=Not
151.572 -A11yName_Boolean_not=Not
151.573 -A11yDesc_Boolean_true=True
151.574 -A11yName_Boolean_true=True
151.575 -A11yDesc_Boolean_false=False
151.576 -A11yName_Boolean_false=False
151.577 -A11yDesc_Boolean_lang=Lang
151.578 -A11yName_Boolean_lang=Lang
151.579 -A11yDesc_Boolean_starts-with=Starts With
151.580 -A11yName_Boolean_starts-with=Starts With
151.581 -A11yDesc_Boolean_contains=Contains
151.582 -A11yName_Boolean_contains=Contains
151.583 -A11yDesc_Boolean_element-available=Element Available
151.584 -A11yName_Boolean_element-available=Element Available
151.585 -A11yDesc_Boolean_function-available=Function Available
151.586 -A11yName_Boolean_function-available=Function Available
151.587 -A11yDesc_Nodes_document=Document
151.588 -A11yName_Nodes_document=Document
151.589 -A11yDesc_Nodes_key=Key
151.590 -A11yName_Nodes_key=Key
151.591 -A11yDesc_Nodes_current=current
151.592 -A11yName_Nodes_current=current
151.593 -A11yDesc_Nodes_id=ID
151.594 -A11yName_Nodes_id=ID
151.595 -A11yDesc_Nodes_last=Last
151.596 -A11yName_Nodes_last=Last
151.597 -A11yDesc_Nodes_position=Position
151.598 -A11yName_Nodes_position=Position
151.599 -A11yDesc_Nodes_count=Count
151.600 -A11yName_Nodes_count=Count
151.601 -A11yDesc_Nodes_generate-id=Generate ID
151.602 -A11yName_Nodes_generate-id=Generate ID
151.603 -A11yDesc_Nodes_local-name=Local Name
151.604 -A11yName_Nodes_local-name=Local Name
151.605 -A11yDesc_Nodes_namespace-uri=Namespace URI
151.606 -A11yName_Nodes_namespace-uri=Namespace URI
151.607 -A11yDesc_Nodes_name=Name
151.608 -A11yName_Nodes_name=Name
151.609 -A11yDesc_Nodes_xpath_expression=XPath Expression
151.610 -A11yName_Nodes_xpath_expression=XPath Expression
151.611 -
151.612 -#Datetime
151.613 -A11yDesc_Datetime_duration-literal=Duration Literal
151.614 -A11yName_Datetime_duration-literal=Duration Literal
151.615 -A11yDesc_Datetime_current-dateTime=Current Date & Time
151.616 -A11yName_Datetime_current-dateTime=Current Date & Time
151.617 -A11yDesc_Datetime_current-date=Current Date
151.618 -A11yName_Datetime_current-date=Current Date
151.619 -A11yDesc_Datetime_current-time=Current Time
151.620 -A11yName_Datetime_current-time=Current Time
151.621 -
152.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/XsltPaletteDrop.java Wed Feb 21 08:53:38 2007 +0000
152.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
152.3 @@ -1,38 +0,0 @@
152.4 -/*
152.5 - * The contents of this file are subject to the terms of the Common Development
152.6 - * and Distribution License (the License). You may not use this file except in
152.7 - * compliance with the License.
152.8 - *
152.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
152.10 - * or http://www.netbeans.org/cddl.txt.
152.11 - *
152.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
152.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
152.14 - * If applicable, add the following below the CDDL Header, with the fields
152.15 - * enclosed by brackets [] replaced by your own identifying information:
152.16 - * "Portions Copyrighted [year] [name of copyright owner]"
152.17 - *
152.18 - * The Original Software is NetBeans. The Initial Developer of the Original
152.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
152.20 - * Microsystems, Inc. All Rights Reserved.
152.21 - */
152.22 -package org.netbeans.modules.xslt.mapper.palette;
152.23 -
152.24 -import javax.swing.text.JTextComponent;
152.25 -import org.openide.text.ActiveEditorDrop;
152.26 -
152.27 -/**
152.28 - *
152.29 - * @author nk160297
152.30 - */
152.31 -public class XsltPaletteDrop implements ActiveEditorDrop {
152.32 -
152.33 - /**
152.34 - * A method called from the drop target that supports the artificial DataFlavor.
152.35 - * @param target a Component where drop operation occured
152.36 - * @return true if implementor allowed a drop operation into the targetComponent
152.37 - */
152.38 - public boolean handleTransfer(JTextComponent target) {
152.39 - return false;
152.40 - }
152.41 -}
153.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/XsltPaletteFactory.java Wed Feb 21 08:53:38 2007 +0000
153.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
153.3 @@ -1,123 +0,0 @@
153.4 -/*
153.5 - * The contents of this file are subject to the terms of the Common Development
153.6 - * and Distribution License (the License). You may not use this file except in
153.7 - * compliance with the License.
153.8 - *
153.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
153.10 - * or http://www.netbeans.org/cddl.txt.
153.11 - *
153.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
153.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
153.14 - * If applicable, add the following below the CDDL Header, with the fields
153.15 - * enclosed by brackets [] replaced by your own identifying information:
153.16 - * "Portions Copyrighted [year] [name of copyright owner]"
153.17 - *
153.18 - * The Original Software is NetBeans. The Initial Developer of the Original
153.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
153.20 - * Microsystems, Inc. All Rights Reserved.
153.21 - */
153.22 -package org.netbeans.modules.xslt.mapper.palette;
153.23 -
153.24 -import java.awt.datatransfer.DataFlavor;
153.25 -import java.awt.datatransfer.UnsupportedFlavorException;
153.26 -import java.io.IOException;
153.27 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IMethoid;
153.28 -import org.netbeans.modules.soa.ui.StubPaletteActions;
153.29 -import org.netbeans.modules.xslt.mapper.methoid.Constants;
153.30 -import org.netbeans.modules.xslt.mapper.methoid.MethoidLoader;
153.31 -import org.netbeans.spi.palette.DragAndDropHandler;
153.32 -import org.netbeans.spi.palette.PaletteController;
153.33 -import org.netbeans.spi.palette.PaletteFactory;
153.34 -import org.openide.ErrorManager;
153.35 -import org.openide.filesystems.FileObject;
153.36 -import org.openide.filesystems.Repository;
153.37 -import org.openide.loaders.DataObject;
153.38 -import org.openide.nodes.Node;
153.39 -import org.openide.util.Lookup;
153.40 -import org.openide.util.datatransfer.ExTransferable;
153.41 -
153.42 -/**
153.43 - *
153.44 - * @author nk160297
153.45 - */
153.46 -public final class XsltPaletteFactory {
153.47 -
153.48 - private XsltPaletteFactory() {}
153.49 -
153.50 - /**
153.51 - * Creates a new xslt palette.
153.52 - * @return a new xslt palette
153.53 - */
153.54 - public static PaletteController getPalette() {
153.55 - if (ourPalette == null) {
153.56 - try {
153.57 - ourPalette = PaletteFactory.createPalette(
153.58 - Constants.XSLT_PALETTE_FOLDER,
153.59 - new StubPaletteActions(),
153.60 - null,
153.61 - new MyDnDHandler()
153.62 - );
153.63 - } catch (IOException e) {
153.64 - e.printStackTrace();
153.65 - }
153.66 - }
153.67 - return ourPalette;
153.68 - }
153.69 -
153.70 - public static class MyDnDHandler extends DragAndDropHandler {
153.71 - public void customize(ExTransferable t, Lookup item) {
153.72 - try {
153.73 - DataFlavor mapperFlavor =
153.74 - new DataFlavor(DataFlavor.javaJVMLocalObjectMimeType);
153.75 - t.put(new MapperPaletteTransferable(mapperFlavor, item));
153.76 - } catch (ClassNotFoundException ex) {
153.77 - ErrorManager.getDefault().notify(ex);
153.78 - }
153.79 - //
153.80 -// t.addTransferListener(new TransferListener() {
153.81 -// public void accepted(int action) {
153.82 -// }
153.83 -// public void ownershipLost() {
153.84 -// }
153.85 -// public void rejected() {
153.86 -// }
153.87 -// });
153.88 - }
153.89 - }
153.90 -
153.91 - public static class MapperPaletteTransferable extends ExTransferable.Single {
153.92 -
153.93 - private Lookup myPaletteItemLookup;
153.94 -
153.95 - public MapperPaletteTransferable(DataFlavor flavor, Lookup item) {
153.96 - super(flavor);
153.97 - myPaletteItemLookup = item;
153.98 - }
153.99 -
153.100 - protected Object getData() throws IOException, UnsupportedFlavorException {
153.101 - Node paletteItemNode = (Node)myPaletteItemLookup.lookup(Node.class);
153.102 - if (paletteItemNode != null) {
153.103 - DataObject dataObject = (DataObject)paletteItemNode.
153.104 - getCookie(DataObject.class);
153.105 - if (dataObject != null) {
153.106 - FileObject fo = dataObject.getPrimaryFile();
153.107 - if (fo != null) {
153.108 - String metainfoRef = (String)fo.getAttribute(
153.109 - Constants.METAINFO_REF);
153.110 - if (metainfoRef != null && metainfoRef.length() != 0) {
153.111 - FileObject metainfoFo = Repository.getDefault().
153.112 - getDefaultFileSystem().findResource(metainfoRef);
153.113 - if (metainfoFo != null) {
153.114 - IMethoid methoid = MethoidLoader.loadMethoid(metainfoFo);
153.115 - return methoid;
153.116 - }
153.117 - }
153.118 - }
153.119 - }
153.120 - }
153.121 - return null;
153.122 - }
153.123 - }
153.124 -
153.125 - private static PaletteController ourPalette;
153.126 -}
154.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/addition.xml Wed Feb 21 08:53:38 2007 +0000
154.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
154.3 @@ -1,32 +0,0 @@
154.4 -<?xml version="1.0" encoding="UTF-8"?>
154.5 -<!--
154.6 - The contents of this file are subject to the terms of the Common Development
154.7 - and Distribution License (the License). You may not use this file except in
154.8 - compliance with the License.
154.9 -
154.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
154.11 - or http://www.netbeans.org/cddl.txt.
154.12 -
154.13 - When distributing Covered Code, include this CDDL Header Notice in each file
154.14 - and include the License file at http://www.netbeans.org/cddl.txt.
154.15 - If applicable, add the following below the CDDL Header, with the fields
154.16 - enclosed by brackets [] replaced by your own identifying information:
154.17 - "Portions Copyrighted [year] [name of copyright owner]"
154.18 -
154.19 - The Original Software is NetBeans. The Initial Developer of the Original
154.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
154.21 - Microsystems, Inc. All Rights Reserved.
154.22 --->
154.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
154.24 -
154.25 -<editor_palette_item version="1.0">
154.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
154.27 -
154.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/addition16.png"/>
154.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/addition32.png"/>
154.30 -
154.31 - <description
154.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
154.33 - display-name-key="Name-addition"
154.34 - tooltip-key="Hint-addition"/>
154.35 -</editor_palette_item>
155.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/and.xml Wed Feb 21 08:53:38 2007 +0000
155.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
155.3 @@ -1,32 +0,0 @@
155.4 -<?xml version="1.0" encoding="UTF-8"?>
155.5 -<!--
155.6 - The contents of this file are subject to the terms of the Common Development
155.7 - and Distribution License (the License). You may not use this file except in
155.8 - compliance with the License.
155.9 -
155.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
155.11 - or http://www.netbeans.org/cddl.txt.
155.12 -
155.13 - When distributing Covered Code, include this CDDL Header Notice in each file
155.14 - and include the License file at http://www.netbeans.org/cddl.txt.
155.15 - If applicable, add the following below the CDDL Header, with the fields
155.16 - enclosed by brackets [] replaced by your own identifying information:
155.17 - "Portions Copyrighted [year] [name of copyright owner]"
155.18 -
155.19 - The Original Software is NetBeans. The Initial Developer of the Original
155.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
155.21 - Microsystems, Inc. All Rights Reserved.
155.22 --->
155.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
155.24 -
155.25 -<editor_palette_item version="1.0">
155.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
155.27 -
155.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/and16.png"/>
155.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/and32.png"/>
155.30 -
155.31 - <description
155.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
155.33 - display-name-key="Name-and"
155.34 - tooltip-key="Hint-and"/>
155.35 -</editor_palette_item>
156.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/boolean.xml Wed Feb 21 08:53:38 2007 +0000
156.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
156.3 @@ -1,32 +0,0 @@
156.4 -<?xml version="1.0" encoding="UTF-8"?>
156.5 -<!--
156.6 - The contents of this file are subject to the terms of the Common Development
156.7 - and Distribution License (the License). You may not use this file except in
156.8 - compliance with the License.
156.9 -
156.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
156.11 - or http://www.netbeans.org/cddl.txt.
156.12 -
156.13 - When distributing Covered Code, include this CDDL Header Notice in each file
156.14 - and include the License file at http://www.netbeans.org/cddl.txt.
156.15 - If applicable, add the following below the CDDL Header, with the fields
156.16 - enclosed by brackets [] replaced by your own identifying information:
156.17 - "Portions Copyrighted [year] [name of copyright owner]"
156.18 -
156.19 - The Original Software is NetBeans. The Initial Developer of the Original
156.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
156.21 - Microsystems, Inc. All Rights Reserved.
156.22 --->
156.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
156.24 -
156.25 -<editor_palette_item version="1.0">
156.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
156.27 -
156.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/boolean16.png"/>
156.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/boolean32.png"/>
156.30 -
156.31 - <description
156.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
156.33 - display-name-key="Name-boolean"
156.34 - tooltip-key="Hint-boolean"/>
156.35 -</editor_palette_item>
157.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/ceiling.xml Wed Feb 21 08:53:38 2007 +0000
157.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
157.3 @@ -1,32 +0,0 @@
157.4 -<?xml version="1.0" encoding="UTF-8"?>
157.5 -<!--
157.6 - The contents of this file are subject to the terms of the Common Development
157.7 - and Distribution License (the License). You may not use this file except in
157.8 - compliance with the License.
157.9 -
157.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
157.11 - or http://www.netbeans.org/cddl.txt.
157.12 -
157.13 - When distributing Covered Code, include this CDDL Header Notice in each file
157.14 - and include the License file at http://www.netbeans.org/cddl.txt.
157.15 - If applicable, add the following below the CDDL Header, with the fields
157.16 - enclosed by brackets [] replaced by your own identifying information:
157.17 - "Portions Copyrighted [year] [name of copyright owner]"
157.18 -
157.19 - The Original Software is NetBeans. The Initial Developer of the Original
157.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
157.21 - Microsystems, Inc. All Rights Reserved.
157.22 --->
157.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
157.24 -
157.25 -<editor_palette_item version="1.0">
157.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
157.27 -
157.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/ceiling16.png"/>
157.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/ceiling32.png"/>
157.30 -
157.31 - <description
157.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
157.33 - display-name-key="Name-ceiling"
157.34 - tooltip-key="Hint-ceiling"/>
157.35 -</editor_palette_item>
158.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/concat.xml Wed Feb 21 08:53:38 2007 +0000
158.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
158.3 @@ -1,32 +0,0 @@
158.4 -<?xml version="1.0" encoding="UTF-8"?>
158.5 -<!--
158.6 - The contents of this file are subject to the terms of the Common Development
158.7 - and Distribution License (the License). You may not use this file except in
158.8 - compliance with the License.
158.9 -
158.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
158.11 - or http://www.netbeans.org/cddl.txt.
158.12 -
158.13 - When distributing Covered Code, include this CDDL Header Notice in each file
158.14 - and include the License file at http://www.netbeans.org/cddl.txt.
158.15 - If applicable, add the following below the CDDL Header, with the fields
158.16 - enclosed by brackets [] replaced by your own identifying information:
158.17 - "Portions Copyrighted [year] [name of copyright owner]"
158.18 -
158.19 - The Original Software is NetBeans. The Initial Developer of the Original
158.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
158.21 - Microsystems, Inc. All Rights Reserved.
158.22 --->
158.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
158.24 -
158.25 -<editor_palette_item version="1.0">
158.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
158.27 -
158.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/concat16.png"/>
158.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/concat32.png"/>
158.30 -
158.31 - <description
158.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
158.33 - display-name-key="Name-concat"
158.34 - tooltip-key="Hint-concat"/>
158.35 -</editor_palette_item>
159.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/contains.xml Wed Feb 21 08:53:38 2007 +0000
159.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
159.3 @@ -1,32 +0,0 @@
159.4 -<?xml version="1.0" encoding="UTF-8"?>
159.5 -<!--
159.6 - The contents of this file are subject to the terms of the Common Development
159.7 - and Distribution License (the License). You may not use this file except in
159.8 - compliance with the License.
159.9 -
159.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
159.11 - or http://www.netbeans.org/cddl.txt.
159.12 -
159.13 - When distributing Covered Code, include this CDDL Header Notice in each file
159.14 - and include the License file at http://www.netbeans.org/cddl.txt.
159.15 - If applicable, add the following below the CDDL Header, with the fields
159.16 - enclosed by brackets [] replaced by your own identifying information:
159.17 - "Portions Copyrighted [year] [name of copyright owner]"
159.18 -
159.19 - The Original Software is NetBeans. The Initial Developer of the Original
159.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
159.21 - Microsystems, Inc. All Rights Reserved.
159.22 --->
159.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
159.24 -
159.25 -<editor_palette_item version="1.0">
159.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
159.27 -
159.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/contains16.png"/>
159.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/contains32.png"/>
159.30 -
159.31 - <description
159.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
159.33 - display-name-key="Name-contains"
159.34 - tooltip-key="Hint-contains"/>
159.35 -</editor_palette_item>
160.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/count.xml Wed Feb 21 08:53:38 2007 +0000
160.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
160.3 @@ -1,32 +0,0 @@
160.4 -<?xml version="1.0" encoding="UTF-8"?>
160.5 -<!--
160.6 - The contents of this file are subject to the terms of the Common Development
160.7 - and Distribution License (the License). You may not use this file except in
160.8 - compliance with the License.
160.9 -
160.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
160.11 - or http://www.netbeans.org/cddl.txt.
160.12 -
160.13 - When distributing Covered Code, include this CDDL Header Notice in each file
160.14 - and include the License file at http://www.netbeans.org/cddl.txt.
160.15 - If applicable, add the following below the CDDL Header, with the fields
160.16 - enclosed by brackets [] replaced by your own identifying information:
160.17 - "Portions Copyrighted [year] [name of copyright owner]"
160.18 -
160.19 - The Original Software is NetBeans. The Initial Developer of the Original
160.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
160.21 - Microsystems, Inc. All Rights Reserved.
160.22 --->
160.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
160.24 -
160.25 -<editor_palette_item version="1.0">
160.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
160.27 -
160.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/count16.png"/>
160.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/count32.png"/>
160.30 -
160.31 - <description
160.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
160.33 - display-name-key="Name-count"
160.34 - tooltip-key="Hint-count"/>
160.35 -</editor_palette_item>
161.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/current-date.xml Wed Feb 21 08:53:38 2007 +0000
161.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
161.3 @@ -1,32 +0,0 @@
161.4 -<?xml version="1.0" encoding="UTF-8"?>
161.5 -<!--
161.6 - The contents of this file are subject to the terms of the Common Development
161.7 - and Distribution License (the License). You may not use this file except in
161.8 - compliance with the License.
161.9 -
161.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
161.11 - or http://www.netbeans.org/cddl.txt.
161.12 -
161.13 - When distributing Covered Code, include this CDDL Header Notice in each file
161.14 - and include the License file at http://www.netbeans.org/cddl.txt.
161.15 - If applicable, add the following below the CDDL Header, with the fields
161.16 - enclosed by brackets [] replaced by your own identifying information:
161.17 - "Portions Copyrighted [year] [name of copyright owner]"
161.18 -
161.19 - The Original Software is NetBeans. The Initial Developer of the Original
161.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
161.21 - Microsystems, Inc. All Rights Reserved.
161.22 --->
161.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
161.24 -
161.25 -<editor_palette_item version="1.0">
161.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
161.27 -
161.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/current-date16.png"/>
161.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/current-date32.png"/>
161.30 -
161.31 - <description
161.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
161.33 - display-name-key="Name-current-date"
161.34 - tooltip-key="Hint-current-date"/>
161.35 -</editor_palette_item>
162.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/current-dateTime.xml Wed Feb 21 08:53:38 2007 +0000
162.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
162.3 @@ -1,32 +0,0 @@
162.4 -<?xml version="1.0" encoding="UTF-8"?>
162.5 -<!--
162.6 - The contents of this file are subject to the terms of the Common Development
162.7 - and Distribution License (the License). You may not use this file except in
162.8 - compliance with the License.
162.9 -
162.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
162.11 - or http://www.netbeans.org/cddl.txt.
162.12 -
162.13 - When distributing Covered Code, include this CDDL Header Notice in each file
162.14 - and include the License file at http://www.netbeans.org/cddl.txt.
162.15 - If applicable, add the following below the CDDL Header, with the fields
162.16 - enclosed by brackets [] replaced by your own identifying information:
162.17 - "Portions Copyrighted [year] [name of copyright owner]"
162.18 -
162.19 - The Original Software is NetBeans. The Initial Developer of the Original
162.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
162.21 - Microsystems, Inc. All Rights Reserved.
162.22 --->
162.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
162.24 -
162.25 -<editor_palette_item version="1.0">
162.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
162.27 -
162.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/current-dateTime16.png"/>
162.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/current-dateTime32.png"/>
162.30 -
162.31 - <description
162.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
162.33 - display-name-key="Name-current-dateTime"
162.34 - tooltip-key="Hint-current-dateTime"/>
162.35 -</editor_palette_item>
163.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/current-time.xml Wed Feb 21 08:53:38 2007 +0000
163.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
163.3 @@ -1,32 +0,0 @@
163.4 -<?xml version="1.0" encoding="UTF-8"?>
163.5 -<!--
163.6 - The contents of this file are subject to the terms of the Common Development
163.7 - and Distribution License (the License). You may not use this file except in
163.8 - compliance with the License.
163.9 -
163.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
163.11 - or http://www.netbeans.org/cddl.txt.
163.12 -
163.13 - When distributing Covered Code, include this CDDL Header Notice in each file
163.14 - and include the License file at http://www.netbeans.org/cddl.txt.
163.15 - If applicable, add the following below the CDDL Header, with the fields
163.16 - enclosed by brackets [] replaced by your own identifying information:
163.17 - "Portions Copyrighted [year] [name of copyright owner]"
163.18 -
163.19 - The Original Software is NetBeans. The Initial Developer of the Original
163.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
163.21 - Microsystems, Inc. All Rights Reserved.
163.22 --->
163.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
163.24 -
163.25 -<editor_palette_item version="1.0">
163.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
163.27 -
163.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/current-time16.png"/>
163.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/current-time32.png"/>
163.30 -
163.31 - <description
163.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
163.33 - display-name-key="Name-current-time"
163.34 - tooltip-key="Hint-current-time"/>
163.35 -</editor_palette_item>
164.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/division.xml Wed Feb 21 08:53:38 2007 +0000
164.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
164.3 @@ -1,32 +0,0 @@
164.4 -<?xml version="1.0" encoding="UTF-8"?>
164.5 -<!--
164.6 - The contents of this file are subject to the terms of the Common Development
164.7 - and Distribution License (the License). You may not use this file except in
164.8 - compliance with the License.
164.9 -
164.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
164.11 - or http://www.netbeans.org/cddl.txt.
164.12 -
164.13 - When distributing Covered Code, include this CDDL Header Notice in each file
164.14 - and include the License file at http://www.netbeans.org/cddl.txt.
164.15 - If applicable, add the following below the CDDL Header, with the fields
164.16 - enclosed by brackets [] replaced by your own identifying information:
164.17 - "Portions Copyrighted [year] [name of copyright owner]"
164.18 -
164.19 - The Original Software is NetBeans. The Initial Developer of the Original
164.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
164.21 - Microsystems, Inc. All Rights Reserved.
164.22 --->
164.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
164.24 -
164.25 -<editor_palette_item version="1.0">
164.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
164.27 -
164.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/division16.png"/>
164.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/division32.png"/>
164.30 -
164.31 - <description
164.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
164.33 - display-name-key="Name-division"
164.34 - tooltip-key="Hint-division"/>
164.35 -</editor_palette_item>
165.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/duration-literal.xml Wed Feb 21 08:53:38 2007 +0000
165.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
165.3 @@ -1,32 +0,0 @@
165.4 -<?xml version="1.0" encoding="UTF-8"?>
165.5 -<!--
165.6 - The contents of this file are subject to the terms of the Common Development
165.7 - and Distribution License (the License). You may not use this file except in
165.8 - compliance with the License.
165.9 -
165.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
165.11 - or http://www.netbeans.org/cddl.txt.
165.12 -
165.13 - When distributing Covered Code, include this CDDL Header Notice in each file
165.14 - and include the License file at http://www.netbeans.org/cddl.txt.
165.15 - If applicable, add the following below the CDDL Header, with the fields
165.16 - enclosed by brackets [] replaced by your own identifying information:
165.17 - "Portions Copyrighted [year] [name of copyright owner]"
165.18 -
165.19 - The Original Software is NetBeans. The Initial Developer of the Original
165.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
165.21 - Microsystems, Inc. All Rights Reserved.
165.22 --->
165.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
165.24 -
165.25 -<editor_palette_item version="1.0">
165.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
165.27 -
165.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/duration-literal16.png"/>
165.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/duration-literal32.png"/>
165.30 -
165.31 - <description
165.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
165.33 - display-name-key="Name-duration-literal"
165.34 - tooltip-key="Hint-duration-literal"/>
165.35 -</editor_palette_item>
166.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/equal.xml Wed Feb 21 08:53:38 2007 +0000
166.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
166.3 @@ -1,32 +0,0 @@
166.4 -<?xml version="1.0" encoding="UTF-8"?>
166.5 -<!--
166.6 - The contents of this file are subject to the terms of the Common Development
166.7 - and Distribution License (the License). You may not use this file except in
166.8 - compliance with the License.
166.9 -
166.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
166.11 - or http://www.netbeans.org/cddl.txt.
166.12 -
166.13 - When distributing Covered Code, include this CDDL Header Notice in each file
166.14 - and include the License file at http://www.netbeans.org/cddl.txt.
166.15 - If applicable, add the following below the CDDL Header, with the fields
166.16 - enclosed by brackets [] replaced by your own identifying information:
166.17 - "Portions Copyrighted [year] [name of copyright owner]"
166.18 -
166.19 - The Original Software is NetBeans. The Initial Developer of the Original
166.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
166.21 - Microsystems, Inc. All Rights Reserved.
166.22 --->
166.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
166.24 -
166.25 -<editor_palette_item version="1.0">
166.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
166.27 -
166.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/equal16.png"/>
166.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/equal32.png"/>
166.30 -
166.31 - <description
166.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
166.33 - display-name-key="Name-equal"
166.34 - tooltip-key="Hint-equal"/>
166.35 -</editor_palette_item>
167.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/false.xml Wed Feb 21 08:53:38 2007 +0000
167.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
167.3 @@ -1,32 +0,0 @@
167.4 -<?xml version="1.0" encoding="UTF-8"?>
167.5 -<!--
167.6 - The contents of this file are subject to the terms of the Common Development
167.7 - and Distribution License (the License). You may not use this file except in
167.8 - compliance with the License.
167.9 -
167.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
167.11 - or http://www.netbeans.org/cddl.txt.
167.12 -
167.13 - When distributing Covered Code, include this CDDL Header Notice in each file
167.14 - and include the License file at http://www.netbeans.org/cddl.txt.
167.15 - If applicable, add the following below the CDDL Header, with the fields
167.16 - enclosed by brackets [] replaced by your own identifying information:
167.17 - "Portions Copyrighted [year] [name of copyright owner]"
167.18 -
167.19 - The Original Software is NetBeans. The Initial Developer of the Original
167.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
167.21 - Microsystems, Inc. All Rights Reserved.
167.22 --->
167.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
167.24 -
167.25 -<editor_palette_item version="1.0">
167.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
167.27 -
167.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/false16.png"/>
167.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/false32.png"/>
167.30 -
167.31 - <description
167.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
167.33 - display-name-key="Name-false"
167.34 - tooltip-key="Hint-false"/>
167.35 -</editor_palette_item>
168.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/floor.xml Wed Feb 21 08:53:38 2007 +0000
168.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
168.3 @@ -1,32 +0,0 @@
168.4 -<?xml version="1.0" encoding="UTF-8"?>
168.5 -<!--
168.6 - The contents of this file are subject to the terms of the Common Development
168.7 - and Distribution License (the License). You may not use this file except in
168.8 - compliance with the License.
168.9 -
168.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
168.11 - or http://www.netbeans.org/cddl.txt.
168.12 -
168.13 - When distributing Covered Code, include this CDDL Header Notice in each file
168.14 - and include the License file at http://www.netbeans.org/cddl.txt.
168.15 - If applicable, add the following below the CDDL Header, with the fields
168.16 - enclosed by brackets [] replaced by your own identifying information:
168.17 - "Portions Copyrighted [year] [name of copyright owner]"
168.18 -
168.19 - The Original Software is NetBeans. The Initial Developer of the Original
168.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
168.21 - Microsystems, Inc. All Rights Reserved.
168.22 --->
168.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
168.24 -
168.25 -<editor_palette_item version="1.0">
168.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
168.27 -
168.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/floor16.png"/>
168.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/floor32.png"/>
168.30 -
168.31 - <description
168.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
168.33 - display-name-key="Name-floor"
168.34 - tooltip-key="Hint-floor"/>
168.35 -</editor_palette_item>
169.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/greater_or_equal.xml Wed Feb 21 08:53:38 2007 +0000
169.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
169.3 @@ -1,32 +0,0 @@
169.4 -<?xml version="1.0" encoding="UTF-8"?>
169.5 -<!--
169.6 - The contents of this file are subject to the terms of the Common Development
169.7 - and Distribution License (the License). You may not use this file except in
169.8 - compliance with the License.
169.9 -
169.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
169.11 - or http://www.netbeans.org/cddl.txt.
169.12 -
169.13 - When distributing Covered Code, include this CDDL Header Notice in each file
169.14 - and include the License file at http://www.netbeans.org/cddl.txt.
169.15 - If applicable, add the following below the CDDL Header, with the fields
169.16 - enclosed by brackets [] replaced by your own identifying information:
169.17 - "Portions Copyrighted [year] [name of copyright owner]"
169.18 -
169.19 - The Original Software is NetBeans. The Initial Developer of the Original
169.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
169.21 - Microsystems, Inc. All Rights Reserved.
169.22 --->
169.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
169.24 -
169.25 -<editor_palette_item version="1.0">
169.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
169.27 -
169.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/greater_or_equal16.png"/>
169.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/greater_or_equal32.png"/>
169.30 -
169.31 - <description
169.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
169.33 - display-name-key="Name-greater_or_equal"
169.34 - tooltip-key="Hint-greater_or_equal"/>
169.35 -</editor_palette_item>
170.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/greater_than.xml Wed Feb 21 08:53:38 2007 +0000
170.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
170.3 @@ -1,32 +0,0 @@
170.4 -<?xml version="1.0" encoding="UTF-8"?>
170.5 -<!--
170.6 - The contents of this file are subject to the terms of the Common Development
170.7 - and Distribution License (the License). You may not use this file except in
170.8 - compliance with the License.
170.9 -
170.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
170.11 - or http://www.netbeans.org/cddl.txt.
170.12 -
170.13 - When distributing Covered Code, include this CDDL Header Notice in each file
170.14 - and include the License file at http://www.netbeans.org/cddl.txt.
170.15 - If applicable, add the following below the CDDL Header, with the fields
170.16 - enclosed by brackets [] replaced by your own identifying information:
170.17 - "Portions Copyrighted [year] [name of copyright owner]"
170.18 -
170.19 - The Original Software is NetBeans. The Initial Developer of the Original
170.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
170.21 - Microsystems, Inc. All Rights Reserved.
170.22 --->
170.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
170.24 -
170.25 -<editor_palette_item version="1.0">
170.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
170.27 -
170.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/greater_than16.png"/>
170.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/greater_than32.png"/>
170.30 -
170.31 - <description
170.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
170.33 - display-name-key="Name-greater_than"
170.34 - tooltip-key="Hint-greater_than"/>
170.35 -</editor_palette_item>
171.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/lang.xml Wed Feb 21 08:53:38 2007 +0000
171.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
171.3 @@ -1,32 +0,0 @@
171.4 -<?xml version="1.0" encoding="UTF-8"?>
171.5 -<!--
171.6 - The contents of this file are subject to the terms of the Common Development
171.7 - and Distribution License (the License). You may not use this file except in
171.8 - compliance with the License.
171.9 -
171.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
171.11 - or http://www.netbeans.org/cddl.txt.
171.12 -
171.13 - When distributing Covered Code, include this CDDL Header Notice in each file
171.14 - and include the License file at http://www.netbeans.org/cddl.txt.
171.15 - If applicable, add the following below the CDDL Header, with the fields
171.16 - enclosed by brackets [] replaced by your own identifying information:
171.17 - "Portions Copyrighted [year] [name of copyright owner]"
171.18 -
171.19 - The Original Software is NetBeans. The Initial Developer of the Original
171.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
171.21 - Microsystems, Inc. All Rights Reserved.
171.22 --->
171.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
171.24 -
171.25 -<editor_palette_item version="1.0">
171.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
171.27 -
171.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/lang16.png"/>
171.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/lang32.png"/>
171.30 -
171.31 - <description
171.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
171.33 - display-name-key="Name-lang"
171.34 - tooltip-key="Hint-lang"/>
171.35 -</editor_palette_item>
172.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/last.xml Wed Feb 21 08:53:38 2007 +0000
172.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
172.3 @@ -1,32 +0,0 @@
172.4 -<?xml version="1.0" encoding="UTF-8"?>
172.5 -<!--
172.6 - The contents of this file are subject to the terms of the Common Development
172.7 - and Distribution License (the License). You may not use this file except in
172.8 - compliance with the License.
172.9 -
172.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
172.11 - or http://www.netbeans.org/cddl.txt.
172.12 -
172.13 - When distributing Covered Code, include this CDDL Header Notice in each file
172.14 - and include the License file at http://www.netbeans.org/cddl.txt.
172.15 - If applicable, add the following below the CDDL Header, with the fields
172.16 - enclosed by brackets [] replaced by your own identifying information:
172.17 - "Portions Copyrighted [year] [name of copyright owner]"
172.18 -
172.19 - The Original Software is NetBeans. The Initial Developer of the Original
172.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
172.21 - Microsystems, Inc. All Rights Reserved.
172.22 --->
172.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
172.24 -
172.25 -<editor_palette_item version="1.0">
172.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
172.27 -
172.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/last16.png"/>
172.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/last32.png"/>
172.30 -
172.31 - <description
172.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
172.33 - display-name-key="Name-last"
172.34 - tooltip-key="Hint-last"/>
172.35 -</editor_palette_item>
173.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/less_or_equal.xml Wed Feb 21 08:53:38 2007 +0000
173.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
173.3 @@ -1,32 +0,0 @@
173.4 -<?xml version="1.0" encoding="UTF-8"?>
173.5 -<!--
173.6 - The contents of this file are subject to the terms of the Common Development
173.7 - and Distribution License (the License). You may not use this file except in
173.8 - compliance with the License.
173.9 -
173.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
173.11 - or http://www.netbeans.org/cddl.txt.
173.12 -
173.13 - When distributing Covered Code, include this CDDL Header Notice in each file
173.14 - and include the License file at http://www.netbeans.org/cddl.txt.
173.15 - If applicable, add the following below the CDDL Header, with the fields
173.16 - enclosed by brackets [] replaced by your own identifying information:
173.17 - "Portions Copyrighted [year] [name of copyright owner]"
173.18 -
173.19 - The Original Software is NetBeans. The Initial Developer of the Original
173.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
173.21 - Microsystems, Inc. All Rights Reserved.
173.22 --->
173.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
173.24 -
173.25 -<editor_palette_item version="1.0">
173.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
173.27 -
173.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/less_or_equal16.png"/>
173.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/less_or_equal32.png"/>
173.30 -
173.31 - <description
173.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
173.33 - display-name-key="Name-less_or_equal"
173.34 - tooltip-key="Hint-less_or_equal"/>
173.35 -</editor_palette_item>
174.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/less_than.xml Wed Feb 21 08:53:38 2007 +0000
174.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
174.3 @@ -1,32 +0,0 @@
174.4 -<?xml version="1.0" encoding="UTF-8"?>
174.5 -<!--
174.6 - The contents of this file are subject to the terms of the Common Development
174.7 - and Distribution License (the License). You may not use this file except in
174.8 - compliance with the License.
174.9 -
174.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
174.11 - or http://www.netbeans.org/cddl.txt.
174.12 -
174.13 - When distributing Covered Code, include this CDDL Header Notice in each file
174.14 - and include the License file at http://www.netbeans.org/cddl.txt.
174.15 - If applicable, add the following below the CDDL Header, with the fields
174.16 - enclosed by brackets [] replaced by your own identifying information:
174.17 - "Portions Copyrighted [year] [name of copyright owner]"
174.18 -
174.19 - The Original Software is NetBeans. The Initial Developer of the Original
174.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
174.21 - Microsystems, Inc. All Rights Reserved.
174.22 --->
174.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
174.24 -
174.25 -<editor_palette_item version="1.0">
174.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
174.27 -
174.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/less_than16.png"/>
174.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/less_than32.png"/>
174.30 -
174.31 - <description
174.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
174.33 - display-name-key="Name-less_than"
174.34 - tooltip-key="Hint-less_than"/>
174.35 -</editor_palette_item>
175.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/local-name.xml Wed Feb 21 08:53:38 2007 +0000
175.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
175.3 @@ -1,32 +0,0 @@
175.4 -<?xml version="1.0" encoding="UTF-8"?>
175.5 -<!--
175.6 - The contents of this file are subject to the terms of the Common Development
175.7 - and Distribution License (the License). You may not use this file except in
175.8 - compliance with the License.
175.9 -
175.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
175.11 - or http://www.netbeans.org/cddl.txt.
175.12 -
175.13 - When distributing Covered Code, include this CDDL Header Notice in each file
175.14 - and include the License file at http://www.netbeans.org/cddl.txt.
175.15 - If applicable, add the following below the CDDL Header, with the fields
175.16 - enclosed by brackets [] replaced by your own identifying information:
175.17 - "Portions Copyrighted [year] [name of copyright owner]"
175.18 -
175.19 - The Original Software is NetBeans. The Initial Developer of the Original
175.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
175.21 - Microsystems, Inc. All Rights Reserved.
175.22 --->
175.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
175.24 -
175.25 -<editor_palette_item version="1.0">
175.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
175.27 -
175.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/local-name16.png"/>
175.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/local-name32.png"/>
175.30 -
175.31 - <description
175.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
175.33 - display-name-key="Name-local-name"
175.34 - tooltip-key="Hint-local-name"/>
175.35 -</editor_palette_item>
176.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/mod.xml Wed Feb 21 08:53:38 2007 +0000
176.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
176.3 @@ -1,32 +0,0 @@
176.4 -<?xml version="1.0" encoding="UTF-8"?>
176.5 -<!--
176.6 - The contents of this file are subject to the terms of the Common Development
176.7 - and Distribution License (the License). You may not use this file except in
176.8 - compliance with the License.
176.9 -
176.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
176.11 - or http://www.netbeans.org/cddl.txt.
176.12 -
176.13 - When distributing Covered Code, include this CDDL Header Notice in each file
176.14 - and include the License file at http://www.netbeans.org/cddl.txt.
176.15 - If applicable, add the following below the CDDL Header, with the fields
176.16 - enclosed by brackets [] replaced by your own identifying information:
176.17 - "Portions Copyrighted [year] [name of copyright owner]"
176.18 -
176.19 - The Original Software is NetBeans. The Initial Developer of the Original
176.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
176.21 - Microsystems, Inc. All Rights Reserved.
176.22 --->
176.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
176.24 -
176.25 -<editor_palette_item version="1.0">
176.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
176.27 -
176.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/mod16.png"/>
176.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/mod32.png"/>
176.30 -
176.31 - <description
176.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
176.33 - display-name-key="Name-mod"
176.34 - tooltip-key="Hint-mod"/>
176.35 -</editor_palette_item>
177.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/multiplication.xml Wed Feb 21 08:53:38 2007 +0000
177.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
177.3 @@ -1,32 +0,0 @@
177.4 -<?xml version="1.0" encoding="UTF-8"?>
177.5 -<!--
177.6 - The contents of this file are subject to the terms of the Common Development
177.7 - and Distribution License (the License). You may not use this file except in
177.8 - compliance with the License.
177.9 -
177.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
177.11 - or http://www.netbeans.org/cddl.txt.
177.12 -
177.13 - When distributing Covered Code, include this CDDL Header Notice in each file
177.14 - and include the License file at http://www.netbeans.org/cddl.txt.
177.15 - If applicable, add the following below the CDDL Header, with the fields
177.16 - enclosed by brackets [] replaced by your own identifying information:
177.17 - "Portions Copyrighted [year] [name of copyright owner]"
177.18 -
177.19 - The Original Software is NetBeans. The Initial Developer of the Original
177.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
177.21 - Microsystems, Inc. All Rights Reserved.
177.22 --->
177.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
177.24 -
177.25 -<editor_palette_item version="1.0">
177.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
177.27 -
177.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/multiplication16.png"/>
177.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/multiplication32.png"/>
177.30 -
177.31 - <description
177.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
177.33 - display-name-key="Name-multiplication"
177.34 - tooltip-key="Hint-multiplication"/>
177.35 -</editor_palette_item>
178.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/name.xml Wed Feb 21 08:53:38 2007 +0000
178.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
178.3 @@ -1,32 +0,0 @@
178.4 -<?xml version="1.0" encoding="UTF-8"?>
178.5 -<!--
178.6 - The contents of this file are subject to the terms of the Common Development
178.7 - and Distribution License (the License). You may not use this file except in
178.8 - compliance with the License.
178.9 -
178.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
178.11 - or http://www.netbeans.org/cddl.txt.
178.12 -
178.13 - When distributing Covered Code, include this CDDL Header Notice in each file
178.14 - and include the License file at http://www.netbeans.org/cddl.txt.
178.15 - If applicable, add the following below the CDDL Header, with the fields
178.16 - enclosed by brackets [] replaced by your own identifying information:
178.17 - "Portions Copyrighted [year] [name of copyright owner]"
178.18 -
178.19 - The Original Software is NetBeans. The Initial Developer of the Original
178.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
178.21 - Microsystems, Inc. All Rights Reserved.
178.22 --->
178.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
178.24 -
178.25 -<editor_palette_item version="1.0">
178.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
178.27 -
178.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/name16.png"/>
178.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/name32.png"/>
178.30 -
178.31 - <description
178.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
178.33 - display-name-key="Name-name"
178.34 - tooltip-key="Hint-name"/>
178.35 -</editor_palette_item>
179.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/namespace-uri.xml Wed Feb 21 08:53:38 2007 +0000
179.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
179.3 @@ -1,32 +0,0 @@
179.4 -<?xml version="1.0" encoding="UTF-8"?>
179.5 -<!--
179.6 - The contents of this file are subject to the terms of the Common Development
179.7 - and Distribution License (the License). You may not use this file except in
179.8 - compliance with the License.
179.9 -
179.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
179.11 - or http://www.netbeans.org/cddl.txt.
179.12 -
179.13 - When distributing Covered Code, include this CDDL Header Notice in each file
179.14 - and include the License file at http://www.netbeans.org/cddl.txt.
179.15 - If applicable, add the following below the CDDL Header, with the fields
179.16 - enclosed by brackets [] replaced by your own identifying information:
179.17 - "Portions Copyrighted [year] [name of copyright owner]"
179.18 -
179.19 - The Original Software is NetBeans. The Initial Developer of the Original
179.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
179.21 - Microsystems, Inc. All Rights Reserved.
179.22 --->
179.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
179.24 -
179.25 -<editor_palette_item version="1.0">
179.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
179.27 -
179.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/namespace-uri16.png"/>
179.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/namespace-uri32.png"/>
179.30 -
179.31 - <description
179.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
179.33 - display-name-key="Name-namespace-uri"
179.34 - tooltip-key="Hint-namespace-uri"/>
179.35 -</editor_palette_item>
180.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/negative.xml Wed Feb 21 08:53:38 2007 +0000
180.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
180.3 @@ -1,32 +0,0 @@
180.4 -<?xml version="1.0" encoding="UTF-8"?>
180.5 -<!--
180.6 - The contents of this file are subject to the terms of the Common Development
180.7 - and Distribution License (the License). You may not use this file except in
180.8 - compliance with the License.
180.9 -
180.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
180.11 - or http://www.netbeans.org/cddl.txt.
180.12 -
180.13 - When distributing Covered Code, include this CDDL Header Notice in each file
180.14 - and include the License file at http://www.netbeans.org/cddl.txt.
180.15 - If applicable, add the following below the CDDL Header, with the fields
180.16 - enclosed by brackets [] replaced by your own identifying information:
180.17 - "Portions Copyrighted [year] [name of copyright owner]"
180.18 -
180.19 - The Original Software is NetBeans. The Initial Developer of the Original
180.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
180.21 - Microsystems, Inc. All Rights Reserved.
180.22 --->
180.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
180.24 -
180.25 -<editor_palette_item version="1.0">
180.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
180.27 -
180.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/negative16.png"/>
180.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/negative32.png"/>
180.30 -
180.31 - <description
180.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
180.33 - display-name-key="Name-negative"
180.34 - tooltip-key="Hint-negative"/>
180.35 -</editor_palette_item>
181.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/normalize-space.xml Wed Feb 21 08:53:38 2007 +0000
181.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
181.3 @@ -1,32 +0,0 @@
181.4 -<?xml version="1.0" encoding="UTF-8"?>
181.5 -<!--
181.6 - The contents of this file are subject to the terms of the Common Development
181.7 - and Distribution License (the License). You may not use this file except in
181.8 - compliance with the License.
181.9 -
181.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
181.11 - or http://www.netbeans.org/cddl.txt.
181.12 -
181.13 - When distributing Covered Code, include this CDDL Header Notice in each file
181.14 - and include the License file at http://www.netbeans.org/cddl.txt.
181.15 - If applicable, add the following below the CDDL Header, with the fields
181.16 - enclosed by brackets [] replaced by your own identifying information:
181.17 - "Portions Copyrighted [year] [name of copyright owner]"
181.18 -
181.19 - The Original Software is NetBeans. The Initial Developer of the Original
181.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
181.21 - Microsystems, Inc. All Rights Reserved.
181.22 --->
181.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
181.24 -
181.25 -<editor_palette_item version="1.0">
181.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
181.27 -
181.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/normalize-space16.png"/>
181.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/normalize-space32.png"/>
181.30 -
181.31 - <description
181.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
181.33 - display-name-key="Name-normalize-space"
181.34 - tooltip-key="Hint-normalize-space"/>
181.35 -</editor_palette_item>
182.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/not.xml Wed Feb 21 08:53:38 2007 +0000
182.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
182.3 @@ -1,32 +0,0 @@
182.4 -<?xml version="1.0" encoding="UTF-8"?>
182.5 -<!--
182.6 - The contents of this file are subject to the terms of the Common Development
182.7 - and Distribution License (the License). You may not use this file except in
182.8 - compliance with the License.
182.9 -
182.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
182.11 - or http://www.netbeans.org/cddl.txt.
182.12 -
182.13 - When distributing Covered Code, include this CDDL Header Notice in each file
182.14 - and include the License file at http://www.netbeans.org/cddl.txt.
182.15 - If applicable, add the following below the CDDL Header, with the fields
182.16 - enclosed by brackets [] replaced by your own identifying information:
182.17 - "Portions Copyrighted [year] [name of copyright owner]"
182.18 -
182.19 - The Original Software is NetBeans. The Initial Developer of the Original
182.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
182.21 - Microsystems, Inc. All Rights Reserved.
182.22 --->
182.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
182.24 -
182.25 -<editor_palette_item version="1.0">
182.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
182.27 -
182.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/not16.png"/>
182.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/not32.png"/>
182.30 -
182.31 - <description
182.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
182.33 - display-name-key="Name-not"
182.34 - tooltip-key="Hint-not"/>
182.35 -</editor_palette_item>
183.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/not_equal.xml Wed Feb 21 08:53:38 2007 +0000
183.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
183.3 @@ -1,32 +0,0 @@
183.4 -<?xml version="1.0" encoding="UTF-8"?>
183.5 -<!--
183.6 - The contents of this file are subject to the terms of the Common Development
183.7 - and Distribution License (the License). You may not use this file except in
183.8 - compliance with the License.
183.9 -
183.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
183.11 - or http://www.netbeans.org/cddl.txt.
183.12 -
183.13 - When distributing Covered Code, include this CDDL Header Notice in each file
183.14 - and include the License file at http://www.netbeans.org/cddl.txt.
183.15 - If applicable, add the following below the CDDL Header, with the fields
183.16 - enclosed by brackets [] replaced by your own identifying information:
183.17 - "Portions Copyrighted [year] [name of copyright owner]"
183.18 -
183.19 - The Original Software is NetBeans. The Initial Developer of the Original
183.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
183.21 - Microsystems, Inc. All Rights Reserved.
183.22 --->
183.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
183.24 -
183.25 -<editor_palette_item version="1.0">
183.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
183.27 -
183.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/not_equal16.png"/>
183.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/not_equal32.png"/>
183.30 -
183.31 - <description
183.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
183.33 - display-name-key="Name-not_equal"
183.34 - tooltip-key="Hint-not_equal"/>
183.35 -</editor_palette_item>
184.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/number-literal.xml Wed Feb 21 08:53:38 2007 +0000
184.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
184.3 @@ -1,32 +0,0 @@
184.4 -<?xml version="1.0" encoding="UTF-8"?>
184.5 -<!--
184.6 - The contents of this file are subject to the terms of the Common Development
184.7 - and Distribution License (the License). You may not use this file except in
184.8 - compliance with the License.
184.9 -
184.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
184.11 - or http://www.netbeans.org/cddl.txt.
184.12 -
184.13 - When distributing Covered Code, include this CDDL Header Notice in each file
184.14 - and include the License file at http://www.netbeans.org/cddl.txt.
184.15 - If applicable, add the following below the CDDL Header, with the fields
184.16 - enclosed by brackets [] replaced by your own identifying information:
184.17 - "Portions Copyrighted [year] [name of copyright owner]"
184.18 -
184.19 - The Original Software is NetBeans. The Initial Developer of the Original
184.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
184.21 - Microsystems, Inc. All Rights Reserved.
184.22 --->
184.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
184.24 -
184.25 -<editor_palette_item version="1.0">
184.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
184.27 -
184.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/number-literal16.png"/>
184.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/number-literal32.png"/>
184.30 -
184.31 - <description
184.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
184.33 - display-name-key="Name-number-literal"
184.34 - tooltip-key="Hint-number-literal"/>
184.35 -</editor_palette_item>
185.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/number.xml Wed Feb 21 08:53:38 2007 +0000
185.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
185.3 @@ -1,32 +0,0 @@
185.4 -<?xml version="1.0" encoding="UTF-8"?>
185.5 -<!--
185.6 - The contents of this file are subject to the terms of the Common Development
185.7 - and Distribution License (the License). You may not use this file except in
185.8 - compliance with the License.
185.9 -
185.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
185.11 - or http://www.netbeans.org/cddl.txt.
185.12 -
185.13 - When distributing Covered Code, include this CDDL Header Notice in each file
185.14 - and include the License file at http://www.netbeans.org/cddl.txt.
185.15 - If applicable, add the following below the CDDL Header, with the fields
185.16 - enclosed by brackets [] replaced by your own identifying information:
185.17 - "Portions Copyrighted [year] [name of copyright owner]"
185.18 -
185.19 - The Original Software is NetBeans. The Initial Developer of the Original
185.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
185.21 - Microsystems, Inc. All Rights Reserved.
185.22 --->
185.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
185.24 -
185.25 -<editor_palette_item version="1.0">
185.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
185.27 -
185.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/number16.png"/>
185.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/number32.png"/>
185.30 -
185.31 - <description
185.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
185.33 - display-name-key="Name-number"
185.34 - tooltip-key="Hint-number"/>
185.35 -</editor_palette_item>
186.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/or.xml Wed Feb 21 08:53:38 2007 +0000
186.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
186.3 @@ -1,32 +0,0 @@
186.4 -<?xml version="1.0" encoding="UTF-8"?>
186.5 -<!--
186.6 - The contents of this file are subject to the terms of the Common Development
186.7 - and Distribution License (the License). You may not use this file except in
186.8 - compliance with the License.
186.9 -
186.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
186.11 - or http://www.netbeans.org/cddl.txt.
186.12 -
186.13 - When distributing Covered Code, include this CDDL Header Notice in each file
186.14 - and include the License file at http://www.netbeans.org/cddl.txt.
186.15 - If applicable, add the following below the CDDL Header, with the fields
186.16 - enclosed by brackets [] replaced by your own identifying information:
186.17 - "Portions Copyrighted [year] [name of copyright owner]"
186.18 -
186.19 - The Original Software is NetBeans. The Initial Developer of the Original
186.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
186.21 - Microsystems, Inc. All Rights Reserved.
186.22 --->
186.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
186.24 -
186.25 -<editor_palette_item version="1.0">
186.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
186.27 -
186.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/or16.png"/>
186.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/or32.png"/>
186.30 -
186.31 - <description
186.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
186.33 - display-name-key="Name-or"
186.34 - tooltip-key="Hint-or"/>
186.35 -</editor_palette_item>
187.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/position.xml Wed Feb 21 08:53:38 2007 +0000
187.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
187.3 @@ -1,32 +0,0 @@
187.4 -<?xml version="1.0" encoding="UTF-8"?>
187.5 -<!--
187.6 - The contents of this file are subject to the terms of the Common Development
187.7 - and Distribution License (the License). You may not use this file except in
187.8 - compliance with the License.
187.9 -
187.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
187.11 - or http://www.netbeans.org/cddl.txt.
187.12 -
187.13 - When distributing Covered Code, include this CDDL Header Notice in each file
187.14 - and include the License file at http://www.netbeans.org/cddl.txt.
187.15 - If applicable, add the following below the CDDL Header, with the fields
187.16 - enclosed by brackets [] replaced by your own identifying information:
187.17 - "Portions Copyrighted [year] [name of copyright owner]"
187.18 -
187.19 - The Original Software is NetBeans. The Initial Developer of the Original
187.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
187.21 - Microsystems, Inc. All Rights Reserved.
187.22 --->
187.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
187.24 -
187.25 -<editor_palette_item version="1.0">
187.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
187.27 -
187.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/position16.png"/>
187.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/position32.png"/>
187.30 -
187.31 - <description
187.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
187.33 - display-name-key="Name-position"
187.34 - tooltip-key="Hint-position"/>
187.35 -</editor_palette_item>
188.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/round.xml Wed Feb 21 08:53:38 2007 +0000
188.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
188.3 @@ -1,32 +0,0 @@
188.4 -<?xml version="1.0" encoding="UTF-8"?>
188.5 -<!--
188.6 - The contents of this file are subject to the terms of the Common Development
188.7 - and Distribution License (the License). You may not use this file except in
188.8 - compliance with the License.
188.9 -
188.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
188.11 - or http://www.netbeans.org/cddl.txt.
188.12 -
188.13 - When distributing Covered Code, include this CDDL Header Notice in each file
188.14 - and include the License file at http://www.netbeans.org/cddl.txt.
188.15 - If applicable, add the following below the CDDL Header, with the fields
188.16 - enclosed by brackets [] replaced by your own identifying information:
188.17 - "Portions Copyrighted [year] [name of copyright owner]"
188.18 -
188.19 - The Original Software is NetBeans. The Initial Developer of the Original
188.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
188.21 - Microsystems, Inc. All Rights Reserved.
188.22 --->
188.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
188.24 -
188.25 -<editor_palette_item version="1.0">
188.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
188.27 -
188.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/round16.png"/>
188.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/round32.png"/>
188.30 -
188.31 - <description
188.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
188.33 - display-name-key="Name-round"
188.34 - tooltip-key="Hint-round"/>
188.35 -</editor_palette_item>
189.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/starts-with.xml Wed Feb 21 08:53:38 2007 +0000
189.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
189.3 @@ -1,32 +0,0 @@
189.4 -<?xml version="1.0" encoding="UTF-8"?>
189.5 -<!--
189.6 - The contents of this file are subject to the terms of the Common Development
189.7 - and Distribution License (the License). You may not use this file except in
189.8 - compliance with the License.
189.9 -
189.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
189.11 - or http://www.netbeans.org/cddl.txt.
189.12 -
189.13 - When distributing Covered Code, include this CDDL Header Notice in each file
189.14 - and include the License file at http://www.netbeans.org/cddl.txt.
189.15 - If applicable, add the following below the CDDL Header, with the fields
189.16 - enclosed by brackets [] replaced by your own identifying information:
189.17 - "Portions Copyrighted [year] [name of copyright owner]"
189.18 -
189.19 - The Original Software is NetBeans. The Initial Developer of the Original
189.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
189.21 - Microsystems, Inc. All Rights Reserved.
189.22 --->
189.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
189.24 -
189.25 -<editor_palette_item version="1.0">
189.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
189.27 -
189.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/starts-with16.png"/>
189.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/starts-with32.png"/>
189.30 -
189.31 - <description
189.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
189.33 - display-name-key="Name-starts-with"
189.34 - tooltip-key="Hint-starts-with"/>
189.35 -</editor_palette_item>
190.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/string-length.xml Wed Feb 21 08:53:38 2007 +0000
190.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
190.3 @@ -1,32 +0,0 @@
190.4 -<?xml version="1.0" encoding="UTF-8"?>
190.5 -<!--
190.6 - The contents of this file are subject to the terms of the Common Development
190.7 - and Distribution License (the License). You may not use this file except in
190.8 - compliance with the License.
190.9 -
190.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
190.11 - or http://www.netbeans.org/cddl.txt.
190.12 -
190.13 - When distributing Covered Code, include this CDDL Header Notice in each file
190.14 - and include the License file at http://www.netbeans.org/cddl.txt.
190.15 - If applicable, add the following below the CDDL Header, with the fields
190.16 - enclosed by brackets [] replaced by your own identifying information:
190.17 - "Portions Copyrighted [year] [name of copyright owner]"
190.18 -
190.19 - The Original Software is NetBeans. The Initial Developer of the Original
190.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
190.21 - Microsystems, Inc. All Rights Reserved.
190.22 --->
190.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
190.24 -
190.25 -<editor_palette_item version="1.0">
190.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
190.27 -
190.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/string-length16.png"/>
190.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/string-length32.png"/>
190.30 -
190.31 - <description
190.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
190.33 - display-name-key="Name-string-length"
190.34 - tooltip-key="Hint-string-length"/>
190.35 -</editor_palette_item>
191.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/string-literal.xml Wed Feb 21 08:53:38 2007 +0000
191.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
191.3 @@ -1,32 +0,0 @@
191.4 -<?xml version="1.0" encoding="UTF-8"?>
191.5 -<!--
191.6 - The contents of this file are subject to the terms of the Common Development
191.7 - and Distribution License (the License). You may not use this file except in
191.8 - compliance with the License.
191.9 -
191.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
191.11 - or http://www.netbeans.org/cddl.txt.
191.12 -
191.13 - When distributing Covered Code, include this CDDL Header Notice in each file
191.14 - and include the License file at http://www.netbeans.org/cddl.txt.
191.15 - If applicable, add the following below the CDDL Header, with the fields
191.16 - enclosed by brackets [] replaced by your own identifying information:
191.17 - "Portions Copyrighted [year] [name of copyright owner]"
191.18 -
191.19 - The Original Software is NetBeans. The Initial Developer of the Original
191.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
191.21 - Microsystems, Inc. All Rights Reserved.
191.22 --->
191.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
191.24 -
191.25 -<editor_palette_item version="1.0">
191.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
191.27 -
191.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/string-literal16.png"/>
191.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/string-literal32.png"/>
191.30 -
191.31 - <description
191.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
191.33 - display-name-key="Name-string-literal"
191.34 - tooltip-key="Hint-string-literal"/>
191.35 -</editor_palette_item>
192.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/string.xml Wed Feb 21 08:53:38 2007 +0000
192.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
192.3 @@ -1,32 +0,0 @@
192.4 -<?xml version="1.0" encoding="UTF-8"?>
192.5 -<!--
192.6 - The contents of this file are subject to the terms of the Common Development
192.7 - and Distribution License (the License). You may not use this file except in
192.8 - compliance with the License.
192.9 -
192.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
192.11 - or http://www.netbeans.org/cddl.txt.
192.12 -
192.13 - When distributing Covered Code, include this CDDL Header Notice in each file
192.14 - and include the License file at http://www.netbeans.org/cddl.txt.
192.15 - If applicable, add the following below the CDDL Header, with the fields
192.16 - enclosed by brackets [] replaced by your own identifying information:
192.17 - "Portions Copyrighted [year] [name of copyright owner]"
192.18 -
192.19 - The Original Software is NetBeans. The Initial Developer of the Original
192.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
192.21 - Microsystems, Inc. All Rights Reserved.
192.22 --->
192.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
192.24 -
192.25 -<editor_palette_item version="1.0">
192.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
192.27 -
192.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/string16.png"/>
192.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/string32.png"/>
192.30 -
192.31 - <description
192.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
192.33 - display-name-key="Name-string"
192.34 - tooltip-key="Hint-string"/>
192.35 -</editor_palette_item>
193.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/substring-after.xml Wed Feb 21 08:53:38 2007 +0000
193.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
193.3 @@ -1,32 +0,0 @@
193.4 -<?xml version="1.0" encoding="UTF-8"?>
193.5 -<!--
193.6 - The contents of this file are subject to the terms of the Common Development
193.7 - and Distribution License (the License). You may not use this file except in
193.8 - compliance with the License.
193.9 -
193.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
193.11 - or http://www.netbeans.org/cddl.txt.
193.12 -
193.13 - When distributing Covered Code, include this CDDL Header Notice in each file
193.14 - and include the License file at http://www.netbeans.org/cddl.txt.
193.15 - If applicable, add the following below the CDDL Header, with the fields
193.16 - enclosed by brackets [] replaced by your own identifying information:
193.17 - "Portions Copyrighted [year] [name of copyright owner]"
193.18 -
193.19 - The Original Software is NetBeans. The Initial Developer of the Original
193.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
193.21 - Microsystems, Inc. All Rights Reserved.
193.22 --->
193.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
193.24 -
193.25 -<editor_palette_item version="1.0">
193.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
193.27 -
193.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/substring-after16.png"/>
193.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/substring-after32.png"/>
193.30 -
193.31 - <description
193.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
193.33 - display-name-key="Name-substring-after"
193.34 - tooltip-key="Hint-substring-after"/>
193.35 -</editor_palette_item>
194.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/substring-before.xml Wed Feb 21 08:53:38 2007 +0000
194.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
194.3 @@ -1,32 +0,0 @@
194.4 -<?xml version="1.0" encoding="UTF-8"?>
194.5 -<!--
194.6 - The contents of this file are subject to the terms of the Common Development
194.7 - and Distribution License (the License). You may not use this file except in
194.8 - compliance with the License.
194.9 -
194.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
194.11 - or http://www.netbeans.org/cddl.txt.
194.12 -
194.13 - When distributing Covered Code, include this CDDL Header Notice in each file
194.14 - and include the License file at http://www.netbeans.org/cddl.txt.
194.15 - If applicable, add the following below the CDDL Header, with the fields
194.16 - enclosed by brackets [] replaced by your own identifying information:
194.17 - "Portions Copyrighted [year] [name of copyright owner]"
194.18 -
194.19 - The Original Software is NetBeans. The Initial Developer of the Original
194.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
194.21 - Microsystems, Inc. All Rights Reserved.
194.22 --->
194.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
194.24 -
194.25 -<editor_palette_item version="1.0">
194.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
194.27 -
194.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/substring-before16.png"/>
194.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/substring-before32.png"/>
194.30 -
194.31 - <description
194.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
194.33 - display-name-key="Name-substring-before"
194.34 - tooltip-key="Hint-substring-before"/>
194.35 -</editor_palette_item>
195.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/substring.xml Wed Feb 21 08:53:38 2007 +0000
195.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
195.3 @@ -1,32 +0,0 @@
195.4 -<?xml version="1.0" encoding="UTF-8"?>
195.5 -<!--
195.6 - The contents of this file are subject to the terms of the Common Development
195.7 - and Distribution License (the License). You may not use this file except in
195.8 - compliance with the License.
195.9 -
195.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
195.11 - or http://www.netbeans.org/cddl.txt.
195.12 -
195.13 - When distributing Covered Code, include this CDDL Header Notice in each file
195.14 - and include the License file at http://www.netbeans.org/cddl.txt.
195.15 - If applicable, add the following below the CDDL Header, with the fields
195.16 - enclosed by brackets [] replaced by your own identifying information:
195.17 - "Portions Copyrighted [year] [name of copyright owner]"
195.18 -
195.19 - The Original Software is NetBeans. The Initial Developer of the Original
195.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
195.21 - Microsystems, Inc. All Rights Reserved.
195.22 --->
195.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
195.24 -
195.25 -<editor_palette_item version="1.0">
195.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
195.27 -
195.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/substring16.png"/>
195.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/substring32.png"/>
195.30 -
195.31 - <description
195.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
195.33 - display-name-key="Name-substring"
195.34 - tooltip-key="Hint-substring"/>
195.35 -</editor_palette_item>
196.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/subtraction.xml Wed Feb 21 08:53:38 2007 +0000
196.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
196.3 @@ -1,32 +0,0 @@
196.4 -<?xml version="1.0" encoding="UTF-8"?>
196.5 -<!--
196.6 - The contents of this file are subject to the terms of the Common Development
196.7 - and Distribution License (the License). You may not use this file except in
196.8 - compliance with the License.
196.9 -
196.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
196.11 - or http://www.netbeans.org/cddl.txt.
196.12 -
196.13 - When distributing Covered Code, include this CDDL Header Notice in each file
196.14 - and include the License file at http://www.netbeans.org/cddl.txt.
196.15 - If applicable, add the following below the CDDL Header, with the fields
196.16 - enclosed by brackets [] replaced by your own identifying information:
196.17 - "Portions Copyrighted [year] [name of copyright owner]"
196.18 -
196.19 - The Original Software is NetBeans. The Initial Developer of the Original
196.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
196.21 - Microsystems, Inc. All Rights Reserved.
196.22 --->
196.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
196.24 -
196.25 -<editor_palette_item version="1.0">
196.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
196.27 -
196.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/subtraction16.png"/>
196.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/subtraction32.png"/>
196.30 -
196.31 - <description
196.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
196.33 - display-name-key="Name-subtraction"
196.34 - tooltip-key="Hint-subtraction"/>
196.35 -</editor_palette_item>
197.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/sum.xml Wed Feb 21 08:53:38 2007 +0000
197.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
197.3 @@ -1,32 +0,0 @@
197.4 -<?xml version="1.0" encoding="UTF-8"?>
197.5 -<!--
197.6 - The contents of this file are subject to the terms of the Common Development
197.7 - and Distribution License (the License). You may not use this file except in
197.8 - compliance with the License.
197.9 -
197.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
197.11 - or http://www.netbeans.org/cddl.txt.
197.12 -
197.13 - When distributing Covered Code, include this CDDL Header Notice in each file
197.14 - and include the License file at http://www.netbeans.org/cddl.txt.
197.15 - If applicable, add the following below the CDDL Header, with the fields
197.16 - enclosed by brackets [] replaced by your own identifying information:
197.17 - "Portions Copyrighted [year] [name of copyright owner]"
197.18 -
197.19 - The Original Software is NetBeans. The Initial Developer of the Original
197.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
197.21 - Microsystems, Inc. All Rights Reserved.
197.22 --->
197.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
197.24 -
197.25 -<editor_palette_item version="1.0">
197.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
197.27 -
197.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/sum16.png"/>
197.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/sum32.png"/>
197.30 -
197.31 - <description
197.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
197.33 - display-name-key="Name-sum"
197.34 - tooltip-key="Hint-sum"/>
197.35 -</editor_palette_item>
198.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/translate.xml Wed Feb 21 08:53:38 2007 +0000
198.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
198.3 @@ -1,32 +0,0 @@
198.4 -<?xml version="1.0" encoding="UTF-8"?>
198.5 -<!--
198.6 - The contents of this file are subject to the terms of the Common Development
198.7 - and Distribution License (the License). You may not use this file except in
198.8 - compliance with the License.
198.9 -
198.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
198.11 - or http://www.netbeans.org/cddl.txt.
198.12 -
198.13 - When distributing Covered Code, include this CDDL Header Notice in each file
198.14 - and include the License file at http://www.netbeans.org/cddl.txt.
198.15 - If applicable, add the following below the CDDL Header, with the fields
198.16 - enclosed by brackets [] replaced by your own identifying information:
198.17 - "Portions Copyrighted [year] [name of copyright owner]"
198.18 -
198.19 - The Original Software is NetBeans. The Initial Developer of the Original
198.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
198.21 - Microsystems, Inc. All Rights Reserved.
198.22 --->
198.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
198.24 -
198.25 -<editor_palette_item version="1.0">
198.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
198.27 -
198.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/translate16.png"/>
198.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/translate32.png"/>
198.30 -
198.31 - <description
198.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
198.33 - display-name-key="Name-translate"
198.34 - tooltip-key="Hint-translate"/>
198.35 -</editor_palette_item>
199.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/true.xml Wed Feb 21 08:53:38 2007 +0000
199.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
199.3 @@ -1,32 +0,0 @@
199.4 -<?xml version="1.0" encoding="UTF-8"?>
199.5 -<!--
199.6 - The contents of this file are subject to the terms of the Common Development
199.7 - and Distribution License (the License). You may not use this file except in
199.8 - compliance with the License.
199.9 -
199.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
199.11 - or http://www.netbeans.org/cddl.txt.
199.12 -
199.13 - When distributing Covered Code, include this CDDL Header Notice in each file
199.14 - and include the License file at http://www.netbeans.org/cddl.txt.
199.15 - If applicable, add the following below the CDDL Header, with the fields
199.16 - enclosed by brackets [] replaced by your own identifying information:
199.17 - "Portions Copyrighted [year] [name of copyright owner]"
199.18 -
199.19 - The Original Software is NetBeans. The Initial Developer of the Original
199.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
199.21 - Microsystems, Inc. All Rights Reserved.
199.22 --->
199.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
199.24 -
199.25 -<editor_palette_item version="1.0">
199.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
199.27 -
199.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/true16.png"/>
199.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/true32.png"/>
199.30 -
199.31 - <description
199.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
199.33 - display-name-key="Name-true"
199.34 - tooltip-key="Hint-true"/>
199.35 -</editor_palette_item>
200.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/palette/xpath_expression.xml Wed Feb 21 08:53:38 2007 +0000
200.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
200.3 @@ -1,32 +0,0 @@
200.4 -<?xml version="1.0" encoding="UTF-8"?>
200.5 -<!--
200.6 - The contents of this file are subject to the terms of the Common Development
200.7 - and Distribution License (the License). You may not use this file except in
200.8 - compliance with the License.
200.9 -
200.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
200.11 - or http://www.netbeans.org/cddl.txt.
200.12 -
200.13 - When distributing Covered Code, include this CDDL Header Notice in each file
200.14 - and include the License file at http://www.netbeans.org/cddl.txt.
200.15 - If applicable, add the following below the CDDL Header, with the fields
200.16 - enclosed by brackets [] replaced by your own identifying information:
200.17 - "Portions Copyrighted [year] [name of copyright owner]"
200.18 -
200.19 - The Original Software is NetBeans. The Initial Developer of the Original
200.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
200.21 - Microsystems, Inc. All Rights Reserved.
200.22 --->
200.23 -<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
200.24 -
200.25 -<editor_palette_item version="1.0">
200.26 - <class name="org.netbeans.modules.xslt.mapper.palette.XsltPaletteDrop"/>
200.27 -
200.28 - <icon16 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/xpath_expression16.png"/>
200.29 - <icon32 urlvalue="org/netbeans/modules/xslt/mapper/palette/icons/xpath_expression32.png"/>
200.30 -
200.31 - <description
200.32 - localizing-bundle="org.netbeans.modules.xslt.mapper.palette.Bundle"
200.33 - display-name-key="Name-xpath_expression"
200.34 - tooltip-key="Hint-xpath_expression"/>
200.35 -</editor_palette_item>
201.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/view/DiagramBuilder.java Wed Feb 21 08:53:38 2007 +0000
201.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
201.3 @@ -1,77 +0,0 @@
201.4 -/*
201.5 - * DiagramBuilder.java
201.6 - *
201.7 - * Created on 19 ßíâàðü 2007 ã., 17:34
201.8 - *
201.9 - * To change this template, choose Tools | Template Manager
201.10 - * and open the template in the editor.
201.11 - */
201.12 -
201.13 -package org.netbeans.modules.xslt.mapper.view;
201.14 -
201.15 -import org.netbeans.modules.soa.mapper.common.IMapperLink;
201.16 -import org.netbeans.modules.xml.xpath.XPathExpression;
201.17 -import org.netbeans.modules.xslt.mapper.model.nodes.Node;
201.18 -import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
201.19 -import org.netbeans.modules.xslt.model.SelectSpec;
201.20 -import org.netbeans.modules.xslt.model.XslComponent;
201.21 -import org.netbeans.modules.xslt.model.XslVisitor;
201.22 -
201.23 -/**
201.24 - *
201.25 - * @author Alexey
201.26 - */
201.27 -public class DiagramBuilder {
201.28 -
201.29 - private XsltMapper mapper;
201.30 -
201.31 - public DiagramBuilder(XsltMapper mapper) {
201.32 - this.mapper = mapper;
201.33 - }
201.34 - public void updateDiagram(){
201.35 - TreeNode root = (TreeNode) mapper.getMapperViewManager()
201.36 - .getDestView()
201.37 - .getTree()
201.38 - .getModel()
201.39 - .getRoot();
201.40 -
201.41 - if (root != null){
201.42 - updateDiagramRecursive(root);
201.43 - mapper.getMapperViewManager().getCanvasView().getAutoLayout().autoLayout();
201.44 - }
201.45 - }
201.46 - public void updateDiagram(TreeNode tree_node){
201.47 - Object data = tree_node.getDataObject();
201.48 -
201.49 -
201.50 - if (data instanceof XslComponent){
201.51 -
201.52 - XslComponent xslc = (XslComponent) data;
201.53 -
201.54 - GetExpressionVisitor expression_visitor =
201.55 - new GetExpressionVisitor();
201.56 -
201.57 - xslc.accept(expression_visitor );
201.58 - if (expression_visitor.getResult() != null){
201.59 - NodeCreatorVisitor node_visitor = new NodeCreatorVisitor(mapper);
201.60 -
201.61 - expression_visitor.getResult().accept(node_visitor);
201.62 -
201.63 - if (node_visitor.getResult() != null){
201.64 - mapper.addLink(node_visitor.getResult(), tree_node);
201.65 - }
201.66 - }
201.67 -
201.68 - }
201.69 -
201.70 - }
201.71 -
201.72 - private void updateDiagramRecursive(TreeNode node){
201.73 - updateDiagram(node);
201.74 - for( TreeNode n: node.getChildren()){
201.75 - updateDiagramRecursive(n);
201.76 - }
201.77 - }
201.78 -
201.79 -
201.80 -}
202.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/view/GetExpressionVisitor.java Wed Feb 21 08:53:38 2007 +0000
202.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
202.3 @@ -1,116 +0,0 @@
202.4 -/*
202.5 - * GetExpressionVisitor.java
202.6 - *
202.7 - * Created on 21 ßíâàðü 2007 ã., 18:26
202.8 - *
202.9 - * To change this template, choose Tools | Template Manager
202.10 - * and open the template in the editor.
202.11 - */
202.12 -
202.13 -package org.netbeans.modules.xslt.mapper.view;
202.14 -
202.15 -import java.util.List;
202.16 -import org.netbeans.modules.xml.xpath.AbstractXPathModelHelper;
202.17 -import org.netbeans.modules.xml.xpath.XPathException;
202.18 -import org.netbeans.modules.xml.xpath.XPathExpression;
202.19 -import org.netbeans.modules.xml.xpath.XPathModel;
202.20 -import org.netbeans.modules.xslt.model.Attribute;
202.21 -import org.netbeans.modules.xslt.model.Element;
202.22 -import org.netbeans.modules.xslt.model.ForEach;
202.23 -import org.netbeans.modules.xslt.model.If;
202.24 -import org.netbeans.modules.xslt.model.LiteralResultElement;
202.25 -import org.netbeans.modules.xslt.model.ValueOf;
202.26 -import org.netbeans.modules.xslt.model.When;
202.27 -import org.netbeans.modules.xslt.model.XslComponent;
202.28 -import org.netbeans.modules.xslt.model.XslVisitorAdapter;
202.29 -
202.30 -/**
202.31 - *
202.32 - * @author Alexey
202.33 - */
202.34 -public class GetExpressionVisitor extends XslVisitorAdapter{
202.35 -
202.36 - private String result;
202.37 - private boolean isContainer = true;
202.38 -
202.39 - public GetExpressionVisitor() {
202.40 - }
202.41 -
202.42 - public XPathExpression getResult(){
202.43 - return this.result != null ?
202.44 - getExpression(result) :
202.45 - null;
202.46 - }
202.47 -
202.48 - public boolean isContaineer(){
202.49 - return isContainer;
202.50 - }
202.51 -
202.52 -
202.53 - public void visit(ValueOf vof){
202.54 - result = vof.getSelect();
202.55 - }
202.56 -
202.57 -
202.58 -
202.59 - private XPathExpression getExpression(String str){
202.60 - XPathModel xpImpl = AbstractXPathModelHelper.getInstance().newXPathModel();
202.61 - try {
202.62 - return xpImpl.parseExpression(str);
202.63 - } catch (XPathException ex) {
202.64 -
202.65 - }
202.66 -
202.67 - return null;
202.68 - }
202.69 -
202.70 - public void visit(If iff) {
202.71 - result = iff.getTest();
202.72 - }
202.73 -
202.74 -
202.75 -
202.76 - public void visit(Attribute attribute) {
202.77 - handleElementOrAttribute(attribute);
202.78 - }
202.79 -
202.80 - public void visit(Element element) {
202.81 - handleElementOrAttribute(element);
202.82 -
202.83 - }
202.84 -
202.85 - public void visit(LiteralResultElement element) {
202.86 - handleElementOrAttribute(element);
202.87 - }
202.88 -
202.89 - private void handleElementOrAttribute(XslComponent component){
202.90 - ValueOf vof = isValueOfContainer(component);
202.91 - if (vof != null){
202.92 - result = vof.getSelect();
202.93 - isContainer = false;
202.94 - }
202.95 - }
202.96 -
202.97 - public void visit(ForEach forEach) {
202.98 - result = forEach.getSelect();
202.99 - }
202.100 -
202.101 - public void visit(When when) {
202.102 - result = when.getTest();
202.103 - }
202.104 -
202.105 -
202.106 -
202.107 - public static ValueOf isValueOfContainer(XslComponent c){
202.108 -
202.109 - if(c instanceof Attribute || c instanceof Element || c instanceof LiteralResultElement) {
202.110 - List<XslComponent> children = c.getChildren();
202.111 - if (children.size() == 1 && children.get(0) instanceof ValueOf){
202.112 - return ((ValueOf) children.get(0));
202.113 -
202.114 - }
202.115 - }
202.116 - return null;
202.117 - }
202.118 -
202.119 -}
203.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/view/LiteralEditListener.java Wed Feb 21 08:53:38 2007 +0000
203.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
203.3 @@ -1,161 +0,0 @@
203.4 -/*
203.5 - * The contents of this file are subject to the terms of the Common Development
203.6 - * and Distribution License (the License). You may not use this file except in
203.7 - * compliance with the License.
203.8 - *
203.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
203.10 - * or http://www.netbeans.org/cddl.txt.
203.11 -
203.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
203.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
203.14 - * If applicable, add the following below the CDDL Header, with the fields
203.15 - * enclosed by brackets [] replaced by your own identifying information:
203.16 - * "Portions Copyrighted [year] [name of copyright owner]"
203.17 - *
203.18 - * The Original Software is NetBeans. The Initial Developer of the Original
203.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
203.20 - * Microsystems, Inc. All Rights Reserved.
203.21 - */
203.22 -
203.23 -package org.netbeans.modules.xslt.mapper.view;
203.24 -
203.25 -import java.awt.Point;
203.26 -import java.awt.event.InputEvent;
203.27 -import org.netbeans.modules.soa.mapper.common.IMapperEvent;
203.28 -import org.netbeans.modules.soa.mapper.common.IMapperListener;
203.29 -import org.netbeans.modules.soa.mapper.common.IMapperNode;
203.30 -import org.netbeans.modules.soa.mapper.common.basicmapper.IBasicMapper;
203.31 -import org.netbeans.modules.soa.mapper.common.basicmapper.IBasicMapperRule;
203.32 -import org.netbeans.modules.soa.mapper.common.basicmapper.canvas.gtk.ICanvasFieldNode;
203.33 -import org.netbeans.modules.soa.mapper.common.basicmapper.canvas.gtk.ICanvasMethoidNode;
203.34 -import org.netbeans.modules.soa.mapper.common.basicmapper.canvas.gtk.ICanvasView;
203.35 -import org.netbeans.modules.soa.mapper.common.basicmapper.literal.ILiteralEditor;
203.36 -import org.netbeans.modules.soa.mapper.common.basicmapper.literal.ILiteralUpdater;
203.37 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IField;
203.38 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IFieldNode;
203.39 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IMethoid;
203.40 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IMethoidNode;
203.41 -import org.netbeans.modules.soa.mapper.common.gtk.ICanvasMouseData;
203.42 -import org.netbeans.modules.soa.mapper.common.gtk.ICanvasMouseListener;
203.43 -import org.netbeans.modules.xslt.mapper.methoid.Constants;
203.44 -import org.openide.filesystems.FileObject;
203.45 -
203.46 -/**
203.47 - * This class is a workaround to support edit literals which are created
203.48 - * from standard NetBeans palette.
203.49 - *
203.50 - * @author nk160297
203.51 - */
203.52 -public class LiteralEditListener
203.53 - implements ICanvasMouseListener, IMapperListener {
203.54 -
203.55 - private XsltMapper myMapper;
203.56 -
203.57 - public LiteralEditListener(IBasicMapper mapper) {
203.58 - assert mapper instanceof XsltMapper;
203.59 - myMapper = (XsltMapper)mapper;
203.60 - }
203.61 -
203.62 - public boolean doMouseDblClick(ICanvasMouseData event) {
203.63 - int mods = event.getMouseModifier();
203.64 - if ((mods & InputEvent.BUTTON1_MASK) == 0) {
203.65 - return false;
203.66 - }
203.67 - ICanvasView canvas =
203.68 - myMapper.getMapperViewManager().getCanvasView().getCanvas();
203.69 - Point point = event.getViewLocation();
203.70 - ICanvasMethoidNode canvasMethoidNode =
203.71 - canvas.getCanvasMethoidNodeByPoint(point);
203.72 - if (canvasMethoidNode == null) {
203.73 - return false;
203.74 - }
203.75 - IMethoidNode methoidNode = canvasMethoidNode.getMethoidNode();
203.76 - if (methoidNode == null) {
203.77 - return false;
203.78 - }
203.79 - ICanvasFieldNode canvasFieldNode =
203.80 - canvas.getCanvasFieldNodeByPoint(point);
203.81 - if (canvasFieldNode == null) {
203.82 - return false;
203.83 - }
203.84 - IFieldNode fieldNode = canvasFieldNode.getFieldNode();
203.85 - if (fieldNode == null) {
203.86 - return false;
203.87 - }
203.88 - IField field = (IField) fieldNode.getFieldObject();
203.89 - if (field == null) {
203.90 - return false;
203.91 - }
203.92 - ILiteralUpdater literalUpdater = field.getLiteralUpdater();
203.93 - if (literalUpdater == null) {
203.94 - String type = field.getType();
203.95 - literalUpdater = myMapper.getLiteralUpdaterFactory().
203.96 - createLiteralUpdater(type);
203.97 - if (literalUpdater == null) {
203.98 - return false;
203.99 - }
203.100 - }
203.101 -
203.102 - ILiteralEditor editor =
203.103 - literalUpdater.getEditor(myMapper, fieldNode);
203.104 - if (editor != null) {
203.105 - editor.show();
203.106 - }
203.107 -
203.108 - return true;
203.109 - }
203.110 -
203.111 - public boolean doMouseUp(ICanvasMouseData data) {
203.112 - return false;
203.113 - }
203.114 -
203.115 - public boolean doMouseMove(ICanvasMouseData data) {
203.116 - return false;
203.117 - }
203.118 -
203.119 - public boolean doMouseDown(ICanvasMouseData data) {
203.120 - return false;
203.121 - }
203.122 -
203.123 - public boolean doMouseClick(ICanvasMouseData data) {
203.124 - return false;
203.125 - }
203.126 -
203.127 - public void eventInvoked(IMapperEvent e) {
203.128 - Object eventObject = e.getTransferObject();
203.129 - //
203.130 - if (e.getEventType().equals(IMapperEvent.REQ_NEW_NODE)) {
203.131 - IBasicMapperRule rule = myMapper.getMapperRule();
203.132 - if (rule != null && eventObject instanceof IMapperNode) {
203.133 - IMethoidNode mNode = (IMethoidNode)eventObject;
203.134 - if (rule.isAllowToCreate(mNode)) {
203.135 - handleLiteral(mNode);
203.136 - }
203.137 - }
203.138 - }
203.139 - }
203.140 -
203.141 - private void handleLiteral(IMethoidNode mNode) {
203.142 - IMethoid methoid = (IMethoid) mNode.getMethoidObject();
203.143 - //
203.144 - if (methoid.isLiteral()) {
203.145 - IFieldNode fieldNode = (IFieldNode)mNode.getOutputFieldNodes().get(0); // all literals has one output
203.146 - String outputType = fieldNode.getTypeName();
203.147 - switch (Constants.LiteralType.findByName(outputType)) {
203.148 - case XPATH_LITERAL_TYPE:
203.149 -
203.150 -// Node dataNode = NodeFactory.getInstance().createNode(exprObj);
203.151 -// mNode.setNodeObject(dataNode);
203.152 -// fieldNode.setNodeObject(dataNode);
203.153 -// getMapper().addNode(mNode);
203.154 -
203.155 - ILiteralUpdater literalUpdater =
203.156 - myMapper.getLiteralUpdaterFactory().
203.157 - createLiteralUpdater(outputType);
203.158 - literalUpdater.getEditor(myMapper, fieldNode).show();
203.159 - return;
203.160 - }
203.161 - }
203.162 - }
203.163 -
203.164 -}
204.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/view/NodeCreatorVisitor.java Wed Feb 21 08:53:38 2007 +0000
204.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
204.3 @@ -1,170 +0,0 @@
204.4 -/*
204.5 - * The contents of this file are subject to the terms of the Common Development
204.6 - * and Distribution License (the License). You may not use this file except in
204.7 - * compliance with the License.
204.8 - *
204.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
204.10 - * or http://www.netbeans.org/cddl.txt.
204.11 -
204.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
204.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
204.14 - * If applicable, add the following below the CDDL Header, with the fields
204.15 - * enclosed by brackets [] replaced by your own identifying information:
204.16 - * "Portions Copyrighted [year] [name of copyright owner]"
204.17 - *
204.18 - * The Original Software is NetBeans. The Initial Developer of the Original
204.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
204.20 - * Microsystems, Inc. All Rights Reserved.
204.21 - */
204.22 -
204.23 -package org.netbeans.modules.xslt.mapper.view;
204.24 -
204.25 -import java.util.Iterator;
204.26 -import org.netbeans.modules.soa.mapper.util.Duration;
204.27 -
204.28 -
204.29 -import org.netbeans.modules.xml.xpath.XPathCoreFunction;
204.30 -import org.netbeans.modules.xml.xpath.XPathCoreOperation;
204.31 -import org.netbeans.modules.xml.xpath.XPathExpression;
204.32 -import org.netbeans.modules.xml.xpath.XPathExtensionFunction;
204.33 -import org.netbeans.modules.xml.xpath.XPathLocationPath;
204.34 -import org.netbeans.modules.xml.xpath.XPathNumericLiteral;
204.35 -import org.netbeans.modules.xml.xpath.XPathOperationOrFuntion;
204.36 -import org.netbeans.modules.xml.xpath.XPathStringLiteral;
204.37 -import org.netbeans.modules.xml.xpath.XPathVariableReference;
204.38 -import org.netbeans.modules.xml.xpath.visitor.AbstractXPathVisitor;
204.39 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IFieldNode;
204.40 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IMethoid;
204.41 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IMethoidNode;
204.42 -import org.netbeans.modules.xslt.mapper.methoid.Constants;
204.43 -import org.netbeans.modules.xslt.mapper.methoid.MethoidLoader;
204.44 -import org.netbeans.modules.xslt.mapper.model.nodes.Node;
204.45 -import org.netbeans.modules.xslt.mapper.model.nodes.NodeFactory;
204.46 -import org.netbeans.modules.xslt.mapper.model.nodes.SourceTypeFinder;
204.47 -
204.48 -/**
204.49 - *
204.50 - * @author radval
204.51 - *
204.52 - */
204.53 -public class NodeCreatorVisitor extends AbstractXPathVisitor {
204.54 -
204.55 -
204.56 -
204.57 - private XsltMapper mapper;
204.58 -
204.59 - private Node result;
204.60 -
204.61 - public NodeCreatorVisitor(XsltMapper mapper) {
204.62 - this.mapper = mapper;
204.63 -
204.64 - }
204.65 -
204.66 - public Node getResult(){
204.67 - return result;
204.68 - }
204.69 -
204.70 - private void setResult(Node result){
204.71 - this.result = result;
204.72 - }
204.73 -
204.74 - public void visit(XPathStringLiteral expr) {
204.75 - IMethoidNode node = null;
204.76 - try {
204.77 -
204.78 - Duration.parse(expr.getExpressionString());
204.79 - setResult(createMethoidNode(expr, Constants.DURATION_LITERAL));
204.80 - } catch (Exception e) {
204.81 - // Not a duration literal
204.82 - setResult(createLiteralNode(expr, Constants.STRING_LITERAL));
204.83 - }
204.84 -
204.85 -
204.86 -
204.87 -
204.88 -
204.89 - }
204.90 -
204.91 - public void visit(XPathNumericLiteral expr) {
204.92 - setResult(createLiteralNode(expr, Constants.NUMBER_LITERAL));
204.93 - }
204.94 -
204.95 - public void visit(XPathCoreOperation expr) {
204.96 - visitXPathOperatorOrFunction(expr);
204.97 - }
204.98 -
204.99 - public void visit(XPathCoreFunction expr) {
204.100 - visitXPathOperatorOrFunction(expr);
204.101 - }
204.102 -
204.103 - private void visitXPathOperatorOrFunction(XPathOperationOrFuntion operator) {
204.104 - Node node = createMethoidNode(operator, operator.getName());
204.105 - if (node != null) {
204.106 - IMethoidNode methoid_node = (IMethoidNode) node.getMapperNode();
204.107 - Iterator it = methoid_node.getInputFieldNodes().iterator();
204.108 - for (Object expr: operator.getChildren()){
204.109 - IFieldNode fn = (IFieldNode) it.next();
204.110 -
204.111 - NodeCreatorVisitor visitor = new NodeCreatorVisitor(mapper);
204.112 - ((XPathExpression) expr).accept(visitor);
204.113 -
204.114 - Node upstream_node = visitor.getResult();
204.115 -
204.116 - fn.setNodeObject(upstream_node);
204.117 - if (upstream_node != null){
204.118 - mapper.addLink(upstream_node, node);
204.119 - }
204.120 - }
204.121 - setResult(node);
204.122 - } else {
204.123 - setResult(createLiteralNode(operator, Constants.XPATH_LITERAL));
204.124 - }
204.125 -
204.126 -
204.127 - }
204.128 -
204.129 - public void visit(XPathExtensionFunction expr) {
204.130 - setResult(createLiteralNode(expr, Constants.XPATH_LITERAL));
204.131 - }
204.132 -
204.133 - public void visit(XPathLocationPath expr) {
204.134 - Node result = (new SourceTypeFinder(mapper).findNode(expr));
204.135 - if (result != null){
204.136 - setResult(result);
204.137 - } else {
204.138 - setResult(createLiteralNode(expr, Constants.XPATH_LITERAL));
204.139 - }
204.140 -
204.141 - }
204.142 -
204.143 -
204.144 - public void visit(XPathVariableReference vReference) {
204.145 - setResult(createLiteralNode(vReference, Constants.XPATH_LITERAL));
204.146 - }
204.147 -
204.148 - private Node createLiteralNode(XPathExpression expr, String name){
204.149 - Node node = createMethoidNode(expr, name);
204.150 - if (node != null){
204.151 - IFieldNode out_field = (IFieldNode) node.getOutputNode();
204.152 - if (out_field != null){
204.153 - out_field.setLiteralName(expr.getExpressionString());
204.154 - }
204.155 - }
204.156 - return node;
204.157 - }
204.158 -
204.159 - private Node createMethoidNode(XPathExpression expr, String name) {
204.160 - IMethoid methoid = MethoidLoader.loadMethoid(name);
204.161 - IMethoidNode node = mapper.createMethoidNode(methoid);
204.162 -
204.163 - Node operatorNode = NodeFactory.createNode(expr, (XsltMapper) mapper);
204.164 -
204.165 - node.setNodeObject(operatorNode);
204.166 - operatorNode.setMapperNode(node);
204.167 -
204.168 - mapper.addNode(node);
204.169 -
204.170 - return operatorNode;
204.171 - }
204.172 -
204.173 -}
205.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/view/XsltMapper.java Wed Feb 21 08:53:38 2007 +0000
205.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
205.3 @@ -1,199 +0,0 @@
205.4 -/*
205.5 - * The contents of this file are subject to the terms of the Common Development
205.6 - * and Distribution License (the License). You may not use this file except in
205.7 - * compliance with the License.
205.8 - *
205.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
205.10 - * or http://www.netbeans.org/cddl.txt.
205.11 -
205.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
205.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
205.14 - * If applicable, add the following below the CDDL Header, with the fields
205.15 - * enclosed by brackets [] replaced by your own identifying information:
205.16 - * "Portions Copyrighted [year] [name of copyright owner]"
205.17 - *
205.18 - * The Original Software is NetBeans. The Initial Developer of the Original
205.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
205.20 - * Microsystems, Inc. All Rights Reserved.
205.21 - */
205.22 -
205.23 -package org.netbeans.modules.xslt.mapper.view;
205.24 -
205.25 -import java.awt.event.MouseAdapter;
205.26 -import java.awt.event.MouseEvent;
205.27 -import javax.swing.JPopupMenu;
205.28 -import javax.swing.JTree;
205.29 -import javax.swing.tree.TreePath;
205.30 -import org.netbeans.modules.soa.mapper.basicmapper.BasicMapper;
205.31 -import org.netbeans.modules.soa.mapper.common.IMapperLink;
205.32 -import org.netbeans.modules.soa.mapper.common.IMapperNode;
205.33 -import org.netbeans.modules.soa.mapper.common.basicmapper.canvas.IMapperCanvasView;
205.34 -import org.netbeans.modules.soa.mapper.common.basicmapper.literal.ILiteralUpdaterFactory;
205.35 -import org.netbeans.modules.soa.mapper.common.basicmapper.tree.IMapperTreeView;
205.36 -import org.netbeans.modules.xml.axi.AXIComponent;
205.37 -import org.netbeans.modules.xslt.mapper.methoid.LiteralUpdaterFactory;
205.38 -import org.netbeans.modules.xslt.mapper.model.MapperContext;
205.39 -import org.netbeans.modules.xslt.mapper.model.MapperContextChangeListener;
205.40 -import org.netbeans.modules.xslt.mapper.model.SourceTreeModel;
205.41 -import org.netbeans.modules.xslt.mapper.model.XsltNodesTreeRenderer;
205.42 -import org.netbeans.modules.xslt.mapper.model.nodes.Node;
205.43 -import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
205.44 -import org.netbeans.modules.xslt.mapper.model.nodes.actions.ActionType;
205.45 -import org.netbeans.modules.xslt.mapper.model.nodes.actions.PopupMenuFactory;
205.46 -import org.netbeans.modules.xslt.mapper.model.targettree.TargetTreeModel;
205.47 -import org.netbeans.modules.xslt.model.XslModel;
205.48 -import org.openide.util.Lookup;
205.49 -
205.50 -/**
205.51 - *
205.52 - * @author Alexey
205.53 - */
205.54 -public class XsltMapper extends BasicMapper {
205.55 -
205.56 -
205.57 -
205.58 - private MapperContext context;
205.59 -
205.60 - private Lookup lookup;
205.61 -
205.62 - private ILiteralUpdaterFactory myLiteralUpdaterFactory;
205.63 - private LiteralEditListener myLiteralEditListener;
205.64 -
205.65 - public XsltMapper(Lookup lookup) {
205.66 - super();
205.67 - this.lookup = lookup;
205.68 - this.context = (MapperContext)lookup.lookup(MapperContext.class);// TODO r new MapperContext(lookup);
205.69 -
205.70 -
205.71 -
205.72 -
205.73 - initializeTrees();
205.74 - if (context != null) {
205.75 - context.addMapperContextChangeListener(new MapperContextChangeListener() {
205.76 - public void sourceTypeChanged(AXIComponent oldComponent, AXIComponent newComponent) {
205.77 - // TODO a
205.78 -// System.out.println("mappperView sourceType changed ");
205.79 - }
205.80 - public void targetTypeChanged(AXIComponent oldComponent, AXIComponent newComponent) {
205.81 - // TODO a
205.82 -// System.out.println("mappperView targetType changed ");
205.83 - }
205.84 - public void xslModelChanged(XslModel oldModel, XslModel newModel) {
205.85 - // TODO a
205.86 -// System.out.println("mappperView xslModel changed ");
205.87 - }
205.88 - });
205.89 - }
205.90 - //
205.91 - this.setLiteralUpdaterFactory(new LiteralUpdaterFactory(this));
205.92 -
205.93 -
205.94 - }
205.95 -
205.96 - public MapperContext getContext(){
205.97 - return context;
205.98 - }
205.99 -
205.100 - public Lookup getLookup(){
205.101 - return lookup;
205.102 - }
205.103 -
205.104 - protected void initializeTrees() {
205.105 -
205.106 - JTree sourceTree = getMapperViewManager().getSourceView().getTree();
205.107 - sourceTree.setModel(new SourceTreeModel(this));
205.108 - sourceTree.setRootVisible(true);
205.109 - sourceTree.setShowsRootHandles(true);
205.110 - sourceTree.expandRow(0);
205.111 - sourceTree.setCellRenderer(new XsltNodesTreeRenderer());
205.112 -
205.113 - final JTree targetTree = getMapperViewManager().getDestView().getTree();
205.114 - targetTree.setModel(new TargetTreeModel(this));
205.115 - targetTree.setRootVisible(false);
205.116 - targetTree.setShowsRootHandles(true);
205.117 - targetTree.expandRow(0);
205.118 - targetTree.setCellRenderer(new XsltNodesTreeRenderer());
205.119 - //
205.120 - // Add the mouse listener for popup menu
205.121 - targetTree.addMouseListener(new MouseAdapter() {
205.122 - public void mousePressed(MouseEvent e) {
205.123 - maybeShowPopup(e);
205.124 - }
205.125 -
205.126 - public void mouseReleased(MouseEvent e) {
205.127 - maybeShowPopup(e);
205.128 - }
205.129 -
205.130 - private void maybeShowPopup(MouseEvent e) {
205.131 - if (e.isPopupTrigger()) {
205.132 - TreePath path = targetTree.getPathForLocation(
205.133 - e.getX(), e.getY());
205.134 - if (path != null) {
205.135 - Object lastComp = path.getLastPathComponent();
205.136 - if (lastComp instanceof TreeNode) {
205.137 - TreeNode node = (TreeNode)lastComp;
205.138 - JPopupMenu popup = PopupMenuFactory.
205.139 - constructPopupMenu(node, ActionType.class);
205.140 - if (popup != null) {
205.141 - popup.show(e.getComponent(), e.getX(), e.getY());
205.142 - }
205.143 - }
205.144 - }
205.145 - }
205.146 - }
205.147 - });
205.148 -
205.149 - new DiagramBuilder(this).updateDiagram();
205.150 - }
205.151 -
205.152 - public void setLiteralUpdaterFactory(ILiteralUpdaterFactory literalUpdaterFactory) {
205.153 - super.setLiteralUpdaterFactory(literalUpdaterFactory);
205.154 - //
205.155 - myLiteralUpdaterFactory = literalUpdaterFactory;
205.156 - //
205.157 - // also set up listener on literal edit events
205.158 - if (myLiteralEditListener == null) {
205.159 - IMapperCanvasView canvasView = getMapperViewManager().getCanvasView();
205.160 - myLiteralEditListener = new LiteralEditListener(this);
205.161 - canvasView.getCanvas().addCanvasMouseListener(myLiteralEditListener);
205.162 - getMapperController().addMapperListener(myLiteralEditListener);
205.163 - }
205.164 - }
205.165 -
205.166 - public ILiteralUpdaterFactory getLiteralUpdaterFactory() {
205.167 - return myLiteralUpdaterFactory;
205.168 - }
205.169 -
205.170 - public void addLink(Node node_from, Node node_to){
205.171 - IMapperNode startNode = node_from.getOutputNode();
205.172 - IMapperNode endNode = node_to.getInputNode(node_from);
205.173 - if (startNode!= null & endNode != null){
205.174 - IMapperLink link = super.createLink(startNode, endNode);
205.175 - super.addLink(link);
205.176 - }
205.177 - }
205.178 - public IMapperNode getMapperNode(TreeNode node){
205.179 -
205.180 -
205.181 - TreePath path = TreeNode.getTreePath(node);
205.182 -
205.183 - IMapperNode result = findNodeInTree(path, getMapperViewManager().getSourceView());
205.184 -
205.185 - if ( result == null ){
205.186 - return findNodeInTree(path, getMapperViewManager().getDestView());
205.187 - }
205.188 -
205.189 - return result;
205.190 -
205.191 -
205.192 -
205.193 -
205.194 - }
205.195 - private IMapperNode findNodeInTree(TreePath path, IMapperTreeView view){
205.196 - if (view.getTree().getModel().getRoot() == path.getPathComponent(0)){
205.197 - return view.getMapperTreeNode(path);
205.198 - }
205.199 -
205.200 - return null;
205.201 - }
205.202 -}
206.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/xpatheditor/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
206.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
206.3 @@ -1,14 +0,0 @@
206.4 -
206.5 -BTN_CheckSyntax=Check Syntax
206.6 -
206.7 -LBL_Expression=Expression\:
206.8 -ACSN_LBL_Expression=Expression
206.9 -ACSD_LBL_Expression=Expression
206.10 -
206.11 -LBL_Schema=Schema\:
206.12 -ACSN_LBL_Schema=Schema
206.13 -ACSD_LBL_Schema=Schema
206.14 -
206.15 -LBL_Functions=Functions\:
206.16 -ACSN_LBL_Functions=Functions
206.17 -ACSD_LBL_Functions=Functions
207.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/xpatheditor/CategoryChildren.java Wed Feb 21 08:53:38 2007 +0000
207.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
207.3 @@ -1,74 +0,0 @@
207.4 -/*
207.5 - * The contents of this file are subject to the terms of the Common Development
207.6 - * and Distribution License (the License). You may not use this file except in
207.7 - * compliance with the License.
207.8 - *
207.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
207.10 - * or http://www.netbeans.org/cddl.txt.
207.11 -
207.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
207.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
207.14 - * If applicable, add the following below the CDDL Header, with the fields
207.15 - * enclosed by brackets [] replaced by your own identifying information:
207.16 - * "Portions Copyrighted [year] [name of copyright owner]"
207.17 - *
207.18 - * The Original Software is NetBeans. The Initial Developer of the Original
207.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
207.20 - * Microsystems, Inc. All Rights Reserved.
207.21 - */
207.22 -
207.23 -package org.netbeans.modules.xslt.mapper.xpatheditor;
207.24 -
207.25 -import java.util.ArrayList;
207.26 -import java.util.Enumeration;
207.27 -import org.netbeans.modules.soa.ui.nodes.NodeFactory;
207.28 -import org.openide.loaders.DataFolder;
207.29 -import org.openide.loaders.XMLDataObject;
207.30 -import org.openide.nodes.Children;
207.31 -import org.openide.nodes.Node;
207.32 -import org.openide.util.Lookup;
207.33 -
207.34 -/**
207.35 - *
207.36 - * @author nk160297
207.37 - */
207.38 -public class CategoryChildren extends Children.Keys {
207.39 -
207.40 - private Lookup myLookup;
207.41 -
207.42 - public CategoryChildren(DataFolder paletteFolder, Lookup lookup) {
207.43 - myLookup = lookup;
207.44 - setKeys(new Object[] {paletteFolder});
207.45 - }
207.46 -
207.47 - protected Node[] createNodes(Object key) {
207.48 - assert key instanceof DataFolder;
207.49 - //
207.50 - NodeFactory factory = (NodeFactory)myLookup.lookup(NodeFactory.class);
207.51 - assert factory != null;
207.52 - //
207.53 - DataFolder df = (DataFolder)key;
207.54 - Enumeration childEnum = df.children();
207.55 - //
207.56 - ArrayList<Node> nodesList = new ArrayList<Node>();
207.57 - //
207.58 - while (childEnum.hasMoreElements()) {
207.59 - Object next = childEnum.nextElement();
207.60 - if (next instanceof DataFolder) {
207.61 - Node newNode = factory.createNode(
207.62 - PaletteTreeNodeFactory.NodeType.CATEGORY, next, myLookup);
207.63 - nodesList.add(newNode);
207.64 - } else if (next instanceof XMLDataObject) {
207.65 - Node newNode = factory.createNode(
207.66 - PaletteTreeNodeFactory.NodeType.ITEM, next, myLookup);
207.67 - if (newNode != null) {
207.68 - nodesList.add(newNode);
207.69 - }
207.70 - }
207.71 - }
207.72 - //
207.73 - Node[] nodesArr = nodesList.toArray(new Node[nodesList.size()]);
207.74 - return nodesArr;
207.75 - }
207.76 -
207.77 -}
208.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/xpatheditor/CategoryNode.java Wed Feb 21 08:53:38 2007 +0000
208.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
208.3 @@ -1,82 +0,0 @@
208.4 -/*
208.5 - * The contents of this file are subject to the terms of the Common Development
208.6 - * and Distribution License (the License). You may not use this file except in
208.7 - * compliance with the License.
208.8 - *
208.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
208.10 - * or http://www.netbeans.org/cddl.txt.
208.11 - *
208.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
208.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
208.14 - * If applicable, add the following below the CDDL Header, with the fields
208.15 - * enclosed by brackets [] replaced by your own identifying information:
208.16 - * "Portions Copyrighted [year] [name of copyright owner]"
208.17 - *
208.18 - * The Original Software is NetBeans. The Initial Developer of the Original
208.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
208.20 - * Microsystems, Inc. All Rights Reserved.
208.21 - */
208.22 -
208.23 -package org.netbeans.modules.xslt.mapper.xpatheditor;
208.24 -
208.25 -import java.awt.Image;
208.26 -import java.awt.Toolkit;
208.27 -import java.net.URL;
208.28 -import java.util.ResourceBundle;
208.29 -import org.netbeans.modules.xslt.mapper.methoid.Constants;
208.30 -import org.openide.filesystems.FileObject;
208.31 -import org.openide.filesystems.Repository;
208.32 -import org.openide.loaders.DataFolder;
208.33 -import org.openide.nodes.AbstractNode;
208.34 -import org.openide.nodes.Children;
208.35 -import org.openide.util.Lookup;
208.36 -
208.37 -/**
208.38 - * A node for palette category.
208.39 - *
208.40 - * @author nk160297
208.41 - */
208.42 -public class CategoryNode extends AbstractNode {
208.43 -
208.44 - private DataFolder myFolder;
208.45 - private Image myImage;
208.46 -
208.47 - public CategoryNode(DataFolder paletteFolder, Children children, Lookup lookup) {
208.48 - super(children, lookup);
208.49 - myFolder = paletteFolder;
208.50 - //
208.51 - String metainfoRef = (String)myFolder.getPrimaryFile().
208.52 - getAttribute(Constants.METAINFO_REF);
208.53 - if (metainfoRef != null && metainfoRef.length() != 0) {
208.54 - FileObject metainfoFo = Repository.getDefault().
208.55 - getDefaultFileSystem().findResource(metainfoRef);
208.56 - if (metainfoFo != null) {
208.57 - String bundleRef = (String)metainfoFo.
208.58 - getAttribute(Constants.BUNDLE_CLASS);
208.59 - ResourceBundle bundle = ResourceBundle.getBundle(bundleRef);
208.60 - String iconRefName = (String)metainfoFo.
208.61 - getAttribute(Constants.CATEGORY_ICON);
208.62 - String iconName = bundle.getString(iconRefName);
208.63 - URL iconUrl = this.getClass().getResource(iconName);
208.64 - myImage = Toolkit.getDefaultToolkit().getImage(iconUrl);
208.65 - //
208.66 - String name = (String)metainfoFo.getName();
208.67 - setName(name);
208.68 - setDisplayName(name);
208.69 - }
208.70 - }
208.71 -
208.72 - }
208.73 -
208.74 - public String getHtmlDisplayName() {
208.75 - return getName();
208.76 - }
208.77 -
208.78 - public Image getIcon(int type) {
208.79 - return myImage != null ? myImage : super.getIcon(type);
208.80 - }
208.81 -
208.82 - public Image getOpenedIcon(int type) {
208.83 - return getIcon(type);
208.84 - }
208.85 -}
209.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/xpatheditor/ExpressionEditor.form Wed Feb 21 08:53:38 2007 +0000
209.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
209.3 @@ -1,170 +0,0 @@
209.4 -<?xml version="1.0" encoding="UTF-8" ?>
209.5 -
209.6 -<Form version="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
209.7 - <AuxValues>
209.8 - <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
209.9 - <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
209.10 - <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
209.11 - <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
209.12 - <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
209.13 - </AuxValues>
209.14 -
209.15 - <Layout>
209.16 - <DimensionLayout dim="0">
209.17 - <Group type="103" groupAlignment="0" attributes="0">
209.18 - <Group type="102" alignment="1" attributes="0">
209.19 - <EmptySpace max="-2" attributes="0"/>
209.20 - <Group type="103" groupAlignment="1" attributes="0">
209.21 - <Component id="scrExpression" alignment="0" pref="655" max="32767" attributes="0"/>
209.22 - <Group type="102" alignment="1" attributes="0">
209.23 - <Group type="103" groupAlignment="0" attributes="0">
209.24 - <Group type="102" attributes="0">
209.25 - <Component id="scrSchema" pref="435" max="32767" attributes="0"/>
209.26 - <EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
209.27 - </Group>
209.28 - <Group type="102" alignment="0" attributes="0">
209.29 - <Component id="lblSchema" min="-2" max="-2" attributes="0"/>
209.30 - <EmptySpace max="-2" attributes="0"/>
209.31 - </Group>
209.32 - </Group>
209.33 - <EmptySpace max="-2" attributes="0"/>
209.34 - <Group type="103" groupAlignment="0" attributes="0">
209.35 - <Component id="lblFunctions" min="-2" max="-2" attributes="0"/>
209.36 - <Component id="scrFunctions" alignment="0" min="-2" pref="213" max="-2" attributes="0"/>
209.37 - </Group>
209.38 - </Group>
209.39 - <Group type="102" alignment="1" attributes="0">
209.40 - <Component id="lblExpression" min="-2" max="-2" attributes="0"/>
209.41 - <EmptySpace pref="478" max="32767" attributes="0"/>
209.42 - <Component id="btnCheckSyntax" min="-2" max="-2" attributes="0"/>
209.43 - </Group>
209.44 - </Group>
209.45 - <EmptySpace max="-2" attributes="0"/>
209.46 - </Group>
209.47 - </Group>
209.48 - </DimensionLayout>
209.49 - <DimensionLayout dim="1">
209.50 - <Group type="103" groupAlignment="0" attributes="0">
209.51 - <Group type="102" alignment="1" attributes="0">
209.52 - <EmptySpace min="-2" max="-2" attributes="0"/>
209.53 - <Group type="103" groupAlignment="3" attributes="0">
209.54 - <Component id="lblSchema" alignment="3" min="-2" max="-2" attributes="0"/>
209.55 - <Component id="lblFunctions" alignment="3" min="-2" max="-2" attributes="0"/>
209.56 - </Group>
209.57 - <EmptySpace min="-2" max="-2" attributes="0"/>
209.58 - <Group type="103" groupAlignment="0" attributes="0">
209.59 - <Component id="scrFunctions" pref="250" max="32767" attributes="0"/>
209.60 - <Component id="scrSchema" alignment="0" pref="250" max="32767" attributes="0"/>
209.61 - </Group>
209.62 - <EmptySpace max="-2" attributes="0"/>
209.63 - <Group type="103" groupAlignment="3" attributes="0">
209.64 - <Component id="btnCheckSyntax" alignment="3" min="-2" max="-2" attributes="0"/>
209.65 - <Component id="lblExpression" alignment="3" min="-2" max="-2" attributes="0"/>
209.66 - </Group>
209.67 - <EmptySpace max="-2" attributes="0"/>
209.68 - <Component id="scrExpression" min="-2" pref="115" max="-2" attributes="0"/>
209.69 - </Group>
209.70 - </Group>
209.71 - </DimensionLayout>
209.72 - </Layout>
209.73 - <SubComponents>
209.74 - <Component class="javax.swing.JLabel" name="lblSchema">
209.75 - <Properties>
209.76 - <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
209.77 - <ComponentRef name="treeSchema"/>
209.78 - </Property>
209.79 - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
209.80 - <ResourceString bundle="org/netbeans/modules/xslt/mapper/xpatheditor/Bundle.properties" key="LBL_Schema" replaceFormat="org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "{key}")"/>
209.81 - </Property>
209.82 - </Properties>
209.83 - <AccessibilityProperties>
209.84 - <Property name="AccessibleContext.accessibleName" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
209.85 - <ResourceString bundle="org/netbeans/modules/xslt/mapper/xpatheditor/Bundle.properties" key="ACSN_LBL_Schema" replaceFormat="org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "{key}")"/>
209.86 - </Property>
209.87 - <Property name="AccessibleContext.accessibleDescription" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
209.88 - <ResourceString bundle="org/netbeans/modules/xslt/mapper/xpatheditor/Bundle.properties" key="ACSD_LBL_Schema" replaceFormat="org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "{key}")"/>
209.89 - </Property>
209.90 - </AccessibilityProperties>
209.91 - </Component>
209.92 - <Component class="javax.swing.JLabel" name="lblFunctions">
209.93 - <Properties>
209.94 - <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
209.95 - <ComponentRef name="treeFunctions"/>
209.96 - </Property>
209.97 - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
209.98 - <ResourceString bundle="org/netbeans/modules/xslt/mapper/xpatheditor/Bundle.properties" key="LBL_Functions" replaceFormat="org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "{key}")"/>
209.99 - </Property>
209.100 - </Properties>
209.101 - <AccessibilityProperties>
209.102 - <Property name="AccessibleContext.accessibleName" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
209.103 - <ResourceString bundle="org/netbeans/modules/xslt/mapper/xpatheditor/Bundle.properties" key="ACSN_LBL_Functions" replaceFormat="org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "{key}")"/>
209.104 - </Property>
209.105 - <Property name="AccessibleContext.accessibleDescription" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
209.106 - <ResourceString bundle="org/netbeans/modules/xslt/mapper/xpatheditor/Bundle.properties" key="ACSD_LBL_Functions" replaceFormat="org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "{key}")"/>
209.107 - </Property>
209.108 - </AccessibilityProperties>
209.109 - </Component>
209.110 - <Component class="javax.swing.JLabel" name="lblExpression">
209.111 - <Properties>
209.112 - <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
209.113 - <ComponentRef name="txtExpression"/>
209.114 - </Property>
209.115 - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
209.116 - <ResourceString bundle="org/netbeans/modules/xslt/mapper/xpatheditor/Bundle.properties" key="LBL_Expression" replaceFormat="org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "{key}")"/>
209.117 - </Property>
209.118 - </Properties>
209.119 - <AccessibilityProperties>
209.120 - <Property name="AccessibleContext.accessibleName" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
209.121 - <ResourceString bundle="org/netbeans/modules/xslt/mapper/xpatheditor/Bundle.properties" key="ACSN_LBL_Expression" replaceFormat="org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "{key}")"/>
209.122 - </Property>
209.123 - <Property name="AccessibleContext.accessibleDescription" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
209.124 - <ResourceString bundle="org/netbeans/modules/xslt/mapper/xpatheditor/Bundle.properties" key="ACSD_LBL_Expression" replaceFormat="org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "{key}")"/>
209.125 - </Property>
209.126 - </AccessibilityProperties>
209.127 - </Component>
209.128 - <Container class="javax.swing.JScrollPane" name="scrSchema">
209.129 - <AuxValues>
209.130 - <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
209.131 - </AuxValues>
209.132 -
209.133 - <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
209.134 - <SubComponents>
209.135 - <Component class="javax.swing.JTree" name="treeSchema">
209.136 - </Component>
209.137 - </SubComponents>
209.138 - </Container>
209.139 - <Container class="javax.swing.JScrollPane" name="scrFunctions">
209.140 - <AuxValues>
209.141 - <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
209.142 - </AuxValues>
209.143 -
209.144 - <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
209.145 - <SubComponents>
209.146 - <Component class="javax.swing.JTree" name="treeFunctions">
209.147 - </Component>
209.148 - </SubComponents>
209.149 - </Container>
209.150 - <Container class="javax.swing.JScrollPane" name="scrExpression">
209.151 - <AuxValues>
209.152 - <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
209.153 - </AuxValues>
209.154 -
209.155 - <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
209.156 - <SubComponents>
209.157 - <Component class="javax.swing.JTextArea" name="txtExpression">
209.158 - <Properties>
209.159 - <Property name="columns" type="int" value="20"/>
209.160 - <Property name="rows" type="int" value="5"/>
209.161 - </Properties>
209.162 - </Component>
209.163 - </SubComponents>
209.164 - </Container>
209.165 - <Component class="javax.swing.JButton" name="btnCheckSyntax">
209.166 - <Properties>
209.167 - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
209.168 - <ResourceString bundle="org/netbeans/modules/xslt/mapper/xpatheditor/Bundle.properties" key="BTN_CheckSyntax" replaceFormat="org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "{key}")"/>
209.169 - </Property>
209.170 - </Properties>
209.171 - </Component>
209.172 - </SubComponents>
209.173 -</Form>
210.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/xpatheditor/ExpressionEditor.java Wed Feb 21 08:53:38 2007 +0000
210.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
210.3 @@ -1,403 +0,0 @@
210.4 -/*
210.5 - * The contents of this file are subject to the terms of the Common Development
210.6 - * and Distribution License (the License). You may not use this file except in
210.7 - * compliance with the License.
210.8 - *
210.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
210.10 - * or http://www.netbeans.org/cddl.txt.
210.11 -
210.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
210.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
210.14 - * If applicable, add the following below the CDDL Header, with the fields
210.15 - * enclosed by brackets [] replaced by your own identifying information:
210.16 - * "Portions Copyrighted [year] [name of copyright owner]"
210.17 - *
210.18 - * The Original Software is NetBeans. The Initial Developer of the Original
210.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
210.20 - * Microsystems, Inc. All Rights Reserved.
210.21 - */
210.22 -package org.netbeans.modules.xslt.mapper.xpatheditor;
210.23 -
210.24 -import java.awt.event.ActionEvent;
210.25 -import java.awt.event.ActionListener;
210.26 -import java.awt.event.MouseAdapter;
210.27 -import java.awt.event.MouseEvent;
210.28 -import javax.swing.JPanel;
210.29 -import javax.swing.tree.TreeModel;
210.30 -import javax.swing.tree.TreePath;
210.31 -import org.netbeans.modules.soa.mapper.common.basicmapper.IBasicMapper;
210.32 -import org.netbeans.modules.soa.ui.ExtendedLookup;
210.33 -import org.netbeans.modules.soa.ui.axinodes.AxiomChildren;
210.34 -import org.netbeans.modules.soa.ui.axinodes.AxiomNode;
210.35 -import org.netbeans.modules.soa.ui.UserNotification;
210.36 -import org.netbeans.modules.soa.ui.form.ChooserLifeCycle;
210.37 -import org.netbeans.modules.soa.ui.nodes.NodeFactory;
210.38 -import org.netbeans.modules.xml.axi.AXIComponent;
210.39 -import org.netbeans.modules.xml.xpath.AbstractXPathModelHelper;
210.40 -import org.netbeans.modules.xml.xpath.XPathException;
210.41 -import org.netbeans.modules.xml.xpath.XPathExpression;
210.42 -import org.netbeans.modules.xml.xpath.XPathModel;
210.43 -import org.netbeans.modules.soa.ui.axinodes.AxiomTreeNodeFactory;
210.44 -import org.netbeans.modules.soa.ui.axinodes.AxiomUtils;
210.45 -import org.netbeans.modules.soa.ui.nodes.NodesTreeModel;
210.46 -import org.netbeans.modules.soa.ui.nodes.NodesTreeRenderer;
210.47 -import org.netbeans.modules.xslt.mapper.methoid.Constants;
210.48 -import org.netbeans.modules.xslt.mapper.model.MapperContext;
210.49 -import org.netbeans.modules.xslt.mapper.model.SourceTreeModel;
210.50 -import org.netbeans.modules.xslt.mapper.view.XsltMapper;
210.51 -import org.openide.filesystems.FileObject;
210.52 -import org.openide.filesystems.FileSystem;
210.53 -import org.openide.filesystems.Repository;
210.54 -import org.openide.nodes.Children;
210.55 -import org.openide.nodes.Node;
210.56 -import org.openide.util.Lookup;
210.57 -
210.58 -/**
210.59 - *
210.60 - * @author nk160297
210.61 - */
210.62 -public class ExpressionEditor extends JPanel implements ChooserLifeCycle<String> {
210.63 -
210.64 - private XsltMapper myMapper;
210.65 -
210.66 - private final static String INPUT_PARAM = "InputParam";
210.67 -
210.68 -
210.69 - public ExpressionEditor(IBasicMapper basicMapper) {
210.70 - assert basicMapper instanceof XsltMapper;
210.71 - myMapper = (XsltMapper)basicMapper;
210.72 - createContent();
210.73 - initControls();
210.74 - }
210.75 -
210.76 - public void createContent() {
210.77 - initComponents();
210.78 - Lookup lookup = myMapper.getLookup();
210.79 - //
210.80 - MapperContext context = myMapper.getContext();
210.81 - AXIComponent sourceAxiComponent = context.getSourceType();
210.82 - if (sourceAxiComponent == null) {
210.83 - sourceAxiComponent = SourceTreeModel.constructFakeComponent();
210.84 - }
210.85 - if (sourceAxiComponent != null) {
210.86 - Lookup axiLookup = ExtendedLookup.createExtendedLookup(
210.87 - lookup, new AxiomTreeNodeFactory());
210.88 - Children children = new AxiomChildren(sourceAxiComponent, axiLookup);
210.89 - Node rootNode = new NodeFactory.TextNode(children, "Source Schema model"); // TODO I18N
210.90 - //
210.91 - TreeModel variablesModel = new NodesTreeModel(rootNode);
210.92 - treeSchema.setModel(variablesModel);
210.93 - treeSchema.setCellRenderer(new NodesTreeRenderer());
210.94 - treeSchema.setRootVisible(false);
210.95 - treeSchema.setShowsRootHandles(true);
210.96 - }
210.97 - //
210.98 - FileObject paletteRootFo = getPaletteFolder(Constants.XSLT_PALETTE_FOLDER);
210.99 - PaletteTreeNodeFactory factory = new PaletteTreeNodeFactory();
210.100 - Lookup paletteLookup = ExtendedLookup.createExtendedLookup(lookup, factory);
210.101 - Node paletteRootNode = factory.createNode(
210.102 - PaletteTreeNodeFactory.NodeType.ROOT,
210.103 - paletteRootFo, paletteLookup);
210.104 - TreeModel functionsModel = new NodesTreeModel(paletteRootNode);
210.105 - //
210.106 - treeFunctions.setModel(functionsModel);
210.107 - treeFunctions.setCellRenderer(new NodesTreeRenderer());
210.108 - treeFunctions.setRootVisible(false);
210.109 - treeFunctions.setShowsRootHandles(true);
210.110 - //
210.111 - treeSchema.addMouseListener(new MouseAdapter() {
210.112 - public void mouseClicked(MouseEvent e) {
210.113 - if (e.getClickCount() == 2 /**&& e.isAltDown() */) {
210.114 - TreePath tp = treeSchema.getSelectionPath();
210.115 - // TreePath tp = treeSchema.getPathForLocation(e.getX(), e.getY());
210.116 - if (tp != null) {
210.117 - Object lastPathComp = tp.getLastPathComponent();
210.118 - if (lastPathComp != null &&
210.119 - lastPathComp instanceof AxiomNode) {
210.120 - addXPath((AxiomNode)lastPathComp);
210.121 - }
210.122 - }
210.123 - }
210.124 - }
210.125 - });
210.126 - //
210.127 - treeFunctions.addMouseListener(new MouseAdapter() {
210.128 - public void mouseClicked(MouseEvent e) {
210.129 - if (e.getClickCount() == 2) {
210.130 - TreePath tp = treeFunctions.getSelectionPath();
210.131 - // TreePath tp = treeFunctions.getPathForLocation(e.getX(), e.getY());
210.132 - if (tp != null) {
210.133 - Object lastPathComp = tp.getLastPathComponent();
210.134 - if (lastPathComp != null &&
210.135 - lastPathComp instanceof ItemNode) {
210.136 - addFunction((ItemNode)lastPathComp);
210.137 - }
210.138 - }
210.139 - }
210.140 - }
210.141 - });
210.142 - //
210.143 - btnCheckSyntax.addActionListener(new ActionListener() {
210.144 - public void actionPerformed(ActionEvent e) {
210.145 - checkSyntax();
210.146 - }
210.147 - });
210.148 - }
210.149 -
210.150 - public boolean initControls() {
210.151 - return true;
210.152 - }
210.153 -
210.154 - public void setSelectedValue(String newValue) {
210.155 - txtExpression.setText(newValue);
210.156 - }
210.157 -
210.158 - public String getSelectedValue() {
210.159 - return txtExpression.getText();
210.160 - }
210.161 -
210.162 - public boolean afterClose() {
210.163 - return true;
210.164 - }
210.165 -
210.166 - public boolean unsubscribeListeners() {
210.167 - return true;
210.168 - }
210.169 -
210.170 - public boolean subscribeListeners() {
210.171 - return true;
210.172 - }
210.173 -
210.174 - private static FileObject getPaletteFolder(String folderName) {
210.175 - FileObject paletteFolder = null;
210.176 - FileSystem fs = Repository.getDefault().getDefaultFileSystem();
210.177 - paletteFolder = fs.findResource( folderName );
210.178 - return paletteFolder;
210.179 - }
210.180 -
210.181 -
210.182 - private void addXPath(AxiomNode node) {
210.183 - // String defaultNamespace = myBpelProcess.getTargetNamespace();
210.184 - String defaultNamespace = null;
210.185 - String text = AxiomUtils.calculateSimpleXPath(node, defaultNamespace);
210.186 - //
210.187 - int oldSelectionStart = txtExpression.getSelectionStart();
210.188 - int selectionStart = oldSelectionStart;
210.189 - int selectionEnd = oldSelectionStart + text.length();
210.190 - //
210.191 - txtExpression.replaceSelection(text);
210.192 - txtExpression.setCaretPosition(selectionEnd);
210.193 - txtExpression.setSelectionStart(selectionStart);
210.194 - txtExpression.setSelectionEnd(selectionEnd);
210.195 - txtExpression.requestFocus();
210.196 - }
210.197 -
210.198 - private void addFunction(ItemNode funcItemNode) {
210.199 - XpathPaletteItemInfo info = funcItemNode.getItemInfo();
210.200 - //
210.201 - if (info != null) {
210.202 - int oldSelectionStart = txtExpression.getSelectionStart();
210.203 - int selectionStart = oldSelectionStart;
210.204 - int selectionEnd = oldSelectionStart;
210.205 - //
210.206 - String text = null;
210.207 - if (info.isOperator()) {
210.208 - text = " " + info.getOperation() + " "; // NOI18N
210.209 - selectionStart = oldSelectionStart + text.length();
210.210 - selectionEnd = selectionStart;
210.211 - } else if (info.isFunction()) {
210.212 - int maxInput = info.getMaxInput();
210.213 - String inp1, inp2, inp3, inp4;
210.214 - switch (maxInput) {
210.215 - case 1:
210.216 - inp1 = (String)info.getItemAttribute(INPUT_PARAM + "1"); // NOI18N
210.217 - text = info.getOperation() + "("; // NOI18N
210.218 - selectionStart = oldSelectionStart + text.length();
210.219 - text = text + inp1; // NOI18N
210.220 - selectionEnd = oldSelectionStart + text.length();
210.221 - text = text + ")"; // NOI18N
210.222 - break;
210.223 - case 2:
210.224 - inp1 = (String)info.getItemAttribute(INPUT_PARAM + "1"); // NOI18N
210.225 - text = info.getOperation() + "("; // NOI18N
210.226 - selectionStart = oldSelectionStart + text.length();
210.227 - text = text + inp1; // NOI18N
210.228 - selectionEnd = oldSelectionStart + text.length();
210.229 - //
210.230 - inp2 = (String)info.getItemAttribute(INPUT_PARAM + "2"); // NOI18N
210.231 - text = text + ", " + inp2; // NOI18N
210.232 - //
210.233 - text = text + ")"; // NOI18N
210.234 - break;
210.235 - case 3:
210.236 - inp1 = (String)info.getItemAttribute(INPUT_PARAM + "1"); // NOI18N
210.237 - text = info.getOperation() + "("; // NOI18N
210.238 - selectionStart = oldSelectionStart + text.length();
210.239 - text = text + inp1; // NOI18N
210.240 - selectionEnd = oldSelectionStart + text.length();
210.241 - //
210.242 - inp2 = (String)info.getItemAttribute(INPUT_PARAM + "2"); // NOI18N
210.243 - text = text + ", " + inp2; // NOI18N
210.244 - //
210.245 - inp3 = (String)info.getItemAttribute(INPUT_PARAM + "3"); // NOI18N
210.246 - text = text + ", " + inp3; // NOI18N
210.247 - //
210.248 - text = text + ")"; // NOI18N
210.249 - break;
210.250 - case 0:
210.251 - default:
210.252 - inp1 = (String)info.getItemAttribute(INPUT_PARAM + "1"); // NOI18N
210.253 - text = info.getOperation() + "("; // NOI18N
210.254 - selectionStart = oldSelectionStart + text.length();
210.255 - selectionEnd = selectionStart;
210.256 - text = text + ")"; // NOI18N
210.257 - break;
210.258 - }
210.259 - }
210.260 - //
210.261 - if (text != null && text.length() > 0) {
210.262 - txtExpression.replaceSelection(text);
210.263 - txtExpression.setCaretPosition(selectionStart);
210.264 - txtExpression.setSelectionStart(selectionStart);
210.265 - txtExpression.setSelectionEnd(selectionEnd);
210.266 - txtExpression.requestFocus();
210.267 - }
210.268 - //
210.269 - // TODO set focus to the expression field
210.270 - // TODO set cursor to appropriate place!!!
210.271 - }
210.272 - }
210.273 -
210.274 - private void checkSyntax() {
210.275 - boolean result = true;
210.276 - //
210.277 - String expr = txtExpression.getText();
210.278 - if (expr == null || expr.length() == 0) {
210.279 - return;
210.280 - }
210.281 - XPathModel xpImpl = AbstractXPathModelHelper.getInstance().newXPathModel();
210.282 - try {
210.283 - XPathExpression xPath = xpImpl.parseExpression(expr);
210.284 -// String exprString = xPath.getExpressionString();
210.285 -// UserNotification.showMessage(exprString);
210.286 - } catch (XPathException xpe) {
210.287 - String errorMessage = null;
210.288 - Throwable cause = xpe.getCause();
210.289 - if (cause != null) {
210.290 - errorMessage = cause.getMessage();
210.291 - }
210.292 - if (errorMessage == null) {
210.293 - errorMessage = xpe.getMessage();
210.294 - }
210.295 - //
210.296 - UserNotification.showMessage(errorMessage);
210.297 - result = false;
210.298 - // ErrorManager.getDefault().notify(xpe);
210.299 - }
210.300 - }
210.301 -
210.302 -
210.303 - /** This method is called from within the constructor to
210.304 - * initialize the form.
210.305 - * WARNING: Do NOT modify this code. The content of this method is
210.306 - * always regenerated by the Form Editor.
210.307 - */
210.308 - // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
210.309 - private void initComponents() {
210.310 - lblSchema = new javax.swing.JLabel();
210.311 - lblFunctions = new javax.swing.JLabel();
210.312 - lblExpression = new javax.swing.JLabel();
210.313 - scrSchema = new javax.swing.JScrollPane();
210.314 - treeSchema = new javax.swing.JTree();
210.315 - scrFunctions = new javax.swing.JScrollPane();
210.316 - treeFunctions = new javax.swing.JTree();
210.317 - scrExpression = new javax.swing.JScrollPane();
210.318 - txtExpression = new javax.swing.JTextArea();
210.319 - btnCheckSyntax = new javax.swing.JButton();
210.320 -
210.321 - lblSchema.setLabelFor(treeSchema);
210.322 - lblSchema.setText(org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "LBL_Schema"));
210.323 - lblSchema.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "ACSN_LBL_Schema"));
210.324 - lblSchema.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "ACSD_LBL_Schema"));
210.325 -
210.326 - lblFunctions.setLabelFor(treeFunctions);
210.327 - lblFunctions.setText(org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "LBL_Functions"));
210.328 - lblFunctions.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "ACSN_LBL_Functions"));
210.329 - lblFunctions.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "ACSD_LBL_Functions"));
210.330 -
210.331 - lblExpression.setLabelFor(txtExpression);
210.332 - lblExpression.setText(org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "LBL_Expression"));
210.333 - lblExpression.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "ACSN_LBL_Expression"));
210.334 - lblExpression.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "ACSD_LBL_Expression"));
210.335 -
210.336 - scrSchema.setViewportView(treeSchema);
210.337 -
210.338 - scrFunctions.setViewportView(treeFunctions);
210.339 -
210.340 - txtExpression.setColumns(20);
210.341 - txtExpression.setRows(5);
210.342 - scrExpression.setViewportView(txtExpression);
210.343 -
210.344 - btnCheckSyntax.setText(org.openide.util.NbBundle.getMessage(ExpressionEditor.class, "BTN_CheckSyntax"));
210.345 -
210.346 - org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
210.347 - this.setLayout(layout);
210.348 - layout.setHorizontalGroup(
210.349 - layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
210.350 - .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
210.351 - .addContainerGap()
210.352 - .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
210.353 - .add(org.jdesktop.layout.GroupLayout.LEADING, scrExpression, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 655, Short.MAX_VALUE)
210.354 - .add(layout.createSequentialGroup()
210.355 - .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
210.356 - .add(layout.createSequentialGroup()
210.357 - .add(scrSchema, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 435, Short.MAX_VALUE)
210.358 - .add(7, 7, 7))
210.359 - .add(layout.createSequentialGroup()
210.360 - .add(lblSchema)
210.361 - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)))
210.362 - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
210.363 - .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
210.364 - .add(lblFunctions)
210.365 - .add(scrFunctions, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 213, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
210.366 - .add(layout.createSequentialGroup()
210.367 - .add(lblExpression)
210.368 - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 478, Short.MAX_VALUE)
210.369 - .add(btnCheckSyntax)))
210.370 - .addContainerGap())
210.371 - );
210.372 - layout.setVerticalGroup(
210.373 - layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
210.374 - .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
210.375 - .addContainerGap()
210.376 - .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
210.377 - .add(lblSchema)
210.378 - .add(lblFunctions))
210.379 - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
210.380 - .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
210.381 - .add(scrFunctions, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 250, Short.MAX_VALUE)
210.382 - .add(scrSchema, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 250, Short.MAX_VALUE))
210.383 - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
210.384 - .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
210.385 - .add(btnCheckSyntax)
210.386 - .add(lblExpression))
210.387 - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
210.388 - .add(scrExpression, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 115, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
210.389 - );
210.390 - }// </editor-fold>//GEN-END:initComponents
210.391 -
210.392 -
210.393 - // Variables declaration - do not modify//GEN-BEGIN:variables
210.394 - private javax.swing.JButton btnCheckSyntax;
210.395 - private javax.swing.JLabel lblExpression;
210.396 - private javax.swing.JLabel lblFunctions;
210.397 - private javax.swing.JLabel lblSchema;
210.398 - private javax.swing.JScrollPane scrExpression;
210.399 - private javax.swing.JScrollPane scrFunctions;
210.400 - private javax.swing.JScrollPane scrSchema;
210.401 - private javax.swing.JTree treeFunctions;
210.402 - private javax.swing.JTree treeSchema;
210.403 - private javax.swing.JTextArea txtExpression;
210.404 - // End of variables declaration//GEN-END:variables
210.405 -
210.406 -}
211.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/xpatheditor/ItemNode.java Wed Feb 21 08:53:38 2007 +0000
211.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
211.3 @@ -1,94 +0,0 @@
211.4 -/*
211.5 - * The contents of this file are subject to the terms of the Common Development
211.6 - * and Distribution License (the License). You may not use this file except in
211.7 - * compliance with the License.
211.8 - *
211.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
211.10 - * or http://www.netbeans.org/cddl.txt.
211.11 - *
211.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
211.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
211.14 - * If applicable, add the following below the CDDL Header, with the fields
211.15 - * enclosed by brackets [] replaced by your own identifying information:
211.16 - * "Portions Copyrighted [year] [name of copyright owner]"
211.17 - *
211.18 - * The Original Software is NetBeans. The Initial Developer of the Original
211.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
211.20 - * Microsystems, Inc. All Rights Reserved.
211.21 - */
211.22 -
211.23 -package org.netbeans.modules.xslt.mapper.xpatheditor;
211.24 -import java.awt.Image;
211.25 -import org.netbeans.modules.xslt.mapper.methoid.Constants;
211.26 -import org.openide.filesystems.FileObject;
211.27 -import org.openide.filesystems.Repository;
211.28 -import org.openide.loaders.XMLDataObject;
211.29 -import org.openide.nodes.AbstractNode;
211.30 -import org.openide.nodes.Children;
211.31 -import org.openide.util.Lookup;
211.32 -
211.33 -/**
211.34 - * A node for palette category.
211.35 - *
211.36 - * @author nk160297
211.37 - */
211.38 -public class ItemNode extends AbstractNode {
211.39 -
211.40 - private XMLDataObject myItem;
211.41 -
211.42 - public ItemNode(XMLDataObject paletteItem, Children children, Lookup lookup) {
211.43 - super(children, lookup);
211.44 - myItem = paletteItem;
211.45 - }
211.46 -
211.47 - public static boolean isLiteral(XMLDataObject paletteItem) {
211.48 - FileObject itemFo = paletteItem.getPrimaryFile();
211.49 - String metainfoRef = (String)itemFo.getAttribute(
211.50 - Constants.METAINFO_REF);
211.51 - if (metainfoRef != null && metainfoRef.length() != 0) {
211.52 - FileObject metainfoFo = Repository.getDefault().
211.53 - getDefaultFileSystem().findResource(metainfoRef);
211.54 - if (metainfoFo != null) {
211.55 - Object literalObj = metainfoFo.getAttribute(Constants.LITERAL_FLAG);
211.56 - if (literalObj != null && literalObj instanceof Boolean) {
211.57 - boolean isLiteral = ((Boolean) literalObj).booleanValue();
211.58 - return isLiteral;
211.59 - }
211.60 - }
211.61 - }
211.62 - return false;
211.63 - }
211.64 -
211.65 - public XpathPaletteItemInfo getItemInfo() {
211.66 - FileObject itemFo = myItem.getPrimaryFile();
211.67 - String metainfoRef = (String)itemFo.getAttribute(
211.68 - Constants.METAINFO_REF);
211.69 - if (metainfoRef != null && metainfoRef.length() != 0) {
211.70 - FileObject metainfoFo = Repository.getDefault().
211.71 - getDefaultFileSystem().findResource(metainfoRef);
211.72 - if (metainfoFo != null) {
211.73 - return new XpathPaletteItemInfo(metainfoFo);
211.74 - }
211.75 - }
211.76 - return null;
211.77 - }
211.78 -
211.79 - public String getName() {
211.80 - return myItem.getNodeDelegate().getName();
211.81 - }
211.82 -
211.83 - public String getHtmlDisplayName() {
211.84 - return getName();
211.85 - }
211.86 -
211.87 - public Image getIcon(int type) {
211.88 - return myItem.getNodeDelegate().getIcon(type);
211.89 - }
211.90 -
211.91 - public Image getOpenedIcon(int type) {
211.92 - return getIcon(type);
211.93 - }
211.94 -
211.95 -
211.96 -
211.97 -}
212.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/xpatheditor/PaletteTreeNodeFactory.java Wed Feb 21 08:53:38 2007 +0000
212.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
212.3 @@ -1,97 +0,0 @@
212.4 -/*
212.5 - * The contents of this file are subject to the terms of the Common Development
212.6 - * and Distribution License (the License). You may not use this file except in
212.7 - * compliance with the License.
212.8 - *
212.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
212.10 - * or http://www.netbeans.org/cddl.txt.
212.11 -
212.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
212.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
212.14 - * If applicable, add the following below the CDDL Header, with the fields
212.15 - * enclosed by brackets [] replaced by your own identifying information:
212.16 - * "Portions Copyrighted [year] [name of copyright owner]"
212.17 - *
212.18 - * The Original Software is NetBeans. The Initial Developer of the Original
212.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
212.20 - * Microsystems, Inc. All Rights Reserved.
212.21 - */
212.22 -package org.netbeans.modules.xslt.mapper.xpatheditor;
212.23 -
212.24 -import org.netbeans.modules.soa.ui.nodes.NodeFactory;
212.25 -import org.netbeans.modules.soa.ui.ExtendedLookup;
212.26 -import org.netbeans.modules.soa.ui.nodes.NodeFactory.TextNode;
212.27 -import org.netbeans.modules.xslt.mapper.xpatheditor.PaletteTreeNodeFactory.NodeType;
212.28 -import org.openide.filesystems.FileObject;
212.29 -import org.openide.loaders.DataFolder;
212.30 -import org.openide.loaders.XMLDataObject;
212.31 -import org.openide.nodes.Children;
212.32 -import org.openide.nodes.Node;
212.33 -import org.openide.util.Lookup;
212.34 -
212.35 -/**
212.36 - * Constructs a palette tree for the expression editor.
212.37 - *
212.38 - * @author nk160297
212.39 - */
212.40 -public class PaletteTreeNodeFactory implements NodeFactory<NodeType> {
212.41 -
212.42 - public static enum NodeType {
212.43 - ROOT, CATEGORY, ITEM;
212.44 - }
212.45 -
212.46 - public PaletteTreeNodeFactory() {
212.47 - }
212.48 -
212.49 - public Node createNode(NodeType nodeType, Object ref,
212.50 - Children children, Lookup lookup) {
212.51 - switch (nodeType) {
212.52 - case ROOT:
212.53 - assert ref instanceof String;
212.54 - return new TextNode(children, (String)ref);
212.55 - case CATEGORY:
212.56 - assert ref instanceof DataFolder;
212.57 - return new CategoryNode((DataFolder)ref, children, lookup);
212.58 - case ITEM:
212.59 - assert ref instanceof XMLDataObject;
212.60 - if (ItemNode.isLiteral((XMLDataObject)ref)) {
212.61 - // Skip all literals
212.62 - return null;
212.63 - } else {
212.64 - return new ItemNode((XMLDataObject)ref, children, lookup);
212.65 - }
212.66 - default:
212.67 - return null;
212.68 - }
212.69 - }
212.70 -
212.71 - public Node createNode(NodeType nodeType, Object ref, Lookup lookup) {
212.72 - //
212.73 - Children children = null;
212.74 - Node newNode = null;
212.75 - //
212.76 - NodeFactory nodeFactory =
212.77 - (NodeFactory)lookup.lookup(NodeFactory.class);
212.78 - if (!(nodeFactory instanceof PaletteTreeNodeFactory)) {
212.79 - lookup = new ExtendedLookup(lookup, this);
212.80 - }
212.81 - //
212.82 - switch (nodeType) {
212.83 - case ROOT:
212.84 - assert ref instanceof FileObject; // Root palette folder
212.85 - DataFolder paletteFolder = DataFolder.findFolder((FileObject)ref);
212.86 - children = new CategoryChildren(paletteFolder, lookup);
212.87 - newNode = createNode(nodeType, "Root", children, lookup); // NOI18N
212.88 - return newNode;
212.89 - case CATEGORY:
212.90 - assert ref instanceof DataFolder;
212.91 - children = new CategoryChildren((DataFolder)ref, lookup);
212.92 - newNode = createNode(nodeType, ref, children, lookup); // NOI18N
212.93 - return newNode;
212.94 - default:
212.95 - newNode = createNode(nodeType, ref, Children.LEAF, lookup);
212.96 - return newNode;
212.97 - }
212.98 - }
212.99 -
212.100 -}
213.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/xpatheditor/XPathLiteralEditor.java Wed Feb 21 08:53:38 2007 +0000
213.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
213.3 @@ -1,154 +0,0 @@
213.4 -/*
213.5 - * The contents of this file are subject to the terms of the Common Development
213.6 - * and Distribution License (the License). You may not use this file except in
213.7 - * compliance with the License.
213.8 - *
213.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
213.10 - * or http://www.netbeans.org/cddl.txt.
213.11 -
213.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
213.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
213.14 - * If applicable, add the following below the CDDL Header, with the fields
213.15 - * enclosed by brackets [] replaced by your own identifying information:
213.16 - * "Portions Copyrighted [year] [name of copyright owner]"
213.17 - *
213.18 - * The Original Software is NetBeans. The Initial Developer of the Original
213.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
213.20 - * Microsystems, Inc. All Rights Reserved.
213.21 - */
213.22 -
213.23 -package org.netbeans.modules.xslt.mapper.xpatheditor;
213.24 -
213.25 -
213.26 -import java.awt.Dialog;
213.27 -import java.awt.Window;
213.28 -import org.netbeans.modules.soa.mapper.common.basicmapper.IBasicMapper;
213.29 -import org.netbeans.modules.soa.mapper.common.basicmapper.IBasicMapperLiteralUpdateEventInfo;
213.30 -import org.netbeans.modules.soa.mapper.common.basicmapper.literal.ILiteralEditor;
213.31 -import org.netbeans.modules.soa.mapper.common.basicmapper.literal.ILiteralUpdater;
213.32 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IFieldNode;
213.33 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IMethoid;
213.34 -import org.netbeans.modules.soa.mapper.common.basicmapper.methoid.IMethoidNode;
213.35 -import org.openide.DialogDescriptor;
213.36 -import org.openide.DialogDisplayer;
213.37 -
213.38 -/**
213.39 - * Implements special case of a XPath expression string literal editor.
213.40 - *
213.41 - * @author nk160297
213.42 - */
213.43 -public class XPathLiteralEditor implements ILiteralEditor {
213.44 -
213.45 - private Window mOwner;
213.46 -
213.47 - private IBasicMapper mBasicMapper;
213.48 -
213.49 - private IFieldNode mFieldNode;
213.50 -
213.51 - private ILiteralUpdater mUpdateListener;
213.52 -
213.53 - private IMethoidNode mMethoidNode;
213.54 -
213.55 - private IMethoid mMethoid;
213.56 -
213.57 - /**
213.58 - * Creates a new instance of XPathLiteralEditor
213.59 - */
213.60 - public XPathLiteralEditor(Window owner, IBasicMapper basicMapper,
213.61 - IFieldNode fieldNode, ILiteralUpdater updateListener) {
213.62 - super();
213.63 - mOwner = owner;
213.64 - mBasicMapper = basicMapper;
213.65 - mFieldNode = fieldNode;
213.66 - mUpdateListener = updateListener;
213.67 - mMethoidNode = (IMethoidNode) mFieldNode.getGroupNode();
213.68 - mMethoid = (IMethoid) mMethoidNode.getMethoidObject();
213.69 - }
213.70 -
213.71 - /**
213.72 - * @see org.netbeans.modules.mapper.common.basicmapper.literal
213.73 - * * .ILiteralEditor#show()
213.74 - */
213.75 - public void show() {
213.76 - ExpressionEditor exprEditor = new ExpressionEditor(mBasicMapper);
213.77 - String expr = mFieldNode.getLiteralName();
213.78 - if (expr != null && expr.length() > 0) {
213.79 - exprEditor.setSelectedValue(expr);
213.80 - }
213.81 - //
213.82 - DialogDescriptor descriptor = new DialogDescriptor(exprEditor, "XPath Expression Editor");
213.83 - Dialog dialog = DialogDisplayer.getDefault().createDialog(descriptor);
213.84 - dialog.setVisible(true);
213.85 - //
213.86 - if (!DialogDescriptor.OK_OPTION.equals(descriptor.getValue())) {
213.87 - return;
213.88 - }
213.89 - String literal = exprEditor.getSelectedValue();
213.90 - if (null == literal) {
213.91 - literal = "";
213.92 - }
213.93 - fireLiteralUpdated(literal);
213.94 - }
213.95 -
213.96 - /**
213.97 - * @see org.netbeans.modules.mapper.common.basicmapper.literal
213.98 - * * .ILiteralEditor#getUpdateListener()
213.99 - */
213.100 - public ILiteralUpdater getUpdateListener() {
213.101 - return mUpdateListener;
213.102 - }
213.103 -
213.104 - /**
213.105 - * Fires an event for the update of the duration literal.
213.106 - * * @param newValue New value for the duration literal.
213.107 - */
213.108 - private void fireLiteralUpdated( final String newValue ) {
213.109 - // set the expression
213.110 - mBasicMapper.updateFieldLiteral( new IBasicMapperLiteralUpdateEventInfo(){
213.111 - /**
213.112 - * @see org.netbeans.modules.mapper.common.basicmapper
213.113 - * * .IBasicMapperLiteralUpdateEventInfo#getLiteralUpdater()
213.114 - */
213.115 - public ILiteralUpdater getLiteralUpdater()
213.116 - {
213.117 - return mUpdateListener;
213.118 - }
213.119 -
213.120 - /**
213.121 - * @see org.netbeans.modules.mapper.common.basicmapper
213.122 - * * .IBasicMapperLiteralUpdateEventInfo#getMethoidNode()
213.123 - */
213.124 - public IMethoidNode getMethoidNode()
213.125 - {
213.126 - return mMethoidNode;
213.127 - }
213.128 -
213.129 - /**
213.130 - * @see org.netbeans.modules.mapper.common.basicmapper
213.131 - * * .IBasicMapperLiteralUpdateEventInfo#getFieldNode()
213.132 - */
213.133 - public IFieldNode getFieldNode()
213.134 - {
213.135 - return mFieldNode;
213.136 - }
213.137 -
213.138 - /**
213.139 - * @see org.netbeans.modules.mapper.common.basicmapper
213.140 - * * .IBasicMapperLiteralUpdateEventInfo#getNewValue()
213.141 - */
213.142 - public String getNewValue()
213.143 - {
213.144 - return newValue;
213.145 - }
213.146 -
213.147 - /**
213.148 - * @see org.netbeans.modules.mapper.common.basicmapper
213.149 - * * .IBasicMapperLiteralUpdateEventInfo#isLiteralMethoid()
213.150 - */
213.151 - public boolean isLiteralMethoid()
213.152 - {
213.153 - return mMethoid.isLiteral();
213.154 - }
213.155 - } );
213.156 - }
213.157 -}
214.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/xpatheditor/XpathPaletteItemInfo.java Wed Feb 21 08:53:38 2007 +0000
214.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
214.3 @@ -1,207 +0,0 @@
214.4 -/*
214.5 - * The contents of this file are subject to the terms of the Common Development
214.6 - * and Distribution License (the License). You may not use this file except in
214.7 - * compliance with the License.
214.8 - *
214.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
214.10 - * or http://www.netbeans.org/cddl.txt.
214.11 -
214.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
214.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
214.14 - * If applicable, add the following below the CDDL Header, with the fields
214.15 - * enclosed by brackets [] replaced by your own identifying information:
214.16 - * "Portions Copyrighted [year] [name of copyright owner]"
214.17 - *
214.18 - * The Original Software is NetBeans. The Initial Developer of the Original
214.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
214.20 - * Microsystems, Inc. All Rights Reserved.
214.21 - */
214.22 -
214.23 -package org.netbeans.modules.xslt.mapper.xpatheditor;
214.24 -
214.25 -import org.netbeans.modules.xslt.mapper.methoid.Constants;
214.26 -import org.openide.filesystems.FileObject;
214.27 -
214.28 -
214.29 -/**
214.30 - * XPATH Palette Item information, used to keep information and helper methods
214.31 - * used by XPATH collaboration editor.
214.32 - *
214.33 - * @author Tientien Li
214.34 - * @version $Revision$
214.35 - */
214.36 -public class XpathPaletteItemInfo {
214.37 -
214.38 - private FileObject myFo;
214.39 -
214.40 - /**
214.41 - * Creates a new instance of XpathPaletteItemInfo
214.42 - *
214.43 - * @param cat the category
214.44 - * @param itm the item
214.45 - */
214.46 - public XpathPaletteItemInfo(FileObject itmFo) {
214.47 - myFo = itmFo;
214.48 - }
214.49 -
214.50 - /**
214.51 - * get the maximum number of input.
214.52 - *
214.53 - * @return the max input count
214.54 - */
214.55 - public int getMaxInput() {
214.56 - int val = 0;
214.57 - Object o = myFo.getAttribute(Constants.XPATH_MAXINPUT);
214.58 - if (o != null) {
214.59 - try {
214.60 - val = Integer.parseInt((String) o);
214.61 - } catch (Exception ex) {
214.62 - // OK.. it is not a valid integer, return 0 instead.
214.63 - }
214.64 - }
214.65 - return val;
214.66 - }
214.67 -
214.68 - /**
214.69 - * is the palette an operator.
214.70 - *
214.71 - * @return true if it is an operator
214.72 - */
214.73 - public boolean isOperator() {
214.74 - String s = (String) myFo.getAttribute(Constants.XPATH_OPERATOR);
214.75 - return ((s != null) && !s.equals(""));
214.76 - }
214.77 -
214.78 - /**
214.79 - * is the palette an operator.
214.80 - *
214.81 - * @return true if it is an operator
214.82 - */
214.83 - public boolean isFunction() {
214.84 - String s = (String) myFo.getAttribute(Constants.XPATH_FUNCTION);
214.85 - return (s != null && !s.equals(""));
214.86 - }
214.87 -
214.88 - /**
214.89 - * is the palette an Number.
214.90 - *
214.91 - * @return true if it is an Number
214.92 - */
214.93 - public boolean isNumber() {
214.94 - String s = (String) myFo.getAttribute(Constants.XPATH_NUMBER);
214.95 - return (s != null && !s.equals(""));
214.96 - }
214.97 -
214.98 - /**
214.99 - * is the palette an Boolean.
214.100 - *
214.101 - * @return true if it is an Boolean
214.102 - */
214.103 - public boolean isBoolean() {
214.104 - String s = (String) myFo.getAttribute(Constants.XPATH_BOOLEAN);
214.105 - return (s != null && !s.equals(""));
214.106 - }
214.107 -
214.108 - /**
214.109 - * is the palette an String.
214.110 - *
214.111 - * @return true if it is an String
214.112 - */
214.113 - public boolean isString() {
214.114 - String s = (String) myFo.getAttribute(Constants.XPATH_STRING);
214.115 - return (s != null && !s.equals(""));
214.116 - }
214.117 -
214.118 - /**
214.119 - * Retrieve the value of the attribute from the IPaletteItem.
214.120 - * (from layer.xml)
214.121 - *
214.122 - * @param attrbName name of the attribute whose value we return
214.123 - * @return string
214.124 - */
214.125 - public String getItemAttribute(String attrbName) {
214.126 -
214.127 - return (String) myFo.getAttribute(attrbName);
214.128 - }
214.129 -
214.130 - /**
214.131 - * Retrieve the value of the attribute from the IPaletteItem.
214.132 - * (from layer.xml)
214.133 - *
214.134 - * @return string
214.135 - */
214.136 - private String getOperator() {
214.137 -
214.138 - return isOperator() ? (String) myFo.getAttribute(Constants.XPATH_OPERATOR) : null;
214.139 - }
214.140 -
214.141 - /**
214.142 - * Retrieve the value of the attribute from the IPaletteItem.
214.143 - * (from layer.xml)
214.144 - *
214.145 - * @return string
214.146 - */
214.147 - private String getFunction() {
214.148 -
214.149 - return isFunction() ? (String) myFo.getAttribute(Constants.XPATH_FUNCTION) : null;
214.150 - }
214.151 -
214.152 - /**
214.153 - * Retrieve the value of the attribute from the IPaletteItem.
214.154 - * (from layer.xml)
214.155 - *
214.156 - * @return string
214.157 - */
214.158 - private String getNumber() {
214.159 -
214.160 - return isNumber() ? (String) myFo.getAttribute(Constants.XPATH_NUMBER) : null;
214.161 - }
214.162 -
214.163 - /**
214.164 - * Retrieve the value of the attribute from the IPaletteItem.
214.165 - * (from layer.xml)
214.166 - *
214.167 - * @return string
214.168 - */
214.169 - private String getBoolean() {
214.170 -
214.171 - return isBoolean() ? (String) myFo.getAttribute(Constants.XPATH_BOOLEAN) : null;
214.172 - }
214.173 -
214.174 - /**
214.175 - * Retrieve the value of the attribute from the IPaletteItem.
214.176 - * (from layer.xml)
214.177 - *
214.178 - * @return string
214.179 - */
214.180 - private String getString() {
214.181 - return isString() ? (String) myFo.getAttribute(Constants.XPATH_STRING) : null;
214.182 - }
214.183 -
214.184 - /**
214.185 - * Describe <code>getOperation</code> method here.
214.186 - *
214.187 - * @return a <code>String</code> value
214.188 - */
214.189 - public String getOperation() {
214.190 -
214.191 - if (isOperator()) {
214.192 - return getOperator();
214.193 -
214.194 - } else if (isFunction()) {
214.195 - return getFunction();
214.196 -
214.197 - } else if (isBoolean()) {
214.198 - return getBoolean();
214.199 -
214.200 - } else if (isNumber()) {
214.201 - return getNumber();
214.202 -
214.203 - } else if (isString()) {
214.204 - return getString();
214.205 -
214.206 - }
214.207 - return null;
214.208 - }
214.209 -
214.210 -}
215.1 --- a/xslt.project/antsrc/org/netbeans/modules/xslt/project/antlib.xml Wed Feb 21 08:53:38 2007 +0000
215.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
215.3 @@ -1,6 +0,0 @@
215.4 -<?xml version="1.0" encoding="UTF-8"?>
215.5 - <antlib>
215.6 - <!-- typedef name="XsltProjectJBIGen" classname="org.netbeans.modules.xslt.project.anttasks.IDEGenerateJBIDescriptor"/ -->
215.7 - <!-- typedef name="XsltProjectValidate" classname="org.netbeans.modules.xslt.project.anttasks.IDEValidateXSLTProject"/ -->
215.8 -
215.9 - </antlib>
216.1 --- a/xslt.project/antsrc/org/netbeans/modules/xslt/project/anttasks/GenerateJBIDescriptor.java Wed Feb 21 08:53:38 2007 +0000
216.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
216.3 @@ -1,134 +0,0 @@
216.4 -/*
216.5 - * The contents of this file are subject to the terms of the Common Development
216.6 - * and Distribution License (the License). You may not use this file except in
216.7 - * compliance with the License.
216.8 - *
216.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
216.10 - * or http://www.netbeans.org/cddl.txt.
216.11 -
216.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
216.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
216.14 - * If applicable, add the following below the CDDL Header, with the fields
216.15 - * enclosed by brackets [] replaced by your own identifying information:
216.16 - * "Portions Copyrighted [year] [name of copyright owner]"
216.17 - *
216.18 - * The Original Software is NetBeans. The Initial Developer of the Original
216.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
216.20 - * Microsystems, Inc. All Rights Reserved.
216.21 - */
216.22 -
216.23 -package org.netbeans.modules.xslt.project.anttasks;
216.24 -
216.25 -import java.io.File;
216.26 -import java.util.ArrayList;
216.27 -import java.util.StringTokenizer;
216.28 -
216.29 -//import org.netbeans.modules.xslt.project.CommandlineXsltProjectXmlCatalogProvider;
216.30 -
216.31 -import org.apache.tools.ant.BuildException;
216.32 -import org.apache.tools.ant.Task;
216.33 -
216.34 -import org.apache.tools.ant.types.Reference;
216.35 -
216.36 -/**
216.37 - * Generates JBI Descriptor
216.38 - * @author Vitaly Bychkov
216.39 - * @author Sreenivasan Genipudi
216.40 - */
216.41 -public class GenerateJBIDescriptor extends Task {
216.42 - // Member variable representing source directory
216.43 - private String mSourceDirectory = null;
216.44 - // Member variable representing build directory
216.45 - private String mBuildDirectory = null;
216.46 - // Member variable representing project classpath
216.47 - private String mProjectClassPath= null;
216.48 -
216.49 -
216.50 - /**
216.51 - * Constructor
216.52 - */
216.53 - public GenerateJBIDescriptor() {
216.54 - }
216.55 -
216.56 - /**
216.57 - * Set the build directory
216.58 - * @param buildDir build directory
216.59 - */
216.60 - public void setBuildDirectory(String buildDir) {
216.61 - mBuildDirectory = buildDir;
216.62 - }
216.63 - /**
216.64 - * Set the source directory
216.65 - * @param srcDir source directory
216.66 - */
216.67 - public void setSourceDirectory(String srcDir) {
216.68 - this.mSourceDirectory = srcDir;
216.69 - }
216.70 - /**
216.71 - * Set the classpath reference
216.72 - * @param ref Classpath Reference
216.73 - */
216.74 - public void setClasspathRef(Reference ref) {
216.75 - }
216.76 -
216.77 - /**
216.78 - * Get the source directory
216.79 - * @return String value of the source directory
216.80 - */
216.81 - public String getSourceDirectory() {
216.82 - return this.mSourceDirectory;
216.83 - }
216.84 -
216.85 - /**
216.86 - * Set the project classpath
216.87 - * @param projectClassPath Set the project classpath
216.88 - */
216.89 - public void setProjectClassPath(String projectClassPath) {
216.90 - this.mProjectClassPath = projectClassPath;
216.91 - }
216.92 -
216.93 - /**
216.94 - * generate JBI xml
216.95 - * @throws org.apache.tools.ant.BuildException
216.96 - */
216.97 - public void execute() throws BuildException {
216.98 -
216.99 - if(this.mSourceDirectory == null) {
216.100 - throw new BuildException("No directory is set for source files.");
216.101 - }
216.102 -
216.103 - File sourceDirectory = new File(this.mSourceDirectory);
216.104 -
216.105 - //read project classpath
216.106 - //TODO: refactor this to use wsdl classpath
216.107 - ArrayList projectDirs = new ArrayList();
216.108 - if(this.mProjectClassPath != null
216.109 - && !this.mProjectClassPath.trim().equals("")
216.110 - && !this.mProjectClassPath.trim().equals("${javac.classpath}")) {
216.111 - StringTokenizer st = new StringTokenizer(this.mProjectClassPath, ";");
216.112 - while (st.hasMoreTokens()) {
216.113 - String spath = st.nextToken();
216.114 - try {
216.115 -
216.116 - File sFile = new File(sourceDirectory.getParentFile().getCanonicalPath() + File.separator + spath);
216.117 -
216.118 - File srcFolder = new File(sFile.getParentFile().getParentFile().getCanonicalFile(), "src");
216.119 - projectDirs.add(srcFolder);
216.120 - } catch(Exception ex) {
216.121 - throw new BuildException("Failed to create File object for dependent project path "+ spath);
216.122 - }
216.123 - }
216.124 - }
216.125 -
216.126 - //find the owner project
216.127 - if(sourceDirectory != null) {
216.128 - ArrayList srcList = new ArrayList();
216.129 - srcList.add(sourceDirectory);
216.130 -// TODO a
216.131 -// CommandlineXsltProjectXmlCatalogProvider.getInstance().setSourceDirectory(this.mSourceDirectory);
216.132 -// JBIGenerator generator = new JBIGenerator(projectDirs, srcList);
216.133 -// generator.generate(new File(mBuildDirectory));
216.134 - }
216.135 - }
216.136 -
216.137 -}
217.1 --- a/xslt.project/antsrc/org/netbeans/modules/xslt/project/anttasks/GenerateJBIDescriptorTask.java Wed Feb 21 08:53:38 2007 +0000
217.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
217.3 @@ -1,178 +0,0 @@
217.4 -/*
217.5 - * The contents of this file are subject to the terms of the Common Development
217.6 - * and Distribution License (the License). You may not use this file except in
217.7 - * compliance with the License.
217.8 - *
217.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
217.10 - * or http://www.netbeans.org/cddl.txt.
217.11 -
217.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
217.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
217.14 - * If applicable, add the following below the CDDL Header, with the fields
217.15 - * enclosed by brackets [] replaced by your own identifying information:
217.16 - * "Portions Copyrighted [year] [name of copyright owner]"
217.17 - *
217.18 - * The Original Software is NetBeans. The Initial Developer of the Original
217.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
217.20 - * Microsystems, Inc. All Rights Reserved.
217.21 - */
217.22 -package org.netbeans.modules.xslt.project.anttasks;
217.23 -
217.24 -import org.apache.tools.ant.BuildException;
217.25 -import org.apache.tools.ant.Task;
217.26 -import org.apache.tools.ant.AntClassLoader;
217.27 -import org.apache.tools.ant.types.Path;
217.28 -import org.apache.tools.ant.types.Reference;
217.29 -
217.30 -import java.lang.reflect.Method;
217.31 -
217.32 -import java.util.logging.Level;
217.33 -import java.util.logging.Logger;
217.34 -
217.35 -
217.36 -/**
217.37 - * Ant task wrapper which invokes the JBI Generation task
217.38 - * @author Sreenivasan Genipudi
217.39 - */
217.40 -public class GenerateJBIDescriptorTask extends org.apache.tools.ant.Task{
217.41 - // Member variable representing source directory
217.42 - /**
217.43 - * Source directory
217.44 - */
217.45 - private String mSourceDirectory = null;
217.46 - // Member variable representing build directory
217.47 - /**
217.48 - * Build directory
217.49 - */
217.50 - private String mBuildDirectory = null;
217.51 - // Member variable representing project classpath
217.52 - /**
217.53 - * Project classpath
217.54 - */
217.55 - private String mProjectClassPath= null;
217.56 - /**
217.57 - * Custom classloader used to invoke the JBI Generation task
217.58 - */
217.59 - private AntClassLoader m_myClassLoader = null;
217.60 - /**
217.61 - * Classpath Reference
217.62 - */
217.63 - private Reference m_ref = null;
217.64 -
217.65 - /**
217.66 - * Logger instance
217.67 - */
217.68 - private Logger logger = Logger.getLogger(GenerateJBIDescriptorTask.class.getName());
217.69 - /**
217.70 - * Constructor
217.71 - */
217.72 - public GenerateJBIDescriptorTask() {
217.73 - }
217.74 -
217.75 - /**
217.76 - * Set the classpath reference
217.77 - * @param ref Classpath Reference
217.78 - */
217.79 - public void setClasspathRef(Reference ref) {
217.80 - this.m_ref = ref;
217.81 - }
217.82 -
217.83 - /**
217.84 - * Set the build directory
217.85 - * @param buildDir build directory
217.86 - */
217.87 - public void setBuildDirectory(String buildDir) {
217.88 - mBuildDirectory = buildDir;
217.89 - }
217.90 - /**
217.91 - * Set the source directory
217.92 - * @param srcDir source directory
217.93 - */
217.94 - public void setSourceDirectory(String srcDir) {
217.95 - this.mSourceDirectory = srcDir;
217.96 - }
217.97 -
217.98 - /**
217.99 - * Get the source directory
217.100 - * @return String value of the source directory
217.101 - */
217.102 - public String getSourceDirectory() {
217.103 - return this.mSourceDirectory;
217.104 - }
217.105 -
217.106 - /**
217.107 - * Set the project classpath
217.108 - * @param projectClassPath Project classpath
217.109 - */
217.110 - public void setProjectClassPath(String projectClassPath) {
217.111 - this.mProjectClassPath = projectClassPath;
217.112 - }
217.113 -
217.114 -
217.115 - /**
217.116 - * Invoke the task that generates the JBI.xml
217.117 - */
217.118 - public void execute() throws BuildException {
217.119 - try {
217.120 - m_myClassLoader = new AntClassLoader();
217.121 - initClassLoader();
217.122 - Class antTaskClass = Class.forName("org.netbeans.modules.xslt.project.anttasks.GenerateJBIDescriptor", true,m_myClassLoader );
217.123 - Thread.currentThread().setContextClassLoader(m_myClassLoader);
217.124 -
217.125 - Object genJBIInstObj = antTaskClass.newInstance();
217.126 -
217.127 - Method driver = antTaskClass.getMethod("setBuildDirectory",
217.128 - new Class[] { java.lang.String.class });
217.129 - Object[] param = new Object[] {
217.130 - this.mBuildDirectory
217.131 - };
217.132 - driver.invoke(genJBIInstObj,
217.133 - param);
217.134 -
217.135 - driver = antTaskClass.getMethod("setSourceDirectory",
217.136 - new Class[] { java.lang.String.class });
217.137 - param = new Object[] {
217.138 - this.mSourceDirectory
217.139 - };
217.140 - driver.invoke(genJBIInstObj,
217.141 - param);
217.142 -
217.143 - driver = antTaskClass.getMethod("setProjectClassPath",
217.144 - new Class[] { java.lang.String.class });
217.145 - param = new Object[] {
217.146 - this.mProjectClassPath
217.147 - };
217.148 - driver.invoke(genJBIInstObj,
217.149 - param);
217.150 -
217.151 - driver = antTaskClass.getMethod("execute",
217.152 - null);
217.153 - driver.invoke(genJBIInstObj, null);
217.154 -
217.155 - }catch (Exception ex) {
217.156 - logger.log(Level.FINE, "Compilation Errors found", ex);
217.157 - throw new BuildException("Compilation Errors found");
217.158 - }
217.159 - }
217.160 -
217.161 - /**
217.162 - * Set the custom classloader and make the parent first reference
217.163 - * by the classloader to False
217.164 - */
217.165 - private void initClassLoader() {
217.166 - Path path = new Path(getProject());
217.167 - path.setRefid(m_ref);
217.168 -
217.169 - Path parentPath = new Path(getProject());
217.170 - ClassLoader cl = this.getClass().getClassLoader();
217.171 - if (cl instanceof AntClassLoader) {
217.172 - parentPath.setPath(((AntClassLoader)cl).getClasspath());
217.173 - ((AntClassLoader)cl).setParent(null);
217.174 - parentPath.add(path);
217.175 - path = parentPath;
217.176 - }
217.177 - m_myClassLoader.setClassPath(path);
217.178 - m_myClassLoader.setParent(null);
217.179 - m_myClassLoader.setParentFirst(false);
217.180 - }
217.181 -}
218.1 --- a/xslt.project/antsrc/org/netbeans/modules/xslt/project/anttasks/XsltProjectLookup.java Wed Feb 21 08:53:38 2007 +0000
218.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
218.3 @@ -1,55 +0,0 @@
218.4 -/*
218.5 - * The contents of this file are subject to the terms of the Common Development
218.6 - * and Distribution License (the License). You may not use this file except in
218.7 - * compliance with the License.
218.8 - *
218.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
218.10 - * or http://www.netbeans.org/cddl.txt.
218.11 -
218.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
218.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
218.14 - * If applicable, add the following below the CDDL Header, with the fields
218.15 - * enclosed by brackets [] replaced by your own identifying information:
218.16 - * "Portions Copyrighted [year] [name of copyright owner]"
218.17 - *
218.18 - * The Original Software is NetBeans. The Initial Developer of the Original
218.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
218.20 - * Microsystems, Inc. All Rights Reserved.
218.21 - */
218.22 -package org.netbeans.modules.xslt.project.anttasks;
218.23 -
218.24 -import org.openide.util.Lookup;
218.25 -import org.openide.util.lookup.AbstractLookup;
218.26 -import org.openide.util.lookup.Lookups;
218.27 -
218.28 -
218.29 -public class XsltProjectLookup extends Lookup {
218.30 - static Lookup mylookup = null;
218.31 - static XsltProjectLookup m_instance = null;
218.32 -
218.33 - public XsltProjectLookup() {
218.34 -
218.35 - }
218.36 - private static Lookup getInstance(){
218.37 - if (m_instance == null ) {
218.38 - m_instance = new XsltProjectLookup();
218.39 - }
218.40 - if (mylookup == null) {
218.41 - mylookup = Lookups.metaInfServices(m_instance.getClass().getClassLoader());
218.42 - }
218.43 - return mylookup;
218.44 - }
218.45 -
218.46 - public Object lookup(Class clazz) {
218.47 - return getInstance().lookup(clazz);
218.48 - }
218.49 -
218.50 - public Lookup.Result lookup(Lookup.Template template) {
218.51 - return getInstance().lookup(template);
218.52 - }
218.53 -
218.54 - public Lookup.Item lookupItem(Lookup.Template template) {
218.55 - return getInstance().lookupItem(template);
218.56 - }
218.57 -
218.58 -}
219.1 --- a/xslt.project/build.xml Wed Feb 21 08:53:38 2007 +0000
219.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
219.3 @@ -1,50 +0,0 @@
219.4 -<?xml version="1.0" encoding="UTF-8"?>
219.5 -<!--
219.6 - The contents of this file are subject to the terms of the Common Development
219.7 - and Distribution License (the License). You may not use this file except in
219.8 - compliance with the License.
219.9 -
219.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
219.11 - or http://www.netbeans.org/cddl.txt.
219.12 -
219.13 - When distributing Covered Code, include this CDDL Header Notice in each file
219.14 - and include the License file at http://www.netbeans.org/cddl.txt.
219.15 - If applicable, add the following below the CDDL Header, with the fields
219.16 - enclosed by brackets [] replaced by your own identifying information:
219.17 - "Portions Copyrighted [year] [name of copyright owner]"
219.18 -
219.19 - The Original Software is NetBeans. The Initial Developer of the Original
219.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
219.21 - Microsystems, Inc. All Rights Reserved.
219.22 --->
219.23 -<project name="org.netbeans.modules.xslt.project" default="netbeans" basedir=".">
219.24 - <import file="nbproject/build-impl.xml"/>
219.25 -
219.26 - <target name="ant-extra" depends="init">
219.27 - <mkdir dir="build/antclasses"/>
219.28 - <javac srcdir="antsrc" destdir="build/antclasses" source="1.5" debug="true" deprecation="true">
219.29 - <classpath>
219.30 - <path refid="cp"/>
219.31 - <pathelement location="${harness.dir}/../ide7/ant/lib/ant.jar"/>
219.32 - <pathelement location="${cluster}/${module.jar}"/>
219.33 - </classpath>
219.34 - </javac>
219.35 - <copy todir="build/antclasses">
219.36 - <fileset dir="antsrc">
219.37 - <include name="**/*.xml"/>
219.38 - </fileset>
219.39 - </copy>
219.40 - <mkdir dir="${cluster}/ant/nblib/"/>
219.41 - <jar jarfile="${cluster}/ant/nblib/org-netbeans-modules-xslt-project.jar" compress="false">
219.42 - <fileset dir="build/antclasses"/>
219.43 - </jar>
219.44 - </target>
219.45 -
219.46 - <target name="netbeans-extra" depends="ant-extra"/>
219.47 -
219.48 - <target name="check">
219.49 - <ant dir="../../../_codereview" inheritAll="true">
219.50 - <property name="check.dir" value="${basedir}"/>
219.51 - </ant>
219.52 - </target>
219.53 -</project>
220.1 --- a/xslt.project/manifest.mf Wed Feb 21 08:53:38 2007 +0000
220.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
220.3 @@ -1,5 +0,0 @@
220.4 -Manifest-Version: 1.0
220.5 -OpenIDE-Module-Specification-Version: 1.1
220.6 -OpenIDE-Module: org.netbeans.modules.xslt.project/1
220.7 -OpenIDE-Module-Layer: org/netbeans/modules/xslt/project/resources/layer.xml
220.8 -OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/xslt/project/resources/Bundle.properties
221.1 --- a/xslt.project/nbproject/project.properties Wed Feb 21 08:53:38 2007 +0000
221.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
221.3 @@ -1,20 +0,0 @@
221.4 -#
221.5 -# The contents of this file are subject to the terms of the Common Development
221.6 -# and Distribution License (the License). You may not use this file except in
221.7 -# compliance with the License.
221.8 -#
221.9 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
221.10 -# or http://www.netbeans.org/cddl.txt.
221.11 -#
221.12 -# When distributing Covered Code, include this CDDL Header Notice in each file
221.13 -# and include the License file at http://www.netbeans.org/cddl.txt.
221.14 -# If applicable, add the following below the CDDL Header, with the fields
221.15 -# enclosed by brackets [] replaced by your own identifying information:
221.16 -# "Portions Copyrighted [year] [name of copyright owner]"
221.17 -#
221.18 -# The Original Software is NetBeans. The Initial Developer of the Original
221.19 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
221.20 -# Microsystems, Inc. All Rights Reserved.
221.21 -
221.22 -javac.source=1.5
221.23 -javac.compilerargs=-Xlint:unchecked
222.1 --- a/xslt.project/nbproject/project.xml Wed Feb 21 08:53:38 2007 +0000
222.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
222.3 @@ -1,328 +0,0 @@
222.4 -<?xml version="1.0" encoding="UTF-8"?>
222.5 -<!--
222.6 - The contents of this file are subject to the terms of the Common Development
222.7 - and Distribution License (the License). You may not use this file except in
222.8 - compliance with the License.
222.9 -
222.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
222.11 - or http://www.netbeans.org/cddl.txt.
222.12 -
222.13 - When distributing Covered Code, include this CDDL Header Notice in each file
222.14 - and include the License file at http://www.netbeans.org/cddl.txt.
222.15 - If applicable, add the following below the CDDL Header, with the fields
222.16 - enclosed by brackets [] replaced by your own identifying information:
222.17 - "Portions Copyrighted [year] [name of copyright owner]"
222.18 -
222.19 - The Original Software is NetBeans. The Initial Developer of the Original
222.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
222.21 - Microsystems, Inc. All Rights Reserved.
222.22 --->
222.23 -<project xmlns="http://www.netbeans.org/ns/project/1">
222.24 - <type>org.netbeans.modules.apisupport.project</type>
222.25 - <configuration>
222.26 - <data xmlns="http://www.netbeans.org/ns/nb-module-project/2">
222.27 - <code-name-base>org.netbeans.modules.xslt.project</code-name-base>
222.28 - <suite-component/>
222.29 - <module-dependencies>
222.30 - <dependency>
222.31 - <code-name-base>org.apache.tools.ant.module</code-name-base>
222.32 - <build-prerequisite/>
222.33 - <compile-dependency/>
222.34 - <run-dependency>
222.35 - <release-version>3</release-version>
222.36 - <specification-version>3.24.22.1</specification-version>
222.37 - </run-dependency>
222.38 - </dependency>
222.39 - <dependency>
222.40 - <code-name-base>org.jdesktop.layout</code-name-base>
222.41 - <build-prerequisite/>
222.42 - <compile-dependency/>
222.43 - <run-dependency>
222.44 - <release-version>1</release-version>
222.45 - <specification-version>1.3.23</specification-version>
222.46 - </run-dependency>
222.47 - </dependency>
222.48 - <dependency>
222.49 - <code-name-base>org.netbeans.api.debugger</code-name-base>
222.50 - <build-prerequisite/>
222.51 - <compile-dependency/>
222.52 - <run-dependency>
222.53 - <release-version>1</release-version>
222.54 - <specification-version>1.7.24</specification-version>
222.55 - </run-dependency>
222.56 - </dependency>
222.57 - <dependency>
222.58 - <code-name-base>org.netbeans.api.progress</code-name-base>
222.59 - <build-prerequisite/>
222.60 - <compile-dependency/>
222.61 - <run-dependency>
222.62 - <release-version>1</release-version>
222.63 - <specification-version>1.5.22</specification-version>
222.64 - </run-dependency>
222.65 - </dependency>
222.66 - <dependency>
222.67 - <code-name-base>org.netbeans.modules.j2eeserver</code-name-base>
222.68 - <build-prerequisite/>
222.69 - <compile-dependency/>
222.70 - <run-dependency>
222.71 - <release-version>4</release-version>
222.72 - <specification-version>1.20.21.1</specification-version>
222.73 - </run-dependency>
222.74 - </dependency>
222.75 - <dependency>
222.76 - <code-name-base>org.netbeans.modules.java.platform</code-name-base>
222.77 - <build-prerequisite/>
222.78 - <compile-dependency/>
222.79 - <run-dependency>
222.80 - <release-version>1</release-version>
222.81 - <specification-version>1.7.22</specification-version>
222.82 - </run-dependency>
222.83 - </dependency>
222.84 - <dependency>
222.85 - <code-name-base>org.netbeans.modules.java.project</code-name-base>
222.86 - <build-prerequisite/>
222.87 - <compile-dependency/>
222.88 - <run-dependency>
222.89 - <release-version>1</release-version>
222.90 - <specification-version>1.8.22</specification-version>
222.91 - </run-dependency>
222.92 - </dependency>
222.93 - <dependency>
222.94 - <code-name-base>org.netbeans.modules.print.api</code-name-base>
222.95 - <build-prerequisite/>
222.96 - <compile-dependency/>
222.97 - <run-dependency>
222.98 - <release-version>1</release-version>
222.99 - <specification-version>1.1</specification-version>
222.100 - </run-dependency>
222.101 - </dependency>
222.102 - <dependency>
222.103 - <code-name-base>org.netbeans.modules.project.ant</code-name-base>
222.104 - <build-prerequisite/>
222.105 - <compile-dependency/>
222.106 - <run-dependency>
222.107 - <release-version>1</release-version>
222.108 - <specification-version>1.12.22</specification-version>
222.109 - </run-dependency>
222.110 - </dependency>
222.111 - <dependency>
222.112 - <code-name-base>org.netbeans.modules.project.libraries</code-name-base>
222.113 - <build-prerequisite/>
222.114 - <compile-dependency/>
222.115 - <run-dependency>
222.116 - <release-version>1</release-version>
222.117 - <specification-version>1.13.22</specification-version>
222.118 - </run-dependency>
222.119 - </dependency>
222.120 - <dependency>
222.121 - <code-name-base>org.netbeans.modules.projectapi</code-name-base>
222.122 - <build-prerequisite/>
222.123 - <compile-dependency/>
222.124 - <run-dependency>
222.125 - <release-version>1</release-version>
222.126 - </run-dependency>
222.127 - </dependency>
222.128 - <dependency>
222.129 - <code-name-base>org.netbeans.modules.projectuiapi</code-name-base>
222.130 - <build-prerequisite/>
222.131 - <compile-dependency/>
222.132 - <run-dependency>
222.133 - <release-version>1</release-version>
222.134 - <specification-version>1.8</specification-version>
222.135 - </run-dependency>
222.136 - </dependency>
222.137 - <dependency>
222.138 - <code-name-base>org.netbeans.modules.queries</code-name-base>
222.139 - <build-prerequisite/>
222.140 - <compile-dependency/>
222.141 - <run-dependency>
222.142 - <release-version>1</release-version>
222.143 - <specification-version>1.7.22</specification-version>
222.144 - </run-dependency>
222.145 - </dependency>
222.146 - <dependency>
222.147 - <code-name-base>org.netbeans.modules.xml.catalogsupport</code-name-base>
222.148 - <build-prerequisite/>
222.149 - <compile-dependency/>
222.150 - <run-dependency>
222.151 - <specification-version>1.0</specification-version>
222.152 - </run-dependency>
222.153 - </dependency>
222.154 - <dependency>
222.155 - <code-name-base>org.netbeans.modules.xml.retriever</code-name-base>
222.156 - <build-prerequisite/>
222.157 - <compile-dependency/>
222.158 - <run-dependency>
222.159 - <release-version>1</release-version>
222.160 - </run-dependency>
222.161 - </dependency>
222.162 - <dependency>
222.163 - <code-name-base>org.netbeans.modules.xml.schema.model</code-name-base>
222.164 - <build-prerequisite/>
222.165 - <compile-dependency/>
222.166 - <run-dependency>
222.167 - <release-version>1</release-version>
222.168 - </run-dependency>
222.169 - </dependency>
222.170 - <dependency>
222.171 - <code-name-base>org.netbeans.modules.xml.schema.ui.basic</code-name-base>
222.172 - <build-prerequisite/>
222.173 - <compile-dependency/>
222.174 - <run-dependency>
222.175 - <release-version>1</release-version>
222.176 - <specification-version>1.1</specification-version>
222.177 - </run-dependency>
222.178 - </dependency>
222.179 - <dependency>
222.180 - <code-name-base>org.netbeans.modules.xml.wsdl.extensions</code-name-base>
222.181 - <build-prerequisite/>
222.182 - <compile-dependency/>
222.183 - <run-dependency>
222.184 - <specification-version>1.1</specification-version>
222.185 - </run-dependency>
222.186 - </dependency>
222.187 - <dependency>
222.188 - <code-name-base>org.netbeans.modules.xml.wsdl.model</code-name-base>
222.189 - <build-prerequisite/>
222.190 - <compile-dependency/>
222.191 - <run-dependency>
222.192 - <release-version>1</release-version>
222.193 - </run-dependency>
222.194 - </dependency>
222.195 - <dependency>
222.196 - <code-name-base>org.netbeans.modules.xml.wsdlui</code-name-base>
222.197 - <build-prerequisite/>
222.198 - <compile-dependency/>
222.199 - <run-dependency>
222.200 - <specification-version>1.1</specification-version>
222.201 - </run-dependency>
222.202 - </dependency>
222.203 - <dependency>
222.204 - <code-name-base>org.netbeans.modules.xml.xam</code-name-base>
222.205 - <build-prerequisite/>
222.206 - <compile-dependency/>
222.207 - <run-dependency>
222.208 - <release-version>1</release-version>
222.209 - </run-dependency>
222.210 - </dependency>
222.211 - <dependency>
222.212 - <code-name-base>org.netbeans.modules.xslt.core</code-name-base>
222.213 - <build-prerequisite/>
222.214 - <compile-dependency/>
222.215 - <run-dependency>
222.216 - <release-version>1</release-version>
222.217 - <specification-version>1.0</specification-version>
222.218 - </run-dependency>
222.219 - </dependency>
222.220 - <dependency>
222.221 - <code-name-base>org.netbeans.modules.xslt.model</code-name-base>
222.222 - <build-prerequisite/>
222.223 - <compile-dependency/>
222.224 - <run-dependency>
222.225 - <release-version>1</release-version>
222.226 - </run-dependency>
222.227 - </dependency>
222.228 - <dependency>
222.229 - <code-name-base>org.openide.actions</code-name-base>
222.230 - <build-prerequisite/>
222.231 - <compile-dependency/>
222.232 - <run-dependency>
222.233 - <specification-version>6.5.22</specification-version>
222.234 - </run-dependency>
222.235 - </dependency>
222.236 - <dependency>
222.237 - <code-name-base>org.openide.awt</code-name-base>
222.238 - <build-prerequisite/>
222.239 - <compile-dependency/>
222.240 - <run-dependency>
222.241 - <specification-version>6.7.22</specification-version>
222.242 - </run-dependency>
222.243 - </dependency>
222.244 - <dependency>
222.245 - <code-name-base>org.openide.dialogs</code-name-base>
222.246 - <build-prerequisite/>
222.247 - <compile-dependency/>
222.248 - <run-dependency>
222.249 - <specification-version>6.2</specification-version>
222.250 - </run-dependency>
222.251 - </dependency>
222.252 - <dependency>
222.253 - <code-name-base>org.openide.execution</code-name-base>
222.254 - <build-prerequisite/>
222.255 - <compile-dependency/>
222.256 - <run-dependency>
222.257 - <specification-version>1.8.22</specification-version>
222.258 - </run-dependency>
222.259 - </dependency>
222.260 - <dependency>
222.261 - <code-name-base>org.openide.explorer</code-name-base>
222.262 - <build-prerequisite/>
222.263 - <compile-dependency/>
222.264 - <run-dependency>
222.265 - <specification-version>6.5.22</specification-version>
222.266 - </run-dependency>
222.267 - </dependency>
222.268 - <dependency>
222.269 - <code-name-base>org.openide.filesystems</code-name-base>
222.270 - <build-prerequisite/>
222.271 - <compile-dependency/>
222.272 - <run-dependency>
222.273 - <specification-version>6.2.1</specification-version>
222.274 - </run-dependency>
222.275 - </dependency>
222.276 - <dependency>
222.277 - <code-name-base>org.openide.io</code-name-base>
222.278 - <build-prerequisite/>
222.279 - <compile-dependency/>
222.280 - <run-dependency>
222.281 - <specification-version>1.9.22</specification-version>
222.282 - </run-dependency>
222.283 - </dependency>
222.284 - <dependency>
222.285 - <code-name-base>org.openide.loaders</code-name-base>
222.286 - <build-prerequisite/>
222.287 - <compile-dependency/>
222.288 - <run-dependency>
222.289 - <specification-version>5.8.1</specification-version>
222.290 - </run-dependency>
222.291 - </dependency>
222.292 - <dependency>
222.293 - <code-name-base>org.openide.modules</code-name-base>
222.294 - <build-prerequisite/>
222.295 - <compile-dependency/>
222.296 - <run-dependency>
222.297 - <specification-version>6.5.22</specification-version>
222.298 - </run-dependency>
222.299 - </dependency>
222.300 - <dependency>
222.301 - <code-name-base>org.openide.nodes</code-name-base>
222.302 - <build-prerequisite/>
222.303 - <compile-dependency/>
222.304 - <run-dependency>
222.305 - <specification-version>6.2</specification-version>
222.306 - </run-dependency>
222.307 - </dependency>
222.308 - <dependency>
222.309 - <code-name-base>org.openide.options</code-name-base>
222.310 - <build-prerequisite/>
222.311 - <compile-dependency/>
222.312 - <run-dependency>
222.313 - <specification-version>6.4.22</specification-version>
222.314 - </run-dependency>
222.315 - </dependency>
222.316 - <dependency>
222.317 - <code-name-base>org.openide.util</code-name-base>
222.318 - <build-prerequisite/>
222.319 - <compile-dependency/>
222.320 - <run-dependency>
222.321 - <specification-version>6.2</specification-version>
222.322 - </run-dependency>
222.323 - </dependency>
222.324 - </module-dependencies>
222.325 - <friend-packages>
222.326 - <friend>org.netbeans.modules.xslt.mapper</friend>
222.327 - <package>org.netbeans.modules.xslt.project</package>
222.328 - </friend-packages>
222.329 - </data>
222.330 - </configuration>
222.331 -</project>
223.1 --- a/xslt.project/src/META-INF/services/org.netbeans.spi.project.support.ant.AntBasedProjectType Wed Feb 21 08:53:38 2007 +0000
223.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
223.3 @@ -1,1 +0,0 @@
223.4 -org.netbeans.modules.xslt.project.XsltproProjectType
224.1 --- a/xslt.project/src/META-INF/services/org.netbeans.spi.queries.CollocationQueryImplementation Wed Feb 21 08:53:38 2007 +0000
224.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
224.3 @@ -1,1 +0,0 @@
224.4 -org.netbeans.modules.compapp.projects.base.queries.SameDriveCollocationQuery
225.1 --- a/xslt.project/src/META-INF/services/org.openide.util.Lookup Wed Feb 21 08:53:38 2007 +0000
225.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
225.3 @@ -1,1 +0,0 @@
225.4 -org.netbeans.modules.xslt.project.anttasks.XsltProjectLookup
226.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
226.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
226.3 @@ -1,33 +0,0 @@
226.4 -# The contents of this file are subject to the terms of the Common Development
226.5 -# and Distribution License (the License). You may not use this file except in
226.6 -# compliance with the License.
226.7 -#
226.8 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
226.9 -# or http://www.netbeans.org/cddl.txt.
226.10 -
226.11 -# When distributing Covered Code, include this CDDL Header Notice in each file
226.12 -# and include the License file at http://www.netbeans.org/cddl.txt.
226.13 -# If applicable, add the following below the CDDL Header, with the fields
226.14 -# enclosed by brackets [] replaced by your own identifying information:
226.15 -# "Portions Copyrighted [year] [name of copyright owner]"
226.16 -#
226.17 -# The Original Software is NetBeans. The Initial Developer of the Original
226.18 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
226.19 -# Microsystems, Inc. All Rights Reserved.
226.20 -
226.21 -
226.22 -#Nodes in logical view
226.23 -LBL_Node_Sources=XSLT Process Files
226.24 -LBL_Node_DocBase=Configuration Files
226.25 -LBL_Node_EJBModule=EJB Module
226.26 -
226.27 -# XsltproActionProvider
226.28 -MSG_SessionRunning={0} cannot be executed when a debugging session is running. Do you want to close the debugging session and execute the {0}?
226.29 -
226.30 -# XsltProjectRetriever
226.31 -LBL_Populate_Catalog=Populate Catalog
226.32 -LBL_Populate_Catalog_Error=Error in populating catalog.Please check the output
226.33 -LBL_Populate_Catalog_Complete=Completed populating catalog
226.34 -
226.35 -LBL_DefaultCacheDirName=cached{0}
226.36 -LBL_Retrieving=Retrieving - {0}
226.37 \ No newline at end of file
227.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/CommandlineXsltProjectXmlCatalogProvider.java Wed Feb 21 08:53:38 2007 +0000
227.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
227.3 @@ -1,101 +0,0 @@
227.4 -/*
227.5 - * The contents of this file are subject to the terms of the Common Development
227.6 - * and Distribution License (the License). You may not use this file except in
227.7 - * compliance with the License.
227.8 - *
227.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
227.10 - * or http://www.netbeans.org/cddl.txt.
227.11 -
227.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
227.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
227.14 - * If applicable, add the following below the CDDL Header, with the fields
227.15 - * enclosed by brackets [] replaced by your own identifying information:
227.16 - * "Portions Copyrighted [year] [name of copyright owner]"
227.17 - *
227.18 - * The Original Software is NetBeans. The Initial Developer of the Original
227.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
227.20 - * Microsystems, Inc. All Rights Reserved.
227.21 - */
227.22 -package org.netbeans.modules.xslt.project;
227.23 -
227.24 -import java.io.File;
227.25 -
227.26 -import java.net.URI;
227.27 -
227.28 -/**
227.29 - *
227.30 - * Basic Java class representing the XML Catalog Provider. This class is
227.31 - * used by both in Populate Catalog Wizard and in Ant task for project building.
227.32 - * The reason for creation of this class is to eliminate the netbeans
227.33 - * dependency XMLCatalogProvider has on Project API( FileObject)
227.34 - * @author Sreenivasan Genipudi
227.35 - * @author Vitaly Bychkov
227.36 - * @version 1.0
227.37 - */
227.38 -public class CommandlineXsltProjectXmlCatalogProvider {
227.39 -
227.40 - private String mCatalogXMLPath=null;
227.41 - private String mRetreiverPath =null;
227.42 - private URI mCatalogXMLURI = null;
227.43 - private String mSourceDir = null;
227.44 - private static CommandlineXsltProjectXmlCatalogProvider mInstance= null;
227.45 - private URI mCatlogXMLLocationForWizardURI = null;
227.46 -
227.47 - CommandlineXsltProjectXmlCatalogProvider() {
227.48 - }
227.49 -
227.50 - /**
227.51 - * Singleton
227.52 - * @return The current instance
227.53 - */
227.54 - public static CommandlineXsltProjectXmlCatalogProvider getInstance() {
227.55 - if (mInstance == null) {
227.56 - mInstance = new CommandlineXsltProjectXmlCatalogProvider();
227.57 - }
227.58 - return mInstance;
227.59 - }
227.60 -
227.61 - /**
227.62 - * Set the source directory
227.63 - * @param sourceDir Source directory
227.64 - */
227.65 - public void setSourceDirectory(String sourceDir) {
227.66 - mSourceDir = sourceDir;
227.67 - String projectDir= mSourceDir +File.separator+ ".."+File.separator;
227.68 - String catalogXMLDir= projectDir+org.netbeans.modules.xml.retriever.XMLCatalogProvider.TYPE_RETRIEVED;
227.69 - mCatalogXMLPath =(catalogXMLDir+File.separator+"catalog.xml").replace('\\','/');;
227.70 - mRetreiverPath =(catalogXMLDir+File.separator+"src").replace('\\','/');
227.71 -
227.72 - mCatlogXMLLocationForWizardURI = new File((projectDir + File.separator+"catalog.xml").replace('\\','/')).toURI();
227.73 - mCatalogXMLURI = new File(mCatalogXMLPath).toURI();
227.74 - }
227.75 -
227.76 - /**
227.77 - * Set the catalog xml location
227.78 - * @param catalogXMLPath Catalog XML location
227.79 - */
227.80 - public void setCatalogXMLPath(String catalogXMLPath) {
227.81 - mCatalogXMLPath = catalogXMLPath;
227.82 - }
227.83 -
227.84 - /**
227.85 - * Get the Retriever download location
227.86 - * @return Get the Retriever download location
227.87 - */
227.88 - public String getRetrieverPath() {
227.89 - return mRetreiverPath;
227.90 - }
227.91 -
227.92 - /**
227.93 - * Get the project wide Catalog
227.94 - * @return Location of Project wide catalog
227.95 - */
227.96 - public URI getProjectWideCatalog(){
227.97 - return mCatalogXMLURI;
227.98 - }
227.99 -
227.100 - public URI getProjectWideCatalogForWizard(){
227.101 - return mCatlogXMLLocationForWizardURI;
227.102 - }
227.103 -
227.104 -}
228.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/XsltProjectOperations.java Wed Feb 21 08:53:38 2007 +0000
228.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
228.3 @@ -1,141 +0,0 @@
228.4 -/*
228.5 - * The contents of this file are subject to the terms of the Common Development
228.6 - * and Distribution License (the License). You may not use this file except in
228.7 - * compliance with the License.
228.8 - *
228.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
228.10 - * or http://www.netbeans.org/cddl.txt.
228.11 -
228.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
228.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
228.14 - * If applicable, add the following below the CDDL Header, with the fields
228.15 - * enclosed by brackets [] replaced by your own identifying information:
228.16 - * "Portions Copyrighted [year] [name of copyright owner]"
228.17 - *
228.18 - * The Original Software is NetBeans. The Initial Developer of the Original
228.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
228.20 - * Microsystems, Inc. All Rights Reserved.
228.21 - */
228.22 -package org.netbeans.modules.xslt.project;
228.23 -
228.24 -import java.io.File;
228.25 -import java.io.IOException;
228.26 -import java.util.ArrayList;
228.27 -import java.util.List;
228.28 -import java.util.Properties;
228.29 -import org.apache.tools.ant.module.api.support.ActionUtils;
228.30 -import org.netbeans.api.project.Project;
228.31 -import org.netbeans.spi.project.ActionProvider;
228.32 -import org.netbeans.spi.project.CopyOperationImplementation;
228.33 -import org.netbeans.spi.project.DeleteOperationImplementation;
228.34 -import org.netbeans.spi.project.MoveOperationImplementation;
228.35 -import org.netbeans.spi.project.support.ant.GeneratedFilesHelper;
228.36 -import org.netbeans.spi.project.support.ant.PropertyEvaluator;
228.37 -import org.openide.filesystems.FileObject;
228.38 -import org.openide.util.Lookup;
228.39 -import org.openide.util.lookup.Lookups;
228.40 -
228.41 -/**
228.42 - *
228.43 - * @author Vitaly Bychkov
228.44 - * @version 1.0
228.45 - */
228.46 -public class XsltProjectOperations implements DeleteOperationImplementation, CopyOperationImplementation, MoveOperationImplementation {
228.47 -
228.48 - private XsltproProject project;
228.49 -
228.50 - public XsltProjectOperations(XsltproProject project) {
228.51 - this.project = project;
228.52 - }
228.53 -
228.54 - public List<FileObject> getMetadataFiles() {
228.55 - FileObject projectDirectory = project.getProjectDirectory();
228.56 - List<FileObject> files = new ArrayList<FileObject>();
228.57 -
228.58 - addFile(projectDirectory, "nbproject", files); // NOI18N
228.59 - addFile(projectDirectory, "build.xml", files); // NOI18N
228.60 - addFile(projectDirectory, "catalog.xml", files); //NOI18N
228.61 - addFile(projectDirectory, projectDirectory.getName(), files); //NOI18N
228.62 - addFile(projectDirectory, org.netbeans.modules.xml.retriever.XMLCatalogProvider.TYPE_RETRIEVED , files); //NOI18N
228.63 -
228.64 - return files;
228.65 - }
228.66 -
228.67 - public List<FileObject> getDataFiles() {
228.68 - List<FileObject> files = new ArrayList<FileObject>();
228.69 -
228.70 - files.add(project.getSourceDirectory());
228.71 -
228.72 - PropertyEvaluator evaluator = project.evaluator();
228.73 - String prop = evaluator.getProperty(XsltproConstants.SOURCE_ROOT);
228.74 - if (prop != null) {
228.75 - FileObject projectDirectory = project.getProjectDirectory();
228.76 - FileObject srcDir = project.getAntProjectHelper().resolveFileObject(prop);
228.77 - if (projectDirectory != srcDir && !files.contains(srcDir)) {
228.78 - files.add(srcDir);
228.79 - }
228.80 - }
228.81 -
228.82 - return files;
228.83 - }
228.84 -
228.85 - public void notifyDeleting() throws IOException {
228.86 - XsltproActionProvider ap = (XsltproActionProvider) project.getLookup().lookup(XsltproActionProvider.class);
228.87 - assert ap != null;
228.88 -
228.89 - Lookup context = Lookups.fixed(new Object[0]);
228.90 - Properties p = new Properties();
228.91 - String[] targetNames = ap.getTargetNames(ActionProvider.COMMAND_CLEAN, context, p);
228.92 - FileObject buildXML = project.getProjectDirectory().getFileObject(GeneratedFilesHelper.BUILD_XML_PATH);
228.93 -
228.94 - assert targetNames != null;
228.95 - assert targetNames.length > 0;
228.96 -
228.97 - ActionUtils.runTarget(buildXML, targetNames, p).waitFinished();
228.98 - }
228.99 -
228.100 - public void notifyDeleted() throws IOException {
228.101 -
228.102 - project.getAntProjectHelper().notifyDeleted();
228.103 - }
228.104 -
228.105 - public void notifyCopying() throws IOException {
228.106 - // do nothing.
228.107 - // This does copy the old distribution file over though, which is
228.108 - // probably OK because "ant clean" will clean it up.
228.109 - }
228.110 -
228.111 - public void notifyCopied(Project original, File originalPath, String newName) throws IOException {
228.112 - if (original == null) {
228.113 - // do nothing for the original project.
228.114 - return ;
228.115 - }
228.116 -
228.117 - project.getReferenceHelper().fixReferences(originalPath);
228.118 -
228.119 - String oldName = project.getName();
228.120 - project.setName(newName);
228.121 - }
228.122 -
228.123 - public void notifyMoving() throws IOException {
228.124 - notifyDeleting();
228.125 - }
228.126 -
228.127 - public void notifyMoved(Project original, File originalPath, String newName) throws IOException {
228.128 - if (original == null) {
228.129 - project.getAntProjectHelper().notifyDeleted();
228.130 - return ;
228.131 - }
228.132 - String oldName = project.getName();
228.133 - project.setName(newName);
228.134 - project.getReferenceHelper().fixReferences(originalPath);
228.135 - }
228.136 -
228.137 - private static void addFile(FileObject projectDirectory, String fileName, List<FileObject> result) {
228.138 - FileObject file = projectDirectory.getFileObject(fileName);
228.139 -
228.140 - if (file != null) {
228.141 - result.add(file);
228.142 - }
228.143 - }
228.144 -}
229.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/XsltProjectRetriever.java Wed Feb 21 08:53:38 2007 +0000
229.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
229.3 @@ -1,884 +0,0 @@
229.4 -/*
229.5 - * The contents of this file are subject to the terms of the Common Development
229.6 - * and Distribution License (the License). You may not use this file except in
229.7 - * compliance with the License.
229.8 - *
229.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
229.10 - * or http://www.netbeans.org/cddl.txt.
229.11 -
229.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
229.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
229.14 - * If applicable, add the following below the CDDL Header, with the fields
229.15 - * enclosed by brackets [] replaced by your own identifying information:
229.16 - * "Portions Copyrighted [year] [name of copyright owner]"
229.17 - *
229.18 - * The Original Software is NetBeans. The Initial Developer of the Original
229.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
229.20 - * Microsystems, Inc. All Rights Reserved.
229.21 - */
229.22 -package org.netbeans.modules.xslt.project;
229.23 -
229.24 -import java.awt.Dialog;
229.25 -
229.26 -import java.io.File;
229.27 -import java.io.FileOutputStream;
229.28 -import java.net.URI;
229.29 -import java.util.ArrayList;
229.30 -import java.util.HashMap;
229.31 -import java.util.HashSet;
229.32 -import java.util.Iterator;
229.33 -import java.util.List;
229.34 -import org.netbeans.modules.xslt.project.prjwizard.FoldersListSettings;
229.35 -import org.openide.util.NbBundle;
229.36 -import org.openide.DialogDescriptor;
229.37 -import org.openide.DialogDisplayer;
229.38 -
229.39 -import java.net.URISyntaxException;
229.40 - import java.awt.BorderLayout;
229.41 -
229.42 -import java.net.URL;
229.43 -
229.44 -import javax.swing.JComponent;
229.45 -import javax.swing.SwingUtilities;
229.46 -import javax.xml.parsers.DocumentBuilder;
229.47 -import javax.xml.parsers.DocumentBuilderFactory;
229.48 -import javax.xml.transform.Transformer;
229.49 -import javax.xml.transform.TransformerFactory;
229.50 -import javax.xml.transform.stream.StreamResult;
229.51 -import javax.xml.transform.dom.DOMSource;
229.52 -
229.53 -import java.util.logging.ErrorManager;
229.54 -import java.util.logging.Level;
229.55 -import java.util.logging.Logger;
229.56 -import java.text.MessageFormat;
229.57 -
229.58 -import org.netbeans.modules.xml.wsdl.model.WSDLModelFactory;
229.59 -
229.60 -import org.netbeans.api.project.Project;
229.61 -import org.netbeans.modules.xml.retriever.Retriever;
229.62 -
229.63 -import org.openide.filesystems.FileObject;
229.64 -import org.openide.filesystems.FileUtil;
229.65 -
229.66 -import org.openide.util.Lookup;
229.67 -
229.68 -
229.69 -import org.netbeans.modules.xml.wsdl.model.WSDLModel;
229.70 -import org.netbeans.modules.xml.xam.ModelSource;
229.71 -import org.netbeans.modules.xml.retriever.catalog.Utilities;
229.72 -import org.netbeans.modules.xml.schema.model.Schema;
229.73 -import org.netbeans.modules.xml.schema.model.SchemaModel;
229.74 -import org.netbeans.modules.xml.schema.model.SchemaModelFactory;
229.75 -import org.netbeans.modules.xml.wsdl.model.Types;
229.76 -import org.netbeans.modules.xml.xam.Model;
229.77 -import org.netbeans.modules.xml.xam.locator.CatalogModelException;
229.78 -import org.netbeans.modules.xml.xam.locator.CatalogModelFactory;
229.79 -import org.netbeans.api.progress.ProgressHandleFactory;
229.80 -import org.netbeans.api.progress.ProgressHandle;
229.81 -import org.w3c.dom.Attr;
229.82 -import org.w3c.dom.Document;
229.83 -import org.w3c.dom.Element;
229.84 -import org.w3c.dom.NodeList;
229.85 -
229.86 -
229.87 -/**
229.88 -/**
229.89 - * This class is used to populate catalog
229.90 - *
229.91 - * @author Sreenivasan Genipudi
229.92 - * @author Vitaly Bychkov
229.93 - * @version 1.0
229.94 - */
229.95 -public class XsltProjectRetriever {
229.96 - ProgressHandle pg = null;
229.97 - private RetrieverWrapper retrieveWrap = new RetrieverWrapper();
229.98 -
229.99 - /**
229.100 - * Logger instance
229.101 - */
229.102 - private Logger logger =
229.103 - Logger.getLogger(XsltProjectRetriever.class.getName());
229.104 -
229.105 - private volatile String mStatus = null;
229.106 -
229.107 - private RetrieverUpdater mRetUpd = null;
229.108 - Dialog mDialog = null;
229.109 - /**
229.110 - * Construtor - takes in Project Location (File Object) as parameter
229.111 - * and tries to populate the catalog
229.112 - * @param projectDirectory FileObject instance of project directory
229.113 - */
229.114 - public XsltProjectRetriever(FileObject projectDirectory) {
229.115 - retrieveWrap.mProjectDirectoryPath = projectDirectory.getPath();
229.116 - //mProjectDirectoryPath = projectDirectory.getPath();
229.117 - }
229.118 -
229.119 - private void init() {
229.120 - String initMsg = NbBundle.getMessage( XsltProjectRetriever.class, "LBL_Populate_Catalog" );
229.121 - pg = ProgressHandleFactory.createHandle(initMsg, new org.openide.util.Cancellable() {
229.122 - public boolean cancel() {
229.123 - try {
229.124 - pg.finish();
229.125 - }catch (Exception ex) {
229.126 -
229.127 - }
229.128 - return true;
229.129 - }});
229.130 - // pg.setInitialDelay(2000);
229.131 - // pg.setDisplayName(initMsg);
229.132 -
229.133 - mRetUpd = new RetrieverUpdater(pg);
229.134 - DialogDescriptor dd = new DialogDescriptor (mRetUpd,
229.135 - initMsg,
229.136 - true, // modal
229.137 - new Object [0],
229.138 - null,
229.139 - DialogDescriptor.DEFAULT_ALIGN,
229.140 - null,
229.141 - null,
229.142 - true);
229.143 - mDialog = DialogDisplayer.getDefault ().createDialog (dd);
229.144 - pg.start ();
229.145 -
229.146 -
229.147 - }
229.148 -
229.149 - public void execute() {
229.150 - try {
229.151 - init();
229.152 - Thread t = new Thread(retrieveWrap);
229.153 - t.start();
229.154 - mDialog.setVisible (true);
229.155 -
229.156 - }catch(Exception ex) {
229.157 - mRetUpd.setProgressMessage(NbBundle.getMessage( XsltProjectRetriever.class, "LBL_Populate_Catalog_Error" ));
229.158 - }
229.159 - finally {
229.160 - dispose();
229.161 - }
229.162 - }
229.163 -
229.164 - void dispose() {
229.165 - try {
229.166 - mDialog.setVisible(false);
229.167 - mDialog.dispose();
229.168 - mDialog = null;
229.169 - }catch (Exception ex) {
229.170 -
229.171 - }
229.172 - try {
229.173 - pg.finish();
229.174 - }catch (Exception ex) {
229.175 -
229.176 - }
229.177 - }
229.178 -
229.179 -
229.180 - class RetrieverWrapper implements Runnable {
229.181 - private File mProjectDirectory = null;
229.182 - private String mProjectDirectoryPath = null;
229.183 - private String mProjectSourcePath= null;
229.184 - private File mRetrieveToDirectory = null;
229.185 - private HashSet mVisitedXMLResources = new HashSet();
229.186 -
229.187 -
229.188 - public void run() {
229.189 - try {
229.190 - String projectDirPath = mProjectDirectoryPath;
229.191 - String sourceDirectoryPath = projectDirPath + "/"+ "src";
229.192 - mProjectSourcePath = sourceDirectoryPath.replace('\\','/');
229.193 - CommandlineXsltProjectXmlCatalogProvider.getInstance().setSourceDirectory(sourceDirectoryPath);
229.194 -
229.195 - mProjectDirectory = new File(projectDirPath);
229.196 - File sourceDirectory =
229.197 - new File(sourceDirectoryPath);
229.198 - mRetrieveToDirectory =
229.199 - new File(CommandlineXsltProjectXmlCatalogProvider.getInstance().getRetrieverPath());
229.200 - if (!mRetrieveToDirectory.exists()) {
229.201 - mRetrieveToDirectory.mkdirs();
229.202 - }
229.203 - processSourceDir(sourceDirectory);
229.204 - moveCachedDirs();
229.205 - displayStatus(NbBundle.getMessage( XsltProjectRetriever.class, "LBL_Populate_Catalog_Complete" ));
229.206 -
229.207 - }catch(Exception ex) {
229.208 - displayStatus(NbBundle.getMessage( XsltProjectRetriever.class, "LBL_Populate_Catalog_Error" ));
229.209 - }
229.210 - finally {
229.211 - File localCatalogFile = new File(CommandlineXsltProjectXmlCatalogProvider.getInstance().getProjectWideCatalog());
229.212 - if (localCatalogFile.exists() && localCatalogFile.length() == 0) {
229.213 - localCatalogFile.delete();
229.214 - }
229.215 - dispose();
229.216 - }
229.217 -
229.218 - }
229.219 -
229.220 - /**
229.221 - * Replace the retrieved dirs with long name to simpler ones...
229.222 - *
229.223 - * @throws Exception
229.224 - */
229.225 - private void moveCachedDirs() throws Exception {
229.226 - File catFile = new File(mRetrieveToDirectory.getParent(), "catalog.xml"); // NOI18N
229.227 - if (catFile.exists()) {
229.228 - DocumentBuilderFactory fact = DocumentBuilderFactory.newInstance();
229.229 - DocumentBuilder builder = fact.newDocumentBuilder();
229.230 - Document catlogDoc = builder.parse(catFile);
229.231 - ArrayList uris = new ArrayList();
229.232 - NodeList sas = catlogDoc.getElementsByTagName("system"); // NOI18N
229.233 - HashMap dirMap = new HashMap();
229.234 - if (sas != null) { // find them
229.235 - for (int i=0; i<sas.getLength(); i++) {
229.236 - Element sys = (Element) sas.item(i);
229.237 - String furi = sys.getAttribute("uri"); // NOI18N
229.238 - if (!furi.startsWith("src/cached")) { // NOI18N
229.239 - uris.add(furi);
229.240 -
229.241 - // map retreived dir to cached dir..
229.242 - File cf = new File(mRetrieveToDirectory.getParentFile(), furi);
229.243 - File pcf = cf.getParentFile();
229.244 - File mpcf = (File) dirMap.get(pcf);
229.245 - if (mpcf == null) { // create a new cached dir for this
229.246 - String cacheDirName = null;
229.247 - int baseCount = FoldersListSettings.getDefault().getNewProjectCount() + 1;
229.248 - String formater = NbBundle.getMessage(XsltProjectRetriever.class, "LBL_DefaultCacheDirName"); // NOI18N
229.249 - while ((cacheDirName = validFreeCacheDirName(mRetrieveToDirectory, formater, baseCount)) == null) {
229.250 - baseCount++;
229.251 - }
229.252 - mpcf = new File(mRetrieveToDirectory, cacheDirName);
229.253 - mpcf.mkdirs();
229.254 - dirMap.put(pcf, mpcf);
229.255 - }
229.256 -
229.257 - // move the file
229.258 - FileObject dst = FileUtil.toFileObject(FileUtil.normalizeFile(mpcf));
229.259 - FileObject src = FileUtil.toFileObject(FileUtil.normalizeFile(cf));
229.260 - FileUtil.moveFile(src, dst, src.getName());
229.261 -
229.262 - // update catalog.xml uirs... furi -> mpcf
229.263 - Attr atr = sys.getAttributeNode("uri"); // NOI18N
229.264 - atr.setNodeValue("src/" + mpcf.getName() + "/"+cf.getName());
229.265 - // System.out.println("newURI: "+sys.getAttribute("uri"));
229.266 - }
229.267 - }
229.268 -
229.269 - // remove retreived dirs..
229.270 - Iterator it = dirMap.keySet().iterator();
229.271 - while (it.hasNext()) {
229.272 - File key = (File)it.next();
229.273 - FileObject src = FileUtil.toFileObject(FileUtil.normalizeFile(key));
229.274 - FileObject root = FileUtil.toFileObject(FileUtil.normalizeFile(mRetrieveToDirectory));
229.275 - while (src.getParent() != root) {
229.276 - src = src.getParent();
229.277 - }
229.278 - src.delete();
229.279 - }
229.280 -
229.281 - // update catalog.xml
229.282 - DOMSource src = new DOMSource(catlogDoc);
229.283 - FileOutputStream fos = new FileOutputStream(catFile);
229.284 - StreamResult rest = new StreamResult(fos);
229.285 - TransformerFactory transFact = TransformerFactory.newInstance();
229.286 - Transformer transformer = transFact.newTransformer();
229.287 - transformer.transform(src, rest);
229.288 - }
229.289 - }
229.290 - }
229.291 -
229.292 - private String validFreeCacheDirName(final File parentFolder, final String formater, final int index) {
229.293 - String name = MessageFormat.format(formater, new Object[] {new Integer(index)});
229.294 - File file = new File(parentFolder, name);
229.295 - return file.exists() ? null : name;
229.296 - }
229.297 -
229.298 - /**
229.299 - * Process the list of source directories to generate JBI.xml
229.300 - * @param sourceDirs list of source directory
229.301 - */
229.302 - private void processSourceDirs(List<File> sourceDirs) {
229.303 - Iterator<File> it = sourceDirs.iterator();
229.304 - while (it.hasNext()) {
229.305 - File sourceDir = it.next();
229.306 - processSourceDir(sourceDir);
229.307 - }
229.308 -
229.309 - }
229.310 -
229.311 - /**
229.312 - * Proces the source directory to generate JBI.xml
229.313 - * @param sourceDir
229.314 - */
229.315 - private void processSourceDir(File sourceDir) {
229.316 - processFileObject(sourceDir);
229.317 - }
229.318 -
229.319 - /**
229.320 - * Process the file object to generate JBI.xml
229.321 - * @param file BPEL file location
229.322 - */
229.323 - private void processFileObject(File file) {
229.324 - if (file.isDirectory()) {
229.325 - processFolder(file);
229.326 - } else {
229.327 - processFile(file);
229.328 - }
229.329 - }
229.330 -
229.331 - /**
229.332 - * Process the folder to generate JBI.xml
229.333 - * @param fileDir Folder location
229.334 - */
229.335 - private void processFolder(File fileDir) {
229.336 - File[] children = fileDir.listFiles();
229.337 -
229.338 - for (int i = 0; i < children.length; i++) {
229.339 - processFileObject(children[i]);
229.340 - }
229.341 - }
229.342 -
229.343 - /**
229.344 - * Process the file to generate JBI.xml
229.345 - * @param file input file
229.346 - */
229.347 - private void processFile(File file) {
229.348 - String fileName = file.getName();
229.349 - String fileExtension = null;
229.350 - int dotIndex = fileName.lastIndexOf('.');
229.351 - if (dotIndex != -1) {
229.352 - fileExtension = fileName.substring(dotIndex + 1);
229.353 - }
229.354 -
229.355 -// TODO a&m | r
229.356 -// if (fileExtension != null && fileExtension.equalsIgnoreCase("bpel")) {
229.357 -//
229.358 -// BpelModelFactory bpelFactory = (BpelModelFactory)Lookup.getDefault().lookup(BpelModelFactory.class);
229.359 -// FileObject fobj = FileUtil.toFileObject(FileUtil.normalizeFile(file));
229.360 -// ModelSource ms = null;
229.361 -// try {
229.362 -// ms = Utilities.createModelSource(fobj, true);
229.363 -// }catch (Exception ex) {
229.364 -// logger.log(Level.SEVERE,
229.365 -// "Error encountered while creating module source - " +
229.366 -// file.toURI());
229.367 -// throw new RuntimeException("Error encountered while creating module source - " +
229.368 -// file.toURI());
229.369 -// }
229.370 -//
229.371 -// BpelModel bm = bpelFactory.getModel(ms);
229.372 -// org.netbeans.modules.bpel.model.api.Import[] imports = bm.getProcess().getImports();
229.373 -// WSDLModel wsdlModel= null;
229.374 -// SchemaModel schModel = null;
229.375 -//
229.376 -// for (org.netbeans.modules.bpel.model.api.Import imprt:imports) {
229.377 -// wsdlModel = getWsdlModel(imprt);
229.378 -// if (wsdlModel != null) {
229.379 -// processWSDLImport(wsdlModel, imprt);
229.380 -// } else {
229.381 -//
229.382 -// SchemaModel scMdl = getSchemaModel(imprt);
229.383 -// if (scMdl != null) {
229.384 -// processSchemaImport(scMdl, imprt);
229.385 -// }
229.386 -// }
229.387 -//
229.388 -// }
229.389 -//
229.390 -// }
229.391 -
229.392 - }
229.393 -
229.394 -// void processSchemaImport(SchemaModel scm, org.netbeans.modules.bpel.model.api.Import imports ) {
229.395 -// String importLocation = imports.getLocation();
229.396 -// if (importLocation != null) {
229.397 -// String importLocationLowerCase = importLocation;
229.398 -// if (!mVisitedXMLResources.contains(importLocationLowerCase)) {
229.399 -// mVisitedXMLResources.add(importLocationLowerCase);
229.400 -// String resourceName = null;
229.401 -// Document doc = scm.getDocument();
229.402 -// if (doc != null) {
229.403 -// resourceName= doc.getLocalName();
229.404 -// } else {
229.405 -// resourceName = "";
229.406 -// }
229.407 -// URI resourceURI = externalResource(resourceName, importLocationLowerCase);
229.408 -// if (resourceURI != null) {
229.409 -// if (!ApacheResolverHelper.isPresent(new File(CommandlineBpelProjectXmlCatalogProvider.getInstance().getProjectWideCatalog()).getAbsolutePath(),
229.410 -// resourceURI.toString())) {
229.411 -// try {
229.412 -// FileObject catalogFO = FileUtil.toFileObject(FileUtil.normalizeFile(new File(CommandlineBpelProjectXmlCatalogProvider.getInstance().getRetrieverPath())));
229.413 -// displayStatus(importLocationLowerCase);
229.414 -//
229.415 -//
229.416 -// Retriever.getDefault().retrieveResource(catalogFO,
229.417 -// FileUtil.normalizeFile(new File(CommandlineBpelProjectXmlCatalogProvider.getInstance().getProjectWideCatalog())).toURI(),
229.418 -// resourceURI);
229.419 -//
229.420 -// } catch (Exception ex) {
229.421 -// logger.log(Level.SEVERE,
229.422 -// "Error encountered while retreiving file - " +
229.423 -// importLocation);
229.424 -// }
229.425 -// }
229.426 -// } else {
229.427 -// SchemaModel scMdl = getSchemaModel(imports);
229.428 -// if (scMdl != null) {
229.429 -// Collection<org.netbeans.modules.xml.schema.model.Import> subImports = scMdl.getSchema().getImports();
229.430 -// processSchemaImport(scMdl, subImports);
229.431 -// }
229.432 -// }
229.433 -// } else {
229.434 -// System.out.println(" ALREADY DOWNLOADED!!"+importLocationLowerCase);
229.435 -// }
229.436 -// }
229.437 -//
229.438 -// }
229.439 -// void processSchemaImport(SchemaModel scm, Collection<org.netbeans.modules.xml.schema.model.Import> colImports ) {
229.440 -// for (org.netbeans.modules.xml.schema.model.Import imports: colImports) {
229.441 -// String importLocation = imports.getSchemaLocation();
229.442 -// if (importLocation != null) {
229.443 -// String importLocationLowerCase = importLocation;
229.444 -// if (!mVisitedXMLResources.contains(importLocationLowerCase)) {
229.445 -// mVisitedXMLResources.add(importLocationLowerCase);
229.446 -// String resourceName = null;
229.447 -// Document doc = scm.getDocument();
229.448 -// if (doc != null) {
229.449 -// resourceName= doc.getLocalName();
229.450 -// } else {
229.451 -// resourceName = "";
229.452 -// }
229.453 -// URI resourceURI = externalResource(resourceName, importLocationLowerCase);
229.454 -// if (resourceURI != null) {
229.455 -// if (!ApacheResolverHelper.isPresent(new File(CommandlineBpelProjectXmlCatalogProvider.getInstance().getProjectWideCatalog()).getAbsolutePath(),
229.456 -// resourceURI.toString())) {
229.457 -// try {
229.458 -// /* Retriever.getDefault().retrieveResource(new File(CommandlineBpelProjectXmlCatalogProvider.getInstance().getRetrieverPath()),
229.459 -// new URI(importLocation));
229.460 -// */
229.461 -// FileObject catalogFO = FileUtil.toFileObject(FileUtil.normalizeFile(new File(CommandlineBpelProjectXmlCatalogProvider.getInstance().getRetrieverPath())));
229.462 -// displayStatus(importLocationLowerCase);
229.463 -//
229.464 -//
229.465 -// Retriever.getDefault().retrieveResource(catalogFO,
229.466 -// FileUtil.normalizeFile(new File(CommandlineBpelProjectXmlCatalogProvider.getInstance().getProjectWideCatalog())).toURI(),
229.467 -// resourceURI);
229.468 -//
229.469 -// } catch (Exception ex) {
229.470 -// logger.log(Level.SEVERE,
229.471 -// "Error encountered while retreiving file - " +
229.472 -// importLocation);
229.473 -// //throw new RuntimeException(ex);
229.474 -// }
229.475 -// }
229.476 -// } else {
229.477 -// SchemaModel scMdl = getSchemaModel(imports);
229.478 -// if (scMdl != null) {
229.479 -// /* String targetNameSpace = scMdl.getSchema().getTargetNamespace();
229.480 -// String versionInfo =scMdl.getSchema().getVersion();
229.481 -// if (versionInfo == null) {
229.482 -// versionInfo = "";
229.483 -// }
229.484 -// String xsdId = scMdl.getSchema().getId();
229.485 -// if (xsdId == null) {
229.486 -// xsdId = "";
229.487 -// }
229.488 -// String xsdKey = targetNameSpace+versionInfo+xsdId;
229.489 -// if (!mVisitedXMLResources.contains(xsdKey)) {
229.490 -// mVisitedXMLResources.add(xsdKey);*/
229.491 -// Collection<org.netbeans.modules.xml.schema.model.Import> subImports = scMdl.getSchema().getImports();
229.492 -// processSchemaImport(scMdl, subImports);
229.493 -// //}
229.494 -// }
229.495 -// }
229.496 -// } else {
229.497 -// System.out.println(" ALREADY DOWNLOADED!!"+importLocationLowerCase);
229.498 -// }
229.499 -// }
229.500 -// }
229.501 -//
229.502 -// }
229.503 -//
229.504 -// void processWSDLImport(WSDLModel wsdlModel, org.netbeans.modules.bpel.model.api.Import imports ) {
229.505 -// String importLocation = imports.getLocation();
229.506 -// String importLocationLowerCase = importLocation;
229.507 -// String wsdlKey = importLocationLowerCase;
229.508 -// if (!mVisitedXMLResources.contains(wsdlKey)) {
229.509 -// mVisitedXMLResources.add(wsdlKey);
229.510 -// String resourceName = null;
229.511 -// Document doc = wsdlModel.getDocument();
229.512 -// if (doc != null) {
229.513 -// resourceName= doc.getLocalName();
229.514 -// } else {
229.515 -// resourceName = "";
229.516 -// }
229.517 -// URI resourceURI = externalResource(wsdlModel.getDocument().getLocalName(), importLocationLowerCase);
229.518 -// if (resourceURI != null) {
229.519 -// if (!ApacheResolverHelper.isPresent(new File(CommandlineBpelProjectXmlCatalogProvider.getInstance().getProjectWideCatalog()).getAbsolutePath(),
229.520 -// resourceURI.toString())) {
229.521 -// try {
229.522 -// /* Retriever.getDefault().retrieveResource(new File(CommandlineBpelProjectXmlCatalogProvider.getInstance().getRetrieverPath()),
229.523 -// new URI(importLocation));
229.524 -// */
229.525 -// FileObject catalogFO =
229.526 -// FileUtil.toFileObject(FileUtil.normalizeFile(new File(CommandlineBpelProjectXmlCatalogProvider.getInstance().getRetrieverPath())));
229.527 -// displayStatus(importLocationLowerCase);
229.528 -//
229.529 -// Retriever.getDefault().retrieveResource(catalogFO,
229.530 -// FileUtil.normalizeFile(new File(CommandlineBpelProjectXmlCatalogProvider.getInstance().getProjectWideCatalog())).toURI(),
229.531 -// resourceURI);
229.532 -//
229.533 -// } catch (Exception ex) {
229.534 -// logger.log(Level.SEVERE,
229.535 -// "Error encountered while retreiving file - " +
229.536 -// importLocation);
229.537 -// //throw new RuntimeException(ex);
229.538 -// }
229.539 -// }
229.540 -// } else {
229.541 -// WSDLModel wm = wsdlModel;
229.542 -//
229.543 -// Collection<org.netbeans.modules.xml.wsdl.model.Import> subImports =
229.544 -// wm.getDefinitions().getImports();
229.545 -// if (subImports != null && subImports.size() > 0) {
229.546 -// processWSDLImport(wm, subImports);
229.547 -// }
229.548 -// Types types = wm.getDefinitions().getTypes();
229.549 -// if (types != null) {
229.550 -// Collection<org.netbeans.modules.xml.schema.model.Schema> schemas =
229.551 -// types.getSchemas();
229.552 -//
229.553 -// for (Schema schema: schemas) {
229.554 -// Collection<org.netbeans.modules.xml.schema.model.Import> colImports1 =
229.555 -// schema.getImports();
229.556 -// processSchemaImport(schema.getModel(), colImports1);
229.557 -// }
229.558 -// }
229.559 -// }
229.560 -// } else {
229.561 -// System.out.println(" ALREADY DOWNLOADED!!"+importLocationLowerCase);
229.562 -// }
229.563 -// }
229.564 -//
229.565 -//
229.566 -// void processWSDLImport(WSDLModel wsdlModel, Collection<org.netbeans.modules.xml.wsdl.model.Import> colImports) {
229.567 -// for (org.netbeans.modules.xml.wsdl.model.Import imports: colImports) {
229.568 -// String importLocation = imports.getLocation();
229.569 -// String importLocationLowerCase = importLocation;
229.570 -// String wsdlKey = importLocationLowerCase;
229.571 -// if (!mVisitedXMLResources.contains(wsdlKey)) {
229.572 -// mVisitedXMLResources.add(wsdlKey);
229.573 -// String resourceName = null;
229.574 -// Document doc = wsdlModel.getDocument();
229.575 -// if (doc != null) {
229.576 -// resourceName= doc.getLocalName();
229.577 -// } else {
229.578 -// resourceName = "";
229.579 -// }
229.580 -// URI resourceURI = externalResource(wsdlModel.getDocument().getLocalName(), importLocationLowerCase);
229.581 -// if (resourceURI != null) {
229.582 -// if (!ApacheResolverHelper.isPresent(new File(CommandlineBpelProjectXmlCatalogProvider.getInstance().getProjectWideCatalog()).getAbsolutePath(),
229.583 -// resourceURI.toString())) {
229.584 -// try {
229.585 -// /* Retriever.getDefault().retrieveResource(new File(CommandlineBpelProjectXmlCatalogProvider.getInstance().getRetrieverPath()),
229.586 -// new URI(importLocation));
229.587 -// */
229.588 -// FileObject catalogFO =
229.589 -// FileUtil.toFileObject(FileUtil.normalizeFile(new File(CommandlineBpelProjectXmlCatalogProvider.getInstance().getRetrieverPath())));
229.590 -// displayStatus(importLocationLowerCase);
229.591 -//
229.592 -// Retriever.getDefault().retrieveResource(catalogFO,
229.593 -// FileUtil.normalizeFile(new File(CommandlineBpelProjectXmlCatalogProvider.getInstance().getProjectWideCatalog())).toURI(),
229.594 -// resourceURI);
229.595 -//
229.596 -// } catch (Exception ex) {
229.597 -// logger.log(Level.SEVERE,
229.598 -// "Error encountered while retreiving file - " +
229.599 -// importLocation);
229.600 -// //throw new RuntimeException(ex);
229.601 -// }
229.602 -// }
229.603 -// } else {
229.604 -// WSDLModel wm = getWsdlModel(imports);
229.605 -// if (wm != null) {
229.606 -// /* String targetNameSpace =
229.607 -// wm.getDefinitions().getTargetNamespace();
229.608 -// String wsdlName = wm.getDefinitions().getName();
229.609 -// if (wsdlName == null) {
229.610 -// wsdlName = "";
229.611 -// }
229.612 -// String wsdlKey = targetNameSpace + wsdlName;
229.613 -// if (!mVisitedXMLResources.contains(wsdlKey)) {
229.614 -// mVisitedXMLResources.add(wsdlKey);*/
229.615 -//
229.616 -//
229.617 -// Collection<org.netbeans.modules.xml.wsdl.model.Import> subImports =
229.618 -// wm.getDefinitions().getImports();
229.619 -// if (subImports != null && subImports.size() > 0) {
229.620 -// processWSDLImport(wm, subImports);
229.621 -// }
229.622 -// Types types = wm.getDefinitions().getTypes();
229.623 -// if (types != null) {
229.624 -// Collection<org.netbeans.modules.xml.schema.model.Schema> schemas =
229.625 -// types.getSchemas();
229.626 -//
229.627 -// for (Schema schema: schemas) {
229.628 -// /* String targetNameSpace1 =
229.629 -// schema.getTargetNamespace();
229.630 -// String versionInfo1 = schema.getVersion();
229.631 -// if (versionInfo1 == null) {
229.632 -// versionInfo1 = "";
229.633 -// }
229.634 -// String xsdId1 = schema.getId();
229.635 -// if (xsdId1 == null) {
229.636 -// xsdId1 = "";
229.637 -// }
229.638 -// String xsdKey1 =
229.639 -// targetNameSpace1 + versionInfo1 + xsdId1;
229.640 -// if (!mVisitedXMLResources.contains(xsdKey1)) {
229.641 -// mVisitedXMLResources.add(xsdKey1);
229.642 -// */
229.643 -// Collection<org.netbeans.modules.xml.schema.model.Import> colImports1 =
229.644 -// schema.getImports();
229.645 -// processSchemaImport(schema.getModel(), colImports1);
229.646 -// // }
229.647 -// }
229.648 -// }
229.649 -// }
229.650 -// }
229.651 -// } else {
229.652 -// System.out.println(" ALREADY DOWNLOADED!!"+importLocationLowerCase);
229.653 -// }
229.654 -//
229.655 -// }
229.656 -//
229.657 -// }
229.658 -
229.659 - public void displayStatus(String stats ){
229.660 - //pg.progress(stats);
229.661 - mRetUpd.setProgressMessage( NbBundle.getMessage( XsltProjectRetriever.class, "LBL_Retrieving", new Object[] {stats} ));
229.662 - }
229.663 -
229.664 -
229.665 -// public WSDLModel getWsdlModel( Import imp ) {
229.666 -// if (!Import.WSDL_IMPORT_TYPE.equals(imp.getImportType())) {
229.667 -// return null;
229.668 -// }
229.669 -// String location = imp.getLocation();
229.670 -// WSDLModel wsdlModel;
229.671 -// if (location == null) {
229.672 -// return null;
229.673 -// }
229.674 -// try {
229.675 -// URI uri = new URI(location);
229.676 -// ModelSource source = CatalogModelFactory.getDefault()
229.677 -// .getCatalogModel(imp.getModel().getModelSource())
229.678 -// .getModelSource(uri, imp.getModel().getModelSource());
229.679 -// wsdlModel = WSDLModelFactory.getDefault().getModel(source);
229.680 -// }
229.681 -// catch (URISyntaxException e) {
229.682 -// wsdlModel = null;
229.683 -// }
229.684 -// catch (CatalogModelException e) {
229.685 -// wsdlModel = null;
229.686 -// }
229.687 -// if (wsdlModel != null && wsdlModel.getState() == Model.State.NOT_WELL_FORMED) {
229.688 -// return null;
229.689 -// }
229.690 -// return wsdlModel;
229.691 -// }
229.692 -//
229.693 -// public SchemaModel getSchemaModel( Import imp ) {
229.694 -// if ( !Import.SCHEMA_IMPORT_TYPE.equals( imp.getImportType())){
229.695 -// return null;
229.696 -// }
229.697 -// String location = imp.getLocation();
229.698 -// SchemaModel schemaModel ;
229.699 -// if (location == null) {
229.700 -// return null;
229.701 -// }
229.702 -// try {
229.703 -// URI uri = new URI( location );
229.704 -// ModelSource modelSource = CatalogModelFactory.getDefault().
229.705 -// getCatalogModel(imp.getModel().getModelSource())
229.706 -// .getModelSource(uri, imp.getModel().getModelSource());
229.707 -//
229.708 -// schemaModel = SchemaModelFactory.getDefault().
229.709 -// getModel( modelSource );
229.710 -// }
229.711 -// catch (URISyntaxException e) {
229.712 -// schemaModel = null;
229.713 -// }
229.714 -// catch (CatalogModelException e) {
229.715 -// schemaModel = null;
229.716 -// }
229.717 -// if (schemaModel != null && schemaModel.getState() == Model.State.NOT_WELL_FORMED) {
229.718 -// schemaModel = null;
229.719 -// }
229.720 -// return schemaModel;
229.721 -// }
229.722 -
229.723 - public SchemaModel getSchemaModel( org.netbeans.modules.xml.schema.model.Import imp ) {
229.724 - String location = imp.getSchemaLocation();
229.725 - SchemaModel schemaModel ;
229.726 - if (location == null) {
229.727 - return null;
229.728 - }
229.729 - try {
229.730 - URI uri = new URI( location );
229.731 - ModelSource modelSource = CatalogModelFactory.getDefault().
229.732 - getCatalogModel(imp.getModel().getModelSource())
229.733 - .getModelSource(uri, imp.getModel().getModelSource());
229.734 -
229.735 - schemaModel = SchemaModelFactory.getDefault().
229.736 - getModel( modelSource );
229.737 - }
229.738 - catch (URISyntaxException e) {
229.739 - schemaModel = null;
229.740 - }
229.741 - catch (CatalogModelException e) {
229.742 - schemaModel = null;
229.743 - }
229.744 - if (schemaModel != null && schemaModel.getState() == Model.State.NOT_WELL_FORMED) {
229.745 - schemaModel = null;
229.746 - }
229.747 - return schemaModel;
229.748 - }
229.749 -
229.750 - public WSDLModel getWsdlModel( org.netbeans.modules.xml.wsdl.model.Import imp ) {
229.751 - String location = imp.getLocation();
229.752 - WSDLModel wsdlModel;
229.753 - if (location == null) {
229.754 - return null;
229.755 - }
229.756 - try {
229.757 - URI uri = new URI(location);
229.758 - ModelSource source = CatalogModelFactory.getDefault()
229.759 - .getCatalogModel(imp.getModel().getModelSource())
229.760 - .getModelSource(uri, imp.getModel().getModelSource());
229.761 - wsdlModel = WSDLModelFactory.getDefault().getModel(source);
229.762 - }
229.763 - catch (URISyntaxException e) {
229.764 - wsdlModel = null;
229.765 - }
229.766 - catch (CatalogModelException e) {
229.767 - wsdlModel = null;
229.768 - }
229.769 - if (wsdlModel != null && wsdlModel.getState() == Model.State.NOT_WELL_FORMED) {
229.770 - return null;
229.771 - }
229.772 - return wsdlModel;
229.773 - }
229.774 -
229.775 - URI externalResource(String resourceName, String location) {
229.776 - try {
229.777 - if (location.startsWith("http:") || location.startsWith("https:")) {
229.778 - return new URI(location);
229.779 - }
229.780 - File resourceFile = null;
229.781 - File normalizedLocation = null;
229.782 - if (location.startsWith("file:")) {
229.783 - URI fileURI = new URI(location);
229.784 - resourceFile = new File(fileURI);
229.785 - normalizedLocation = FileUtil.normalizeFile(resourceFile);
229.786 - if (normalizedLocation.getAbsolutePath().replace('\\','/').indexOf(mProjectSourcePath) != -1) {
229.787 - return null;
229.788 - }
229.789 - if (resourceFile.exists()) {
229.790 - return normalizedLocation.toURI();
229.791 - }
229.792 - }
229.793 - if (resourceFile == null) {
229.794 - resourceFile = new File(location);
229.795 - }
229.796 - if (!resourceFile.exists()) {
229.797 - resourceFile = new File(this.mProjectSourcePath,location );
229.798 - }
229.799 - normalizedLocation = FileUtil.normalizeFile(resourceFile);
229.800 - if (normalizedLocation.exists()) {
229.801 - if (normalizedLocation.getAbsolutePath().replace('\\','/').indexOf(mProjectSourcePath) != -1) {
229.802 - return null;
229.803 - } else {
229.804 - return normalizedLocation.toURI();
229.805 - }
229.806 - }
229.807 -
229.808 - }catch (Exception ex) {
229.809 - logger.severe("Problem in the imported location "+location+" of "+resourceName);
229.810 - }
229.811 - return null;
229.812 - }
229.813 -
229.814 - }
229.815 -
229.816 - /**
229.817 - *
229.818 - */
229.819 - class RetrieverUpdater extends javax.swing.JPanel {
229.820 -
229.821 - private JComponent progress;
229.822 -
229.823 - /**
229.824 - * Creates new form ModuleUpdaterProgress
229.825 - */
229.826 - public RetrieverUpdater(ProgressHandle handle) {
229.827 - progress = ProgressHandleFactory.createProgressComponent(handle);
229.828 - initComponents();
229.829 - //#67914: On macosx, the background of JTextField is white even if non-editable:
229.830 - message.setBackground(javax.swing.UIManager.getColor("Panel.background")); // NOI18N
229.831 - }
229.832 -
229.833 - /** This method is called from within the constructor to
229.834 - * initialize the form.
229.835 - * WARNING: Do NOT modify this code. The content of this method is
229.836 - * always regenerated by the Form Editor.
229.837 - */
229.838 - private void initComponents() {
229.839 - java.awt.GridBagConstraints gridBagConstraints;
229.840 -
229.841 - innerPanel = new javax.swing.JPanel();
229.842 - message = new javax.swing.JTextField();
229.843 -
229.844 - setLayout(new java.awt.GridBagLayout());
229.845 -
229.846 - setBorder(javax.swing.BorderFactory.createEmptyBorder(11, 11, 11, 11));
229.847 - innerPanel.setLayout(new java.awt.BorderLayout());
229.848 -
229.849 - innerPanel.add(progress, BorderLayout.CENTER);
229.850 -
229.851 - gridBagConstraints = new java.awt.GridBagConstraints();
229.852 - gridBagConstraints.gridx = 0;
229.853 - gridBagConstraints.gridy = 1;
229.854 - gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
229.855 - gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
229.856 - gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
229.857 - gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
229.858 - gridBagConstraints.weightx = 1.0;
229.859 - add(innerPanel, gridBagConstraints);
229.860 -
229.861 - message.setColumns(40);
229.862 - message.setEditable(false);
229.863 - message.setFont(javax.swing.UIManager.getFont("Label.font"));
229.864 - message.setBorder(null);
229.865 - message.setDisabledTextColor(javax.swing.UIManager.getColor("Label.foreground"));
229.866 - gridBagConstraints = new java.awt.GridBagConstraints();
229.867 - gridBagConstraints.gridx = 0;
229.868 - gridBagConstraints.gridy = 0;
229.869 - gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
229.870 - gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
229.871 - gridBagConstraints.weightx = 1.0;
229.872 - gridBagConstraints.insets = new java.awt.Insets(0, 0, 6, 0);
229.873 - add(message, gridBagConstraints);
229.874 -
229.875 - }
229.876 -
229.877 -
229.878 - // Variables declaration - do not modify
229.879 - public javax.swing.JPanel innerPanel;
229.880 - public javax.swing.JTextField message;
229.881 - // End of variables declaration
229.882 -
229.883 - public void setProgressMessage (String name) {
229.884 - message.setText (name);
229.885 - }
229.886 - }
229.887 -}
230.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/XsltproActionProvider.java Wed Feb 21 08:53:38 2007 +0000
230.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
230.3 @@ -1,301 +0,0 @@
230.4 -/*
230.5 - * The contents of this file are subject to the terms of the Common Development
230.6 - * and Distribution License (the License). You may not use this file except in
230.7 - * compliance with the License.
230.8 - *
230.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
230.10 - * or http://www.netbeans.org/cddl.txt.
230.11 -
230.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
230.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
230.14 - * If applicable, add the following below the CDDL Header, with the fields
230.15 - * enclosed by brackets [] replaced by your own identifying information:
230.16 - * "Portions Copyrighted [year] [name of copyright owner]"
230.17 - *
230.18 - * The Original Software is NetBeans. The Initial Developer of the Original
230.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
230.20 - * Microsystems, Inc. All Rights Reserved.
230.21 - */
230.22 -package org.netbeans.modules.xslt.project;
230.23 -
230.24 -import java.awt.Dialog;
230.25 -import java.io.File;
230.26 -import java.io.IOException;
230.27 -import java.util.ArrayList;
230.28 -import java.util.HashMap;
230.29 -import java.util.Iterator;
230.30 -import java.util.List;
230.31 -import java.util.Map;
230.32 -import java.util.Properties;
230.33 -import org.apache.tools.ant.module.api.support.ActionUtils;
230.34 -import org.netbeans.api.debugger.DebuggerManager;
230.35 -import org.netbeans.api.project.ProjectInformation;
230.36 -import org.netbeans.api.project.ant.AntArtifact;
230.37 -import org.netbeans.modules.xslt.project.ui.NoSelectedServerWarning;
230.38 -import org.netbeans.modules.xslt.project.ui.customizer.VisualClassPathItem;
230.39 -import org.netbeans.modules.xslt.project.ui.customizer.XsltproProjectProperties;
230.40 -import org.netbeans.spi.project.ActionProvider;
230.41 -import org.netbeans.spi.project.support.ant.AntProjectHelper;
230.42 -import org.netbeans.spi.project.support.ant.ReferenceHelper;
230.43 -import org.netbeans.spi.project.ui.support.DefaultProjectOperations;
230.44 -import org.openide.DialogDescriptor;
230.45 -import org.openide.DialogDisplayer;
230.46 -import org.openide.ErrorManager;
230.47 -import org.openide.NotifyDescriptor;
230.48 -import org.openide.execution.ExecutorTask;
230.49 -import org.openide.filesystems.FileObject;
230.50 -import org.openide.util.Lookup;
230.51 -import org.openide.util.NbBundle;
230.52 -import org.openide.util.Task;
230.53 -import org.openide.util.TaskListener;
230.54 -import org.openide.windows.IOProvider;
230.55 -import org.openide.windows.OutputWriter;
230.56 -
230.57 -/**
230.58 - * Action provider of the Web project. This is the place where to do
230.59 - * strange things to Web actions. E.g. compile-single.
230.60 - *
230.61 - * @author Vitaly Bychkov
230.62 - * @version 1.0
230.63 - */
230.64 -public class XsltproActionProvider implements ActionProvider{
230.65 -
230.66 - // Commands available from Web project
230.67 - private static final String[] supportedActions = {
230.68 - COMMAND_BUILD,
230.69 - COMMAND_CLEAN,
230.70 - COMMAND_REBUILD,
230.71 - COMMAND_DELETE,
230.72 - XsltproConstants.POPULATE_CATALOG,
230.73 - COMMAND_DELETE,
230.74 - COMMAND_COPY,
230.75 - COMMAND_MOVE,
230.76 - COMMAND_RENAME
230.77 - };
230.78 -
230.79 - XsltproProject project;
230.80 -
230.81 - // Ant project helper of the project
230.82 - private AntProjectHelper antProjectHelper;
230.83 - private ReferenceHelper refHelper;
230.84 -
230.85 - /** Map from commands to ant targets */
230.86 - Map<String,String[]> commands;
230.87 -
230.88 - public XsltproActionProvider(XsltproProject project, AntProjectHelper antProjectHelper, ReferenceHelper refHelper) {
230.89 - commands = new HashMap<String,String[]>();
230.90 - commands.put(COMMAND_BUILD, new String[] {"dist"}); // NOI18N
230.91 - commands.put(COMMAND_CLEAN, new String[] {"clean"}); // NOI18N
230.92 - commands.put(COMMAND_REBUILD, new String[] {"clean", "dist"}); // NOI18N
230.93 - commands.put(XsltproConstants.POPULATE_CATALOG, new String[] {"populate"});
230.94 - //commands.put(XsltproConstants.COMMAND_REDEPLOY, new String[] {"run"}); // NOI18N
230.95 - //commands.put(XsltproConstants.COMMAND_DEPLOY, new String[] {"run"}); // NOI18N
230.96 -
230.97 - this.antProjectHelper = antProjectHelper;
230.98 - this.project = project;
230.99 - this.refHelper = refHelper;
230.100 - }
230.101 -
230.102 - public String[] getSupportedActions() {
230.103 - return supportedActions;
230.104 - }
230.105 -
230.106 - public void invokeAction(String command, Lookup context) throws IllegalArgumentException {
230.107 - if (COMMAND_COPY.equals(command)) {
230.108 - DefaultProjectOperations.performDefaultCopyOperation(project);
230.109 - return ;
230.110 - }
230.111 -
230.112 - if (COMMAND_MOVE.equals(command)) {
230.113 - DefaultProjectOperations.performDefaultMoveOperation(project);
230.114 - return ;
230.115 - }
230.116 -
230.117 - if (COMMAND_RENAME.equals(command)) {
230.118 - DefaultProjectOperations.performDefaultRenameOperation(project, null);
230.119 - return ;
230.120 - }
230.121 - if (COMMAND_DELETE.equals(command)) {
230.122 - DefaultProjectOperations.performDefaultDeleteOperation(project);
230.123 - return ;
230.124 - }
230.125 - if (command.equals(XsltproConstants.POPULATE_CATALOG)) {
230.126 - XsltProjectRetriever bpRetriever = new XsltProjectRetriever(project.getProjectDirectory());
230.127 - bpRetriever.execute();
230.128 - return;
230.129 - }
230.130 - Properties p = null;
230.131 - String[] targetNames = (String[])commands.get(command);
230.132 - //EXECUTION PART
230.133 - if (command.equals (XsltproConstants.COMMAND_DEPLOY) || command.equals (XsltproConstants.COMMAND_REDEPLOY)) {
230.134 - if (!isSelectedServer ()) {
230.135 - return;
230.136 - }
230.137 - if (isDebugged()) {
230.138 - NotifyDescriptor nd;
230.139 - ProjectInformation pi = (ProjectInformation)project.getLookup().lookup(ProjectInformation.class);
230.140 - String text = pi.getDisplayName();
230.141 - nd = new NotifyDescriptor.Confirmation(
230.142 - NbBundle.getMessage(XsltproActionProvider.class, "MSG_SessionRunning", text),
230.143 - NotifyDescriptor.OK_CANCEL_OPTION);
230.144 - Object o = DialogDisplayer.getDefault().notify(nd);
230.145 - if (o.equals(NotifyDescriptor.OK_OPTION)) {
230.146 - DebuggerManager.getDebuggerManager().getCurrentSession().kill();
230.147 - } else {
230.148 - return;
230.149 - }
230.150 - }
230.151 - } else {
230.152 - p = null;
230.153 - if (targetNames == null) {
230.154 - throw new IllegalArgumentException(command);
230.155 - }
230.156 - }
230.157 -
230.158 -
230.159 -// if build command then build any depedent project
230.160 - if(command.equals(COMMAND_BUILD)) {
230.161 - try {
230.162 - buildDependentProjectsAndRunTask(targetNames, p);
230.163 - } catch (IOException e) {
230.164 - ErrorManager.getDefault().notify(e);
230.165 - }
230.166 - } else {
230.167 - runTask(targetNames, p);
230.168 - }
230.169 - }
230.170 -
230.171 - public boolean isActionEnabled(String command, Lookup context) throws IllegalArgumentException {
230.172 - if ( findBuildXml() == null ) {
230.173 - return false;
230.174 - }
230.175 - return true;
230.176 - }
230.177 -
230.178 - // private methods
230.179 -
230.180 - /**
230.181 - * @return array of targets or null to stop execution; can return empty array
230.182 - */
230.183 - String[] getTargetNames(String command, Lookup context, Properties p) throws IllegalArgumentException {
230.184 - String[] targetNames = (String[])commands.get(command);
230.185 - return targetNames;
230.186 - }
230.187 -
230.188 - private FileObject findBuildXml() {
230.189 - return project.getProjectDirectory().getFileObject(project.getBuildXmlName ());
230.190 - }
230.191 - private void runTask(String[] targetNames, Properties p) {
230.192 - try {
230.193 - ActionUtils.runTarget(findBuildXml(), targetNames, p);
230.194 - } catch (IOException e) {
230.195 - ErrorManager.getDefault().notify(e);
230.196 - }
230.197 - }
230.198 -
230.199 - private void buildDependentProjectsAndRunTask(String[] targetNames, Properties p) throws IOException {
230.200 - XsltproProjectProperties app = this.project.getProjectProperties();
230.201 - List items = (List) app.get(XsltproConstants.JAVAC_CLASSPATH);
230.202 - ArrayList artifacts = new ArrayList();
230.203 -
230.204 - for (int i = 0, size = items.size(); i < size; i++) {
230.205 - VisualClassPathItem vi = (VisualClassPathItem) items.get(i);
230.206 - AntArtifact aa = (AntArtifact) vi.getObject();
230.207 - String loc = aa.getProject().getProjectDirectory().getPath() + "/" + aa.getArtifactLocation().getPath();
230.208 - File asa = new File(loc);
230.209 - log(" Dependent Project artifact jar: "+ loc + ", [" + (asa.exists()?"exist":"missing") + "]");
230.210 - if (! asa.exists()) {
230.211 - artifacts.add(aa);
230.212 - }
230.213 - }
230.214 -
230.215 - if(artifacts.size() != 0) {
230.216 - //use AntTaskListener which invokes the target on
230.217 - //current project build script after all the depedent projects
230.218 - //are build
230.219 - AntTaskListener antTaskListener = new AntTaskListener(targetNames, p);
230.220 - antTaskListener.setTotalTasks(artifacts.size());
230.221 - Iterator it = artifacts.iterator();
230.222 - while(it.hasNext()) {
230.223 - AntArtifact aa = (AntArtifact) it.next();
230.224 - String loc = aa.getProject().getProjectDirectory().getPath() + "/" + aa.getArtifactLocation().getPath();
230.225 - log(" Building dependent project "+ loc + "...");
230.226 - ExecutorTask task = ActionUtils.runTarget(aa.getScriptFile(), new String[] { aa.getTargetName() }, null);
230.227 - task.addTaskListener(antTaskListener);
230.228 - }
230.229 - } else {
230.230 - //no need to build depedent projects
230.231 - //directly invoke target on current project build script;
230.232 - runTask(targetNames, p);
230.233 - }
230.234 - }
230.235 -
230.236 - private boolean isDebugged() {
230.237 - return false;
230.238 - }
230.239 -
230.240 - private boolean isSelectedServer () {
230.241 - String instance = antProjectHelper.getStandardPropertyEvaluator ().getProperty (XsltproConstants.J2EE_SERVER_INSTANCE);
230.242 - boolean selected;
230.243 - if (instance != null) {
230.244 - selected = true;
230.245 - } else {
230.246 - // no selected server => warning
230.247 - String server = antProjectHelper.getStandardPropertyEvaluator ().getProperty (XsltproConstants.J2EE_SERVER_TYPE);
230.248 - NoSelectedServerWarning panel = new NoSelectedServerWarning (server);
230.249 -
230.250 - Object[] options = new Object[] {
230.251 - DialogDescriptor.OK_OPTION,
230.252 - DialogDescriptor.CANCEL_OPTION
230.253 - };
230.254 - DialogDescriptor desc = new DialogDescriptor (panel,
230.255 - NbBundle.getMessage (NoSelectedServerWarning.class, "CTL_NoSelectedServerWarning_Title"), // NOI18N
230.256 - true, options, options[0], DialogDescriptor.DEFAULT_ALIGN, null, null);
230.257 - Dialog dlg = DialogDisplayer.getDefault().createDialog (desc);
230.258 - dlg.setVisible (true);
230.259 - if (desc.getValue() != options[0]) {
230.260 - selected = false;
230.261 - } else {
230.262 - instance = panel.getSelectedInstance ();
230.263 - selected = instance != null;
230.264 - if (selected) {
230.265 - XsltproProjectProperties wpp = new XsltproProjectProperties (project, antProjectHelper, refHelper);
230.266 - wpp.put (XsltproConstants.J2EE_SERVER_INSTANCE, instance);
230.267 - wpp.store ();
230.268 - }
230.269 - }
230.270 - dlg.dispose();
230.271 - }
230.272 - return selected;
230.273 - }
230.274 -
230.275 - private void log(String str) {
230.276 - OutputWriter out = IOProvider.getDefault().getStdOut();
230.277 - out.println(str);
230.278 - out.flush();
230.279 - }
230.280 -
230.281 - private class AntTaskListener implements TaskListener {
230.282 - int totalTaskCount;
230.283 - int finishedTaskCount = 0;
230.284 - private String[] mTargetNames;
230.285 - private Properties mProperties;
230.286 -
230.287 - public AntTaskListener(String[] targetNames, Properties p) {
230.288 - this.mTargetNames = targetNames;
230.289 - this.mProperties = p;
230.290 - }
230.291 -
230.292 - public void setTotalTasks(int total) {
230.293 - this.totalTaskCount = total;
230.294 - }
230.295 -
230.296 - public void taskFinished(Task task) {
230.297 - finishedTaskCount++;
230.298 - if(finishedTaskCount == totalTaskCount) {
230.299 - runTask(this.mTargetNames, this.mProperties);
230.300 - }
230.301 - }
230.302 - }
230.303 -
230.304 -}
231.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/XsltproConstants.java Wed Feb 21 08:53:38 2007 +0000
231.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
231.3 @@ -1,124 +0,0 @@
231.4 -/*
231.5 - * The contents of this file are subject to the terms of the Common Development
231.6 - * and Distribution License (the License). You may not use this file except in
231.7 - * compliance with the License.
231.8 - *
231.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
231.10 - * or http://www.netbeans.org/cddl.txt.
231.11 -
231.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
231.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
231.14 - * If applicable, add the following below the CDDL Header, with the fields
231.15 - * enclosed by brackets [] replaced by your own identifying information:
231.16 - * "Portions Copyrighted [year] [name of copyright owner]"
231.17 - *
231.18 - * The Original Software is NetBeans. The Initial Developer of the Original
231.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
231.20 - * Microsystems, Inc. All Rights Reserved.
231.21 - */
231.22 -package org.netbeans.modules.xslt.project;
231.23 -
231.24 -/**
231.25 - *
231.26 - * @author Vitaly Bychkov
231.27 - * @version 1.0
231.28 - */
231.29 -public interface XsltproConstants {
231.30 -// String WIZARD_BUNDLE = "org/netbeans/modules/xslt/project/prjwizard/Bundle"; // NOI18N
231.31 - public static final String PROJECT_DIR = "projdir"; //NOI18N
231.32 - public static final String NAME = "name"; //NOI18N
231.33 -// public static final String SOURCE_ROOT = "sourceRoot"; //NOI18N
231.34 -
231.35 - public static final String SET_AS_MAIN = "setAsMain"; //NOI18N
231.36 - public static final String J2EE_LEVEL = "j2eeLevel"; //NOI18N
231.37 -
231.38 - public static final String CONFIG_FILES_FOLDER = "configFilesFolder"; //NOI18N
231.39 - public static final String JAVA_ROOT = "javaRoot"; //NOI18N
231.40 - public static final String LIB_FOLDER = "libFolder"; //NOI18N
231.41 -
231.42 -
231.43 - public static final String COMMAND_REDEPLOY = "redeploy";
231.44 - public static final String COMMAND_DEPLOY = "deploy";
231.45 - public static final String ARTIFACT_TYPE_JAR = "jar";
231.46 - public static final String SOURCES_TYPE_JAVA = "java";
231.47 - public static final String ARTIFACT_TYPE_EJB_WS="j2ee_archive";
231.48 - public static final String POPULATE_CATALOG="populate_catalog";
231.49 -
231.50 - public static final String SOURCES_TYPE_ICANPRO = "BIZPRO";
231.51 -
231.52 -
231.53 -
231.54 -
231.55 -
231.56 -
231.57 - // icanproProjec tProperties constants
231.58 - public static final String J2EE_1_4 = "1.4";
231.59 - public static final String J2EE_1_3 = "1.3";
231.60 - // Special properties of the project
231.61 - public static final String EJB_PROJECT_NAME = "j2ee.icanpro.name";
231.62 - public static final String JAVA_PLATFORM = "platform.active";
231.63 - public static final String J2EE_PLATFORM = "j2ee.platform";
231.64 -
231.65 - // Properties stored in the PROJECT.PROPERTIES
231.66 - /** root of external web module sources (full path), ".." if the sources are within project folder */
231.67 - public static final String SOURCE_ROOT = "source.root";
231.68 - public static final String BUILD_FILE = "buildfile";
231.69 - public static final String DIST_DIR = "dist.dir";
231.70 - public static final String DIST_JAR = "dist.jar";
231.71 - public static final String JAVAC_CLASSPATH = "javac.classpath";
231.72 - public static final String DEBUG_CLASSPATH = "debug.classpath";
231.73 - public static final String WSDL_CLASSPATH = "wsdl.classpath";
231.74 -
231.75 - public static final String JAR_NAME = "jar.name";
231.76 - public static final String JAR_COMPRESS = "jar.compress";
231.77 -
231.78 - public static final String J2EE_SERVER_INSTANCE = "j2ee.server.instance";
231.79 - public static final String J2EE_SERVER_TYPE = "j2ee.server.type";
231.80 - public static final String JAVAC_SOURCE = "javac.source";
231.81 - public static final String JAVAC_DEBUG = "javac.debug";
231.82 - public static final String JAVAC_DEPRECATION = "javac.deprecation";
231.83 - public static final String JAVAC_TARGET = "javac.target";
231.84 - public static final String JAVAC_ARGS = "javac.compilerargs";
231.85 - public static final String VALIDATION_FLAG = "allow.build.with.error";
231.86 - public static final String SRC_DIR = "src.dir";
231.87 - public static final String META_INF = "meta.inf";
231.88 - public static final String RESOURCE_DIR = "resource.dir";
231.89 - public static final String BUILD_DIR = "build.dir";
231.90 - public static final String BUILD_GENERATED_DIR = "build.generated.dir";
231.91 - public static final String BUILD_CLASSES_DIR = "build.classes.dir";
231.92 - public static final String BUILD_CLASSES_EXCLUDES = "build.classes.excludes";
231.93 -
231.94 - public static final String DIST_JAVADOC_DIR = "dist.javadoc.dir";
231.95 -
231.96 - //================== Start of IcanPro =====================================//
231.97 - //FIXME? REPACKAGING
231.98 - public static final String JBI_SETYPE_PREFIX = "com.sun.jbi.ui.devtool.jbi.setype.prefix";
231.99 - public static final String ASSEMBLY_UNIT_ALIAS = "com.sun.jbi.ui.devtool.jbi.alias.assembly-unit";
231.100 - public static final String ASSEMBLY_UNIT_DESCRIPTION = "com.sun.jbi.ui.devtool.jbi.description.assembly-unit";
231.101 - public static final String APPLICATION_SUB_ASSEMBLY_ALIAS = "com.sun.jbi.ui.devtool.jbi.alias.application-sub-assembly";
231.102 - public static final String APPLICATION_SUB_ASSEMBLY_DESCRIPTION = "com.sun.jbi.ui.devtool.jbi.description.application-sub-assembly";
231.103 -
231.104 - public static final String JBI_COMPONENT_CONF_FILE = "com.sun.jbi.ui.devtool.jbi.component.conf.file";
231.105 - public static final String JBI_COMPONENT_CONF_ROOT = "com.sun.jbi.ui.devtool.jbi.component.conf.root";
231.106 - public static final String JBI_DEPLOYMENT_CONF_FILE = "com.sun.jbi.ui.devtool.jbi.deployment.conf.file";
231.107 - public static final String JBI_DEPLOYMENT_CONF_ROOT = "com.sun.jbi.ui.devtool.jbi.deployment.conf.root";
231.108 - public static final String DISPLAY_NAME_PROPERTY_KEY = "com.sun.jbi.ui.devtool.appserver.instance.displayName";
231.109 - public static final String HOST_NAME_PROPERTY_KEY = "com.sun.jbi.ui.devtool.appserver.instance.hostName";
231.110 - public static final String ADMINISTRATION_PORT_PROPERTY_KEY = "com.sun.jbi.ui.devtool.appserver.instance.administrationPort";
231.111 - public static final String DOMAIN_PROPERTY_KEY = "com.sun.jbi.ui.devtool.appserver.instance.domain";
231.112 - public static final String HTTP_MONITOR_ON_PROPERTY_KEY = "com.sun.jbi.ui.devtool.appserver.instance.httpMonitorOn";
231.113 - public static final String HTTP_PORT_NUMBER_PROPERTY_KEY = "com.sun.jbi.ui.devtool.appserver.instance.httpPortNumber";
231.114 - public static final String LOCATION_PROPERTY_KEY = "com.sun.jbi.ui.devtool.appserver.instance.location";
231.115 - public static final String PASSWORD_PROPERTY_KEY = "com.sun.jbi.ui.devtool.appserver.instance.password";
231.116 - public static final String URL_PROPERTY_KEY = "com.sun.jbi.ui.devtool.appserver.instance.url";
231.117 - public static final String USER_NAME_PROPERTY_KEY = "com.sun.jbi.ui.devtool.appserver.instance.userName";
231.118 -
231.119 - public static final String JBI_REGISTRY_COMPONENT_FILE_KEY = "com.sun.jbi.registry.component.file";
231.120 - public static final String JBI_REGISTRY_BROKER_HOST_KEY = "com.sun.jbi.messaging.brokerHost";
231.121 -
231.122 - public static final String BC_DEPLOYMENT_JAR = "bcdeployment.jar";
231.123 - public static final String SE_DEPLOYMENT_JAR = "sedeployment.jar";
231.124 -
231.125 -}
231.126 -
231.127 -
232.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/XsltproProject.java Wed Feb 21 08:53:38 2007 +0000
232.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
232.3 @@ -1,459 +0,0 @@
232.4 -/*
232.5 - * The contents of this file are subject to the terms of the Common Development
232.6 - * and Distribution License (the License). You may not use this file except in
232.7 - * compliance with the License.
232.8 - *
232.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
232.10 - * or http://www.netbeans.org/cddl.txt.
232.11 -
232.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
232.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
232.14 - * If applicable, add the following below the CDDL Header, with the fields
232.15 - * enclosed by brackets [] replaced by your own identifying information:
232.16 - * "Portions Copyrighted [year] [name of copyright owner]"
232.17 - *
232.18 - * The Original Software is NetBeans. The Initial Developer of the Original
232.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
232.20 - * Microsystems, Inc. All Rights Reserved.
232.21 - */
232.22 -package org.netbeans.modules.xslt.project;
232.23 -
232.24 -import java.beans.PropertyChangeListener;
232.25 -import java.beans.PropertyChangeSupport;
232.26 -import java.io.File;
232.27 -import java.io.IOException;
232.28 -import javax.swing.Icon;
232.29 -import javax.swing.ImageIcon;
232.30 -import org.netbeans.api.java.project.JavaProjectConstants;
232.31 -import org.netbeans.api.project.FileOwnerQuery;
232.32 -import org.netbeans.api.project.Project;
232.33 -import org.netbeans.api.project.ProjectInformation;
232.34 -import org.netbeans.api.project.ProjectManager;
232.35 -import org.netbeans.api.project.ant.AntArtifact;
232.36 -
232.37 -import static org.netbeans.modules.xslt.project.XsltproConstants.*;
232.38 -import org.netbeans.modules.xml.catalogsupport.DefaultProjectCatalogSupport;
232.39 -import org.netbeans.modules.xslt.project.prjwizard.IcanproLogicalViewProvider;
232.40 -import org.netbeans.modules.xslt.project.ui.customizer.XsltProjectCustomizerProvider;
232.41 -import org.netbeans.modules.xslt.project.ui.customizer.XsltproProjectProperties;
232.42 -import org.netbeans.spi.java.project.support.ui.BrokenReferencesSupport;
232.43 -import org.netbeans.spi.project.AuxiliaryConfiguration;
232.44 -import org.netbeans.spi.project.SubprojectProvider;
232.45 -import org.netbeans.spi.project.ant.AntArtifactProvider;
232.46 -import org.netbeans.spi.project.support.ant.AntProjectEvent;
232.47 -import org.netbeans.spi.project.support.ant.AntProjectHelper;
232.48 -import org.netbeans.spi.project.support.ant.AntProjectListener;
232.49 -import org.netbeans.spi.project.support.ant.EditableProperties;
232.50 -import org.netbeans.spi.project.support.ant.GeneratedFilesHelper;
232.51 -import org.netbeans.spi.project.support.ant.ProjectXmlSavedHook;
232.52 -import org.netbeans.spi.project.support.ant.PropertyEvaluator;
232.53 -import org.netbeans.spi.project.support.ant.ReferenceHelper;
232.54 -import org.netbeans.spi.project.support.ant.SourcesHelper;
232.55 -import org.netbeans.spi.project.ui.PrivilegedTemplates;
232.56 -import org.netbeans.spi.project.ui.ProjectOpenedHook;
232.57 -import org.netbeans.spi.project.ui.RecommendedTemplates;
232.58 -import org.netbeans.spi.queries.FileBuiltQueryImplementation;
232.59 -import org.openide.ErrorManager;
232.60 -import org.openide.filesystems.FileObject;
232.61 -import org.openide.modules.InstalledFileLocator;
232.62 -import org.openide.util.Lookup;
232.63 -import org.openide.util.Mutex;
232.64 -import org.openide.util.Utilities;
232.65 -import org.openide.util.lookup.Lookups;
232.66 -import org.w3c.dom.Element;
232.67 -import org.w3c.dom.Node;
232.68 -import org.w3c.dom.NodeList;
232.69 -import org.w3c.dom.Text;
232.70 -
232.71 -/**
232.72 - *
232.73 - * @author Chris Webster
232.74 - * @author Vitaly Bychkov
232.75 - * @version 1.0
232.76 - */
232.77 -public class XsltproProject implements Project, AntProjectListener {
232.78 -
232.79 - private static final Icon PROJECT_ICON = new ImageIcon(Utilities.loadImage("org/netbeans/modules/xslt/project/resources/xsltProjectIcon.gif")); // NOI18N
232.80 - public static final String SOURCES_TYPE_XSLTPRO = "BIZPRO";
232.81 - public static final String ARTIFACT_TYPE_JBI_ASA = "CAPS.asa";
232.82 -
232.83 - public static final String MODULE_INSTALL_NAME = "modules/org-netbeans-modules-xslt-project.jar";
232.84 - public static final String MODULE_INSTALL_CBN = "org.netbeans.modules.xslt.project";
232.85 - public static final String MODULE_INSTALL_DIR = "module.install.dir";
232.86 -
232.87 - private final AntProjectHelper helper;
232.88 - private Lookup lookup;
232.89 - private PropertyEvaluator evaluator;
232.90 - private ReferenceHelper refHelper;
232.91 - private GeneratedFilesHelper genFilesHelper;
232.92 -
232.93 - public XsltproProject(AntProjectHelper helper) throws IOException {
232.94 - this.helper = helper;
232.95 -
232.96 - this.evaluator = createEvaluator();
232.97 - AuxiliaryConfiguration aux = helper.createAuxiliaryConfiguration();
232.98 - this.refHelper = new ReferenceHelper(helper, aux, helper.getStandardPropertyEvaluator());
232.99 - this.genFilesHelper = new GeneratedFilesHelper(helper);
232.100 - this.lookup = createLookup(aux);
232.101 - helper.addAntProjectListener(this);
232.102 - }
232.103 -
232.104 - public FileObject getProjectDirectory() {
232.105 - return helper.getProjectDirectory();
232.106 - }
232.107 -
232.108 - public AntProjectHelper getAntProjectHelper() {
232.109 - return helper;
232.110 - }
232.111 -
232.112 - public ReferenceHelper getReferenceHelper() {
232.113 - return this.refHelper;
232.114 - }
232.115 -
232.116 - public String toString() {
232.117 - return "XsltproProject[" + getProjectDirectory() + "]"; // NOI18N
232.118 - }
232.119 -
232.120 - public Lookup getLookup() {
232.121 - return lookup;
232.122 - }
232.123 -
232.124 - /** Return configured project name. */
232.125 - public String getName() {
232.126 - return (String) ProjectManager.mutex().readAccess(new Mutex.Action() {
232.127 - public Object run() {
232.128 - Element data = helper.getPrimaryConfigurationData(true);
232.129 - // XXX replace by XMLUtil when that has findElement, findText, etc.
232.130 - NodeList nl = data.getElementsByTagNameNS(XsltproProjectType.PROJECT_CONFIGURATION_NAMESPACE, "name");
232.131 - if (nl.getLength() == 1) {
232.132 - nl = nl.item(0).getChildNodes();
232.133 - if (nl.getLength() == 1 && nl.item(0).getNodeType() == Node.TEXT_NODE) {
232.134 - return ((Text) nl.item(0)).getNodeValue();
232.135 - }
232.136 - }
232.137 - return "???"; // NOI18N
232.138 - }
232.139 - });
232.140 - }
232.141 -
232.142 - /** Store configured project name. */
232.143 - public void setName(final String name) {
232.144 - ProjectManager.mutex().writeAccess(new Mutex.Action() {
232.145 - public Object run() {
232.146 - Element data = helper.getPrimaryConfigurationData(true);
232.147 - // XXX replace by XMLUtil when that has findElement, findText, etc.
232.148 - NodeList nl = data.getElementsByTagNameNS(XsltproProjectType.PROJECT_CONFIGURATION_NAMESPACE, "name");
232.149 - Element nameEl;
232.150 - if (nl.getLength() == 1) {
232.151 - nameEl = (Element) nl.item(0);
232.152 - NodeList deadKids = nameEl.getChildNodes();
232.153 - while (deadKids.getLength() > 0) {
232.154 - nameEl.removeChild(deadKids.item(0));
232.155 - }
232.156 - } else {
232.157 - nameEl = data.getOwnerDocument().createElementNS(XsltproProjectType.PROJECT_CONFIGURATION_NAMESPACE, "name");
232.158 - data.insertBefore(nameEl, /* OK if null */data.getChildNodes().item(0));
232.159 - }
232.160 - nameEl.appendChild(data.getOwnerDocument().createTextNode(name));
232.161 - helper.putPrimaryConfigurationData(data, true);
232.162 - return null;
232.163 - }
232.164 - });
232.165 - }
232.166 -
232.167 - public void configurationXmlChanged(AntProjectEvent ev) {
232.168 - // TODO m
232.169 - if (ev.getPath().equals(AntProjectHelper.PROJECT_XML_PATH)) {
232.170 - // Could be various kinds of changes, but name & displayName might have changed.
232.171 - Info info = (Info)getLookup().lookup(ProjectInformation.class);
232.172 - info.firePropertyChange(ProjectInformation.PROP_NAME);
232.173 - info.firePropertyChange(ProjectInformation.PROP_DISPLAY_NAME);
232.174 - }
232.175 - }
232.176 -
232.177 - public void propertiesChanged(AntProjectEvent ev) {
232.178 - }
232.179 -
232.180 - PropertyEvaluator evaluator() {
232.181 - return evaluator;
232.182 - }
232.183 -
232.184 - String getBuildXmlName() {
232.185 - String storedName = helper.getStandardPropertyEvaluator().getProperty(BUILD_FILE);
232.186 - return storedName == null ? GeneratedFilesHelper.BUILD_XML_PATH : storedName;
232.187 - }
232.188 -
232.189 -
232.190 - FileObject getSourceDirectory() {
232.191 - String srcDir = helper.getStandardPropertyEvaluator().getProperty("src.dir"); // NOI18N
232.192 - return helper.resolveFileObject(srcDir);
232.193 - }
232.194 -
232.195 - // TODO r
232.196 -// /** Last time in ms when the Broken References alert was shown. */
232.197 -// private static long brokenAlertLastTime = 0;
232.198 -//
232.199 -// /** Is Broken References alert shown now? */
232.200 -// private static boolean brokenAlertShown = false;
232.201 -//
232.202 -// /** Timeout within which request to show alert will be ignored. */
232.203 -// private static int BROKEN_ALERT_TIMEOUT = 1000;
232.204 -//
232.205 -
232.206 - private PropertyEvaluator createEvaluator() {
232.207 - // XXX might need to use a custom evaluator to handle active platform substitutions... TBD
232.208 - return helper.getStandardPropertyEvaluator();
232.209 - }
232.210 -
232.211 - private Lookup createLookup(AuxiliaryConfiguration aux) {
232.212 - SubprojectProvider spp = refHelper.createSubprojectProvider();
232.213 - FileBuiltQueryImplementation fileBuilt = helper.createGlobFileBuiltQuery(helper.getStandardPropertyEvaluator(),
232.214 - new String[] {"${src.dir}/*.java"}, // NOI18N
232.215 - new String[] {"${build.classes.dir}/*.class"} // NOI18N
232.216 - );
232.217 - final SourcesHelper sourcesHelper = new SourcesHelper(helper, evaluator());
232.218 -// todo a|r String webModuleLabel = org.openide.util.NbBundle.getMessage(IcanproCustomizerProvider.class, "LBL_Node_EJBModule"); //NOI18N
232.219 -// todo a|r String srcJavaLabel = org.openide.util.NbBundle.getMessage(IcanproCustomizerProvider.class, "LBL_Node_Sources"); //NOI18N
232.220 - String webModuleLabel = org.openide.util.NbBundle.getMessage(XsltproProject.class, "LBL_Node_EJBModule"); //NOI18N
232.221 - String srcJavaLabel = org.openide.util.NbBundle.getMessage(XsltproProject.class, "LBL_Node_Sources"); //NOI18N
232.222 -
232.223 - sourcesHelper.addPrincipalSourceRoot("${"+SOURCE_ROOT+"}", webModuleLabel, /*XXX*/null, null);
232.224 - sourcesHelper.addPrincipalSourceRoot("${"+SRC_DIR+"}", srcJavaLabel, /*XXX*/null, null);
232.225 -
232.226 - sourcesHelper.addTypedSourceRoot("${"+SRC_DIR+"}", SOURCES_TYPE_XSLTPRO, srcJavaLabel, /*XXX*/null, null);
232.227 - sourcesHelper.addTypedSourceRoot("${"+SRC_DIR+"}", JavaProjectConstants.SOURCES_TYPE_JAVA, srcJavaLabel, /*XXX*/null, null);
232.228 -
232.229 - ProjectManager.mutex().postWriteRequest(new Runnable() {
232.230 - public void run() {
232.231 - sourcesHelper.registerExternalRoots(FileOwnerQuery.EXTERNAL_ALGORITHM_TRANSIENT);
232.232 - }
232.233 - });
232.234 -
232.235 - return Lookups.fixed(new Object[] {
232.236 - new Info(),
232.237 - aux,
232.238 - helper.createCacheDirectoryProvider(),
232.239 -//B new ProjectWebServicesSupportProvider(),
232.240 - // XXX the helper should not be exposed
232.241 - helper,
232.242 - spp,
232.243 - new XsltproActionProvider( this, helper, refHelper ),
232.244 - new IcanproLogicalViewProvider(this, helper, evaluator(), spp, refHelper),
232.245 -// new IcanproCustomizerProvider( this, helper, refHelper ),
232.246 - new XsltProjectCustomizerProvider(this),
232.247 - new AntArtifactProviderImpl(),
232.248 - new ProjectXmlSavedHookImpl(),
232.249 - //todo m
232.250 - new ProjectOpenedHookImpl(this),
232.251 - new XsltProjectOperations(this),
232.252 - fileBuilt,
232.253 - new RecommendedTemplatesImpl(),
232.254 - refHelper,
232.255 - sourcesHelper.createSources(),
232.256 - helper.createSharabilityQuery(evaluator(),
232.257 - new String[] {"${"+SOURCE_ROOT+"}"},
232.258 - new String[] {
232.259 - "${"+BUILD_DIR+"}",
232.260 - "${"+DIST_DIR+"}"}
232.261 - )
232.262 - ,
232.263 - new DefaultProjectCatalogSupport(this, helper, refHelper)
232.264 -
232.265 - });
232.266 - }
232.267 -
232.268 - // private inner classes ---------------------------------------------------
232.269 -
232.270 - /**
232.271 - * @see org.netbeans.api.project.ProjectInformation
232.272 - */
232.273 - private final class Info implements ProjectInformation {
232.274 -
232.275 - private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
232.276 -
232.277 - Info() {}
232.278 -
232.279 - void firePropertyChange(String prop) {
232.280 - pcs.firePropertyChange(prop, null, null);
232.281 - }
232.282 -
232.283 - public String getName() {
232.284 - return XsltproProject.this.getName();
232.285 - }
232.286 -
232.287 - public String getDisplayName() {
232.288 - return XsltproProject.this.getName();
232.289 - }
232.290 -
232.291 - public Icon getIcon() {
232.292 - return PROJECT_ICON;
232.293 - }
232.294 -
232.295 - public Project getProject() {
232.296 - return XsltproProject.this;
232.297 - }
232.298 -
232.299 - public void addPropertyChangeListener(PropertyChangeListener listener) {
232.300 - pcs.addPropertyChangeListener(listener);
232.301 - }
232.302 -
232.303 - public void removePropertyChangeListener(PropertyChangeListener listener) {
232.304 - pcs.removePropertyChangeListener(listener);
232.305 - }
232.306 -
232.307 - }
232.308 -
232.309 - /**
232.310 - * @see org.netbeans.spi.project.support.ant.ProjectXmlSavedHook
232.311 - */
232.312 - private final class ProjectXmlSavedHookImpl extends ProjectXmlSavedHook {
232.313 -
232.314 - ProjectXmlSavedHookImpl() {}
232.315 -
232.316 - protected void projectXmlSaved() throws IOException {
232.317 - genFilesHelper.refreshBuildScript(
232.318 - GeneratedFilesHelper.BUILD_IMPL_XML_PATH,
232.319 - XsltproProject.class.getResource("resources/build-impl.xsl"),
232.320 - false);
232.321 - genFilesHelper.refreshBuildScript(
232.322 - getBuildXmlName(),
232.323 - XsltproProject.class.getResource("resources/build.xsl"),
232.324 - false);
232.325 - }
232.326 -
232.327 - }
232.328 -
232.329 - /**
232.330 - * @see org.netbeans.spi.project.ui.ProjectOpenedHook
232.331 - */
232.332 - private final class ProjectOpenedHookImpl extends ProjectOpenedHook {
232.333 -
232.334 - // TODO m
232.335 - ProjectOpenedHookImpl(Project project) {
232.336 - }
232.337 -
232.338 - protected void projectOpened() {
232.339 - try {
232.340 - // Check up on build scripts.
232.341 - genFilesHelper.refreshBuildScript(
232.342 - GeneratedFilesHelper.BUILD_IMPL_XML_PATH,
232.343 - XsltproProject.class.getResource("resources/build-impl.xsl"),
232.344 - true);
232.345 - genFilesHelper.refreshBuildScript(
232.346 - getBuildXmlName(),
232.347 - XsltproProject.class.getResource("resources/build.xsl"),
232.348 - true);
232.349 - } catch (IOException e) {
232.350 - ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
232.351 - }
232.352 -
232.353 - // Make it easier to run headless builds on the same machine at least.
232.354 - ProjectManager.mutex().writeAccess(new Mutex.Action() {
232.355 - public Object run() {
232.356 - EditableProperties ep = helper.getProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH);
232.357 - ep.setProperty("netbeans.user", System.getProperty("netbeans.user"));
232.358 -
232.359 - File f = InstalledFileLocator.getDefault().locate(MODULE_INSTALL_NAME, MODULE_INSTALL_CBN, false);
232.360 - if (f != null) {
232.361 - ep.setProperty(MODULE_INSTALL_DIR, f.getParentFile().getPath());
232.362 - }
232.363 -
232.364 - helper.putProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH, ep);
232.365 - try {
232.366 - ProjectManager.getDefault().saveProject(XsltproProject.this);
232.367 - } catch (IOException e) {
232.368 - ErrorManager.getDefault().notify(e);
232.369 - }
232.370 - return null;
232.371 - }
232.372 - });
232.373 - if (IcanproLogicalViewProvider.hasBrokenLinks(helper, refHelper)) {
232.374 - BrokenReferencesSupport.showAlert();
232.375 - }
232.376 - }
232.377 -
232.378 - protected void projectClosed() {
232.379 - // Probably unnecessary, but just in case:
232.380 - try {
232.381 - ProjectManager.getDefault().saveProject(XsltproProject.this);
232.382 - } catch (IOException e) {
232.383 - ErrorManager.getDefault().notify(e);
232.384 - }
232.385 - }
232.386 -
232.387 - }
232.388 -
232.389 - /**
232.390 - * Exports the main JAR as an official build product for use from other scripts.
232.391 - * The type of the artifact will be {@link AntArtifact#TYPE_JAR}.
232.392 - *
232.393 - * @see org.netbeans.spi.project.ant.AntArtifactProvider
232.394 - */
232.395 - private final class AntArtifactProviderImpl implements AntArtifactProvider {
232.396 -
232.397 - public AntArtifact[] getBuildArtifacts() {
232.398 - return new AntArtifact[] {
232.399 - helper.createSimpleAntArtifact(XsltproProject.ARTIFACT_TYPE_JBI_ASA + ":" +
232.400 - helper.getStandardPropertyEvaluator().getProperty(JBI_SETYPE_PREFIX),
232.401 - SE_DEPLOYMENT_JAR,
232.402 - helper.getStandardPropertyEvaluator(), "dist_se", "clean"), // NOI18N
232.403 - };
232.404 - }
232.405 -
232.406 - }
232.407 -
232.408 - /**
232.409 - * @see org.netbeans.spi.project.ui.RecommendedTemplates
232.410 - * @see org.netbeans.spi.project.ui.PrivilegedTemplates
232.411 - */
232.412 - private static final class RecommendedTemplatesImpl implements RecommendedTemplates, PrivilegedTemplates {
232.413 -
232.414 - // List of primarily supported templates
232.415 -
232.416 - private static final String[] TYPES = new String[] {
232.417 - /*
232.418 - "java-classes", // NOI18N
232.419 - "ejb-types", // NOI18N
232.420 - "java-beans", // NOI18N
232.421 - "oasis-XML-catalogs", // NOI18N
232.422 - "XML", // NOI18N
232.423 - "ant-script", // NOI18N
232.424 - "ant-task", // NOI18N
232.425 - "simple-files" // NOI18N
232.426 - */
232.427 - "XML", // NOI18N
232.428 - "simple-files" // NOI18N
232.429 - };
232.430 -
232.431 - private static final String[] PRIVILEGED_NAMES = new String[] {
232.432 -// "Templates/XML/XSLTDocument.xsl", // NOI18N
232.433 - "Templates/SOA/xsl.xsl", // NOI18N
232.434 -// "Templates/XML/stylesheet.xsl",// NOI18N
232.435 -// "Templates/XML/schema.xsd", // NOI18N
232.436 -// "Templates/XML/WSDL.wsdl", // NOI18N
232.437 -// "Templates/ICAN/schema.xsd",
232.438 -// "Templates/ICAN/untitled.wsdl"
232.439 - /*
232.440 - "Templates/J2EE/Session", // NOI18N
232.441 - "Templates/J2EE/RelatedCMP", // NOI18N
232.442 - "Templates/J2EE/Entity", // NOI18N
232.443 - "Templates/J2EE/Message", //NOI18N
232.444 - "Templates/J2EE/WebService", // NOI18N
232.445 - "Templates/Classes/Class.java" // NOI18N
232.446 - */
232.447 - };
232.448 -
232.449 - public String[] getRecommendedTypes() {
232.450 - return TYPES;
232.451 - }
232.452 -
232.453 - public String[] getPrivilegedTemplates() {
232.454 - return PRIVILEGED_NAMES;
232.455 - }
232.456 -
232.457 - }
232.458 -
232.459 - public XsltproProjectProperties getProjectProperties() {
232.460 - return new XsltproProjectProperties(this, helper, refHelper);
232.461 - }
232.462 -}
233.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/XsltproProjectGenerator.java Wed Feb 21 08:53:38 2007 +0000
233.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
233.3 @@ -1,226 +0,0 @@
233.4 -/*
233.5 - * The contents of this file are subject to the terms of the Common Development
233.6 - * and Distribution License (the License). You may not use this file except in
233.7 - * compliance with the License.
233.8 - *
233.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
233.10 - * or http://www.netbeans.org/cddl.txt.
233.11 -
233.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
233.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
233.14 - * If applicable, add the following below the CDDL Header, with the fields
233.15 - * enclosed by brackets [] replaced by your own identifying information:
233.16 - * "Portions Copyrighted [year] [name of copyright owner]"
233.17 - *
233.18 - * The Original Software is NetBeans. The Initial Developer of the Original
233.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
233.20 - * Microsystems, Inc. All Rights Reserved.
233.21 - */
233.22 -package org.netbeans.modules.xslt.project;
233.23 -
233.24 -import java.io.File;
233.25 -import java.io.IOException;
233.26 -import org.netbeans.api.project.Project;
233.27 -import org.netbeans.api.project.ProjectManager;
233.28 -//import org.netbeans.modules.bpel.project.ui.customizer.IcanproProjectProperties;
233.29 -import static org.netbeans.modules.xslt.project.XsltproConstants.*;
233.30 -
233.31 -import org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment;
233.32 -import org.netbeans.spi.project.support.ant.AntProjectHelper;
233.33 -import org.netbeans.spi.project.support.ant.EditableProperties;
233.34 -import org.netbeans.spi.project.support.ant.GeneratedFilesHelper;
233.35 -import org.netbeans.spi.project.support.ant.ProjectGenerator;
233.36 -import org.openide.filesystems.FileObject;
233.37 -import org.openide.filesystems.FileUtil;
233.38 -import org.openide.filesystems.Repository;
233.39 -import org.w3c.dom.Document;
233.40 -import org.w3c.dom.Element;
233.41 -
233.42 -/**
233.43 - *
233.44 - * @author Vitaly Bychkov
233.45 - * @version 1.0
233.46 - */
233.47 -public class XsltproProjectGenerator {
233.48 -
233.49 - private static final String DEFAULT_DOC_BASE_FOLDER = "conf"; //NOI18N
233.50 - private static final String DEFAULT_SRC_FOLDER = "src"; //NOI18N
233.51 - private static final String DEFAULT_RESOURCE_FOLDER = "setup"; //NOI18N
233.52 - private static final String DEFAULT_BPELASA_FOLDER = "bpelasa"; //NOI18N
233.53 - private static final String DEFAULT_BUILD_DIR = "build"; //NOI18N
233.54 - private static final String DEFAULT_NBPROJECT_DIR = "nbproject"; // NOI18N
233.55 -
233.56 - private XsltproProjectGenerator() {
233.57 - }
233.58 -
233.59 - /**
233.60 - * Create a new empty J2SE project.
233.61 - * @param dir the top-level directory (need not yet exist but if it does it must be empty)
233.62 - * @param name the code name for the project
233.63 - * @return the helper object permitting it to be further customized
233.64 - * @throws IOException in case something went wrong
233.65 - */
233.66 - public static AntProjectHelper createProject(File dir, String name, String j2eeLevel) throws IOException {
233.67 - dir.mkdirs();
233.68 - // XXX clumsy way to refresh, but otherwise it doesn't work for new folders
233.69 - File rootF = dir;
233.70 - while (rootF.getParentFile() != null) {
233.71 - rootF = rootF.getParentFile();
233.72 - }
233.73 - FileObject fo = FileUtil.toFileObject (rootF);
233.74 - assert fo != null : "At least disk roots must be mounted! " + rootF;
233.75 - fo.getFileSystem().refresh(false);
233.76 - fo = FileUtil.toFileObject (dir);
233.77 - assert fo != null : "No such dir on disk: " + dir;
233.78 - assert fo.isFolder() : "Not really a dir: " + dir;
233.79 - assert fo.getChildren().length == 0 : "Dir must have been empty: " + dir;
233.80 - AntProjectHelper h = setupProject (fo, name, j2eeLevel);
233.81 - FileObject srcRoot = fo.createFolder(DEFAULT_SRC_FOLDER); // NOI18N
233.82 -// Bing bpelasa FileObject bpelasaRoot = srcRoot.createFolder(DEFAULT_BPELASA_FOLDER); //NOI18N
233.83 -
233.84 -// TODO a
233.85 -// FileObject bpelasaRoot = srcRoot;
233.86 -// FileObject xsltmapFile = FileUtil.copyFile(Repository.getDefault().getDefaultFileSystem().findResource("org-netbeans-xsltpro/xsltmap.xml"), bpelasaRoot, "xsltmap"); //NOI18N
233.87 -
233.88 -// TODO a
233.89 - FileObject nbProjectRoot = FileUtil.toFileObject(new File(dir, DEFAULT_NBPROJECT_DIR)); // NOI18N
233.90 - FileObject genPortmap = Repository.getDefault().getDefaultFileSystem().findResource("org-netbeans-xsltpro/genPortmap.xsl");
233.91 -// System.out.println("genPortmap: "+genPortmap);
233.92 - if (genPortmap != null) {
233.93 - FileObject genPortmapFile = FileUtil.copyFile(Repository.getDefault().getDefaultFileSystem().findResource("org-netbeans-xsltpro/genPortmap.xsl"), nbProjectRoot, "genPortmap"); //NOI18N
233.94 - }
233.95 -
233.96 - EditableProperties ep = h.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);
233.97 - ep.put (SOURCE_ROOT, DEFAULT_SRC_FOLDER); //NOI18N
233.98 - ep.setProperty(META_INF, "${"+SOURCE_ROOT+"}/"+DEFAULT_DOC_BASE_FOLDER); //NOI18N
233.99 -// Bing bpelasa ep.setProperty(SRC_DIR, "${"+SOURCE_ROOT+"}/"+DEFAULT_BPELASA_FOLDER); //NOI18N
233.100 - ep.setProperty(SRC_DIR, "${"+SOURCE_ROOT+"}"); //NOI18N
233.101 - ep.setProperty(RESOURCE_DIR, DEFAULT_RESOURCE_FOLDER);
233.102 - h.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, ep);
233.103 -
233.104 - Project p = ProjectManager.getDefault().findProject(h.getProjectDirectory ());
233.105 - ProjectManager.getDefault().saveProject(p);
233.106 -
233.107 - return h;
233.108 - }
233.109 -
233.110 - public static AntProjectHelper importProject (File dir, String name, FileObject wmFO, FileObject javaRoot, FileObject configFilesBase, String j2eeLevel, String buildfile) throws IOException {
233.111 - dir.mkdirs();
233.112 - // XXX clumsy way to refresh, but otherwise it doesn't work for new folders
233.113 - File rootF = dir;
233.114 - while (rootF.getParentFile() != null) {
233.115 - rootF = rootF.getParentFile();
233.116 - }
233.117 - // XXX add code to set meta inf directory (meta-inf and java src)
233.118 - FileObject fo = FileUtil.toFileObject (rootF);
233.119 - assert fo != null : "At least disk roots must be mounted! " + rootF;
233.120 - fo.getFileSystem().refresh(false);
233.121 - fo = FileUtil.toFileObject (dir);
233.122 - assert fo != null : "No such dir on disk: " + dir;
233.123 - assert fo.isFolder() : "Not really a dir: " + dir;
233.124 - AntProjectHelper h = setupProject (fo, name, j2eeLevel);
233.125 - EditableProperties ep = h.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);
233.126 - if (FileUtil.isParentOf (fo, wmFO) || fo.equals (wmFO)) {
233.127 - ep.put (SOURCE_ROOT, "."); //NOI18N
233.128 - ep.setProperty(SRC_DIR, relativePath (fo, javaRoot)); //NOI18N
233.129 - ep.setProperty(META_INF, relativePath (fo, configFilesBase)); //NOI18N
233.130 - } else {
233.131 - File wmRoot = FileUtil.toFile (wmFO);
233.132 - ep.put (SOURCE_ROOT, wmRoot.getAbsolutePath ());
233.133 - String configFilesPath = relativePath (wmFO, configFilesBase);
233.134 - configFilesPath = configFilesPath.length () > 0 ? "${"+SOURCE_ROOT+"}/" + configFilesPath : "${"+SOURCE_ROOT+"}"; //NOI18N
233.135 - String javaPath = relativePath (wmFO, javaRoot);
233.136 - javaPath = javaPath.length () > 0 ? "${"+SOURCE_ROOT+"}/" + javaPath : "${"+SOURCE_ROOT+"}"; //NOI18N
233.137 - ep.setProperty(SRC_DIR, javaPath);
233.138 - ep.setProperty(META_INF, configFilesPath);
233.139 - }
233.140 - if (! GeneratedFilesHelper.BUILD_XML_PATH.equals (buildfile)) {
233.141 - ep.setProperty (BUILD_FILE, buildfile);
233.142 - }
233.143 - h.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, ep);
233.144 -
233.145 - Project p = ProjectManager.getDefault().findProject(h.getProjectDirectory ());
233.146 - ProjectManager.getDefault().saveProject(p);
233.147 -
233.148 - return h;
233.149 - }
233.150 -
233.151 - private static String relativePath (FileObject parent, FileObject child) {
233.152 - if (child.equals (parent))
233.153 - return "";
233.154 - if (!FileUtil.isParentOf (parent, child))
233.155 - throw new IllegalArgumentException ("Cannot find relative path, " + parent + " is not parent of " + child);
233.156 - return child.getPath ().substring (parent.getPath ().length () + 1);
233.157 - }
233.158 -
233.159 - private static AntProjectHelper setupProject (FileObject dirFO, String name, String j2eeLevel) throws IOException {
233.160 - AntProjectHelper h = ProjectGenerator.createProject(dirFO, XsltproProjectType.TYPE);
233.161 - Element data = h.getPrimaryConfigurationData(true);
233.162 - Document doc = data.getOwnerDocument();
233.163 - Element nameEl = doc.createElementNS(XsltproProjectType.PROJECT_CONFIGURATION_NAMESPACE, "name"); // NOI18N
233.164 - nameEl.appendChild(doc.createTextNode(name));
233.165 - data.appendChild(nameEl);
233.166 - Element minant = doc.createElementNS(XsltproProjectType.PROJECT_CONFIGURATION_NAMESPACE, "minimum-ant-version"); // NOI18N
233.167 - minant.appendChild(doc.createTextNode("1.6")); // NOI18N
233.168 - data.appendChild(minant);
233.169 - h.putPrimaryConfigurationData(data, true);
233.170 -
233.171 - EditableProperties ep = h.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);
233.172 - // ep.setProperty(JAVAC_CLASSPATH, "${libs.j2ee14.classpath}");
233.173 - ep.setProperty(DIST_DIR, "dist");
233.174 - ep.setProperty(DIST_JAR, "${"+DIST_DIR+"}/" + name + ".zip");
233.175 - ep.setProperty(J2EE_PLATFORM, j2eeLevel);
233.176 - ep.setProperty(JAR_NAME, name + ".jar");
233.177 - ep.setProperty(JAR_COMPRESS, "false");
233.178 -// ep.setProperty(JAR_CONTENT_ADDITIONAL, "");
233.179 -
233.180 - Deployment deployment = Deployment.getDefault ();
233.181 - String serverInstanceID = deployment.getDefaultServerInstanceID ();
233.182 - ep.setProperty(J2EE_SERVER_TYPE, deployment.getServerID (serverInstanceID));
233.183 - ep.setProperty(JAVAC_SOURCE, "1.4");
233.184 - ep.setProperty(JAVAC_DEBUG, "true");
233.185 - ep.setProperty(JAVAC_DEPRECATION, "false");
233.186 -// todo r
233.187 - ep.setProperty(VALIDATION_FLAG, "false");
233.188 -
233.189 - ep.setProperty(JAVAC_TARGET, "1.4");
233.190 -
233.191 -
233.192 - ep.setProperty(BUILD_DIR, DEFAULT_BUILD_DIR);
233.193 - ep.setProperty(BUILD_GENERATED_DIR, "${"+BUILD_DIR+"}/generated");
233.194 - ep.setProperty(BUILD_CLASSES_DIR, "${"+BUILD_DIR+"}/jar");
233.195 - ep.setProperty(BUILD_CLASSES_EXCLUDES, "**/*.java,**/*.form,**/.nbattrs");
233.196 - ep.setProperty(DIST_JAVADOC_DIR, "${"+DIST_DIR+"}/javadoc");
233.197 - ep.setProperty(JAVA_PLATFORM, "default_platform");
233.198 - ep.setProperty(DEBUG_CLASSPATH, "${"+JAVAC_CLASSPATH+"}:${"+BUILD_CLASSES_DIR+"}");
233.199 -
233.200 - //============= Start of IcanPro========================================//
233.201 - ep.setProperty(JBI_SETYPE_PREFIX, "com.sun.xsltse"); // NOI18N
233.202 - ep.setProperty(ASSEMBLY_UNIT_ALIAS, "This Assembly Unit"); // NOI18N
233.203 - ep.setProperty(ASSEMBLY_UNIT_DESCRIPTION, "Represents this Assembly Unit"); // NOI18N
233.204 - ep.setProperty(APPLICATION_SUB_ASSEMBLY_ALIAS, "This Application Sub-Assembly"); // NOI18N
233.205 - ep.setProperty(APPLICATION_SUB_ASSEMBLY_DESCRIPTION, "This represents the Application Sub-Assembly"); // NOI18N
233.206 - ep.setProperty(JBI_COMPONENT_CONF_ROOT, "nbproject/private"); // NOI18N
233.207 - ep.setProperty(JBI_DEPLOYMENT_CONF_ROOT, "nbproject/deployment"); // NOI18N
233.208 -
233.209 - ep.setProperty(BC_DEPLOYMENT_JAR, "${"+BUILD_DIR+"}/" + "BCDeployment.jar");
233.210 - ep.setProperty(SE_DEPLOYMENT_JAR, "${"+BUILD_DIR+"}/" + "SEDeployment.jar");
233.211 - //============= End of IcanPro========================================//
233.212 -
233.213 - h.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, ep);
233.214 -
233.215 - ep = h.getProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH);
233.216 - ep.setProperty(J2EE_SERVER_INSTANCE, serverInstanceID);
233.217 - //============= Start of IcanPro========================================//
233.218 - ep.setProperty(JBI_COMPONENT_CONF_FILE, "ComponentInformation.xml"); // NOI18N
233.219 - ep.setProperty(JBI_DEPLOYMENT_CONF_FILE, "default.xml"); // NOI18N
233.220 - //============= End of IcanPro========================================//
233.221 -
233.222 - h.putProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH, ep);
233.223 - Project p = ProjectManager.getDefault().findProject(dirFO);
233.224 - ProjectManager.getDefault().saveProject(p);
233.225 - return h;
233.226 - }
233.227 -
233.228 -
233.229 -}
234.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/XsltproProjectType.java Wed Feb 21 08:53:38 2007 +0000
234.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
234.3 @@ -1,61 +0,0 @@
234.4 -/*
234.5 - * The contents of this file are subject to the terms of the Common Development
234.6 - * and Distribution License (the License). You may not use this file except in
234.7 - * compliance with the License.
234.8 - *
234.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
234.10 - * or http://www.netbeans.org/cddl.txt.
234.11 -
234.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
234.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
234.14 - * If applicable, add the following below the CDDL Header, with the fields
234.15 - * enclosed by brackets [] replaced by your own identifying information:
234.16 - * "Portions Copyrighted [year] [name of copyright owner]"
234.17 - *
234.18 - * The Original Software is NetBeans. The Initial Developer of the Original
234.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
234.20 - * Microsystems, Inc. All Rights Reserved.
234.21 - */
234.22 -package org.netbeans.modules.xslt.project;
234.23 -
234.24 -import java.io.IOException;
234.25 -import org.netbeans.api.project.Project;
234.26 -import org.netbeans.spi.project.support.ant.AntBasedProjectType;
234.27 -import org.netbeans.spi.project.support.ant.AntProjectHelper;
234.28 -
234.29 -/**
234.30 - * Factory for EJB Module projects
234.31 - * @author Chris Webster
234.32 - * @author Vitaly Bychkov
234.33 - * @version 1.0
234.34 - */
234.35 -public class XsltproProjectType implements AntBasedProjectType {
234.36 - public static final String TYPE = "org.netbeans.modules.xslt.project";
234.37 - public static final String PROJECT_CONFIGURATION_NAME = "data";
234.38 - public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-xsltpro/1";
234.39 - public static final String PRIVATE_CONFIGURATION_NAME = "data";
234.40 - public static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-xsltpro-private/1";
234.41 -
234.42 - public XsltproProjectType() {
234.43 - }
234.44 -
234.45 - public String getType() {
234.46 - return TYPE;
234.47 - }
234.48 -
234.49 - public Project createProject(AntProjectHelper helper) throws IOException {
234.50 - if (helper == null) {
234.51 - throw new IllegalArgumentException("AntProjectHelper shouldn't be null");
234.52 - }
234.53 - return new XsltproProject(helper);
234.54 - }
234.55 -
234.56 - public String getPrimaryConfigurationDataElementName(boolean shared) {
234.57 - return shared ? PROJECT_CONFIGURATION_NAME : PRIVATE_CONFIGURATION_NAME;
234.58 - }
234.59 -
234.60 - public String getPrimaryConfigurationDataElementNamespace(boolean shared) {
234.61 - return shared ? PROJECT_CONFIGURATION_NAMESPACE : PRIVATE_CONFIGURATION_NAMESPACE;
234.62 - }
234.63 -
234.64 -}
235.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/nodes/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
235.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
235.3 @@ -1,21 +0,0 @@
235.4 -# The contents of this file are subject to the terms of the Common Development
235.5 -# and Distribution License (the License). You may not use this file except in
235.6 -# compliance with the License.
235.7 -#
235.8 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
235.9 -# or http://www.netbeans.org/cddl.txt.
235.10 -
235.11 -# When distributing Covered Code, include this CDDL Header Notice in each file
235.12 -# and include the License file at http://www.netbeans.org/cddl.txt.
235.13 -# If applicable, add the following below the CDDL Header, with the fields
235.14 -# enclosed by brackets [] replaced by your own identifying information:
235.15 -# "Portions Copyrighted [year] [name of copyright owner]"
235.16 -#
235.17 -# The Original Software is NetBeans. The Initial Developer of the Original
235.18 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
235.19 -# Microsystems, Inc. All Rights Reserved.
235.20 -
235.21 -# IcanproViews
235.22 -LBL_ProcessFiles=Xslt Files
235.23 -
235.24 -LBL_Transformations=Transformations
236.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/nodes/IcanproViews.java Wed Feb 21 08:53:38 2007 +0000
236.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
236.3 @@ -1,391 +0,0 @@
236.4 -/*
236.5 - * The contents of this file are subject to the terms of the Common Development
236.6 - * and Distribution License (the License). You may not use this file except in
236.7 - * compliance with the License.
236.8 - *
236.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
236.10 - * or http://www.netbeans.org/cddl.txt.
236.11 -
236.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
236.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
236.14 - * If applicable, add the following below the CDDL Header, with the fields
236.15 - * enclosed by brackets [] replaced by your own identifying information:
236.16 - * "Portions Copyrighted [year] [name of copyright owner]"
236.17 - *
236.18 - * The Original Software is NetBeans. The Initial Developer of the Original
236.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
236.20 - * Microsystems, Inc. All Rights Reserved.
236.21 - */
236.22 -package org.netbeans.modules.xslt.project.nodes;
236.23 -
236.24 -
236.25 -import java.util.ArrayList;
236.26 -import java.util.Collections;
236.27 -import java.util.List;
236.28 -import javax.swing.Action;
236.29 -import org.netbeans.modules.xslt.project.XsltproConstants;
236.30 -import org.netbeans.modules.xslt.project.wizard.element.Util;
236.31 -import org.netbeans.spi.project.ui.support.CommonProjectActions;
236.32 -
236.33 -import org.openide.filesystems.FileObject;
236.34 -import org.openide.loaders.DataFolder;
236.35 -import org.openide.loaders.DataObjectNotFoundException;
236.36 -import org.openide.nodes.Children;
236.37 -import org.openide.nodes.FilterNode;
236.38 -import org.openide.nodes.Node;
236.39 -import org.openide.util.NbBundle;
236.40 -
236.41 -import org.netbeans.spi.project.support.ant.AntProjectHelper;
236.42 -import org.netbeans.spi.project.support.ant.PropertyEvaluator;
236.43 -
236.44 -//import org.netbeans.modules.bpel.project.ui.customizer.IcanproProjectProperties;
236.45 -import static org.netbeans.modules.xslt.project.XsltproConstants.*;
236.46 -import org.openide.filesystems.FileChangeListener;
236.47 -import org.openide.loaders.DataObject;
236.48 -import java.util.logging.Logger;
236.49 -import javax.swing.event.ChangeEvent;
236.50 -import javax.swing.event.ChangeListener;
236.51 -import javax.swing.event.EventListenerList;
236.52 -import org.netbeans.api.project.FileOwnerQuery;
236.53 -import org.netbeans.api.project.Project;
236.54 -import org.netbeans.api.project.ProjectUtils;
236.55 -import org.netbeans.api.project.SourceGroup;
236.56 -import org.netbeans.api.project.Sources;
236.57 -import org.netbeans.api.queries.VisibilityQuery;
236.58 -import org.openide.loaders.ChangeableDataFilter;
236.59 -import org.openide.loaders.DataFilter;
236.60 -
236.61 -/**
236.62 - *
236.63 - * @author Vitaly Bychkov
236.64 - * @version 1.0
236.65 - */
236.66 -public class IcanproViews {
236.67 - private static Logger logger = Logger.getLogger(IcanproViews.class.getName());
236.68 -
236.69 - private static final DataFilter NO_FOLDERS_FILTER = new NoFoldersDataFilter();
236.70 -
236.71 - private IcanproViews() {
236.72 - }
236.73 -
236.74 - public static final class LogicalViewChildren extends Children.Keys implements FileChangeListener {
236.75 -
236.76 - private static final String KEY_SOURCE_DIR = "srcDir"; // NOI18N
236.77 - private static final String KEY_DOC_BASE = "docBase"; //NOI18N
236.78 - private static final String KEY_EJBS = "ejbKey"; //NOI18N
236.79 - private static final String WEBSERVICES_DIR = "webservicesDir"; // NOI18N
236.80 - private static final String XSLT_TRANSFORM_NODE_KEY = "xsltTransformNodeKey"; // NOI18N
236.81 - private static final String KEY_SETUP_DIR = "setupDir"; //NOI18N
236.82 -
236.83 - private AntProjectHelper helper;
236.84 - private final PropertyEvaluator evaluator;
236.85 - private FileObject projectDir;
236.86 - private Project project;
236.87 -
236.88 - public LogicalViewChildren(AntProjectHelper helper, PropertyEvaluator evaluator, Project project) {
236.89 - assert helper != null;
236.90 - this.helper = helper;
236.91 - projectDir = helper.getProjectDirectory();
236.92 - this.evaluator = evaluator;
236.93 - this.project = project;
236.94 - }
236.95 -
236.96 - protected void addNotify() {
236.97 - super.addNotify();
236.98 - projectDir.addFileChangeListener(this);
236.99 - projectDir.getFileObject("src").addFileChangeListener(this);
236.100 - createNodes();
236.101 - }
236.102 -
236.103 - public void reload() {
236.104 - createNodes();
236.105 - }
236.106 -
236.107 - private void createNodes() {
236.108 - List<Object> l = new ArrayList<Object>();
236.109 - /*
236.110 - l.add(KEY_EJBS);
236.111 - */
236.112 -
236.113 - DataFolder docBaseDir = getFolder(META_INF);
236.114 - if (docBaseDir != null) {
236.115 - /*
236.116 - l.add(KEY_DOC_BASE);
236.117 - */
236.118 - }
236.119 -
236.120 - DataFolder srcDir = getFolder(SRC_DIR);
236.121 - if (srcDir != null) {
236.122 - l.add(KEY_SOURCE_DIR);
236.123 - }
236.124 -
236.125 - FileObject setupFolder = getSetupFolder();
236.126 - if (setupFolder != null && setupFolder.isFolder()) {
236.127 - l.add(KEY_SETUP_DIR);
236.128 - }
236.129 -/*
236.130 - l.add(WEBSERVICES_DIR);
236.131 - */
236.132 -// TODO r
236.133 -// l.add(XSLT_TRANSFORM_NODE_KEY);
236.134 -
236.135 - FileObject xsltMapFo = getXsltmapFO();
236.136 - if (xsltMapFo != null) {
236.137 - l.add(XSLT_TRANSFORM_NODE_KEY);
236.138 - }
236.139 -
236.140 - if (l.size() > 0) {
236.141 - setKeys(l);
236.142 - }
236.143 -
236.144 - }
236.145 -
236.146 - private FileObject getSetupFolder() {
236.147 - return projectDir.getFileObject("setup"); //NOI18N
236.148 - }
236.149 -
236.150 - protected void removeNotify() {
236.151 - setKeys(Collections.EMPTY_SET);
236.152 - projectDir.removeFileChangeListener(this);
236.153 - // todo m
236.154 - projectDir.getFileObject("src").removeFileChangeListener(this);
236.155 - super.removeNotify();
236.156 - }
236.157 -
236.158 - protected Node[] createNodes(Object key) {
236.159 - List<Node> nodes = new ArrayList<Node>();
236.160 - Node n = null;
236.161 -
236.162 - if (key == KEY_SOURCE_DIR) {
236.163 - FileObject srcRoot = helper.resolveFileObject(evaluator.getProperty(SRC_DIR));
236.164 - Project p = FileOwnerQuery.getOwner(srcRoot);
236.165 - Sources s = ProjectUtils.getSources(p);
236.166 - SourceGroup sgs [] = ProjectUtils.getSources(p).getSourceGroups(XsltproConstants.SOURCES_TYPE_ICANPRO);
236.167 - for (int i = 0; i < sgs.length; i++) {
236.168 - if (sgs [i].contains(srcRoot)) {
236.169 - // TODO r
236.170 -// xsltmapFile = srcRoot.getFileObject("xsltmap.xml");
236.171 -
236.172 - try {
236.173 - FileObject folder = sgs[i].getRootFolder();
236.174 - DataObject dobj = DataObject.find(folder);
236.175 - n = new RootNode(dobj.getNodeDelegate(), (DataFolder) dobj);
236.176 - } catch (DataObjectNotFoundException ex) {
236.177 - }
236.178 - break;
236.179 - }
236.180 - }
236.181 - } else if (key == XSLT_TRANSFORM_NODE_KEY) {
236.182 - FileObject xsltmapFile = getXsltmapFO();
236.183 - if (xsltmapFile != null) {
236.184 - Project project = FileOwnerQuery.getOwner(xsltmapFile);
236.185 - if (project != null ) {
236.186 - Children children = new TransformationsChildren(project);
236.187 -
236.188 - DataObject dObj;
236.189 - try {
236.190 - dObj = DataObject.find(xsltmapFile);
236.191 - if (dObj != null) {
236.192 - nodes.add(new XsltTransformationsNode(dObj, children));
236.193 - }
236.194 - } catch (DataObjectNotFoundException ex) {
236.195 -// System.out.println("can't find xsltmap assoc dataobject ");
236.196 - }
236.197 - }
236.198 - }
236.199 - }
236.200 -
236.201 - if (n != null) {
236.202 - nodes.add(n);
236.203 - }
236.204 -// if (p != null && xsltmapFile != null) {
236.205 -// Children children = new TransformationsChildren(p);
236.206 -//// nodes.add(new XsltTransformationsNode(children));
236.207 -// DataObject dObj;
236.208 -//
236.209 -// try {
236.210 -// dObj = DataObject.find(xsltmapFile);
236.211 -// if (dObj != null) {
236.212 -// nodes.add(new XsltTransformationsNode2(dObj, children));
236.213 -// }
236.214 -// } catch (DataObjectNotFoundException ex) {
236.215 -// }
236.216 -// }
236.217 -
236.218 -
236.219 - return nodes.toArray(new Node[nodes.size()]);//n == null ? new Node[0] : new Node[] {n};
236.220 - }
236.221 -
236.222 - private FileObject getXsltmapFO() {
236.223 - DataFolder srcDir = getFolder(SRC_DIR);
236.224 - if (srcDir != null) {
236.225 - FileObject srcFO = srcDir.getPrimaryFile();
236.226 - if (srcFO == null) {
236.227 - return null;
236.228 - }
236.229 -
236.230 - // TODO m
236.231 - return srcFO.getFileObject("xsltmap.xml");
236.232 - }
236.233 - return null;
236.234 - }
236.235 -
236.236 - private DataFolder getFolder(String propName) {
236.237 - String propertyValue = evaluator.getProperty(propName);
236.238 - if (propertyValue != null ) {
236.239 - FileObject fo = helper.resolveFileObject(evaluator.getProperty(propName));
236.240 - if ( fo != null && fo.isValid()) {
236.241 - try {
236.242 - DataFolder df = DataFolder.findFolder(fo);
236.243 - return df;
236.244 - }catch (Exception ex) {
236.245 - logger.fine(ex.getMessage());
236.246 - }
236.247 - }
236.248 - }
236.249 - return null;
236.250 - }
236.251 -
236.252 - // file change events in the project directory
236.253 - public void fileAttributeChanged(org.openide.filesystems.FileAttributeEvent fe) {
236.254 - }
236.255 -
236.256 - public void fileChanged(org.openide.filesystems.FileEvent fe) {
236.257 - createNodes();
236.258 - }
236.259 -
236.260 - public void fileDataCreated(org.openide.filesystems.FileEvent fe) {
236.261 - }
236.262 -
236.263 - public void fileDeleted(org.openide.filesystems.FileEvent fe) {
236.264 -// if (!projectDir.isValid()){
236.265 -// org.netbeans.api.project.ui.OpenProjects.getDefault().close(new Project[] { project });
236.266 -// }
236.267 - createNodes();
236.268 - // TODO m
236.269 -// refreshKey(KEY_SOURCE_DIR);
236.270 - }
236.271 -
236.272 - public void fileFolderCreated(org.openide.filesystems.FileEvent fe) {
236.273 - // setup folder could be created
236.274 - createNodes();
236.275 - // TODO m
236.276 -// refreshKey(KEY_SOURCE_DIR);
236.277 - }
236.278 -
236.279 - public void fileRenamed(org.openide.filesystems.FileRenameEvent fe) {
236.280 - // setup folder could be renamed
236.281 - createNodes();
236.282 - // TODO m
236.283 -// refreshKey(KEY_SOURCE_DIR);
236.284 - }
236.285 - }
236.286 -
236.287 - private static final class RootNode extends FilterNode {
236.288 - public RootNode(Node n, DataFolder dataFolder) {
236.289 - super(n, dataFolder.createNodeChildren( NO_FOLDERS_FILTER));
236.290 - disableDelegation(DELEGATE_GET_DISPLAY_NAME|
236.291 - DELEGATE_SET_DISPLAY_NAME|DELEGATE_GET_SHORT_DESCRIPTION|
236.292 - DELEGATE_GET_ACTIONS);
236.293 - setDisplayName(
236.294 - NbBundle.getMessage(IcanproViews.class, "LBL_ProcessFiles"));
236.295 -
236.296 - }
236.297 -
236.298 - @Override
236.299 - public Action[] getActions(boolean context) {
236.300 - return new Action[] {
236.301 - CommonProjectActions.newFileAction(),
236.302 - null,
236.303 - org.openide.util.actions.SystemAction.get( org.openide.actions.FileSystemAction.class ),
236.304 - null,
236.305 - org.openide.util.actions.SystemAction.get( org.openide.actions.FindAction.class ),
236.306 - null,
236.307 - org.openide.util.actions.SystemAction.get( org.openide.actions.PasteAction.class ),
236.308 - null,
236.309 - org.openide.util.actions.SystemAction.get( org.openide.actions.ToolsAction.class ),
236.310 - };
236.311 - }
236.312 -
236.313 - public boolean canDestroy() {
236.314 - return false;
236.315 - }
236.316 -
236.317 - @Override
236.318 - public boolean canRename() {
236.319 - return false;
236.320 - }
236.321 -
236.322 - @Override
236.323 - public boolean canCopy() {
236.324 - return false;
236.325 - }
236.326 -
236.327 - @Override
236.328 - public boolean canCut() {
236.329 - return false;
236.330 - }
236.331 -
236.332 - }
236.333 -
236.334 - static final class NoFoldersDataFilter implements ChangeListener, ChangeableDataFilter {
236.335 -
236.336 - EventListenerList ell = new EventListenerList();
236.337 -
236.338 - public NoFoldersDataFilter() {
236.339 - VisibilityQuery.getDefault().addChangeListener( this );
236.340 - }
236.341 -
236.342 - // TODO m
236.343 - // doesn't show xsltmap file
236.344 - private boolean isXsltMapFile(FileObject fo) {
236.345 - if (fo == null) {
236.346 - return false;
236.347 - }
236.348 - Project project = FileOwnerQuery.getOwner(fo);
236.349 - FileObject srcFolder =null;
236.350 - if (project != null) {
236.351 - srcFolder = Util.getSrcFolder(project);
236.352 - }
236.353 -
236.354 - // TODO m
236.355 - return "xsltmap.xml".equals(fo.getNameExt())
236.356 - && srcFolder != null
236.357 - && srcFolder.equals(fo.getParent());
236.358 - }
236.359 -
236.360 - public boolean acceptDataObject(DataObject obj) {
236.361 - FileObject fo = obj.getPrimaryFile();
236.362 -
236.363 - // TODO r
236.364 - if (isXsltMapFile(fo)) {
236.365 - return false;
236.366 - }
236.367 -
236.368 - return VisibilityQuery.getDefault().isVisible( fo );
236.369 - }
236.370 -
236.371 - public void stateChanged( ChangeEvent e) {
236.372 - Object[] listeners = ell.getListenerList();
236.373 - ChangeEvent event = null;
236.374 - for (int i = listeners.length-2; i>=0; i-=2) {
236.375 - if (listeners[i] == ChangeListener.class) {
236.376 - if ( event == null) {
236.377 - event = new ChangeEvent( this );
236.378 - }
236.379 - ((ChangeListener)listeners[i+1]).stateChanged( event );
236.380 - }
236.381 - }
236.382 - }
236.383 -
236.384 - public void addChangeListener( ChangeListener listener ) {
236.385 - ell.add( ChangeListener.class, listener );
236.386 - }
236.387 -
236.388 - public void removeChangeListener( ChangeListener listener ) {
236.389 - ell.remove( ChangeListener.class, listener );
236.390 - }
236.391 -
236.392 - }
236.393 -
236.394 -}
237.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/nodes/TransformationDescNode.java Wed Feb 21 08:53:38 2007 +0000
237.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
237.3 @@ -1,94 +0,0 @@
237.4 -/*
237.5 - * The contents of this file are subject to the terms of the Common Development
237.6 - * and Distribution License (the License). You may not use this file except in
237.7 - * compliance with the License.
237.8 - *
237.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
237.10 - * or http://www.netbeans.org/cddl.txt.
237.11 -
237.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
237.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
237.14 - * If applicable, add the following below the CDDL Header, with the fields
237.15 - * enclosed by brackets [] replaced by your own identifying information:
237.16 - * "Portions Copyrighted [year] [name of copyright owner]"
237.17 - *
237.18 - * The Original Software is NetBeans. The Initial Developer of the Original
237.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
237.20 - * Microsystems, Inc. All Rights Reserved.
237.21 - */
237.22 -package org.netbeans.modules.xslt.project.nodes;
237.23 -
237.24 -import java.awt.Image;
237.25 -import org.netbeans.modules.xslt.core.xsltmap.TransformationDesc;
237.26 -import org.openide.nodes.AbstractNode;
237.27 -import org.openide.nodes.Children;
237.28 -import org.openide.util.Lookup;
237.29 -import org.openide.util.Utilities;
237.30 -
237.31 -/**
237.32 - *
237.33 - * @author Vitaly Bychkov
237.34 - * @version 1.0
237.35 - */
237.36 -public class TransformationDescNode extends AbstractNode {
237.37 - private TransformationDesc tDesc;
237.38 - private static Image ICON = Utilities.loadImage("org/netbeans/modules/xslt/project/resources/transformationDesc.png");
237.39 -
237.40 - public TransformationDescNode(TransformationDesc tDesc) {
237.41 - super(Children.LEAF);
237.42 - this.tDesc = tDesc;
237.43 - // set nodeDescription property which is shown in property sheet help region
237.44 - setValue("nodeDescription", "");
237.45 - }
237.46 -
237.47 - public TransformationDescNode(Lookup lookup) {
237.48 - super(Children.LEAF, lookup);
237.49 - }
237.50 -
237.51 - public String getDisplayName() {
237.52 - return getName();
237.53 - }
237.54 -
237.55 - public String getName() {
237.56 - String roleName = tDesc.getRoleName();
237.57 - String fileName = tDesc.getFile();
237.58 - fileName = fileName == null ? " [empty file name] " : fileName;
237.59 - roleName = roleName == null ? "" : roleName;
237.60 -
237.61 - return roleName + " {"+ fileName+"} ";
237.62 - }
237.63 -
237.64 - public String getShortDescription() {
237.65 - String roleName = tDesc.getRoleName();
237.66 - String fileName = tDesc.getFile();
237.67 - fileName = fileName == null ? " [empty file name] " : fileName;
237.68 - roleName = roleName == null ? "" : roleName;
237.69 - return "<html> <b>role</b> = "+roleName + "<br> <b>file</b> ="+ fileName;
237.70 -
237.71 - }
237.72 -
237.73 - public Image getIcon(int type) {
237.74 - return ICON;
237.75 - }
237.76 -
237.77 - public Image getOpenedIcon(int type) {
237.78 - return ICON;
237.79 - }
237.80 -
237.81 - public boolean canCopy() {
237.82 - return false;
237.83 - }
237.84 -
237.85 - public boolean canCut() {
237.86 - return false;
237.87 - }
237.88 -
237.89 - public boolean canDestroy() {
237.90 - return false;
237.91 - }
237.92 -
237.93 - public boolean canRename() {
237.94 - return false;
237.95 - }
237.96 -
237.97 -}
238.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/nodes/TransformationsChildren.java Wed Feb 21 08:53:38 2007 +0000
238.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
238.3 @@ -1,123 +0,0 @@
238.4 -/*
238.5 - * The contents of this file are subject to the terms of the Common Development
238.6 - * and Distribution License (the License). You may not use this file except in
238.7 - * compliance with the License.
238.8 - *
238.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
238.10 - * or http://www.netbeans.org/cddl.txt.
238.11 -
238.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
238.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
238.14 - * If applicable, add the following below the CDDL Header, with the fields
238.15 - * enclosed by brackets [] replaced by your own identifying information:
238.16 - * "Portions Copyrighted [year] [name of copyright owner]"
238.17 - *
238.18 - * The Original Software is NetBeans. The Initial Developer of the Original
238.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
238.20 - * Microsystems, Inc. All Rights Reserved.
238.21 - */
238.22 -package org.netbeans.modules.xslt.project.nodes;
238.23 -
238.24 -import java.io.IOException;
238.25 -import java.util.ArrayList;
238.26 -import java.util.Collection;
238.27 -import java.util.Collections;
238.28 -import java.util.List;
238.29 -import org.netbeans.api.project.Project;
238.30 -import org.netbeans.modules.xslt.core.xsltmap.TransformationDesc;
238.31 -import org.netbeans.modules.xslt.core.xsltmap.TransformationUC;
238.32 -import org.netbeans.modules.xslt.core.xsltmap.XsltMapModel;
238.33 -import org.openide.ErrorManager;
238.34 -import org.openide.filesystems.FileAttributeEvent;
238.35 -import org.openide.filesystems.FileChangeListener;
238.36 -import org.openide.filesystems.FileEvent;
238.37 -import org.openide.filesystems.FileObject;
238.38 -import org.openide.filesystems.FileRenameEvent;
238.39 -import org.openide.nodes.Children;
238.40 -import org.openide.nodes.Node;
238.41 -
238.42 -/**
238.43 - *
238.44 - * @author Vitaly Bychkov
238.45 - * @version 1.0
238.46 - */
238.47 -public class TransformationsChildren extends Children.Keys implements FileChangeListener {
238.48 - private FileObject projectDir;
238.49 - private Project project;
238.50 -
238.51 - public TransformationsChildren(Project project) {
238.52 - super();
238.53 - this.project = project;
238.54 - this.projectDir = project.getProjectDirectory();
238.55 - }
238.56 -
238.57 - protected Node[] createNodes(Object key) {
238.58 - List<Node> nodes = new ArrayList<Node>();
238.59 - if (key instanceof TransformationUC) {
238.60 - List<TransformationDesc> descs = ((TransformationUC)key).getTransformationDescs();
238.61 - if (descs != null) {
238.62 - for (TransformationDesc elem : descs) {
238.63 - nodes.add(new TransformationDescNode(elem));
238.64 - }
238.65 - }
238.66 - } else if (key instanceof TransformationDesc) {
238.67 - nodes.add(new TransformationDescNode((TransformationDesc)key));
238.68 - }
238.69 - return nodes.toArray(new Node[nodes.size()]);
238.70 - }
238.71 -
238.72 - private Collection getNodeKeys() {
238.73 -// System.out.println("invoked getNodeKeys() !!! ");
238.74 -
238.75 - if (projectDir == null) {
238.76 - return Collections.EMPTY_SET;
238.77 - }
238.78 - XsltMapModel xsltMapModel;
238.79 - try {
238.80 - xsltMapModel = XsltMapModel.getDefault(project);
238.81 - if (xsltMapModel != null) {
238.82 -// return xsltMapModel.getTransformationUCs();
238.83 - return xsltMapModel.getTransformationDescs();
238.84 - }
238.85 - } catch (IOException ex) {
238.86 - ex.printStackTrace();
238.87 - ErrorManager.getDefault().notify(ex);
238.88 - }
238.89 - return Collections.EMPTY_SET;
238.90 - }
238.91 -
238.92 - protected void addNotify() {
238.93 - super.addNotify();
238.94 - projectDir.getFileObject("src").addFileChangeListener(this);
238.95 - setKeys(getNodeKeys());
238.96 - }
238.97 -
238.98 - protected void removeNotify() {
238.99 - setKeys(Collections.EMPTY_SET);
238.100 - projectDir.getFileObject("src").removeFileChangeListener(this);
238.101 - super.removeNotify();
238.102 - }
238.103 -
238.104 - public void fileFolderCreated(FileEvent fe) {
238.105 - setKeys(getNodeKeys());
238.106 - }
238.107 -
238.108 - public void fileDataCreated(FileEvent fe) {
238.109 - }
238.110 -
238.111 - public void fileChanged(FileEvent fe) {
238.112 - setKeys(getNodeKeys());
238.113 - }
238.114 -
238.115 - public void fileDeleted(FileEvent fe) {
238.116 - setKeys(getNodeKeys());
238.117 - }
238.118 -
238.119 - public void fileRenamed(FileRenameEvent fe) {
238.120 - setKeys(getNodeKeys());
238.121 - }
238.122 -
238.123 - public void fileAttributeChanged(FileAttributeEvent fe) {
238.124 - }
238.125 -
238.126 -}
239.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/nodes/XsltTransformationsNode.java Wed Feb 21 08:53:38 2007 +0000
239.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
239.3 @@ -1,107 +0,0 @@
239.4 -/*
239.5 - * The contents of this file are subject to the terms of the Common Development
239.6 - * and Distribution License (the License). You may not use this file except in
239.7 - * compliance with the License.
239.8 - *
239.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
239.10 - * or http://www.netbeans.org/cddl.txt.
239.11 -
239.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
239.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
239.14 - * If applicable, add the following below the CDDL Header, with the fields
239.15 - * enclosed by brackets [] replaced by your own identifying information:
239.16 - * "Portions Copyrighted [year] [name of copyright owner]"
239.17 - *
239.18 - * The Original Software is NetBeans. The Initial Developer of the Original
239.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
239.20 - * Microsystems, Inc. All Rights Reserved.
239.21 - */
239.22 -package org.netbeans.modules.xslt.project.nodes;
239.23 -
239.24 -import java.awt.Image;
239.25 -import javax.swing.Action;
239.26 -import org.openide.loaders.DataObject;
239.27 -import org.openide.nodes.FilterNode;
239.28 -import org.openide.util.NbBundle;
239.29 -import org.openide.util.Utilities;
239.30 -
239.31 -/**
239.32 - *
239.33 - * @author Vitaly Bychkov
239.34 - * @version 1.0
239.35 - */
239.36 -public class XsltTransformationsNode extends FilterNode {
239.37 -
239.38 - private static Image ICON = Utilities.loadImage("org/netbeans/modules/xslt/project/resources/transformations.gif");
239.39 -
239.40 - public XsltTransformationsNode(DataObject dObj) {
239.41 - super(dObj.getNodeDelegate());
239.42 -// disableDelegation(DELEGATE_GET_DISPLAY_NAME|
239.43 -// DELEGATE_SET_DISPLAY_NAME|DELEGATE_GET_SHORT_DESCRIPTION|
239.44 -// DELEGATE_GET_ACTIONS);
239.45 - disableDelegation(DELEGATE_GET_DISPLAY_NAME|
239.46 - DELEGATE_SET_DISPLAY_NAME|DELEGATE_GET_SHORT_DESCRIPTION);
239.47 - }
239.48 -
239.49 - public XsltTransformationsNode(DataObject dObj, org.openide.nodes.Children children) {
239.50 - super(dObj.getNodeDelegate(), children);
239.51 -// disableDelegation(DELEGATE_GET_DISPLAY_NAME|
239.52 -// DELEGATE_SET_DISPLAY_NAME|DELEGATE_GET_SHORT_DESCRIPTION|
239.53 -// DELEGATE_GET_ACTIONS);
239.54 -// disableDelegation(DELEGATE_GET_DISPLAY_NAME|
239.55 -// DELEGATE_SET_DISPLAY_NAME|DELEGATE_GET_SHORT_DESCRIPTION);
239.56 -
239.57 -// disableDelegation(DELEGATE_GET_DISPLAY_NAME|
239.58 -// DELEGATE_SET_DISPLAY_NAME|DELEGATE_GET_SHORT_DESCRIPTION);
239.59 -
239.60 - }
239.61 -
239.62 - // TODO m | r
239.63 - public PropertySet[] getPropertySets() {
239.64 - return new PropertySet[0];
239.65 - }
239.66 -
239.67 -// public String getDisplayName() {
239.68 -// return NbBundle.getMessage(XsltTransformationsNode.class, "LBL_Transformations");
239.69 -// }
239.70 -
239.71 -// public Image getIcon(int type) {
239.72 -// return ICON;
239.73 -// }
239.74 -//
239.75 -// public Image getOpenedIcon(int type) {
239.76 -// return ICON;
239.77 -// }
239.78 -//
239.79 - public boolean canCopy() {
239.80 - return false;
239.81 - }
239.82 -
239.83 - public boolean canCut() {
239.84 - return false;
239.85 - }
239.86 -
239.87 - public boolean canDestroy() {
239.88 - return false;
239.89 - }
239.90 -
239.91 - public boolean canRename() {
239.92 - return false;
239.93 - }
239.94 -
239.95 -// @Override
239.96 -// public Action[] getActions(boolean context) {
239.97 -// return new Action[] {
239.98 -// org.openide.util.actions.SystemAction.get( org.openide.actions.EditAction.class ),
239.99 -//// CommonProjectActions.newFileAction(),
239.100 -//// null,
239.101 -//// org.openide.util.actions.SystemAction.get( org.openide.actions.FileSystemAction.class ),
239.102 -//// null,
239.103 -//// org.openide.util.actions.SystemAction.get( org.openide.actions.FindAction.class ),
239.104 -//// null,
239.105 -//// org.openide.util.actions.SystemAction.get( org.openide.actions.PasteAction.class ),
239.106 -//// null,
239.107 -//// org.openide.util.actions.SystemAction.get( org.openide.actions.ToolsAction.class ),
239.108 -// };
239.109 -// }
239.110 -}
240.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/resources/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
240.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
240.3 @@ -1,27 +0,0 @@
240.4 -#
240.5 -# The contents of this file are subject to the terms of the Common Development
240.6 -# and Distribution License (the License). You may not use this file except in
240.7 -# compliance with the License.
240.8 -#
240.9 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
240.10 -# or http://www.netbeans.org/cddl.txt.
240.11 -#
240.12 -# When distributing Covered Code, include this CDDL Header Notice in each file
240.13 -# and include the License file at http://www.netbeans.org/cddl.txt.
240.14 -# If applicable, add the following below the CDDL Header, with the fields
240.15 -# enclosed by brackets [] replaced by your own identifying information:
240.16 -# "Portions Copyrighted [year] [name of copyright owner]"
240.17 -#
240.18 -# The Original Software is NetBeans. The Initial Developer of the Original
240.19 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
240.20 -# Microsystems, Inc. All Rights Reserved.
240.21 -#
240.22 -
240.23 -# manifest
240.24 -OpenIDE-Module-Name=XSLT Project
240.25 -OpenIDE-Module-Display-Category=Service-Oriented Architecture
240.26 -OpenIDE-Module-Short-Description=XSLT Project.
240.27 -OpenIDE-Module-Long-Description=XSLT Project.
240.28 -
240.29 -# layer.xml
240.30 -Templates/SOA/xslt.service=XSLT Service
241.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/resources/build-impl.xsl Wed Feb 21 08:53:38 2007 +0000
241.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
241.3 @@ -1,770 +0,0 @@
241.4 -<?xml version="1.0" encoding="UTF-8"?>
241.5 -<!--
241.6 -The contents of this file are subject to the terms of the Common Development
241.7 -and Distribution License (the License). You may not use this file except in
241.8 -compliance with the License.
241.9 -
241.10 -You can obtain a copy of the License at http://www.netbeans.org/cddl.html
241.11 -or http://www.netbeans.org/cddl.txt.
241.12 -
241.13 -When distributing Covered Code, include this CDDL Header Notice in each file
241.14 -and include the License file at http://www.netbeans.org/cddl.txt.
241.15 -If applicable, add the following below the CDDL Header, with the fields
241.16 -enclosed by brackets [] replaced by your own identifying information:
241.17 -"Portions Copyrighted [year] [name of copyright owner]"
241.18 -
241.19 -The Original Software is NetBeans. The Initial Developer of the Original
241.20 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
241.21 -Microsystems, Inc. All Rights Reserved.
241.22 --->
241.23 -<xsl:stylesheet version="1.0"
241.24 - xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
241.25 - xmlns:p="http://www.netbeans.org/ns/project/1"
241.26 - xmlns:xalan="http://xml.apache.org/xslt"
241.27 - xmlns:ejb="http://www.netbeans.org/ns/j2ee-ejbjarproject/1"
241.28 - xmlns:projdeps="http://www.netbeans.org/ns/ant-project-references/1"
241.29 - exclude-result-prefixes="xalan p ejb projdeps">
241.30 - <xsl:output method="xml" indent="yes" encoding="UTF-8" xalan:indent-amount="4"/>
241.31 - <xsl:template match="/">
241.32 -
241.33 - <xsl:comment><![CDATA[
241.34 -*** GENERATED FROM project.xml - DO NOT EDIT ***
241.35 -*** EDIT ../build.xml INSTEAD ***
241.36 -
241.37 -For the purpose of easier reading the script
241.38 -is divided into following sections:
241.39 -
241.40 - - initialization
241.41 - - compilation
241.42 - - dist
241.43 - - execution
241.44 - - debugging
241.45 - - javadoc
241.46 - - cleanup
241.47 -
241.48 - ]]></xsl:comment>
241.49 -
241.50 - <xsl:variable name="name" select="/p:project/p:configuration/ejb:data/ejb:name"/>
241.51 - <project name="{$name}-impl">
241.52 - <xsl:attribute name="default">build</xsl:attribute>
241.53 - <xsl:attribute name="basedir">..</xsl:attribute>
241.54 -
241.55 - <target name="default">
241.56 - <xsl:attribute name="depends">dist,javadoc</xsl:attribute>
241.57 - <xsl:attribute name="description">Build whole project.</xsl:attribute>
241.58 - </target>
241.59 -
241.60 - <xsl:comment>
241.61 - ======================
241.62 - INITIALIZATION SECTION
241.63 - ======================
241.64 - </xsl:comment>
241.65 -
241.66 - <target name="pre-init">
241.67 - <xsl:comment> Empty placeholder for easier customization. </xsl:comment>
241.68 - <xsl:comment> You can override this target in the ../build.xml file. </xsl:comment>
241.69 - </target>
241.70 -
241.71 - <target name="init-private">
241.72 - <xsl:attribute name="depends">pre-init</xsl:attribute>
241.73 - <property file="nbproject/private/private.properties"/>
241.74 - </target>
241.75 -
241.76 - <target name="init-userdir">
241.77 - <xsl:attribute name="depends">pre-init,init-private</xsl:attribute>
241.78 - <property name="user.properties.file" location="${{netbeans.user}}/build.properties"/>
241.79 - </target>
241.80 -
241.81 - <target name="init-user">
241.82 - <xsl:attribute name="depends">pre-init,init-private,init-userdir</xsl:attribute>
241.83 - <property file="${{user.properties.file}}"/>
241.84 - </target>
241.85 -
241.86 - <target name="init-project">
241.87 - <xsl:attribute name="depends">pre-init,init-private,init-userdir,init-user</xsl:attribute>
241.88 - <property file="nbproject/project.properties"/>
241.89 - </target>
241.90 -
241.91 - <target name="do-init">
241.92 - <xsl:attribute name="depends">pre-init,init-private,init-userdir,init-user,init-project</xsl:attribute>
241.93 - <xsl:if test="/p:project/p:configuration/ejb:data/ejb:explicit-platform">
241.94 - <!--Setting java and javac default location -->
241.95 - <property name="platforms.${{platform.active}}.javac" value="${{platform.home}}/bin/javac"/>
241.96 - <property name="platforms.${{platform.active}}.java" value="${{platform.home}}/bin/java"/>
241.97 - <!-- XXX Ugly but Ant does not yet support recursive property evaluation: -->
241.98 - <tempfile property="file.tmp" prefix="platform" suffix=".properties"/>
241.99 - <echo file="${{file.tmp}}">
241.100 - platform.home=$${platforms.${platform.active}.home}
241.101 - platform.bootcp=$${platforms.${platform.active}.bootclasspath}
241.102 - build.compiler=$${platforms.${platform.active}.compiler}
241.103 - platform.java=$${platforms.${platform.active}.java}
241.104 - platform.javac=$${platforms.${platform.active}.javac}
241.105 - </echo>
241.106 - <property file="${{file.tmp}}"/>
241.107 - <delete file="${{file.tmp}}"/>
241.108 - <fail unless="platform.home">Must set platform.home</fail>
241.109 - <fail unless="platform.bootcp">Must set platform.bootcp</fail>
241.110 - <fail unless="platform.java">Must set platform.java</fail>
241.111 - <fail unless="platform.javac">Must set platform.javac</fail>
241.112 - </xsl:if>
241.113 - <xsl:comment> The two properties below are usually overridden </xsl:comment>
241.114 - <xsl:comment> by the active platform. Just a fallback. </xsl:comment>
241.115 - <property name="default.javac.source" value="1.4"/>
241.116 - <property name="default.javac.target" value="1.4"/>
241.117 - <xsl:if test="/p:project/p:configuration/ejb:data/ejb:use-manifest">
241.118 - <fail unless="manifest.file">Must set manifest.file</fail>
241.119 - </xsl:if>
241.120 - <condition property="no.javadoc.preview">
241.121 - <isfalse value="${{javadoc.preview}}"/>
241.122 - </condition>
241.123 - <available file="${{src.dir}}/../retrieved" property="retrieved.exists"/>
241.124 - </target>
241.125 -
241.126 - <target name="post-init">
241.127 - <xsl:comment> Empty placeholder for easier customization. </xsl:comment>
241.128 - <xsl:comment> You can override this target in the ../build.xml file. </xsl:comment>
241.129 - </target>
241.130 -
241.131 - <target name="init-check">
241.132 - <xsl:attribute name="depends">pre-init,init-private,init-userdir,init-user,init-project,do-init</xsl:attribute>
241.133 - <!-- XXX XSLT 2.0 would make it possible to use a for-each here -->
241.134 - <!-- Note that if the properties were defined in project.xml that would be easy -->
241.135 - <!-- But required props should be defined by the AntBasedProjectType, not stored in each project -->
241.136 - <fail unless="src.dir">Must set src.dir</fail>
241.137 - <fail unless="build.dir">Must set build.dir</fail>
241.138 - <fail unless="build.generated.dir">Must set build.generated.dir</fail>
241.139 - <fail unless="dist.dir">Must set dist.dir</fail>
241.140 - <fail unless="build.classes.dir">Must set build.classes.dir</fail>
241.141 - <!-- //B20050104 <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> -->
241.142 - <!-- //B20050104 <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> -->
241.143 - <fail unless="dist.jar">Must set dist.jar</fail>
241.144 - </target>
241.145 -
241.146 - <target name="init-taskdefs" if="from.commandline">
241.147 - <path id="ant.task.classpath.models">
241.148 - <pathelement location="${{netbeans.home}}/../soa1/modules/org-netbeans-modules-xslt-project.jar"/>
241.149 - <pathelement location="${{netbeans.home}}/../soa1/ant/nblib/org-netbeans-modules-xslt-project.jar"/>
241.150 - <pathelement location="${{netbeans.home}}/../soa1/modules/org-netbeans-modules-xslt-model.jar"/>
241.151 - <pathelement location="${{netbeans.home}}/../ide8/modules/org-netbeans-modules-xml-xam.jar"/>
241.152 - <pathelement location="${{netbeans.home}}/../ide8/modules/org-netbeans-modules-xml-schema-model.jar"/>
241.153 - <pathelement location="${{netbeans.home}}/../ide8/modules/org-netbeans-modules-xml-wsdl-model.jar"/>
241.154 - <pathelement location="${{netbeans.home}}/../platform7/lib/org-openide-util.jar"/>
241.155 - <pathelement location="${{netbeans.home}}/../platform7/modules/org-openide-loaders.jar"/>
241.156 - <pathelement location="${{netbeans.home}}/../xmltools1/modules/org-netbeans-modules-xml-wsdl-extensions.jar"/>
241.157 - <pathelement location="${{netbeans.home}}/../ide8/modules/org-apache-xml-resolver.jar"/>
241.158 - <pathelement location="${{netbeans.home}}/../ide8/modules/org-netbeans-modules-xml-retriever.jar"/>
241.159 - <pathelement location="${{netbeans.home}}/../ide8/modules/ext/resolver-1_1_nb.jar"/>
241.160 - </path>
241.161 -
241.162 - <taskdef name="XsltProjectJBIGen" classname="org.netbeans.modules.xslt.project.anttasks.GenerateJBIDescriptorTask">
241.163 - <classpath refid="ant.task.classpath.models"/>
241.164 - </taskdef>
241.165 -
241.166 - <!-- path id="ant.task.classpath.validation">
241.167 -
241.168 - <pathelement location="${{netbeans.home}}/../soa1/modules/org-netbeans-modules-xslt-core.jar"/>
241.169 - <pathelement location="${{netbeans.home}}/../soa1/modules/org-netbeans-modules-xslt-project.jar"/>
241.170 - <pathelement location="${{netbeans.home}}/../soa1/ant/nblib/org-netbeans-modules-xslt-project.jar"/>
241.171 - <pathelement location="${{netbeans.home}}/../soa1/modules/org-netbeans-modules-xslt-model.jar"/>
241.172 - <pathelement location="${{netbeans.home}}/../ide8/modules/org-netbeans-modules-xml-xam.jar"/>
241.173 - <pathelement location="${{netbeans.home}}/../ide8/modules/org-netbeans-modules-xml-schema-model.jar"/>
241.174 - <pathelement location="${{netbeans.home}}/../ide8/modules/org-netbeans-modules-xml-wsdl-model.jar"/>
241.175 - <pathelement location="${{netbeans.home}}/../platform7/lib/org-openide-util.jar"/>
241.176 - <pathelement location="${{netbeans.home}}/../platform7/modules/org-openide-loaders.jar"/>
241.177 - <pathelement location="${{netbeans.home}}/../xmltools1/modules/org-netbeans-modules-xml-wsdl-extensions.jar"/>
241.178 - <pathelement location="${{netbeans.home}}/../xmltools1/modules/org-netbeans-modules-xml-xpath.jar"/>
241.179 - <pathelement location="${{netbeans.home}}/../xmltools1/modules/ext/jxpath/jxpath1.1.jar"/>
241.180 - <pathelement location="${{netbeans.home}}/../ide8/modules/org-apache-xml-resolver.jar"/>
241.181 - <pathelement location="${{netbeans.home}}/../ide8/modules/org-netbeans-modules-xml-retriever.jar"/>
241.182 - <pathelement location="${{netbeans.home}}/../ide8/modules/ext/resolver-1_1_nb.jar"/>
241.183 -
241.184 -
241.185 - </path>
241.186 - <taskdef name="XsltProjectValidate" classname="org.netbeans.modules.xslt.project.anttasks.ValidateXSLTProjectTask">
241.187 - <classpath refid="ant.task.classpath.validation"/>
241.188 - </taskdef-->
241.189 -
241.190 - <!--
241.191 - <taskdef name="generate-portmap-descriptors" classname="org.netbeans.modules.bpel.project.anttasks.GeneratePortmapDescriptors">
241.192 - <classpath refid="ant.task.classpath" />
241.193 - </taskdef>
241.194 - -->
241.195 -
241.196 -
241.197 - </target>
241.198 -
241.199 - <target name="init">
241.200 - <!-- //B20050104 <xsl:attribute name="depends">pre-init,init-private,init-userdir,init-user,init-project,do-init,post-init,init-check,init-macrodef-javac,init-macrodef-nbjpda,init-macrodef-debug,init-taskdefs</xsl:attribute> -->
241.201 - <xsl:attribute name="depends">pre-init,init-private,init-userdir,init-user,init-project,do-init,post-init,init-check,init-taskdefs</xsl:attribute>
241.202 - </target>
241.203 -
241.204 - <xsl:comment>
241.205 - ===================
241.206 - COMPILATION SECTION
241.207 - ===================
241.208 - </xsl:comment>
241.209 -
241.210 - <xsl:call-template name="deps.target">
241.211 - <xsl:with-param name="targetname" select="'deps-jar'"/>
241.212 - <xsl:with-param name="type" select="'jar'"/>
241.213 - </xsl:call-template>
241.214 -
241.215 - <xsl:if test="/p:project/p:configuration/ejb:data/ejb:web-services/ejb:web-service|/p:project/p:configuration/ejb:data/ejb:web-service-clients/ejb:web-service-client">
241.216 - <target name="wscompile-init">
241.217 - <taskdef name="wscompile" classname="com.sun.xml.rpc.tools.ant.Wscompile">
241.218 - <classpath path="${{wscompile.classpath}}"/>
241.219 - </taskdef>
241.220 - <mkdir dir="${{build.classes.dir}}/META-INF/wsdl"/>
241.221 - <mkdir dir="${{build.generated.dir}}/wssrc"/>
241.222 - </target>
241.223 - </xsl:if>
241.224 -
241.225 - <xsl:for-each select="/p:project/p:configuration/ejb:data/ejb:web-services/ejb:web-service">
241.226 - <xsl:variable name="wsname">
241.227 - <xsl:value-of select="ejb:web-service-name"/>
241.228 - </xsl:variable>
241.229 -
241.230 - <target name="{$wsname}_wscompile" depends="wscompile-init">
241.231 - <wscompile
241.232 - server="true"
241.233 - fork="true"
241.234 - keep="true"
241.235 - base="${{build.generated.dir}}/wssrc"
241.236 - xPrintStackTrace="true"
241.237 - verbose="true"
241.238 - nonClassDir="${{build.classes.dir}}/META-INF/wsdl"
241.239 - classpath="${{wscompile.classpath}}:${{build.classes.dir}}"
241.240 - mapping="${{build.classes.dir}}/META-INF/wsdl/${{{$wsname}.mapping}}"
241.241 - config="${{src.dir}}/${{{$wsname}.config.name}}">
241.242 - <!-- HTTPProxy="${http.proxyHost}:${http.proxyPort}" -->
241.243 - </wscompile>
241.244 - </target>
241.245 - </xsl:for-each>
241.246 -
241.247 - <xsl:for-each select="/p:project/p:configuration/ejb:data/ejb:web-service-clients/ejb:web-service-client">
241.248 - <xsl:variable name="wsclientname">
241.249 - <xsl:value-of select="ejb:web-service-client-name"/>
241.250 - </xsl:variable>
241.251 -
241.252 - <target name="{$wsclientname}_client_wscompile" depends="wscompile-init">
241.253 - <copy file="${{web.docbase.dir}}/WEB-INF/wsdl/{$wsclientname}-config.xml"
241.254 - tofile="${{build.generated.dir}}/wssrc/wsdl/{$wsclientname}-config.xml" filtering="on">
241.255 - <filterset>
241.256 - <!-- replace token with reference to WSDL file in source tree, not build tree, since the
241.257 - the file probably has not have been copied to the build tree yet. -->
241.258 - <filter token="CONFIG_ABSOLUTE_PATH" value="${{basedir}}/${{web.docbase.dir}}/WEB-INF/wsdl"/>
241.259 - </filterset>
241.260 - </copy>
241.261 - <wscompile
241.262 - xPrintStackTrace="true" verbose="true"
241.263 - fork="true" keep="true" import="true" features="norpcstructures"
241.264 - base="${{build.classes.dir}}"
241.265 - sourceBase="${{build.generated.dir}}/wssrc"
241.266 - classpath="${{wscompile.classpath}}"
241.267 - mapping="${{build.web.dir}}/WEB-INF/wsdl/{$wsclientname}-mapping.xml"
241.268 - config="${{build.generated.dir}}/wssrc/wsdl/{$wsclientname}-config.xml">
241.269 - </wscompile>
241.270 - </target>
241.271 - </xsl:for-each>
241.272 -
241.273 - <target name="pre-pre-compile">
241.274 - <xsl:attribute name="depends">init,deps-jar</xsl:attribute>
241.275 - <mkdir dir="${{build.classes.dir}}"/>
241.276 - </target>
241.277 -
241.278 - <target name="pre-compile">
241.279 - <xsl:comment> Empty placeholder for easier customization. </xsl:comment>
241.280 - <xsl:comment> You can override this target in the ../build.xml file. </xsl:comment>
241.281 - </target>
241.282 -
241.283 - <target name="library-inclusion-in-archive" depends="compile">
241.284 - <xsl:for-each select="//ejb:included-library">
241.285 - <xsl:variable name="included.prop.name">
241.286 - <xsl:value-of select="."/>
241.287 - </xsl:variable>
241.288 - <unjar dest="${{build.classes.dir}}">
241.289 - <xsl:attribute name="src">${<xsl:value-of select="$included.prop.name"/>}</xsl:attribute>
241.290 - </unjar>
241.291 - </xsl:for-each>
241.292 - </target>
241.293 -
241.294 - <target name="library-inclusion-in-manifest" depends="compile">
241.295 - <xsl:for-each select="//ejb:included-library">
241.296 - <xsl:variable name="included.prop.name">
241.297 - <xsl:value-of select="."/>
241.298 - </xsl:variable>
241.299 - <xsl:variable name="base.prop.name">
241.300 - <xsl:value-of select="concat('included.lib.', $included.prop.name, '')"/>
241.301 - </xsl:variable>
241.302 - <basename>
241.303 - <xsl:attribute name="property"><xsl:value-of select="$base.prop.name"/></xsl:attribute>
241.304 - <xsl:attribute name="file">${<xsl:value-of select="$included.prop.name"/>}</xsl:attribute>
241.305 - </basename>
241.306 - <copy todir="${{build.classes.dir}}">
241.307 - <xsl:attribute name="file">${<xsl:value-of select="$included.prop.name"/>}</xsl:attribute>
241.308 - </copy>
241.309 - </xsl:for-each>
241.310 - <manifest file="${{build.classes.dir}}/META-INF/MANIFEST.MF" mode="update">
241.311 - <attribute>
241.312 - <xsl:attribute name="name">Class-Path</xsl:attribute>
241.313 - <xsl:attribute name="value">
241.314 - <xsl:for-each select="//ejb:included-library">
241.315 - <xsl:variable name="base.prop.name">
241.316 - <xsl:value-of select="concat('${included.lib.', ., '}')"/>
241.317 - </xsl:variable>
241.318 - <xsl:if test="position()>1">,</xsl:if>
241.319 - <xsl:value-of select="$base.prop.name"/>
241.320 - </xsl:for-each>
241.321 - </xsl:attribute>
241.322 - </attribute>
241.323 - </manifest>
241.324 - </target>
241.325 -
241.326 - <target name="do-compile">
241.327 - <xsl:attribute name="depends">init,deps-jar,pre-pre-compile,pre-compile</xsl:attribute>
241.328 - <xsl:if test="/p:project/p:configuration/ejb:data/ejb:web-services/ejb:web-service">
241.329 - <xsl:comment>For web services, refresh the Tie and SerializerRegistry classes</xsl:comment>
241.330 - <delete>
241.331 - <fileset dir="${{build.classes.dir}}" includes="**/*_Tie.* **/*_SerializerRegistry.*"/>
241.332 - </delete>
241.333 - </xsl:if>
241.334 - <!--
241.335 - //B20050104
241.336 - <ejbproject:javac xmlns:ejbproject="http://www.netbeans.org/ns/j2ee-ejbjarproject/1"/>
241.337 - <copy todir="${{build.classes.dir}}">
241.338 - <fileset dir="${{src.dir}}" excludes="${{build.classes.excludes}}"/>
241.339 - <fileset dir="${{meta.inf}}" includes="**/*.dbschema"/>
241.340 - </copy>
241.341 - <copy todir="${{build.classes.dir}}/META-INF">
241.342 - <fileset dir="${{meta.inf}}" excludes="**/*.dbschema"/>
241.343 - </copy>
241.344 - <xsl:if test="/p:project/p:configuration/ejb:data/ejb:web-services/ejb:web-service">
241.345 - <xsl:comment>For web services, refresh ejb-jar.xml and sun-ejb-jar.xml</xsl:comment>
241.346 - <copy todir="${{build.dir}}" overwrite="true">
241.347 - <fileset includes="META-INF/ejb-jar.xml META-INF/sun-ejb-jar.xml" dir="${{meta.inf}}"/>
241.348 - </copy>
241.349 - </xsl:if>
241.350 --->
241.351 - </target>
241.352 -
241.353 - <target name="post-compile">
241.354 - <xsl:if test="/p:project/p:configuration/ejb:data/ejb:web-services/ejb:web-service">
241.355 - <xsl:attribute name="depends">
241.356 - <xsl:for-each select="/p:project/p:configuration/ejb:data/ejb:web-services/ejb:web-service">
241.357 - <xsl:if test="position()!=1"><xsl:text>, </xsl:text></xsl:if>
241.358 - <xsl:variable name="wsname2">
241.359 - <xsl:value-of select="ejb:web-service-name"/>
241.360 - </xsl:variable>
241.361 - <xsl:value-of select="ejb:web-service-name"/><xsl:text>_wscompile</xsl:text>
241.362 - </xsl:for-each>
241.363 - </xsl:attribute>
241.364 - </xsl:if>
241.365 - <xsl:comment> Empty placeholder for easier customization. </xsl:comment>
241.366 - <xsl:comment> You can override this target in the ../build.xml file. </xsl:comment>
241.367 - </target>
241.368 -
241.369 - <target name="compile">
241.370 - <xsl:attribute name="depends">init,deps-jar,pre-pre-compile,pre-compile,do-compile,post-compile</xsl:attribute>
241.371 - <xsl:attribute name="description">Compile project.</xsl:attribute>
241.372 - </target>
241.373 -
241.374 - <target name="pre-compile-single">
241.375 - <xsl:comment> Empty placeholder for easier customization. </xsl:comment>
241.376 - <xsl:comment> You can override this target in the ../build.xml file. </xsl:comment>
241.377 - </target>
241.378 -
241.379 - <target name="do-compile-single">
241.380 - <xsl:attribute name="depends">init,deps-jar,pre-pre-compile</xsl:attribute>
241.381 - <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
241.382 - <ejbproject:javac xmlns:ejbproject="http://www.netbeans.org/ns/j2ee-ejbjarproject/1">
241.383 - <customize>
241.384 - <include name="${{javac.includes}}"/>
241.385 - </customize>
241.386 - </ejbproject:javac>
241.387 - </target>
241.388 -
241.389 - <target name="post-compile-single">
241.390 - <xsl:comment> Empty placeholder for easier customization. </xsl:comment>
241.391 - <xsl:comment> You can override this target in the ../build.xml file. </xsl:comment>
241.392 - </target>
241.393 -
241.394 - <target name="compile-single">
241.395 - <xsl:attribute name="depends">init,deps-jar,pre-pre-compile,pre-compile-single,do-compile-single,post-compile-single</xsl:attribute>
241.396 - </target>
241.397 -
241.398 - <xsl:comment>
241.399 - ====================
241.400 - DIST BUILDING SECTION
241.401 - ====================
241.402 - </xsl:comment>
241.403 -
241.404 - <target name="pre-dist">
241.405 - <xsl:comment> Empty placeholder for easier customization. </xsl:comment>
241.406 - <xsl:comment> You can override this target in the ../build.xml file. </xsl:comment>
241.407 - <mkdir dir="${{build.dir}}"/>
241.408 - <xslt in="${{basedir}}/${{src.dir}}/xsltmap.xml" out="${{build.dir}}/portmap.xml"
241.409 - style="${{basedir}}/nbproject/genPortmap.xsl">
241.410 - <outputproperty name="method" value="xml"/>
241.411 - <outputproperty name="standalone" value="yes"/>
241.412 - <outputproperty name="encoding" value="UTF-8"/>
241.413 - <outputproperty name="indent" value="yes"/>
241.414 - </xslt>
241.415 -
241.416 - <xsl:comment> run the validation task here. </xsl:comment>
241.417 - <!--
241.418 - <validate-project buildDirectory="${{basedir}}/${{build.dir}}" sourceDirectory="${{basedir}}/${{src.dir}}" projectClassPath="${{javac.classpath}}" buildDependentProjectDir="${{basedir}}/${{build.dir}}/dependentProjectFiles" />
241.419 - -->
241.420 -
241.421 - <xsl:comment> copy all files from project source directory to build directory. </xsl:comment>
241.422 - <copy todir="${{build.dir}}" preservelastmodified="true" >
241.423 - <fileset includes="**/*.xsl,**/*.xslt,**/*.wsdl,**/*.xsd" dir="${{src.dir}}"/>
241.424 - </copy>
241.425 -
241.426 -
241.427 - <xsl:comment> build sub-projects and copy them to the build dir </xsl:comment>
241.428 - <antcall target="deps-sub-project" inheritAll="true"/>
241.429 - <antcall target="PackageRetrievedFiles" inheritAll="true"/>
241.430 -
241.431 - <!--XsltProjectJBIGen buildDirectory="${{basedir}}/${{build.dir}}" sourceDirectory="${{basedir}}/${{src.dir}}" projectClassPath="${{javac.classpath}}" classpathRef="ant.task.classpath.models"/-->
241.432 -
241.433 - <xsl:comment> extract wsdl/xsd files from dependent projects and copy to build/dependentProjectFiles. </xsl:comment>
241.434 - <delete dir="${{build.dir}}/dependentProjectFiles"/>
241.435 - <mkdir dir="${{build.dir}}/dependentProjectFiles"/>
241.436 -
241.437 - </target>
241.438 -
241.439 -
241.440 -
241.441 - <xsl:comment> BUILD ALL SUB-PROJECTS </xsl:comment>
241.442 - <xsl:call-template name="build-and-layout-sub-projects-template">
241.443 - <xsl:with-param name="targetname" select="'deps-sub-project'"/>
241.444 - </xsl:call-template>
241.445 -
241.446 -
241.447 - <target name="PackageRetrievedFiles" if="retrieved.exists">
241.448 - <copy todir="${{build.dir}}/META-INF" preservelastmodified="true" failonerror="false">
241.449 - <fileset dir="${{src.dir}}/../retrieved"/>
241.450 - </copy>
241.451 - </target>
241.452 -
241.453 - <target name="dist_se">
241.454 - <xsl:attribute name="depends">init,pre-dist</xsl:attribute>
241.455 - <jar compress="${{jar.compress}}" jarfile="${{build.dir}}/SEDeployment.jar">
241.456 - <fileset includes="**/*.xsl,**/*.xslt,**/*.wsdl,**/*.xsd" dir="${{basedir}}/${{build.dir}}"/>
241.457 -
241.458 - <fileset dir="${{basedir}}/${{build.dir}}">
241.459 - <include name="**/jbi.xml" />
241.460 - <include name="**/catalog.xml"/>
241.461 - </fileset>
241.462 -
241.463 - <fileset dir="${{build.dir}}/dependentProjectFiles">
241.464 - <include name="*.wsdl" />
241.465 - <include name="*.xsd" />
241.466 - </fileset>
241.467 -
241.468 - <fileset dir="${{src.dir}}/">
241.469 - <include name="xsltmap.xml"/>
241.470 - </fileset>
241.471 - </jar>
241.472 - </target>
241.473 -
241.474 - <target name="do-dist">
241.475 - <xsl:attribute name="depends">init,pre-dist,dist_se</xsl:attribute>
241.476 - </target>
241.477 -
241.478 - <target name="post-dist">
241.479 - <xsl:comment> Empty placeholder for easier customization. </xsl:comment>
241.480 - <xsl:comment> You can override this target in the ../build.xml file. </xsl:comment>
241.481 - <!--
241.482 - <generate-deployment-path
241.483 - jarFileClasspath="${{module.install.dir}}/com-stc-projects-xsltpro.jar"
241.484 - privatePropertiesFileLocation="${{basedir}}/nbproject/private/private.properties"
241.485 - netBeansUserPropertyValue="${{netbeans.user}}">
241.486 - </generate-deployment-path>
241.487 - -->
241.488 - </target>
241.489 -
241.490 - <target name="dist">
241.491 - <xsl:attribute name="depends">init,pre-dist,do-dist,post-dist</xsl:attribute>
241.492 - <!--
241.493 - <xsl:attribute name="depends">init,compile,pre-dist,do-dist,post-dist,library-inclusion-in-manifest</xsl:attribute>
241.494 --->
241.495 - <xsl:attribute name="description">Build distribution (JAR).</xsl:attribute>
241.496 - </target>
241.497 -
241.498 - <xsl:comment>
241.499 - =================
241.500 - DEBUGGING SECTION
241.501 - =================
241.502 - </xsl:comment>
241.503 - <target name="debug">
241.504 - <xsl:attribute name="description">Debug project in IDE.</xsl:attribute>
241.505 - <xsl:attribute name ="depends">init,compile</xsl:attribute>
241.506 - <xsl:attribute name="if">netbeans.home</xsl:attribute>
241.507 - <nbdeploy debugmode="true" clientUrlPart="${{client.urlPart}}"/>
241.508 - <nbjpdaconnect name="${{name}}" host="${{jpda.host}}" address="${{jpda.address}}" transport="${{jpda.transport}}">
241.509 - <classpath>
241.510 - <path path="${{debug.classpath}}"/>
241.511 - </classpath>
241.512 - <sourcepath>
241.513 - <path path="${{web.docbase.dir}}"/>
241.514 - </sourcepath>
241.515 - <xsl:if test="/p:project/p:configuration/ejb:data/ejb:explicit-platform">
241.516 - <bootclasspath>
241.517 - <path path="${{platform.bootcp}}"/>
241.518 - </bootclasspath>
241.519 - </xsl:if>
241.520 - </nbjpdaconnect>
241.521 - </target>
241.522 -
241.523 - <target name="pre-debug-fix">
241.524 - <xsl:attribute name="depends">init</xsl:attribute>
241.525 - <fail unless="fix.includes">Must set fix.includes</fail>
241.526 - <property name="javac.includes" value="${{fix.includes}}.java"/>
241.527 - </target>
241.528 -
241.529 - <target name="do-debug-fix">
241.530 - <xsl:attribute name="if">netbeans.home</xsl:attribute>
241.531 - <xsl:attribute name="depends">init,pre-debug-fix,compile-single</xsl:attribute>
241.532 - <j2seproject:nbjpdareload xmlns:j2seproject="http://www.netbeans.org/ns/j2se-project/1"/>
241.533 - </target>
241.534 -
241.535 - <target name="debug-fix">
241.536 - <xsl:attribute name="if">netbeans.home</xsl:attribute>
241.537 - <xsl:attribute name="depends">init,pre-debug-fix,do-debug-fix</xsl:attribute>
241.538 - </target>
241.539 -
241.540 - <xsl:comment>
241.541 - ===============
241.542 - JAVADOC SECTION
241.543 - ===============
241.544 - </xsl:comment>
241.545 -
241.546 - <target name="javadoc-build">
241.547 - <xsl:attribute name="depends">init</xsl:attribute>
241.548 - <mkdir dir="${{dist.javadoc.dir}}"/>
241.549 - <!-- XXX do an up-to-date check first -->
241.550 - <javadoc destdir="${{dist.javadoc.dir}}" source="${{javac.source}}"
241.551 - notree="${{javadoc.notree}}"
241.552 - use="${{javadoc.use}}"
241.553 - nonavbar="${{javadoc.nonavbar}}"
241.554 - noindex="${{javadoc.noindex}}"
241.555 - splitindex="${{javadoc.splitindex}}"
241.556 - author="${{javadoc.author}}"
241.557 - version="${{javadoc.version}}"
241.558 - windowtitle="${{javadoc.windowtitle}}"
241.559 - private="${{javadoc.private}}" >
241.560 - <!-- encoding="${{javadoc.encoding}}" -->
241.561 - <classpath>
241.562 - <path path="${{javac.classpath}}"/>
241.563 - </classpath>
241.564 - <sourcepath>
241.565 - <pathelement location="${{src.dir}}"/>
241.566 - </sourcepath>
241.567 - <xsl:if test="/p:project/p:configuration/ejb:data/ejb:explicit-platform">
241.568 - <bootclasspath>
241.569 - <path path="${{platform.bootcp}}"/>
241.570 - </bootclasspath>
241.571 - </xsl:if>
241.572 - <fileset dir="${{src.dir}}"/>
241.573 - </javadoc>
241.574 - </target>
241.575 -
241.576 - <target name="javadoc-browse">
241.577 - <xsl:attribute name="if">netbeans.home</xsl:attribute>
241.578 - <xsl:attribute name="unless">no.javadoc.preview</xsl:attribute>
241.579 - <xsl:attribute name="depends">init,javadoc-build</xsl:attribute>
241.580 - <nbbrowse file="${{dist.javadoc.dir}}/index.html"/>
241.581 - </target>
241.582 -
241.583 - <target name="javadoc">
241.584 - <xsl:attribute name="depends">init,javadoc-build,javadoc-browse</xsl:attribute>
241.585 - <xsl:attribute name="description">Build Javadoc.</xsl:attribute>
241.586 - </target>
241.587 -
241.588 - <xsl:comment>
241.589 - ===============
241.590 - CLEANUP SECTION
241.591 - ===============
241.592 - </xsl:comment>
241.593 -
241.594 - <xsl:call-template name="deps.target">
241.595 - <xsl:with-param name="targetname" select="'deps-clean'"/>
241.596 - </xsl:call-template>
241.597 -
241.598 - <target name="do-clean">
241.599 - <xsl:attribute name="depends">init</xsl:attribute>
241.600 - <delete dir="${{build.dir}}"/>
241.601 - <delete dir="${{dist.dir}}"/>
241.602 - </target>
241.603 -
241.604 - <target name="post-clean">
241.605 - <xsl:comment> Empty placeholder for easier customization. </xsl:comment>
241.606 - <xsl:comment> You can override this target in the ../build.xml file. </xsl:comment>
241.607 - </target>
241.608 -
241.609 - <target name="clean">
241.610 - <xsl:attribute name="depends">init,deps-clean,do-clean,post-clean</xsl:attribute>
241.611 - <xsl:attribute name="description">Clean build products.</xsl:attribute>
241.612 - </target>
241.613 - </project>
241.614 -
241.615 - <!-- TBD items:
241.616 -
241.617 -Could pass <propertyset> to run, debug, etc. under Ant 1.6,
241.618 -optionally, by doing e.g.
241.619 -
241.620 - <propertyset>
241.621 - <propertyref prefix="sysprop."/>
241.622 - <mapper type="glob" from="sysprop.*" to="*"/>
241.623 - </propertyset>
241.624 -
241.625 -Now user can add to e.g. project.properties e.g.:
241.626 - sysprop.org.netbeans.modules.javahelp=0
241.627 -to simulate
241.628 - -Dorg.netbeans.modules.javahelp=0
241.629 -
241.630 --->
241.631 -
241.632 - </xsl:template>
241.633 -
241.634 - <!---
241.635 - Generic template to build subdependencies of a certain type.
241.636 - Feel free to copy into other modules.
241.637 - @param targetname required name of target to generate
241.638 - @param type artifact-type from project.xml to filter on; optional, if not specified, uses
241.639 - all references, and looks for clean targets rather than build targets
241.640 - @return an Ant target which builds (or cleans) all known subprojects
241.641 - -->
241.642 - <xsl:template name="deps.target">
241.643 - <xsl:param name="targetname"/>
241.644 - <xsl:param name="type"/>
241.645 - <target name="{$targetname}">
241.646 - <xsl:attribute name="depends">init</xsl:attribute>
241.647 - <xsl:attribute name="unless">${no.dependencies}</xsl:attribute>
241.648 - <xsl:variable name="references" select="/p:project/p:configuration/projdeps:references"/>
241.649 - <xsl:for-each select="$references/projdeps:reference[not($type) or projdeps:artifact-type = $type]">
241.650 - <xsl:variable name="subproj" select="projdeps:foreign-project"/>
241.651 - <xsl:variable name="subtarget">
241.652 - <xsl:choose>
241.653 - <xsl:when test="$type">
241.654 - <xsl:value-of select="projdeps:target"/>
241.655 - </xsl:when>
241.656 - <xsl:otherwise>
241.657 - <xsl:value-of select="projdeps:clean-target"/>
241.658 - </xsl:otherwise>
241.659 - </xsl:choose>
241.660 - </xsl:variable>
241.661 - <xsl:variable name="script" select="projdeps:script"/>
241.662 - <xsl:variable name="scriptdir" select="substring-before($script, '/')"/>
241.663 - <xsl:variable name="scriptdirslash">
241.664 - <xsl:choose>
241.665 - <xsl:when test="$scriptdir = ''"/>
241.666 - <xsl:otherwise>
241.667 - <xsl:text>/</xsl:text>
241.668 - <xsl:value-of select="$scriptdir"/>
241.669 - </xsl:otherwise>
241.670 - </xsl:choose>
241.671 - </xsl:variable>
241.672 - <xsl:variable name="scriptfileorblank" select="substring-after($script, '/')"/>
241.673 - <xsl:variable name="scriptfile">
241.674 - <xsl:choose>
241.675 - <xsl:when test="$scriptfileorblank != ''">
241.676 - <xsl:value-of select="$scriptfileorblank"/>
241.677 - </xsl:when>
241.678 - <xsl:otherwise>
241.679 - <xsl:value-of select="$script"/>
241.680 - </xsl:otherwise>
241.681 - </xsl:choose>
241.682 - </xsl:variable>
241.683 - <ant target="{$subtarget}" inheritall="false">
241.684 - <!-- XXX #43624: cannot use inline attr on JDK 1.5 -->
241.685 - <xsl:attribute name="dir">${project.<xsl:value-of select="$subproj"/>}<xsl:value-of select="$scriptdirslash"/></xsl:attribute>
241.686 - <xsl:if test="$scriptfile != 'build.xml'">
241.687 - <xsl:attribute name="antfile">
241.688 - <xsl:value-of select="$scriptfile"/>
241.689 - </xsl:attribute>
241.690 - </xsl:if>
241.691 - </ant>
241.692 - </xsl:for-each>
241.693 - </target>
241.694 - </xsl:template>
241.695 -
241.696 -
241.697 -
241.698 - <!---
241.699 - Generic template to build subdependencies and copy their artifacts to the projects build area.
241.700 -
241.701 - @param targetname required name of target to generate
241.702 - @param filetypes ant style artifact file type that need to be coppied in to this project from sub-project (default being
241.703 - **/*.wsdl,**/*.xsd)
241.704 -
241.705 - @return an Ant target which builds all known subprojects and copy them under this project's build area
241.706 - -->
241.707 - <xsl:template name="build-and-layout-sub-projects-template">
241.708 - <xsl:param name="targetname"/>
241.709 - <xsl:param name="filetypes"/>
241.710 - <target name="{$targetname}">
241.711 - <xsl:attribute name="depends">init</xsl:attribute>
241.712 - <xsl:attribute name="unless">${no.dependencies}</xsl:attribute>
241.713 - <xsl:variable name="references" select="/p:project/p:configuration/projdeps:references"/>
241.714 - <xsl:for-each select="$references/projdeps:reference">
241.715 - <xsl:variable name="subproj" select="projdeps:foreign-project"/>
241.716 - <xsl:variable name="subtarget" select="projdeps:target"/>
241.717 - <xsl:variable name="script" select="projdeps:script"/>
241.718 - <xsl:variable name="scriptdir" select="substring-before($script, '/')"/>
241.719 - <xsl:variable name="scriptdirslash">
241.720 - <xsl:choose>
241.721 - <xsl:when test="$scriptdir = ''"/>
241.722 - <xsl:otherwise>
241.723 - <xsl:text>/</xsl:text>
241.724 - <xsl:value-of select="$scriptdir"/>
241.725 - </xsl:otherwise>
241.726 - </xsl:choose>
241.727 - </xsl:variable>
241.728 - <xsl:variable name="scriptfileorblank" select="substring-after($script, '/')"/>
241.729 - <xsl:variable name="scriptfile">
241.730 - <xsl:choose>
241.731 - <xsl:when test="$scriptfileorblank != ''">
241.732 - <xsl:value-of select="$scriptfileorblank"/>
241.733 - </xsl:when>
241.734 - <xsl:otherwise>
241.735 - <xsl:value-of select="$script"/>
241.736 - </xsl:otherwise>
241.737 - </xsl:choose>
241.738 - </xsl:variable>
241.739 -
241.740 - <xsl:variable name="fileterfiletypes">
241.741 - <xsl:choose>
241.742 - <xsl:when test="$filetypes != ''">
241.743 - <xsl:value-of select="$filetypes"/>
241.744 - </xsl:when>
241.745 - <xsl:otherwise>
241.746 - <xsl:value-of select="'**/*.wsdl,**/*.xsd'"/>
241.747 - </xsl:otherwise>
241.748 - </xsl:choose>
241.749 - </xsl:variable>
241.750 -
241.751 - <ant target="{$subtarget}" inheritall="false">
241.752 - <!-- XXX #43624: cannot use inline attr on JDK 1.5 -->
241.753 - <xsl:attribute name="dir">${project.<xsl:value-of select="$subproj"/>}<xsl:value-of select="$scriptdirslash"/></xsl:attribute>
241.754 - <xsl:if test="$scriptfile != 'build.xml'">
241.755 - <xsl:attribute name="antfile">
241.756 - <xsl:value-of select="$scriptfile"/>
241.757 - </xsl:attribute>
241.758 - </xsl:if>
241.759 - </ant>
241.760 -
241.761 - <unjar>
241.762 - <xsl:attribute name="src">${reference.<xsl:value-of select="$subproj"/>.<xsl:value-of select="$subtarget"/>}</xsl:attribute>
241.763 - <xsl:attribute name="dest">${build.dir}/<xsl:value-of select="$subproj"/></xsl:attribute>
241.764 - <patternset>
241.765 - <xsl:attribute name="includes"><xsl:value-of select="$fileterfiletypes"/></xsl:attribute>
241.766 - </patternset>
241.767 - </unjar>
241.768 -
241.769 - </xsl:for-each>
241.770 - </target>
241.771 - </xsl:template>
241.772 -
241.773 -</xsl:stylesheet>
242.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/resources/build.xsl Wed Feb 21 08:53:38 2007 +0000
242.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
242.3 @@ -1,103 +0,0 @@
242.4 -<?xml version="1.0" encoding="UTF-8"?>
242.5 -<!--
242.6 -The contents of this file are subject to the terms of the Common Development
242.7 -and Distribution License (the License). You may not use this file except in
242.8 -compliance with the License.
242.9 -
242.10 -You can obtain a copy of the License at http://www.netbeans.org/cddl.html
242.11 -or http://www.netbeans.org/cddl.txt.
242.12 -
242.13 -When distributing Covered Code, include this CDDL Header Notice in each file
242.14 -and include the License file at http://www.netbeans.org/cddl.txt.
242.15 -If applicable, add the following below the CDDL Header, with the fields
242.16 -enclosed by brackets [] replaced by your own identifying information:
242.17 -"Portions Copyrighted [year] [name of copyright owner]"
242.18 -
242.19 -The Original Software is NetBeans. The Initial Developer of the Original
242.20 -Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
242.21 -Microsystems, Inc. All Rights Reserved.
242.22 --->
242.23 -<xsl:stylesheet version="1.0"
242.24 - xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
242.25 - xmlns:project="http://www.netbeans.org/ns/project/1"
242.26 - xmlns:web="http://www.netbeans.org/ns/j2ee-ejbjarproject/1"
242.27 - xmlns:xalan="http://xml.apache.org/xslt"
242.28 - exclude-result-prefixes="xalan project">
242.29 - <xsl:output method="xml" indent="yes" encoding="UTF-8" xalan:indent-amount="4"/>
242.30 - <xsl:template match="/">
242.31 -
242.32 - <!-- Annoyingly, the JAXP impl in JRE 1.4.2 seems to randomly reorder attrs. -->
242.33 - <!-- (I.e. the DOM tree gets them in an unspecified order?) -->
242.34 - <!-- As a workaround, use xsl:attribute for all but the first attr. -->
242.35 - <!-- This seems to produce them in the order you want. -->
242.36 - <!-- Tedious, but appears to do the job. -->
242.37 - <!-- Important for build.xml, which is very visible; not so much for build-impl.xml. -->
242.38 -
242.39 - <xsl:comment> You may freely edit this file. See commented blocks below for </xsl:comment>
242.40 - <xsl:comment> some examples of how to customize the build. </xsl:comment>
242.41 - <xsl:comment> (If you delete it and reopen the project it will be recreated.) </xsl:comment>
242.42 -
242.43 - <xsl:variable name="name" select="/project:project/project:configuration/web:data/web:name"/>
242.44 - <project name="{$name}">
242.45 - <xsl:attribute name="default">default</xsl:attribute>
242.46 - <xsl:attribute name="basedir">.</xsl:attribute>
242.47 - <description>Builds, tests, and runs the project <xsl:value-of select="$name"/>.</description>
242.48 - <import file="nbproject/build-impl.xml"/>
242.49 -
242.50 - <xsl:comment><![CDATA[
242.51 -
242.52 - There exist several targets which are by default empty and which can be
242.53 - used for execution of your tasks. These targets are usually executed
242.54 - before and after some main targets. They are:
242.55 -
242.56 - pre-init: called before initialization of project properties
242.57 - post-init: called after initialization of project properties
242.58 - pre-compile: called before javac compilation
242.59 - post-compile: called after javac compilation
242.60 - pre-compile-single: called before javac compilation of single file
242.61 - post-compile-single: called after javac compilation of single file
242.62 - pre-dist: called before jar building
242.63 - post-dist: called after jar building
242.64 - post-clean: called after cleaning build products
242.65 -
242.66 - Example of pluging an obfuscator after the compilation could look like
242.67 -
242.68 - <target name="post-compile">
242.69 - <obfuscate>
242.70 - <fileset dir="${build.classes.dir}"/>
242.71 - </obfuscate>
242.72 - </target>
242.73 -
242.74 - For list of available properties check the imported
242.75 - nbproject/build-impl.xml file.
242.76 -
242.77 -
242.78 - Other way how to customize the build is by overriding existing main targets.
242.79 - The target of interest are:
242.80 -
242.81 - init-macrodef-javac: defines macro for javac compilation
242.82 - init-macrodef-debug: defines macro for class debugging
242.83 - do-dist: jar archive building
242.84 - run: execution of project
242.85 - javadoc-build: javadoc generation
242.86 -
242.87 - Example of overriding the target for project execution could look like
242.88 -
242.89 - <target name="run" depends="<PROJNAME>-impl.jar">
242.90 - <exec dir="bin" executable="launcher.exe">
242.91 - <arg file="${dist.jar}"/>
242.92 - </exec>
242.93 - </target>
242.94 -
242.95 - Notice that overridden target depends on jar target and not only on
242.96 - compile target as regular run target does. Again, for list of available
242.97 - properties which you can use check the target you are overriding in
242.98 - nbproject/build-impl.xml file.
242.99 -
242.100 - ]]></xsl:comment>
242.101 -
242.102 - </project>
242.103 -
242.104 - </xsl:template>
242.105 -
242.106 -</xsl:stylesheet>
243.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/resources/ejbjar.html Wed Feb 21 08:53:38 2007 +0000
243.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
243.3 @@ -1,24 +0,0 @@
243.4 -<!--
243.5 - - The contents of this file are subject to the terms of the Common Development
243.6 - - and Distribution License (the License). You may not use this file except in
243.7 - - compliance with the License.
243.8 - -
243.9 - - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
243.10 - - or http://www.netbeans.org/cddl.txt.
243.11 -
243.12 - - When distributing Covered Code, include this CDDL Header Notice in each file
243.13 - - and include the License file at http://www.netbeans.org/cddl.txt.
243.14 - - If applicable, add the following below the CDDL Header, with the fields
243.15 - - enclosed by brackets [] replaced by your own identifying information:
243.16 - - "Portions Copyrighted [year] [name of copyright owner]"
243.17 - -
243.18 - - The Original Software is NetBeans. The Initial Developer of the Original
243.19 - - Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
243.20 - - Microsystems, Inc. All Rights Reserved.
243.21 - -->
243.22 -
243.23 -<HTML>
243.24 - <BODY>
243.25 - The CAPS XLST Application Projects.
243.26 - </BODY>
243.27 -</HTML>
244.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/resources/emptyProject.html Wed Feb 21 08:53:38 2007 +0000
244.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
244.3 @@ -1,21 +0,0 @@
244.4 -<!--
244.5 - Sun Public License Notice
244.6 -
244.7 - The contents of this file are subject to the Sun Public License
244.8 - Version 1.0 (the "License"). You may not use this file except in
244.9 - compliance with the License. A copy of the License is available at
244.10 - http://www.sun.com/
244.11 -
244.12 - The Original Code is NetBeans. The Initial Developer of the Original
244.13 - Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
244.14 - Microsystems, Inc. All Rights Reserved.
244.15 -
244.16 --->
244.17 -
244.18 -<HTML>
244.19 - <BODY>
244.20 - The empty XSLT Project creates a project in the system but does not add
244.21 - any files or XSLT to the project. This template is best for XSLT developers who
244.22 - like to start from scratch.
244.23 - </BODY>
244.24 -</HTML>
245.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/resources/layer.xml Wed Feb 21 08:53:38 2007 +0000
245.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
245.3 @@ -1,63 +0,0 @@
245.4 -<?xml version="1.0" encoding="UTF-8"?>
245.5 -<!--
245.6 - The contents of this file are subject to the terms of the Common Development
245.7 - and Distribution License (the License). You may not use this file except in
245.8 - compliance with the License.
245.9 -
245.10 - You can obtain a copy of the License at http://www.netbeans.org/cddl.html
245.11 - or http://www.netbeans.org/cddl.txt.
245.12 -
245.13 - When distributing Covered Code, include this CDDL Header Notice in each file
245.14 - and include the License file at http://www.netbeans.org/cddl.txt.
245.15 - If applicable, add the following below the CDDL Header, with the fields
245.16 - enclosed by brackets [] replaced by your own identifying information:
245.17 - "Portions Copyrighted [year] [name of copyright owner]"
245.18 -
245.19 - The Original Software is NetBeans. The Initial Developer of the Original
245.20 - Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
245.21 - Microsystems, Inc. All Rights Reserved.
245.22 --->
245.23 -<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
245.24 -
245.25 -<filesystem>
245.26 - <folder name="Templates">
245.27 - <folder name="Project">
245.28 - <folder name="SOA">
245.29 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.project.prjwizard.Bundle"/>
245.30 - <attr name="instantiatingWizardURL" urlvalue="nbresloc:/org/netbeans/modules/xslt/project/resources/ejbjar.html"/>
245.31 -
245.32 - <file name="emptyXsltpro.xml">
245.33 - <attr name="template" boolvalue="true"/>
245.34 - <attr name="templateWizardIterator" newvalue="org.netbeans.modules.xslt.project.prjwizard.NewXsltproProjectWizardIterator"/>
245.35 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.project.prjwizard.Bundle"/>
245.36 - <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/modules/xslt/project/resources/xsltProjectIcon.png"/>
245.37 - <attr name="templateWizardURL" urlvalue="nbresloc:/org/netbeans/modules/xslt/project/resources/emptyProject.html"/>
245.38 - </file>
245.39 - </folder>
245.40 - </folder>
245.41 -
245.42 - <folder name="SOA">
245.43 - <file name="xslt.service">
245.44 - <attr name="template" boolvalue="true"/>
245.45 - <attr name="instantiatingIterator" newvalue="org.netbeans.modules.xslt.project.wizard.element.Iterator"/>
245.46 - <attr name="templateWizardURL" urlvalue="nbresloc:/org/netbeans/modules/xslt/project/resources/xslt.html"/>
245.47 - <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.xslt.project.resources.Bundle"/>
245.48 - <!--attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/modules/xslt/project/resources/xslt.gif"/-->
245.49 - <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/modules/xslt/core/resources/xslt_file.gif"/>
245.50 - </file>
245.51 - </folder>
245.52 - </folder>
245.53 -
245.54 - <folder name="org-netbeans-xsltpro">
245.55 - <file name="xsltmap.xml" url="xsltmap.xml"/>
245.56 - <file name="genPortmap.xsl" url="genPortmap.xsl"/>
245.57 - </folder>
245.58 -
245.59 - <folder name="SeeBeyondJbiComponents">
245.60 - <file name="com.sun.xsltse">
245.61 - <attr name="id" stringvalue="com.sun.xsltse-1.0-2"/>
245.62 - <attr name="description" stringvalue="This is a xslt service engine."/>
245.63 - <attr name="type" stringvalue="Engine"/>
245.64 - </file>
245.65 - </folder>
245.66 -</filesystem>
246.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/resources/xslt.html Wed Feb 21 08:53:38 2007 +0000
246.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
246.3 @@ -1,3 +0,0 @@
246.4 -<html><body>
246.5 - Creates new XSLT Service.
246.6 -</body></html>
247.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/spi/JbiArtifactProvider.java Wed Feb 21 08:53:38 2007 +0000
247.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
247.3 @@ -1,32 +0,0 @@
247.4 -/*
247.5 - * The contents of this file are subject to the terms of the Common Development
247.6 - * and Distribution License (the License). You may not use this file except in
247.7 - * compliance with the License.
247.8 - *
247.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
247.10 - * or http://www.netbeans.org/cddl.txt.
247.11 -
247.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
247.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
247.14 - * If applicable, add the following below the CDDL Header, with the fields
247.15 - * enclosed by brackets [] replaced by your own identifying information:
247.16 - * "Portions Copyrighted [year] [name of copyright owner]"
247.17 - *
247.18 - * The Original Software is NetBeans. The Initial Developer of the Original
247.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
247.20 - * Microsystems, Inc. All Rights Reserved.
247.21 - */
247.22 -
247.23 -package org.netbeans.modules.xslt.project.spi;
247.24 -
247.25 -import org.netbeans.spi.project.ant.AntArtifactProvider;
247.26 -
247.27 -/**
247.28 - * @author Vitaly Bychkov
247.29 - */
247.30 -public interface JbiArtifactProvider extends AntArtifactProvider {
247.31 -
247.32 - public static final String ARTIFACT_TYPE_JBI_ASA = "CAPS.asa";
247.33 -
247.34 - String getJbiServiceAssemblyType();
247.35 -}
248.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/ui/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
248.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
248.3 @@ -1,33 +0,0 @@
248.4 -# The contents of this file are subject to the terms of the Common Development
248.5 -# and Distribution License (the License). You may not use this file except in
248.6 -# compliance with the License.
248.7 -#
248.8 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
248.9 -# or http://www.netbeans.org/cddl.txt.
248.10 -
248.11 -# When distributing Covered Code, include this CDDL Header Notice in each file
248.12 -# and include the License file at http://www.netbeans.org/cddl.txt.
248.13 -# If applicable, add the following below the CDDL Header, with the fields
248.14 -# enclosed by brackets [] replaced by your own identifying information:
248.15 -# "Portions Copyrighted [year] [name of copyright owner]"
248.16 -#
248.17 -# The Original Software is NetBeans. The Initial Developer of the Original
248.18 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
248.19 -# Microsystems, Inc. All Rights Reserved.
248.20 -
248.21 -LBL_NoSelectedServerWarning_jLabel1=The target server has not been set.
248.22 -LBL_NoSelectedServerWarning_jLabel2=Please select the target &server\:
248.23 -CTL_NoSelectedServerWarning_Title=Warning - Select Server
248.24 -
248.25 -ACS_NoSelectedServerWarning_jLabel2_A11YDesc=Select the target application server
248.26 -
248.27 -LBL_Fix_Broken_Links_Action=Resolve Reference Problems...
248.28 -
248.29 -#BrokenReferencesAlertPanel
248.30 -MSG_Broken_References=One or more project resources could not be found. \
248.31 - Use project contextual action Resolve Reference Problems to fix the problems.
248.32 -MSG_Broken_References_Again=Show This Message &Again
248.33 -
248.34 -# XsltproProjectProperties
248.35 -LBL_JavacClasspath_DisplayName=Classpath for Compiling Sources
248.36 -LBL_BuildClassesDir_DisplayName=Compiled Sources
249.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/ui/NoSelectedServerWarning.form Wed Feb 21 08:53:38 2007 +0000
249.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
249.3 @@ -1,80 +0,0 @@
249.4 -<?xml version="1.0" encoding="UTF-8" ?>
249.5 -
249.6 -<Form version="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
249.7 - <AuxValues>
249.8 - <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
249.9 - <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
249.10 - <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
249.11 - <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
249.12 - <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
249.13 - </AuxValues>
249.14 -
249.15 - <Layout>
249.16 - <DimensionLayout dim="0">
249.17 - <Group type="103" groupAlignment="0" attributes="0">
249.18 - <Group type="102" attributes="0">
249.19 - <EmptySpace max="-2" attributes="0"/>
249.20 - <Group type="103" groupAlignment="0" attributes="0">
249.21 - <Component id="jLabel1" alignment="0" min="-2" pref="376" max="-2" attributes="0"/>
249.22 - <Component id="jLabel2" alignment="0" min="-2" pref="376" max="-2" attributes="0"/>
249.23 - <Component id="jScrollPane2" alignment="0" min="-2" pref="376" max="-2" attributes="0"/>
249.24 - </Group>
249.25 - <EmptySpace pref="14" max="32767" attributes="0"/>
249.26 - </Group>
249.27 - </Group>
249.28 - </DimensionLayout>
249.29 - <DimensionLayout dim="1">
249.30 - <Group type="103" groupAlignment="0" attributes="0">
249.31 - <Group type="102" attributes="0">
249.32 - <EmptySpace max="-2" attributes="0"/>
249.33 - <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
249.34 - <EmptySpace max="-2" attributes="0"/>
249.35 - <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
249.36 - <EmptySpace max="-2" attributes="0"/>
249.37 - <Component id="jScrollPane2" min="-2" pref="218" max="-2" attributes="0"/>
249.38 - <EmptySpace min="-2" pref="31" max="-2" attributes="0"/>
249.39 - </Group>
249.40 - </Group>
249.41 - </DimensionLayout>
249.42 - </Layout>
249.43 - <SubComponents>
249.44 - <Component class="javax.swing.JLabel" name="jLabel1">
249.45 - <Properties>
249.46 - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
249.47 - <ResourceString bundle="org/netbeans/modules/compapp/projects/base/ui/Bundle.properties" key="LBL_NoSelectedServerWarning_jLabel1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
249.48 - </Property>
249.49 - </Properties>
249.50 - </Component>
249.51 - <Component class="javax.swing.JLabel" name="jLabel2">
249.52 - <Properties>
249.53 - <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
249.54 - <ComponentRef name="jList1"/>
249.55 - </Property>
249.56 - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
249.57 - <ResourceString bundle="org/netbeans/modules/compapp/projects/base/ui/Bundle.properties" key="LBL_NoSelectedServerWarning_jLabel2" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
249.58 - </Property>
249.59 - </Properties>
249.60 - </Component>
249.61 - <Container class="javax.swing.JScrollPane" name="jScrollPane2">
249.62 - <Properties>
249.63 - <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
249.64 - <Dimension value="[100, 200]"/>
249.65 - </Property>
249.66 - </Properties>
249.67 -
249.68 - <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
249.69 - <SubComponents>
249.70 - <Component class="javax.swing.JList" name="jList1">
249.71 - <Properties>
249.72 - <Property name="selectionMode" type="int" value="0"/>
249.73 - </Properties>
249.74 - <AccessibilityProperties>
249.75 - <Property name="AccessibleContext.accessibleDescription" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
249.76 - <ResourceString bundle="org/netbeans/modules/compapp/projects/base/ui/Bundle.properties" key="ACS_NoSelectedServerWarning_jLabel2_A11YDesc" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
249.77 - </Property>
249.78 - </AccessibilityProperties>
249.79 - </Component>
249.80 - </SubComponents>
249.81 - </Container>
249.82 - </SubComponents>
249.83 -</Form>
250.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/ui/NoSelectedServerWarning.java Wed Feb 21 08:53:38 2007 +0000
250.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
250.3 @@ -1,163 +0,0 @@
250.4 -/*
250.5 - * The contents of this file are subject to the terms of the Common Development
250.6 - * and Distribution License (the License). You may not use this file except in
250.7 - * compliance with the License.
250.8 - *
250.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
250.10 - * or http://www.netbeans.org/cddl.txt.
250.11 -
250.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
250.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
250.14 - * If applicable, add the following below the CDDL Header, with the fields
250.15 - * enclosed by brackets [] replaced by your own identifying information:
250.16 - * "Portions Copyrighted [year] [name of copyright owner]"
250.17 - *
250.18 - * The Original Software is NetBeans. The Initial Developer of the Original
250.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
250.20 - * Microsystems, Inc. All Rights Reserved.
250.21 - */
250.22 -
250.23 -
250.24 -package org.netbeans.modules.xslt.project.ui;
250.25 -
250.26 -import java.awt.Component;
250.27 -import javax.swing.*;
250.28 -import org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment;
250.29 -
250.30 -/**
250.31 - * Show a warning that no server is set and allows choose it.
250.32 - * @author Pavel Buzek
250.33 - * @author Vitaly Bychkov
250.34 - */
250.35 -public class NoSelectedServerWarning extends JPanel {
250.36 -
250.37 - public NoSelectedServerWarning (String serverID) {
250.38 - initComponents();
250.39 - // add MainClassChooser
250.40 - jList1.setModel(new ServerListModel (serverID));
250.41 - jList1.setSelectionMode (ListSelectionModel.SINGLE_SELECTION);
250.42 - jList1.setCellRenderer(new ServersRenderer ());
250.43 - }
250.44 -
250.45 - /** Returns the selected server instance Id or null if no instance was selected.
250.46 - *
250.47 - * @return server instance ID or null if no instance is selected
250.48 - */
250.49 - public String getSelectedInstance () {
250.50 - if (jList1.getSelectedIndex () == -1) {
250.51 - return null;
250.52 - } else {
250.53 - return (String)jList1.getSelectedValue ();
250.54 - }
250.55 - }
250.56 -
250.57 - /** This method is called from within the constructor to
250.58 - * initialize the form.
250.59 - * WARNING: Do NOT modify this code. The content of this method is
250.60 - * always regenerated by the Form Editor.
250.61 - */
250.62 - // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
250.63 - private void initComponents() {
250.64 - jLabel1 = new javax.swing.JLabel();
250.65 - jLabel2 = new javax.swing.JLabel();
250.66 - jScrollPane2 = new javax.swing.JScrollPane();
250.67 - jList1 = new javax.swing.JList();
250.68 -
250.69 - org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(NoSelectedServerWarning.class, "LBL_NoSelectedServerWarning_jLabel1"));
250.70 -
250.71 - jLabel2.setLabelFor(jList1);
250.72 - org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(NoSelectedServerWarning.class, "LBL_NoSelectedServerWarning_jLabel2"));
250.73 -
250.74 - jScrollPane2.setMinimumSize(new java.awt.Dimension(100, 200));
250.75 - jList1.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
250.76 - jScrollPane2.setViewportView(jList1);
250.77 - jList1.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(NoSelectedServerWarning.class, "ACS_NoSelectedServerWarning_jLabel2_A11YDesc"));
250.78 -
250.79 - org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
250.80 - this.setLayout(layout);
250.81 - layout.setHorizontalGroup(
250.82 - layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
250.83 - .add(layout.createSequentialGroup()
250.84 - .addContainerGap()
250.85 - .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
250.86 - .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 376, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
250.87 - .add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 376, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
250.88 - .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 376, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
250.89 - .addContainerGap(14, Short.MAX_VALUE))
250.90 - );
250.91 - layout.setVerticalGroup(
250.92 - layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
250.93 - .add(layout.createSequentialGroup()
250.94 - .addContainerGap()
250.95 - .add(jLabel1)
250.96 - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
250.97 - .add(jLabel2)
250.98 - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
250.99 - .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 218, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
250.100 - .add(31, 31, 31))
250.101 - );
250.102 - }// </editor-fold>//GEN-END:initComponents
250.103 -
250.104 -
250.105 - // Variables declaration - do not modify//GEN-BEGIN:variables
250.106 - private javax.swing.JLabel jLabel1;
250.107 - private javax.swing.JLabel jLabel2;
250.108 - private javax.swing.JList jList1;
250.109 - private javax.swing.JScrollPane jScrollPane2;
250.110 - // End of variables declaration//GEN-END:variables
250.111 -
250.112 -
250.113 - private static final class ServerListModel extends AbstractListModel {
250.114 -
250.115 - private String serverID;
250.116 - private String instances [];
250.117 -
250.118 - public ServerListModel (String serverID) {
250.119 - this.serverID = serverID;
250.120 - this.instances = Deployment.getDefault ().getInstancesOfServer (serverID);
250.121 - }
250.122 -
250.123 - public synchronized int getSize() {
250.124 - return instances.length;
250.125 - }
250.126 -
250.127 - public synchronized Object getElementAt (int index) {
250.128 - if (index >= 0 && index < instances.length) {
250.129 - return instances [index];
250.130 - }
250.131 - else {
250.132 - return null;
250.133 - }
250.134 - }
250.135 -
250.136 - }
250.137 -
250.138 - private static final class ServersRenderer extends JLabel implements ListCellRenderer {
250.139 - ServersRenderer () {
250.140 - setOpaque (true);
250.141 - }
250.142 -
250.143 - public Component getListCellRendererComponent (JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
250.144 - if (value instanceof String) {
250.145 - String id = (String) value;
250.146 - setText (Deployment.getDefault ().getServerInstanceDisplayName (id));
250.147 -// setIcon (ProjectUtils.getInformation (prj).getIcon ());
250.148 - } else {
250.149 - setText (value.toString ());
250.150 - setIcon (null);
250.151 - }
250.152 - if (isSelected) {
250.153 - setBackground(list.getSelectionBackground());
250.154 - setForeground(list.getSelectionForeground());
250.155 - //setBorder (BorderFactory.createLineBorder (Color.BLACK));
250.156 - }
250.157 - else {
250.158 - setBackground(list.getBackground());
250.159 - setForeground(list.getForeground());
250.160 - //setBorder (null);
250.161 - }
250.162 - return this;
250.163 - }
250.164 - }
250.165 -
250.166 -}
251.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/Bundle.properties Wed Feb 21 08:53:38 2007 +0000
251.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
251.3 @@ -1,91 +0,0 @@
251.4 -#
251.5 -# The contents of this file are subject to the terms of the Common Development
251.6 -# and Distribution License (the License). You may not use this file except in
251.7 -# compliance with the License.
251.8 -#
251.9 -# You can obtain a copy of the License at http://www.netbeans.org/cddl.html
251.10 -# or http://www.netbeans.org/cddl.txt.
251.11 -#
251.12 -# When distributing Covered Code, include this CDDL Header Notice in each file
251.13 -# and include the License file at http://www.netbeans.org/cddl.txt.
251.14 -# If applicable, add the following below the CDDL Header, with the fields
251.15 -# enclosed by brackets [] replaced by your own identifying information:
251.16 -# "Portions Copyrighted [year] [name of copyright owner]"
251.17 -#
251.18 -# The Original Software is NetBeans. The Initial Developer of the Original
251.19 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
251.20 -# Microsystems, Inc. All Rights Reserved.
251.21 -
251.22 -# Iterator
251.23 -LBL_Title=XSLT Service
251.24 -
251.25 -# Util
251.26 -# {0} - argument
251.27 -ERR_Illegal_Argument=illegal argument - {0}
251.28 -
251.29 -# Panel.Startup
251.30 -LBL_Transformation=&Request-Reply Service
251.31 -LBL_Transformation_Text=The XSLT service receives a message from a web service, transforms it and sends it back.
251.32 -LBL_Proxy=&Service Proxy
251.33 -LBL_Proxy_Text=The XSLT service acts as a proxy service, transforming messages exchanged by two web services.
251.34 -
251.35 -# Panel.WSDL
251.36 -# {0} - message
251.37 -ERR_Occurred=Error occurred: {0}
251.38 -# {0} - file name
251.39 -ERR_File_Already_Exists=File {0} already exists.
251.40 -ERR_File_Name_Must_Be_Specified=File name must be specified!
251.41 -LBL_Existing_WSDL=&Existing WSDL file
251.42 -LBL_Create_New_WSDL=&Create new WSDL file
251.43 -LBL_Name=&Name
251.44 -
251.45 -# Panel.WebService
251.46 -ERR_Web_Service_Is_Required=Web Service is required.
251.47 -LBL_Web_Service_File=&Web Service:
251.48 -TLT_Browse_WSDL=Browse WSDL file
251.49 -LBL_Browse_WSDL=&Browse ...
251.50 -
251.51 -# Dialog
251.52 -LBL_Name=Name:
251.53 -ERR_Name_Must_Be_Specified=Name must be specified!
251.54 -
251.55 -# Dialog.Operation
251.56 -LBL_Enter_Operation_Name=Enter Operation Name
251.57 -
251.58 -# Panel.Operation
251.59 -ERR_Input_Type_Must_Be_Specified=Input type must be specified!
251.60 -ERR_Output_Type_Must_Be_Specified=Output type must be specified!
251.61 -ERR_Operation_Is_Required=Operation is required.
251.62 -ERR_Operation_With_Input_Is_Required=Operation with input is required.
251.63 -ERR_Operation_With_Output_Is_Required=Operation with output is required.
251.64 -LBL_Operation=&Operation:
251.65 -TLT_Create_Operation=Create new operation
251.66 -LBL_Create_Operation=Cre&ate ...
251.67 -LBL_Input_Type=&Input Type:
251.68 -LBL_Output_Type=Output &Type:
251.69 -LBL_XSL_File=&XSL File:
251.70 -TLT_Choose_Input_Type=Allows to choose input type
251.71 -LBL_Choose_Input_Type=&Choose ...
251.72 -TLT_Choose_Output_Type=Allows to choose output type
251.73 -LBL_Choose_Output_Type=C&hoose ...
251.74 -LBL_Partner_Role_Port=&Port (Partner/Role):
251.75 -LBL_Transform_JBI=Transform &JBI
251.76 -
251.77 -# Dialog.Type
251.78 -LBL_Select_Type=Select Type
251.79 -TLT_Browse_Schema=Browse Schema file
251.80 -LBL_Browse_Schema=&Browse ...
251.81 -
251.82 -# Panel.Proxy
251.83 -# {0} - from
251.84 -# {1} - to
251.85 -LBL_From_To={0} -> {1}
251.86 -LBL_We_Implement=We Implement
251.87 -LBL_We_Call=We Call
251.88 -LBL_Transform_Request=Transform Re&quest
251.89 -LBL_Transform_Reply=Transform Rep&ly
251.90 -
251.91 -# Panel
251.92 -LBL_Service_Type=Service type
251.93 -LBL_WSDL_File=WSDL file
251.94 -LBL_XSLT_Configuration=XSLT configuration
252.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/Iterator.java Wed Feb 21 08:53:38 2007 +0000
252.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
252.3 @@ -1,216 +0,0 @@
252.4 -/*
252.5 - * The contents of this file are subject to the terms of the Common Development
252.6 - * and Distribution License (the License). You may not use this file except in
252.7 - * compliance with the License.
252.8 - *
252.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
252.10 - * or http://www.netbeans.org/cddl.txt.
252.11 - *
252.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
252.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
252.14 - * If applicable, add the following below the CDDL Header, with the fields
252.15 - * enclosed by brackets [] replaced by your own identifying information:
252.16 - * "Portions Copyrighted [year] [name of copyright owner]"
252.17 - *
252.18 - * The Original Software is NetBeans. The Initial Developer of the Original
252.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
252.20 - * Microsystems, Inc. All Rights Reserved.
252.21 - */
252.22 -package org.netbeans.modules.xslt.project.wizard.element;
252.23 -
252.24 -import java.io.IOException;
252.25 -import java.util.Collections;
252.26 -import java.util.Set;
252.27 -import javax.swing.event.ChangeListener;
252.28 -
252.29 -import org.openide.WizardDescriptor;
252.30 -import org.openide.filesystems.FileObject;
252.31 -import org.openide.loaders.TemplateWizard;
252.32 -
252.33 -import org.netbeans.api.project.Project;
252.34 -import org.netbeans.spi.project.ui.templates.support.Templates;
252.35 -import org.netbeans.modules.xml.wsdl.model.Message;
252.36 -import org.netbeans.modules.xml.wsdl.model.Operation;
252.37 -
252.38 -import org.netbeans.modules.xslt.core.xsltmap.AbstractTransformationDesc;
252.39 -import org.netbeans.modules.xslt.core.xsltmap.AbstractTransformationUC;
252.40 -import org.netbeans.modules.xslt.core.xsltmap.FilterOneWayUC;
252.41 -import org.netbeans.modules.xslt.core.xsltmap.FilterRequestReplyUC;
252.42 -import org.netbeans.modules.xslt.core.xsltmap.InputTransformationDesc;
252.43 -import org.netbeans.modules.xslt.core.xsltmap.OutputTransformationDesc;
252.44 -import org.netbeans.modules.xslt.core.xsltmap.RequestReplyServiceUC;
252.45 -import org.netbeans.modules.xslt.core.xsltmap.XsltMapModel;
252.46 -
252.47 -import static org.netbeans.modules.print.api.PrintUI.*;
252.48 -
252.49 -/**
252.50 - * @author Vladimir Yaroslavskiy
252.51 - * @version 2006.12.25
252.52 - */
252.53 -public final class Iterator implements TemplateWizard.Iterator {
252.54 -
252.55 - /**{@inheritDoc}*/
252.56 - public static Iterator createXsl() {
252.57 - return new Iterator();
252.58 - }
252.59 -
252.60 - /**{@inheritDoc}*/
252.61 - public Set instantiate(TemplateWizard wizard) throws IOException {
252.62 - return Collections.singleton(createFiles(wizard));
252.63 - }
252.64 -
252.65 - /**{@inheritDoc}*/
252.66 - public void initialize(TemplateWizard wizard) {
252.67 - myPanel = new PanelStartup(Templates.getProject(wizard), null);
252.68 - }
252.69 -
252.70 - /**{@inheritDoc}*/
252.71 - public void uninitialize(TemplateWizard wizard) {
252.72 - myPanel = null;
252.73 - }
252.74 -
252.75 - /**{@inheritDoc}*/
252.76 - public String name() {
252.77 - return i18n(Iterator.class, "LBL_Title"); // NOI18N
252.78 - }
252.79 -
252.80 - /**{@inheritDoc}*/
252.81 - public boolean hasNext() {
252.82 - return myPanel.getNext() != null;
252.83 - }
252.84 -
252.85 - /**{@inheritDoc}*/
252.86 - public boolean hasPrevious() {
252.87 - return myPanel.getPrevious() != null;
252.88 - }
252.89 -
252.90 - /**{@inheritDoc}*/
252.91 - public void nextPanel() {
252.92 - myPanel = myPanel.getNext();
252.93 - }
252.94 -
252.95 - /**{@inheritDoc}*/
252.96 - public void previousPanel() {
252.97 - myPanel = myPanel.getPrevious();
252.98 - }
252.99 -
252.100 - /**{@inheritDoc}*/
252.101 - public WizardDescriptor.Panel current() {
252.102 - return myPanel;
252.103 - }
252.104 -
252.105 - /**{@inheritDoc}*/
252.106 - public void addChangeListener(ChangeListener listener) {}
252.107 -
252.108 - /**{@inheritDoc}*/
252.109 - public void removeChangeListener(ChangeListener listener) {}
252.110 -
252.111 - private FileObject createFiles(TemplateWizard wizard) throws IOException {
252.112 - FileObject file = null;
252.113 - Project project = Templates.getProject(wizard);
252.114 - String choice = (String) wizard.getProperty(Panel.CHOICE);
252.115 - XsltMapModel model = XsltMapModel.getDefault(project);
252.116 - AbstractTransformationUC use = null;
252.117 -
252.118 - if (Panel.CHOICE_REQUEST_REPLY.equals(choice)) {
252.119 - use = createRequestReply(model, wizard);
252.120 - file = createXslFile(project, (String) wizard.getProperty(Panel.INPUT_FILE));
252.121 - }
252.122 - else if (Panel.CHOICE_FILTER_ONE_WAY.equals(choice)) {
252.123 - use = createFilterOneWay(model, wizard);
252.124 - file = createXslFile(project, (String) wizard.getProperty(Panel.INPUT_FILE));
252.125 - }
252.126 - else if (Panel.CHOICE_FILTER_REQUEST_REPLY.equals(choice)) {
252.127 - use = createFilterRequestReply(model, wizard);
252.128 - file = createXslFile(project, (String) wizard.getProperty(Panel.INPUT_FILE));
252.129 - file = createXslFile(project, (String) wizard.getProperty(Panel.OUTPUT_FILE));
252.130 - }
252.131 - model.addTransformationUC(use);
252.132 - model.sync();
252.133 -
252.134 - return file;
252.135 - }
252.136 -
252.137 - private AbstractTransformationUC createRequestReply(
252.138 - XsltMapModel model,
252.139 - TemplateWizard wizard)
252.140 - {
252.141 - AbstractTransformationUC use = new RequestReplyServiceUC(model);
252.142 - createDescription(new InputTransformationDesc(model, use), wizard, true);
252.143 - return use;
252.144 - }
252.145 -
252.146 - private AbstractTransformationUC createFilterOneWay(
252.147 - XsltMapModel model,
252.148 - TemplateWizard wizard)
252.149 - {
252.150 - AbstractTransformationUC use = new FilterOneWayUC(model);
252.151 - createDescription(new InputTransformationDesc(model, use), wizard, true);
252.152 - createDescription(new OutputTransformationDesc(model, use), wizard, false);
252.153 - return use;
252.154 - }
252.155 -
252.156 - private AbstractTransformationUC createFilterRequestReply(
252.157 - XsltMapModel model,
252.158 - TemplateWizard wizard)
252.159 - {
252.160 - AbstractTransformationUC use = new FilterRequestReplyUC(model);
252.161 - createDescription(new InputTransformationDesc(model, use), wizard, true);
252.162 - createDescription(new OutputTransformationDesc(model, use), wizard, false);
252.163 - return use;
252.164 - }
252.165 -
252.166 - private void createDescription(
252.167 - AbstractTransformationDesc description,
252.168 - TemplateWizard wizard,
252.169 - boolean isInput)
252.170 - {
252.171 - String file;
252.172 - Operation operation;
252.173 - Panel.PartnerRolePort partnerRolePort;
252.174 -
252.175 - if (isInput) {
252.176 - file = (String) wizard.getProperty(Panel.INPUT_FILE);
252.177 - operation = (Operation) wizard.getProperty(Panel.INPUT_OPERATION);
252.178 - partnerRolePort =
252.179 - (Panel.PartnerRolePort) wizard.getProperty(Panel.INPUT_PARTNER_ROLE_PORT);
252.180 - description.setTransformJBI(
252.181 - ((Boolean) wizard.getProperty(Panel.INPUT_TRANSFORM_JBI)).booleanValue());
252.182 - }
252.183 - else {
252.184 - file = (String) wizard.getProperty(Panel.OUTPUT_FILE);
252.185 - operation = (Operation) wizard.getProperty(Panel.OUTPUT_OPERATION);
252.186 - partnerRolePort =
252.187 - (Panel.PartnerRolePort) wizard.getProperty(Panel.OUTPUT_PARTNER_ROLE_PORT);
252.188 - description.setTransformJBI(
252.189 - ((Boolean) wizard.getProperty(Panel.OUTPUT_TRANSFORM_JBI)).booleanValue());
252.190 - }
252.191 - String namespace =
252.192 - "{" + operation.getModel().getDefinitions().getTargetNamespace()+"}"; // NOI18N
252.193 - description.setPartnerLink(
252.194 - namespace + partnerRolePort.getPartnerLinkType().getName());
252.195 - description.setRoleName(partnerRolePort.getRole().getName());
252.196 - description.setPortType(
252.197 - namespace + partnerRolePort.getPortType().getName());
252.198 -
252.199 - description.setOperation(operation.getName());
252.200 -
252.201 - Message message = operation.getOutput().getMessage().get();
252.202 - description.setMessageType(namespace + message.getName());
252.203 -
252.204 - description.setFile(file);
252.205 - }
252.206 -
252.207 - private FileObject createXslFile(Project project, String file) throws IOException {
252.208 - String text =
252.209 - "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform" + // NOI18N
252.210 - "\" version=\"1.0\">" + LS + // NOI18N
252.211 - " <xsl:template match=\"/\">" + LS + // NOI18N
252.212 - " </xsl:template>" + LS + // NOI18N
252.213 - "</xsl:stylesheet>"; // NOI18N
252.214 -
252.215 - return Util.createFile(Util.getSrcFolder(project), file, text);
252.216 - }
252.217 -
252.218 - private Panel myPanel;
252.219 -}
253.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/Panel.java Wed Feb 21 08:53:38 2007 +0000
253.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
253.3 @@ -1,366 +0,0 @@
253.4 -/*
253.5 - * The contents of this file are subject to the terms of the Common Development
253.6 - * and Distribution License (the License). You may not use this file except in
253.7 - * compliance with the License.
253.8 - *
253.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
253.10 - * or http://www.netbeans.org/cddl.txt.
253.11 - *
253.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
253.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
253.14 - * If applicable, add the following below the CDDL Header, with the fields
253.15 - * enclosed by brackets [] replaced by your own identifying information:
253.16 - * "Portions Copyrighted [year] [name of copyright owner]"
253.17 - *
253.18 - * The Original Software is NetBeans. The Initial Developer of the Original
253.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
253.20 - * Microsystems, Inc. All Rights Reserved.
253.21 - */
253.22 -package org.netbeans.modules.xslt.project.wizard.element;
253.23 -
253.24 -import java.awt.Component;
253.25 -import java.awt.GridBagConstraints;
253.26 -import java.awt.GridBagLayout;
253.27 -import java.awt.Insets;
253.28 -import java.util.Collection;
253.29 -
253.30 -import javax.swing.DefaultListCellRenderer;
253.31 -import javax.swing.JList;
253.32 -import javax.swing.JPanel;
253.33 -import javax.swing.event.ChangeListener;
253.34 -
253.35 -import org.openide.WizardDescriptor;
253.36 -import org.openide.WizardValidationException;
253.37 -import org.openide.filesystems.FileObject;
253.38 -import org.openide.util.HelpCtx;
253.39 -
253.40 -import org.netbeans.api.project.Project;
253.41 -import org.netbeans.modules.xml.xam.dom.NamedComponentReference;
253.42 -import org.netbeans.modules.xml.schema.model.GlobalElement;
253.43 -import org.netbeans.modules.xml.schema.model.GlobalType;
253.44 -import org.netbeans.modules.xml.wsdl.model.Message;
253.45 -import org.netbeans.modules.xml.wsdl.model.Operation;
253.46 -import org.netbeans.modules.xml.wsdl.model.OperationParameter;
253.47 -import org.netbeans.modules.xml.wsdl.model.Part;
253.48 -import org.netbeans.modules.xml.wsdl.model.PortType;
253.49 -import org.netbeans.modules.xml.wsdl.model.extensions.bpel.PartnerLinkType;
253.50 -import org.netbeans.modules.xml.wsdl.model.extensions.bpel.Role;
253.51 -
253.52 -/**
253.53 - * @author Vladimir Yaroslavskiy
253.54 - * @version 2006.12.25
253.55 - */
253.56 -abstract class Panel implements WizardDescriptor.ValidatingPanel {
253.57 -
253.58 - Panel(Project project, Panel parent) {
253.59 - myProject = project;
253.60 - myFolder = Util.getSrcFolder(project);
253.61 - myParent = parent;
253.62 - }
253.63 -
253.64 - protected final Project getProject() {
253.65 - return myProject;
253.66 - }
253.67 -
253.68 - protected final FileObject getFolder() {
253.69 - return myFolder;
253.70 - }
253.71 -
253.72 - protected final Panel getParent() {
253.73 - return myParent;
253.74 - }
253.75 -
253.76 - protected abstract void createPanel(JPanel panel, GridBagConstraints c);
253.77 - protected void setEnabled(boolean enabled) {}
253.78 - protected void update() {}
253.79 -
253.80 - protected String getComponentName() {
253.81 - return null;
253.82 - }
253.83 -
253.84 - protected Panel getNext() {
253.85 - return null;
253.86 - }
253.87 -
253.88 - protected Object getResult() {
253.89 - return null;
253.90 - }
253.91 -
253.92 - protected final Panel getPrevious() {
253.93 - return myParent;
253.94 - }
253.95 -
253.96 - protected String getError() {
253.97 - return null;
253.98 - }
253.99 -
253.100 - protected final String getError(String error1, String error2) {
253.101 - if (error1 != null) {
253.102 - return error1;
253.103 - }
253.104 - return error2;
253.105 - }
253.106 -
253.107 - public JPanel getComponent() {
253.108 - if (myComponent == null) {
253.109 - myComponent = createMainPanel();
253.110 - String name = getComponentName();
253.111 - myComponent.setName(name);
253.112 -
253.113 - String [] steps = new String [] {NAME_TYPE, NAME_WSDL, NAME_XSLT};
253.114 - myComponent.putClientProperty("WizardPanel_contentData", steps); // NOI18N
253.115 -
253.116 - for (int i=0; i < steps.length; i++) {
253.117 - if (name.equals(steps [i])) {
253.118 - myComponent.putClientProperty(
253.119 - "WizardPanel_contentSelectedIndex", new Integer(i - 1)); // NOI18N
253.120 - }
253.121 - }
253.122 - }
253.123 - return myComponent;
253.124 - }
253.125 -
253.126 - private JPanel createMainPanel() {
253.127 - JPanel panel = new JPanel(new GridBagLayout());
253.128 - GridBagConstraints c = new GridBagConstraints();
253.129 -
253.130 - c.weightx = 1.0;
253.131 - c.weighty = 1.0;
253.132 - c.insets = new Insets(0, 0, 0, 0);
253.133 - c.anchor = GridBagConstraints.NORTHWEST;
253.134 - c.fill = GridBagConstraints.HORIZONTAL;
253.135 - createPanel(panel, c);
253.136 -
253.137 -// panel.setBorder(new javax.swing.border.LineBorder(java.awt.Color.red));
253.138 - return panel;
253.139 - }
253.140 -
253.141 - public void validate() throws WizardValidationException {
253.142 - String error = getError();
253.143 -
253.144 - if (error != null) {
253.145 - throw new WizardValidationException(myComponent, error, error);
253.146 - }
253.147 - }
253.148 -
253.149 - protected final String i18n(String key) {
253.150 - return org.netbeans.modules.print.api.PrintUI.i18n(Panel.class, key);
253.151 - }
253.152 -
253.153 - protected final String i18n(String key, String param) {
253.154 - return org.netbeans.modules.print.api.PrintUI.i18n(Panel.class, key, param);
253.155 - }
253.156 -
253.157 - protected final String i18n(String key, String param1, String param2) {
253.158 - return org.netbeans.modules.print.api.PrintUI.i18n(
253.159 - Panel.class, key, param1, param2);
253.160 - }
253.161 -
253.162 - public boolean isValid() {
253.163 - return true;
253.164 - }
253.165 -
253.166 - public HelpCtx getHelp() {
253.167 - return HelpCtx.DEFAULT_HELP;
253.168 - }
253.169 -
253.170 - public void storeSettings(Object object) {}
253.171 -
253.172 - public void addChangeListener(ChangeListener listener) {}
253.173 - public void removeChangeListener(ChangeListener listener) {}
253.174 - public void readSettings(Object object) {}
253.175 -
253.176 - protected final int getXslFileNumber(int start) {
253.177 - int count = start;
253.178 -
253.179 - while (true) {
253.180 - if (getFolder().getFileObject(NAME + count, EXT) == null) {
253.181 - return count;
253.182 - }
253.183 - count++;
253.184 - }
253.185 - }
253.186 -
253.187 - protected final String getXslFileName(int number) {
253.188 - return NAME + number + DOT + EXT;
253.189 - }
253.190 -
253.191 - protected final String getType(OperationParameter parameter) {
253.192 - if (parameter == null) {
253.193 -//out("1");
253.194 - return EMPTY;
253.195 - }
253.196 - NamedComponentReference<Message> reference = parameter.getMessage();
253.197 -
253.198 - if (reference == null) {
253.199 -//out("2");
253.200 - return EMPTY;
253.201 - }
253.202 - Message message = reference.get();
253.203 -
253.204 - if (message == null) {
253.205 -//out("3");
253.206 - return EMPTY;
253.207 - }
253.208 - Collection<Part> parts = message.getParts();
253.209 -
253.210 - if (parts == null) {
253.211 -//out("4");
253.212 - return EMPTY;
253.213 - }
253.214 - java.util.Iterator<Part> iterator = parts.iterator();
253.215 -
253.216 - if ( !iterator.hasNext()) {
253.217 -//out("5");
253.218 - return EMPTY;
253.219 - }
253.220 - return getType(iterator.next());
253.221 - }
253.222 -
253.223 - private String getType(Part part) {
253.224 - NamedComponentReference<GlobalType> refType = part.getType();
253.225 -
253.226 - if (refType != null) {
253.227 - GlobalType type = refType.get();
253.228 -
253.229 - if (type != null) {
253.230 - return type.getName();
253.231 - }
253.232 - }
253.233 - NamedComponentReference<GlobalElement> refElement = part.getElement();
253.234 -
253.235 - if (refElement != null) {
253.236 - GlobalElement element = refElement.get();
253.237 -
253.238 - if (element != null) {
253.239 - return element.getName();
253.240 - }
253.241 - }
253.242 - return EMPTY;
253.243 - }
253.244 -
253.245 - // -------------------------------------------------------
253.246 - protected class Renderer extends DefaultListCellRenderer {
253.247 -
253.248 - public Component getListCellRendererComponent(
253.249 - JList list, Object value, int index,
253.250 - boolean isSelected, boolean hasFocus)
253.251 - {
253.252 - super.getListCellRendererComponent(list, value, index, isSelected, hasFocus);
253.253 -
253.254 - if (value instanceof FileObject) {
253.255 - setText(Util.calculateRelativeName((FileObject) value, getProject()));
253.256 - }
253.257 - if (value instanceof Operation) {
253.258 - setText(((Operation) value).getName());
253.259 - }
253.260 - if (value instanceof PartnerRolePort) {
253.261 - setText(((PartnerRolePort) value).getName());
253.262 - }
253.263 - return this;
253.264 - }
253.265 - }
253.266 -
253.267 - // ----------------------------------
253.268 - public static class PartnerRolePort {
253.269 - public PartnerRolePort(
253.270 - PartnerLinkType partnerLinkType,
253.271 - Role role,
253.272 - PortType portType)
253.273 - {
253.274 - myPartnerLinkType = partnerLinkType;
253.275 - myRole = role;
253.276 - myPortType = portType;
253.277 - }
253.278 -
253.279 - public PartnerLinkType getPartnerLinkType() {
253.280 - return myPartnerLinkType;
253.281 - }
253.282 -
253.283 - public Role getRole() {
253.284 - return myRole;
253.285 - }
253.286 -
253.287 - public PortType getPortType() {
253.288 - return myPortType;
253.289 - }
253.290 -
253.291 - public String getName() {
253.292 - return
253.293 - myPortType.getName() + " (" + // NOI18N
253.294 - myPartnerLinkType.getName() + "/" + // NOI18N
253.295 - myRole.getName() + ")"; // NOI18N
253.296 - }
253.297 -
253.298 - /**{@inheritDoc}*/
253.299 - @Override
253.300 - public boolean equals(Object object)
253.301 - {
253.302 - if ( !(object instanceof PartnerRolePort)) {
253.303 - return false;
253.304 - }
253.305 - PartnerRolePort partnerRolePort = (PartnerRolePort) object;
253.306 -
253.307 - return
253.308 - partnerRolePort.getPartnerLinkType().equals(getPartnerLinkType()) &&
253.309 - partnerRolePort.getRole().equals(getRole()) &&
253.310 - partnerRolePort.getPortType().equals(getPortType());
253.311 - }
253.312 -
253.313 - /**{@inheritDoc}*/
253.314 - @Override
253.315 - public int hashCode()
253.316 - {
253.317 - return
253.318 - getPartnerLinkType().hashCode() *
253.319 - getRole().hashCode() *
253.320 - getPortType().hashCode();
253.321 - }
253.322 -
253.323 - private Role myRole;
253.324 - private PortType myPortType;
253.325 - private PartnerLinkType myPartnerLinkType;
253.326 - }
253.327 -
253.328 - private Project myProject;
253.329 - private JPanel myComponent;
253.330 - private FileObject myFolder;
253.331 - private Panel myParent;
253.332 -
253.333 - private static final String NAME = "xsl"; // NOI18N
253.334 - private static final String EXT = "xsl"; // NOI18N
253.335 - private static final String DOT = "."; // NOI18N
253.336 -
253.337 - protected static final String EMPTY = ""; // NOI18N
253.338 -
253.339 - protected static final String NAME_TYPE =
253.340 - org.netbeans.modules.print.api.PrintUI.i18n(Panel.class,
253.341 - "LBL_Service_Type"); // NOI18N
253.342 -
253.343 - protected static final String NAME_WSDL =
253.344 - org.netbeans.modules.print.api.PrintUI.i18n(Panel.class,
253.345 - "LBL_WSDL_File"); // NOI18N
253.346 -
253.347 - protected static final String NAME_XSLT =
253.348 - org.netbeans.modules.print.api.PrintUI.i18n(Panel.class,
253.349 - "LBL_XSLT_Configuration"); // NOI18N
253.350 -
253.351 - public static final String INPUT_FILE = "input.file"; // NOI18N
253.352 - public static final String INPUT_OPERATION = "input.operation"; // NOI18N
253.353 - public static final String INPUT_PARTNER_ROLE_PORT =
253.354 - "input.partner.role.port"; // NOI18N
253.355 - public static final String INPUT_TRANSFORM_JBI = "input.transform.jbi"; // NOI18N
253.356 -
253.357 - public static final String OUTPUT_FILE = "output.file"; // NOI18N
253.358 - public static final String OUTPUT_OPERATION = "output.operation"; // NOI18N
253.359 - public static final String OUTPUT_PARTNER_ROLE_PORT =
253.360 - "output.partner.role.port"; // NOI18N
253.361 - public static final String OUTPUT_TRANSFORM_JBI = "output.transform.jbi"; // NOI18N
253.362 -
253.363 - public static final String CHOICE = "choice"; // NOI18N
253.364 - public static final String CHOICE_REQUEST_REPLY = "choice.request.reply"; // NOI18N
253.365 - public static final String CHOICE_FILTER_ONE_WAY =
253.366 - "choice.filter.one.way"; // NOI18N
253.367 - public static final String CHOICE_FILTER_REQUEST_REPLY =
253.368 - "choice.filter.request.reply"; // NOI18N
253.369 -}
254.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelOperation.java Wed Feb 21 08:53:38 2007 +0000
254.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
254.3 @@ -1,657 +0,0 @@
254.4 -/*
254.5 - * The contents of this file are subject to the terms of the Common Development
254.6 - * and Distribution License (the License). You may not use this file except in
254.7 - * compliance with the License.
254.8 - *
254.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
254.10 - * or http://www.netbeans.org/cddl.txt.
254.11 - *
254.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
254.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
254.14 - * If applicable, add the following below the CDDL Header, with the fields
254.15 - * enclosed by brackets [] replaced by your own identifying information:
254.16 - * "Portions Copyrighted [year] [name of copyright owner]"
254.17 - *
254.18 - * The Original Software is NetBeans. The Initial Developer of the Original
254.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
254.20 - * Microsystems, Inc. All Rights Reserved.
254.21 - */
254.22 -package org.netbeans.modules.xslt.project.wizard.element;
254.23 -
254.24 -import java.awt.GridBagConstraints;
254.25 -import java.awt.GridBagLayout;
254.26 -import java.awt.Insets;
254.27 -import java.awt.event.ActionEvent;
254.28 -import java.awt.event.ActionListener;
254.29 -import java.util.ArrayList;
254.30 -import java.util.Collection;
254.31 -import java.util.List;
254.32 -import java.util.Map;
254.33 -
254.34 -import javax.swing.AbstractAction;
254.35 -import javax.swing.JButton;
254.36 -import javax.swing.JCheckBox;
254.37 -import javax.swing.JComboBox;
254.38 -import javax.swing.JLabel;
254.39 -import javax.swing.JPanel;
254.40 -import javax.swing.JTextField;
254.41 -
254.42 -import org.openide.WizardDescriptor;
254.43 -import org.openide.filesystems.FileObject;
254.44 -
254.45 -import org.netbeans.api.project.Project;
254.46 -import org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent;
254.47 -import org.netbeans.modules.xml.xam.dom.NamedComponentReference;
254.48 -import org.netbeans.modules.xml.schema.model.Import;
254.49 -import org.netbeans.modules.xml.schema.model.GlobalElement;
254.50 -import org.netbeans.modules.xml.schema.model.GlobalType;
254.51 -import org.netbeans.modules.xml.schema.model.Schema;
254.52 -import org.netbeans.modules.xml.schema.model.SchemaComponent;
254.53 -import org.netbeans.modules.xml.schema.model.SchemaModel;
254.54 -
254.55 -import org.netbeans.modules.xml.wsdl.model.Definitions;
254.56 -import org.netbeans.modules.xml.wsdl.model.ExtensibilityElement;
254.57 -import org.netbeans.modules.xml.wsdl.model.Input;
254.58 -import org.netbeans.modules.xml.wsdl.model.Message;
254.59 -import org.netbeans.modules.xml.wsdl.model.Operation;
254.60 -import org.netbeans.modules.xml.wsdl.model.OperationParameter;
254.61 -import org.netbeans.modules.xml.wsdl.model.Output;
254.62 -import org.netbeans.modules.xml.wsdl.model.Part;
254.63 -import org.netbeans.modules.xml.wsdl.model.PortType;
254.64 -import org.netbeans.modules.xml.wsdl.model.Types;
254.65 -import org.netbeans.modules.xml.wsdl.model.WSDLComponentFactory;
254.66 -import org.netbeans.modules.xml.wsdl.model.WSDLModel;
254.67 -import org.netbeans.modules.xml.wsdl.model.extensions.bpel.PartnerLinkType;
254.68 -import org.netbeans.modules.xml.wsdl.model.extensions.bpel.Role;
254.69 -import org.netbeans.modules.xml.wsdl.model.extensions.xsd.WSDLSchema;
254.70 -import org.netbeans.modules.xml.wsdl.ui.view.ElementOrType;
254.71 -
254.72 -import static org.netbeans.modules.print.api.PrintUI.*;
254.73 -
254.74 -/**
254.75 - * @author Vladimir Yaroslavskiy
254.76 - * @version 2007.02.02
254.77 - */
254.78 -final class PanelOperation extends Panel {
254.79 -
254.80 - PanelOperation(
254.81 - Project project,
254.82 - Panel parent,
254.83 - WSDLModel model,
254.84 - String fileName,
254.85 - boolean isReadOnly,
254.86 - boolean isInput)
254.87 - {
254.88 - super(project, parent);
254.89 - myModel = model;
254.90 - myFileName = fileName;
254.91 - myIsReadOnly = isReadOnly;
254.92 - myIsInput = isInput;
254.93 - myIsInputRequired = true;
254.94 - myIsOutputRequired = true;
254.95 - }
254.96 -
254.97 - @Override
254.98 - protected Object getResult()
254.99 - {
254.100 - return getOperation();
254.101 - }
254.102 -
254.103 - @Override
254.104 - protected String getError()
254.105 - {
254.106 - String name = myFile.getText();
254.107 - FileObject file = getFolder().getFileObject(name);
254.108 -
254.109 - if (file != null) {
254.110 - return i18n("ERR_File_Already_Exists", name); // NOI18N
254.111 - }
254.112 - Operation operation = getOperation();
254.113 -
254.114 - if (operation == null) {
254.115 - return i18n("ERR_Operation_Is_Required"); // NOI18N
254.116 - }
254.117 - if (myIsInputRequired) {
254.118 - if ( !check(operation.getInput())) {
254.119 - return i18n("ERR_Operation_With_Input_Is_Required"); // NOI18N
254.120 - }
254.121 - }
254.122 - if (myIsOutputRequired) {
254.123 - if ( !check(operation.getOutput())) {
254.124 - return i18n("ERR_Operation_With_Output_Is_Required"); // NOI18N
254.125 - }
254.126 - }
254.127 - return null;
254.128 - }
254.129 -
254.130 - private boolean check(OperationParameter parameter) {
254.131 - return
254.132 - parameter != null &&
254.133 - parameter.getMessage() != null &&
254.134 - parameter.getMessage().get() != null;
254.135 - }
254.136 -
254.137 - public void storeSettings(Object object) {
254.138 - WizardDescriptor descriptor = (WizardDescriptor) object;
254.139 -
254.140 - if (myIsInput) {
254.141 - descriptor.putProperty(INPUT_FILE, myFile.getText());
254.142 - descriptor.putProperty(INPUT_OPERATION, getOperation());
254.143 - descriptor.putProperty(INPUT_PARTNER_ROLE_PORT, getPartnerRolePort());
254.144 - descriptor.putProperty(
254.145 - INPUT_TRANSFORM_JBI, new Boolean(myTransformJBI.isSelected()));
254.146 - }
254.147 - else {
254.148 - descriptor.putProperty(OUTPUT_FILE, myFile.getText());
254.149 - descriptor.putProperty(OUTPUT_OPERATION, getOperation());
254.150 - descriptor.putProperty(OUTPUT_PARTNER_ROLE_PORT, getPartnerRolePort());
254.151 - descriptor.putProperty(
254.152 - OUTPUT_TRANSFORM_JBI, new Boolean(myTransformJBI.isSelected()));
254.153 - }
254.154 - }
254.155 -
254.156 - void setRequirement(boolean isInputRequired, boolean isOutputRequired) {
254.157 - myIsInputRequired = isInputRequired;
254.158 - myIsOutputRequired = isOutputRequired;
254.159 - }
254.160 -
254.161 - @Override
254.162 - protected void createPanel(JPanel mainPanel, GridBagConstraints cc)
254.163 - {
254.164 - JPanel panel = new JPanel(new GridBagLayout());
254.165 - GridBagConstraints c = new GridBagConstraints();
254.166 - c.anchor = GridBagConstraints.WEST;
254.167 - JButton button;
254.168 - JLabel label;
254.169 -
254.170 - // file
254.171 - createFilePanel(panel, c);
254.172 -
254.173 - // operation
254.174 - c.gridy++;
254.175 - c.weightx = 0.0;
254.176 - c.insets = new Insets(TINY_INSET, 0, TINY_INSET, 0);
254.177 - label = createLabel(i18n("LBL_Operation")); // NOI18N
254.178 - panel.add(label, c);
254.179 -
254.180 - c.weightx = 1.0;
254.181 - c.insets = new Insets(TINY_INSET, SMALL_INSET, TINY_INSET, 0);
254.182 - myOperation = new JComboBox();
254.183 - myOperation.setRenderer(new Renderer());
254.184 - myOperation.addActionListener(
254.185 - new ActionListener() {
254.186 - public void actionPerformed(ActionEvent event) {
254.187 - updateTypes();
254.188 - }
254.189 - }
254.190 - );
254.191 - label.setLabelFor(myOperation);
254.192 - panel.add(myOperation, c);
254.193 -
254.194 - // [create]
254.195 - if ( !myIsReadOnly) {
254.196 - c.weightx = 0.0;
254.197 - button = createButton(
254.198 - i18n("TLT_Create_Operation"), // NOI18N
254.199 - new AbstractAction(i18n("LBL_Create_Operation")) { // NOI18N
254.200 - public void actionPerformed(ActionEvent event) {
254.201 - new DialogOperation(
254.202 - myModel, PanelOperation.this, getPartnerRolePort()).show();
254.203 - }
254.204 - }
254.205 - );
254.206 -// panel.add(button, c);
254.207 -
254.208 - // type
254.209 - createTypePanel(panel, c);
254.210 - }
254.211 -
254.212 - // transform JBI
254.213 - c.gridy++;
254.214 - c.weightx = 0.0;
254.215 - c.weighty = 1.0;
254.216 - c.insets = new Insets(0, 0, 0, 0);
254.217 - myTransformJBI = createCheckBox(
254.218 - i18n("LBL_Transform_JBI"), // NOI18N
254.219 - new AbstractAction(i18n("LBL_Transform_JBI")) { // NOI18N
254.220 - public void actionPerformed(ActionEvent event) {}
254.221 - }
254.222 - );
254.223 - panel.add(myTransformJBI, c);
254.224 -
254.225 - updatePartnerRolePorts(null);
254.226 - mainPanel.add(panel, cc);
254.227 - }
254.228 -
254.229 - private void createFilePanel(JPanel panel, GridBagConstraints c) {
254.230 - JLabel label;
254.231 -
254.232 - // xsl file
254.233 - c.gridy++;
254.234 - c.insets = new Insets(TINY_INSET, 0, TINY_INSET, 0);
254.235 - label = createLabel(i18n("LBL_XSL_File")); // NOI18N
254.236 - panel.add(label, c);
254.237 -
254.238 - c.insets = new Insets(TINY_INSET, SMALL_INSET, TINY_INSET, 0);
254.239 - c.fill = GridBagConstraints.HORIZONTAL;
254.240 - c.weightx = 1.0;
254.241 - myFile = new JTextField(myFileName);
254.242 - label.setLabelFor(myFile);
254.243 - panel.add(myFile, c);
254.244 -
254.245 - // Partner/Role/Port
254.246 - c.gridy++;
254.247 - c.weightx = 0.0;
254.248 - c.fill = GridBagConstraints.NONE;
254.249 - c.insets = new Insets(TINY_INSET, 0, TINY_INSET, 0);
254.250 - label = createLabel(i18n("LBL_Partner_Role_Port")); // NOI18N
254.251 - panel.add(label, c);
254.252 -
254.253 - c.insets = new Insets(TINY_INSET, SMALL_INSET, TINY_INSET, 0);
254.254 - c.fill = GridBagConstraints.HORIZONTAL;
254.255 - c.weightx = 1.0;
254.256 - myPartnerRolePort = new JComboBox();
254.257 - myPartnerRolePort.setRenderer(new Renderer());
254.258 - myPartnerRolePort.addActionListener(
254.259 - new ActionListener() {
254.260 - public void actionPerformed(ActionEvent event) {
254.261 - update();
254.262 - }
254.263 - }
254.264 - );
254.265 - label.setLabelFor(myPartnerRolePort);
254.266 - panel.add(myPartnerRolePort, c);
254.267 - }
254.268 -
254.269 - private void createTypePanel(JPanel panel, GridBagConstraints c) {
254.270 - JLabel label;
254.271 -
254.272 - // input type
254.273 - c.gridy++;
254.274 - c.weightx = 0.0;
254.275 - c.insets = new Insets(TINY_INSET, 0, TINY_INSET, 0);
254.276 - label = createLabel(i18n("LBL_Input_Type")); // NOI18N
254.277 - panel.add(label, c);
254.278 -
254.279 - c.insets = new Insets(TINY_INSET, SMALL_INSET, TINY_INSET, 0);
254.280 - c.fill = GridBagConstraints.HORIZONTAL;
254.281 - c.weightx = 1.0;
254.282 - myInput = new JTextField();
254.283 - myInput.setEditable(false);
254.284 - label.setLabelFor(myInput);
254.285 - panel.add(myInput, c);
254.286 -
254.287 - // [choose]
254.288 - c.weightx = 0.0;
254.289 - c.insets = new Insets(TINY_INSET, SMALL_INSET, TINY_INSET, 0);
254.290 - myInputChoose = createButton(
254.291 - i18n("TLT_Choose_Input_Type"), // NOI18N
254.292 - new AbstractAction(i18n("LBL_Choose_Input_Type")) { // NOI18N
254.293 - public void actionPerformed(ActionEvent event) {
254.294 - new DialogType(getProject(), myModel, PanelOperation.this, true).show();
254.295 - }
254.296 - }
254.297 - );
254.298 -// panel.add(myInputChoose, c);
254.299 -
254.300 - // output type
254.301 - c.gridy++;
254.302 - c.weightx = 0.0;
254.303 - c.weighty = 1.0;
254.304 - c.insets = new Insets(TINY_INSET, 0, TINY_INSET, 0);
254.305 - label = createLabel(i18n("LBL_Output_Type")); // NOI18N
254.306 - panel.add(label, c);
254.307 -
254.308 - c.insets = new Insets(TINY_INSET, SMALL_INSET, TINY_INSET, 0);
254.309 - c.fill = GridBagConstraints.HORIZONTAL;
254.310 - myOutput = new JTextField();
254.311 - myOutput.setEditable(false);
254.312 - label.setLabelFor(myOutput);
254.313 - panel.add(myOutput, c);
254.314 -
254.315 - // [choose]
254.316 - c.weightx = 0.0;
254.317 - c.insets = new Insets(TINY_INSET, SMALL_INSET, TINY_INSET, 0);
254.318 - myOutputChoose = createButton(
254.319 - i18n("TLT_Choose_Output_Type"), // NOI18N
254.320 - new AbstractAction(i18n("LBL_Choose_Output_Type")) { // NOI18N
254.321 - public void actionPerformed(ActionEvent event) {
254.322 - new DialogType(getProject(), myModel, PanelOperation.this, false).show();
254.323 - }
254.324 - }
254.325 - );
254.326 -// panel.add(myOutputChoose, c);
254.327 - }
254.328 -
254.329 - private void updatePartnerRolePorts(PartnerRolePort partnerRolePort) {
254.330 - myPartnerRolePort.removeAllItems();
254.331 - PartnerRolePort [] partnerRolePorts = getPartnerRolePorts();
254.332 -
254.333 - for (PartnerRolePort item : partnerRolePorts) {
254.334 - myPartnerRolePort.addItem(item);
254.335 - }
254.336 - if (partnerRolePort != null) {
254.337 - myPartnerRolePort.setSelectedItem(partnerRolePort);
254.338 - }
254.339 - update();
254.340 - }
254.341 -
254.342 - private PartnerRolePort [] getPartnerRolePorts() {
254.343 - List<PartnerRolePort> list = new ArrayList<PartnerRolePort>();
254.344 - Definitions definitions = myModel.getDefinitions();
254.345 - List<ExtensibilityElement> elements = definitions.getExtensibilityElements();
254.346 -
254.347 - for (ExtensibilityElement element : elements) {
254.348 - if (element instanceof PartnerLinkType) {
254.349 - PartnerLinkType partnerLinkType = (PartnerLinkType) element;
254.350 - processRole(partnerLinkType, partnerLinkType.getRole1(), list);
254.351 - processRole(partnerLinkType, partnerLinkType.getRole2(), list);
254.352 - }
254.353 - }
254.354 - return list.toArray(new PartnerRolePort [list.size()]);
254.355 - }
254.356 -
254.357 - private void processRole(
254.358 - PartnerLinkType partnerLinkType,
254.359 - Role role,
254.360 - List<PartnerRolePort> list)
254.361 - {
254.362 - if (role == null) {
254.363 - return;
254.364 - }
254.365 - NamedComponentReference<PortType> reference = role.getPortType();
254.366 -
254.367 - if (reference == null) {
254.368 - return;
254.369 - }
254.370 - PortType portType = reference.get();
254.371 -
254.372 - if (portType != null) {
254.373 - list.add(new PartnerRolePort(partnerLinkType, role, portType));
254.374 - }
254.375 - }
254.376 -
254.377 - @Override
254.378 - protected void update()
254.379 - {
254.380 - myOperation.removeAllItems();
254.381 - Operation [] operations = getOperations(getPartnerRolePort());
254.382 -
254.383 - for (Operation operation : operations) {
254.384 - myOperation.addItem(operation);
254.385 - }
254.386 - updateTypes();
254.387 - }
254.388 -
254.389 - void setOperation(Operation operation, PartnerRolePort partnerRolePort) {
254.390 - myOperation.removeAllItems();
254.391 - Operation [] operations = getOperations(getPartnerRolePort());
254.392 -
254.393 - for (Operation item : operations) {
254.394 - myOperation.addItem(item);
254.395 - }
254.396 - updatePartnerRolePorts(partnerRolePort);
254.397 - myOperation.setSelectedItem(operation);
254.398 - updateTypes();
254.399 - }
254.400 -
254.401 - private Operation [] getOperations(PartnerRolePort partnerRolePort) {
254.402 - List<Operation> list = new ArrayList<Operation>();
254.403 -
254.404 - if (partnerRolePort != null) {
254.405 - Collection<Operation> operations =
254.406 - partnerRolePort.getPortType().getOperations();
254.407 -
254.408 - for (Operation operation : operations) {
254.409 - list.add(operation);
254.410 - }
254.411 - }
254.412 - return list.toArray(new Operation [list.size()]);
254.413 - }
254.414 -
254.415 - void setElementOrType(ElementOrType elementOrType, boolean isInput) {
254.416 - try {
254.417 - myModel.startTransaction();
254.418 - updateOperation(getOperation(), elementOrType, isInput);
254.419 - }
254.420 - finally {
254.421 - if (myModel.isIntransaction()) {
254.422 - myModel.endTransaction();
254.423 - }
254.424 - }
254.425 - Util.saveModel(myModel);
254.426 - updateTypes();
254.427 - }
254.428 -
254.429 - private void updateOperation(
254.430 - Operation operation,
254.431 - ElementOrType elementOrType,
254.432 - boolean isInput)
254.433 - {
254.434 - Definitions definitions = myModel.getDefinitions();
254.435 - WSDLComponentFactory factory = myModel.getFactory();
254.436 -
254.437 - if (isInput) {
254.438 - updateInput(
254.439 - operation,
254.440 - definitions,
254.441 - factory,
254.442 - elementOrType
254.443 - );
254.444 - }
254.445 - else {
254.446 - updateOutput(
254.447 - operation,
254.448 - definitions,
254.449 - factory,
254.450 - elementOrType
254.451 - );
254.452 - }
254.453 - }
254.454 -
254.455 - private void updateInput(
254.456 - Operation operation,
254.457 - Definitions definitions,
254.458 - WSDLComponentFactory factory,
254.459 - ElementOrType elementOrType)
254.460 - {
254.461 - Part part = factory.createPart();
254.462 - part.setName(PART_IN_NAME + operation.getName());
254.463 - setElementOrType(part, elementOrType);
254.464 -
254.465 - String messageName = MESSAGE_IN_NAME + operation.getName();
254.466 - Message message = getMessage(definitions, messageName);
254.467 -
254.468 - if (message == null) {
254.469 - message = factory.createMessage();
254.470 - message.setName(messageName);
254.471 - message.addPart(part);
254.472 - definitions.addMessage(message);
254.473 - }
254.474 - Input input = factory.createInput();
254.475 - input.setMessage(input.createReferenceTo(message, Message.class));
254.476 - operation.setInput(input);
254.477 - }
254.478 -
254.479 - private void updateOutput(
254.480 - Operation operation,
254.481 - Definitions definitions,
254.482 - WSDLComponentFactory factory,
254.483 - ElementOrType elementOrType)
254.484 - {
254.485 - Part part = factory.createPart();
254.486 - part.setName(PART_OUT_NAME + operation.getName());
254.487 - setElementOrType(part, elementOrType);
254.488 -
254.489 - String messageName = MESSAGE_OUT_NAME + operation.getName();
254.490 - Message message = getMessage(definitions, messageName);
254.491 -
254.492 - if (message == null) {
254.493 - message = factory.createMessage();
254.494 - message.setName(MESSAGE_OUT_NAME + operation.getName());
254.495 - message.addPart(part);
254.496 - definitions.addMessage(message);
254.497 - }
254.498 - Output output = factory.createOutput();
254.499 - output.setMessage(output.createReferenceTo(message, Message.class));
254.500 - operation.setOutput(output);
254.501 - }
254.502 -
254.503 - private void setElementOrType(Part part, ElementOrType elementOrType) {
254.504 - GlobalElement element = elementOrType.getElement();
254.505 -
254.506 - if (element != null) {
254.507 - updateImports(element);
254.508 - part.setElement(part.createSchemaReference(element, GlobalElement.class));
254.509 - }
254.510 - GlobalType type = elementOrType.getType();
254.511 -
254.512 - if (type != null) {
254.513 - updateImports(type);
254.514 - part.setType(part.createSchemaReference(type, GlobalType.class));
254.515 - }
254.516 - }
254.517 -
254.518 - private void updateImports(SchemaComponent component) {
254.519 - Schema oSchema = component.getModel().getSchema();
254.520 - String location = getLocation(oSchema);
254.521 -
254.522 - if (location == null) { // built-in type
254.523 - return;
254.524 - }
254.525 - Definitions definitions = myModel.getDefinitions();
254.526 - Types types = getTypes(definitions);
254.527 - Schema wSchema = null;
254.528 - String tns = definitions.getTargetNamespace();
254.529 -
254.530 - if (tns != null) {
254.531 - Collection<Schema> schemas = types.getSchemas();
254.532 -
254.533 - if (schemas != null) {
254.534 - for (Schema s : schemas) {
254.535 - if (s.getTargetNamespace() != null && s.getTargetNamespace().equals(tns)) {
254.536 - wSchema = s;
254.537 - break;
254.538 - }
254.539 - }
254.540 - }
254.541 - }
254.542 - WSDLSchema wsdlSchema = null;
254.543 -
254.544 - if (wSchema == null) {
254.545 - wsdlSchema = myModel.getFactory().createWSDLSchema();
254.546 - SchemaModel schemaModel = wsdlSchema.getSchemaModel();
254.547 - wSchema = schemaModel.getSchema();
254.548 - wSchema.setTargetNamespace(myModel.getDefinitions().getTargetNamespace());
254.549 - }
254.550 - Import schemaImport = oSchema.getModel().getFactory().createImport();
254.551 - schemaImport.setSchemaLocation(location);
254.552 -
254.553 - String namespace = oSchema.getTargetNamespace();
254.554 - schemaImport.setNamespace(namespace);
254.555 -
254.556 - setPrefix(namespace);
254.557 - wSchema.addExternalReference(schemaImport);
254.558 -
254.559 - if (definitions.getTypes() == null) {
254.560 - definitions.setTypes(types);
254.561 - }
254.562 - if (wsdlSchema != null) {
254.563 - types.addExtensibilityElement(wsdlSchema);
254.564 - }
254.565 - }
254.566 -
254.567 - private Types getTypes(Definitions definitions) {
254.568 - Types types = definitions.getTypes();
254.569 -
254.570 - if (types == null) {
254.571 - types = myModel.getFactory().createTypes();
254.572 - }
254.573 - return types;
254.574 - }
254.575 -
254.576 - private void setPrefix(String namespace) {
254.577 - String prefix = Util.generatePrefix(myModel);
254.578 -
254.579 - if (prefix.length() > 0) {
254.580 - AbstractDocumentComponent def =
254.581 - (AbstractDocumentComponent) myModel.getDefinitions();
254.582 -
254.583 - Map prefixes = def.getPrefixes();
254.584 -
254.585 - if ( !prefixes.containsKey(prefix)) {
254.586 - def.addPrefix(prefix, namespace);
254.587 - }
254.588 - }
254.589 - }
254.590 -
254.591 - private String getLocation(Schema schema) {
254.592 - SchemaModel model = schema.getModel();
254.593 - return Util.calculateRelativeName(Util.getFileObject(model), getProject());
254.594 - }
254.595 -
254.596 - private Message getMessage(Definitions definitions, String name) {
254.597 - Collection<Message> messages = definitions.getMessages();
254.598 -
254.599 - for (Message message : messages) {
254.600 - if (message.getName().equals(name)) {
254.601 - return message;
254.602 - }
254.603 - }
254.604 - return null;
254.605 - }
254.606 -
254.607 - @Override
254.608 - protected void setEnabled(boolean enabled)
254.609 - {
254.610 - myFile.setEnabled(enabled);
254.611 - myTransformJBI.setEnabled(enabled);
254.612 - }
254.613 -
254.614 - private void updateTypes() {
254.615 - getParent().update();
254.616 -
254.617 - if (myIsReadOnly) {
254.618 - return;
254.619 - }
254.620 - Operation operation = getOperation();
254.621 - myInputChoose.setEnabled(operation != null);
254.622 - myOutputChoose.setEnabled(operation != null);
254.623 -
254.624 - if (operation == null) {
254.625 - myInput.setText(EMPTY);
254.626 - myOutput.setText(EMPTY);
254.627 - return;
254.628 - }
254.629 - myInput.setText(getType(operation.getInput()));
254.630 - myOutput.setText(getType(operation.getOutput()));
254.631 - }
254.632 -
254.633 - private Operation getOperation() {
254.634 - return (Operation) myOperation.getSelectedItem();
254.635 - }
254.636 -
254.637 - private PartnerRolePort getPartnerRolePort() {
254.638 - return (PartnerRolePort) myPartnerRolePort.getSelectedItem();
254.639 - }
254.640 -
254.641 - private JTextField myFile;
254.642 - private JCheckBox myTransformJBI;
254.643 - private JComboBox myPartnerRolePort;
254.644 - private JComboBox myOperation;
254.645 - private JTextField myInput;
254.646 - private JTextField myOutput;
254.647 - private JButton myInputChoose;
254.648 - private JButton myOutputChoose;
254.649 - private WSDLModel myModel;
254.650 - private String myFileName;
254.651 - private boolean myIsReadOnly;
254.652 - private boolean myIsInput;
254.653 - private boolean myIsInputRequired;
254.654 - private boolean myIsOutputRequired;
254.655 -
254.656 - private static final String PART_IN_NAME = "PartIn"; // NOI18N
254.657 - private static final String PART_OUT_NAME = "PartOut"; // NOI18N
254.658 - private static final String MESSAGE_IN_NAME = "MessageIn"; // NOI18N
254.659 - private static final String MESSAGE_OUT_NAME = "MessageOut"; // NOI18N
254.660 -}
255.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelProxy.java Wed Feb 21 08:53:38 2007 +0000
255.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
255.3 @@ -1,230 +0,0 @@
255.4 -/*
255.5 - * The contents of this file are subject to the terms of the Common Development
255.6 - * and Distribution License (the License). You may not use this file except in
255.7 - * compliance with the License.
255.8 - *
255.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
255.10 - * or http://www.netbeans.org/cddl.txt.
255.11 - *
255.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
255.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
255.14 - * If applicable, add the following below the CDDL Header, with the fields
255.15 - * enclosed by brackets [] replaced by your own identifying information:
255.16 - * "Portions Copyrighted [year] [name of copyright owner]"
255.17 - *
255.18 - * The Original Software is NetBeans. The Initial Developer of the Original
255.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
255.20 - * Microsystems, Inc. All Rights Reserved.
255.21 - */
255.22 -package org.netbeans.modules.xslt.project.wizard.element;
255.23 -
255.24 -import java.awt.GridBagConstraints;
255.25 -import java.awt.GridBagLayout;
255.26 -import java.awt.Insets;
255.27 -import java.awt.event.ActionEvent;
255.28 -
255.29 -import javax.swing.AbstractAction;
255.30 -import javax.swing.JButton;
255.31 -import javax.swing.JCheckBox;
255.32 -import javax.swing.JLabel;
255.33 -import javax.swing.JPanel;
255.34 -import javax.swing.JTextField;
255.35 -
255.36 -import org.openide.WizardDescriptor;
255.37 -import org.netbeans.api.project.Project;
255.38 -import org.netbeans.modules.xml.wsdl.model.Operation;
255.39 -import org.netbeans.modules.xml.wsdl.model.WSDLModel;
255.40 -
255.41 -import static org.netbeans.modules.print.api.PrintUI.*;
255.42 -
255.43 -/**
255.44 - * @author Vladimir Yaroslavskiy
255.45 - * @version 2007.02.01
255.46 - */
255.47 -final class PanelProxy extends Panel {
255.48 -
255.49 - PanelProxy(
255.50 - Project project,
255.51 - Panel parent,
255.52 - WSDLModel modelImplement,
255.53 - WSDLModel modelCall)
255.54 - {
255.55 - super(project, parent);
255.56 - int numberImplement = getXslFileNumber(1);
255.57 - int numberCall = getXslFileNumber(numberImplement + 1);
255.58 -
255.59 - myOperationImplement = new PanelOperation(
255.60 - project, this, modelImplement, getXslFileName(numberImplement), true, true);
255.61 -
255.62 - myOperationCall = new PanelOperation(
255.63 - project, this, modelCall, getXslFileName(numberCall), true, false);
255.64 - }
255.65 -
255.66 - @Override
255.67 - protected String getComponentName()
255.68 - {
255.69 - return NAME_XSLT;
255.70 - }
255.71 -
255.72 - @Override
255.73 - protected String getError()
255.74 - {
255.75 - return getError(myOperationImplement.getError(), myOperationCall.getError());
255.76 - }
255.77 -
255.78 - public void storeSettings(Object object) {
255.79 - WizardDescriptor descriptor = (WizardDescriptor) object;
255.80 - myOperationImplement.storeSettings(object);
255.81 - myOperationCall.storeSettings(object);
255.82 -
255.83 - if (myReplyBox.isSelected()) {
255.84 - descriptor.putProperty(CHOICE, CHOICE_FILTER_REQUEST_REPLY);
255.85 - }
255.86 - else {
255.87 - descriptor.putProperty(CHOICE, CHOICE_FILTER_ONE_WAY);
255.88 - }
255.89 - }
255.90 -
255.91 - @Override
255.92 - protected void createPanel(JPanel mainPanel, GridBagConstraints cc)
255.93 - {
255.94 - JPanel panel = new JPanel(new GridBagLayout());
255.95 - GridBagConstraints c = new GridBagConstraints();
255.96 - c.anchor = GridBagConstraints.WEST;
255.97 - c.anchor = GridBagConstraints.NORTHWEST;
255.98 - c.fill = GridBagConstraints.HORIZONTAL;
255.99 - c.weightx = 1.0;
255.100 - c.gridx = 0;
255.101 -
255.102 - // we implement
255.103 - panel.add(createSeparator(i18n("LBL_We_Implement")), c); // NOI18N
255.104 - myOperationImplement.createPanel(panel, c);
255.105 -
255.106 - // we call
255.107 - panel.add(createSeparator(i18n("LBL_We_Call")), c); // NOI18N
255.108 - myOperationCall.createPanel(panel, c);
255.109 -
255.110 - // transform request
255.111 - panel.add(createTransformRequestPanel(), c);
255.112 -
255.113 - // transform reply
255.114 - panel.add(createTransformReplyPanel(), c);
255.115 -
255.116 - update();
255.117 - mainPanel.add(panel, cc);
255.118 - }
255.119 -
255.120 - @Override
255.121 - protected void update()
255.122 - {
255.123 - if (myRequestBox == null || myReplyBox == null) {
255.124 - return;
255.125 - }
255.126 - myOperationImplement.setEnabled(myRequestBox.isSelected());
255.127 - myOperationCall.setEnabled(myReplyBox.isSelected());
255.128 -
255.129 - myOperationImplement.setRequirement(
255.130 - myRequestBox.isSelected(), myReplyBox.isSelected());
255.131 -
255.132 - myOperationCall.setRequirement(
255.133 - myRequestBox.isSelected(), myReplyBox.isSelected());
255.134 -
255.135 - updateText(
255.136 - myRequestText,
255.137 - true,
255.138 - (Operation) myOperationImplement.getResult(),
255.139 - (Operation) myOperationCall.getResult());
255.140 -
255.141 - updateText(
255.142 - myReplyText,
255.143 - false,
255.144 - (Operation) myOperationCall.getResult(),
255.145 - (Operation) myOperationImplement.getResult());
255.146 - }
255.147 -
255.148 - private void updateText(
255.149 - JTextField text,
255.150 - boolean isInput,
255.151 - Operation operation1,
255.152 - Operation operation2)
255.153 - {
255.154 - String type1 = getType(operation1, isInput);
255.155 - String type2 = getType(operation2, isInput);
255.156 - text.setText(i18n("LBL_From_To", type1, type2)); // NOI18N
255.157 - }
255.158 -
255.159 - private String getType(Operation operation, boolean isInput) {
255.160 - if (operation == null) {
255.161 - return EMPTY;
255.162 - }
255.163 - if (isInput) {
255.164 - return getType(operation.getInput());
255.165 - }
255.166 - else {
255.167 - return getType(operation.getOutput());
255.168 - }
255.169 - }
255.170 -
255.171 - private JPanel createTransformRequestPanel() {
255.172 - myRequestBox = createCheckBox(
255.173 - i18n("LBL_Transform_Request"), // NOI18N
255.174 - new AbstractAction(i18n("LBL_Transform_Request")) { // NOI18N
255.175 - public void actionPerformed(ActionEvent event) {
255.176 - update();
255.177 - }
255.178 - }
255.179 - );
255.180 - myRequestBox.setEnabled(false);
255.181 - myRequestBox.setSelected(true);
255.182 - myRequestText = new JTextField();
255.183 -
255.184 - return createTransformPanel(myRequestBox, myRequestText);
255.185 - }
255.186 -
255.187 - private JPanel createTransformReplyPanel() {
255.188 - myReplyBox = createCheckBox(
255.189 - i18n("LBL_Transform_Reply"), // NOI18N
255.190 - new AbstractAction(i18n("LBL_Transform_Reply")) { // NOI18N
255.191 - public void actionPerformed(ActionEvent event) {
255.192 - update();
255.193 - }
255.194 - }
255.195 - );
255.196 - myReplyBox.setEnabled(true);
255.197 - myReplyBox.setSelected(false);
255.198 - myReplyText = new JTextField();
255.199 -
255.200 - return createTransformPanel(myReplyBox, myReplyText);
255.201 - }
255.202 -
255.203 - private JPanel createTransformPanel(JCheckBox checkBox, JTextField text) {
255.204 - JPanel panel = new JPanel(new GridBagLayout());
255.205 - GridBagConstraints c = new GridBagConstraints();
255.206 - c.anchor = GridBagConstraints.WEST;
255.207 - JButton button;
255.208 - JLabel label;
255.209 -
255.210 - // check box
255.211 - c.gridy++;
255.212 - c.insets = new Insets(SMALL_INSET, 0, 0, 0);
255.213 - panel.add(checkBox, c);
255.214 -
255.215 - // text
255.216 - c.gridy++;
255.217 - c.insets = new Insets(
255.218 - SMALL_INSET, MEDIUM_INSET + SMALL_INSET + TINY_INSET, TINY_INSET, 0);
255.219 - c.fill = GridBagConstraints.HORIZONTAL;
255.220 - c.weightx = 1.0;
255.221 - text.setEnabled(false);
255.222 - panel.add(text, c);
255.223 -
255.224 - return panel;
255.225 - }
255.226 -
255.227 - private PanelOperation myOperationImplement;
255.228 - private PanelOperation myOperationCall;
255.229 - private JCheckBox myRequestBox;
255.230 - private JCheckBox myReplyBox;
255.231 - private JTextField myRequestText;
255.232 - private JTextField myReplyText;
255.233 -}
256.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelStartup.java Wed Feb 21 08:53:38 2007 +0000
256.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
256.3 @@ -1,108 +0,0 @@
256.4 -/*
256.5 - * The contents of this file are subject to the terms of the Common Development
256.6 - * and Distribution License (the License). You may not use this file except in
256.7 - * compliance with the License.
256.8 - *
256.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
256.10 - * or http://www.netbeans.org/cddl.txt.
256.11 - *
256.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
256.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
256.14 - * If applicable, add the following below the CDDL Header, with the fields
256.15 - * enclosed by brackets [] replaced by your own identifying information:
256.16 - * "Portions Copyrighted [year] [name of copyright owner]"
256.17 - *
256.18 - * The Original Software is NetBeans. The Initial Developer of the Original
256.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
256.20 - * Microsystems, Inc. All Rights Reserved.
256.21 - */
256.22 -package org.netbeans.modules.xslt.project.wizard.element;
256.23 -
256.24 -import java.awt.GridBagConstraints;
256.25 -import java.awt.GridBagLayout;
256.26 -import java.awt.Insets;
256.27 -
256.28 -import javax.swing.ButtonGroup;
256.29 -import javax.swing.JPanel;
256.30 -import javax.swing.JRadioButton;
256.31 -
256.32 -import org.netbeans.api.project.Project;
256.33 -import static org.netbeans.modules.print.api.PrintUI.*;
256.34 -
256.35 -/**
256.36 - * @author Vladimir Yaroslavskiy
256.37 - * @version 2006.12.25
256.38 - */
256.39 -final class PanelStartup extends Panel {
256.40 -
256.41 - PanelStartup(Project project, Panel parent) {
256.42 - super(project, parent);
256.43 - myTransformationPanel = new PanelWSDL(getProject(), this);
256.44 - myProxyPanel = new PanelWSDLs(getProject(), this);
256.45 - }
256.46 -
256.47 - @Override
256.48 - protected String getComponentName()
256.49 - {
256.50 - return NAME_TYPE;
256.51 - }
256.52 -
256.53 - @Override
256.54 - protected Panel getNext()
256.55 - {
256.56 - if (myTransformation != null && myTransformation.isSelected()) {
256.57 - return myTransformationPanel;
256.58 - }
256.59 - else {
256.60 - return myProxyPanel;
256.61 - }
256.62 - }
256.63 -
256.64 - @Override
256.65 - protected void createPanel(JPanel mainPanel, GridBagConstraints cc)
256.66 - {
256.67 - JPanel panel = new JPanel(new GridBagLayout());
256.68 - GridBagConstraints c = new GridBagConstraints();
256.69 - ButtonGroup group = new ButtonGroup();
256.70 - c.anchor = GridBagConstraints.NORTHWEST;
256.71 - c.weightx = 1.0;
256.72 - c.weighty = 1.0;
256.73 -
256.74 - // (o) Request-Reply Service
256.75 - c.gridy++;
256.76 - c.insets = new Insets(SMALL_INSET, 0, 0, 0);
256.77 - myTransformation = createRadioButton(i18n("LBL_Transformation")); // NOI18N
256.78 - myTransformation.setSelected(true);
256.79 - panel.add(myTransformation, c);
256.80 - group.add(myTransformation);
256.81 -
256.82 - // text
256.83 - c.gridy++;
256.84 - c.insets = new Insets(
256.85 - SMALL_INSET, MEDIUM_INSET + SMALL_INSET + TINY_INSET, TINY_INSET, 0);
256.86 - panel.add(createTextArea(TEXT_WIDTH, i18n("LBL_Transformation_Text")),c);//NOI18N
256.87 -
256.88 - // (o) Proxy Service
256.89 - c.gridy++;
256.90 - c.insets = new Insets(SMALL_INSET, 0, 0, 0);
256.91 - myProxy = createRadioButton(i18n("LBL_Proxy")); // NOI18N
256.92 - myProxy.setSelected(false);
256.93 - panel.add(myProxy, c);
256.94 - group.add(myProxy);
256.95 -
256.96 - // text
256.97 - c.gridy++;
256.98 - c.insets = new Insets(
256.99 - SMALL_INSET, MEDIUM_INSET + SMALL_INSET + TINY_INSET, TINY_INSET, 0);
256.100 - panel.add(createTextArea(TEXT_WIDTH, i18n("LBL_Proxy_Text")), c); // NOI18N
256.101 -
256.102 -// panel.setBorder(new javax.swing.border.LineBorder(java.awt.Color.blue));
256.103 - mainPanel.add(panel, cc);
256.104 - }
256.105 -
256.106 - private Panel myTransformationPanel;
256.107 - private JRadioButton myTransformation;
256.108 - private Panel myProxyPanel;
256.109 - private JRadioButton myProxy;
256.110 - private static final int TEXT_WIDTH = 40;
256.111 -}
257.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelWSDL.java Wed Feb 21 08:53:38 2007 +0000
257.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
257.3 @@ -1,245 +0,0 @@
257.4 -/*
257.5 - * The contents of this file are subject to the terms of the Common Development
257.6 - * and Distribution License (the License). You may not use this file except in
257.7 - * compliance with the License.
257.8 - *
257.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
257.10 - * or http://www.netbeans.org/cddl.txt.
257.11 - *
257.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
257.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
257.14 - * If applicable, add the following below the CDDL Header, with the fields
257.15 - * enclosed by brackets [] replaced by your own identifying information:
257.16 - * "Portions Copyrighted [year] [name of copyright owner]"
257.17 - *
257.18 - * The Original Software is NetBeans. The Initial Developer of the Original
257.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
257.20 - * Microsystems, Inc. All Rights Reserved.
257.21 - */
257.22 -package org.netbeans.modules.xslt.project.wizard.element;
257.23 -
257.24 -import java.awt.GridBagConstraints;
257.25 -import java.awt.GridBagLayout;
257.26 -import java.awt.Insets;
257.27 -//import java.awt.event.ItemEvent;
257.28 -//import java.awt.event.ItemListener;
257.29 -//import java.io.IOException;
257.30 -
257.31 -import javax.swing.ButtonGroup;
257.32 -//import javax.swing.JLabel;
257.33 -import javax.swing.JPanel;
257.34 -//import javax.swing.JRadioButton;
257.35 -//import javax.swing.JTextField;
257.36 -
257.37 -//import org.openide.filesystems.FileObject;
257.38 -import org.netbeans.api.project.Project;
257.39 -
257.40 -//import org.netbeans.modules.xml.wsdl.model.Definitions;
257.41 -import org.netbeans.modules.xml.wsdl.model.WSDLModel;
257.42 -import static org.netbeans.modules.print.api.PrintUI.*;
257.43 -
257.44 -/**
257.45 - * @author Vladimir Yaroslavskiy
257.46 - * @version 2007.01.30
257.47 - */
257.48 -final class PanelWSDL extends Panel {
257.49 -
257.50 - PanelWSDL(Project project, Panel parent) {
257.51 - super(project, parent);
257.52 - myWebService = new PanelWebService(project, parent);
257.53 - }
257.54 -
257.55 - @Override
257.56 - protected String getComponentName()
257.57 - {
257.58 - return NAME_WSDL;
257.59 - }
257.60 -
257.61 - @Override
257.62 - protected Panel getNext()
257.63 - {
257.64 - return new PanelTransformation(getProject(), this, myModel);
257.65 - }
257.66 -
257.67 - @Override
257.68 - protected String getError()
257.69 - {
257.70 -// if (myExisting.isSelected()) {
257.71 - String error = myWebService.getError();
257.72 -
257.73 - if (error != null) {
257.74 - return error;
257.75 - }
257.76 - myModel = (WSDLModel) myWebService.getResult();
257.77 -// }
257.78 -// else {
257.79 -// String name = getName(myName.getText());
257.80 -//
257.81 -// if (name == null) {
257.82 -// return i18n("ERR_File_Name_Must_Be_Specified"); // NOI18N
257.83 -// }
257.84 -// FileObject file = getFolder().getFileObject(name);
257.85 -//
257.86 -// if (file != null) {
257.87 -// return i18n("ERR_File_Already_Exists", name); // NOI18N
257.88 -// }
257.89 -// try {
257.90 -// myModel = Util.getWSDLModel(createFile(name));
257.91 -// myWebService.update();
257.92 -// }
257.93 -// catch (IOException e) {
257.94 -// return i18n("ERR_Occurred", e.getMessage()); // NOI18N
257.95 -// }
257.96 -// }
257.97 - return null;
257.98 - }
257.99 -
257.100 - @Override
257.101 - protected void createPanel(JPanel mainPanel, GridBagConstraints cc)
257.102 - {
257.103 - JPanel panel = new JPanel(new GridBagLayout());
257.104 - GridBagConstraints c = new GridBagConstraints();
257.105 - ButtonGroup group = new ButtonGroup();
257.106 - c.anchor = GridBagConstraints.WEST;
257.107 - c.weighty = 1.0;
257.108 -/*
257.109 - // (o) Existing
257.110 - c.gridy++;
257.111 - c.weightx = 1.0;
257.112 - c.fill = GridBagConstraints.HORIZONTAL;
257.113 - c.insets = new Insets(SMALL_INSET, 0, 0, 0);
257.114 - myExisting = createRadioButton(i18n("LBL_Existing_WSDL")); // NOI18N
257.115 - myExisting.setSelected(true);
257.116 - myExisting.addItemListener(createItemListener(true));
257.117 - panel.add(myExisting, c);
257.118 - group.add(myExisting);
257.119 -*/
257.120 - c.gridy++;
257.121 - c.weightx = 1.0;
257.122 - c.insets = new Insets(0, 0, 0, 0);
257.123 - c.fill = GridBagConstraints.HORIZONTAL;
257.124 - myWebService.createPanel(panel, c);
257.125 -/*
257.126 - // (o) Create New
257.127 - c.gridy++;
257.128 - c.insets = new Insets(SMALL_INSET, 0, 0, 0);
257.129 - myCreate = createRadioButton(i18n("LBL_Create_New_WSDL")); // NOI18N
257.130 - myCreate.setSelected(false);
257.131 - myCreate.addItemListener(createItemListener(false));
257.132 - panel.add(myCreate, c);
257.133 - group.add(myCreate);
257.134 -
257.135 - c.gridy++;
257.136 - c.insets = new Insets(0, 0, 0, 0);
257.137 - panel.add(createNewPanel(), c);
257.138 -
257.139 - setEnabled(true);
257.140 -// panel.setBorder(new javax.swing.border.LineBorder(java.awt.Color.blue));
257.141 -*/
257.142 - mainPanel.add(panel, cc);
257.143 - }
257.144 -/*
257.145 - private JPanel createNewPanel() {
257.146 - JPanel panel = new JPanel(new GridBagLayout());
257.147 - GridBagConstraints c = new GridBagConstraints();
257.148 - c.anchor = GridBagConstraints.WEST;
257.149 -
257.150 - // lanel
257.151 - c.gridy++;
257.152 - c.weightx = 0.0;
257.153 - c.gridwidth = 1;
257.154 - c.fill = GridBagConstraints.NONE;
257.155 - c.insets = new Insets(
257.156 - TINY_INSET, MEDIUM_INSET + SMALL_INSET + TINY_INSET, TINY_INSET, 0);
257.157 - myNameLabel = createLabel(i18n("LBL_Name")); // NOI18N
257.158 - panel.add(myNameLabel, c);
257.159 -
257.160 - // text field
257.161 - c.weightx = 1.0;
257.162 - c.fill = GridBagConstraints.HORIZONTAL;
257.163 - c.insets = new Insets(TINY_INSET, SMALL_INSET, TINY_INSET, 0);
257.164 - myName = new JTextField();
257.165 - myNameLabel.setLabelFor(myName);
257.166 - panel.add(myName, c);
257.167 -
257.168 - return panel;
257.169 - }
257.170 -
257.171 - private ItemListener createItemListener(final boolean existing) {
257.172 - return new ItemListener() {
257.173 - public void itemStateChanged(ItemEvent event) {
257.174 - setEnabled(existing);
257.175 - }
257.176 - };
257.177 - }
257.178 -*/
257.179 - @Override
257.180 - protected void setEnabled(boolean enabled)
257.181 - {
257.182 - myWebService.setEnabled(enabled);
257.183 -// myName.setEnabled( !enabled);
257.184 -// myNameLabel.setEnabled( !enabled);
257.185 - }
257.186 -/*
257.187 - private String getName(String value) {
257.188 - String name = value.trim();
257.189 -
257.190 - if (name.equals(WSDL_EXT)) {
257.191 - return null;
257.192 - }
257.193 - if (name.length() == 0) {
257.194 - return null;
257.195 - }
257.196 - if (name.toLowerCase().endsWith(WSDL_EXT)) {
257.197 - return name;
257.198 - }
257.199 - return name + WSDL_EXT;
257.200 - }
257.201 -
257.202 - private FileObject createFile(String file) throws IOException {
257.203 - String text =
257.204 - "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + LS + LS + // NOI18N
257.205 - "<definitions" + LS + // NOI18N
257.206 - " xmlns=\"http://schemas.xmlsoap.org/wsdl/\"" + LS + // NOI18N
257.207 - " xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\"" + LS + // NOI18N
257.208 - " xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\"" + LS + // NOI18N
257.209 - " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" + LS + // NOI18N
257.210 - "</definitions>" + LS; // NOI18N
257.211 -
257.212 - FileObject wsdl = Util.createFile(getFolder(), file, text);
257.213 - WSDLModel model = Util.getWSDLModel(wsdl);
257.214 - String name = file;
257.215 -
257.216 - if (file.toLowerCase().endsWith(WSDL_EXT)) {
257.217 - name = file.substring(0, file.length() - WSDL_EXT.length());
257.218 - }
257.219 - Definitions definitions = model.getDefinitions();
257.220 -
257.221 - if (definitions == null) {
257.222 - return null;
257.223 - }
257.224 - try {
257.225 - model.startTransaction();
257.226 - definitions.setName(name);
257.227 - definitions.setTargetNamespace(HOST + name);
257.228 - Util.saveModel(model);
257.229 - }
257.230 - finally {
257.231 - if (model.isIntransaction()) {
257.232 - model.endTransaction();
257.233 - }
257.234 - }
257.235 - return wsdl;
257.236 - }
257.237 -*/
257.238 -// private JTextField myName;
257.239 -// private JLabel myNameLabel;
257.240 -// private JRadioButton myExisting;
257.241 -// private JRadioButton myCreate;
257.242 - private WSDLModel myModel;
257.243 - private PanelWebService myWebService;
257.244 -
257.245 -// private static final String HOST =
257.246 -// "http://enterprise.netbeans.org/bpel/"; // NOI18N
257.247 -// private static final String WSDL_EXT = ".wsdl"; // NOI18N
257.248 -}
258.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelWSDLs.java Wed Feb 21 08:53:38 2007 +0000
258.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
258.3 @@ -1,97 +0,0 @@
258.4 -/*
258.5 - * The contents of this file are subject to the terms of the Common Development
258.6 - * and Distribution License (the License). You may not use this file except in
258.7 - * compliance with the License.
258.8 - *
258.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
258.10 - * or http://www.netbeans.org/cddl.txt.
258.11 - *
258.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
258.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
258.14 - * If applicable, add the following below the CDDL Header, with the fields
258.15 - * enclosed by brackets [] replaced by your own identifying information:
258.16 - * "Portions Copyrighted [year] [name of copyright owner]"
258.17 - *
258.18 - * The Original Software is NetBeans. The Initial Developer of the Original
258.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
258.20 - * Microsystems, Inc. All Rights Reserved.
258.21 - */
258.22 -package org.netbeans.modules.xslt.project.wizard.element;
258.23 -
258.24 -import java.awt.GridBagConstraints;
258.25 -import java.awt.GridBagLayout;
258.26 -import java.awt.Insets;
258.27 -import javax.swing.JPanel;
258.28 -
258.29 -import org.netbeans.api.project.Project;
258.30 -import org.netbeans.modules.xml.wsdl.model.WSDLModel;
258.31 -
258.32 -import static org.netbeans.modules.print.api.PrintUI.*;
258.33 -
258.34 -/**
258.35 - * @author Vladimir Yaroslavskiy
258.36 - * @version 2007.02.02
258.37 - */
258.38 -final class PanelWSDLs extends Panel {
258.39 -
258.40 - PanelWSDLs(Project project, Panel parent) {
258.41 - super(project, parent);
258.42 - myWebServiceImplement = new PanelWebService(project, parent);
258.43 - myWebServiceCall = new PanelWebService(project, parent);
258.44 - }
258.45 -
258.46 - @Override
258.47 - protected String getComponentName()
258.48 - {
258.49 - return NAME_WSDL;
258.50 - }
258.51 -
258.52 - @Override
258.53 - protected Panel getNext()
258.54 - {
258.55 - return new PanelProxy(getProject(), this,
258.56 - (WSDLModel) myWebServiceImplement.getResult(),
258.57 - (WSDLModel) myWebServiceCall.getResult());
258.58 - }
258.59 -
258.60 - @Override
258.61 - protected String getError()
258.62 - {
258.63 - return getError(myWebServiceImplement.getError(), myWebServiceCall.getError());
258.64 - }
258.65 -
258.66 - @Override
258.67 - protected void createPanel(JPanel mainPanel, GridBagConstraints cc)
258.68 - {
258.69 - JPanel panel = new JPanel(new GridBagLayout());
258.70 - GridBagConstraints c = new GridBagConstraints();
258.71 - c.anchor = GridBagConstraints.WEST;
258.72 - c.fill = GridBagConstraints.HORIZONTAL;
258.73 - c.weightx = 1.0;
258.74 -
258.75 - // we implement
258.76 - c.gridy++;
258.77 - c.insets = new Insets(0, 0, 0, 0);
258.78 - panel.add(createSeparator(i18n("LBL_We_Implement")), c); // NOI18N
258.79 -
258.80 - c.gridy++;
258.81 - c.insets = new Insets(
258.82 - TINY_INSET, MEDIUM_INSET + SMALL_INSET + TINY_INSET, TINY_INSET, 0);
258.83 - myWebServiceImplement.createPanel(panel, c);
258.84 -
258.85 - // we call
258.86 - c.gridy++;
258.87 - c.insets = new Insets(0, 0, 0, 0);
258.88 - panel.add(createSeparator(i18n("LBL_We_Call")), c); // NOI18N
258.89 -
258.90 - c.gridy++;
258.91 - c.insets = new Insets(
258.92 - TINY_INSET, MEDIUM_INSET + SMALL_INSET + TINY_INSET, TINY_INSET, 0);
258.93 - myWebServiceCall.createPanel(panel, c);
258.94 -
258.95 - mainPanel.add(panel, cc);
258.96 - }
258.97 -
258.98 - private Panel myWebServiceImplement;
258.99 - private Panel myWebServiceCall;
258.100 -}
259.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelWebService.java Wed Feb 21 08:53:38 2007 +0000
259.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
259.3 @@ -1,144 +0,0 @@
259.4 -/*
259.5 - * The contents of this file are subject to the terms of the Common Development
259.6 - * and Distribution License (the License). You may not use this file except in
259.7 - * compliance with the License.
259.8 - *
259.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
259.10 - * or http://www.netbeans.org/cddl.txt.
259.11 - *
259.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
259.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
259.14 - * If applicable, add the following below the CDDL Header, with the fields
259.15 - * enclosed by brackets [] replaced by your own identifying information:
259.16 - * "Portions Copyrighted [year] [name of copyright owner]"
259.17 - *
259.18 - * The Original Software is NetBeans. The Initial Developer of the Original
259.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
259.20 - * Microsystems, Inc. All Rights Reserved.
259.21 - */
259.22 -package org.netbeans.modules.xslt.project.wizard.element;
259.23 -
259.24 -import java.awt.GridBagConstraints;
259.25 -import java.awt.GridBagLayout;
259.26 -import java.awt.Insets;
259.27 -import java.awt.event.ActionEvent;
259.28 -import java.awt.event.ItemEvent;
259.29 -import java.awt.event.ItemListener;
259.30 -
259.31 -import javax.swing.AbstractAction;
259.32 -import javax.swing.JButton;
259.33 -import javax.swing.JComboBox;
259.34 -import javax.swing.JLabel;
259.35 -import javax.swing.JPanel;
259.36 -
259.37 -import org.openide.filesystems.FileObject;
259.38 -import org.netbeans.api.project.Project;
259.39 -
259.40 -import static org.netbeans.modules.print.api.PrintUI.*;
259.41 -
259.42 -/**
259.43 - * @author Vladimir Yaroslavskiy
259.44 - * @version 2007.01.30
259.45 - */
259.46 -final class PanelWebService extends Panel {
259.47 -
259.48 - PanelWebService(Project project, Panel parent) {
259.49 - super(project, parent);
259.50 - }
259.51 -
259.52 - @Override
259.53 - protected String getError()
259.54 - {
259.55 - myFile = getWSDL();
259.56 -
259.57 - if (myFile == null) {
259.58 - return i18n("ERR_Web_Service_Is_Required"); // NOI18N
259.59 - }
259.60 - return null;
259.61 - }
259.62 -
259.63 - @Override
259.64 - protected Object getResult()
259.65 - {
259.66 - return Util.getWSDLModel(myFile);
259.67 - }
259.68 -
259.69 - @Override
259.70 - protected void createPanel(JPanel mainPanel, GridBagConstraints cc)
259.71 - {
259.72 - JPanel panel = new JPanel(new GridBagLayout());
259.73 - GridBagConstraints c = new GridBagConstraints();
259.74 - c.anchor = GridBagConstraints.WEST;
259.75 -
259.76 - // label
259.77 - c.gridy++;
259.78 - c.weightx = 0.0;
259.79 - c.fill = GridBagConstraints.NONE;
259.80 - c.insets = new Insets(TINY_INSET, 0, TINY_INSET, 0);
259.81 - myFileLabel = createLabel(i18n("LBL_Web_Service_File")); // NOI18N
259.82 - panel.add(myFileLabel, c);
259.83 -
259.84 - // wsdl
259.85 - c.weightx = 1.0;
259.86 - c.fill = GridBagConstraints.HORIZONTAL;
259.87 - c.insets = new Insets(TINY_INSET, SMALL_INSET, TINY_INSET, 0);
259.88 - myWSDL = new JComboBox();
259.89 - myWSDL.setRenderer(new Renderer());
259.90 - myFileLabel.setLabelFor(myWSDL);
259.91 - panel.add(myWSDL, c);
259.92 -
259.93 - // [browse]
259.94 - c.weightx = 0.0;
259.95 - c.fill = GridBagConstraints.NONE;
259.96 - c.insets = new Insets(TINY_INSET, SMALL_INSET, TINY_INSET, 0);
259.97 - myBrowse = createButton(
259.98 - i18n("TLT_Browse_WSDL"), // NOI18N
259.99 - new AbstractAction(i18n("LBL_Browse_WSDL")) { // NOI18N
259.100 - public void actionPerformed(ActionEvent event) {
259.101 - printInformation( // todo m
259.102 - "Dialog will be implemented by xml team," + // NOI18N
259.103 - " see issue 93596."); // NOI18N
259.104 - }
259.105 - }
259.106 - );
259.107 -// panel.add(myBrowse, c);
259.108 - mainPanel.add(panel, cc);
259.109 - update();
259.110 - }
259.111 -
259.112 - private ItemListener createItemListener(final boolean existing) {
259.113 - return new ItemListener() {
259.114 - public void itemStateChanged(ItemEvent event) {
259.115 - setEnabled(existing);
259.116 - }
259.117 - };
259.118 - }
259.119 -
259.120 - @Override
259.121 - protected void setEnabled(boolean enabled)
259.122 - {
259.123 - myWSDL.setEnabled(enabled);
259.124 - myBrowse.setEnabled(enabled);
259.125 - myFileLabel.setEnabled(enabled);
259.126 - }
259.127 -
259.128 - @Override
259.129 - protected void update()
259.130 - {
259.131 - myWSDL.removeAllItems();
259.132 - FileObject [] files = Util.getWSDLFiles(getProject());
259.133 -
259.134 - for (FileObject file : files) {
259.135 - myWSDL.addItem(file);
259.136 - }
259.137 - }
259.138 -
259.139 - private FileObject getWSDL() {
259.140 - return (FileObject) myWSDL.getSelectedItem();
259.141 - }
259.142 -
259.143 - private JButton myBrowse;
259.144 - private JComboBox myWSDL;
259.145 - private JLabel myFileLabel;
259.146 - private FileObject myFile;
259.147 -}