Author: scabanovich
Date: 2011-05-31 20:09:34 -0400 (Tue, 31 May 2011)
New Revision: 31707
Added:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.classpath
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.project
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/.jsdtscope
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.jdt.core.prefs
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.wst.common.component
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/JavaSource/
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/WebContent/
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/validation/BuilderOrderMarkerResolutionTest.java
Modified:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/META-INF/MANIFEST.MF
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/MyFaces/.project
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/MyFaces2/.project
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/JstWebKbAllTests.java
Log:
JBIDE-9028
https://issues.jboss.org/browse/JBIDE-9028
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/META-INF/MANIFEST.MF 2011-05-31
23:57:29 UTC (rev 31706)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/META-INF/MANIFEST.MF 2011-06-01
00:09:34 UTC (rev 31707)
@@ -15,7 +15,8 @@
org.jboss.tools.common.model.test,
org.jboss.tools.common,
org.eclipse.jst.standard.schemas,
- org.eclipse.wst.validation
+ org.eclipse.wst.validation,
+ org.eclipse.ui.ide
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: %Bundle-Vendor.0
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/MyFaces/.project
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/MyFaces/.project 2011-05-31
23:57:29 UTC (rev 31706)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/MyFaces/.project 2011-06-01
00:09:34 UTC (rev 31707)
@@ -21,12 +21,12 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/MyFaces2/.project
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/MyFaces2/.project 2011-05-31
23:57:29 UTC (rev 31706)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/MyFaces2/.project 2011-06-01
00:09:34 UTC (rev 31707)
@@ -21,12 +21,12 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
Added:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.classpath
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.classpath
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.classpath 2011-06-01
00:09:34 UTC (rev 31707)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="JavaSource"/>
+ <classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con"
path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss
4.2 Runtime">
+ <attributes>
+ <attribute name="owner.project.facets" value="jst.web"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER">
+ <attributes>
+ <attribute name="owner.project.facets" value="jst.java"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output"
path="WebContent/WEB-INF/classes"/>
+</classpath>
\ No newline at end of file
Property changes on:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.project
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.project
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.project 2011-06-01
00:09:34 UTC (rev 31707)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>TestBrokenBuilderOrder</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.jboss.tools.jsf.jsfnature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
+ </natures>
+</projectDescription>
Property changes on:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/.jsdtscope
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/.jsdtscope
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/.jsdtscope 2011-06-01
00:09:34 UTC (rev 31707)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.jdt.core.prefs 2011-06-01
00:09:34 UTC (rev 31707)
@@ -0,0 +1,7 @@
+#Thu Jun 04 11:17:46 MSD 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.wst.common.component
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.wst.common.component
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.wst.common.component 2011-06-01
00:09:34 UTC (rev 31707)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="TestBrokenBuilderOrder">
+<wb-resource deploy-path="/" source-path="/WebContent"/>
+<wb-resource deploy-path="/WEB-INF/classes"
source-path="/JavaSource"/>
+<property name="context-root" value="TestBrokenBuilderOrder"/>
+<property name="java-output-path"/>
+</wb-module>
+</project-modules>
Added:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.wst.common.project.facet.core.xml
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.wst.common.project.facet.core.xml 2011-06-01
00:09:34 UTC (rev 31707)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="JBoss 4.2 Runtime"/>
+ <fixed facet="jst.web"/>
+ <fixed facet="jst.java"/>
+ <installed facet="jst.java" version="6.0"/>
+ <installed facet="jst.web" version="2.5"/>
+</faceted-project>
Property changes on:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.wst.jsdt.ui.superType.container
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.wst.jsdt.ui.superType.container 2011-06-01
00:09:34 UTC (rev 31707)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.wst.jsdt.ui.superType.name
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestBrokenBuilderOrder/.settings/org.eclipse.wst.jsdt.ui.superType.name 2011-06-01
00:09:34 UTC (rev 31707)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Modified:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/JstWebKbAllTests.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/JstWebKbAllTests.java 2011-05-31
23:57:29 UTC (rev 31706)
+++
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/JstWebKbAllTests.java 2011-06-01
00:09:34 UTC (rev 31707)
@@ -14,6 +14,7 @@
import junit.framework.TestSuite;
import org.jboss.tools.common.model.util.test.XProjectImportTestSetUp;
+import org.jboss.tools.jst.web.kb.test.validation.BuilderOrderMarkerResolutionTest;
import org.jboss.tools.jst.web.kb.test.validation.KBValidationTest;
import org.jboss.tools.test.util.ProjectImportTestSetup;
@@ -44,6 +45,13 @@
new String[]{"TestKbModel", "MyFaces", "MyFaces2",
"TestKbModel3", "TestKbModel4"});
suiteAll.addTest(testSetup);
suiteAll.addTestSuite(KBValidationTest.class);
+ suite = new TestSuite(BuilderOrderMarkerResolutionTest.class.getName());
+ suite.addTestSuite(BuilderOrderMarkerResolutionTest.class);
+ testSetup = new XProjectImportTestSetUp(suite,
+ "org.jboss.tools.jst.web.kb.test",
+ new String[]{"projects/TestBrokenBuilderOrder"},
+ new String[]{"TestBrokenBuilderOrder"});
+ suiteAll.addTest(testSetup);
return suiteAll;
}
}
\ No newline at end of file
Added:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/validation/BuilderOrderMarkerResolutionTest.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/validation/BuilderOrderMarkerResolutionTest.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/validation/BuilderOrderMarkerResolutionTest.java 2011-06-01
00:09:34 UTC (rev 31707)
@@ -0,0 +1,65 @@
+/*************************************************************************************
+ * Copyright (c) 2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.jst.web.kb.test.validation;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ui.IMarkerResolution;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.wst.validation.internal.plugin.ValidationPlugin;
+import org.jboss.tools.jst.web.kb.internal.validation.ValidatorManager;
+import org.jboss.tools.test.util.JobUtils;
+
+public class BuilderOrderMarkerResolutionTest extends TestCase {
+
+ IProject project = null;
+
+ public void setUp() throws Exception {
+ project =
ResourcesPlugin.getWorkspace().getRoot().getProject("TestBrokenBuilderOrder");
+ assertNotNull("Can't load TestBrokenBuilderOrder", project);
//$NON-NLS-1$
+ }
+
+ private void checkResolution(IProject project, String markerType, String
resolutionClassName) throws CoreException {
+ try{
+ IMarker[] markers = project.findMarkers(ValidationPlugin.VALIDATION_BUILDER_ID, true,
IResource.DEPTH_ZERO);
+ for (int i = 0; i < markers.length; i++) {
+ IMarker marker = markers[i];
+ IMarkerResolution[] resolutions =
IDE.getMarkerHelpRegistry().getResolutions(marker);
+ for (int j = 0; j < resolutions.length; j++) {
+ IMarkerResolution resolution = resolutions[j];
+ if (resolution.getClass().getName().equals(resolutionClassName)) {
+ resolution.run(marker);
+ JobUtils.waitForIdle();
+ IMarker[] newMarkers = project.findMarkers(markerType,
true, IResource.DEPTH_INFINITE);
+ assertTrue("Marker resolution did not decrease number of problems. was:
"+markers.length+" now: "+newMarkers.length, newMarkers.length <
markers.length);
+ return;
+ }
+ fail("Marker resolution: "+resolutionClassName+" not found");
+ }
+ }
+ } finally {
+ JobUtils.waitForIdle();
+// TestUtil.waitForValidation(project);
+ }
+ }
+
+ public void testBuilderOrderResolution() throws CoreException {
+ checkResolution(project,
+ ValidatorManager.ORDER_PROBLEM_MARKER_TYPE,
+ "org.jboss.tools.jst.web.kb.internal.validation.BuilderOrderResolution");
+ }
+
+}
Property changes on:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/validation/BuilderOrderMarkerResolutionTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain