You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ch...@apache.org on 2006/10/05 11:20:19 UTC

svn commit: r453154 [1/2] - in /webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache: axis2/tools/bean/ axis2/tools/idea/ ideaplugin/ ideaplugin/bean/ ideaplugin/frames/ ideaplugin/frames/table/ ideaplugin/plugin/

Author: chinthaka
Date: Thu Oct  5 02:20:17 2006
New Revision: 453154

URL: http://svn.apache.org/viewvc?view=rev&rev=453154
Log:
Applying patch in AXIS2-1303. Thanks Keith

Modified:
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/CodegenBean.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ActionsPlugin.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/BottomPanel.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/ImagePanel.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/Java2CodeFrame.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/OutPutPane.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/PluginClassLoader.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondFrame.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/ServiceArchiveCreator.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/FileCopier.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/JarFileWriter.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/bean/OperationObj.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
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/table/ArchiveTableModel.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/plugin/Axis2IdeaPlugin.java
    webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/plugin/Axis2PluginAction.java

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/CodegenBean.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/CodegenBean.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/CodegenBean.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/CodegenBean.java Thu Oct  5 02:20:17 2006
@@ -1,5 +1,10 @@
 package org.apache.axis2.tools.bean;
 
+import com.intellij.openapi.module.Module;
+import com.intellij.openapi.module.ModuleManager;
+import com.intellij.openapi.project.Project;
+import com.intellij.openapi.roots.ModuleRootManager;
+import com.intellij.openapi.vfs.VirtualFile;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.WSDL11ToAxisServiceBuilder;
 import org.apache.axis2.util.URLProcessor;
@@ -50,7 +55,6 @@
     private boolean syncOnly = false;
     private boolean serverSide = false;
     private boolean testcase = true;
-    private boolean generateServerXml = true;
     private boolean isServerXML;
     private boolean isGenerateAll;
     private boolean isTestCase;
@@ -58,6 +62,19 @@
     private String portName;
     private String databindingName;
 
+    private boolean defaultClient = true;
+
+    Project project;
+
+
+    public boolean isDefaultClient() {
+        return defaultClient;
+    }
+
+    public void setDefaultClient(boolean defaultClient) {
+        this.defaultClient = defaultClient;
+    }
+
     public boolean isServerXML() {
         return isServerXML;
     }
@@ -304,14 +321,6 @@
         this.serverSide = serverSide;
     }
 
-    public boolean isGenerateServerXml() {
-        return generateServerXml;
-    }
-
-    public void setGenerateServerXml(boolean generateServerXml) {
-        this.generateServerXml = generateServerXml;
-    }
-
     public boolean isTestcase() {
         return testcase;
     }
@@ -321,6 +330,8 @@
     }
 
     public void generate() throws Exception {
+
+
         ClassLoader tcl = Thread.currentThread().getContextClassLoader();
         try {
             if (!"xmlbeans".equals(getDatabindingName())) {
@@ -351,6 +362,7 @@
     private Definition wsdlDefinition = null;
 
     public void readWSDL() {
+
         try {
             WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
             wsdlDefinition = reader.readWSDL(WSDLFileName);
@@ -407,4 +419,52 @@
 
         return returnList;
     }
+
+
+    public Project getActiveProject() {
+        return project;
+
+    }
+
+    public void setProject(Project project) {
+        this.project = project;
+        System.out.println();
+    }
+
+
+    public File getTemp() {
+
+        String time = Calendar.getInstance().getTime().toString().replace(':', '-');
+        File temp = new File(getActiveProject().getProjectFile().getParent().getPath() + File.separator + "temp-" + time);
+        return temp;
+    }
+
+    public Module[] getModules() {
+
+        Project project = getActiveProject();
+        if (project != null) {
+            return ModuleManager.getInstance(project).getModules();
+        }
+        return null;
+    }
+
+    public String[] getModuleSrc(String name) {
+        Project project = getActiveProject();
+        if (project != null) {
+            Module module = ModuleManager.getInstance(project).findModuleByName(name);
+            ModuleRootManager moduleRootManager = ModuleRootManager.getInstance(module);
+            VirtualFile virtualFiles[] = moduleRootManager.getSourceRoots();
+            String src[] = new String[virtualFiles.length];
+            for (int count = 0; count < src.length; count++) {
+                src[count] = virtualFiles[count].getPresentableUrl();
+            }
+            return src;
+        }
+        return null;
+    }
+
+
 }
+
+
+

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ActionsPlugin.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ActionsPlugin.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ActionsPlugin.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ActionsPlugin.java Thu Oct  5 02:20:17 2006
@@ -1,53 +1,52 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
 package org.apache.axis2.tools.idea;
 
 import com.intellij.openapi.components.ApplicationComponent;
 
 /**
  * <h3>SampleApplicationPlugin</h3>
- *
+ * <p/>
  * Application level plugin sample showing IDEA <b>OpenAPI</b> basics.<br>
  * Implements <code>ApplicationComponent</code> interface.
- *
  */
 public class ActionsPlugin implements ApplicationComponent {
 
-  /**
-   * Method is called after plugin is already created and configured. Plugin can start to communicate with
-   * other plugins only in this method.
-   */
-  public void initComponent() {
-      
-  }
-
-  /**
-   * This method is called on plugin disposal.
-   */
-  public void disposeComponent() {
-  }
-
-  /**
-   * Returns the name of component
-   *
-   * @return String representing component name. Use PluginName.ComponentName notation
-   *  to avoid conflicts.
-   */
-  public String getComponentName() {
-    return "ActionsSample.ActionsPlugin";
-  }
+    /**
+     * Method is called after plugin is already created and configured. Plugin can start to communicate with
+     * other plugins only in this method.
+     */
+    public void initComponent() {
+
+    }
+
+    /**
+     * This method is called on plugin disposal.
+     */
+    public void disposeComponent() {
+    }
+
+    /**
+     * Returns the name of component
+     *
+     * @return String representing component name. Use PluginName.ComponentName notation
+     *         to avoid conflicts.
+     */
+    public String getComponentName() {
+        return "ActionsSample.ActionsPlugin";
+    }
 }

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/BottomPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/BottomPanel.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/BottomPanel.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/BottomPanel.java Thu Oct  5 02:20:17 2006
@@ -1,16 +1,10 @@
 package org.apache.axis2.tools.idea;
 
-import javax.swing.JButton;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Insets;
-import java.awt.LayoutManager;
+import javax.swing.*;
+import java.awt.*;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
+import java.io.File;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 
@@ -79,20 +73,150 @@
             java2CodeFrame.setVisible(false);
             Thread.currentThread().setContextClassLoader(java2CodeFrame.getClassLoader());
         } else if (obj == btnFinish) {
-            try {
-                java2CodeFrame.generatecode();
-                JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration successful!",
-                        "Axis2 codegeneration", JOptionPane.INFORMATION_MESSAGE);
-                java2CodeFrame.setVisible(false);
-            } catch (Exception e1) {
-                e1.printStackTrace();
-                StringWriter writer = new StringWriter();
-                e1.printStackTrace(new PrintWriter(writer));
-                JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(),
-                        "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE);
-                java2CodeFrame.setVisible(false);
+
+            String selected = java2CodeFrame.optionPane.buttonGroup.getSelection().getActionCommand();
+
+            if (selected.equalsIgnoreCase("radCustom")) {
+
+                try {
+                    java2CodeFrame.generatecode();
+
+                } catch (Exception e1) {
+                    e1.printStackTrace();
+                    StringWriter writer = new StringWriter();
+                    e1.printStackTrace(new PrintWriter(writer));
+                    JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(),
+                            "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE);
+                    java2CodeFrame.setVisible(false);
+                }
+            } else if (selected.equalsIgnoreCase("radDefaultServer")) {
+
+                File temp = java2CodeFrame.optionPane.setDefaultServerConfigurations();
+                String output = java2CodeFrame.outputpane.buttonGroup.getSelection().getActionCommand();
+
+                if (output.equalsIgnoreCase("radCurrentProject")) {
+
+                    try {
+
+                        java2CodeFrame.generateDefaultServerCode(temp, (String) java2CodeFrame.outputpane.cmbModuleSrc.getSelectedItem());
+                    } catch (Exception e1) {
+                        e1.printStackTrace();
+                        StringWriter writer = new StringWriter();
+                        e1.printStackTrace(new PrintWriter(writer));
+                        JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(),
+                                "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE);
+                        java2CodeFrame.setVisible(false);
+                    }
+
+
+                } else {
+                    String path = java2CodeFrame.outputpane.txtoutput.getText();
+                    File outputPath = new File(path);
+                    if (outputPath.exists()) {
+                        try {
+                            java2CodeFrame.generateDefaultServerCode(temp, outputPath.getAbsolutePath());
+                        } catch (Exception e1) {
+                            e1.printStackTrace();
+                            StringWriter writer = new StringWriter();
+                            e1.printStackTrace(new PrintWriter(writer));
+                            JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(),
+                                    "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE);
+                            java2CodeFrame.setVisible(false);
+                        }
+
+                    } else {
+                        JOptionPane.showMessageDialog(java2CodeFrame, "Invalid file path!",
+                                "Error!!!", JOptionPane.INFORMATION_MESSAGE);
+                        return;
+                    }
+
+
+                }
+            } else if (selected.equalsIgnoreCase("radDefaultBoth")) {
+
+                File temp = java2CodeFrame.optionPane.setDefaultServerConfigurations();
+                String output = java2CodeFrame.outputpane.buttonGroup.getSelection().getActionCommand();
+
+                if (output.equalsIgnoreCase("radCurrentProject")) {
+                    try {
+
+                        java2CodeFrame.generateDefaultServerCode(temp, (String) java2CodeFrame.outputpane.cmbModuleSrc.getSelectedItem());
+                        File temp2 = java2CodeFrame.optionPane.setDefaultClientConfigurations();
+                        java2CodeFrame.generateDefaultClientCode(temp2);
+
+                    } catch (Exception e1) {
+                        e1.printStackTrace();
+                        StringWriter writer = new StringWriter();
+                        e1.printStackTrace(new PrintWriter(writer));
+                        JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(),
+                                "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE);
+                        java2CodeFrame.setVisible(false);
+                    }
+
+                } else {
+                    String path = java2CodeFrame.outputpane.txtoutput.getText();
+                    File outputPath = new File(path);
+                    if (outputPath.exists()) {
+                        try {
+                            java2CodeFrame.generateDefaultServerCode(temp, outputPath.getAbsolutePath());
+                            File temp2 = java2CodeFrame.optionPane.setDefaultClientConfigurations();
+                            java2CodeFrame.generateDefaultClientCode(temp2);
+                        } catch (Exception e1) {
+                            e1.printStackTrace();
+                            StringWriter writer = new StringWriter();
+                            e1.printStackTrace(new PrintWriter(writer));
+                            JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(),
+                                    "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE);
+                            java2CodeFrame.setVisible(false);
+                        }
+
+                    } else {
+                        JOptionPane.showMessageDialog(java2CodeFrame, "Invalid file path!",
+                                "Error!!!", JOptionPane.INFORMATION_MESSAGE);
+                        return;
+                    }
+
+
+                }
             }
+
+            JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration successful!",
+                    "Axis2 codegeneration", JOptionPane.INFORMATION_MESSAGE);
+            java2CodeFrame.setVisible(false);
+
         } else if (obj == btnNext) {
+
+            if (java2CodeFrame.optionPane.isVisible()) {
+
+                String selected = java2CodeFrame.optionPane.buttonGroup.getSelection().getActionCommand();
+
+                if (selected.equalsIgnoreCase("radDefaultClient")) {
+                    File temp = java2CodeFrame.optionPane.setDefaultClientConfigurations();
+                    try {
+                        java2CodeFrame.generateDefaultClientCode(temp);
+                    } catch (Exception e1) {
+                        e1.printStackTrace();
+                        StringWriter writer = new StringWriter();
+                        e1.printStackTrace(new PrintWriter(writer));
+                        JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(),
+                                "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE);
+                        java2CodeFrame.setVisible(false);
+                    }
+
+                    JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration successful!",
+                            "Axis2 codegeneration", JOptionPane.INFORMATION_MESSAGE);
+                    java2CodeFrame.setVisible(false);
+                    return;
+
+                } else
+                if (selected.equalsIgnoreCase("radDefaultServer") || selected.equalsIgnoreCase("radDefaultBoth")) {
+
+                    java2CodeFrame.increasePanelID();
+
+                }
+
+            }
+
             java2CodeFrame.setPane();
         }
     }

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=453154&r1=453153&r2=453154
==============================================================================
--- 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 Oct  5 02:20:17 2006
@@ -2,18 +2,9 @@
 
 import org.apache.axis2.tools.bean.CodegenBean;
 
