@Override public boolean performFinish() { IContainer c = Project.findContainerByPath(null, page.getContainerFullPath()); if (c != null) { try { final IFile sorFile = c.getFile(new Path(page.getFileName())); IOAdapter io = new IOAdapter(); SortSetXMLSaver r = new SortSetXMLSaver().setModel(new SortSet()); r.setFile(new EclipseFileWrapper(sorFile)) .setOutputStream(io.getOutputStream()) .exportObject(); Project.setContents( sorFile, io.getInputStream(), new Callback() { @Override public void onSuccess() { try { UI.openInEditor(sorFile); } catch (PartInitException pie) { /* ? */ pie.printStackTrace(); } } }); return true; } catch (SaveFailedException e) { page.setErrorMessage(e.getLocalizedMessage()); } } return false; }
@Override public boolean performFinish() { IContainer c = RcpUtils.findContainerByPath(null, page.getFolderPath()); if (c != null) { try { IFile sigFile = RcpUtils.findFileByPath(null, page.getSignaturePath()); IFile bigFile = RcpUtils.getFile(c, page.getFileName()); NewBrsWizard.createBigraph(sigFile, bigFile); UI.openInEditor(bigFile); return true; } catch (CoreException e) { page.setErrorMessage(e.getLocalizedMessage()); } catch (LoadFailedException e) { page.setErrorMessage(e.getLocalizedMessage()); } catch (SaveFailedException e) { page.setErrorMessage(e.getLocalizedMessage()); } } return false; }