[jbosstools-commits] JBoss Tools SVN: r43705 - in trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples: wizard and 1 other directory.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Fri Sep 14 14:45:57 EDT 2012
Author: snjeza
Date: 2012-09-14 14:45:57 -0400 (Fri, 14 Sep 2012)
New Revision: 43705
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExample.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExampleUtil.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesMainPage.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesRequirementsPage.java
Log:
JBIDE-12616 - Project examples have disabled Finish button
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExample.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExample.java 2012-09-14 18:38:19 UTC (rev 43704)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExample.java 2012-09-14 18:45:57 UTC (rev 43705)
@@ -27,6 +27,7 @@
public class ProjectExample implements ProjectModelElement,
Comparable<ProjectExample> {
+ public static final String IMPORT_TYPE_ZIP = "zip"; //$NON-NLS-1$
private static final String SEP = "/"; //$NON-NLS-1$
private static String[] PREFIXES = { "file:", "http:", "https:", "ftp:" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
private String name;
@@ -62,7 +63,7 @@
url = ""; //$NON-NLS-1$
welcome = false;
perspectiveId = null;
- importType = "zip";
+ importType = IMPORT_TYPE_ZIP;
setCategory(ProjectExampleCategory.OTHER);
}
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExampleUtil.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExampleUtil.java 2012-09-14 18:38:19 UTC (rev 43704)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExampleUtil.java 2012-09-14 18:45:57 UTC (rev 43705)
@@ -77,7 +77,7 @@
*/
public class ProjectExampleUtil {
- private static final String SERVER_PROJECT_EXAMPLE_XML = ".project_example.xml";
+ private static final String SERVER_PROJECT_EXAMPLE_XML = ".project_example.xml"; //$NON-NLS-1$
private static final String URL = "url"; //$NON-NLS-1$
@@ -476,9 +476,9 @@
if (path != null) {
project.setIconPath(path);
}
- } else if (nodeName.equals("essentialEnterpriseDependencies")) {
+ } else if (nodeName.equals("essentialEnterpriseDependencies")) { //$NON-NLS-1$
parseEssentialEnterpriseDependencies(project, child);
- } else if (nodeName.equals("stacksId")) {
+ } else if (nodeName.equals("stacksId")) { //$NON-NLS-1$
String stacksId = child.getAttribute("stacksId"); //$NON-NLS-1$
if (stacksId != null) {
project.setStacksId(stacksId);
@@ -795,11 +795,11 @@
if (monitor.isCanceled()) {
return null;
}
- BufferedOutputStream destination = new BufferedOutputStream(
- new FileOutputStream(file));
if (monitor.isCanceled()) {
return null;
}
+ BufferedOutputStream destination = new BufferedOutputStream(
+ new FileOutputStream(file));
IStatus result = getTransport().download(prefix,
url.toExternalForm(), destination, monitor);
if (!result.isOK()) {
@@ -929,7 +929,7 @@
@Override
public Tuple<IProjectExampleSite, Document> call() throws Exception {
URL url = tuple.key.getUrl();
- File file = getProjectExamplesFile(url, "projectExamples", ".xml", new NullProgressMonitor());
+ File file = getProjectExamplesFile(url, "projectExamples", ".xml", new NullProgressMonitor()); //$NON-NLS-1$ //$NON-NLS-2$
if(file == null || !file.exists() || !file.isFile()) {
ProjectExamplesActivator.log(NLS.bind(Messages.ProjectUtil_Invalid_URL, url.toString()));
return tuple;
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesMainPage.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesMainPage.java 2012-09-14 18:38:19 UTC (rev 43704)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesMainPage.java 2012-09-14 18:45:57 UTC (rev 43705)
@@ -462,7 +462,7 @@
canFinish=true;
ProjectExample project = (ProjectExample) object;
String importType = project.getImportType();
- if (importType != null && importType.length() > 0) {
+ if (!ProjectExample.IMPORT_TYPE_ZIP.equals(importType) && importType != null && importType.length() > 0) {
IImportProjectExample importProjectExample = ProjectExamplesActivator.getDefault().getImportProjectExample(importType);
if (importProjectExample == null) {
// FIXME
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesRequirementsPage.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesRequirementsPage.java 2012-09-14 18:38:19 UTC (rev 43704)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesRequirementsPage.java 2012-09-14 18:45:57 UTC (rev 43705)
@@ -614,7 +614,7 @@
@Override
public String getProjectExampleType() {
- return "zip";
+ return ProjectExample.IMPORT_TYPE_ZIP;
}
@Override
More information about the jbosstools-commits
mailing list