/* * (non-Javadoc) * @see org.eclipse.core.resources.IStorage#getContents() */ public InputStream getContents() throws CoreException { try { // Contents are a ByteArrayInputStream which can be reset to the beginning contents.reset(); } catch (IOException e) { SVNUIPlugin.log(SVNException.wrapException(e)); } return contents; }
/* * (non-Javadoc) * @see org.eclipse.core.resources.IEncodedStorage#getCharset() */ public String getCharset() throws CoreException { InputStream contents = getContents(); try { String charSet = SVNUIPlugin.getCharset(getName(), contents); return charSet; } catch (IOException e) { throw new SVNException( new Status( IStatus.ERROR, SVNUIPlugin.ID, IResourceStatus.FAILED_DESCRIBING_CONTENTS, Policy.bind("RemoteAnnotationStorage.1", getFullPath().toString()), e)); //$NON-NLS-1$ } finally { try { contents.close(); } catch (IOException e1) { // Ignore } } }
/* (non-Javadoc) * @see org.tigris.subversion.subclipse.ui.actions.SVNAction#execute(org.eclipse.jface.action.IAction) */ protected void execute(IAction action) throws InvocationTargetException, InterruptedException { RepositoryManager manager = SVNUIPlugin.getPlugin().getRepositoryManager(); final String message = manager.promptForComment(getShell(), new IResource[] {}); if (message == null) return; // cancel run( new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException { try { SVNProviderPlugin.getPlugin() .getRepositoryResourcesManager() .deleteRemoteResources(getSelectedRemoteResources(), message, monitor); } catch (TeamException e) { throw new InvocationTargetException(e); } } }, true /* cancelable */, PROGRESS_BUSYCURSOR); //$NON-NLS-1$ }