fixed bug #1038071
authorjsurfer <jsurfer>
Tue, 5 Oct 2004 18:31:40 +0000 (18:31 +0000)
committerjsurfer <jsurfer>
Tue, 5 Oct 2004 18:31:40 +0000 (18:31 +0000)
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPEditor.java

index 6c521d6..01a510c 100644 (file)
@@ -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;
       }