You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2007/07/27 10:53:24 UTC
svn commit: r560153 - in
/webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache:
axis2/tools/bean/ axis2/tools/component/ axis2/tools/idea/
axis2/tools/java2wsdl/ axis2/tools/wizardframe/ ideaplugin/ ideaplugin/bea...
Author: sandakith
Date: Fri Jul 27 01:53:22 2007
New Revision: 560153
URL: http://svn.apache.org/viewvc?view=rev&rev=560153
Log:
Applying Axis2-2970 to branch
Removed:
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/CodegenPlugin.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/CodegenPluginAction.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/ModuleDialog.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/ParameterDialog.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ObjectKeeper.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/Axi2PluginPage.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/BottomPanel.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ClassSelctionPage.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/DescriptorFile.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/FirstFrame.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ImagePanel.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/LogoPage.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/OutPage.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ResourceChooser.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/SelectPanel.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ServiceArciveFrame.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/XMLSelectionPage.java
Modified:
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/SrcCompiler.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/component/WizardPanel.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ChooserPanel.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/FirstPanel.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ProgressBarPanel.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondPanel.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/WSDL2JavaOutputPanel.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/MiddlePanel.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OptionPanel.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OutputPanel.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/CodegenFrame.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/WizardFrame.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ArchiveBean.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ServiceObj.java
webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/plugin/Axis2IdeaPlugin.java
Modified: webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/SrcCompiler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/SrcCompiler.java?view=diff&rev=560153&r1=560152&r2=560153
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/SrcCompiler.java (original)
+++ webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/SrcCompiler.java Fri Jul 27 01:53:22 2007
@@ -44,27 +44,28 @@
public void compileSource(String tempPath) {
- Path path;
- File destDir = new File(tempPath + File.separator + "classes");
- destDir.mkdir();
+ Path path;
+ File destDir = new File(tempPath + File.separator + "classes");
+ destDir.mkdir();
- Path srcPath = new Path(project, tempPath + File.separator + "src");
- this.setSrcdir(srcPath);
- this.setDestdir(destDir);
- this.setIncludes("**" + File.separator + "*.java, *.java");
- URL url = getClass().getResource("/icons");
- File lib = new File(url.getPath() + File.separator + ".." + File.separator + ".." + File.separator + "lib");
- File[] files;
- files = lib.listFiles();
+ Path srcPath = new Path(project, tempPath + File.separator + "src");
+ this.setSrcdir(srcPath);
+ this.setDestdir(destDir);
+ this.setIncludes("**" + File.separator + "*.java, *.java");
+ URL url = getClass().getResource("/icons");
+ File lib = new File(url.getPath() + File.separator + ".." + File.separator + ".." + File.separator + "lib");
+ File[] files;
+ files = lib.listFiles();
- Path classpath = new Path(project);
- for (int count = 0; count < files.length; count++) {
- path = new Path(project, files[count].getAbsolutePath());
- classpath.add(path);
- }
- this.setClasspath(classpath);
- this.setFork(true);
- this.perform();
+ Path classpath = new Path(project);
+ for (int count = 0; count < files.length; count++) {
+ path = new Path(project, files[count].getAbsolutePath());
+ classpath.add(path);
+ }
+ this.setClasspath(classpath);
+ this.setFork(true);
+ this.perform();
+
+ }
- }
}
Modified: webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/component/WizardPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/component/WizardPanel.java?view=diff&rev=560153&r1=560152&r2=560153
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/component/WizardPanel.java (original)
+++ webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/component/WizardPanel.java Fri Jul 27 01:53:22 2007
@@ -32,11 +32,13 @@
private ImageIcon panelImage;
private String panelBottomTitle;
private String error;
+ private String frametitle;
private boolean flag;
private boolean progressFlag;
public static final int WSDL_2_JAVA_TYPE = 1;
public static final int JAVA_2_WSDL_TYPE = 2;
- public static final int UNSPECIFIED_TYPE = 3;
+ public static final int SERVICE_ARCHIVE_TYPE=3;
+ public static final int UNSPECIFIED_TYPE = 4;
private boolean isPageComplete = false;
public WizardPanel(WizardComponents wizardComponents) {
@@ -45,7 +47,7 @@
public WizardPanel(WizardComponents wizardComponents, String title) {
this.wizardComponents = wizardComponents;
- this.panelTopTitle = title;
+ this.frametitle = title;
java.net.URL resource = WizardPanel.class.getResource("/icons/asf-feather.png");
setPanelImage(new ImageIcon(resource));
}
@@ -111,6 +113,13 @@
return progressFlag;
}
+ public String getFrameTitle(){
+ return this.frametitle;
+ }
+
+ public void setFrameTitle(String title){
+ this.frametitle=title;
+ }
// next
protected boolean goNext() {
if (wizardComponents.getWizardPanelList().size() > wizardComponents.getCurrentIndex()+1 ) {
@@ -132,7 +141,7 @@
}
}
- protected void switchPanel(int panelIndex) {
+ public void switchPanel(int panelIndex) {
getWizardComponents().setCurrentIndex(panelIndex);
getWizardComponents().updateComponents();
}
Modified: webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ChooserPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ChooserPanel.java?view=diff&rev=560153&r1=560152&r2=560153
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ChooserPanel.java (original)
+++ webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ChooserPanel.java Fri Jul 27 01:53:22 2007
@@ -29,8 +29,9 @@
private boolean flag=false;
private JRadioButton optionJ2WRadioButton;
private JRadioButton optionW2JRadioButton;
+ private JRadioButton optionServiceArchiverRadioButton;
private ButtonGroup bg;
- private char selectedOption = 'A'; // 'N' is no option selected 'A', 'B' & 'F' stands for options
+ private char selectedOption = 'A'; // 'N' is no option selected 'A', 'B','C' & 'F' stands for options
final private String hint="You can generate java code from a WSDL or WSDL from a java source file.";
/**
* construct method for chooserPanel
@@ -39,7 +40,7 @@
public ChooserPanel(WizardComponents wizardComponents){
- super(wizardComponents, "ChooserPanel");
+ super(wizardComponents, "Axis2 Idea Plugin Wizards");
setPanelTopTitle("Select the wizard");
setPanelBottomTitle("Welcome to the Axis2 code generator wizard");
init();
@@ -56,9 +57,11 @@
optionW2JRadioButton = new JRadioButton("Generate java sorce code from a WSDl file.",true);
optionJ2WRadioButton = new JRadioButton("Generate a WSDl from a java source file",false);
+ optionServiceArchiverRadioButton = new JRadioButton("Create Service Archiver",false);
ButtonGroup bg = new ButtonGroup();
bg.add(optionJ2WRadioButton);
bg.add(optionW2JRadioButton);
+ bg.add(optionServiceArchiverRadioButton);
this.setLayout(new GridBagLayout() );
@@ -97,11 +100,26 @@
}
}
});
+ // option button for service Archive
+
+ this.add(optionServiceArchiverRadioButton
+ , new GridBagConstraints(0, 3, 1, 1, 1.0, 0.0
+ , GridBagConstraints.NORTHWEST , GridBagConstraints.NONE
+ , new Insets(10, 20, 0,0), 0, 0));
+ optionServiceArchiverRadioButton .addItemListener(new ItemListener() {
+ public void itemStateChanged(ItemEvent e) {
+ if (e.getStateChange() == ItemEvent.SELECTED) {
+ selectedOption = 'C';
+ update();
+ }
+ }
+ });
+
// hint button
this.add(btnHint,
- new GridBagConstraints(0,3, 1, 1, 1.0,0.0
+ new GridBagConstraints(0,4, 1, 1, 1.0,0.0
, GridBagConstraints.NORTHWEST , GridBagConstraints.NONE
, new Insets(10, 20, 0,0), 0, 0));
btnHint.addActionListener(new ActionListener() {
@@ -122,7 +140,7 @@
// hint lable
this.add(lblHint,
- new GridBagConstraints(0, 4, 1, 1, 1.0, 1.0
+ new GridBagConstraints(0, 5, 1, 1, 1.0, 1.0
, GridBagConstraints.NORTHWEST , GridBagConstraints.NONE
, new Insets(10, 20, 0,0), 0, 0));
@@ -136,10 +154,10 @@
*/
public void update() {
- setNextButtonEnabled((selectedOption == 'A') || (selectedOption == 'B') );
+ setNextButtonEnabled((selectedOption == 'A') || (selectedOption == 'B') ||(selectedOption == 'C'));
setBackButtonEnabled(false); // there is no way back
setProgressPanelVisible(false);
- setPageComplete(true);
+ setPageComplete(true);
}
/**
@@ -151,8 +169,11 @@
} else if (selectedOption == 'B') {
switchPanel(CodegenFrame.PANEL_FIRST_B );
- setNextButtonEnabled(false);
}
+ else if (selectedOption == 'C') {
+ switchPanel(CodegenFrame.PANEL_FIRST_C );
+ }
+ setNextButtonEnabled(false);
}
/**
Modified: webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/FirstPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/FirstPanel.java?view=diff&rev=560153&r1=560152&r2=560153
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/FirstPanel.java (original)
+++ webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/FirstPanel.java Fri Jul 27 01:53:22 2007
@@ -52,7 +52,7 @@
private CodegenBean codegenBean;
public FirstPanel(WizardComponents wizardComponents,CodegenBean codegenBean) {
- super(wizardComponents, "Option was choosed");
+ super(wizardComponents, "Axis2 Idea Plugin WSDL2Java Wizards");
this.codegenBean=codegenBean;
setPanelTopTitle("WSDL selection page");
setPanelBottomTitle("please Select the WSDl file location");
@@ -157,7 +157,6 @@
setPageComplete(false);
}
setBackButtonEnabled(true);
-
}
public int getPageType() {
Modified: webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ProgressBarPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ProgressBarPanel.java?view=diff&rev=560153&r1=560152&r2=560153
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ProgressBarPanel.java (original)
+++ webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ProgressBarPanel.java Fri Jul 27 01:53:22 2007
@@ -22,10 +22,9 @@
import java.awt.*;
import java.lang.reflect.InvocationTargetException;
-public class
- ProgressBarPanel extends JPanel {
+public class ProgressBarPanel extends JPanel {
private volatile boolean stop = false;
- private static int DELAY = 100;
+ private static int DELAY = 500;
public volatile String val=null;
private JLabel progressDescription;
private JProgressBar progressSent;
@@ -65,7 +64,7 @@
public void aboutToDisplayPanel() {
setProgressValue(0);
- setProgressText("Connecting to Server...");
+ // setProgressText("Connecting to Server...");
}
public void displayingPanel() {
@@ -84,7 +83,7 @@
int value = progressSent .getValue();
progressSent .setValue(value+4);
setProgressValue(value+4);
- progressDescription .setText("Genarate Code. Please wait.....");
+ // progressDescription .setText("Genarate Code. Please wait.....");
} else if(!stop){
progressSent .setIndeterminate(true);
Modified: webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondPanel.java?view=diff&rev=560153&r1=560152&r2=560153
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondPanel.java (original)
+++ webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondPanel.java Fri Jul 27 01:53:22 2007
@@ -58,7 +58,7 @@
private CodegenBean codegenBean;
public SecondPanel(WizardComponents wizardComponents,CodegenBean codegenBean) {
- super(wizardComponents, "Option was choosed");
+ super(wizardComponents, "Axis2 Idea Plugin WSDL2Java Wizards");
this.codegenBean=codegenBean;
setPanelTopTitle("Options");
setPanelBottomTitle("Set the options for the code generator. If you wish to edit the codegen options, Select custom");
@@ -374,15 +374,15 @@
serviceXML.setEnabled(false);
serverSideInterface.setEnabled(false);
}
- if(!rdasync.isSelected()){
+ if(rdasync.isSelected()){
rdasync.setEnabled(true);
- rdasync.setSelected(true);
+ rdasync.setSelected(false);
}else{
rdasync.setEnabled(true);
}
- if(rdBoth.isSelected()){
+ if(!rdBoth.isSelected()){
rdBoth.setEnabled(true);
- rdBoth.setSelected(false);
+ rdBoth.setSelected(true);
}else{
rdBoth.setEnabled(true);
}
@@ -492,7 +492,6 @@
//setComboBoxEnable(false);
// load the ports
loadPortNames();
- //Todo error message null
} else {
// service name list being empty means we are switching to
// the interface mode
@@ -501,7 +500,6 @@
// disable the combo's
// setComboBoxEnable(false);
//this is not an error
- //Todo error message null
}
@@ -513,12 +511,10 @@
} catch (WSDLException e) {
// disable the combo's
setComboBoxEnable(false);
- //Todo error message "Specified WSDL is invalid!, Please select a validated *.wsdl/*.xml file on previous page."
}
catch (Exception e) {
// disable the combo's
setComboBoxEnable(false);
- //Todo error message "Specified WSDL is not found!, Please Check whether you have entered the correct path to a *.wsdl on previous page."
}
}
Modified: webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/WSDL2JavaOutputPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/WSDL2JavaOutputPanel.java?view=diff&rev=560153&r1=560152&r2=560153
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/WSDL2JavaOutputPanel.java (original)
+++ webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/WSDL2JavaOutputPanel.java Fri Jul 27 01:53:22 2007
@@ -83,10 +83,10 @@
public WSDL2JavaOutputPanel(WizardComponents wizardComponents,CodegenBean codegenBean, Project project) {
- super(wizardComponents, "Output");
+ super(wizardComponents, "Axis2 Idea Plugin WSDL2Java Wizards");
this.codegenBean=codegenBean;
this.project=project;
- setPanelTopTitle("output");
+ setPanelTopTitle("Output");
setPanelBottomTitle("set the out location for the generated code");
init();
}
@@ -128,9 +128,8 @@
chbAddAxisCodegenJar =new JCheckBox("Add the Axis2 Codegen jars to the codegen resulted project");
chbAddAxisLib =new JCheckBox(" Add Axis2 libraries to the codegen result project ");
chbCreateJar=new JCheckBox(" Create a jar file of codegen result project and add to resulted project lib folder(Default :CodegenResults.jar)");
- chbAddAxisLib.setEnabled(false);//Todo after writing include axis2 jar file it must remove
- radCurrentProject =new JRadioButton("Browse and select a project on current idea workspace");
- radCustomLocation =new JRadioButton("Browse and select location on local file system");
+ radCurrentProject =new JRadioButton("Browse and select a project on current idea workspace",false);
+ radCustomLocation =new JRadioButton("Browse and select location on local file system",true);
ButtonGroup buttonGroup= new ButtonGroup();
buttonGroup.add(radCurrentProject );
buttonGroup.add(radCustomLocation);
@@ -341,7 +340,7 @@
new GridBagConstraints(0, 16, GridBagConstraints.REMAINDER, 1, 0.1, 1.0
, GridBagConstraints.NORTHWEST , GridBagConstraints.BOTH
, new Insets(10, 20, 0,0), 0, 0));
-
+ update();
}
public void back() {
switchPanel(CodegenFrame.PANEL_OPTION_A );
@@ -352,8 +351,7 @@
public void update(){
setNextButtonEnabled(false);
checkPageComlete();
- setEnabledForAddAxisLib();
-
+ setEnabledForAddAxisLib();
}
public void loadCmbCurrentProject() {
Module modules[] = codegenBean .getModules();
@@ -571,26 +569,26 @@
private void handleModifyEvent() {
String text = this.txtoutput.getText();
if ((text == null) || (text.trim().equals(""))) {
- //Todo error message "output location needs to be specified"
+ // error message "output location needs to be specified"
return;
}
- //Todo error message null
+ // error message null
}
private void handleAxisHomeModifyEvent() {
String text = this.txtaxisHome.getText();
if ((text == null) || (text.trim().equals(""))) {
- //Todo error message "output location needs to be specified"
+ // error message "output location needs to be specified"
return;
}
- //Todo error message null
+ // error message null
}
private void handleJarNameModifyEvent() {
String text = this.txtjarFileName.getText();
if ((text == null) || (text.trim().equals(""))) {
- //Todo error message "output location needs to be specified"
+ // error message "output location needs to be specified"
return;
}
- //Todo error message null
+ // error message null
}
}
Modified: webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/MiddlePanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/MiddlePanel.java?view=diff&rev=560153&r1=560152&r2=560153
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/MiddlePanel.java (original)
+++ webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/MiddlePanel.java Fri Jul 27 01:53:22 2007
@@ -69,7 +69,7 @@
* @param wsdlgenBean
*/
public MiddlePanel(WizardComponents wizardComponents ,WsdlgenBean wsdlgenBean) {
- super(wizardComponents, "Java source / classpath selection");
+ super(wizardComponents, "Axis2 Idea Plugin Java2WSDL Wizards");
setPanelTopTitle("Java source / classpath selection");
setPanelBottomTitle("Select the classes and the libraries");
this.wsdlgenBean=wsdlgenBean;
@@ -245,8 +245,10 @@
public void next() {
if(txtClass.getText()!=null && isPageComplete()){
switchPanel(CodegenFrame.PANEL_OPTION_B );
- } else
+ } else{
switchPanel(CodegenFrame.PANEL_FIRST_B );
+ setNextButtonEnabled(false);
+ }
}
//back
public void back() {
Modified: webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OptionPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OptionPanel.java?view=diff&rev=560153&r1=560152&r2=560153
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OptionPanel.java (original)
+++ webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OptionPanel.java Fri Jul 27 01:53:22 2007
@@ -30,8 +30,7 @@
/**
* this is the first panel of java2wsdl wizard
*/
-public class
- OptionPanel extends WizardPanel{
+public class OptionPanel extends WizardPanel{
/**
* variable
*/
@@ -48,7 +47,7 @@
* @param wsdlgenBean
*/
public OptionPanel(WizardComponents wizardComponents,WsdlgenBean wsdlgenBean){
- super(wizardComponents, "Option was choosed");
+ super(wizardComponents, "Axis2 Idea Plugin Java2WSDL Wizards");
setPanelTopTitle("Java to WSDL Options");
setPanelBottomTitle("Set the Option for the generation");
this.wsdlgenBean=wsdlgenBean;
@@ -143,6 +142,8 @@
txtSchemaTargetNspPrefix.setText(wsdlgenBean.getSchemaTargetNamespacePrefix());
if(wsdlgenBean.getServiceName()!=null )
txtService.setText(wsdlgenBean.getServiceName());
+ ((OutputPanel)getWizardComponents().getWizardPanel(CodegenFrame.PANEL_LAST_B)).loadCmbCurrentProject();
+ ((OutputPanel)getWizardComponents().getWizardPanel(CodegenFrame.PANEL_LAST_B)).loadcmbModuleSrcProject();
setBackButtonEnabled(true);
setNextButtonEnabled(true);
setFinishButtonEnabled(false);
Modified: webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OutputPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OutputPanel.java?view=diff&rev=560153&r1=560152&r2=560153
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OutputPanel.java (original)
+++ webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/java2wsdl/OutputPanel.java Fri Jul 27 01:53:22 2007
@@ -41,10 +41,14 @@
private JComboBox cmbModuleSrc;
private JTextField txtLocation;
private JTextField txtFileName;
+ private JLabel lblModule;
+ private JLabel lblDirect;
+ private JLabel lblOutput;
private JButton btnBrowes;
final JFileChooser DirChooser=new JFileChooser();
private Project project;
private WsdlgenBean wsdlgenBean;
+ private boolean flag = true;
/**
* Constructor
@@ -53,7 +57,7 @@
* @param project
*/
public OutputPanel(WizardComponents wizardComponents,WsdlgenBean wsdlgenBean, Project project){
- super(wizardComponents, "Option was choosed");
+ super(wizardComponents, "Axis2 Idea Plugin Java2WSDL Wizards");
setPanelTopTitle("WSDl file output location");
setPanelBottomTitle("Select the location for the generated WSDL");
this.wsdlgenBean=wsdlgenBean;
@@ -62,57 +66,75 @@
}
private void init(){
- rbtnAdd =new JRadioButton("Browes and Add the WSDL to a project on current Idea workspace",false);
+ rbtnAdd =new JRadioButton("Browes and Add the WSDL to a project on current Idea workspace",true);
- rbtnSave =new JRadioButton("Browes and Save the WSDL file on local file system",true);
+ rbtnSave =new JRadioButton("Browes and Save the WSDL file on local file system",false);
cmbCurrentProject =new JComboBox();
- cmbCurrentProject.setEnabled(false);
+ cmbCurrentProject.setEnabled(true);
cmbModuleSrc=new JComboBox();
- cmbModuleSrc.setEnabled(false);
+ cmbModuleSrc.setEnabled(true);
ButtonGroup buttonGroup= new ButtonGroup();
buttonGroup.add(rbtnAdd );
buttonGroup.add(rbtnSave );
- txtFileName =new JTextField();
+ txtFileName =new JTextField("service.wsdl");
txtLocation=new JTextField();
btnBrowes=new JButton("Browse..");
+ lblOutput=new JLabel("OutPut Location");
+ lblModule=new JLabel("Select the Module");
+ lblModule.setEnabled(false);
+ lblDirect=new JLabel("Select the Directory");
+ lblDirect.setEnabled(false);
setBackButtonEnabled(true);
setNextButtonEnabled(false);
setFinishButtonEnabled(false);
this.setLayout(new GridBagLayout());
+ this.add(new JLabel("OutPut File Name")
+ , new GridBagConstraints(0, 0, 1, 1, 0.1, 0.0
+ , GridBagConstraints.WEST , GridBagConstraints.NONE
+ , new Insets(5, 10, 0, 0), 0, 0));
+
+ this.add(txtFileName
+ , new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0
+ , GridBagConstraints.WEST , GridBagConstraints.HORIZONTAL
+ , new Insets(5, 10, 0, 0), 0, 0));
+
+
this.add(new JLabel("Select the location where to put the output")
- , new GridBagConstraints(0, 0, GridBagConstraints.REMAINDER, 1, 0.0, 0.0
+ , new GridBagConstraints(0, 1, GridBagConstraints.REMAINDER, 1, 0.0, 0.0
, GridBagConstraints.WEST , GridBagConstraints.NONE
, new Insets(5, 10, 0, 10), 0, 0));
this.add(rbtnAdd
- , new GridBagConstraints(0, 1, GridBagConstraints.REMAINDER, 1, 0.0, 0.0
+ , new GridBagConstraints(0, 2, GridBagConstraints.REMAINDER, 1, 0.0, 0.0
, GridBagConstraints.WEST , GridBagConstraints.NONE
, new Insets(5, 10, 0,10), 0, 0));
rbtnAdd.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
- loadCmbCurrentProject();
cmbCurrentProject.setEnabled(true);
cmbModuleSrc.setEnabled(true);
- txtLocation.setEnabled(false);
+ lblModule.setEnabled(true);
+ txtLocation .setEnabled(false);
btnBrowes.setEnabled(false);
- setFinishButtonEnabled(true);
+ loadCmbCurrentProject();
+ loadcmbModuleSrcProject();
+ setFinishButtonEnabled(true);
update();
}
});
- this.add(new JLabel("Select the Module")
- , new GridBagConstraints(0, 2, 1, 1, 0.1, 0.0
+ this.add(lblModule
+ , new GridBagConstraints(0, 3, 1, 1, 0.1, 0.0
, GridBagConstraints.WEST , GridBagConstraints.NONE
, new Insets(5, 10, 0, 0), 0, 0));
this.add(cmbCurrentProject
- , new GridBagConstraints(1, 2, GridBagConstraints.RELATIVE, 1, 1.0, 0.0
+ , new GridBagConstraints(1, 3, GridBagConstraints.RELATIVE, 1, 1.0, 0.0
, GridBagConstraints.WEST , GridBagConstraints.HORIZONTAL
, new Insets(5, 10, 0,0), 0, 0));
cmbCurrentProject.addActionListener(new ActionListener() {
@@ -121,47 +143,48 @@
update();
}
});
- this.add(new JLabel("Select the Directory")
- , new GridBagConstraints(0, 3, 1, 1, 0.1, 0.0
+ this.add(lblDirect
+ , new GridBagConstraints(0, 4, 1, 1, 0.1, 0.0
, GridBagConstraints.WEST , GridBagConstraints.NONE
, new Insets(5, 10, 0, 0), 0, 0));
this.add(cmbModuleSrc
- , new GridBagConstraints(1, 3, GridBagConstraints.RELATIVE, 1, 1.0, 0.0
+ , new GridBagConstraints(1, 4, GridBagConstraints.RELATIVE, 1, 1.0, 0.0
, GridBagConstraints.WEST , GridBagConstraints.HORIZONTAL
, new Insets(5, 10, 0,0), 0, 0));
cmbModuleSrc.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
+ public void actionPerformed(ActionEvent e) {
update();
}
});
this.add(rbtnSave
- , new GridBagConstraints(0, 4, GridBagConstraints.REMAINDER, 1, 0.0, 0.0
+ , new GridBagConstraints(0, 5, GridBagConstraints.REMAINDER, 1, 1.0, 0.0
, GridBagConstraints.WEST , GridBagConstraints.NONE
, new Insets(5, 10, 0,0), 0, 0));
rbtnSave.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
cmbCurrentProject.setEnabled(false);
cmbModuleSrc.setEnabled(false);
- txtLocation.setEnabled(true);
+ txtLocation .setEnabled(true);
btnBrowes.setEnabled(true);
+ setEnabledForCustomProject();
update();
}
});
- this.add(new JLabel("OutPut Location")
- , new GridBagConstraints(0, 5, 1, 1, 0.1, 0.0
- , GridBagConstraints.WEST , GridBagConstraints.NONE
+ this.add(lblOutput
+ , new GridBagConstraints(0, 6, 1, 1, 0.1, 1.0
+ , GridBagConstraints.NORTHWEST , GridBagConstraints.NONE
, new Insets(5, 10, 0,0), 0, 0));
this.add(txtLocation
- , new GridBagConstraints(1, 5, 1, 1, 1.0, 0.0
- , GridBagConstraints.WEST , GridBagConstraints.HORIZONTAL
+ , new GridBagConstraints(1, 6, 1, 1, 1.0, 1.0
+ , GridBagConstraints.NORTHWEST , GridBagConstraints.HORIZONTAL
, new Insets(5, 10, 0, 0), 0, 0));
this.add(btnBrowes
- , new GridBagConstraints(2, 5, 1, 1, 0.1, 0.0
- , GridBagConstraints.CENTER , GridBagConstraints.NONE
+ , new GridBagConstraints(2, 6, 1, 1, 0.1, 1.0
+ , GridBagConstraints.NORTHWEST , GridBagConstraints.NONE
, new Insets(5, 10, 0, 10), 0, 0));
btnBrowes.addActionListener(new ActionListener() {
@@ -177,16 +200,6 @@
}
});
- this.add(new JLabel("OutPut File Name")
- , new GridBagConstraints(0, 6, 1, 1, 0.1, 1.0
- , GridBagConstraints.NORTHWEST , GridBagConstraints.NONE
- , new Insets(5, 10, 0, 0), 0, 0));
-
- this.add(txtFileName
- , new GridBagConstraints(1, 6, 1, 1, 1.0, 1.0
- , GridBagConstraints.NORTHWEST , GridBagConstraints.HORIZONTAL
- , new Insets(5, 10, 0, 0), 0, 0));
-
wsdlgenBean.setProject(project);
}
@@ -198,6 +211,7 @@
cmbCurrentProject.addItem(modules[count].getName());
}
}else{
+ rbtnSave.setSelected(true);
rbtnAdd.setEnabled(false);
}
}
@@ -212,14 +226,19 @@
cmbModuleSrc.addItem(src[count]);
}
count = src.length;
- }else{
- rbtnAdd.setEnabled(false);
- cmbCurrentProject.setEnabled(false);
- cmbModuleSrc.setEnabled(false);
}
-
-
+ if (flag)
+ {
+ if (count == 0) {
+ flag =false;
+ setEnabledForCustomProject();
+ }
+ else{
+ setEnabledForCurrentProject();
+ }
+ }
}
+
public void back() {
switchPanel(CodegenFrame.PANEL_OPTION_B );
}
@@ -260,5 +279,33 @@
public int getPageType() {
return WizardPanel.JAVA_2_WSDL_TYPE;
}
+ private void setEnabledForCurrentProject(){
+ rbtnAdd.setSelected(true);
+ rbtnAdd.setEnabled(true);
+ cmbCurrentProject.setEnabled(true);
+ cmbModuleSrc.setEnabled(true);
+ lblDirect.setEnabled(true);
+ lblModule .setEnabled(true);
+ rbtnSave.setSelected(false);
+ txtLocation.setEnabled(false);
+ lblOutput .setEnabled(false);
+ btnBrowes.setEnabled(false);
+ }
+ private void setEnabledForCustomProject(){
+ if(flag){
+ rbtnAdd.setEnabled(false);
+ rbtnAdd.setSelected(false);
+ }else{
+ rbtnSave .setEnabled(true);
+ rbtnSave .setSelected(true);
+ }
+ cmbCurrentProject.setEnabled(false);
+ cmbModuleSrc.setEnabled(false);
+ lblDirect.setEnabled(false);
+ lblModule .setEnabled(false);
+ txtLocation .setEnabled(true);
+ lblOutput .setEnabled(true);
+ btnBrowes .setEnabled(true);
+ }
}
-
\ No newline at end of file
+
Modified: webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/CodegenFrame.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/CodegenFrame.java?view=diff&rev=560153&r1=560152&r2=560153
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/CodegenFrame.java (original)
+++ webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/CodegenFrame.java Fri Jul 27 01:53:22 2007
@@ -24,11 +24,14 @@
import org.apache.axis2.tools.idea.ChooserPanel;
import org.apache.axis2.tools.idea.SecondPanel;
import org.apache.axis2.tools.idea.WSDL2JavaOutputPanel;
+//import org.apache.axis2.tools.idea.WSDL2JavaOutputPanel;
import org.apache.axis2.tools.component.Utilities;
import org.apache.axis2.tools.component.WizardPanel;
import org.apache.axis2.tools.java2wsdl.MiddlePanel;
import org.apache.axis2.tools.java2wsdl.OptionPanel;
import org.apache.axis2.tools.java2wsdl.OutputPanel;
+import org.apache.ideaplugin.frames.*;
+import org.apache.ideaplugin.bean.ArchiveBean;
import com.intellij.openapi.project.Project;
/**
@@ -46,19 +49,22 @@
public static final int PANEL_OPTION_B = 4;
public static final int PANEL_LAST_A = 5;
public static final int PANEL_LAST_B = 6;
+ public static final int PANEL_FIRST_C=7;
+ public static final int PANEL_SECOND_C=8;
+ public static final int PANEL_THIRD_C=9;
+ public static final int PANEL_FOURTH_C=10;
+ public static final int PANEL_LOAD_C=11;
+ public static final int PANEL_OPTION_C=12;
+ public static final int PANEL_LAST_C=13;
public CodegenFrame() {
init();
}
private void init() {
- this.setTitle("Axis2 Codegen Wizard");
-
+ this.setTitle("Axis2 Codegen Wizard");
WizardPanel panel = null;
- wsdlgenBean= new WsdlgenBean();
- codegenBean = new CodegenBean();
-
panel = new ChooserPanel(getWizardComponents());
getWizardComponents().addWizardPanel(PANEL_CHOOSER , panel);
@@ -75,13 +81,31 @@
getWizardComponents().addWizardPanel(PANEL_OPTION_B , panel);
panel = new WSDL2JavaOutputPanel(getWizardComponents(),codegenBean,project);
- getWizardComponents().addWizardPanel(PANEL_LAST_A , panel);
+ getWizardComponents().addWizardPanel(PANEL_LAST_A , panel);
panel = new OutputPanel(getWizardComponents(),wsdlgenBean,project);
getWizardComponents().addWizardPanel(PANEL_LAST_B , panel);
- setSize(getPreferredSize());
- Utilities.centerComponentOnScreen(this);
+ panel = new ClassFileLocationPage(getWizardComponents(),archiveBean);
+ getWizardComponents().addWizardPanel(PANEL_FIRST_C , panel);
+
+ panel = new WSDLFileSelectionPage(getWizardComponents(),archiveBean);
+ getWizardComponents().addWizardPanel(PANEL_SECOND_C , panel);
+
+ panel = new LibraryAddingPage(getWizardComponents(),archiveBean);
+ getWizardComponents().addWizardPanel(PANEL_THIRD_C , panel);
+
+ panel = new ServiceXMLFileSelectionPage(getWizardComponents(),archiveBean);
+ getWizardComponents().addWizardPanel(PANEL_FOURTH_C , panel);
+
+ panel = new ServiceXMLGenerationPage(getWizardComponents(),archiveBean);
+ getWizardComponents().addWizardPanel(PANEL_LOAD_C , panel);
+
+ panel = new ServiceXMLEditPage(getWizardComponents(),archiveBean) ;
+ getWizardComponents().addWizardPanel(PANEL_OPTION_C , panel);
+
+ panel = new ServiceArchiveOutputLocationPage(getWizardComponents(),archiveBean);
+ getWizardComponents().addWizardPanel(PANEL_LAST_C , panel);
}
}
Modified: webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/WizardFrame.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/WizardFrame.java?view=diff&rev=560153&r1=560152&r2=560153
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/WizardFrame.java (original)
+++ webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/WizardFrame.java Fri Jul 27 01:53:22 2007
@@ -21,10 +21,13 @@
import org.apache.axis2.tools.component.*;
import org.apache.axis2.tools.bean.WsdlgenBean;
import org.apache.axis2.tools.bean.CodegenBean;
+import org.apache.axis2.tools.bean.SrcCompiler;
import org.apache.axis2.tools.idea.ProgressBarPanel;
import org.apache.axis2.tools.idea.FirstPanel;
import org.apache.axis2.tools.idea.SecondPanel;
import org.apache.axis2.tools.idea.WSDL2JavaOutputPanel;
+import org.apache.ideaplugin.bean.ArchiveBean;
+import org.apache.ideaplugin.bean.JarFileWriter;
import javax.swing.*;
import java.awt.*;
@@ -48,11 +51,10 @@
private JLabel panelImageLabel;
private JLabel panelTopTitleLabel;
private JLabel panelBottomTitleLabel;
- private JLabel errorLabel;
- private JPanel errorPanel;
private WizardComponents wizardComponents;
protected WsdlgenBean wsdlgenBean;
protected CodegenBean codegenBean;
+ protected ArchiveBean archiveBean;
protected Project project;
private ProgressBarPanel progress;
@@ -63,6 +65,10 @@
private void init() {
wizardComponents = new DefaultWizardComponents();
+ wsdlgenBean= new WsdlgenBean();
+ codegenBean = new CodegenBean();
+ archiveBean =new ArchiveBean();
+
this.getContentPane().setLayout(new GridBagLayout());
this.getContentPane().add(createTitlePanel()
@@ -96,8 +102,8 @@
,GridBagConstraints.EAST, GridBagConstraints.NONE,
new Insets(10, 10, 10, 10), 0, 0));
- ImageIcon img=new ImageIcon("icons/icon.png");
- this.setIconImage(img.getImage());
+ java.net.URL resource = WizardPanel.class.getResource("/icons/icon.png");
+ this.setIconImage(new ImageIcon(resource).getImage());
this.setFont(new Font("Helvetica", Font.PLAIN, 8));
wizardComponents.addPropertyChangeListener(new PropertyChangeListener() {
@@ -105,8 +111,7 @@
setPanelTopTitle(((WizardPanel)event.getNewValue()).getPanelTopTitle());
setPanelTitleImage(((WizardPanel)event.getNewValue()).getPanelImage());
setPanelBottomTitle(((WizardPanel)event.getNewValue()).getPanelBottomTitle());
- setErrorVisible(false
- ,((WizardPanel)event.getNewValue()).getError());
+ setTitle(((WizardPanel)event.getNewValue()).getFrameTitle());
}
});
wizardComponents.setFinishAction(createFinishAction());
@@ -124,14 +129,10 @@
public void show() {
wizardComponents.updateComponents();
+ this.setSize(600,600);
+ Utilities.centerComponentOnScreen(this);
super.show();
}
- // set error message
- protected void setErrorVisible(boolean flag ,String error){
- errorLabel.setText(error);
- errorPanel.setVisible(flag);
-
- }
protected void setBottomVisible(boolean flag){
panelBottomTitleLabel.setVisible(flag);
}
@@ -158,22 +159,10 @@
panelTopTitleLabel.setFont(new Font("Helvetica", Font.BOLD, 12));
panelBottomTitleLabel=new JLabel();
+ panelBottomTitleLabel.setFont(new Font("Helvetica", Font.ITALIC, 10));
panelImageLabel= new JLabel();
- errorLabel = new JLabel();
- errorLabel.setVisible(false);
- errorLabel.setBackground(Color.blue);
-
- errorPanel =new JPanel();
- errorPanel .setLayout(new GridBagLayout());
- errorPanel .setBorder(BorderFactory.createLineBorder(Color.black));
-
- errorPanel.add(errorLabel,
- new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
- , GridBagConstraints.CENTER, GridBagConstraints.BOTH
- , new Insets(10, 10, 0, 10), 0, 0));
-
panel.add(panelTopTitleLabel
, new GridBagConstraints(0, 0, 1, 1, 0.5, 0.0
, GridBagConstraints.LINE_START , GridBagConstraints.BOTH
@@ -189,12 +178,6 @@
, GridBagConstraints.CENTER, GridBagConstraints.BOTH
, new Insets(0, 0, 0, 0), 0, 0));
-
- panel.add(errorPanel
- , new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
- , GridBagConstraints.SOUTH, GridBagConstraints.BOTH
- , new Insets(20, 0, 0, 0), 0, 0));
-
return panel;
}
@@ -222,12 +205,17 @@
doFinishJava2WSDL();
System.out.println("FinishAction Java2WSDL performed");
break;
+ case WizardPanel.SERVICE_ARCHIVE_TYPE:
+ doFinishServiceArchive();
+ System.out.println("FinishAction Servcie Archive performed");
+ break;
case WizardPanel.UNSPECIFIED_TYPE:
break; //Do nothing
default:
throw new RuntimeException("Invalid state!");
}
} catch (Exception e) {
+ wizardComponents.setCurrentIndex(CodegenFrame.PANEL_CHOOSER);
dispose();
}
@@ -238,6 +226,7 @@
protected CancelAction createCancelAction() {
return new CancelAction(wizardComponents) {
public void performAction() {
+ wizardComponents.setCurrentIndex(CodegenFrame.PANEL_CHOOSER);
System.out.println("CancelAction performed");
dispose();
}
@@ -245,6 +234,7 @@
}
protected void handleWindowClosing() {
+ wizardComponents.setCurrentIndex(CodegenFrame.PANEL_CHOOSER);
this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
this.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
@@ -271,6 +261,7 @@
"Code genaration Successful !" + writer.toString(),
"Axis2 code generation",
JOptionPane.INFORMATION_MESSAGE );
+ wizardComponents.setCurrentIndex(CodegenFrame.PANEL_CHOOSER);
dispose();
}
@@ -351,8 +342,8 @@
}
protected void doFinishWSDL2Java(){
handlePragress();
- new java.util.Timer(true).schedule(new TimerTask() {
- public void run() {
+ new java.util.Timer(true).schedule(new TimerTask() {
+ public void run() {
try {
FirstPanel first=(FirstPanel)wizardComponents.getWizardPanel(1);
SecondPanel option=(SecondPanel)wizardComponents.getWizardPanel(3);
@@ -382,24 +373,81 @@
codegenBean.setOutput(output.getOutputLocation());
codegenBean.setNamespace2packageList(option.getNs2PkgMapping());
codegenBean.setWSDLFileName(first.getWSDLFileName());
- codegenBean.generate();
+ codegenBean.generate();
+ //Add the codegen libs that are coming with the plugin to the project lib that has been created
+ if (output.getAxis2PluginLibCopyCheckBoxSelection()){
+ java.net.URL resource = WizardPanel.class.getResource("/icons/icon.png");
+ String path =new File(resource.getPath()).getParentFile().getParentFile().getParentFile().getPath();
+ System.out.println(path);
+ String pluginLibLocation = path+File.separator+"lib";
+ addLibsToProjectLib(pluginLibLocation, output.getOutputLocation());
+ }
+
+ //Add the libraries on the plugin lib directory to the created project lib
+ if (output.getAxisLibCopyCheckBoxSelection() && output.oktoLoadLibs()){
+ String libDirectory = output.getAxisJarsLocation();
+ addLibsToProjectLib(libDirectory, output.getOutputLocation());
+ }
+
+ //This will Create a jar file from the codegen results and add to the output
+ //locations lib directory
+ if (output.getCreateJarCheckBoxSelection()){
+ File tempClassFile=codegenBean.getTemp();
+ tempClassFile.mkdir();
+ File srcTemp=new File(tempClassFile.getPath()+File.separator+"src");
+ srcTemp.mkdir();
+ copyDirectory(new File(output.getOutputLocation()+File.separator+"src"),srcTemp);
+ //Compile the source to another directory
+ SrcCompiler srcCompileTool = new SrcCompiler();
+ srcCompileTool.compileSource(tempClassFile.getPath());
+ //create the jar file and add that to the lib directory
+ String projectLib = output.getOutputLocation()+File.separator+"lib";
+ JarFileWriter jarFileWriter = new JarFileWriter();
+ String jarFileName = "CodegenResults.jar";
+ if (!output.getJarFilename().equals("")){
+ jarFileName=output.getJarFilename();
+ }
+ output.setJarFileName(jarFileName);
+ File tempClass = new File(tempClassFile.getPath()+File.separator+"classes");
+ jarFileWriter.writeJarFile(new File(projectLib), jarFileName, tempClass);
+
+ //Delete the temp folders
+ deleteDir(tempClassFile );
+
+ }
progress.setVisible(false);
handleSuccess();
}catch (Exception e1) {
+ e1.printStackTrace();
progress.setVisible(false);
handleError();
}
}
- }, 1000);
+ }, 5000);
}
protected void doFinishJava2WSDL(){
handlePragress();
new java.util.Timer(true).schedule(new TimerTask() {
- public void run() {
+ public void run() {
try {
wsdlgenBean.generate();
+ progress.setVisible(false);
+ handleSuccess();
+ } catch (Exception e1) {
+ progress.setVisible(false);
+ handleError();
+ }
+ }
+ }, 3100);
+ }
+ protected void doFinishServiceArchive(){
+ handlePragress();
+ new java.util.Timer(true).schedule(new TimerTask() {
+ public void run() {
+ try {
+ archiveBean.finsh();
progress.setVisible(false);
handleSuccess();
} catch (Exception e1) {
Modified: webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ArchiveBean.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ArchiveBean.java?view=diff&rev=560153&r1=560152&r2=560153
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ArchiveBean.java (original)
+++ webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ArchiveBean.java Fri Jul 27 01:53:22 2007
@@ -38,20 +38,15 @@
private File classLoc;
private ClassLoader classLoader;
private String ServiceXML;
-
public String fileSeparator = System.getProperty("file.separator");
-
private ArrayList libs = new ArrayList();
private ArrayList tempLibs = new ArrayList();
private ArrayList tempWsdls = new ArrayList();
-
-
private ArrayList wsdls = new ArrayList();
-
private String outPath;
private String archiveName;
private ArrayList servicelsit = new ArrayList();
-
+ private boolean includeClass=false;
public ArrayList getTempWsdls() {
return tempWsdls;
@@ -139,8 +134,8 @@
return wsdls;
}
- public void addWsdls(ArrayList wsdls) {
- this.wsdls.addAll(wsdls);
+ public void addWsdls(File wsdl) {
+ this.wsdls.add(wsdl);
}
public String getOutPath() {
@@ -158,6 +153,13 @@
public void setArchiveName(String archiveName) {
this.archiveName = archiveName;
}
+ public void setIncludeClass(boolean includeClass){
+ this.includeClass=includeClass;
+ }
+ public boolean getIncludeClass(){
+ return this.includeClass;
+ }
+
public void finsh() throws Exception {
//Creating out File
@@ -181,9 +183,13 @@
//Coping class files
FileCopier fc = new FileCopier();
- for (int count=0;count<classLocation.size();count++)
- fc.copyFiles((File)classLocation.get(count), tempfile, null);
-
+ if(includeClass){
+ for (int count=0;count<classLocation.size();count++)
+ fc.copyFiles((File)classLocation.get(count), tempfile, ".class");
+ }else{
+ for (int count=0;count<classLocation.size();count++)
+ fc.copyFiles((File)classLocation.get(count), tempfile, null);
+ }
// Coping wsdl files
File lib = new File(tempfile, "lib");
if (!lib.exists()) {
@@ -192,16 +198,16 @@
if (libs!=null)
{
for (int i = 0; i < libs.size(); i++) {
- String libname = (String) libs.get(i);
- fc.copyFiles(new File(libname), lib, null);
+ String libname = (String) libs.get(i);
+ fc.copyFiles(new File(libname), lib, null);
}
}
//coping wsdl files
if (wsdls!=null)
for (int i = 0; i < wsdls.size(); i++) {
- String libname = (String) wsdls.get(i);
- fc.copyFiles(new File(libname), metainf, null);
+ File libname = (File)wsdls.get(i);
+ fc.copyFiles(libname, metainf, null);
}
String arcivename = getArchiveName();
@@ -212,7 +218,6 @@
jwriter.writeJarFile(outFile, arcivename, tempfile);
//craeting the jar file
deleteDir(tempfile);
-//
} catch (Exception e) {
throw e;
Modified: webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ServiceObj.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ServiceObj.java?view=diff&rev=560153&r1=560152&r2=560153
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ServiceObj.java (original)
+++ webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ServiceObj.java Fri Jul 27 01:53:22 2007
@@ -50,18 +50,24 @@
public String toString() {
String serviceXML = "<service name=\"" + serviceName + "\" >\n" +
- "<description>\n" +
- "Please Type your service description here\n" +
- "</description>\n" +
- "<parameter name=\"ServiceClass\" locked=\"false\">" + serviceClass + "</parameter>\n";
+ " <description>\n" +
+ " Please Type your service description here\n" +
+ " </description>\n" +
+ " <messageReceivers>\n"+
+ " <messageReceiver mep=\"http://www.w3.org/2004/08/wsdl/in-only\" \n"+
+ " class=\"org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver\" />\n "+
+ " <messageReceiver mep=\"http://www.w3.org/2004/08/wsdl/in-out\"\n " +
+ " class=\"org.apache.axis2.rpc.receivers.RPCMessageReceiver\" /> \n" +
+ " </messageReceivers>\n "+
+ " <parameter name=\"ServiceClass\" locked=\"false\">" + serviceClass + "</parameter>\n";
if (operations.size() > 0) {
- serviceXML = serviceXML + "<excludeOperations>\n";
+ serviceXML = serviceXML + " <excludeOperations>\n";
for (int i = 0; i < operations.size(); i++) {
String s = (String) operations.get(i);
- String op = "<operation>" + s + "</operation>\n";
+ String op = " <operation>" + s + "</operation>\n";
serviceXML = serviceXML + op;
}
- serviceXML = serviceXML + "</excludeOperations>\n";
+ serviceXML = serviceXML + " </excludeOperations>\n";
}
serviceXML = serviceXML + "</service>\n";
return serviceXML;
Modified: webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/plugin/Axis2IdeaPlugin.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/plugin/Axis2IdeaPlugin.java?view=diff&rev=560153&r1=560152&r2=560153
==============================================================================
--- webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/plugin/Axis2IdeaPlugin.java (original)
+++ webservices/axis2/branches/java/1_3/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/plugin/Axis2IdeaPlugin.java Fri Jul 27 01:53:22 2007
@@ -22,13 +22,13 @@
import com.intellij.openapi.options.Configurable;
import com.intellij.openapi.options.ConfigurationException;
import com.intellij.openapi.project.Project;
-import org.apache.ideaplugin.frames.Axi2PluginPage;
+import org.apache.axis2.tools.wizardframe.CodegenFrame;
import javax.swing.*;
import javax.xml.stream.XMLInputFactory;
public class Axis2IdeaPlugin implements ApplicationComponent, Configurable {
- private Axi2PluginPage form;
+ private CodegenFrame form;
private ImageIcon myIcon;
/**
@@ -45,8 +45,8 @@
}
if (form == null) {
- form = new Axi2PluginPage();
- form.setResizable(false);
+ form = new CodegenFrame();
+ form.setResizable(true);
form.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
if (myIcon == null) {
@@ -85,7 +85,7 @@
public JComponent createComponent() {
if (form == null) {
- form = new Axi2PluginPage();
+ form = new CodegenFrame();
}
return form.getRootComponent();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org