axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thil...@apache.org
Subject svn commit: r466008 - /webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/BottomPanel.java
Date Fri, 20 Oct 2006 06:38:50 GMT
Author: thilina
Date: Thu Oct 19 23:38:49 2006
New Revision: 466008

URL: http://svn.apache.org/viewvc?view=rev&rev=466008
Log:
applied the patch given at http://issues.apache.org/jira/browse/AXIS2-1464

Thnax Keith

Modified:
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/BottomPanel.java

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/BottomPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/BottomPanel.java?view=diff&rev=466008&r1=466007&r2=466008
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/BottomPanel.java
(original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/BottomPanel.java
Thu Oct 19 23:38:49 2006
@@ -76,11 +76,26 @@
 
     public void actionPerformed(ActionEvent e) {
         Object obj = e.getSource();
-        if (obj == btnCancel) {
+        if (obj == btnBack) {
+            java2CodeFrame.backButtonImpl();
+        }
+        else if (obj == btnCancel) {
             java2CodeFrame.setVisible(false);
             Thread.currentThread().setContextClassLoader(java2CodeFrame.getClassLoader());
         } else if (obj == btnFinish) {
 
+            File outputDir = new File(java2CodeFrame.outputpane.txtoutput.getText().trim());
+            if (java2CodeFrame.outputpane.radCustomLocation.isSelected() )
+            {
+                if (!outputDir.isDirectory())
+                {
+                JOptionPane.showMessageDialog(java2CodeFrame, "The Output Directory specified
is invalid. Please provide a valid directory",
+                            "Error!", JOptionPane.ERROR_MESSAGE);
+                    java2CodeFrame.repaint();
+                    return;
+                }
+            }
+
             String selected = java2CodeFrame.optionPane.buttonGroup.getSelection().getActionCommand();
 
             if (selected.equalsIgnoreCase("radDefaultClient")) {
@@ -105,7 +120,35 @@
 
            else if (selected.equalsIgnoreCase("radCustom")) {
 
+                String output = java2CodeFrame.outputpane.buttonGroup.getSelection().getActionCommand();
+
+                if (output.equalsIgnoreCase("radCurrentProject")) {
+
+                    File temp = java2CodeFrame.secondPanel.codegenBean.getTemp();
+                    java2CodeFrame.secondPanel.codegenBean.setOutput(temp.getAbsolutePath());
+                    try {
+                        java2CodeFrame.generatecode();
+                        java2CodeFrame.copyDirectory(new File(temp + File.separator + "src"),
new File((String) java2CodeFrame.outputpane.cmbModuleSrc.getSelectedItem()));
+                        File src = new File(temp + File.separator + "resources");
+                        if (src.isDirectory())
+                        java2CodeFrame.copyDirectory(src, new File((String) java2CodeFrame.outputpane.cmbModuleSrc.getSelectedItem()
+ File.separator + ".." + File.separator + "resources"));
+
+                        java2CodeFrame.deleteDirectory(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);
+                    }
+
+                }
+                else
+                {
+
                 try {
+
                     java2CodeFrame.generatecode();
 
                 } catch (Exception e1) {
@@ -116,6 +159,7 @@
                             "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE);
                     java2CodeFrame.setVisible(false);
                 }
+                }
             } else if (selected.equalsIgnoreCase("radDefaultServer")) {
 
                 File temp = java2CodeFrame.optionPane.setDefaultServerConfigurations();
@@ -141,7 +185,7 @@
                     File outputPath = new File(path);
                     if (outputPath.exists()) {
                         try {
-                            java2CodeFrame.generateDefaultServerCode(temp, outputPath.getAbsolutePath());
+                            java2CodeFrame.generateDefaultServerCodeCustomLocation(path);
                         } catch (Exception e1) {
                             e1.printStackTrace();
                             StringWriter writer = new StringWriter();
@@ -185,7 +229,7 @@
                     File outputPath = new File(path);
                     if (outputPath.exists()) {
                         try {
-                            java2CodeFrame.generateDefaultServerCode(temp, outputPath.getAbsolutePath());
+                            java2CodeFrame.generateDefaultServerCodeCustomLocation(path);
                             File temp2 = java2CodeFrame.optionPane.setDefaultClientConfigurations();
                             java2CodeFrame.generateDefaultClientCode(temp2);
                         } catch (Exception e1) {
@@ -213,7 +257,7 @@
 
         } else if (obj == btnNext) {
 
-            if (java2CodeFrame.optionPane.isVisible()) {
+                if (java2CodeFrame.optionPane.isVisible()) {
 
                 String selected = java2CodeFrame.optionPane.buttonGroup.getSelection().getActionCommand();
 



---------------------------------------------------------------------
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