-import javax.swing.JButton;
-import javax.swing.JFileChooser;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
+import javax.swing.*;
 import javax.swing.filechooser.FileFilter;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Insets;
-import java.awt.LayoutManager;
+import java.awt.*;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.MouseEvent;
@@ -55,6 +46,7 @@
         this.codegenBean = codegenBean;
         FirstPanelLayout customLayout = new FirstPanelLayout();
         setLayout(customLayout);
+
         setFont(new Font("Helvetica", Font.PLAIN, 12));
         lblWSDL = new JLabel("WSDL File");
         add(lblWSDL);
@@ -68,7 +60,10 @@
         add(btnBrowse);
         btnBrowse.addActionListener(this);
 
-        setSize(getPreferredSize());
+
+        Dimension dim = new Dimension(450, 300);
+        setSize(dim);
+
 
     }
 
@@ -187,7 +182,7 @@
 
         Insets insets = parent.getInsets();
         dim.width = 541 + insets.left + insets.right;
-        dim.height = 204 + insets.top + insets.bottom;
+        dim.height = 300 + insets.top + insets.bottom;
 
         return dim;
     }

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ImagePanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ImagePanel.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ImagePanel.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ImagePanel.java Thu Oct  5 02:20:17 2006
@@ -1,15 +1,7 @@
 package org.apache.axis2.tools.idea;
 
-import javax.swing.ImageIcon;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Insets;
-import java.awt.LayoutManager;
+import javax.swing.*;
+import java.awt.*;
 
 /*
 * Copyright 2004,2005 The Apache Software Foundation.
@@ -34,19 +26,16 @@
  * Date: Jul 20, 2005
  * Time: 9:33:14 PM
  */
-public class ImagePanel extends JPanel{
+public class ImagePanel extends JPanel {
     JLabel lblImage;
     JLabel labTop;
     JLabel lblBottom;
-    ImageIcon apachelogo ;
+    ImageIcon apachelogo;
 
     public ImagePanel() {
         ImageLayout customLayout = new ImageLayout();
         setLayout(customLayout);
 
-        java.net.URL resource = ImagePanel.class.getResource("/icons/asf-feather.png");
-        apachelogo = new ImageIcon(resource);
-
         lblImage = new JLabel(apachelogo);
         add(lblImage);
         lblImage.setBackground(Color.white);
@@ -65,7 +54,7 @@
         this.setBackground(Color.white);
     }
 
-    public void setCaptions(String lbl1 , String lbl2){
+    public void setCaptions(String lbl1, String lbl2) {
         labTop.setText(lbl1);
         lblBottom.setText(lbl2);
     }
@@ -101,10 +90,16 @@
 
         Component c;
         c = parent.getComponent(0);
-        if (c.isVisible()) {c.setBounds(insets.left+368,insets.top,168,80);}
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 368, insets.top, 168, 80);
+        }
         c = parent.getComponent(1);
-        if (c.isVisible()) {c.setBounds(insets.left,insets.top,368,40);}
+        if (c.isVisible()) {
+            c.setBounds(insets.left, insets.top, 368, 40);
+        }
         c = parent.getComponent(2);
-        if (c.isVisible()) {c.setBounds(insets.left,insets.top+40,368,40);}
+        if (c.isVisible()) {
+            c.setBounds(insets.left, insets.top + 40, 368, 40);
+        }
     }
 }

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/Java2CodeFrame.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/Java2CodeFrame.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/Java2CodeFrame.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/Java2CodeFrame.java Thu Oct  5 02:20:17 2006
@@ -1,9 +1,20 @@
 package org.apache.axis2.tools.idea;
 
