Parser detects wrong include files now
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / PHPEditor.java
index 6c521d6..d5eeb74 100644 (file)
@@ -9,7 +9,7 @@ package net.sourceforge.phpeclipse.phpeditor;
 
  Contributors:
  IBM Corporation - Initial implementation
- Klaus Hartlage - www.eclipseproject.de
+ www.phpeclipse.de
  **********************************************************************/
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -2745,7 +2745,12 @@ public abstract class PHPEditor extends AbstractDecoratedTextEditor implements I
         if (value instanceof Integer) {
           sourceViewer.getTextWidget().setTabs(((Integer) value).intValue());
         } else if (value instanceof String) {
-          sourceViewer.getTextWidget().setTabs(Integer.parseInt((String) value));
+          try {
+            sourceViewer.getTextWidget().setTabs(Integer.parseInt((String) value));
+          } catch (NumberFormatException e){
+            // bug #1038071 - set default tab:
+            sourceViewer.getTextWidget().setTabs(80);
+          }
         }
         return;
       }