diff options
author | Tomasz Zarna | 2009-02-02 10:19:48 +0000 |
---|---|---|
committer | Tomasz Zarna | 2009-02-02 10:19:48 +0000 |
commit | ecc49a39eb6c3a6a180df4a562372012a7ed8340 (patch) | |
tree | a7a69dcbf13e9e8a6c94ecf27d90a30b94400ac1 /examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem | |
parent | 9ac8169e20462aafe28aa9d00ef412671b010d7d (diff) | |
download | eclipse.platform.team-ecc49a39eb6c3a6a180df4a562372012a7ed8340.tar.gz eclipse.platform.team-ecc49a39eb6c3a6a180df4a562372012a7ed8340.tar.xz eclipse.platform.team-ecc49a39eb6c3a6a180df4a562372012a7ed8340.zip |
Warnings sweeping.
Diffstat (limited to 'examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem')
17 files changed, 58 insertions, 64 deletions
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProvider.java index 3ad84b41c..e951bebc5 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProvider.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. + * Copyright (c) 2000, 2009 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 @@ -88,7 +88,7 @@ public class FileSystemProvider extends RepositoryProvider { * * @see org.eclipse.team.core.RepositoryProvider#configureProject() */ - public void configureProject() throws CoreException { + public void configureProject() { FileSystemSubscriber.getInstance().handleRootChanged(getProject(), true /* added */); } diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemFileRevision.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemFileRevision.java index 5b37eef95..0b248c205 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemFileRevision.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemFileRevision.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006 IBM Corporation and others. + * Copyright (c) 2006, 2009 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 @@ -15,7 +15,6 @@ import java.io.FileNotFoundException; import java.io.InputStream; import org.eclipse.core.resources.IStorage; -import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Path; @@ -38,13 +37,14 @@ public class FileSystemFileRevision extends FileRevision { return remoteFile.lastModified(); } - public IStorage getStorage(IProgressMonitor monitor) throws CoreException { + public IStorage getStorage(IProgressMonitor monitor) { return new IStorage() { - public InputStream getContents() throws CoreException { + public InputStream getContents() { try { return new FileInputStream(remoteFile); } catch (FileNotFoundException e) { + // ignore } return null; @@ -73,7 +73,7 @@ public class FileSystemFileRevision extends FileRevision { return false; } - public IFileRevision withAllProperties(IProgressMonitor monitor) throws CoreException { + public IFileRevision withAllProperties(IProgressMonitor monitor) { return null; } diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemHistory.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemHistory.java index ccb0e8ef0..5e91b1219 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemHistory.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/history/FileSystemHistory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006 IBM Corporation and others. + * Copyright (c) 2006, 2009 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 @@ -68,7 +68,9 @@ public class FileSystemHistory extends FileHistory { } } } catch (TeamException e) { + // ignore } catch (CoreException e) { + // ignore } } diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemRemoteTree.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemRemoteTree.java index 8bde0f757..b3975785f 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemRemoteTree.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemRemoteTree.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2009 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,7 +13,6 @@ package org.eclipse.team.examples.filesystem.subscriber; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.team.core.RepositoryProvider; -import org.eclipse.team.core.TeamException; import org.eclipse.team.core.variants.IResourceVariant; import org.eclipse.team.core.variants.ThreeWayRemoteTree; import org.eclipse.team.examples.filesystem.FileSystemPlugin; @@ -36,14 +35,14 @@ public class FileSystemRemoteTree extends ThreeWayRemoteTree { /* (non-Javadoc) * @see org.eclipse.team.core.variants.AbstractResourceVariantTree#fetchMembers(org.eclipse.team.core.variants.IResourceVariant, org.eclipse.core.runtime.IProgressMonitor) */ - protected IResourceVariant[] fetchMembers(IResourceVariant variant, IProgressMonitor progress) throws TeamException { + protected IResourceVariant[] fetchMembers(IResourceVariant variant, IProgressMonitor progress) { return ((FileSystemResourceVariant)variant).members(); } /* (non-Javadoc) * @see org.eclipse.team.core.variants.AbstractResourceVariantTree#fetchVariant(org.eclipse.core.resources.IResource, int, org.eclipse.core.runtime.IProgressMonitor) */ - protected IResourceVariant fetchVariant(IResource resource, int depth, IProgressMonitor monitor) throws TeamException { + protected IResourceVariant fetchVariant(IResource resource, int depth, IProgressMonitor monitor) { RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), FileSystemPlugin.PROVIDER_ID); if (provider != null) { return ((FileSystemProvider)provider).getResourceVariant(resource); diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemSubscriber.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemSubscriber.java index 9213cec17..9d96af05d 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemSubscriber.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemSubscriber.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2009 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 @@ -60,7 +60,7 @@ public class FileSystemSubscriber extends ThreeWaySubscriber { /* (non-Javadoc) * @see org.eclipse.team.core.variants.ThreeWaySubscriber#getResourceVariant(org.eclipse.core.resources.IResource, byte[]) */ - public IResourceVariant getResourceVariant(IResource resource, byte[] bytes) throws TeamException { + public IResourceVariant getResourceVariant(IResource resource, byte[] bytes) { RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), FileSystemPlugin.PROVIDER_ID); if (provider != null) { return ((FileSystemProvider)provider).getResourceVariant(resource, bytes); diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/DisconnectAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/DisconnectAction.java index 73ab0be1f..71c0496bf 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/DisconnectAction.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/DisconnectAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. + * Copyright (c) 2000, 2009 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 @@ -10,8 +10,6 @@ *******************************************************************************/ package org.eclipse.team.examples.filesystem.ui; -import java.lang.reflect.InvocationTargetException; - import org.eclipse.core.resources.IProject; import org.eclipse.jface.action.IAction; import org.eclipse.jface.dialogs.ErrorDialog; @@ -25,8 +23,7 @@ import org.eclipse.team.internal.ui.actions.TeamAction; */ public class DisconnectAction extends TeamAction { - protected void execute(IAction action) throws InvocationTargetException, - InterruptedException { + protected void execute(IAction action) { IProject projects[] = getSelectedProjects(); try { for (int i = 0; i < projects.length; i++) { diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemMainPage.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemMainPage.java index 3efff6690..0efeae81e 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemMainPage.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemMainPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. + * Copyright (c) 2000, 2009 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 @@ -281,19 +281,18 @@ public class FileSystemMainPage extends WizardPage { * Validates the contents of the editable fields and set page completion * and error messages appropriately. */ - private void validateFields() { + void validateFields() { String location = locationCombo.getText(); if (location.length() == 0) { setErrorMessage(null); setPageComplete(false); return; - } else { - File file = new File(location); - if(!file.exists() || !file.isDirectory()) { - setErrorMessage(Policy.bind("FileSystemMainPage.notValidLocation")); //$NON-NLS-1$ - setPageComplete(false); - return; - } + } + File file = new File(location); + if(!file.exists() || !file.isDirectory()) { + setErrorMessage(Policy.bind("FileSystemMainPage.notValidLocation")); //$NON-NLS-1$ + setPageComplete(false); + return; } setErrorMessage(null); setPageComplete(true); diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemRevisionEditorInput.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemRevisionEditorInput.java index 875074ab8..41757a4d6 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemRevisionEditorInput.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemRevisionEditorInput.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006 IBM Corporation and others. + * Copyright (c) 2006, 2009 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 @@ -34,6 +34,7 @@ public class FileSystemRevisionEditorInput extends PlatformObject implements IWo try { this.storage = revision.getStorage(new NullProgressMonitor()); } catch (CoreException e) { + // ignore } } @@ -56,7 +57,7 @@ public class FileSystemRevisionEditorInput extends PlatformObject implements IWo return null; } - public IStorage getStorage() throws CoreException { + public IStorage getStorage() { return storage; } @@ -84,10 +85,7 @@ public class FileSystemRevisionEditorInput extends PlatformObject implements IWo public String getToolTipText() { if (fileRevision != null) - try { - return getStorage().getFullPath().toString(); - } catch (CoreException e) { - } + return getStorage().getFullPath().toString(); if (storage != null) return storage.getFullPath().toString(); diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetAction.java index c0fccaadc..9cfe613ff 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetAction.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. + * Copyright (c) 2000, 2009 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 @@ -20,8 +20,7 @@ import org.eclipse.team.examples.filesystem.Policy; */ public class GetAction extends FileSystemAction { - protected void execute(IAction action) throws InvocationTargetException, - InterruptedException { + protected void execute(IAction action) { try { GetOperation operation = new GetOperation(getTargetPart(), FileSystemOperation.createScopeManager(Policy.bind("GetAction.working"), getSelectedMappings())); //$NON-NLS-1$ diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/MergeAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/MergeAction.java index 0b8285239..6300832a0 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/MergeAction.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/MergeAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 IBM Corporation and others. + * Copyright (c) 2006, 2009 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 @@ -24,8 +24,7 @@ import org.eclipse.team.ui.synchronize.ModelMergeOperation; */ public class MergeAction extends FileSystemAction { - protected void execute(IAction action) throws InvocationTargetException, - InterruptedException { + protected void execute(IAction action) { try { ModelMergeOperation operation; if (isUseSyncFramework()) { diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergeOperation.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergeOperation.java index 272e16f51..e736d5c11 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergeOperation.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergeOperation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006 IBM Corporation and others. + * Copyright (c) 2006, 2009 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 @@ -12,6 +12,7 @@ package org.eclipse.team.examples.filesystem.ui; import org.eclipse.core.resources.mapping.RemoteResourceMappingContext; import org.eclipse.core.runtime.*; +import org.eclipse.core.runtime.jobs.Job; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.team.core.mapping.ISynchronizationContext; @@ -64,7 +65,7 @@ public class NonSyncModelMergeOperation extends ModelMergeOperation { RemoteResourceMappingContext.FILE_CONTENTS_REQUIRED, new SubProgressMonitor(monitor, 75)); // What for the context to asynchronously update the diff tree try { - Platform.getJobManager().join(context, new SubProgressMonitor(monitor, 25)); + Job.getJobManager().join(context, new SubProgressMonitor(monitor, 25)); } catch (InterruptedException e) { // Ignore } diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergePage.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergePage.java index 00065f1bd..1ec6e3b52 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergePage.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergePage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 IBM Corporation and others. + * Copyright (c) 2006, 2009 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 @@ -39,7 +39,7 @@ import org.eclipse.ui.part.Page; public class NonSyncModelMergePage extends Page { IMergeContext context; - private TreeViewer viewer; + TreeViewer viewer; List mappings; /* diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/OpenFileSystemRevisionAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/OpenFileSystemRevisionAction.java index d0fb31a1a..2220a4032 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/OpenFileSystemRevisionAction.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/OpenFileSystemRevisionAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006 IBM Corporation and others. + * Copyright (c) 2006, 2009 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 @@ -39,7 +39,7 @@ import org.eclipse.ui.progress.IProgressService; public class OpenFileSystemRevisionAction extends BaseSelectionListenerAction { private IStructuredSelection selection; - private HistoryPage page; + HistoryPage page; public OpenFileSystemRevisionAction(String text) { super(text); @@ -58,7 +58,7 @@ public class OpenFileSystemRevisionAction extends BaseSelectionListenerAction { MessageDialog.openError(page.getSite().getShell(), "Deleted Revision", "Can't open a deleted revision"); } else { IRunnableWithProgress runnable = new IRunnableWithProgress() { - public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { + public void run(IProgressMonitor monitor) throws InvocationTargetException { IStorage file; try { file = revision.getStorage(monitor); @@ -83,7 +83,9 @@ public class OpenFileSystemRevisionAction extends BaseSelectionListenerAction { try { progressService.run(false, false, runnable); } catch (InvocationTargetException e) { + // ignore } catch (InterruptedException e) { + // ignore } } @@ -98,7 +100,7 @@ public class OpenFileSystemRevisionAction extends BaseSelectionListenerAction { try { type = Platform.getContentTypeManager().findContentTypeFor(contents, fileName); } catch (IOException e) { - + // ignore } } if (type == null) { @@ -141,7 +143,7 @@ public class OpenFileSystemRevisionAction extends BaseSelectionListenerAction { return true; } - private boolean editorAlreadyOpenOnContents(FileSystemRevisionEditorInput input) { + boolean editorAlreadyOpenOnContents(FileSystemRevisionEditorInput input) { IEditorReference[] editorRefs = page.getSite().getPage().getEditorReferences(); for (int i = 0; i < editorRefs.length; i++) { IEditorPart part = editorRefs[i].getEditor(false); diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ProjectSetSerializer.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ProjectSetSerializer.java index 7181b6587..c0d0a62c0 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ProjectSetSerializer.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ProjectSetSerializer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. + * Copyright (c) 2000, 2009 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 @@ -29,7 +29,7 @@ public class ProjectSetSerializer implements IProjectSetSerializer { /* (non-Javadoc) * @see org.eclipse.team.core.IProjectSetSerializer#asReference(org.eclipse.core.resources.IProject[], java.lang.Object, org.eclipse.core.runtime.IProgressMonitor) */ - public String[] asReference(IProject[] providerProjects, Object context, IProgressMonitor monitor) throws TeamException { + public String[] asReference(IProject[] providerProjects, Object context, IProgressMonitor monitor) { Assert.isTrue(context instanceof Shell); List refs = new ArrayList(); for (int i = 0; i < providerProjects.length; i++) { @@ -45,7 +45,7 @@ public class ProjectSetSerializer implements IProjectSetSerializer { /* (non-Javadoc) * @see org.eclipse.team.core.IProjectSetSerializer#addToWorkspace(java.lang.String[], java.lang.String, java.lang.Object, org.eclipse.core.runtime.IProgressMonitor) */ - public IProject[] addToWorkspace(String[] referenceStrings, String filename, Object context, IProgressMonitor monitor) throws TeamException { + public IProject[] addToWorkspace(String[] referenceStrings, String filename, Object context, IProgressMonitor monitor) { Assert.isTrue(context instanceof Shell); List projects = new ArrayList(); for (int i = 0; i < referenceStrings.length; i++) { diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutAction.java index 1d81fd1b5..185bf4cb0 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutAction.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. + * Copyright (c) 2000, 2009 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 @@ -20,8 +20,7 @@ import org.eclipse.team.examples.filesystem.Policy; */ public class PutAction extends FileSystemAction { - protected void execute(IAction action) throws InvocationTargetException, - InterruptedException { + protected void execute(IAction action) { try { PutOperation operation = new PutOperation(getTargetPart(), FileSystemOperation.createScopeManager(Policy.bind("PutAction.working"), getSelectedMappings())); //$NON-NLS-1$ diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ShowHistoryAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ShowHistoryAction.java index ef13205a2..762d3ee8e 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ShowHistoryAction.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ShowHistoryAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006 IBM Corporation and others. + * Copyright (c) 2006, 2009 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 @@ -30,13 +30,13 @@ import org.eclipse.ui.actions.ActionDelegate; public class ShowHistoryAction extends ActionDelegate implements IObjectActionDelegate { - private IStructuredSelection fSelection; + IStructuredSelection fSelection; public void run(IAction action) { final Shell shell = Display.getDefault().getActiveShell(); try { new ProgressMonitorDialog(shell).run(true, true, new IRunnableWithProgress() { - public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { + public void run(IProgressMonitor monitor) { final IResource resource = (IResource) fSelection.getFirstElement(); Runnable r = new Runnable() { public void run() { @@ -48,7 +48,9 @@ public class ShowHistoryAction extends ActionDelegate implements IObjectActionDe } }); } catch (InvocationTargetException exception) { + // ignore } catch (InterruptedException exception) { + // ignore } } @@ -59,6 +61,6 @@ public class ShowHistoryAction extends ActionDelegate implements IObjectActionDe } public void setActivePart(IAction action, IWorkbenchPart targetPart) { - + // do nothing } } diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeAction.java index 42faf76af..b1064ac48 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeAction.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. + * Copyright (c) 2000, 2009 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 @@ -10,8 +10,6 @@ *******************************************************************************/ package org.eclipse.team.examples.filesystem.ui; -import java.lang.reflect.InvocationTargetException; - import org.eclipse.core.resources.mapping.ResourceMapping; import org.eclipse.jface.action.IAction; import org.eclipse.team.core.subscribers.SubscriberScopeManager; @@ -26,8 +24,7 @@ import org.eclipse.team.ui.synchronize.ISynchronizeParticipant; */ public class SynchronizeAction extends FileSystemAction { - protected void execute(IAction action) throws InvocationTargetException, - InterruptedException { + protected void execute(IAction action) { ResourceMapping[] mappings = getSelectedMappings(); if (mappings.length == 0) return; |