axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sandak...@apache.org
Subject svn commit: r560098 [1/2] - in /webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin: plugin/resources/ src/main/java/org/apache/axis2/tools/bean/ src/main/java/org/apache/axis2/tools/component/ src/main/java/org/apache/axis2/tools/idea/ src/mai...
Date Fri, 27 Jul 2007 04:59:57 GMT
Author: sandakith
Date: Thu Jul 26 21:59:54 2007
New Revision: 560098

URL: http://svn.apache.org/viewvc?view=rev&rev=560098
Log:
fix Axis2-2970

Added:
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/plugin/resources/
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/plugin/resources/service.xsd
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ClassFileFilter.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ParameterObj.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ValidateXMLFile.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/XmlFileFilter.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ClassFileLocationPage.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/LibraryAddingPage.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ParameterDialog.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ServiceArchiveOutputLocationPage.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ServiceXMLEditPage.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ServiceXMLFileSelectionPage.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ServiceXMLGenerationPage.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/WSDLFileSelectionPage.java
Removed:
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/CodegenPlugin.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/CodegenPluginAction.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/ModuleDialog.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/ParameterDialog.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ObjectKeeper.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/Axi2PluginPage.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/BottomPanel.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ClassSelctionPage.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/DescriptorFile.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/FirstFrame.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ImagePanel.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/LogoPage.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/OutPage.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ResourceChooser.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/SelectPanel.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ServiceArciveFrame.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/XMLSelectionPage.java
Modified:
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/SrcCompiler.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/component/WizardPanel.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ChooserPanel.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/FirstPanel.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ProgressBarPanel.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondPanel.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/WSDL2JavaOutputPanel.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/MiddlePanel.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OptionPanel.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OutputPanel.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/CodegenFrame.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/WizardFrame.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ArchiveBean.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ServiceObj.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/plugin/Axis2IdeaPlugin.java

Added: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/plugin/resources/service.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/plugin/resources/service.xsd?view=auto&rev=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/plugin/resources/service.xsd (added)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/plugin/resources/service.xsd Thu Jul 26 21:59:54 2007
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+    <xs:element name="serviceGroup">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element maxOccurs="unbounded" ref="service"/>
+                <xs:element minOccurs="0" ref="parameter"/>
+                <xs:element minOccurs="0" ref="module"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="service">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:choice maxOccurs="unbounded">
+                    <xs:element ref="module"/>
+                    <xs:element ref="operation"/>
+                    <xs:element ref="parameter"/>
+                    <xs:element ref="description"/>
+                    <xs:element ref="excludeOperations"/>
+                    <xs:element ref="messageReceivers"/>
+                    <xs:element ref="schema"/>
+                    <xs:element ref="transports"/>
+                </xs:choice>
+                <xs:element minOccurs="0" ref="dataLocator"/>
+            </xs:sequence>
+            <xs:attribute name="class"/>
+            <xs:attribute name="name"/>
+            <xs:attribute name="scope" type="xs:NCName"/>
+            <xs:attribute name="targetNamespace" type="xs:anyURI"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="description" type="xs:string"/>
+    <xs:element name="excludeOperations">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element ref="operation"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="messageReceivers">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element maxOccurs="unbounded" ref="messageReceiver"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="schema">
+        <xs:complexType>
+            <xs:attribute name="schemaNamespace" use="required" type="xs:anyURI"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="transports">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element ref="transport"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="transport" type="xs:NCName"/>
+    <xs:element name="dataLocator">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" ref="dialectLocator"/>
+            </xs:sequence>
+            <xs:attribute name="class"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="dialectLocator">
+        <xs:complexType>
+            <xs:attribute name="class" use="required"/>
+            <xs:attribute name="dialect" use="required" type="xs:anyURI"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="parameter">
+        <xs:complexType mixed="true">
+            <xs:attribute name="locked" type="xs:NMTOKEN"/>
+            <xs:attribute name="name" use="required" type="xs:NCName"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="module">
+        <xs:complexType>
+            <xs:attribute name="ref" use="required" type="xs:NCName"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="operation">
+        <xs:complexType mixed="true">
+            <xs:choice minOccurs="0" maxOccurs="unbounded">
+                <xs:element ref="messageReceiver"/>
+                <xs:element ref="module"/>
+                <xs:element ref="parameter"/>
+                <xs:element ref="actionMapping"/>
+                <xs:element ref="faultActionMapping"/>
+                <xs:element ref="message"/>
+                <xs:element ref="outputActionMapping"/>
+            </xs:choice>
+            <xs:attribute name="mep" type="xs:anyURI"/>
+            <xs:attribute name="name" type="xs:NCName"/>
+            <xs:attribute name="qname" type="xs:NCName"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="actionMapping" type="xs:anyURI"/>
+    <xs:element name="faultActionMapping">
+        <xs:complexType>
+            <xs:simpleContent>
+                <xs:extension base="xs:anyURI">
+                    <xs:attribute name="faultName" use="required" type="xs:NCName"/>
+                </xs:extension>
+            </xs:simpleContent>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="message">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element ref="parameter"/>
+            </xs:sequence>
+            <xs:attribute name="label" use="required" type="xs:NCName"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="outputActionMapping" type="xs:anyURI"/>
+    <xs:element name="messageReceiver">
+        <xs:complexType>
+            <xs:attribute name="class" use="required" type="xs:NCName"/>
+            <xs:attribute name="mep" type="xs:anyURI"/>
+        </xs:complexType>
+    </xs:element>
+</xs:schema>

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/SrcCompiler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/SrcCompiler.java?view=diff&rev=560098&r1=560097&r2=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/SrcCompiler.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/SrcCompiler.java Thu Jul 26 21:59:54 2007
@@ -44,27 +44,28 @@
 
     public void compileSource(String tempPath) {
 
-        Path path;
-        File destDir = new File(tempPath + File.separator + "classes");
-        destDir.mkdir();
+          Path path;
+          File destDir = new File(tempPath + File.separator + "classes");
+          destDir.mkdir();
 
-        Path srcPath = new Path(project, tempPath + File.separator + "src");
-        this.setSrcdir(srcPath);
-        this.setDestdir(destDir);
-        this.setIncludes("**" + File.separator + "*.java, *.java");
-        URL url = getClass().getResource("/icons");
-        File lib = new File(url.getPath() + File.separator + ".." + File.separator + ".." + File.separator + "lib");
-        File[] files;
-        files = lib.listFiles();
+          Path srcPath = new Path(project, tempPath + File.separator + "src");
+          this.setSrcdir(srcPath);
+          this.setDestdir(destDir);
+          this.setIncludes("**" + File.separator + "*.java, *.java");
+          URL url = getClass().getResource("/icons");
+          File lib = new File(url.getPath() + File.separator + ".." + File.separator + ".." + File.separator + "lib");
+          File[] files;
+          files = lib.listFiles();
 
-        Path classpath = new Path(project);
-        for (int count = 0; count < files.length; count++) {
-            path = new Path(project, files[count].getAbsolutePath());
-            classpath.add(path);
-        }
-        this.setClasspath(classpath);
-       this.setFork(true);
-        this.perform();
+          Path classpath = new Path(project);
+          for (int count = 0; count < files.length; count++) {
+              path = new Path(project, files[count].getAbsolutePath());
+              classpath.add(path);
+          }
+          this.setClasspath(classpath);
+         this.setFork(true);
+          this.perform();
+
+      }
 
-    }
 }

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/component/WizardPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/component/WizardPanel.java?view=diff&rev=560098&r1=560097&r2=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/component/WizardPanel.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/component/WizardPanel.java Thu Jul 26 21:59:54 2007
@@ -32,11 +32,13 @@
     private ImageIcon panelImage;
     private String  panelBottomTitle;
     private String error;
+    private String frametitle;
     private boolean flag;
     private boolean progressFlag;
     public static final int WSDL_2_JAVA_TYPE = 1;
     public static final int JAVA_2_WSDL_TYPE = 2;
