diff options
author | Dani Megert | 2008-08-26 13:59:51 +0000 |
---|---|---|
committer | Dani Megert | 2008-08-26 13:59:51 +0000 |
commit | 724a14baf52854ecdb4198c1fef5e00708baeb40 (patch) | |
tree | ad62b9a81c5c5a5d1ef5888456fbb76d3e981c63 /org.eclipse.core.filebuffers.tests | |
parent | c2a8cae66ed42c76b1c051ec027e89615e5ea7aa (diff) | |
download | eclipse.platform.text-724a14baf52854ecdb4198c1fef5e00708baeb40.tar.gz eclipse.platform.text-724a14baf52854ecdb4198c1fef5e00708baeb40.tar.xz eclipse.platform.text-724a14baf52854ecdb4198c1fef5e00708baeb40.zip |
Fixed Javadoc warnings.
Diffstat (limited to 'org.eclipse.core.filebuffers.tests')
3 files changed, 19 insertions, 24 deletions
diff --git a/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileTool.java b/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileTool.java index b1530ecd703..ffc7daaa339 100644 --- a/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileTool.java +++ b/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileTool.java @@ -26,7 +26,6 @@ import java.util.Enumeration; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; -import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.FileLocator; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Plugin; @@ -53,10 +52,6 @@ public class FileTool { * @throws IOException in case of problem */ public static void unzip(ZipFile zipFile, File dstDir) throws IOException { - unzip(zipFile, dstDir, dstDir, 0); - } - - private static void unzip(ZipFile zipFile, File rootDstDir, File dstDir, int depth) throws IOException { Enumeration entries = zipFile.entries(); @@ -226,12 +221,12 @@ public class FileTool { } } - public static void delete(IPath path) throws CoreException { + public static void delete(IPath path) { File file= FileBuffers.getSystemFileAtLocation(path); delete(file); } - public static void delete(File file) throws CoreException { + public static void delete(File file) { if (file.exists()) { for (int i= 0; i < MAX_RETRY; i++) { if (file.delete()) diff --git a/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/MockDocumentSetupParticipants.java b/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/MockDocumentSetupParticipants.java index 6b9a642e342..fa3eb16cbc2 100644 --- a/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/MockDocumentSetupParticipants.java +++ b/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/MockDocumentSetupParticipants.java @@ -41,7 +41,7 @@ public class MockDocumentSetupParticipants { } } - static abstract class AbstractTestDSPExtension extends AbstractTestDSP implements IDocumentSetupParticipant, IDocumentSetupParticipantExtension { + static abstract class AbstractTestDSPExtension extends AbstractTestDSP implements IDocumentSetupParticipantExtension { /* * @see org.eclipse.core.filebuffers.IDocumentSetupParticipantExtension#setup(org.eclipse.jface.text.IDocument, org.eclipse.core.runtime.IPath, org.eclipse.core.filebuffers.LocationKind) */ diff --git a/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/ResourceHelper.java b/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/ResourceHelper.java index b65b65c56fc..6abec6e5fce 100644 --- a/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/ResourceHelper.java +++ b/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/ResourceHelper.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. + * Copyright (c) 2000, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -13,6 +13,14 @@ package org.eclipse.core.filebuffers.tests; import java.io.File; import java.io.InputStream; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Plugin; + import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; @@ -25,14 +33,6 @@ import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.filebuffers.manipulation.ContainerCreator; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.Plugin; - /** * @since 3.0 */ @@ -56,18 +56,18 @@ public class ResourceHelper { return project; } - public static void deleteProject(String projectName) throws CoreException { + public static void deleteProject(String projectName) { IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot(); IProject project= root.getProject(projectName); if (project.exists()) delete(project); } - public static void delete(final IProject project) throws CoreException { + public static void delete(final IProject project) { delete(project, true); } - public static void delete(final IProject project, boolean deleteContent) throws CoreException { + public static void delete(final IProject project, boolean deleteContent) { for (int i= 0; i < MAX_RETRY; i++) { try { project.delete(deleteContent, true, NULL_MONITOR); @@ -80,7 +80,7 @@ public class ResourceHelper { try { Thread.sleep(1000); // sleep a second } catch (InterruptedException e) { - } + } } } } @@ -94,14 +94,14 @@ public class ResourceHelper { } public static IFile createFile(IFolder folder, String name, String contents) throws CoreException { - return createFile(folder.getFile(name), name, contents); + return createFile(folder.getFile(name), contents); } public static IFile createFile(IProject project, String name, String contents) throws CoreException { - return createFile(project.getFile(name), name, contents); + return createFile(project.getFile(name), contents); } - private static IFile createFile(IFile file, String name, String contents) throws CoreException { + private static IFile createFile(IFile file, String contents) throws CoreException { if (contents == null) contents= ""; InputStream inputStream= new java.io.StringBufferInputStream(contents); |