Author: snjeza
Date: 2012-05-16 14:01:10 -0400 (Wed, 16 May 2012)
New Revision: 41076
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
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/NewProjectExamplesReadyPage.java
Log:
JBIDE-11888 - Problems with opening readme.md
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
===================================================================
---
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java 2012-05-16
17:48:28 UTC (rev 41075)
+++
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java 2012-05-16
18:01:10 UTC (rev 41076)
@@ -36,7 +36,6 @@
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
import org.apache.commons.lang.StringEscapeUtils;
import org.eclipse.core.filesystem.EFS;
@@ -136,7 +135,6 @@
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
/**
* The activator class controls the plug-in life cycle
@@ -662,12 +660,15 @@
return editorDesc;
}
+
public static void fixWelcome(ProjectExample project) {
- if (project == null || project.isWelcome()) {
+ if (project == null) {
return;
}
+ if (!project.isWelcomeFixRequired()) {
+ return;
+ }
checkCheatsheet(project);
-
}
protected static void checkCheatsheet(ProjectExample project) {
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-05-16
17:48:28 UTC (rev 41075)
+++
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExample.java 2012-05-16
18:01:10 UTC (rev 41076)
@@ -39,6 +39,7 @@
private boolean welcome;
private String type;
private String welcomeURL;
+ private boolean welcomeFixRequired = true;
private List<ProjectFix> fixes = new ArrayList<ProjectFix>();
private List<ProjectFix> unsatisfiedFixes;
private String perspectiveId;
@@ -344,4 +345,12 @@
public Set<String> getEssentialEnterpriseDependencyGavs() {
return essentialEnterpriseDependencies;
}
+
+ public boolean isWelcomeFixRequired() {
+ return welcomeFixRequired;
+ }
+
+ public void setWelcomeFixRequired(boolean welcomeFixRequired) {
+ this.welcomeFixRequired = welcomeFixRequired;
+ }
}
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-05-16
17:48:28 UTC (rev 41075)
+++
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExampleUtil.java 2012-05-16
18:01:10 UTC (rev 41076)
@@ -381,6 +381,7 @@
.log(Messages.ProjectUtil_Invalid_welcome_element);
} else {
project.setWelcomeURL(attribute.trim());
+ project.setWelcomeFixRequired(false);
}
} else if (nodeName.equals("mavenArchetype")) { //$NON-NLS-1$
parseMavenArchetype(project, child);
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesReadyPage.java
===================================================================
---
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesReadyPage.java 2012-05-16
17:48:28 UTC (rev 41075)
+++
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesReadyPage.java 2012-05-16
18:01:10 UTC (rev 41076)
@@ -119,6 +119,7 @@
setTitle(projectExample.getShortDescription());
setDescription("'" + projectExample.getShortDescription() + "'
Project is now ready");
if (showReadme != null) {
+ ProjectExamplesActivator.fixWelcome(projectExample);
if (projectExample.isWelcome()) {
showReadme.setEnabled(true);
showReadme.setSelection(store.getBoolean(ProjectExamplesActivator.SHOW_README));
Show replies by date