}
((BrowserView) part).setUrl(localhostURL);
- } catch (PartInitException e) {
- PHPeclipsePlugin.log(e);
+ } catch (Exception e) {
+ //PHPeclipsePlugin.log(e);
}
}
}
}
((BrowserView) part).refresh();
- } catch (PartInitException e) {
- PHPeclipsePlugin.log(e);
+ } catch (Exception e) {
+ // PHPeclipsePlugin.log(e);
}
}
}
* @see ViewPart#createPartControl
*/
public void createPartControl(Composite frame) {
- instance = new PHPBrowser(frame);
+ try {
+ instance = new PHPBrowser(frame);
+ if (instance.browser==null) {
+ instance = null;
+ }
+ } catch(Exception e) {
+ instance = null;
+ }
}
/**
* Called when we must grab focus.
* @see org.eclipse.ui.part.ViewPart#setFocus
*/
public void setFocus() {
- instance.setFocus();
+ if (instance!=null) {
+ instance.setFocus();
+ }
}
/**
* Called when the View is to be disposed
*/
public void dispose() {
- instance.dispose();
- instance = null;
+ if (instance!=null) {
+ instance.dispose();
+ instance = null;
+ }
super.dispose();
}
public void setUrl(String url) {
- instance.browser.setUrl(url);
+ if (instance!=null) {
+ instance.browser.setUrl(url);
+ }
}
public void refresh() {
- instance.browser.refresh();
+ if (instance!=null) {
+ instance.browser.refresh();
+ }
}
}