-    public static final int UNSPECIFIED_TYPE = 3;
+    public static final int SERVICE_ARCHIVE_TYPE=3;
+    public static final int UNSPECIFIED_TYPE = 4;
     private boolean isPageComplete = false;
 
     public WizardPanel(WizardComponents wizardComponents) {
@@ -45,7 +47,7 @@
 
     public WizardPanel(WizardComponents wizardComponents, String title) {
         this.wizardComponents = wizardComponents;
-        this.panelTopTitle = title;
+        this.frametitle = title;
         java.net.URL resource = WizardPanel.class.getResource("/icons/asf-feather.png");
         setPanelImage(new ImageIcon(resource));
     }
@@ -111,6 +113,13 @@
         return progressFlag;
     }
 
+    public String getFrameTitle(){
+         return this.frametitle;
+    }
+
+    public void setFrameTitle(String title){
+        this.frametitle=title;
+    }
     // next
     protected boolean goNext() {
         if (wizardComponents.getWizardPanelList().size() > wizardComponents.getCurrentIndex()+1 ) {
@@ -132,7 +141,7 @@
         }
     }
     
-    protected void switchPanel(int panelIndex) {
+    public void switchPanel(int panelIndex) {
         getWizardComponents().setCurrentIndex(panelIndex);
         getWizardComponents().updateComponents();
     }

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ChooserPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ChooserPanel.java?view=diff&rev=560098&r1=560097&r2=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ChooserPanel.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ChooserPanel.java Thu Jul 26 21:59:54 2007
@@ -29,8 +29,9 @@
     private boolean flag=false;
     private JRadioButton optionJ2WRadioButton;
     private JRadioButton optionW2JRadioButton;
+    private JRadioButton optionServiceArchiverRadioButton;
     private ButtonGroup bg;
-    private char selectedOption = 'A'; // 'N' is no option selected  'A', 'B' & 'F' stands for options
+    private char selectedOption = 'A'; // 'N' is no option selected  'A', 'B','C' & 'F' stands for options
     final private String hint="You can generate java code from a WSDL or WSDL from a java source file.";
     /**
      * construct method for chooserPanel
@@ -39,7 +40,7 @@
 
     public ChooserPanel(WizardComponents wizardComponents){
 
-        super(wizardComponents, "ChooserPanel");
+        super(wizardComponents, "Axis2 Idea Plugin Wizards");
         setPanelTopTitle("Select the wizard");
         setPanelBottomTitle("Welcome to the Axis2 code generator wizard");
         init();
@@ -56,9 +57,11 @@
 
         optionW2JRadioButton = new JRadioButton("Generate java sorce code from a WSDl file.",true);
         optionJ2WRadioButton = new JRadioButton("Generate a WSDl from a java source file",false);
+        optionServiceArchiverRadioButton = new JRadioButton("Create Service Archiver",false);
         ButtonGroup bg = new ButtonGroup();
         bg.add(optionJ2WRadioButton);
         bg.add(optionW2JRadioButton);
+        bg.add(optionServiceArchiverRadioButton);
 
         this.setLayout(new GridBagLayout() );
 
@@ -97,11 +100,26 @@
                 }
             }
         });
+        // option button for service Archive
+
+            this.add(optionServiceArchiverRadioButton
+                    , new GridBagConstraints(0, 3, 1, 1, 1.0, 0.0
+                    , GridBagConstraints.NORTHWEST , GridBagConstraints.NONE
+                    , new Insets(10, 20, 0,0), 0, 0));
+            optionServiceArchiverRadioButton .addItemListener(new ItemListener() {
+                public void itemStateChanged(ItemEvent e) {
+                    if (e.getStateChange() == ItemEvent.SELECTED) {
+                        selectedOption = 'C';
+                        update();
+                    }
+                }
+            });
+
 
         // hint button
 
         this.add(btnHint,
-                new GridBagConstraints(0,3, 1, 1, 1.0,0.0
+                new GridBagConstraints(0,4, 1, 1, 1.0,0.0
                         , GridBagConstraints.NORTHWEST , GridBagConstraints.NONE
                         , new Insets(10, 20, 0,0), 0, 0));
         btnHint.addActionListener(new ActionListener()  {
@@ -122,7 +140,7 @@
         // hint lable
 
         this.add(lblHint,
-                new GridBagConstraints(0, 4, 1, 1, 1.0, 1.0
+                new GridBagConstraints(0, 5, 1, 1, 1.0, 1.0
                         , GridBagConstraints.NORTHWEST , GridBagConstraints.NONE
                         , new Insets(10, 20, 0,0), 0, 0));
 
@@ -136,10 +154,10 @@
      */
 
     public void update() {
-        setNextButtonEnabled((selectedOption == 'A') || (selectedOption == 'B') );
+        setNextButtonEnabled((selectedOption == 'A') || (selectedOption == 'B') ||(selectedOption == 'C'));
         setBackButtonEnabled(false); // there is no way back
         setProgressPanelVisible(false);
-        setPageComplete(true);
+        setPageComplete(true);          
     }
 
     /**
@@ -151,8 +169,11 @@
 
         } else if (selectedOption == 'B') {
             switchPanel(CodegenFrame.PANEL_FIRST_B );
-            setNextButtonEnabled(false);
         }
+        else if (selectedOption == 'C') {
+            switchPanel(CodegenFrame.PANEL_FIRST_C );
+        }
+        setNextButtonEnabled(false);
     }
 
     /**

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/FirstPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/FirstPanel.java?view=diff&rev=560098&r1=560097&r2=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/FirstPanel.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/FirstPanel.java Thu Jul 26 21:59:54 2007
@@ -52,7 +52,7 @@
     private CodegenBean codegenBean;
 
     public FirstPanel(WizardComponents wizardComponents,CodegenBean codegenBean) {
-        super(wizardComponents, "Option  was choosed");
+        super(wizardComponents, "Axis2 Idea Plugin WSDL2Java Wizards");
         this.codegenBean=codegenBean;
         setPanelTopTitle("WSDL selection page");
         setPanelBottomTitle("please Select the WSDl file location");
@@ -157,7 +157,6 @@
             setPageComplete(false);
         }
         setBackButtonEnabled(true);
-
     }
 
     public  int getPageType() {

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ProgressBarPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ProgressBarPanel.java?view=diff&rev=560098&r1=560097&r2=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ProgressBarPanel.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ProgressBarPanel.java Thu Jul 26 21:59:54 2007
@@ -22,10 +22,9 @@
 import java.awt.*;
 import java.lang.reflect.InvocationTargetException;
 
-public class
-        ProgressBarPanel  extends JPanel {
+public class ProgressBarPanel  extends JPanel {
     private  volatile boolean stop = false;
-    private static int DELAY = 100;
+    private static int DELAY = 500;
     public volatile String val=null;
     private JLabel progressDescription;
     private JProgressBar progressSent;
@@ -65,7 +64,7 @@
     public void aboutToDisplayPanel() {
 
         setProgressValue(0);
-        setProgressText("Connecting to Server...");
+       // setProgressText("Connecting to Server...");
 
     }
     public void displayingPanel() {
@@ -84,7 +83,7 @@
                             int value = progressSent .getValue();
                             progressSent .setValue(value+4);
                             setProgressValue(value+4);
-                            progressDescription .setText("Genarate Code. Please wait.....");
+                          //  progressDescription .setText("Genarate Code. Please wait.....");
                         } else if(!stop){
                             progressSent .setIndeterminate(true);
 

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondPanel.java?view=diff&rev=560098&r1=560097&r2=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondPanel.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondPanel.java Thu Jul 26 21:59:54 2007
@@ -58,7 +58,7 @@
     private CodegenBean codegenBean;
 
     public SecondPanel(WizardComponents wizardComponents,CodegenBean codegenBean) {
-        super(wizardComponents, "Option  was choosed");
+        super(wizardComponents, "Axis2 Idea Plugin WSDL2Java Wizards");
         this.codegenBean=codegenBean;
         setPanelTopTitle("Options");
         setPanelBottomTitle("Set the options for the code generator. If you wish to edit the codegen options, Select custom");
@@ -374,15 +374,15 @@
                 serviceXML.setEnabled(false);
                 serverSideInterface.setEnabled(false);
             }
-            if(!rdasync.isSelected()){
+            if(rdasync.isSelected()){
                 rdasync.setEnabled(true);
-                rdasync.setSelected(true);
+                rdasync.setSelected(false);
             }else{
                 rdasync.setEnabled(true);
             }
-            if(rdBoth.isSelected()){
+            if(!rdBoth.isSelected()){
                 rdBoth.setEnabled(true);
-                rdBoth.setSelected(false);
+                rdBoth.setSelected(true);
             }else{
                 rdBoth.setEnabled(true);
             }
@@ -492,7 +492,6 @@
                     //setComboBoxEnable(false);
                     // load the ports
                     loadPortNames();
-                    //Todo error message null
                 } else {
                     // service name list being empty means we are switching to
                     // the interface mode
@@ -501,7 +500,6 @@
                     // disable the combo's
                    // setComboBoxEnable(false);
                     //this is not an error
-                    //Todo error message null
 
                 }
 
@@ -513,12 +511,10 @@
         } catch (WSDLException e) {
             // disable the combo's
             setComboBoxEnable(false);
-            //Todo error message "Specified WSDL is invalid!, Please select a validated *.wsdl/*.xml file on previous page."
         }
         catch (Exception e) {
             // disable the combo's
             setComboBoxEnable(false);
-            //Todo error message "Specified WSDL is not found!, Please Check whether you have entered the correct path to a *.wsdl on previous page."
         }
 
     }

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/WSDL2JavaOutputPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/WSDL2JavaOutputPanel.java?view=diff&rev=560098&r1=560097&r2=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/WSDL2JavaOutputPanel.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/WSDL2JavaOutputPanel.java Thu Jul 26 21:59:54 2007
@@ -83,10 +83,10 @@
 
 
     public WSDL2JavaOutputPanel(WizardComponents wizardComponents,CodegenBean codegenBean, Project project) {
-        super(wizardComponents, "Output");
+        super(wizardComponents, "Axis2 Idea Plugin WSDL2Java Wizards");
         this.codegenBean=codegenBean;
         this.project=project;
-        setPanelTopTitle("output");
+        setPanelTopTitle("Output");
         setPanelBottomTitle("set the out location for the generated code");
         init();
     }
@@ -128,9 +128,8 @@
         chbAddAxisCodegenJar =new JCheckBox("Add the Axis2 Codegen jars to the codegen resulted project");
         chbAddAxisLib =new JCheckBox(" Add Axis2 libraries to the codegen result project ");
         chbCreateJar=new JCheckBox(" Create a jar file of codegen result project and add to resulted project lib folder(Default :CodegenResults.jar)");
-        chbAddAxisLib.setEnabled(false);//Todo after writing include axis2 jar file it must remove
-        radCurrentProject =new JRadioButton("Browse and select a project on current idea workspace");
-        radCustomLocation =new JRadioButton("Browse and select location on local file system");
+        radCurrentProject =new JRadioButton("Browse and select a project on current idea workspace",false);
+        radCustomLocation =new JRadioButton("Browse and select location on local file system",true);
         ButtonGroup  buttonGroup= new  ButtonGroup();
         buttonGroup.add(radCurrentProject );
         buttonGroup.add(radCustomLocation);
@@ -341,7 +340,7 @@
                 new GridBagConstraints(0, 16, GridBagConstraints.REMAINDER, 1, 0.1, 1.0
                         , GridBagConstraints.NORTHWEST , GridBagConstraints.BOTH
                         , new Insets(10, 20, 0,0), 0, 0));
-
+        update();
     }
     public void back() {
         switchPanel(CodegenFrame.PANEL_OPTION_A );
@@ -352,8 +351,7 @@
     public void update(){
         setNextButtonEnabled(false);
         checkPageComlete();
-        setEnabledForAddAxisLib();
-
+        setEnabledForAddAxisLib();    
     }
     public void loadCmbCurrentProject() {
         Module modules[] = codegenBean .getModules();
@@ -571,26 +569,26 @@
     private void handleModifyEvent() {
         String text = this.txtoutput.getText();
         if ((text == null) || (text.trim().equals(""))) {
-            //Todo error message "output location needs to be specified"
+            // error message "output location needs to be specified"
 			return;
 		}
-		//Todo error message null
+		// error message null
 	}
 	private void handleAxisHomeModifyEvent() {
 		String text = this.txtaxisHome.getText();
 		if ((text == null) || (text.trim().equals(""))) {
-			//Todo error message "output location needs to be specified"
+			// error message "output location needs to be specified"
 			return;
 		}
-		//Todo error message null
+		// error message null
 	}
     private void handleJarNameModifyEvent() {
 		String text = this.txtjarFileName.getText();
 		if ((text == null) || (text.trim().equals(""))) {
-			//Todo error message "output location needs to be specified"
+			// error message "output location needs to be specified"
 			return;
 		}
-		//Todo error message null
+		// error message null
 	}
 }
 

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/MiddlePanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/MiddlePanel.java?view=diff&rev=560098&r1=560097&r2=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/MiddlePanel.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/MiddlePanel.java Thu Jul 26 21:59:54 2007
@@ -69,7 +69,7 @@
      * @param wsdlgenBean
      */
     public MiddlePanel(WizardComponents wizardComponents ,WsdlgenBean wsdlgenBean) {
-        super(wizardComponents, "Java source / classpath selection");
+        super(wizardComponents, "Axis2 Idea Plugin Java2WSDL Wizards");
         setPanelTopTitle("Java source / classpath selection");
         setPanelBottomTitle("Select the classes and the libraries");
         this.wsdlgenBean=wsdlgenBean;
@@ -245,8 +245,10 @@
     public void next() {
         if(txtClass.getText()!=null && isPageComplete()){
             switchPanel(CodegenFrame.PANEL_OPTION_B );
-        } else
+        } else{
             switchPanel(CodegenFrame.PANEL_FIRST_B );
+            setNextButtonEnabled(false);
+        }
     }
     //back
     public void back() {

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OptionPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OptionPanel.java?view=diff&rev=560098&r1=560097&r2=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OptionPanel.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OptionPanel.java Thu Jul 26 21:59:54 2007
@@ -30,8 +30,7 @@
 /**
  * this is the first panel of java2wsdl wizard
  */
-public class
-        OptionPanel extends WizardPanel{
+public class OptionPanel extends WizardPanel{
     /**
      * variable
      */
@@ -48,7 +47,7 @@
      * @param wsdlgenBean
      */
     public OptionPanel(WizardComponents wizardComponents,WsdlgenBean wsdlgenBean){
-        super(wizardComponents, "Option  was choosed");
+        super(wizardComponents,  "Axis2 Idea Plugin Java2WSDL Wizards");
         setPanelTopTitle("Java to WSDL Options");
         setPanelBottomTitle("Set the Option for the generation");
         this.wsdlgenBean=wsdlgenBean;
@@ -143,6 +142,8 @@
             txtSchemaTargetNspPrefix.setText(wsdlgenBean.getSchemaTargetNamespacePrefix());
         if(wsdlgenBean.getServiceName()!=null )
             txtService.setText(wsdlgenBean.getServiceName());
+        ((OutputPanel)getWizardComponents().getWizardPanel(CodegenFrame.PANEL_LAST_B)).loadCmbCurrentProject();
+        ((OutputPanel)getWizardComponents().getWizardPanel(CodegenFrame.PANEL_LAST_B)).loadcmbModuleSrcProject();        
         setBackButtonEnabled(true);
         setNextButtonEnabled(true);
         setFinishButtonEnabled(false);

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OutputPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OutputPanel.java?view=diff&rev=560098&r1=560097&r2=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OutputPanel.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OutputPanel.java Thu Jul 26 21:59:54 2007
@@ -41,10 +41,14 @@
     private JComboBox cmbModuleSrc;
     private JTextField txtLocation;
     private JTextField txtFileName;
+    private JLabel lblModule;
+    private JLabel lblDirect;
+    private JLabel lblOutput;
     private JButton btnBrowes;
     final JFileChooser DirChooser=new JFileChooser();
     private Project project;
     private WsdlgenBean wsdlgenBean;
+    private boolean flag = true;
 
     /**
      * Constructor
@@ -53,7 +57,7 @@
      * @param project
      */
     public OutputPanel(WizardComponents wizardComponents,WsdlgenBean wsdlgenBean, Project project){
-        super(wizardComponents, "Option  was choosed");
+        super(wizardComponents,  "Axis2 Idea Plugin Java2WSDL Wizards");
         setPanelTopTitle("WSDl file output location");
         setPanelBottomTitle("Select the location for the generated WSDL");
         this.wsdlgenBean=wsdlgenBean;
@@ -62,57 +66,75 @@
     }
     private void init(){
 
-        rbtnAdd =new JRadioButton("Browes and Add the WSDL to a project on current Idea workspace",false);
+        rbtnAdd =new JRadioButton("Browes and Add the WSDL to a project on current Idea workspace",true);
 
-        rbtnSave =new JRadioButton("Browes and Save the WSDL file on local file system",true);
+        rbtnSave =new JRadioButton("Browes and Save the WSDL file on local file system",false);
 
         cmbCurrentProject =new JComboBox();
-        cmbCurrentProject.setEnabled(false);
+        cmbCurrentProject.setEnabled(true);
         cmbModuleSrc=new JComboBox();
-        cmbModuleSrc.setEnabled(false);
+        cmbModuleSrc.setEnabled(true);
         ButtonGroup  buttonGroup= new  ButtonGroup();
         buttonGroup.add(rbtnAdd );
         buttonGroup.add(rbtnSave );
 
-        txtFileName =new JTextField();
+        txtFileName =new JTextField("service.wsdl");
 
         txtLocation=new JTextField();
 
         btnBrowes=new JButton("Browse..");
+        lblOutput=new JLabel("OutPut Location");
+        lblModule=new JLabel("Select the Module");
+        lblModule.setEnabled(false);
+        lblDirect=new JLabel("Select the Directory");
+        lblDirect.setEnabled(false);
 
         setBackButtonEnabled(true);
         setNextButtonEnabled(false);
         setFinishButtonEnabled(false);
         this.setLayout(new GridBagLayout());
 
+        this.add(new JLabel("OutPut File Name")
+                , new GridBagConstraints(0, 0, 1, 1, 0.1, 0.0
+                , GridBagConstraints.WEST  , GridBagConstraints.NONE
+                , new Insets(5, 10, 0, 0), 0, 0));
+
+        this.add(txtFileName
+                , new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0
+                , GridBagConstraints.WEST  , GridBagConstraints.HORIZONTAL
+                , new Insets(5, 10, 0, 0), 0, 0));
+
+
         this.add(new JLabel("Select the location where to put the output")
-        , new GridBagConstraints(0, 0, GridBagConstraints.REMAINDER, 1,  0.0, 0.0
+                , new GridBagConstraints(0, 1, GridBagConstraints.REMAINDER, 1,  0.0, 0.0
         , GridBagConstraints.WEST  , GridBagConstraints.NONE
         , new Insets(5, 10, 0, 10), 0, 0));
 
         this.add(rbtnAdd
-        , new GridBagConstraints(0, 1, GridBagConstraints.REMAINDER, 1, 0.0, 0.0
+        , new GridBagConstraints(0, 2, GridBagConstraints.REMAINDER, 1, 0.0, 0.0
         , GridBagConstraints.WEST , GridBagConstraints.NONE
         , new Insets(5, 10, 0,10), 0, 0));
         rbtnAdd.addActionListener(new ActionListener()  {
             public void actionPerformed(ActionEvent e) {
-                loadCmbCurrentProject();
                 cmbCurrentProject.setEnabled(true);
                 cmbModuleSrc.setEnabled(true);
-                txtLocation.setEnabled(false);
+                lblModule.setEnabled(true);
+                txtLocation .setEnabled(false);
                 btnBrowes.setEnabled(false);
-               setFinishButtonEnabled(true);
+                loadCmbCurrentProject();
+                loadcmbModuleSrcProject();
+                setFinishButtonEnabled(true);
                 update();
             }
         });
 
-         this.add(new JLabel("Select the Module")
-        , new GridBagConstraints(0, 2, 1, 1,  0.1, 0.0
+         this.add(lblModule
+        , new GridBagConstraints(0, 3, 1, 1,  0.1, 0.0
         , GridBagConstraints.WEST  , GridBagConstraints.NONE
         , new Insets(5, 10, 0, 0), 0, 0));
 
         this.add(cmbCurrentProject
-        , new GridBagConstraints(1, 2, GridBagConstraints.RELATIVE, 1, 1.0, 0.0
+        , new GridBagConstraints(1, 3, GridBagConstraints.RELATIVE, 1, 1.0, 0.0
         , GridBagConstraints.WEST , GridBagConstraints.HORIZONTAL
         , new Insets(5, 10, 0,0), 0, 0));
         cmbCurrentProject.addActionListener(new ActionListener()  {
@@ -121,47 +143,48 @@
                 update();
             }
         });
-         this.add(new JLabel("Select the Directory")
-        , new GridBagConstraints(0, 3, 1, 1,  0.1, 0.0
+         this.add(lblDirect
+        , new GridBagConstraints(0, 4, 1, 1,  0.1, 0.0
         , GridBagConstraints.WEST  , GridBagConstraints.NONE
         , new Insets(5, 10, 0, 0), 0, 0));
 
         this.add(cmbModuleSrc
-        , new GridBagConstraints(1, 3, GridBagConstraints.RELATIVE, 1, 1.0, 0.0
+        , new GridBagConstraints(1, 4, GridBagConstraints.RELATIVE, 1, 1.0, 0.0
         , GridBagConstraints.WEST , GridBagConstraints.HORIZONTAL
         , new Insets(5, 10, 0,0), 0, 0));
         cmbModuleSrc.addActionListener(new ActionListener()  {
-            public void actionPerformed(ActionEvent e) {
+            public void actionPerformed(ActionEvent e) {                  
                 update();
             }
         });
 
         this.add(rbtnSave
-        , new GridBagConstraints(0, 4, GridBagConstraints.REMAINDER, 1, 0.0, 0.0
+        , new GridBagConstraints(0, 5, GridBagConstraints.REMAINDER, 1, 1.0, 0.0
         , GridBagConstraints.WEST  , GridBagConstraints.NONE
         , new Insets(5, 10, 0,0), 0, 0));
         rbtnSave.addActionListener(new ActionListener()  {
             public void actionPerformed(ActionEvent e) {
                 cmbCurrentProject.setEnabled(false);
                 cmbModuleSrc.setEnabled(false);
-                txtLocation.setEnabled(true);
+                txtLocation .setEnabled(true);
                 btnBrowes.setEnabled(true);
+                setEnabledForCustomProject();
                 update();
             }
         });
-        this.add(new JLabel("OutPut Location")
-        , new GridBagConstraints(0, 5, 1, 1, 0.1, 0.0
-        , GridBagConstraints.WEST  , GridBagConstraints.NONE
+        this.add(lblOutput
+        , new GridBagConstraints(0, 6, 1, 1, 0.1, 1.0
+        , GridBagConstraints.NORTHWEST , GridBagConstraints.NONE
         , new Insets(5, 10, 0,0), 0, 0));
 
          this.add(txtLocation
-        , new GridBagConstraints(1, 5, 1, 1, 1.0, 0.0
-        , GridBagConstraints.WEST  , GridBagConstraints.HORIZONTAL
+        , new GridBagConstraints(1, 6, 1, 1, 1.0, 1.0
+        , GridBagConstraints.NORTHWEST , GridBagConstraints.HORIZONTAL
         , new Insets(5, 10, 0, 0), 0, 0));
 
          this.add(btnBrowes
-        , new GridBagConstraints(2, 5, 1, 1, 0.1, 0.0
-        , GridBagConstraints.CENTER  , GridBagConstraints.NONE
+        , new GridBagConstraints(2, 6, 1, 1, 0.1, 1.0
+        , GridBagConstraints.NORTHWEST , GridBagConstraints.NONE
         , new Insets(5, 10, 0, 10), 0, 0));
 
         btnBrowes.addActionListener(new ActionListener()  {
@@ -177,16 +200,6 @@
             }
         });
 
-         this.add(new JLabel("OutPut File Name")
-        , new GridBagConstraints(0, 6, 1, 1, 0.1, 1.0
-        , GridBagConstraints.NORTHWEST  , GridBagConstraints.NONE
-        , new Insets(5, 10, 0, 0), 0, 0));
-
-         this.add(txtFileName
-        , new GridBagConstraints(1, 6, 1, 1, 1.0, 1.0
-        , GridBagConstraints.NORTHWEST  , GridBagConstraints.HORIZONTAL
-        , new Insets(5, 10, 0, 0), 0, 0));
-
         wsdlgenBean.setProject(project);
     }
 
@@ -198,6 +211,7 @@
                 cmbCurrentProject.addItem(modules[count].getName());
             }
         }else{
+            rbtnSave.setSelected(true);
             rbtnAdd.setEnabled(false);
       }
     }
@@ -212,14 +226,19 @@
                 cmbModuleSrc.addItem(src[count]);
             }
             count = src.length;
-        }else{
-            rbtnAdd.setEnabled(false);
-            cmbCurrentProject.setEnabled(false);
-            cmbModuleSrc.setEnabled(false);
         }
-
-
+         if (flag)
+        {
+            if (count == 0) {
+                flag =false;
+                setEnabledForCustomProject();
+            }
+            else{
+                setEnabledForCurrentProject();
+            }
+        }
     }
+
      public void back() {
           switchPanel(CodegenFrame.PANEL_OPTION_B );
     }
@@ -260,5 +279,33 @@
      public  int getPageType() {
         return  WizardPanel.JAVA_2_WSDL_TYPE;
     }
+     private void setEnabledForCurrentProject(){
+        rbtnAdd.setSelected(true);
+        rbtnAdd.setEnabled(true);
+        cmbCurrentProject.setEnabled(true);
+        cmbModuleSrc.setEnabled(true);
+        lblDirect.setEnabled(true);
+        lblModule .setEnabled(true);
+        rbtnSave.setSelected(false);
+        txtLocation.setEnabled(false);
+        lblOutput .setEnabled(false);
+        btnBrowes.setEnabled(false);
+    }
+    private void setEnabledForCustomProject(){
+        if(flag){
+            rbtnAdd.setEnabled(false);
+            rbtnAdd.setSelected(false);
+        }else{
+            rbtnSave .setEnabled(true);
+            rbtnSave .setSelected(true);
+        }
+        cmbCurrentProject.setEnabled(false);
+        cmbModuleSrc.setEnabled(false);
+        lblDirect.setEnabled(false);
+        lblModule .setEnabled(false);
+        txtLocation .setEnabled(true);
+        lblOutput .setEnabled(true);
+        btnBrowes .setEnabled(true);
+    }
 }
- 
\ No newline at end of file
+ 

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/CodegenFrame.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/CodegenFrame.java?view=diff&rev=560098&r1=560097&r2=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/CodegenFrame.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/CodegenFrame.java Thu Jul 26 21:59:54 2007
@@ -24,11 +24,14 @@
 import org.apache.axis2.tools.idea.ChooserPanel;
 import org.apache.axis2.tools.idea.SecondPanel;
 import org.apache.axis2.tools.idea.WSDL2JavaOutputPanel;
+//import org.apache.axis2.tools.idea.WSDL2JavaOutputPanel;
 import org.apache.axis2.tools.component.Utilities;
 import org.apache.axis2.tools.component.WizardPanel;
 import org.apache.axis2.tools.java2wsdl.MiddlePanel;
 import org.apache.axis2.tools.java2wsdl.OptionPanel;
 import org.apache.axis2.tools.java2wsdl.OutputPanel;
+import org.apache.ideaplugin.frames.*;
+import org.apache.ideaplugin.bean.ArchiveBean;
 import com.intellij.openapi.project.Project;
 
 /**
@@ -46,19 +49,22 @@
     public static final int PANEL_OPTION_B = 4;
     public static final int PANEL_LAST_A = 5;
     public static final int PANEL_LAST_B = 6;
+    public static final int PANEL_FIRST_C=7;
+    public static final int PANEL_SECOND_C=8;
+    public static final int PANEL_THIRD_C=9;
+    public static final int PANEL_FOURTH_C=10;
+    public static final int PANEL_LOAD_C=11;
+    public static final int PANEL_OPTION_C=12;
+    public static final int PANEL_LAST_C=13;
 
     public CodegenFrame() {
         init();
     }
 
     private void init() {
-        this.setTitle("Axis2 Codegen Wizard");
-
+        this.setTitle("Axis2 Codegen Wizard"); 
         WizardPanel panel = null;
 
-        wsdlgenBean= new WsdlgenBean();
-        codegenBean = new CodegenBean();
-
         panel = new ChooserPanel(getWizardComponents());
         getWizardComponents().addWizardPanel(PANEL_CHOOSER , panel);
 
@@ -75,13 +81,31 @@
         getWizardComponents().addWizardPanel(PANEL_OPTION_B , panel);
 
         panel = new WSDL2JavaOutputPanel(getWizardComponents(),codegenBean,project);
-        getWizardComponents().addWizardPanel(PANEL_LAST_A , panel);
+        getWizardComponents().addWizardPanel(PANEL_LAST_A , panel);      
 
         panel = new OutputPanel(getWizardComponents(),wsdlgenBean,project);
         getWizardComponents().addWizardPanel(PANEL_LAST_B , panel);
 
-        setSize(getPreferredSize());
-        Utilities.centerComponentOnScreen(this);
+        panel = new ClassFileLocationPage(getWizardComponents(),archiveBean);
+        getWizardComponents().addWizardPanel(PANEL_FIRST_C , panel);
+
+        panel = new WSDLFileSelectionPage(getWizardComponents(),archiveBean);
+        getWizardComponents().addWizardPanel(PANEL_SECOND_C , panel);
+
+        panel = new LibraryAddingPage(getWizardComponents(),archiveBean);
+        getWizardComponents().addWizardPanel(PANEL_THIRD_C , panel);
+
+        panel = new ServiceXMLFileSelectionPage(getWizardComponents(),archiveBean);
+        getWizardComponents().addWizardPanel(PANEL_FOURTH_C , panel);
+
+        panel = new ServiceXMLGenerationPage(getWizardComponents(),archiveBean);
+        getWizardComponents().addWizardPanel(PANEL_LOAD_C , panel);
+
+        panel = new ServiceXMLEditPage(getWizardComponents(),archiveBean) ;
+        getWizardComponents().addWizardPanel(PANEL_OPTION_C , panel);
+
+        panel = new ServiceArchiveOutputLocationPage(getWizardComponents(),archiveBean);
+        getWizardComponents().addWizardPanel(PANEL_LAST_C , panel);
 
     }
 }

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/WizardFrame.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/WizardFrame.java?view=diff&rev=560098&r1=560097&r2=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/WizardFrame.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/WizardFrame.java Thu Jul 26 21:59:54 2007
@@ -21,10 +21,13 @@
 import org.apache.axis2.tools.component.*;
 import org.apache.axis2.tools.bean.WsdlgenBean;
 import org.apache.axis2.tools.bean.CodegenBean;
+import org.apache.axis2.tools.bean.SrcCompiler;
 import org.apache.axis2.tools.idea.ProgressBarPanel;
 import org.apache.axis2.tools.idea.FirstPanel;
 import org.apache.axis2.tools.idea.SecondPanel;
 import org.apache.axis2.tools.idea.WSDL2JavaOutputPanel;
+import org.apache.ideaplugin.bean.ArchiveBean;
+import org.apache.ideaplugin.bean.JarFileWriter;
 
 import javax.swing.*;
 import java.awt.*;
@@ -48,11 +51,10 @@
     private JLabel panelImageLabel;
     private JLabel panelTopTitleLabel;
     private JLabel panelBottomTitleLabel;
-    private JLabel errorLabel;
-    private JPanel errorPanel;
     private WizardComponents wizardComponents;
     protected WsdlgenBean wsdlgenBean;
     protected CodegenBean codegenBean;
+    protected ArchiveBean archiveBean;
     protected Project project;
     private ProgressBarPanel progress;
 
@@ -63,6 +65,10 @@
     private void init() {
 
         wizardComponents = new DefaultWizardComponents();
+        wsdlgenBean= new WsdlgenBean();
+        codegenBean = new CodegenBean();
+        archiveBean =new ArchiveBean();
+
 
         this.getContentPane().setLayout(new GridBagLayout());
         this.getContentPane().add(createTitlePanel()
@@ -96,8 +102,8 @@
                         ,GridBagConstraints.EAST, GridBagConstraints.NONE,
                         new Insets(10, 10, 10, 10), 0, 0));
 
-        ImageIcon  img=new ImageIcon("icons/icon.png");
-        this.setIconImage(img.getImage());
+        java.net.URL resource = WizardPanel.class.getResource("/icons/icon.png");           
+        this.setIconImage(new ImageIcon(resource).getImage());
         this.setFont(new Font("Helvetica", Font.PLAIN, 8));
 
         wizardComponents.addPropertyChangeListener(new PropertyChangeListener() {
@@ -105,8 +111,7 @@
                 setPanelTopTitle(((WizardPanel)event.getNewValue()).getPanelTopTitle());
                 setPanelTitleImage(((WizardPanel)event.getNewValue()).getPanelImage());
                 setPanelBottomTitle(((WizardPanel)event.getNewValue()).getPanelBottomTitle());
-                setErrorVisible(false
-                        ,((WizardPanel)event.getNewValue()).getError());
+                setTitle(((WizardPanel)event.getNewValue()).getFrameTitle());
             }
         });
         wizardComponents.setFinishAction(createFinishAction());
@@ -124,14 +129,10 @@
 
     public void show() {
         wizardComponents.updateComponents();
+        this.setSize(600,600);
+        Utilities.centerComponentOnScreen(this);
         super.show();
     }
-      // set error message
-    protected void setErrorVisible(boolean flag ,String  error){
-        errorLabel.setText(error);
-        errorPanel.setVisible(flag);
-
-    }
     protected void setBottomVisible(boolean flag){
         panelBottomTitleLabel.setVisible(flag);
     }
@@ -158,22 +159,10 @@
         panelTopTitleLabel.setFont(new Font("Helvetica", Font.BOLD, 12));
 
         panelBottomTitleLabel=new JLabel();
+        panelBottomTitleLabel.setFont(new Font("Helvetica", Font.ITALIC, 10));
 
         panelImageLabel= new JLabel();
 
-        errorLabel = new JLabel();
-        errorLabel.setVisible(false);
-        errorLabel.setBackground(Color.blue);
-
-        errorPanel =new JPanel();
-        errorPanel .setLayout(new GridBagLayout());
-        errorPanel .setBorder(BorderFactory.createLineBorder(Color.black));
-
-        errorPanel.add(errorLabel,
-                new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
-                , GridBagConstraints.CENTER, GridBagConstraints.BOTH
-                , new Insets(10, 10, 0, 10), 0, 0));
-
         panel.add(panelTopTitleLabel
                 , new GridBagConstraints(0, 0, 1, 1, 0.5, 0.0
                 , GridBagConstraints.LINE_START , GridBagConstraints.BOTH
@@ -189,12 +178,6 @@
                 , GridBagConstraints.CENTER, GridBagConstraints.BOTH
                 , new Insets(0, 0, 0, 0), 0, 0));
 
-
-        panel.add(errorPanel
-                , new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
-                , GridBagConstraints.SOUTH, GridBagConstraints.BOTH
-                , new Insets(20, 0, 0, 0), 0, 0));
-
         return panel;
 
     }
@@ -222,12 +205,17 @@
                             doFinishJava2WSDL();
                             System.out.println("FinishAction Java2WSDL performed");
                             break;
+                         case WizardPanel.SERVICE_ARCHIVE_TYPE:
+                            doFinishServiceArchive();
+                            System.out.println("FinishAction Servcie Archive performed");
+                            break;
                         case WizardPanel.UNSPECIFIED_TYPE:
                             break; //Do nothing
                         default:
                             throw new RuntimeException("Invalid state!");
                     }
                 } catch (Exception e) {
+                     wizardComponents.setCurrentIndex(CodegenFrame.PANEL_CHOOSER);
                      dispose();
                 }
 
@@ -238,6 +226,7 @@
     protected CancelAction createCancelAction() {
         return new CancelAction(wizardComponents) {
             public void performAction() {
+                wizardComponents.setCurrentIndex(CodegenFrame.PANEL_CHOOSER);
                 System.out.println("CancelAction performed");
                 dispose();
             }
@@ -245,6 +234,7 @@
     }
 
     protected void handleWindowClosing() {
+        wizardComponents.setCurrentIndex(CodegenFrame.PANEL_CHOOSER);
         this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
         this.addWindowListener(new WindowAdapter() {
             public void windowClosing(WindowEvent e) {
@@ -271,6 +261,7 @@
                 "Code genaration Successful !" + writer.toString(),
                 "Axis2 code generation",
                 JOptionPane.INFORMATION_MESSAGE );
+        wizardComponents.setCurrentIndex(CodegenFrame.PANEL_CHOOSER);
         dispose();
     }
 
@@ -351,8 +342,8 @@
     }
     protected void doFinishWSDL2Java(){
         handlePragress();
-        new java.util.Timer(true).schedule(new TimerTask() {
-            public void run() {
+       new java.util.Timer(true).schedule(new TimerTask() {
+           public void run() {
                 try {
                     FirstPanel  first=(FirstPanel)wizardComponents.getWizardPanel(1);
                     SecondPanel option=(SecondPanel)wizardComponents.getWizardPanel(3);
@@ -382,24 +373,81 @@
                     codegenBean.setOutput(output.getOutputLocation());
                     codegenBean.setNamespace2packageList(option.getNs2PkgMapping());
                     codegenBean.setWSDLFileName(first.getWSDLFileName());
-                    codegenBean.generate();
+                    codegenBean.generate();                      
+                     //Add the codegen libs that are coming with the plugin to the project lib that has been created
+                 if (output.getAxis2PluginLibCopyCheckBoxSelection()){
+                     java.net.URL resource = WizardPanel.class.getResource("/icons/icon.png");
+                     String path =new File(resource.getPath()).getParentFile().getParentFile().getParentFile().getPath();
+                     System.out.println(path);
+                     String pluginLibLocation = path+File.separator+"lib";
+                	 addLibsToProjectLib(pluginLibLocation, output.getOutputLocation());
+                 }
+
+                 //Add the libraries on the plugin lib directory to the created project lib
+                 if (output.getAxisLibCopyCheckBoxSelection() && output.oktoLoadLibs()){
+                	 String libDirectory = output.getAxisJarsLocation();
+                	 addLibsToProjectLib(libDirectory, output.getOutputLocation());
+                 }
+
+                 //This will Create a jar file from the codegen results and add to the output
+                 //locations lib directory
+                 if (output.getCreateJarCheckBoxSelection()){
+                     File tempClassFile=codegenBean.getTemp();
+                     tempClassFile.mkdir();
+                     File srcTemp=new File(tempClassFile.getPath()+File.separator+"src");
+                     srcTemp.mkdir();
+                     copyDirectory(new File(output.getOutputLocation()+File.separator+"src"),srcTemp);
+                     //Compile the source to another directory
+                	 SrcCompiler srcCompileTool = new SrcCompiler();
+                	 srcCompileTool.compileSource(tempClassFile.getPath());
+                     //create the jar file and add that to the lib directory
+                	 String projectLib = output.getOutputLocation()+File.separator+"lib";
+                	 JarFileWriter jarFileWriter = new JarFileWriter();
+                	 String jarFileName = "CodegenResults.jar";
+                	 if (!output.getJarFilename().equals("")){
+                		 jarFileName=output.getJarFilename();
+                	 }
+                	 output.setJarFileName(jarFileName);
+                      File tempClass = new File(tempClassFile.getPath()+File.separator+"classes");
+                     jarFileWriter.writeJarFile(new File(projectLib), jarFileName, tempClass);
+
+                	 //Delete the temp folders
+                	 deleteDir(tempClassFile );
+
+                 }
                     progress.setVisible(false);
                     handleSuccess();
                 }catch (Exception e1) {
+                    e1.printStackTrace();
                     progress.setVisible(false);
                     handleError();
                 }
             }
-        }, 1000);
+        }, 5000);
 
     }
 
     protected void doFinishJava2WSDL(){
         handlePragress();
         new java.util.Timer(true).schedule(new TimerTask() {
-            public void run() {
+           public void run() {
                 try {
                     wsdlgenBean.generate();
+                    progress.setVisible(false);
+                    handleSuccess();
+                } catch (Exception e1) {
+                    progress.setVisible(false);
+                    handleError();
+                }
+            }
+       }, 3100);
+    }
+     protected void doFinishServiceArchive(){
+       handlePragress();
+        new java.util.Timer(true).schedule(new TimerTask() {
+            public void run() {
+                 try {
+                    archiveBean.finsh();
                     progress.setVisible(false);
                     handleSuccess();
                 } catch (Exception e1) {

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ArchiveBean.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ArchiveBean.java?view=diff&rev=560098&r1=560097&r2=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ArchiveBean.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ArchiveBean.java Thu Jul 26 21:59:54 2007
@@ -38,20 +38,15 @@
     private File classLoc;
     private ClassLoader classLoader;
     private String ServiceXML;
-
     public String fileSeparator = System.getProperty("file.separator");
-
     private ArrayList libs = new ArrayList();
     private ArrayList tempLibs = new ArrayList();
     private ArrayList tempWsdls = new ArrayList();
-
-
     private ArrayList wsdls = new ArrayList();
-
     private String outPath;
     private String archiveName;
     private ArrayList servicelsit = new ArrayList();
-
+    private boolean includeClass=false;
 
     public ArrayList getTempWsdls() {
         return tempWsdls;
@@ -139,8 +134,8 @@
         return wsdls;
     }
 
-    public void addWsdls(ArrayList wsdls) {
-        this.wsdls.addAll(wsdls);
+    public void addWsdls(File wsdl) {
+        this.wsdls.add(wsdl);
     }
 
     public String getOutPath() {
@@ -158,6 +153,13 @@
     public void setArchiveName(String archiveName) {
         this.archiveName = archiveName;
     }
+    public void setIncludeClass(boolean includeClass){
+        this.includeClass=includeClass;
+    }
+    public boolean getIncludeClass(){
+        return this.includeClass;
+    }
+
 
     public void finsh() throws Exception {
         //Creating out File
@@ -181,9 +183,13 @@
 
             //Coping class files
             FileCopier fc = new FileCopier();
-            for (int count=0;count<classLocation.size();count++)
-            fc.copyFiles((File)classLocation.get(count), tempfile, null);
-
+            if(includeClass){
+                for (int count=0;count<classLocation.size();count++)
+                    fc.copyFiles((File)classLocation.get(count), tempfile, ".class");
+            }else{
+                for (int count=0;count<classLocation.size();count++)
+                    fc.copyFiles((File)classLocation.get(count), tempfile, null);
+            }
             // Coping wsdl files
             File lib = new File(tempfile, "lib");
             if (!lib.exists()) {
@@ -192,16 +198,16 @@
             if (libs!=null)
             {
             for (int i = 0; i < libs.size(); i++) {
-                String libname = (String) libs.get(i);
-                fc.copyFiles(new File(libname), lib, null);
+                      String libname = (String) libs.get(i);
+                      fc.copyFiles(new File(libname), lib, null);
             }
             }
 
             //coping wsdl files
             if (wsdls!=null)
             for (int i = 0; i < wsdls.size(); i++) {
-                String libname = (String) wsdls.get(i);
-                fc.copyFiles(new File(libname), metainf, null);
+                File libname = (File)wsdls.get(i);
+                fc.copyFiles(libname, metainf, null);
             }
 
             String arcivename = getArchiveName();
@@ -212,7 +218,6 @@
             jwriter.writeJarFile(outFile, arcivename, tempfile);
             //craeting the jar file
             deleteDir(tempfile);
-//
 
         } catch (Exception e) {
             throw e;

Added: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ClassFileFilter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ClassFileFilter.java?view=auto&rev=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ClassFileFilter.java (added)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ClassFileFilter.java Thu Jul 26 21:59:54 2007
@@ -0,0 +1,36 @@
+package org.apache.ideaplugin.bean;
+
+import javax.swing.filechooser.FileFilter;
+import java.io.File;
+
+
+public class ClassFileFilter extends FileFilter {
+
+    public boolean accept(File file) {
+        if (file .isDirectory()) {
+            return true;
+        }
+        String extension = getExtension(file );
+        if (extension != null) {
+            return extension.equals("class");
+        }
+
+        return false;
+
+    }
+
+    public String getDescription() {
+        return ".class";
+    }
+
+    private String getExtension(File file) {
+        String ext = null;
+        String s = file.getName();
+        int i = s.lastIndexOf('.');
+
+        if (i > 0 && i < s.length() - 1) {
+            ext = s.substring(i + 1).toLowerCase();
+        }
+        return ext;
+    }
+}

Added: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ParameterObj.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ParameterObj.java?view=auto&rev=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ParameterObj.java (added)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ParameterObj.java Thu Jul 26 21:59:54 2007
@@ -0,0 +1,29 @@
+package org.apache.ideaplugin.bean;
+
+public class ParameterObj {
+
+    private String  paraName;
+    private String paraValue;
+
+    public ParameterObj(String name,String value){
+        this.paraName=name;
+        this.paraValue=value;
+    }
+
+    public void setName(String name){
+        this.paraName=name;
+    }
+
+    public void setValue(String value){
+        this.paraValue=value;
+    }
+
+    public String  getName(){
+        return this.paraName;
+    }
+
+    public String  getValue(){
+        return this.paraValue;
+    }
+
+}

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ServiceObj.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ServiceObj.java?view=diff&rev=560098&r1=560097&r2=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ServiceObj.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ServiceObj.java Thu Jul 26 21:59:54 2007
@@ -50,18 +50,24 @@
 
     public String toString() {
         String serviceXML = "<service name=\"" + serviceName + "\" >\n" +
-                "<description>\n" +
-                "Please Type your service description here\n" +
-                "</description>\n" +
-                "<parameter name=\"ServiceClass\" locked=\"false\">" + serviceClass + "</parameter>\n";
+                "   <description>\n" +
+                "       Please Type your service description here\n" +
+                "   </description>\n" +
+                "   <messageReceivers>\n"+
+                "       <messageReceiver mep=\"http://www.w3.org/2004/08/wsdl/in-only\" \n"+
+                "       class=\"org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver\" />\n "+
+                "       <messageReceiver mep=\"http://www.w3.org/2004/08/wsdl/in-out\"\n " +
+                "       class=\"org.apache.axis2.rpc.receivers.RPCMessageReceiver\" /> \n" +
+                "   </messageReceivers>\n "+
+                "   <parameter name=\"ServiceClass\" locked=\"false\">" + serviceClass + "</parameter>\n";
         if (operations.size() > 0) {
-            serviceXML = serviceXML + "<excludeOperations>\n";
+            serviceXML = serviceXML + " <excludeOperations>\n";
             for (int i = 0; i < operations.size(); i++) {
                 String s = (String) operations.get(i);
-                String op = "<operation>" + s + "</operation>\n";
+                String op = "       <operation>" + s + "</operation>\n";
                 serviceXML = serviceXML + op;
             }
-            serviceXML = serviceXML + "</excludeOperations>\n";
+            serviceXML = serviceXML + " </excludeOperations>\n";
         }
         serviceXML = serviceXML + "</service>\n";
         return serviceXML;

Added: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ValidateXMLFile.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ValidateXMLFile.java?view=auto&rev=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ValidateXMLFile.java (added)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ValidateXMLFile.java Thu Jul 26 21:59:54 2007
@@ -0,0 +1,54 @@
+package org.apache.ideaplugin.bean;
+
+
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.XMLConstants;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.DocumentBuilder;
+
+import org.xml.sax.SAXException;
+import org.xml.sax.InputSource;
+import org.w3c.dom.Document;
+import org.apache.axis2.tools.component.WizardPanel;
+
+import java.io.StringReader;
+
+
+public class ValidateXMLFile {
+
+
+    /**
+     * this calss used for check service xml validation
+     */
+
+
+    public  boolean Validate(String args) {
+        try {
+            // define the type of schema  get validation driver:
+            SchemaFactory schemafactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+
+            // create schema by reading it from an XSD file:
+            java.net.URL resource = WizardPanel.class.getResource("/resources/service.xsd");
+            Schema schema = schemafactory.newSchema(new StreamSource(resource.getPath()));
+
+            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+            factory.setNamespaceAware(true);
+            DocumentBuilder docBuilder = factory.newDocumentBuilder();
+            Document doc = docBuilder.parse(new InputSource(new StringReader(args)));
+
+            schema.newValidator().validate(new DOMSource(doc));
+
+            return true;
+        }catch (SAXException ex) {
+         //   ex.printStackTrace();
+            return false;
+        } catch (Exception ex) {
+          //  ex.printStackTrace();
+             return false;
+        }
+
+    }
+}

Added: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/XmlFileFilter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/XmlFileFilter.java?view=auto&rev=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/XmlFileFilter.java (added)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/XmlFileFilter.java Thu Jul 26 21:59:54 2007
@@ -0,0 +1,33 @@
+package org.apache.ideaplugin.bean;
+
+import javax.swing.filechooser.FileFilter;
+import java.io.File;
+
+
+public class XmlFileFilter extends FileFilter {
+     public boolean accept(File file) {
+        if(file.isDirectory() ){
+            return true;
+        }
+        String extension = getExtension(file);
+        if(extension != null){
+            return  extension .equals("xml");
+        }
+        return false;
+    }
+
+    public String getDescription() {
+        return ".xml";
+    }
+
+   private String getExtension(File file){
+        String ext = null;
+        String s = file.getName();
+        int i = s.lastIndexOf('.');
+
+        if (i > 0 && i < s.length() - 1) {
+            ext = s.substring(i + 1).toLowerCase();
+        }
+        return ext;
+    }
+}

Added: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ClassFileLocationPage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ClassFileLocationPage.java?view=auto&rev=560098
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ClassFileLocationPage.java (added)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ClassFileLocationPage.java Thu Jul 26 21:59:54 2007
@@ -0,0 +1,189 @@
+package org.apache.ideaplugin.frames;
+
+import org.apache.axis2.tools.component.WizardPanel;
+import org.apache.axis2.tools.component.WizardComponents;
+import org.apache.axis2.tools.wizardframe.CodegenFrame;
+import org.apache.ideaplugin.bean.ArchiveBean;
+
+import javax.swing.*;
+import javax.swing.border.EmptyBorder;
+import java.awt.*;
+import java.awt.event.ActionListener;
+import java.awt.event.ActionEvent;
+import java.io.File;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: shivantha
+ * Date: 16/07/2007
+ * Time: 10:55:31
+ * To change this template use File | Settings | File Templates.
+ */
+public class ClassFileLocationPage extends WizardPanel {
+        /**
+         * varialbales
+         */
+        private JTextField txtClassDir;
+        private JButton butSelect;
+        private JCheckBox chkBoxIncludeClass;
+        private JCheckBox chkBoxArchiveType;
+        private JButton btnHint;
+        private JTextArea txaHint;
+        private boolean flag=false;
+        private String hint =":";
+        private ArchiveBean archiveBean;
+        public final JFileChooser fileChooser = new JFileChooser();
+        private File file;
+        /**
+         * Constructor
+         * @param wizardComponents
+         */
+        public ClassFileLocationPage(WizardComponents wizardComponents, ArchiveBean archiveBean ) {
+            super(wizardComponents, "Axis2 Idea Plugin Service Archiver Creator Wizards");
+            setPanelTopTitle("Service Archiver");
+            setPanelBottomTitle("Welcome to Axis2 Service Archive Wizard.Insert the class files and select the service type. ");
+            this.archiveBean=archiveBean;
+            init();
+        }
+
+        /**
+         * initiate panel
+         */
+        private void init(){
+
+            txaHint =new JTextArea();
+            txaHint.setBorder(null);
+            txaHint.setFocusable(false);
+            txaHint.setLineWrap(true);
+            txaHint.setWrapStyleWord(true);
+            txaHint.setOpaque(false);
+            btnHint =new JButton("Hint >>");
+            btnHint.setBorder(new EmptyBorder(new Insets(0,0,0,0)));
+            txtClassDir =new JTextField();
+            butSelect=new JButton("Browse..");
+            chkBoxIncludeClass = new JCheckBox("include .class file only") ;
+            chkBoxArchiveType=new JCheckBox("Select for Service Group Archive");
+
+            setBackButtonEnabled(true);
+            setFinishButtonEnabled(false);
+            setPageComplete(false);
+
+            this.setLayout(new GridBagLayout());
+
+            this.add(new JLabel("Class file location")
+                    , new GridBagConstraints(0, 0, 1, 1, 0.1, 0.0
+                    , GridBagConstraints.WEST , GridBagConstraints.NONE
+                    , new Insets(5, 10, 0,0), 0, 0));
+
+            this.add(txtClassDir
+                    , new GridBagConstraints(1, 0, GridBagConstraints.RELATIVE, 1, 1.0, 0.0
+                    , GridBagConstraints.WEST , GridBagConstraints.HORIZONTAL
+                    , new Insets(5, 1, 1, 1), 0, 0));
+
+            txtClassDir.addActionListener(new ActionListener()  {
+                public void actionPerformed(ActionEvent e) {
+                    update();
+                }
+            });
+
+            this.add(butSelect
+                    , new GridBagConstraints(2, 0, 1, 1, 0.1, 0.0
+                    , GridBagConstraints.CENTER , GridBagConstraints.NONE
+                    , new Insets(5, 1, 1,10), 0, 0));
+
+            butSelect.addActionListener(new ActionListener()  {
+                public void actionPerformed(ActionEvent e) {
+                    fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+                    int returnVal = fileChooser.showOpenDialog(butSelect);
+                    if (returnVal == JFileChooser.APPROVE_OPTION) {
+                        file = fileChooser.getSelectedFile();
+                        fileChooser.setCurrentDirectory(file);
+                        txtClassDir.setText(file.getAbsolutePath());
+                        setPageComplete(true);
+                        setNextButtonEnabled(true);
+                    } else {
+                        txtClassDir.setText("");
+                    }
+
+                    update();
+                }
+            });
+
+            this.add(chkBoxIncludeClass
+                    , new GridBagConstraints(0, 1, GridBagConstraints.REMAINDER, 1, 0.0, 0.0
+                    , GridBagConstraints.WEST , GridBagConstraints.HORIZONTAL
+                    , new Insets(5, 10, 1,1), 0, 0));
+            chkBoxIncludeClass.addActionListener(new ActionListener()  {
+                public void actionPerformed(ActionEvent e) {
+                    update();
+                }
+            });
+
+//             this.add(chkBoxArchiveType
+//                    , new GridBagConstraints(0, 2, GridBagConstraints.REMAINDER, 1, 0.0, 0.0
+//                    , GridBagConstraints.WEST  , GridBagConstraints.HORIZONTAL
+//                    , new Insets(5, 10, 1,1), 0, 0));
+//            chkBoxArchiveType .addActionListener(new ActionListener()  {
+//                public void actionPerformed(ActionEvent e) {
+//                    update();
+//                }
+//            });
+            this.add(btnHint,
+                    new GridBagConstraints(0, 2, 1, 1, 0.0,0.0
+                            , GridBagConstraints.WEST , GridBagConstraints.NONE
+                            , new Insets(5, 10, 0, 10), 0, 0));
+            btnHint.addActionListener(new ActionListener()  {
+                public void actionPerformed(ActionEvent e) {
+                    if(flag){
+                        btnHint.setText("Hint >>");
+                        txaHint.setText("");
+                        flag=false;
+                    }else{
+                        btnHint.setText("Hint <<");
+                        txaHint.setText(hint);
+                        flag=true;
+                    }
+                    update();
+                }
+            });
+
+            this.add(txaHint
+                    , new GridBagConstraints(0, 3, GridBagConstraints.REMAINDER, 1, 0.0,1.0
+                    , GridBagConstraints.WEST , GridBagConstraints.BOTH
+                    , new Insets(5, 10, 10, 10), 0, 0));
+
+        }
+
+        //next
+        public void next() {
+            switchPanel(CodegenFrame.PANEL_SECOND_C );
+        }
+        //back
+        public void back() {
+            switchPanel(CodegenFrame.PANEL_CHOOSER );
+        }
+        //update
+        public void update() {
+            fillBean();
+        }
+        private void fillBean(){
+//          if(!chkBoxArchiveType.isSelected()){
+//               archiveBean.setSingleService(true);
+//          } else
+//              archiveBean.setSingleService(false);
+          if(!txtClassDir.getText().trim().equals("")){
+              archiveBean.setClassLoc(file);
+              archiveBean.addClassLocation(file);
+          }
+           if(chkBoxIncludeClass.isSelected()){
+               archiveBean.setIncludeClass(true);
+          } else
+              archiveBean.setIncludeClass(false);
+        }
+
+        //get page type
+        public  int getPageType() {
+            return  WizardPanel.SERVICE_ARCHIVE_TYPE;
+        }
+ }
+



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message