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 70417 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 to fix by opening up the content types supported by the validator.
patch.txt (text/plain), 7.65 KB, created by
Cameron Bateman
on 2007-06-06 16:48:07 EDT
(
hide
)
Description:
Patch to fix by opening up the content types supported by the validator.
Filename:
MIME Type:
Creator:
Cameron Bateman
Created:
2007-06-06 16:48:07 EDT
Size:
7.65 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 20:47:12 -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 20:47:12 -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.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 20:47:14 -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 20:47:14 -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 Raw
Actions:
View
Attachments on
bug 190564
:
70417
|
70420