+import com.intellij.openapi.application.ApplicationManager;
+import com.intellij.openapi.project.Project;
+import com.intellij.openapi.roots.OrderRootType;
+import com.intellij.openapi.roots.libraries.Library;
+import com.intellij.openapi.roots.libraries.LibraryTable;
+import com.intellij.openapi.vfs.JarFileSystem;
+import com.intellij.openapi.vfs.VirtualFile;
+import com.intellij.openapi.vfs.VirtualFileManager;
 import org.apache.axis2.tools.bean.CodegenBean;
+import org.apache.axis2.tools.bean.SrcCompiler;
+import org.apache.ideaplugin.bean.JarFileWriter;
 
 import javax.swing.*;
 import java.awt.*;
+import java.io.*;
 
 /*
 * Copyright 2004,2005 The Apache Software Foundation.
@@ -32,9 +43,10 @@
     ImagePanel panel_3;
     JPanel plMiddle;
     BottomPanel lblBottom;
-//    SecondPanel secondPanel;
+    //    SecondPanel secondPanel;
     SecondFrame secondPanel;
     OutPutPane outputpane;
+    OptionPane optionPane;
     private int panleID = 0;
     private ClassLoader classLoader;
 
@@ -62,6 +74,10 @@
         BottomPanel.setEnable(false, false, true);
         getContentPane().add(lblBottom);
 
+        optionPane = new OptionPane();
+        optionPane.setVisible(false);
+        getContentPane().add(optionPane);
+
         secondPanel = new SecondFrame();
         secondPanel.setVisible(false);
         getContentPane().add(secondPanel);
@@ -70,12 +86,16 @@
         outputpane.setVisible(false);
         getContentPane().add(outputpane);
 
-        Dimension dim = getPreferredSize();
+        Dimension dim = new Dimension(450, 350);
         setSize(dim);
         setBounds(200, 200, dim.width, dim.height);
         this.setResizable(false);
     }
 
+    public void setProject(Project project) {
+        codegenBean.setProject(project);
+    }
+
     public ClassLoader getClassLoader() {
         return classLoader;
     }
@@ -84,43 +104,155 @@
         this.classLoader = classLoader;
     }
 
-    public void showUI() {
-        Java2CodeFrame java2CodeFrame = new Java2CodeFrame();
-        java2CodeFrame.setTitle("Axis2 Code generation");
-        java2CodeFrame.pack();
-        java2CodeFrame.show();
-    }
-
     public void generatecode() throws Exception {
         secondPanel.fillBean();
         codegenBean.generate();
     }
 
+    public void generateDefaultServerCode(File temp, String output) throws Exception {
+
+
+        temp.mkdir();
+        try {
+            codegenBean.generate();
+            copyDirectory(new File(temp + File.separator + "src"), new File(output));
+            copyDirectory(new File(temp + File.separator + "resources"), new File(output + File.separator + ".." + File.separator + "resources"));
+
+        } catch (Exception e1) {
+            e1.printStackTrace();
+        }
+        finally {
+
+            deleteDirectory(temp);
+        }
+    }
+
+    public void copyDirectory(File srcDir, File destDir) throws IOException {
+        if (srcDir.isDirectory()) {
+            if (!destDir.isDirectory()) {
+                destDir.mkdir();
+            }
+            String[] children = srcDir.list();
+            for (int count = 0; count < children.length; count++) {
+                copyDirectory(new File(srcDir, children[count]), new File(destDir, children[count]));
+            }
+        } else {
+            copyFiles(srcDir, destDir);
+        }
+    }
+
+    public void copyFiles(File src, File dest) throws IOException {
+        InputStream in = new FileInputStream(src);
+        OutputStream out = new FileOutputStream(dest);
+        byte[] buf = new byte[1024];
+        int len;
+        while ((len = in.read(buf)) > 0) {
+            out.write(buf, 0, len);
+        }
+        in.close();
+        out.close();
+
+    }
+
+    public void deleteDirectory(File dir) {
+        if (dir.isDirectory()) {
+            String[] children = dir.list();
+            for (int count = 0; count < children.length; count++) {
+                deleteDirectory(new File(dir, children[count]));
+            }
+        }
+        dir.delete();
+    }
+
+    public void generateDefaultClientCode(File temp) throws Exception {
+
+
+        temp.mkdir();
+        try {
+            codegenBean.generate();
+            SrcCompiler compiler = new SrcCompiler();
+            compiler.compileSource(temp.getAbsolutePath());
+            String wsdl = codegenBean.getWSDLFileName();
+            final String name = wsdl.substring(wsdl.lastIndexOf(File.separatorChar) + 1, wsdl.lastIndexOf(".")) + "-stub.jar";
+            System.out.println(name);
+            File lib = new File(codegenBean.getActiveProject().getProjectFile().getParent().getPath() + File.separator + "lib");
+            if (!lib.isDirectory()) {
+                lib.mkdir();
+            }
+            JarFileWriter jarFileWriter = new JarFileWriter();
+            jarFileWriter.writeJarFile(lib, name, new File(temp + File.separator + "classes"));
+            Project project = codegenBean.getActiveProject();
+
+            final LibraryTable table = (LibraryTable) project.getComponent(LibraryTable.class);
+
+
+            String url = VirtualFileManager.constructUrl(JarFileSystem.PROTOCOL, lib.getAbsolutePath() + File.separator + name) + JarFileSystem.JAR_SEPARATOR;
+
+            final VirtualFile jarVirtualFile = VirtualFileManager.getInstance().findFileByUrl(url);
+
+            ApplicationManager.getApplication().runWriteAction(new
+                    Runnable() {
+                        public void run() {
+                            Library myLibrary = table.createLibrary(name);
+
+                            Library.ModifiableModel libraryModel = myLibrary.getModifiableModel();
+                            libraryModel.addRoot(jarVirtualFile, OrderRootType.CLASSES);
+                            libraryModel.commit();
+
+                        }
+                    });
+        } catch (Exception e1) {
+           throw e1;
+        }
+        finally {
+
+            deleteDirectory(temp);
+        }
+    }
+
 
     public void setPane() {
-        panleID ++;
+        panleID++;
         switch (panleID) {
-            case 1 : {
+            case 1: {
+                panel_3.setCaptions("  Options"
+                        , " Select from custom or default");
+                this.secondPanel.setVisible(false);
+                this.plMiddle.setVisible(false);
+                this.optionPane.setCodeGenBean(codegenBean);
+                this.optionPane.setVisible(true);
+                BottomPanel.setEnable(true, false, true);
+                break;
+            }
+            case 2: {
                 panel_3.setCaptions("  Options"
                         , "  Set the options for the code generation");
                 this.secondPanel.setVisible(true);
                 this.secondPanel.setCodeGenBean(codegenBean);
                 this.plMiddle.setVisible(false);
+                this.optionPane.setVisible(false);
                 BottomPanel.setEnable(true, false, true);
                 break;
             }
-            case 2 : {
+            case 3: {
                 panel_3.setCaptions("  Output"
                         , "  set the output project for the generated code");
                 this.secondPanel.setVisible(false);
                 this.plMiddle.setVisible(false);
+                this.optionPane.setVisible(false);
+                outputpane.loadCmbCurrentProject();
+                outputpane.loadcmbModuleSrcProject();
                 this.outputpane.setVisible(true);
-                BottomPanel.setEnable(true, true, true);
+                BottomPanel.setEnable(false, true, true);
                 break;
             }
         }
     }
 
+    public void increasePanelID() {
+        panleID++;
+    }
+
     public void setMiddlerPanel(int panel) {
         this.panleID = panel;
         if (panleID == 2) {
@@ -135,12 +267,6 @@
     }
 
 
-    public static void main(String[] args) {
-        Java2CodeFrame java2CodeFrame = new Java2CodeFrame();
-        java2CodeFrame.setTitle("Axis2 Code generation");
-        java2CodeFrame.pack();
-        java2CodeFrame.show();
-    }
 }
 
 class windowLayout implements LayoutManager {
@@ -161,8 +287,8 @@
         Dimension dim = new Dimension(0, 0);
 
         Insets insets = parent.getInsets();
-        dim.width = 541 + insets.left + insets.right;
-        dim.height = 340 + insets.top + insets.bottom;
+        dim.width = 550 + insets.left + insets.right;
+        dim.height = 460 + insets.top + insets.bottom;
 
         return dim;
     }
@@ -177,23 +303,27 @@
         Component c;
         c = parent.getComponent(0);
         if (c.isVisible()) {
-            c.setBounds(insets.left, insets.top, 544, 80);
+            c.setBounds(insets.left, insets.top, 550, 80);
         }
         c = parent.getComponent(1);
         if (c.isVisible()) {
-            c.setBounds(insets.left, insets.top + 80, 544, 180);
+            c.setBounds(insets.left, insets.top + 80, 550, 330);
         }
         c = parent.getComponent(3);
         if (c.isVisible()) {
-            c.setBounds(insets.left, insets.top + 80, 544, 180);
+            c.setBounds(insets.left, insets.top + 80, 550, 330);
         }
         c = parent.getComponent(4);
         if (c.isVisible()) {
-            c.setBounds(insets.left, insets.top + 80, 544, 180);
+            c.setBounds(insets.left, insets.top + 80, 550, 330);
+        }
+        c = parent.getComponent(5);
+        if (c.isVisible()) {
+            c.setBounds(insets.left, insets.top + 80, 550, 330);
         }
         c = parent.getComponent(2);
         if (c.isVisible()) {
-            c.setBounds(insets.left, insets.top + 290, 544, 50);
+            c.setBounds(insets.left, insets.top + 410, 550, 50);
         }
     }
 }

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/OutPutPane.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/OutPutPane.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/OutPutPane.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/OutPutPane.java Thu Oct  5 02:20:17 2006
@@ -1,17 +1,10 @@
 package org.apache.axis2.tools.idea;
 
+import com.intellij.openapi.module.Module;
 import org.apache.axis2.tools.bean.CodegenBean;
 
-import javax.swing.JButton;
-import javax.swing.JFileChooser;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Insets;
-import java.awt.LayoutManager;
+import javax.swing.*;
+import java.awt.*;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.io.File;
@@ -40,9 +33,18 @@
  * Time: 12:52:31 PM
  */
 public class OutPutPane extends JPanel implements ActionListener {
-    JLabel lbloutput;
     JTextField txtoutput;
     JButton btwBrowse;
+
+    JRadioButton radCurrentProject;
+    JLabel lblCurrentProject;
+    JComboBox cmbCurrentProject;
+    JRadioButton radCustomLocation;
+
+    ButtonGroup buttonGroup;
+
+    JLabel lblModuleSrc;
+    JComboBox cmbModuleSrc;
     private CodegenBean cogenbean;
     final JFileChooser fc = new JFileChooser();
 
@@ -52,19 +54,87 @@
 
         setLayout(customLayout);
 
-        lbloutput = new JLabel("Output Path");
-        add(lbloutput);
+        buttonGroup = new ButtonGroup();
 
         txtoutput = new JTextField("");
+        txtoutput.setEnabled(false);
         add(txtoutput);
 
         btwBrowse = new JButton("Browse..");
         add(btwBrowse);
+        btwBrowse.setEnabled(false);
         btwBrowse.addActionListener(this);
 
+
+        radCurrentProject = new JRadioButton("Add sources to current project", true);
+        buttonGroup.add(radCurrentProject);
+        radCurrentProject.setActionCommand("radCurrentProject");
+        add(radCurrentProject);
+        radCurrentProject.addActionListener(this);
+
+        lblCurrentProject = new JLabel("Select Module");
+        lblCurrentProject.setEnabled(true);
+        add(lblCurrentProject);
+
+        radCustomLocation = new JRadioButton("Select custom output location");
+        buttonGroup.add(radCustomLocation);
+        radCustomLocation.setActionCommand("radCustomLocation");
+        add(radCustomLocation);
+        radCustomLocation.addActionListener(this);
+
+        cmbCurrentProject = new JComboBox();
+        loadCmbCurrentProject();
+        cmbCurrentProject.setEnabled(true);
+        add(cmbCurrentProject);
+
+        lblModuleSrc = new JLabel("Select Source Directory");
+        lblModuleSrc.setEnabled(true);
+        add(lblModuleSrc);
+
+        cmbModuleSrc = new JComboBox();
+        loadcmbModuleSrcProject();
+        cmbModuleSrc.setEnabled(true);
+        add(cmbModuleSrc);
+
+
         setSize(getPreferredSize());
     }
 
