|Is there an unrestricted API similar to IModelManager.getModelForRead(IFile)? [message #203480]
||Fri, 02 November 2007 03:02
| Carlin Rogers
Registered: July 2009
Given an IFile for a JSP file, I'd like to know the best way to get an org.w3c.dom.Document.|
I want the Document object so I can determine if a given taglib is present and then get the taglib namespace prefix and see if the Document contains certain tag.
Here are some more details...
I'm using the org.eclipse.wst.server.ui.moduleArtifactAdapters extension point to integrate with the "Run on Server" menu option. In my scenario, the object passed in to my ModuleArtifactAdapterDelegate implementation's getModuleArtifact() method will be a resource IFile.
I've saw some code in the newsgroup that uses the org.eclipse.wst.sse.core.internal.provisional.StructuredMode lManager to get the DOM model and then the get the DOM document. Something like this...
IStructuredModel model = StructuredModelManager.getModelManager().getModelForRead(fil e);
IDOMModel domModel = (IDOMModel)model;
Document doc = domModel.getDocument();
....but I noticed the following warning in my dev env:
"Discouraged access: The method getModelForRead(IFile) from the type IModelManager is not accessible due to restriction on required library ...org.eclipse.wst.sse.core_1.1.101.v200611210021.jar"
Should I go ahead and use this or is there a public API I can use for reading in the IFile to get the DOM document and check for certain JSP tags?
Powered by FUDForum
. Page generated in 0.01806 seconds