Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 70420 Details for
Bug 190564
JSP semantics validator is not fired for JSF/JSPF files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Original patch plus some sensitivity black box testing of changes
patch.txt (text/plain), 13.78 KB, created by
Cameron Bateman
on 2007-06-06 17:08:49 EDT
(
hide
)
Description:
Original patch plus some sensitivity black box testing of changes
Filename:
MIME Type:
Creator:
Cameron Bateman
Created:
2007-06-06 17:08:49 EDT
Size:
13.78 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jst.jsf.common >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/plugins/org.eclipse.jst.jsf.common/META-INF/MANIFEST.MF,v >retrieving revision 1.16 >diff -u -r1.16 MANIFEST.MF >--- META-INF/MANIFEST.MF 29 May 2007 23:16:28 -0000 1.16 >+++ META-INF/MANIFEST.MF 6 Jun 2007 21:07:14 -0000 >@@ -7,6 +7,7 @@ > Bundle-Localization: plugin > Export-Package: org.eclipse.jst.jsf.common;x-internal:=true, > org.eclipse.jst.jsf.common.dom, >+ org.eclipse.jst.jsf.common.internal;x-friends:="org.eclipse.jst.jsf.core", > org.eclipse.jst.jsf.common.internal.types;x-friends:="org.eclipse.jst.jsf.core,org.eclipse.jst.jsf.core.tests,org.eclipse.jst.jsf.validation.el.tests,org.eclipse.jst.jsf.designtime.tests,org.eclipse.jst.jsf.context.symbol.tests", > org.eclipse.jst.jsf.common.metadata, > org.eclipse.jst.jsf.common.metadata.internal;x-friends:="org.eclipse.jst.jsf.metadata.tests", >Index: src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/TaglibContextResolver.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/TaglibContextResolver.java,v >retrieving revision 1.4 >diff -u -r1.4 TaglibContextResolver.java >--- src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/TaglibContextResolver.java 18 Apr 2007 21:07:10 -0000 1.4 >+++ src/org/eclipse/jst/jsf/context/resolver/structureddocument/internal/impl/TaglibContextResolver.java 6 Jun 2007 21:07:14 -0000 >@@ -14,6 +14,7 @@ > > import java.util.Iterator; > >+import org.eclipse.jst.jsf.common.internal.JSPUtil; > import org.eclipse.jst.jsf.context.IModelContext; > import org.eclipse.jst.jsf.context.resolver.structureddocument.ITaglibContextResolver; > import org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext; >@@ -145,7 +146,7 @@ > try > { > smodel = StructuredModelManager.getModelManager().getModelForRead((IStructuredDocument)context.getStructuredDocument()); >- return "org.eclipse.jst.jsp.core.jspsource".equals(smodel.getContentTypeIdentifier()); //$NON-NLS-1$ >+ return JSPUtil.isJSPContentType(smodel.getContentTypeIdentifier()); //$NON-NLS-1$ > } > finally > { >Index: src/org/eclipse/jst/jsf/common/internal/JSPUtil.java >=================================================================== >RCS file: src/org/eclipse/jst/jsf/common/internal/JSPUtil.java >diff -N src/org/eclipse/jst/jsf/common/internal/JSPUtil.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/jst/jsf/common/internal/JSPUtil.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,62 @@ >+package org.eclipse.jst.jsf.common.internal; >+ >+import org.eclipse.core.resources.IFile; >+import org.eclipse.core.runtime.Platform; >+import org.eclipse.core.runtime.content.IContentType; >+import org.eclipse.core.runtime.content.IContentTypeManager; >+ >+/** >+ * Utility JSP methods >+ * @author cbateman >+ * >+ */ >+public final class JSPUtil >+{ >+ private final static String CTYPE_JSPSOURCE = >+ "org.eclipse.jst.jsp.core.jspsource"; //$NON-NLS-1$ >+ private final static String CTYPE_JSPFRAGMENTSOURCE = >+ "org.eclipse.jst.jsp.core.jspfragmentsource"; //$NON-NLS-1$ >+ /** >+ * @param contentType >+ * @return true if contentType is one of the content types registered >+ * for JSP files >+ */ >+ public static boolean isJSPContentType(final String contentType) >+ { >+ return CTYPE_JSPSOURCE.equals(contentType) >+ || CTYPE_JSPFRAGMENTSOURCE.equals(contentType); >+ } >+ >+ /** >+ * @param file >+ * @return true if file is associated with a JSP or JSP fragment content type >+ */ >+ public static boolean isJSPContentType(final IFile file) >+ { >+ final IContentTypeManager typeManager = Platform.getContentTypeManager(); >+ IContentType jspContentType = >+ typeManager.getContentType(CTYPE_JSPSOURCE); >+ if (jspContentType != null >+ && jspContentType.isAssociatedWith(file.getName())) >+ { >+ return true; >+ } >+ >+ jspContentType = >+ typeManager.getContentType(CTYPE_JSPFRAGMENTSOURCE); >+ >+ // otherwise check if fragment >+ if (jspContentType != null >+ && jspContentType.isAssociatedWith(file.getName())) >+ { >+ return true; >+ } >+ >+ return false; >+ } >+ >+ private JSPUtil() >+ { >+ // no instantiation >+ } >+} >#P org.eclipse.jst.jsf.validation.el.tests >Index: src/org/eclipse/jst/jsf/validation/el/tests/jsp/BeanPropertyResolutionTestCase.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BeanPropertyResolutionTestCase.java,v >retrieving revision 1.5 >diff -u -r1.5 BeanPropertyResolutionTestCase.java >--- src/org/eclipse/jst/jsf/validation/el/tests/jsp/BeanPropertyResolutionTestCase.java 15 May 2007 22:00:15 -0000 1.5 >+++ src/org/eclipse/jst/jsf/validation/el/tests/jsp/BeanPropertyResolutionTestCase.java 6 Jun 2007 21:07:15 -0000 >@@ -20,6 +20,17 @@ > super("/testdata/jsps/beanPropertyResolution.jsp.data", "/beanPropertyResolution.jsp", IJSFCoreConstants.FACET_VERSION_1_1,FACES_CONFIG_FILE_NAME_1_1); > } > >+ /** >+ * Allow sub-classing for sensitivity analysis (i.e. different dest file extensions) >+ * >+ * @param srcFile >+ * @param destFile >+ */ >+ protected BeanPropertyResolutionTestCase(final String srcFile, final String destFile) >+ { >+ super(srcFile,destFile, IJSFCoreConstants.FACET_VERSION_1_1,FACES_CONFIG_FILE_NAME_1_1); >+ } >+ > protected void setUp() throws Exception > { > super.setUp(); >Index: src/org/eclipse/jst/jsf/validation/el/tests/CommonTests.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/CommonTests.java,v >retrieving revision 1.1 >diff -u -r1.1 CommonTests.java >--- src/org/eclipse/jst/jsf/validation/el/tests/CommonTests.java 20 Apr 2007 20:57:14 -0000 1.1 >+++ src/org/eclipse/jst/jsf/validation/el/tests/CommonTests.java 6 Jun 2007 21:07:15 -0000 >@@ -30,6 +30,9 @@ > import org.eclipse.jst.jsf.validation.el.tests.jsp.PropertiesOfMapsTestCase; > import org.eclipse.jst.jsf.validation.el.tests.jsp.UnaryEmptyTestCase; > import org.eclipse.jst.jsf.validation.el.tests.jsp.UnaryMinusTestCase; >+import org.eclipse.jst.jsf.validation.el.tests.jsp.ext.BeanPropertyResolutionTestCase_JSFExt; >+import org.eclipse.jst.jsf.validation.el.tests.jsp.ext.BeanPropertyResolutionTestCase_JSPFExt; >+import org.eclipse.jst.jsf.validation.el.tests.jsp.ext.BeanPropertyResolutionTestCase_JSPXExt; > > public class CommonTests > { >@@ -68,6 +71,12 @@ > suite.addTest(new ConfigurableTestSuite(UnaryMinusTestCase.class)); > > suite.addTest(new ConfigurableTestSuite(MarkerOffsetsTestCase.class)); >+ >+ // file extension sensitivity >+ suite.addTest(new ConfigurableTestSuite(BeanPropertyResolutionTestCase_JSFExt.class)); >+ suite.addTest(new ConfigurableTestSuite(BeanPropertyResolutionTestCase_JSPXExt.class)); >+ suite.addTest(new ConfigurableTestSuite(BeanPropertyResolutionTestCase_JSPFExt.class)); >+ > //$JUnit-END$ > } > } >Index: src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSPXExt.java >=================================================================== >RCS file: src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSPXExt.java >diff -N src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSPXExt.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSPXExt.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,15 @@ >+package org.eclipse.jst.jsf.validation.el.tests.jsp.ext; >+ >+import org.eclipse.jst.jsf.validation.el.tests.jsp.BeanPropertyResolutionTestCase; >+ >+/** >+ * Test cases for bean property resolution >+ * >+ * @author cbateman >+ */ >+public class BeanPropertyResolutionTestCase_JSPXExt extends BeanPropertyResolutionTestCase >+{ >+ public BeanPropertyResolutionTestCase_JSPXExt() { >+ super("/testdata/jsps/beanPropertyResolution.jsp.data", "/beanPropertyResolution.jspx"); >+ } >+} >Index: src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSFExt.java >=================================================================== >RCS file: src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSFExt.java >diff -N src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSFExt.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSFExt.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,15 @@ >+package org.eclipse.jst.jsf.validation.el.tests.jsp.ext; >+ >+import org.eclipse.jst.jsf.validation.el.tests.jsp.BeanPropertyResolutionTestCase; >+ >+/** >+ * Test cases for bean property resolution >+ * >+ * @author cbateman >+ */ >+public class BeanPropertyResolutionTestCase_JSFExt extends BeanPropertyResolutionTestCase >+{ >+ public BeanPropertyResolutionTestCase_JSFExt() { >+ super("/testdata/jsps/beanPropertyResolution.jsp.data", "/beanPropertyResolution.jsf"); >+ } >+} >Index: src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSPFExt.java >=================================================================== >RCS file: src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSPFExt.java >diff -N src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSPFExt.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/jst/jsf/validation/el/tests/jsp/ext/BeanPropertyResolutionTestCase_JSPFExt.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,15 @@ >+package org.eclipse.jst.jsf.validation.el.tests.jsp.ext; >+ >+import org.eclipse.jst.jsf.validation.el.tests.jsp.BeanPropertyResolutionTestCase; >+ >+/** >+ * Test cases for bean property resolution >+ * >+ * @author cbateman >+ */ >+public class BeanPropertyResolutionTestCase_JSPFExt extends BeanPropertyResolutionTestCase >+{ >+ public BeanPropertyResolutionTestCase_JSPFExt() { >+ super("/testdata/jsps/beanPropertyResolution.jsp.data", "/beanPropertyResolution.jspf"); >+ } >+} >#P org.eclipse.jst.jsf.core >Index: src/org/eclipse/jst/jsf/designtime/internal/jsp/StartupHandler.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/designtime/internal/jsp/StartupHandler.java,v >retrieving revision 1.5 >diff -u -r1.5 StartupHandler.java >--- src/org/eclipse/jst/jsf/designtime/internal/jsp/StartupHandler.java 29 May 2007 19:24:56 -0000 1.5 >+++ src/org/eclipse/jst/jsf/designtime/internal/jsp/StartupHandler.java 6 Jun 2007 21:07:17 -0000 >@@ -14,10 +14,8 @@ > > import org.eclipse.core.resources.IFile; > import org.eclipse.core.runtime.IStatus; >-import org.eclipse.core.runtime.Platform; > import org.eclipse.core.runtime.Status; >-import org.eclipse.core.runtime.content.IContentType; >-import org.eclipse.core.runtime.content.IContentTypeManager; >+import org.eclipse.jst.jsf.common.internal.JSPUtil; > import org.eclipse.jst.jsf.core.internal.JSFCorePlugin; > import org.eclipse.jst.jsf.core.jsfappconfig.JSFAppConfigUtils; > import org.eclipse.ui.IEditorInput; >@@ -142,14 +140,7 @@ > > if (file != null) > { >- IContentTypeManager typeManager = Platform.getContentTypeManager(); >- IContentType jspContentType = >- typeManager.getContentType("org.eclipse.jst.jsp.core.jspsource"); //$NON-NLS-1$ >- if (jspContentType != null >- && jspContentType.isAssociatedWith(file.getName())) >- { >- return true; >- } >+ return JSPUtil.isJSPContentType(file); > } > > return false; >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/plugins/org.eclipse.jst.jsf.core/plugin.xml,v >retrieving revision 1.16 >diff -u -r1.16 plugin.xml >--- plugin.xml 16 May 2007 22:34:26 -0000 1.16 >+++ plugin.xml 6 Jun 2007 21:07:17 -0000 >@@ -210,14 +210,6 @@ > <validator> > <projectNature id="org.eclipse.wst.common.modulecore.ModuleCoreNature" /> > <projectNature id="org.eclipse.jdt.core.javanature" /> >- <filter >- objectClass="org.eclipse.core.resources.IFile" >- nameFilter="*.jsp"> >- </filter> >- <filter >- objectClass="org.eclipse.core.resources.IFile" >- nameFilter="*.jspx"> >- </filter> > <markerId > markerIdValue="JSPSemanticsValidatorMarker"> > </markerId> >@@ -229,6 +221,12 @@ > incremental="true" > fullBuild="true" > /> >+ <contentTypeBinding >+ contentTypeId="org.eclipse.jst.jsp.core.jspsource"> >+ </contentTypeBinding> >+ <contentTypeBinding >+ contentTypeId="org.eclipse.jst.jsp.core.jspfragmentsource"> >+ </contentTypeBinding> > </validator> > </extension> >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 190564
:
70417
| 70420