+    public void loadCmbCurrentProject() {
+        Module modules[] = cogenbean.getModules();
+        int count =-1;
+        if (modules != null) {
+            for (count = 0; count < modules.length; count++) {
+                cmbCurrentProject.addItem(modules[count].getName());
+            }
+        }
+
+        if (count == -1) {
+            radCurrentProject.setEnabled(false);
+            radCustomLocation.setSelected(true);
+            txtoutput.setEnabled(true);
+            btwBrowse.setEnabled(true);
+        }
+        else{
+            radCurrentProject.setEnabled(true);
+            radCurrentProject.setSelected(true);
+            txtoutput.setEnabled(false);
+            btwBrowse.setEnabled(false);
+        }
+    }
+
+    public void loadcmbModuleSrcProject() {
+        String module = null;
+        module = (String) cmbCurrentProject.getSelectedItem();
+        if (module != null) {
+            String src[] = cogenbean.getModuleSrc(module);
+            for (int count = 0; count < src.length; count++) {
+                cmbModuleSrc.addItem(src[count]);
+            }
+        }
+    }
+
+
     public void actionPerformed(ActionEvent e) {
         Object obj = e.getSource();
         if (obj == btwBrowse) {
@@ -77,6 +147,21 @@
             } else {
                 System.out.println("no file");
             }
+        } else if (obj == radCurrentProject) {
+            lblCurrentProject.setEnabled(true);
+            cmbCurrentProject.setEnabled(true);
+            lblModuleSrc.setEnabled(true);
+            cmbModuleSrc.setEnabled(true);
+            txtoutput.setEnabled(false);
+            btwBrowse.setEnabled(false);
+
+        } else if (obj == radCustomLocation) {
+            lblCurrentProject.setEnabled(false);
+            cmbCurrentProject.setEnabled(false);
+            lblModuleSrc.setEnabled(false);
+            cmbModuleSrc.setEnabled(false);
+            txtoutput.setEnabled(true);
+            btwBrowse.setEnabled(true);
         }
     }
 }
@@ -110,17 +195,37 @@
         Insets insets = parent.getInsets();
 
         Component c;
-        c = parent.getComponent(0);
+        c = parent.getComponent(2);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 8, insets.top + 8, 72, 24);
+            c.setBounds(insets.left + 8, insets.top + 8, 350, 24);
         }
-        c = parent.getComponent(1);
+        c = parent.getComponent(3);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 88, insets.top + 8, 354, 24);
+            c.setBounds(insets.left + 30, insets.top + 40, 150, 24);
         }
-        c = parent.getComponent(2);
+        c = parent.getComponent(5);
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 200, insets.top + 40, 250, 24);
+        }
+        c = parent.getComponent(6);
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 30, insets.top + 70, 150, 24);
+        }
+        c = parent.getComponent(7);
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 200, insets.top + 70, 250, 24);
+        }
+        c = parent.getComponent(4);
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 8, insets.top + 100, 350, 24);
+        }
+        c = parent.getComponent(0);
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 30, insets.top + 130, 150, 24);
+        }
+        c = parent.getComponent(1);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 450, insets.top + 8, 80, 24);
+            c.setBounds(insets.left + 200, insets.top + 130, 150, 24);
         }
     }
 }

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/PluginClassLoader.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/PluginClassLoader.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/PluginClassLoader.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/PluginClassLoader.java Thu Oct  5 02:20:17 2006
@@ -1,10 +1,6 @@
 package org.apache.axis2.tools.idea;
 
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
+import java.io.*;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.ArrayList;

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondFrame.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondFrame.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondFrame.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondFrame.java Thu Oct  5 02:20:17 2006
@@ -3,6 +3,7 @@
 import org.apache.axis2.tools.bean.CodegenBean;
 
 import javax.swing.*;
+import javax.swing.border.BevelBorder;
 import javax.xml.namespace.QName;
 import java.awt.*;
 import java.awt.event.ActionEvent;
@@ -29,17 +30,34 @@
 
     JLabel lblLangauge;
     JComboBox cmbLan;
-    JCheckBox serverside;
-    JCheckBox rdsyn;
-    JCheckBox rdasync;
-    JLabel lbldbtype;
-    JComboBox cmbdbtype;
+
     JLabel lblServiceName;
     JComboBox cmbServiceName;
+
     JLabel lblportName;
     JComboBox cmbPortName;
+
     JLabel lblpackgeName;
     JTextField txtPacakgeName;
+
+    JLabel lbldbtype;
+    JComboBox cmbdbtype;
+
+    JCheckBox chkTestCase;
+
+    JLabel lblClient;
+
+    JRadioButton rdBoth;
+    JRadioButton rdsyn;
+    JRadioButton rdasync;
+
+    JLabel lblServer;
+
+    JCheckBox serverside;
+    JCheckBox serviceXML;
+
+    ButtonGroup buttonGroup;
+
     private CodegenBean codegenBean;
     java.util.List serviceNameList;
 
@@ -49,52 +67,82 @@
         setFont(new Font("Helvetica", Font.PLAIN, 12));
         setLayout(customLayout);
 
+        BevelBorder b = new BevelBorder(BevelBorder.LOWERED);
+        setBorder(b);
+
         lblLangauge = new JLabel("Select the output language");
         add(lblLangauge);
 
         cmbLan = new JComboBox();
         cmbLan.addItem("java");
         cmbLan.addItem("C#");
+        cmbLan.setToolTipText("Select the language of the generated code");
         add(cmbLan);
 
-        serverside = new JCheckBox("Generate server side ", true);
-        add(serverside);
-
-        rdsyn = new JCheckBox("Generate sync", false);
-        add(rdsyn);
-
-        rdasync = new JCheckBox("Generate async", false);
-        add(rdasync);
-
-        lbldbtype = new JLabel("Select Databinding type");
-        add(lbldbtype);
-
-        cmbdbtype = new JComboBox();
-        cmbdbtype.addItem("adb");
-        cmbdbtype.addItem("xmlbeans");
-        cmbdbtype.addItem("none");
-        add(cmbdbtype);
-
         lblServiceName = new JLabel("Select ServiceName");
         add(lblServiceName);
 
         cmbServiceName = new JComboBox();
         add(cmbServiceName);
+        cmbServiceName.setToolTipText("Select the name of the service that the code should be generated for");
         cmbServiceName.addActionListener(this);
 
         lblportName = new JLabel("Select Port Name");
         add(lblportName);
 
         cmbPortName = new JComboBox();
+        cmbPortName.setToolTipText("Select the port name that the code should be generated for");
         add(cmbPortName);
 
         lblpackgeName = new JLabel("Select the package name");
         add(lblpackgeName);
 
         txtPacakgeName = new JTextField("org.axis2");
+        txtPacakgeName.setToolTipText("Set the package name of the generated code");
         add(txtPacakgeName);
 
-        setSize(getPreferredSize());
+        lbldbtype = new JLabel("Select Databinding type");
+        add(lbldbtype);
+
+        cmbdbtype = new JComboBox();
+        cmbdbtype.addItem("adb");
+        cmbdbtype.addItem("xmlbeans");
+        cmbdbtype.addItem("none");
+        cmbdbtype.setToolTipText("Select the databinding framework to be used in the generation process");
+        add(cmbdbtype);
+
+        chkTestCase = new JCheckBox("Generate Test Case", true);
+        chkTestCase.setToolTipText("A test case will be generated if this is checked");
+        add(chkTestCase);
+
+        lblClient = new JLabel("Client Side Options");
+        add(lblClient);
+
+        buttonGroup = new ButtonGroup();
+
+        rdBoth = new JRadioButton("Generate both sync and async", true);
+        buttonGroup.add(rdBoth);
+        add(rdBoth);
+
+        rdsyn = new JRadioButton("Generate sync only", false);
+        buttonGroup.add(rdsyn);
+        add(rdsyn);
+
+        rdasync = new JRadioButton("Generate async only", false);
+        buttonGroup.add(rdasync);
+        add(rdasync);
+
+        lblServer = new JLabel("Server Side Options");
+        add(lblServer);
+
+        serverside = new JCheckBox("Generate server side ", true);
+        add(serverside);
+
+        serviceXML = new JCheckBox("Generate default service.xml", true);
+        add(serviceXML);
+
+        Dimension dim = new Dimension(450, 300);
+        setSize(dim);
     }
 
     public void setCodeGenBean(CodegenBean codegenBean) {
@@ -145,6 +193,9 @@
         if (serverside.isSelected()) {
             codegenBean.setServerSide(true);
         }
+        if (chkTestCase.isSelected()) {
+            codegenBean.setTestCase(true);
+        }
         codegenBean.setPackageName(txtPacakgeName.getText());
         codegenBean.setServiceName(cmbServiceName.getSelectedItem().toString());
         codegenBean.setServiceName(cmbPortName.getSelectedItem().toString());
@@ -180,7 +231,7 @@
 
         Insets insets = parent.getInsets();
         dim.width = 575 + insets.left + insets.right;
-        dim.height = 268 + insets.top + insets.bottom;
+        dim.height = 450 + insets.top + insets.bottom;
 
         return dim;
     }
@@ -193,58 +244,100 @@
         Insets insets = parent.getInsets();
 
         Component c;
+
+        // Language selection
         c = parent.getComponent(0);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 8, insets.top + 8, 192, 24);
+            c.setBounds(insets.left + 8, insets.top + 10, 192, 24);
         }
         c = parent.getComponent(1);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 264, insets.top + 8, 184, 24);
+            c.setBounds(insets.left + 272, insets.top + 10, 176, 24);
         }
+
+        // Service Name selection
         c = parent.getComponent(2);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 8, insets.top + 32, 208, 24);
+            c.setBounds(insets.left + 8, insets.top + 40, 192, 24);
         }
         c = parent.getComponent(3);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 220, insets.top + 32, 168, 24);
+            c.setBounds(insets.left + 272, insets.top + 40, 176, 24);
         }
+
+        // Port Name Selection
         c = parent.getComponent(4);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 385, insets.top + 32, 144, 24);
+            c.setBounds(insets.left + 8, insets.top + 70, 192, 24);
         }
         c = parent.getComponent(5);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 8, insets.top + 60, 192, 24);
+            c.setBounds(insets.left + 272, insets.top + 70, 176, 24);
         }
+
+        //Package NAme Selection
         c = parent.getComponent(6);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 272, insets.top + 60, 176, 24);
+            c.setBounds(insets.left + 8, insets.top + 100, 192, 24);
         }
         c = parent.getComponent(7);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 8, insets.top + 90, 192, 24);
+            c.setBounds(insets.left + 272, insets.top + 100, 176, 24);
         }
+
+        // Data Binding Selection
         c = parent.getComponent(8);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 272, insets.top + 90, 176, 24);
+            c.setBounds(insets.left + 8, insets.top + 130, 192, 24);
         }
         c = parent.getComponent(9);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 8, insets.top + 120, 192, 24);
+            c.setBounds(insets.left + 272, insets.top + 130, 176, 24);
         }
+
+        // Test Case Selection
         c = parent.getComponent(10);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 272, insets.top + 120, 176, 24);
+            c.setBounds(insets.left + 8, insets.top + 160, 208, 24);
         }
+
+        // Client side options
         c = parent.getComponent(11);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 8, insets.top + 154, 192, 24);
+            c.setBounds(insets.left + 8, insets.top + 190, 168, 24);
         }
+
+        // Service invocation both,sync,async
         c = parent.getComponent(12);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 272, insets.top + 154, 176, 24);
+            c.setBounds(insets.left + 8, insets.top + 220, 220, 24);
         }
+        c = parent.getComponent(13);
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 230, insets.top + 220, 140, 24);
+        }
+        c = parent.getComponent(14);
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 380, insets.top + 220, 160, 24);
+        }
+
+        // Server side options
+        c = parent.getComponent(15);
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 8, insets.top + 250, 168, 24);
+        }
+
+        // Generate serverside, generate service XML
+        c = parent.getComponent(16);
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 8, insets.top + 280, 200, 24);
+        }
+        c = parent.getComponent(17);
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 228, insets.top + 280, 200, 24);
+        }
+
+
     }
 }
 

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=453154&r1=453153&r2=453154
==============================================================================
--- 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 Oct  5 02:20:17 2006
@@ -1,8 +1,5 @@
 package org.apache.axis2.tools.idea;
 
-import org.apache.axis2.tools.bean.CodegenBean;
-
-import javax.swing.*;
 import java.awt.*;
 
 /*
@@ -39,7 +36,7 @@
 
         Insets insets = parent.getInsets();
         dim.width = 565 + insets.left + insets.right;
-        dim.height = 235 + insets.top + insets.bottom;
+        dim.height = 300 + insets.top + insets.bottom;
 
         return dim;
     }

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ServiceArchiveCreator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ServiceArchiveCreator.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ServiceArchiveCreator.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ServiceArchiveCreator.java Thu Oct  5 02:20:17 2006
@@ -1,27 +1,25 @@
-/*
-* Copyright 2004,2005 The Apache Software Foundation.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*      http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
 package org.apache.axis2.tools.idea;
 
-import com.intellij.openapi.actionSystem.ActionPlaces;
-import com.intellij.openapi.actionSystem.AnAction;
-import com.intellij.openapi.actionSystem.AnActionEvent;
-import com.intellij.openapi.actionSystem.Presentation;
+import com.intellij.openapi.actionSystem.*;
+import com.intellij.openapi.project.Project;
 
-import javax.swing.ImageIcon;
+import javax.swing.*;
 
 public class ServiceArchiveCreator extends AnAction {
     private ImageIcon myIcon;
@@ -32,7 +30,9 @@
 
     public void actionPerformed(AnActionEvent event) {
         Java2CodeFrame win = new Java2CodeFrame();
-        win.showUI();
+        win.setProject((Project) event.getDataContext().getData(DataConstants.PROJECT));
+        win.pack();
+        win.show();
     }
 
     public void update(AnActionEvent event) {

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/ModuleDialog.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/ModuleDialog.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/ModuleDialog.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/ModuleDialog.java Thu Oct  5 02:20:17 2006
@@ -1,12 +1,7 @@
 package org.apache.ideaplugin;
 
-import javax.swing.JButton;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JTextArea;
-import javax.swing.JTextField;
-import java.awt.Font;
-import java.awt.Insets;
+import javax.swing.*;
+import java.awt.*;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 /*
@@ -36,7 +31,7 @@
 
     Insets insets;
 
-    protected JLabel  moduleName;
+    protected JLabel moduleName;
     protected JTextField txtModule;
     protected JButton addbut;
 
@@ -47,7 +42,7 @@
     public ModuleDialog() {
         getContentPane().setFont(new Font("Helvetica", Font.PLAIN, 12));
         getContentPane().setLayout(null);
-        getContentPane().setBounds(150,150,300,100);
+        getContentPane().setBounds(150, 150, 300, 100);
         insets = getInsets();
 
         moduleName = new JLabel("Module Name: ");
@@ -61,32 +56,32 @@
         addbut.addActionListener(this);
 
 
-        moduleName.setBounds(insets.left + 5,insets.top +6 ,100,24);
-        txtModule.setBounds(insets.left + 110,insets.top+6,160,24);
-        addbut.setBounds(insets.left + 100,insets.top+45,60,24);
+        moduleName.setBounds(insets.left + 5, insets.top + 6, 100, 24);
+        txtModule.setBounds(insets.left + 110, insets.top + 6, 160, 24);
+        addbut.setBounds(insets.left + 100, insets.top + 45, 60, 24);
 
         setSize(getPreferredSize());
         setResizable(false);
     }
 
-    public void showDialog(String in , JTextArea textarea , int position){
+    public void showDialog(String in, JTextArea textarea, int position) {
         this.textarea = textarea;
-        this.position =position;
+        this.position = position;
         this.show();
         this.val = in;
         this.setVisible(true);
     }
 
-    public String  hideForm(){
-        return  this.val;
+    public String hideForm() {
+        return this.val;
     }
 
     public void actionPerformed(ActionEvent e) {
         Object obj = e.getSource();
-        if(obj == addbut){
-            String str = "<module ref=\"" +txtModule.getText().trim() + "\" >";
+        if (obj == addbut) {
+            String str = "<module ref=\"" + txtModule.getText().trim() + "\" >";
             val = str;
-            textarea.insert(str,position +1);
+            textarea.insert(str, position + 1);
             this.setVisible(false);
         }
     }

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/ParameterDialog.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/ParameterDialog.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/ParameterDialog.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/ParameterDialog.java Thu Oct  5 02:20:17 2006
@@ -1,13 +1,7 @@
 package org.apache.ideaplugin;
 
-import javax.swing.JButton;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextArea;
-import javax.swing.JTextField;
-import java.awt.Font;
-import java.awt.Insets;
+import javax.swing.*;
+import java.awt.*;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 /*
@@ -37,8 +31,8 @@
 
     Insets insets;
 
-    protected JLabel  paraName;
-    protected JLabel  paravale;
+    protected JLabel paraName;
+    protected JLabel paravale;
     protected JTextField txtpraName;
     protected JTextArea txtparaValue;
     protected JScrollPane sp;
@@ -50,7 +44,7 @@
     public ParameterDialog() {
         getContentPane().setFont(new Font("Helvetica", Font.PLAIN, 12));
         getContentPane().setLayout(null);
-        getContentPane().setBounds(150,150,300,180);
+        getContentPane().setBounds(150, 150, 300, 180);
         insets = getInsets();
 
         paraName = new JLabel("Parameter Name: ");
@@ -74,36 +68,36 @@
         addbut.addActionListener(this);
 
 
-        paraName.setBounds(insets.left + 5,insets.top +6 ,100,24);
-        paravale.setBounds(insets.left + 5,insets.top+34,100,24);
-        sp.setBounds(insets.left + 110,insets.top+34,160,60);
-        txtpraName.setBounds(insets.left + 110,insets.top+6,160,24);
-        addbut.setBounds(insets.left + 100,insets.top+100,60,24);
+        paraName.setBounds(insets.left + 5, insets.top + 6, 100, 24);
+        paravale.setBounds(insets.left + 5, insets.top + 34, 100, 24);
+        sp.setBounds(insets.left + 110, insets.top + 34, 160, 60);
+        txtpraName.setBounds(insets.left + 110, insets.top + 6, 160, 24);
+        addbut.setBounds(insets.left + 100, insets.top + 100, 60, 24);
 
         setSize(getPreferredSize());
         setResizable(false);
     }
 
-    public void showDialog(String in , JTextArea textarea , int position){
+    public void showDialog(String in, JTextArea textarea, int position) {
         this.textarea = textarea;
-        this.position =position;
+        this.position = position;
         this.show();
         this.val = in;
         this.setVisible(true);
     }
 
-    public String  hideForm(){
-        return  this.val;
+    public String hideForm() {
+        return this.val;
     }
 
     public void actionPerformed(ActionEvent e) {
         Object obj = e.getSource();
-        if(obj == addbut){
+        if (obj == addbut) {
             String str = "<parameter locked=\"false\" name=\"" + txtpraName.getText().trim() + "\">\n"
-                    + txtparaValue.getText() +"\n"+
+                    + txtparaValue.getText() + "\n" +
                     "</parameter>\n";
             val = str;
-            textarea.insert(str,position +1);
+            textarea.insert(str, position + 1);
             this.setVisible(false);
         }
     }

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/FileCopier.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/FileCopier.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/FileCopier.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/FileCopier.java Thu Oct  5 02:20:17 2006
@@ -37,7 +37,7 @@
         this.setOwningTarget(new org.apache.tools.ant.Target());
     }
 
-    public void copyFiles(File sourceFile, File destinationDirectory,String filter){
+    public void copyFiles(File sourceFile, File destinationDirectory, String filter) {
 
         this.filesets.clear();
 
@@ -46,9 +46,9 @@
         else {
             FileSet fileset = new FileSet();
             fileset.setDir(sourceFile);
-            if (filter!=null){
-                if (filter.matches("\\.\\w*")){
-                    fileset.setIncludes("*/**/*"+filter);
+            if (filter != null) {
+                if (filter.matches("\\.\\w*")) {
+                    fileset.setIncludes("*/**/*" + filter);
                 }
             }
 

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/JarFileWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/JarFileWriter.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/JarFileWriter.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/JarFileWriter.java Thu Oct  5 02:20:17 2006
@@ -39,16 +39,16 @@
         this.setOwningTarget(new org.apache.tools.ant.Target());
     }
 
-    public void writeJarFile(File outputFolder,String outputFileName, File inputFileFolder) throws IOException,Exception {
+    public void writeJarFile(File outputFolder, String outputFileName, File inputFileFolder) throws IOException, Exception {
 
-        if (!outputFolder.exists()){
+        if (!outputFolder.exists()) {
             outputFolder.mkdir(); //create the output path
-        }else{
+        } else {
             if (!outputFolder.isDirectory())
                 return;
         }
 
-        File targetFile = new File(outputFolder,outputFileName);
+        File targetFile = new File(outputFolder, outputFileName);
         this.setBasedir(inputFileFolder);
         this.setDestFile(targetFile);
 

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ObjectKeeper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ObjectKeeper.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ObjectKeeper.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ObjectKeeper.java Thu Oct  5 02:20:17 2006
@@ -1,6 +1,6 @@
 package org.apache.ideaplugin.bean;
 
-import javax.swing.JPanel;
+import javax.swing.*;
 /*
 * Copyright 2004,2005 The Apache Software Foundation.
 *
@@ -32,13 +32,16 @@
 
     //to keep a refernce to next panel
     void setNext(JPanel next);
+
     JPanel getNext();
 
     //to keep a refernce to previous panel
     void setPrivious(JPanel privious);
+
     JPanel getPrivious();
-    
+
     String getTopLable();
+
     String getLable();
 
 }

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/OperationObj.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/OperationObj.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/OperationObj.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/OperationObj.java Thu Oct  5 02:20:17 2006
@@ -24,7 +24,7 @@
  */
 public class OperationObj {
 
-    private String OpName ;
+    private String OpName;
     private String ReturnValue;
     private Integer parameters;
     private Boolean select;
@@ -69,7 +69,7 @@
         this.select = select;
     }
 
