Author: mareshkau
Date: 2008-07-09 14:59:48 -0400 (Wed, 09 Jul 2008)
New Revision: 9112
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java
Log:
JBIDE-2434
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java 2008-07-09
18:36:25 UTC (rev 9111)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java 2008-07-09
18:59:48 UTC (rev 9112)
@@ -24,6 +24,7 @@
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocumentType;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.jboss.tools.vpe.VpePlugin;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
@@ -50,8 +51,9 @@
* @param editorInput
* @return
*/
- static public String getDoctype(IEditorInput editorInput) {
+ public static String getDoctype(IEditorInput editorInput) {
+ try{
// if opened file is located in eclipse workspace
if (editorInput instanceof IFileEditorInput) {
IFile f = ((IFileEditorInput) editorInput).getFile();
@@ -64,7 +66,12 @@
return null;
return getDoctype(path.toFile());
}
- return null;
+ }catch(StackOverflowError stackOverflowError) {
+ //Fix For JBIDE-2434
+ VpePlugin.getPluginLog().logInfo(stackOverflowError.toString());
+ return ""; //$NON-NLS-1$
+ }
+ return null;
}
@@ -74,7 +81,7 @@
* @param file
* @return
*/
- static public String getDoctype(IFile file) {
+ private static String getDoctype(IFile file) {
String docTypeValue = null;
Show replies by date