@Override public void init(IEditorSite site, IEditorInput input) throws PartInitException { super.init(site, input); try { IFile file = ((IFileEditorInput) input).getFile(); this.model = create(file); if (this.model == null) { throw new PartInitException("The specified input is not a valid network."); } } catch (CoreException e) { throw new PartInitException(e.getStatus()); } catch (ClassCastException e) { throw new PartInitException("The specified input is not a valid network.", e); } setSite(site); setInput(input); }