@Override public InputStream getContents() throws CoreException { return state.getContents(); }
@Override public InputStream getContents() throws CoreException { return state.getContents(); }
@Override public InputStream getContents() throws CoreException { return state.getContents(); }
public InputStream getContents() throws CoreException { return state.getContents(); }
@Override public InputStream getContents() throws CoreException { return new BufferedInputStream(fFileState.getContents()); } @Override
public InputStream getContents() throws CoreException { return new BufferedInputStream(fFileState.getContents()); } public String getCharset() {
@Override public InputStream getContents() throws CoreException { return new BufferedInputStream(fFileState.getContents()); }
public InputStream getContents() throws CoreException { return new BufferedInputStream(fFileState.getContents()); }
@Override public void setContents(IFileState source, boolean force, boolean keepHistory, IProgressMonitor monitor) throws CoreException { // funnel all operations to central method int updateFlags = force ? IResource.FORCE : IResource.NONE; updateFlags |= keepHistory ? IResource.KEEP_HISTORY : IResource.NONE; setContents(source.getContents(), updateFlags, monitor); } }
@Override public void setContents(IFileState source, boolean force, boolean keepHistory, IProgressMonitor monitor) throws CoreException { // funnel all operations to central method int updateFlags = force ? IResource.FORCE : IResource.NONE; updateFlags |= keepHistory ? IResource.KEEP_HISTORY : IResource.NONE; setContents(source.getContents(), updateFlags, monitor); } }
@Override public void setContents(IFileState source, boolean force, boolean keepHistory, IProgressMonitor monitor) throws CoreException { // funnel all operations to central method int updateFlags = force ? IResource.FORCE : IResource.NONE; updateFlags |= keepHistory ? IResource.KEEP_HISTORY : IResource.NONE; setContents(source.getContents(), updateFlags, monitor); } }
@Override public void setContents(IFileState content, int updateFlags, IProgressMonitor monitor) throws CoreException { setContents(content.getContents(), updateFlags, monitor); }
@Override public void setContents(IFileState content, int updateFlags, IProgressMonitor monitor) throws CoreException { setContents(content.getContents(), updateFlags, monitor); }
@Override public void setContents(IFileState content, int updateFlags, IProgressMonitor monitor) throws CoreException { setContents(content.getContents(), updateFlags, monitor); }
public void execute(IProgressMonitor pm) throws InvocationTargetException { try { String taskName= Utilities.getString(bundle, "taskName"); //$NON-NLS-1$ pm.beginTask(taskName, selected.length); for (int i= 0; i < selected.length; i++) { IFile file= selected[i].fFile; IFileState fileState= selected[i].fFileState; createContainers(file); SubProgressMonitor subMonitor= new SubProgressMonitor(pm, 1); try { file.create(fileState.getContents(), false, subMonitor); } finally { subMonitor.done(); } } } catch (CoreException e) { throw new InvocationTargetException(e); } finally { pm.done(); } } };
@Override public void execute(IProgressMonitor pm) throws InvocationTargetException { try { String taskName= Utilities.getString(bundle, "taskName"); //$NON-NLS-1$ pm.beginTask(taskName, selected.length); for (int i= 0; i < selected.length; i++) { IFile file= selected[i].fFile; IFileState fileState= selected[i].fFileState; createContainers(file); SubMonitor subMonitor= SubMonitor.convert(pm, 1); try { file.create(fileState.getContents(), false, subMonitor); } finally { subMonitor.done(); } } } catch (CoreException e) { throw new InvocationTargetException(e); } finally { pm.done(); } } };
@Override public void run() { try { IStructuredSelection structSel = getStructuredSelection(); Object[] objArray = structSel.toArray(); for (int i = 0; i < objArray.length; i++) { IFileState state = (IFileState) objArray[i]; if (!state.exists()) { MessageDialog.openError(TeamUIPlugin.getActivePage().getActivePart().getSite().getShell(), TeamUIMessages.OpenRevisionAction_DeletedRevisionTitle, TeamUIMessages.OpenRevisionAction_DeletedRevisionMessage); } else { String id = getEditorID(state.getName(), state.getContents()); IWorkbenchPage page = TeamUIPlugin.getActivePage(); if (page != null) { page.openEditor(new FileRevisionEditorInput(state), id); } } } } catch (Exception e) { } }
public void run() { try { IStructuredSelection structSel = getStructuredSelection(); Object[] objArray = structSel.toArray(); for (int i = 0; i < objArray.length; i++) { IFileState state = (IFileState) objArray[i]; if (!state.exists()) { MessageDialog.openError(TeamUIPlugin.getActivePage().getActivePart().getSite().getShell(), TeamUIMessages.OpenRevisionAction_DeletedRevisionTitle, TeamUIMessages.OpenRevisionAction_DeletedRevisionMessage); } else { String id = getEditorID(state.getName(), state.getContents()); IWorkbenchPage page = TeamUIPlugin.getActivePage(); if (page != null) { page.openEditor(new FileRevisionEditorInput(state), id); } } } } catch (Exception e) { } }