-    public void printMe(){
+    public void printMe() {
         System.out.println("======== Row =============");
         System.out.println("OpName = " + OpName);
         System.out.println("parameters = " + parameters);

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/Axi2PluginPage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/Axi2PluginPage.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/Axi2PluginPage.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/Axi2PluginPage.java Thu Oct  5 02:20:17 2006
@@ -1,5 +1,6 @@
 package org.apache.ideaplugin.frames;
 
+import com.intellij.openapi.project.Project;
 import org.apache.axis2.tools.idea.Java2CodeFrame;
 
 import javax.swing.*;
@@ -36,6 +37,7 @@
     JButton butOK;
     JButton butCancle;
     JPanel imglbl;
+    Project project;
 
     public Axi2PluginPage() {
         setBackground(Color.white);
@@ -47,13 +49,15 @@
 
         setFont(new Font("Helvetica", Font.PLAIN, 12));
         setLayout(customLayout);
-
+        setTitle("Axis2 Plugin");
         cbg = new ButtonGroup();
         service = new JRadioButton("Create a service archive", false);
+        service.setToolTipText("Hepls package classes, libs and WSDLs to create a archive that can be deployed in Axis2");
         cbg.add(service);
         add(service);
 
         javawsdl = new JRadioButton("WSDL2Code codegenaration", false);
+        javawsdl.setToolTipText("Helps generate skeletons and stubs for a given WSDL");
         cbg.add(javawsdl);
         add(javawsdl);
 
@@ -77,10 +81,11 @@
         show();
     }
 
-//    public static void main(String args[]) {
-//        Axi2PluginPage window = new Axi2PluginPage();
-//        window.showUI();
-//    }
+    public void setProject(Project project) {
+
+        this.project = project;
+    }
+
 
     public void actionPerformed(ActionEvent e) {
         Object obj = e.getSource();
@@ -92,7 +97,9 @@
             setVisible(false);
             if (javawsdl.isSelected()) {
                 Java2CodeFrame win = new Java2CodeFrame();
-                win.showUI();
+                win.setProject(project);
+                win.pack();
+                win.show();
             } else {
                 ServiceArciveFrame window = new ServiceArciveFrame();
                 window.setTitle("Service Archive creation");

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/BottomPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/BottomPanel.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/BottomPanel.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/BottomPanel.java Thu Oct  5 02:20:17 2006
@@ -3,15 +3,8 @@
 import org.apache.ideaplugin.bean.ArchiveBean;
 import org.apache.ideaplugin.bean.ObjectKeeper;
 
-import javax.swing.JButton;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Insets;
-import java.awt.LayoutManager;
+import javax.swing.*;
+import java.awt.*;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 /*

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ClassSelctionPage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ClassSelctionPage.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ClassSelctionPage.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ClassSelctionPage.java Thu Oct  5 02:20:17 2006
@@ -3,13 +3,8 @@
 import org.apache.ideaplugin.bean.ArchiveBean;
 import org.apache.ideaplugin.bean.ObjectKeeper;
 
-import javax.swing.JButton;
-import javax.swing.JFileChooser;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-import java.awt.Font;
-import java.awt.Insets;
+import javax.swing.*;
+import java.awt.*;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.io.File;
@@ -85,7 +80,7 @@
     public JPanel getNext() {
         ResourceChooser res = new ResourceChooser(parent);
         res.setPrivious(this);
-        return  res;
+        return res;
 //        return selectPanel;
     }
 

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/DescriptorFile.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/DescriptorFile.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/DescriptorFile.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/DescriptorFile.java Thu Oct  5 02:20:17 2006
@@ -5,12 +5,8 @@
 import org.apache.ideaplugin.bean.ArchiveBean;
 import org.apache.ideaplugin.bean.ObjectKeeper;
 
-import javax.swing.JButton;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTextArea;
-import java.awt.Font;
-import java.awt.Insets;
+import javax.swing.*;
+import java.awt.*;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 /*
@@ -36,7 +32,7 @@
  * Date: Sep 22, 2005
  * Time: 11:42:16 PM
  */
-public class DescriptorFile extends JPanel implements ObjectKeeper, ActionListener  {
+public class DescriptorFile extends JPanel implements ObjectKeeper, ActionListener {
 
     protected JTextArea desArea;
     protected JButton butaddpara;
@@ -96,7 +92,7 @@
 
     //to keep a refernce to previous panel
     public void setPrivious(JPanel privious) {
-        this.previous =privious;
+        this.previous = privious;
     }
 
     public JPanel getPrivious() {
@@ -105,15 +101,15 @@
 
     public void actionPerformed(ActionEvent e) {
         Object obj = e.getSource();
-        if(obj == butaddpara){
+        if (obj == butaddpara) {
             String str = "";
-            int cusrpos =  desArea.getCaretPosition();
-            pradialog.showDialog(str,desArea,cusrpos);
+            int cusrpos = desArea.getCaretPosition();
+            pradialog.showDialog(str, desArea, cusrpos);
             pradialog.hideForm();
-        }  else if(obj == addModuleRef){
+        } else if (obj == addModuleRef) {
             String str = "";
-            int cusrpos =  desArea.getCaretPosition();
-            moduledialog.showDialog(str,desArea,cusrpos);
+            int cusrpos = desArea.getCaretPosition();
+            moduledialog.showDialog(str, desArea, cusrpos);
             moduledialog.hideForm();
         }
     }

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/FirstFrame.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/FirstFrame.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/FirstFrame.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/FirstFrame.java Thu Oct  5 02:20:17 2006
@@ -3,16 +3,8 @@
 import org.apache.ideaplugin.bean.ArchiveBean;
 import org.apache.ideaplugin.bean.ObjectKeeper;
 
-import javax.swing.ButtonGroup;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JRadioButton;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Insets;
-import java.awt.LayoutManager;
+import javax.swing.*;
+import java.awt.*;
 /*
 * Copyright 2004,2005 The Apache Software Foundation.
 *
@@ -80,7 +72,6 @@
         cbggenerateserviceDesc.add(radihaveService);
         add(radihaveService);
 
-
         //creating next page
 //        classPage = new ClassSelctionPage(parent);
 //        classPage.setPrivious(this);
@@ -98,16 +89,16 @@
     }
 
     public JPanel getNext() {
-        boolean singleservice= radioSingle.isSelected();
-        boolean generateXML =radioGenerate.isSelected();
-        if(singleservice  && generateXML){
+        boolean singleservice = radioSingle.isSelected();
+        boolean generateXML = radioGenerate.isSelected();
+        if (singleservice && generateXML) {
             parent.singleService = true;
             parent.generateServiceXML = true;
             ClassSelctionPage classPage = new ClassSelctionPage(parent);
             classPage.setPrivious(this);
-            return classPage ;
-        } else if (!generateXML){
-             parent.generateServiceXML = false;
+            return classPage;
+        } else if (!generateXML) {
+            parent.generateServiceXML = false;
             XMLSelectionPage xml = new XMLSelectionPage(parent);
             xml.setPrivious(this);
             return xml;
@@ -116,7 +107,7 @@
             parent.singleService = false;
             ClassSelctionPage classPage = new ClassSelctionPage(parent);
             classPage.setPrivious(this);
-            return classPage ;
+            return classPage;
         }
     }
 
@@ -126,7 +117,7 @@
     }
 
     public JPanel getPrivious() {
-        return this.previous ;
+        return this.previous;
     }
 
     public String getTopLable() {
@@ -169,16 +160,28 @@
 
         Component c;
         c = parent.getComponent(0);
-        if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+24,208,24);}
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 8, insets.top + 24, 208, 24);
+        }
         c = parent.getComponent(1);
-        if (c.isVisible()) {c.setBounds(insets.left+32,insets.top+56,184,24);}
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 32, insets.top + 56, 184, 24);
+        }
         c = parent.getComponent(2);
-        if (c.isVisible()) {c.setBounds(insets.left+32,insets.top+88,184,24);}
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 32, insets.top + 88, 184, 24);
+        }
         c = parent.getComponent(3);
-        if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+136,250,24);}
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 8, insets.top + 136, 250, 24);
+        }
         c = parent.getComponent(4);
-        if (c.isVisible()) {c.setBounds(insets.left+32,insets.top+168,224,24);}
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 32, insets.top + 168, 224, 24);
+        }
         c = parent.getComponent(5);
-        if (c.isVisible()) {c.setBounds(insets.left+32,insets.top+200,224,16);}
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 32, insets.top + 200, 224, 16);
+        }
     }
 }

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ImagePanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ImagePanel.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ImagePanel.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ImagePanel.java Thu Oct  5 02:20:17 2006
@@ -1,15 +1,7 @@
 package org.apache.ideaplugin.frames;
 
-import javax.swing.ImageIcon;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Insets;
-import java.awt.LayoutManager;
+import javax.swing.*;
+import java.awt.*;
 /*
 * Copyright 2004,2005 The Apache Software Foundation.
 *
@@ -37,7 +29,7 @@
     JLabel lblImage;
     JLabel labTop;
     JLabel lblBottom;
-    ImageIcon apachelogo ;
+    ImageIcon apachelogo;
 
     public ImagePanel() {
         ImageLayout customLayout = new ImageLayout();
@@ -64,7 +56,7 @@
         this.setBackground(Color.white);
     }
 
-    public void setCaptions(String lbl1 , String lbl2){
+    public void setCaptions(String lbl1, String lbl2) {
         labTop.setText("  " + lbl1);
         lblBottom.setText("  " + lbl2);
     }
@@ -101,10 +93,16 @@
 
         Component c;
         c = parent.getComponent(0);
-        if (c.isVisible()) {c.setBounds(insets.left+368,insets.top+0,168,80);}
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 368, insets.top + 0, 168, 80);
+        }
         c = parent.getComponent(1);
-        if (c.isVisible()) {c.setBounds(insets.left+0,insets.top+0,368,40);}
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 0, insets.top + 0, 368, 40);
+        }
         c = parent.getComponent(2);
-        if (c.isVisible()) {c.setBounds(insets.left+0,insets.top+40,368,40);}
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 0, insets.top + 40, 368, 40);
+        }
     }
 }

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/LogoPage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/LogoPage.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/LogoPage.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/LogoPage.java Thu Oct  5 02:20:17 2006
@@ -1,15 +1,7 @@
 package org.apache.ideaplugin.frames;
 
-import javax.swing.ImageIcon;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Insets;
-import java.awt.LayoutManager;
+import javax.swing.*;
+import java.awt.*;
 /*
 * Copyright 2004,2005 The Apache Software Foundation.
 *
@@ -35,7 +27,7 @@
  */
 public class LogoPage extends JPanel {
     JLabel imagelbl;
-    ImageIcon apachelogo ;
+    ImageIcon apachelogo;
 
     public LogoPage() {
         LogoPageLayout customLayout = new LogoPageLayout();
@@ -82,6 +74,8 @@
 
         Component c;
         c = parent.getComponent(0);
-        if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+8,304,64);}
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 8, insets.top + 8, 304, 64);
+        }
     }
 }

Modified: webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/OutPage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/OutPage.java?view=diff&rev=453154&r1=453153&r2=453154
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/OutPage.java (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/OutPage.java Thu Oct  5 02:20:17 2006
@@ -3,17 +3,8 @@
 import org.apache.ideaplugin.bean.ArchiveBean;
 import org.apache.ideaplugin.bean.ObjectKeeper;
 
-import javax.swing.JButton;
-import javax.swing.JFileChooser;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Insets;
-import java.awt.LayoutManager;
+import javax.swing.*;
+import java.awt.*;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.io.File;



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