Revision 32636 branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/creation/wizard/AntScriptWizard.java
AntScriptWizard.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
package org.gvsig.installer.swing.impl.creation.wizard; |
29 | 29 |
|
30 |
import java.io.ByteArrayInputStream; |
|
31 |
|
|
30 | 32 |
import javax.swing.JPanel; |
33 |
import javax.xml.parsers.DocumentBuilder; |
|
34 |
import javax.xml.parsers.DocumentBuilderFactory; |
|
31 | 35 |
|
32 | 36 |
import org.gvsig.installer.lib.api.PackageInfo; |
33 | 37 |
import org.gvsig.installer.lib.api.creation.MakePluginPackageService; |
34 | 38 |
import org.gvsig.installer.lib.api.creation.MakePluginPackageServiceException; |
35 | 39 |
import org.gvsig.installer.swing.impl.InstallerWizardPanel; |
40 |
import org.gvsig.installer.swing.impl.NotContinueWizardException; |
|
36 | 41 |
import org.gvsig.installer.swing.impl.creation.DefaultMakePluginPackageWizard; |
37 | 42 |
import org.gvsig.installer.swing.impl.creation.panel.AntScriptPanel; |
38 | 43 |
import org.slf4j.Logger; |
... | ... | |
63 | 68 |
|
64 | 69 |
} |
65 | 70 |
|
66 |
public void nextPanel() { |
|
71 |
public void nextPanel() throws NotContinueWizardException { |
|
72 |
DocumentBuilder documentBuilder; |
|
73 |
try { |
|
74 |
documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); |
|
75 |
documentBuilder.parse(new ByteArrayInputStream(getAntScript().getBytes())); |
|
76 |
} catch (Exception e) { |
|
77 |
throw new NotContinueWizardException("not_valid_xml", e, installerCreationWizard); |
|
78 |
} |
|
67 | 79 |
PackageInfo packageInfo = installerCreationWizard.getSelectedPackageInfo(); |
68 | 80 |
packageInfo.setAnScript(getAntScript()); |
69 | 81 |
} |
Also available in: Unified diff