Author: snjeza
Date: 2009-03-10 17:58:14 -0400 (Tue, 10 Mar 2009)
New Revision: 14160
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamProjectPropertyValidator.java
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/MarkerResolutionGenerator.java
Log:
JBIDE-3979 Seam markers have invalid type
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamProjectPropertyValidator.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamProjectPropertyValidator.java 2009-03-10
21:49:25 UTC (rev 14159)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamProjectPropertyValidator.java 2009-03-10
21:58:14 UTC (rev 14160)
@@ -43,7 +43,7 @@
public class SeamProjectPropertyValidator implements IValidatorJob {
protected static final String VALIDATING_PROJECT = "VALIDATING_PROJECT";
- protected static final String INVALID_SEAM_RUNTIME = "INVALID_SEAM_RUNTIME";
+ public static final String INVALID_SEAM_RUNTIME = "INVALID_SEAM_RUNTIME";
protected static final String INVALID_WEBFOLDER = "INVALID_WEBFOLDER";
protected static final String INVALID_PARENT_PROJECT =
"INVALID_PARENT_PROJECT";
protected static final String INVALID_EJB_PROJECT = "INVALID_EJB_PROJECT";
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2009-03-10 21:49:25 UTC (rev
14159)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2009-03-10 21:58:14 UTC (rev
14160)
@@ -102,10 +102,10 @@
point="org.eclipse.wst.common.project.facet.ui.wizardPages">
<wizard-pages action="jst.seam.1.2.install">
<page
class="org.jboss.tools.seam.ui.internal.project.facet.SeamInstallWizardPage"/>
- </wizard-pages>
- <wizard-pages action="jst.seam.2.0.install">
- <page
class="org.jboss.tools.seam.ui.internal.project.facet.SeamInstallWizardPage"/>
</wizard-pages>
+ <wizard-pages action="jst.seam.2.0.install">
+ <page
class="org.jboss.tools.seam.ui.internal.project.facet.SeamInstallWizardPage"/>
+ </wizard-pages>
<wizard-pages action="jst.seam.2.1.install">
<page
class="org.jboss.tools.seam.ui.internal.project.facet.SeamInstallWizardPage"/>
</wizard-pages>
@@ -145,7 +145,7 @@
</newWizardShortcut>
<newWizardShortcut
id="org.jboss.tools.seam.ui.wizard.SeamGenerateEnitiesWizard">
- </newWizardShortcut>
+ </newWizardShortcut>
<actionSet id="org.hibernate.eclipse.launch.actionset"/>
<perspectiveShortcut
id="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective">
@@ -165,7 +165,7 @@
<actionSet
id="org.eclipse.debug.ui.breakpointActionSet">
</actionSet>
- <actionSet
id="org.eclipse.wst.server.ui.internal.webbrowser.actionSet"/>
+ <actionSet
id="org.eclipse.wst.server.ui.internal.webbrowser.actionSet"/>
</perspectiveExtension>
</extension>
@@ -391,23 +391,23 @@
</contenttype>
</contentAssistProcessor>
</extension>
-
- <extension
- point="org.eclipse.ui.popupMenus">
- <!-- TODO: We should either remove this or move it to a not so prominient place
in the final release -->
- <objectContribution
- adaptable="true"
- id="org.jboss.tools.seam.ui.enableSeamAction"
- nameFilter="*"
- objectClass="org.eclipse.core.resources.IProject">
- <!--action
- class="org.jboss.tools.seam.ui.builder.ToggleSeamNatureAction"
- enablesFor="+"
- id="org.jboss.tools.seam.ui.addRemoveSeamNatureAction"
- label="Add/Remove Seam support"
- menubarPath="additions">
- </action-->
- </objectContribution>
+
+ <extension
+ point="org.eclipse.ui.popupMenus">
+ <!-- TODO: We should either remove this or move it to a not so prominient place
in the final release -->
+ <objectContribution
+ adaptable="true"
+ id="org.jboss.tools.seam.ui.enableSeamAction"
+ nameFilter="*"
+ objectClass="org.eclipse.core.resources.IProject">
+ <!--action
+ class="org.jboss.tools.seam.ui.builder.ToggleSeamNatureAction"
+ enablesFor="+"
+ id="org.jboss.tools.seam.ui.addRemoveSeamNatureAction"
+ label="Add/Remove Seam support"
+ menubarPath="additions">
+ </action-->
+ </objectContribution>
</extension>
<extension point="org.eclipse.ui.preferencePages">
@@ -535,7 +535,7 @@
<extension point="org.eclipse.ui.ide.markerResolution">
<markerResolutionGenerator
class="org.jboss.tools.seam.ui.marker.MarkerResolutionGenerator"
- markerType="org.jboss.tools.seam.core.seamProjectProblem"/>
+ markerType="org.eclipse.wst.validation.problemmarker"/>
</extension>
<!-- Refactorng -->
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/MarkerResolutionGenerator.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/MarkerResolutionGenerator.java 2009-03-10
21:49:25 UTC (rev 14159)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/marker/MarkerResolutionGenerator.java 2009-03-10
21:58:14 UTC (rev 14160)
@@ -3,11 +3,23 @@
import org.eclipse.core.resources.IMarker;
import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.IMarkerResolutionGenerator2;
+import org.jboss.tools.seam.internal.core.validation.SeamProjectPropertyValidator;
public class MarkerResolutionGenerator implements IMarkerResolutionGenerator2 {
+ /** Copied from org.eclipse.wst.validation.internal.TaskListUtility */
+ private static final String VALIDATION_MARKER_MESSAGEID = "messageId";
//$NON-NLS-1$
+
+
public boolean hasResolutions(IMarker marker) {
- return true;
+ if (marker == null) {
+ return false;
+ }
+ String runtime = marker.getAttribute(VALIDATION_MARKER_MESSAGEID, "");
+ if (SeamProjectPropertyValidator.INVALID_SEAM_RUNTIME.equals(runtime)) {
+ return true;
+ }
+ return false;
}
public IMarkerResolution[] getResolutions(IMarker marker) {
Show replies by date