* Contributors:
* Christopher Lenz - initial API and implementation
*
- * $Id: XMLDocumentProvider.java,v 1.1 2004-09-02 18:28:04 jsurfer Exp $
+ * $Id: XMLDocumentProvider.java,v 1.3 2006-10-21 23:14:14 pombredanne Exp $
*/
package net.sourceforge.phpeclipse.xml.ui.internal.editor;
import java.net.MalformedURLException;
+import net.sourceforge.phpeclipse.xml.core.internal.model.XMLDocument;
+import net.sourceforge.phpeclipse.xml.core.model.IXMLDocument;
+
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentListener;
import org.eclipse.ui.editors.text.TextFileDocumentProvider;
-import net.sourceforge.phpeclipse.xml.core.internal.model.XMLDocument;
-import net.sourceforge.phpeclipse.xml.core.model.IXMLDocument;
-
-
/**
* Document provider for XML files.
*
* TODO Merge the encoding detection support from I18NDocumentProvider and
- * AbstractDocumentProvider into this class
+ * AbstractDocumentProvider into this class
*
- * TODO This class currently doubles as a model manager which will need to be
- * moved into core at some point, and would make this class pretty much
- * useless
+ * TODO This class currently doubles as a model manager which will need to be
+ * moved into core at some point, and would make this class pretty much useless
*/
public class XMLDocumentProvider extends TextFileDocumentProvider {
}
/*
- * @see TextFileDocumentProvider#disposeFileInfo(Object, TextFileDocumentProvider.FileInfo)
+ * @see TextFileDocumentProvider#disposeFileInfo(Object,
+ * TextFileDocumentProvider.FileInfo)
*/
protected void disposeFileInfo(Object element, FileInfo info) {
if (info instanceof XMLFileInfo) {
if (document != null) {
IXMLDocument xmlDocument = ((XMLFileInfo) info).xmlDocument;
if (xmlDocument instanceof IDocumentListener) {
- document.removeDocumentListener(
- (IDocumentListener) xmlDocument);
+ document
+ .removeDocumentListener((IDocumentListener) xmlDocument);
}
}
}
// Public Methods ----------------------------------------------------------
/**
- * Creates the XML document model object corresponding to the specified
+ * Creates the XML document model object corresponding to the specified
* document.
*
- * @param document the document to parse
- * @param systemId the system ID of the document
+ * @param document
+ * the document to parse
+ * @param systemId
+ * the system ID of the document
* @return the document model object
*/
public IXMLDocument createModel(IDocument document, String systemId) {
/**
* Returns the XML document model associated with the specified element.
*
- * @param element the element
+ * @param element
+ * the element
* @return the document model associated with the element
*/
public IXMLDocument getModel(Object element) {