Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.team.cvs.core/.project1
-rw-r--r--bundles/org.eclipse.team.cvs.core/plugin.xml2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java4
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java49
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java10
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java10
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RLog.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TemplateHandler.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java1
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/CompareDiffListener.java4
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSAuthenticationException.java4
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSCommunicationException.java5
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java4
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSServerException.java4
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnection.java3
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/UserInfo.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java8
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java1
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java7
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/NotifyInfo.java6
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AssertionFailedException.java1
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ReplaceWithBaseVisitor.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/.project1
-rw-r--r--bundles/org.eclipse.team.cvs.ui/plugin.xml1
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/BranchPromptDialog.java1
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java1
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorConfiguration.java1
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java5
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java47
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/EditorsDialog.java9
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilterDialog.java1
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IgnoreResourcesDialog.java10
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java6
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteRevisionQuickDiffProvider.java6
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagAsVersionDialog.java1
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagConfigurationDialog.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WatchEditPreferencePage.java1
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ConfigureTagsFromRepoViewOnFolder.java5
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenLogEntryAction.java15
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenRemoteFileAction.java9
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java3
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java3
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/VersionCategory.java3
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagOperation.java8
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CVSRepositoryPropertiesPage.java7
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CopyRepositoryNameAction.java7
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectSelectionPage.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoteTagsView.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveDateTagAction.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveRootAction.java3
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryManager.java24
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SyncInfoSetDetailsDialog.java3
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSummaryPage.java2
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemPropertiesPage.java9
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ProjectSetSerializer.java2
61 files changed, 119 insertions, 227 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/.project b/bundles/org.eclipse.team.cvs.core/.project
index 617df8d52..6ffdf00f9 100644
--- a/bundles/org.eclipse.team.cvs.core/.project
+++ b/bundles/org.eclipse.team.cvs.core/.project
@@ -6,7 +6,6 @@
<project>org.eclipse.core.boot</project>
<project>org.eclipse.core.resources</project>
<project>org.eclipse.core.runtime</project>
- <project>org.eclipse.core.runtime.compatibility</project>
<project>org.eclipse.team.core</project>
</projects>
<buildSpec>
diff --git a/bundles/org.eclipse.team.cvs.core/plugin.xml b/bundles/org.eclipse.team.cvs.core/plugin.xml
index 6bb09f7cf..de780b6a5 100644
--- a/bundles/org.eclipse.team.cvs.core/plugin.xml
+++ b/bundles/org.eclipse.team.cvs.core/plugin.xml
@@ -14,7 +14,7 @@
</library>
</runtime>
<requires>
- <import plugin="org.eclipse.core.runtime.compatibility"/>
+ <import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.team.core"/>
</requires>
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java
index 3aaf0a21f..9a3e93f5d 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java
@@ -31,7 +31,9 @@ import org.eclipse.team.core.TeamException;
*/
public class CVSException extends TeamException {
- public CVSException(CoreException e) {
+ private static final long serialVersionUID = 1L;
+
+ public CVSException(CoreException e) {
super(e);
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java
index 7fba2afcc..a3bf22538 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java
@@ -25,6 +25,7 @@ import org.eclipse.team.internal.ccvs.core.client.Command.QuietOption;
import org.eclipse.team.internal.ccvs.core.client.listeners.IConsoleListener;
import org.eclipse.team.internal.ccvs.core.resources.FileModificationManager;
import org.eclipse.team.internal.ccvs.core.util.*;
+import org.osgi.framework.BundleContext;
public class CVSProviderPlugin extends Plugin {
@@ -132,8 +133,8 @@ public class CVSProviderPlugin extends Plugin {
* Constructor for CVSProviderPlugin.
* @param descriptor
*/
- public CVSProviderPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
+ public CVSProviderPlugin() {
+ super();
instance = this;
}
@@ -266,10 +267,10 @@ public class CVSProviderPlugin extends Plugin {
}
/**
- * @see Plugin#startup()
+ * @see Plugin#start(BundleContext)
*/
- public void startup() throws CoreException {
- super.startup();
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
Policy.localize("org.eclipse.team.internal.ccvs.core.messages"); //$NON-NLS-1$
// load the state which includes the known repositories
@@ -281,7 +282,7 @@ public class CVSProviderPlugin extends Plugin {
addDeleteMoveListener = new BuildCleanupListener();
fileModificationManager = new FileModificationManager();
metaFileSyncListener = new SyncFileChangeListener();
- workspace.addResourceChangeListener(addDeleteMoveListener, IResourceChangeEvent.POST_AUTO_BUILD);
+ workspace.addResourceChangeListener(addDeleteMoveListener, IResourceChangeEvent.POST_BUILD);
workspace.addResourceChangeListener(metaFileSyncListener, IResourceChangeEvent.POST_CHANGE);
workspace.addResourceChangeListener(fileModificationManager, IResourceChangeEvent.POST_CHANGE);
fileModificationManager.registerSaveParticipant();
@@ -290,24 +291,26 @@ public class CVSProviderPlugin extends Plugin {
}
/**
- * @see Plugin#shutdown()
+ * @see Plugin#stop(BundleContext)
*/
- public void shutdown() throws CoreException {
- super.shutdown();
-
- savePluginPreferences();
-
- // remove listeners
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- workspace.removeResourceChangeListener(metaFileSyncListener);
- workspace.removeResourceChangeListener(fileModificationManager);
- workspace.removeResourceChangeListener(addDeleteMoveListener);
-
- // remove all of this plugin's save participants. This is easier than having
- // each class that added itself as a participant to have to listen to shutdown.
- workspace.removeSaveParticipant(this);
-
- deleteCrashFile();
+ public void stop(BundleContext context) throws Exception {
+ try {
+ savePluginPreferences();
+
+ // remove listeners
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ workspace.removeResourceChangeListener(metaFileSyncListener);
+ workspace.removeResourceChangeListener(fileModificationManager);
+ workspace.removeResourceChangeListener(addDeleteMoveListener);
+
+ // remove all of this plugin's save participants. This is easier than having
+ // each class that added itself as a participant to have to listen to shutdown.
+ workspace.removeSaveParticipant(this);
+
+ deleteCrashFile();
+ } finally {
+ super.stop(context);
+ }
}
/**
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java
index e6ef32574..6a00cdee4 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java
@@ -138,7 +138,6 @@ public class CVSTeamProvider extends RepositoryProvider {
private CVSWorkspaceRoot workspaceRoot;
private IProject project;
- private String comment = ""; //$NON-NLS-1$
private static MoveDeleteHook moveDeleteHook= new MoveDeleteHook();
private static IFileModificationValidator fileModificationValidator;
@@ -151,7 +150,7 @@ public class CVSTeamProvider extends RepositoryProvider {
new QualifiedName("org.eclipse.team.cvs.core", "watch_edit"); //$NON-NLS-1$ //$NON-NLS-2$
private static IFileModificationValidator getPluggedInValidator() {
- IExtension[] extensions = Platform.getPluginRegistry().getExtensionPoint(CVSProviderPlugin.ID, CVSProviderPlugin.PT_FILE_MODIFICATION_VALIDATOR).getExtensions();
+ IExtension[] extensions = Platform.getExtensionRegistry().getExtensionPoint(CVSProviderPlugin.ID, CVSProviderPlugin.PT_FILE_MODIFICATION_VALIDATOR).getExtensions();
if (extensions.length == 0)
return null;
IExtension extension = extensions[0];
@@ -400,13 +399,6 @@ public class CVSTeamProvider extends RepositoryProvider {
throw e;
}
}
-
- /**
- * Set the comment to be used on the next checkin
- */
- public void setComment(String comment) {
- this.comment = comment;
- }
/*
* @see ITeamProvider#isDirty(IResource)
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java
index 6aaa205f7..df7265f5c 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java
@@ -11,17 +11,12 @@
package org.eclipse.team.internal.ccvs.core.client;
-import java.util.Set;
import java.util.StringTokenizer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.Team;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.ICVSResourceVisitor;
-import org.eclipse.team.internal.ccvs.core.Policy;
+import org.eclipse.team.internal.ccvs.core.*;
import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
import org.eclipse.team.internal.ccvs.core.util.FileNameMatcher;
@@ -39,9 +34,7 @@ class ImportStructureVisitor implements ICVSResourceVisitor {
private static final String QUOTE = "'"; //$NON-NLS-1$
protected Session session;
- private Set sentFolders;
protected IProgressMonitor monitor;
- private String[] wrappers;
private FileNameMatcher ignoreMatcher;
private FileNameMatcher wrapMatcher;
@@ -57,7 +50,6 @@ class ImportStructureVisitor implements ICVSResourceVisitor {
this.session = session;
this.monitor = Policy.infiniteSubMonitorFor(monitor, 512);
- this.wrappers = wrappers;
wrapMatcher = initWrapMatcher(wrappers);
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RLog.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RLog.java
index f9eb0c916..7bf4135ac 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RLog.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RLog.java
@@ -54,7 +54,7 @@ public class RLog extends RemoteCommand {
if(date1.compareTo(date2) > 0) {
operator = ">"; //$NON-NLS-1$
}
- return new LocalOption("-d'" + tag1.getName() + "'"+ operator + "'" + tag2.getName() + "'", null); //$NON-NLS-1$ //$NON-NLS-2$
+ return new LocalOption("-d'" + tag1.getName() + "'"+ operator + "'" + tag2.getName() + "'", null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
default:
// Unknow tag type!!!
throw new IllegalArgumentException();
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java
index 5066ce408..d20003811 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java
@@ -227,7 +227,7 @@ public abstract class Request {
}
// handle other responses
} else {
- ResponseHandler handler = (ResponseHandler) session.getResponseHandler(response);
+ ResponseHandler handler = session.getResponseHandler(response);
if (handler != null) {
handler.handle(session, argument, monitor);
} else {
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TemplateHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TemplateHandler.java
index e55ead110..3ac00c8af 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TemplateHandler.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TemplateHandler.java
@@ -41,7 +41,7 @@ public class TemplateHandler extends ResponseHandler {
* @see org.eclipse.team.internal.ccvs.core.client.ResponseHandler#handle(org.eclipse.team.internal.ccvs.core.client.Session, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
*/
public void handle(Session session, String localDir, IProgressMonitor monitor) throws CVSException {
- String remoteDir = session.readLine();
+ session.readLine(); /* read the remote dir which is not needed */
ICVSFolder localFolder = getExistingFolder(session, localDir);
IContainer container = (IContainer)localFolder.getIResource();
ICVSStorage templateFile;
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java
index 901c54edd..d3075e557 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java
@@ -126,7 +126,6 @@ public class Update extends Command {
List newOptions = new ArrayList(Arrays.asList(localOptions));
// Look for absent directories if enabled and the option is not already included
- ICVSFolder sessionRoot = session.getLocalRoot();
IResource resource = null;
RepositoryProvider provider = null;
// If there is a provider, use the providers setting
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/CompareDiffListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/CompareDiffListener.java
index 4800a00e3..fcaa933a0 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/CompareDiffListener.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/CompareDiffListener.java
@@ -99,10 +99,6 @@ public class CompareDiffListener extends CommandOutputListener {
return OK;
}
- private IStatus handleUnknownDiffFormat(String line) {
- return new CVSStatus(IStatus.ERROR, Policy.bind("CompareDiffListener.12", line)); //$NON-NLS-1$
- }
-
public IStatus errorLine(
String line,
ICVSRepositoryLocation location,
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSAuthenticationException.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSAuthenticationException.java
index b4c308a84..b686f7a30 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSAuthenticationException.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSAuthenticationException.java
@@ -18,7 +18,9 @@ import org.eclipse.team.internal.ccvs.core.Policy;
public class CVSAuthenticationException extends CVSException {
- /**
+ private static final long serialVersionUID = 1L;
+
+ /**
* Code indicating that authentication can be retried after
* prompting the user for corrected authentication information
*/
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSCommunicationException.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSCommunicationException.java
index 684ea5c39..44b079b07 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSCommunicationException.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSCommunicationException.java
@@ -22,7 +22,9 @@ import org.eclipse.team.internal.ccvs.core.Policy;
public class CVSCommunicationException extends CVSException {
- /**
+ private static final long serialVersionUID = 1L;
+
+ /**
* Create a new <code>CVSCommunicationException with the
* given status.
*/
@@ -58,7 +60,6 @@ public class CVSCommunicationException extends CVSException {
public static IStatus getStatusFor(Exception e) {
if (e instanceof InterruptedIOException) {
- InterruptedIOException ioEx = (InterruptedIOException) e;
MultiStatus status = new MultiStatus(CVSProviderPlugin.ID, 0, getMessageFor(e), e);
status.add(new CVSStatus(IStatus.ERROR, Policy.bind("CVSCommunicationException.interruptCause"))); //$NON-NLS-1$
status.add(new CVSStatus(IStatus.ERROR, Policy.bind("CVSCommunicationException.interruptSolution"))); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
index 535ccc610..036ccde96 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
@@ -467,7 +467,7 @@ public class CVSRepositoryLocation extends PlatformObject implements ICVSReposit
if (STANDALONE_MODE) {
connectionMethods.add(new PServerConnectionMethod());
} else {
- IExtension[] extensions = Platform.getPluginRegistry().getExtensionPoint(CVSProviderPlugin.ID, CVSProviderPlugin.PT_CONNECTIONMETHODS).getExtensions();
+ IExtension[] extensions = Platform.getExtensionRegistry().getExtensionPoint(CVSProviderPlugin.ID, CVSProviderPlugin.PT_CONNECTIONMETHODS).getExtensions();
for(int i=0; i<extensions.length; i++) {
IExtension extension = extensions[i];
IConfigurationElement[] configs = extension.getConfigurationElements();
@@ -522,7 +522,7 @@ public class CVSRepositoryLocation extends PlatformObject implements ICVSReposit
* Get the pluged-in authenticator from the plugin manifest.
*/
private static IUserAuthenticator getPluggedInAuthenticator() {
- IExtension[] extensions = Platform.getPluginRegistry().getExtensionPoint(CVSProviderPlugin.ID, CVSProviderPlugin.PT_AUTHENTICATOR).getExtensions();
+ IExtension[] extensions = Platform.getExtensionRegistry().getExtensionPoint(CVSProviderPlugin.ID, CVSProviderPlugin.PT_AUTHENTICATOR).getExtensions();
if (extensions.length == 0)
return null;
IExtension extension = extensions[0];
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSServerException.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSServerException.java
index 99bf0b6dc..a0cfa8f9d 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSServerException.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSServerException.java
@@ -22,7 +22,9 @@ import org.eclipse.team.internal.ccvs.core.CVSStatus;
*/
public class CVSServerException extends CVSException {
- /**
+ private static final long serialVersionUID = 1L;
+
+ /**
* Return true if the exception from the cvs server is the no tag error, and false
* otherwise.
*/
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnection.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnection.java
index b5617526c..225dfd09b 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnection.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnection.java
@@ -32,9 +32,6 @@ import org.eclipse.team.internal.core.streams.TimeoutOutputStream;
*/
public class ExtConnection implements IServerConnection {
- // The default port for rsh
- private static final int DEFAULT_PORT = 9999;
-
// cvs format for the repository (e.g. :extssh:user@host:/home/cvs/repo)
private ICVSRepositoryLocation location;
private String password;
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/UserInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/UserInfo.java
index 110aeedcb..62d50b6e6 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/UserInfo.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/UserInfo.java
@@ -44,7 +44,7 @@ public class UserInfo implements IUserInfo {
* @see IUserInfo#isUsernameMutable()
*/
public boolean isUsernameMutable() {
- return false;
+ return isUsernameMutable;
}
/*
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
index 6a5c4bdc4..496d692ad 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
@@ -351,7 +351,7 @@ public class RemoteFolder extends RemoteResource implements ICVSRemoteFolder, IC
throw new CVSException(IStatus.ERROR, CHILD_DOES_NOT_EXIST, Policy.bind("RemoteFolder.invalidChild", path, getName()));//$NON-NLS-1$
for (int i=0;i<children.length;i++) {
if (children[i].getName().equals(path))
- return (ICVSResource)children[i];
+ return children[i];
}
}
throw new CVSException(IStatus.ERROR, CHILD_DOES_NOT_EXIST, Policy.bind("RemoteFolder.invalidChild", path, getName()));//$NON-NLS-1$
@@ -418,7 +418,7 @@ public class RemoteFolder extends RemoteResource implements ICVSRemoteFolder, IC
/*
* @see IRemoteResource#getContents(IProgressMonitor)
*/
- public InputStream getContents(IProgressMonitor progress) throws TeamException {
+ public InputStream getContents(IProgressMonitor progress) {
return null;
}
@@ -580,7 +580,7 @@ public class RemoteFolder extends RemoteResource implements ICVSRemoteFolder, IC
/* (non-Javadoc)
* @see org.eclipse.team.core.sync.IRemoteResource#getComment()
*/
- public String getComment() throws TeamException {
+ public String getComment() {
return null;
}
@@ -594,7 +594,7 @@ public class RemoteFolder extends RemoteResource implements ICVSRemoteFolder, IC
/* (non-Javadoc)
* @see org.eclipse.team.core.sync.IRemoteResource#getCreatorDisplayName()
*/
- public String getCreatorDisplayName() throws TeamException {
+ public String getCreatorDisplayName() {
return null;
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java
index 8f0809751..52d927356 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java
@@ -681,7 +681,6 @@ public class RemoteFolderTreeBuilder {
private void fetchFileRevisions(Session session, String[] fileNames, final IProgressMonitor monitor) throws CVSException {
// Create a listener for receiving the revision info
- final Map revisions = new HashMap();
final List exceptions = new ArrayList();
IStatusListener listener = new IStatusListener() {
public void fileStatus(ICVSFolder root, String path, String remoteRevision) {
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java
index f32081e6e..b924aef97 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java
@@ -76,7 +76,6 @@ public class RemoteModule extends RemoteFolder {
Map modules = new HashMap();
Map referencedModulesTable = new HashMap();
Map moduleAliases = new HashMap();
- List acceptableModules = new ArrayList();
// First pass: Create the remote module instances based on remote mapping
for (int i = 0; i < moduleDefinitionStrings.length; i++) {
@@ -134,7 +133,7 @@ public class RemoteModule extends RemoteFolder {
while (tokenizer.hasMoreTokens())
expansions.add(tokenizer.nextToken());
- moduleAliases.put(moduleName, (String[]) expansions.toArray(new String[expansions.size()]));
+ moduleAliases.put(moduleName, expansions.toArray(new String[expansions.size()]));
modules.put(moduleName, new RemoteModule(moduleName, null, repository, null, localOptions, tag, true));
} else {
@@ -167,7 +166,7 @@ public class RemoteModule extends RemoteFolder {
children.add(next);
while (tokenizer.hasMoreTokens())
children.add(tokenizer.nextToken());
- referencedModulesTable.put(moduleName, (String[])children.toArray(new String[children.size()]));
+ referencedModulesTable.put(moduleName, children.toArray(new String[children.size()]));
}
}
}
@@ -387,7 +386,7 @@ public class RemoteModule extends RemoteFolder {
if (path.indexOf(Session.SERVER_SEPARATOR) == -1) {
for (int i=0;i<referencedModules.length;i++) {
if (referencedModules[i].getName().equals(path))
- return (ICVSResource)referencedModules[i];
+ return referencedModules[i];
}
}
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/NotifyInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/NotifyInfo.java
index 6d387579d..bee8ae3ac 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/NotifyInfo.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/NotifyInfo.java
@@ -16,10 +16,7 @@ import java.text.ParseException;
import java.util.Date;
import org.eclipse.core.resources.IContainer;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.ICVSFolder;
-import org.eclipse.team.internal.ccvs.core.Policy;
-import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
+import org.eclipse.team.internal.ccvs.core.*;
import org.eclipse.team.internal.ccvs.core.util.CVSDateFormatter;
import org.eclipse.team.internal.ccvs.core.util.Util;
@@ -57,7 +54,6 @@ public class NotifyInfo {
* @param line
*/
public NotifyInfo(IContainer parent, String line) throws CVSException {
- ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor(parent);
String[] strings = Util.parseIntoSubstrings(line, ResourceSyncInfo.SEPARATOR);
if(strings.length != 4) {
throw new CVSException(Policy.bind("NotifyInfo.MalformedLine", line)); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AssertionFailedException.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AssertionFailedException.java
index 97bf4f022..1b4dd6b47 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AssertionFailedException.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AssertionFailedException.java
@@ -22,6 +22,7 @@ package org.eclipse.team.internal.ccvs.core.util;
*/
/* package */
class AssertionFailedException extends RuntimeException {
+private static final long serialVersionUID = 1L;
/** Constructs a new exception.
*/
public AssertionFailedException() {
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ReplaceWithBaseVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ReplaceWithBaseVisitor.java
index 4b21ed5ed..e4f36e23b 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ReplaceWithBaseVisitor.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ReplaceWithBaseVisitor.java
@@ -50,8 +50,6 @@ public class ReplaceWithBaseVisitor implements ICVSResourceVisitor {
}
// Fetch the file from the server
if (isModified) {
- ICVSFolder parent = file.getParent();
- FolderSyncInfo folderInfo = parent.getFolderSyncInfo();
// Use the session opened in tghe replaceWithBase method to make the connection.
Command.UPDATE.execute(this.session, Command.NO_GLOBAL_OPTIONS,
new LocalOption[] {Update.makeTagOption(CVSTag.BASE), Update.IGNORE_LOCAL_CHANGES},
diff --git a/bundles/org.eclipse.team.cvs.ui/.project b/bundles/org.eclipse.team.cvs.ui/.project
index e1ca1adc1..d2ad7be17 100644
--- a/bundles/org.eclipse.team.cvs.ui/.project
+++ b/bundles/org.eclipse.team.cvs.ui/.project
@@ -7,7 +7,6 @@
<project>org.eclipse.core.resources</project>
<project>org.eclipse.core.resources.spysupport</project>
<project>org.eclipse.core.runtime</project>
- <project>org.eclipse.core.runtime.compatibility</project>
<project>org.eclipse.jface.text</project>
<project>org.eclipse.team.core</project>
<project>org.eclipse.team.cvs.core</project>
diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.xml b/bundles/org.eclipse.team.cvs.ui/plugin.xml
index ffa8b09a1..bdbb2b270 100644
--- a/bundles/org.eclipse.team.cvs.ui/plugin.xml
+++ b/bundles/org.eclipse.team.cvs.ui/plugin.xml
@@ -14,7 +14,6 @@
</library>
</runtime>
<requires>
- <import plugin="org.eclipse.core.runtime.compatibility"/>
<import plugin="org.eclipse.ui.ide" optional="true"/>
<import plugin="org.eclipse.ui.views" optional="true"/>
<import plugin="org.eclipse.jface.text" optional="true"/>
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java
index 6f4e08eb2..3aa447ee1 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java
@@ -92,7 +92,7 @@ public class AlternateUserValidationDialog extends Dialog {
if (inUpdate) return;
e.doit = false;
inUpdate = true;
- switch ((int)e.character) {
+ switch (e.character) {
case 8: {
// backspace pressed
if (password.length() > 0) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/BranchPromptDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/BranchPromptDialog.java
index fea313b87..e36729f7c 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/BranchPromptDialog.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/BranchPromptDialog.java
@@ -210,7 +210,6 @@ public class BranchPromptDialog extends DetailsDialog {
*/
protected void updateEnablements() {
String message = null;
- boolean complete = false;
if (branchTag.length() == 0) {
message = ""; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java
index 4963eafe2..fe20f0053 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java
@@ -368,7 +368,6 @@ public class CVSCompareRevisionsInput extends CompareEditorInput implements ISav
* @see org.eclipse.compare.CompareEditorInput#getTitle()
*/
public String getTitle() {
- String resourceName = resource.getName();
return Policy.bind("CVSCompareRevisionsInput.compareResourceAndVersions", new Object[] {resource.getFullPath().toString()}); //$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorConfiguration.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorConfiguration.java
index 79eba69a7..c46b713d2 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorConfiguration.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorConfiguration.java
@@ -42,7 +42,6 @@ public class CVSDecoratorConfiguration {
public static final String DEFAULT_PROJECTTEXTFORMAT = "{dirty_flag}{name} {tag} [{host}]"; //$NON-NLS-1$
// prefix characters that can be removed if the following binding is not found
- private static final char KEYWORD_SEPSPACE = ' ';
private static final char KEYWORD_SEPCOLON = ':';
private static final char KEYWORD_SEPAT = '@';
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java
index ef27dbefb..e468f615d 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java
@@ -125,7 +125,6 @@ public class CVSDecoratorPreferencesPage extends PreferencePage implements IWork
}
protected void updateExamples() {
- String example = ""; //$NON-NLS-1$
Map bindings = new HashMap();
try {
ICVSRepositoryLocation location = CVSRepositoryLocation.fromString(":pserver:username@host.acme.org:/home/cvsroot"); //$NON-NLS-1$
@@ -141,7 +140,7 @@ public class CVSDecoratorPreferencesPage extends PreferencePage implements IWork
bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_ROOT, location.getRootDirectory());
bindings.put(CVSDecoratorConfiguration.REMOTELOCATION_REPOSITORY, "org.eclipse.project1"); //$NON-NLS-1$
} catch(CVSException e) {
- example = e.getMessage();
+ // Ignore
}
bindings.put(CVSDecoratorConfiguration.RESOURCE_NAME, "file.txt"); //$NON-NLS-1$
setTextFormatExample(bindings);
@@ -390,7 +389,7 @@ public class CVSDecoratorPreferencesPage extends PreferencePage implements IWork
IStructuredContentProvider contentsProvider = new IStructuredContentProvider() {
public Object[] getElements(Object inputElement) {
- return (Object[]) variables.toArray(new StringPair[variables.size()]);
+ return variables.toArray(new StringPair[variables.size()]);
}
public void dispose() {}
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
index ef60f7db2..86e6e41c4 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
@@ -44,6 +44,7 @@ import org.eclipse.team.ui.TeamUI;
import org.eclipse.team.ui.synchronize.ISynchronizeParticipantReference;
import org.eclipse.ui.*;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
/**
* UI Plugin for CVS provider-specific workbench functionality.
@@ -83,12 +84,8 @@ public class CVSUIPlugin extends AbstractUIPlugin {
*
* @param descriptor the plugin descriptor
*/
- public CVSUIPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
- // Initialize the images before the singleton is set
- // to avoid accesses before they are initialized
- initializeImages();
- initializePreferences();
+ public CVSUIPlugin() {
+ super();
plugin = this;
}
@@ -338,11 +335,7 @@ public class CVSUIPlugin extends AbstractUIPlugin {
public synchronized RepositoryManager getRepositoryManager() {
if (repositoryManager == null) {
repositoryManager = new RepositoryManager();
- try {
- repositoryManager.startup();
- } catch (TeamException e) {
- CVSUIPlugin.log(e);
- }
+ repositoryManager.startup();
}
return repositoryManager;
}
@@ -351,7 +344,7 @@ public class CVSUIPlugin extends AbstractUIPlugin {
* Initializes the table of images used in this plugin.
*/
private void initializeImages() {
- URL baseURL = getDescriptor().getInstallURL();
+ URL baseURL = getBundle().getEntry("/"); //$NON-NLS-1$
// objects
createImageDescriptor(ICVSUIConstants.IMG_REPOSITORY, baseURL);
@@ -650,12 +643,15 @@ public class CVSUIPlugin extends AbstractUIPlugin {
}
/**
- * @see Plugin#startup()
+ * @see Plugin#start(BundleContext)
*/
- public void startup() throws CoreException {
- super.startup();
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
Policy.localize("org.eclipse.team.internal.ccvs.ui.messages"); //$NON-NLS-1$
+ initializeImages();
+ initializePreferences();
+
CVSAdapterFactory factory = new CVSAdapterFactory();
Platform.getAdapterManager().registerAdapters(factory, ICVSRemoteFile.class);
Platform.getAdapterManager().registerAdapters(factory, ICVSRemoteFolder.class);
@@ -690,18 +686,21 @@ public class CVSUIPlugin extends AbstractUIPlugin {
}
/**
- * @see Plugin#shutdown()
+ * @see Plugin#stop(BundleContext)
*/
- public void shutdown() throws CoreException {
- super.shutdown();
+ public void stop(BundleContext context) throws Exception {
try {
- if (repositoryManager != null)
- repositoryManager.shutdown();
- } catch (TeamException e) {
- throw new CoreException(e.getStatus());
+ try {
+ if (repositoryManager != null)
+ repositoryManager.shutdown();
+ } catch (TeamException e) {
+ throw new CoreException(e.getStatus());
+ }
+
+ console.shutdown();
+ } finally {
+ super.stop(context);
}
-
- console.shutdown();
}
/**
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/EditorsDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/EditorsDialog.java
index cdf63f8fe..4a770a08e 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/EditorsDialog.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/EditorsDialog.java
@@ -12,16 +12,10 @@ package org.eclipse.team.internal.ccvs.ui;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Layout;
-import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.*;
import org.eclipse.team.internal.ccvs.core.EditorsInfo;
import org.eclipse.ui.help.WorkbenchHelp;
-
-
/**
*
* A dialog for showing the result of a cvs editors command.
@@ -47,7 +41,6 @@ public class EditorsDialog extends Dialog {
protected Control createDialogArea(Composite container) {
Composite parent = (Composite) super.createDialogArea(container);
- Layout layout = parent.getLayout();
getShell().setText(Policy.bind("EditorsDialog.title")); //$NON-NLS-1$
createMessageArea(parent);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilterDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilterDialog.java
index 892860fd7..1e27ea851 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilterDialog.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilterDialog.java
@@ -30,7 +30,6 @@ import org.eclipse.ui.help.WorkbenchHelp;
public class HistoryFilterDialog extends Dialog {
- private boolean dateEntered;
private HistoryView historyView;
private HistoryFilter historyFilter;
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IgnoreResourcesDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IgnoreResourcesDialog.java
index a8d331bab..6348357fb 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IgnoreResourcesDialog.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IgnoreResourcesDialog.java
@@ -53,7 +53,6 @@ public class IgnoreResourcesDialog extends Dialog {
private String customPattern;
// layout controls
- private static final int LABEL_WIDTH_HINT = 400;
private static final int LABEL_INDENT_WIDTH = 32;
/**
@@ -197,15 +196,6 @@ public class IgnoreResourcesDialog extends Dialog {
textbox.setLayoutData(data);
return textbox;
}
-
- private Label createWrappingLabel(Composite parent, String text) {
- Label label = new Label(parent, SWT.WRAP);
- label.setText(text);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.widthHint = LABEL_WIDTH_HINT;
- label.setLayoutData(data);
- return label;
- }
private Button createRadioButton(Composite parent, String text) {
Button button = new Button(parent, SWT.RADIO);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java
index 939da0f0d..72eb65826 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.team.internal.ccvs.ui;
-import org.eclipse.compare.CompareEditorInput;
import org.eclipse.core.resources.IResource;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogSettings;
@@ -22,9 +21,6 @@ import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.synchronize.SyncInfoTree;
import org.eclipse.team.internal.ui.dialogs.DetailsDialog;
import org.eclipse.ui.help.WorkbenchHelp;
@@ -37,8 +33,6 @@ public class ReleaseCommentDialog extends DetailsDialog {
// dialogs settings that are persistent between workbench sessions
private IDialogSettings settings;
private IResource[] resourcesToCommit;
- private CompareEditorInput compareEditorInput;
- private SyncInfoTree set;
private int depth;
private static final String HEIGHT_KEY = "width-key"; //$NON-NLS-1$
private static final String WIDTH_KEY = "height-key"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteRevisionQuickDiffProvider.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteRevisionQuickDiffProvider.java
index 17369cc27..91e3ffff4 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteRevisionQuickDiffProvider.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteRevisionQuickDiffProvider.java
@@ -143,7 +143,7 @@ public class RemoteRevisionQuickDiffProvider implements IQuickDiffReferenceProvi
if(fDocumentProvider != null) {
CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().addListener(teamChangeListener);
- ((IDocumentProvider)fDocumentProvider).addElementStateListener(documentListener);
+ fDocumentProvider.addElementStateListener(documentListener);
}
fReferenceInitialized= true;
}
@@ -206,8 +206,7 @@ public class RemoteRevisionQuickDiffProvider implements IQuickDiffReferenceProvi
} else if(info == null) {
return false;
}
-
- int kind = info.getKind();
+
if(fLastSyncState == null) {
needToUpdateReferenceDocument = true;
} else if(! fLastSyncState.equals(info)) {
@@ -229,7 +228,6 @@ public class RemoteRevisionQuickDiffProvider implements IQuickDiffReferenceProvi
private SyncInfo getSyncState(IResource resource) throws TeamException {
if (resource == null) return null;
- ICVSFile cvsFile = getManagedCVSFile();
return CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().getSyncInfo(resource);
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagAsVersionDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagAsVersionDialog.java
index 778cba445..bb0cdf9d0 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagAsVersionDialog.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagAsVersionDialog.java
@@ -223,7 +223,6 @@ public class TagAsVersionDialog extends DetailsDialog {
*/
protected void updateEnablements() {
String message = null;
- boolean exists = false;
if(tagName.length() == 0) {
message = ""; //$NON-NLS-1$
} else {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagConfigurationDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagConfigurationDialog.java
index aedee6d08..c27667e13 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagConfigurationDialog.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagConfigurationDialog.java
@@ -600,8 +600,6 @@ public class TagConfigurationDialog extends Dialog {
private boolean isTagSelectedInKnownTagTree() {
IStructuredSelection selection = (IStructuredSelection)cvsDefinedTagsTree.getSelection();
if (!selection.isEmpty()) {
- final List versions = new ArrayList();
- final List branches = new ArrayList();
Iterator it = selection.iterator();
while(it.hasNext()) {
Object o = it.next();
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WatchEditPreferencePage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WatchEditPreferencePage.java
index 0d714439c..14f0485bd 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WatchEditPreferencePage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WatchEditPreferencePage.java
@@ -22,7 +22,6 @@ public class WatchEditPreferencePage extends CVSFieldEditorPreferencePage {
private RadioGroupFieldEditor promptEditor;
private RadioGroupFieldEditor actionEditor;
- private IPreferenceStore source;
private IPreferenceStore store;
/**
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java
index 3a35ab468..ba4c47376 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java
@@ -186,7 +186,7 @@ public class WorkbenchUserAuthenticator implements IUserAuthenticator {
/**
* Special alternate prompting.
*/
- public void alternatePromptForUserInfo(final IUserInfo userinfo) throws CVSException {
+ public void alternatePromptForUserInfo(final IUserInfo userinfo) {
// ask the user for a password
final String[] result = new String[1];
Display display = Display.getCurrent();
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ConfigureTagsFromRepoViewOnFolder.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ConfigureTagsFromRepoViewOnFolder.java
index b8bce4213..691d92b3a 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ConfigureTagsFromRepoViewOnFolder.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ConfigureTagsFromRepoViewOnFolder.java
@@ -18,7 +18,6 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ccvs.core.ICVSFolder;
@@ -40,7 +39,7 @@ public class ConfigureTagsFromRepoViewOnFolder extends CVSAction {
ArrayList resources = null;
if (!selection.isEmpty()) {
resources = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
+ Iterator elements = selection.iterator();
while (elements.hasNext()) {
Object next = elements.next();
if (next instanceof RemoteModule) {
@@ -74,7 +73,7 @@ public class ConfigureTagsFromRepoViewOnFolder extends CVSAction {
public void run() {
ICVSFolder[] cvsFolders = new ICVSFolder[roots.length];
for (int i = 0; i < roots.length; i++) {
- cvsFolders[i] = (ICVSFolder)roots[i];
+ cvsFolders[i] = roots[i];
}
TagConfigurationDialog d = new TagConfigurationDialog(shell, cvsFolders);
d.open();
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenLogEntryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenLogEntryAction.java
index be6c748a5..e3da4a6e5 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenLogEntryAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenLogEntryAction.java
@@ -19,18 +19,11 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
import org.eclipse.team.internal.ccvs.core.ILogEntry;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
-import org.eclipse.team.internal.ccvs.ui.Policy;
-import org.eclipse.team.internal.ccvs.ui.RemoteFileEditorInput;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
+import org.eclipse.team.internal.ccvs.ui.*;
+import org.eclipse.ui.*;
public class OpenLogEntryAction extends CVSAction {
/**
@@ -40,11 +33,11 @@ public class OpenLogEntryAction extends CVSAction {
ArrayList entries = null;
if (!selection.isEmpty()) {
entries = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
+ Iterator elements = selection.iterator();
while (elements.hasNext()) {
Object next = elements.next();
if (next instanceof ILogEntry) {
- entries.add((ILogEntry)next);
+ entries.add(next);
continue;
}
if (next instanceof IAdaptable) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenRemoteFileAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenRemoteFileAction.java
index e0bed6d40..033fd3b9a 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenRemoteFileAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenRemoteFileAction.java
@@ -18,17 +18,12 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
import org.eclipse.team.internal.ccvs.core.ILogEntry;
import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
import org.eclipse.team.internal.ccvs.ui.RemoteFileEditorInput;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.*;
public class OpenRemoteFileAction extends CVSAction {
/**
@@ -38,7 +33,7 @@ public class OpenRemoteFileAction extends CVSAction {
ArrayList resources = null;
if (!selection.isEmpty()) {
resources = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
+ Iterator elements = selection.iterator();
while (elements.hasNext()) {
Object next = elements.next();
if (next instanceof ICVSRemoteFile) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java
index eccd2932f..1c9c95e02 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java
@@ -69,7 +69,7 @@ public class RestoreFromRepositoryAction extends CVSAction {
int index = line.indexOf(ATTIC);
if (index == -1) return OK;
// Extract the file name and path from the RCS path
- String filePath = line.substring(index);
+ // String filePath = line.substring(index);
int start = line.indexOf(Session.SERVER_SEPARATOR, index);
String fileName = line.substring(start + 1);
if (fileName.endsWith(RCS_FILE_POSTFIX)) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java
index afea24530..47a88521a 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java
@@ -18,7 +18,6 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
import org.eclipse.team.internal.ccvs.ui.HistoryView;
@@ -32,7 +31,7 @@ public class ShowHistoryAction extends CVSAction {
ArrayList resources = null;
if (!selection.isEmpty()) {
resources = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
+ Iterator elements = selection.iterator();
while (elements.hasNext()) {
Object next = elements.next();
if (next instanceof ICVSRemoteFile) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java
index c285893be..8c8bdfa46 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java
@@ -51,7 +51,6 @@ public class CVSOutputConsole extends MessageConsole implements IConsoleListener
private MessageConsoleStream errorStream;
// preferences for showing the cvs console when cvs output is provided
- private boolean showOnError;
private boolean showOnMessage;
private ConsoleDocument document;
@@ -97,7 +96,7 @@ public class CVSOutputConsole extends MessageConsole implements IConsoleListener
super("CVS", CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_CVS_CONSOLE)); //$NON-NLS-1$
// setup console showing preferences
showOnMessage = CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_CONSOLE_SHOW_ON_MESSAGE);
- showOnError = CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_CONSOLE_SHOW_ON_ERROR);
+ // showOnError = CVSUIPlugin.getPlugin().getPreferenceStore().getBoolean(ICVSUIConstants.PREF_CONSOLE_SHOW_ON_ERROR);
document = new ConsoleDocument();
CVSProviderPlugin.getPlugin().setConsoleListener(CVSOutputConsole.this);
CVSUIPlugin.getPlugin().getPreferenceStore().addPropertyChangeListener(CVSOutputConsole.this);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/VersionCategory.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/VersionCategory.java
index 1d79e1607..cc9eb4caa 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/VersionCategory.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/VersionCategory.java
@@ -13,7 +13,6 @@ package org.eclipse.team.internal.ccvs.ui.model;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ccvs.core.*;
@@ -92,7 +91,7 @@ public class VersionCategory
Object o,
IProgressMonitor monitor)
throws TeamException {
- IPreferenceStore store = CVSUIPlugin.getPlugin().getPreferenceStore();
+
ICVSRemoteResource[] resources =
CVSUIPlugin.getPlugin().getRepositoryManager().getFoldersForTag(
repository,
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java
index b24e87fb9..4241f9a55 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java
@@ -65,7 +65,7 @@ public abstract class CVSOperation extends TeamOperation {
protected URL getOperationIcon() {
URL url = null;
try {
- URL baseURL = CVSUIPlugin.getPlugin().getDescriptor().getInstallURL();
+ URL baseURL = CVSUIPlugin.getPlugin().getBundle().getEntry("/"); //$NON-NLS-1$
return new URL(baseURL, ICVSUIConstants.ICON_PATH + ICVSUIConstants.IMG_CVS_PERSPECTIVE);
} catch (MalformedURLException e) {
return null;
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagOperation.java
index f49e8d188..3719b376b 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagOperation.java
@@ -59,14 +59,6 @@ public class TagOperation extends RepositoryProviderOperation implements ITagOpe
collectStatus(status);
}
- private ICVSResource[] getCVSResources(IResource[] resources) {
- ICVSResource[] cvsResources = new ICVSResource[resources.length];
- for (int i = 0; i < cvsResources.length; i++) {
- cvsResources[i] = CVSWorkspaceRoot.getCVSResourceFor(resources[i]);
- }
- return cvsResources;
- }
-
/**
* Override to dislay the number of tag operations that succeeded
*/
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CVSRepositoryPropertiesPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CVSRepositoryPropertiesPage.java
index 8bdf82ff9..1a8fb683c 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CVSRepositoryPropertiesPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CVSRepositoryPropertiesPage.java
@@ -520,6 +520,7 @@ public class CVSRepositoryPropertiesPage extends PropertyPage {
}
String pathString = pathText.getText();
+ status = ConfigurationWizardMainPage.validatePath(pathString);
if (!isStatusOK(status)) {
return;
}
@@ -547,11 +548,7 @@ public class CVSRepositoryPropertiesPage extends PropertyPage {
} else if (newLabel.equals(getOldLabel(location))) {
return;
}
- try {
- CVSUIPlugin.getPlugin().getRepositoryManager().setLabel(location, newLabel);
- } catch (CVSException e) {
- CVSUIPlugin.log(e);
- }
+ CVSUIPlugin.getPlugin().getRepositoryManager().setLabel(location, newLabel);
}
private String getOldLabel(CVSRepositoryLocation location) {
return CVSUIPlugin.getPlugin().getRepositoryManager().getRepositoryRootFor(location).getName();
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CopyRepositoryNameAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CopyRepositoryNameAction.java
index b237d36a1..50b1cbb54 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CopyRepositoryNameAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CopyRepositoryNameAction.java
@@ -14,10 +14,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.dnd.*;
import org.eclipse.swt.widgets.Display;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
@@ -40,7 +37,7 @@ public class CopyRepositoryNameAction extends CVSAction {
ArrayList repositories = null;
if (!selection.isEmpty()) {
repositories = new ArrayList();
- Iterator elements = ((IStructuredSelection)selection).iterator();
+ Iterator elements = selection.iterator();
while (elements.hasNext()) {
Object next = getAdapter(elements.next(), ICVSRepositoryLocation.class);
if (next instanceof ICVSRepositoryLocation) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectSelectionPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectSelectionPage.java
index f3243b702..45829c5ac 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectSelectionPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectSelectionPage.java
@@ -40,7 +40,6 @@ import org.eclipse.ui.model.WorkbenchLabelProvider;
public class RefreshRemoteProjectSelectionPage extends CVSWizardPage {
private Dialog parentDialog;
- private ICVSRepositoryLocation root;
private ICVSRemoteResource[] rootFolders;
private ListSelectionArea listArea;
private WorkingSetSelectionArea workingSetArea;
@@ -88,7 +87,6 @@ public class RefreshRemoteProjectSelectionPage extends CVSWizardPage {
super(pageName, title, titleImage, description);
this.parentDialog = parentDialog;
this.settings = settings;
- this.root = root;
this.rootFolders = rootFolders;
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoteTagsView.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoteTagsView.java
index 99f9d931c..9826ee5ce 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoteTagsView.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoteTagsView.java
@@ -59,7 +59,7 @@ public class RemoteTagsView extends RemoteViewPart {
if (selected.length == 0) {
getViewer().setInput(null);
} else {
- getViewer().setInput((ICVSRepositoryLocation)selected[0]);
+ getViewer().setInput(selected[0]);
};
refreshViewer();
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveDateTagAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveDateTagAction.java
index c492c6045..342491766 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveDateTagAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveDateTagAction.java
@@ -68,7 +68,7 @@ public class RemoveDateTagAction extends SelectionListenerAction {
ArrayList cvsTagElements = null;
if (selection!=null && !selection.isEmpty()) {
cvsTagElements = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
+ Iterator elements = selection.iterator();
while (elements.hasNext()) {
Object next = CVSAction.getAdapter(elements.next(), CVSTagElement.class);
if (next instanceof CVSTagElement) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveRootAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveRootAction.java
index b992b927a..d5b72d705 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveRootAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveRootAction.java
@@ -56,7 +56,7 @@ public class RemoveRootAction extends SelectionListenerAction {
ArrayList resources = null;
if (selection!=null && !selection.isEmpty()) {
resources = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
+ Iterator elements = selection.iterator();
while (elements.hasNext()) {
Object next = CVSAction.getAdapter(elements.next(), RepositoryRoot.class);
if (next instanceof RepositoryRoot) {
@@ -79,7 +79,6 @@ public class RemoveRootAction extends SelectionListenerAction {
public void run() {
ICVSRepositoryLocation[] roots = getSelectedRemoteRoots();
if (roots.length == 0) return;
- final CVSProviderPlugin provider = CVSProviderPlugin.getPlugin();
for (int i = 0; i < roots.length; i++) {
final ICVSRepositoryLocation root = roots[i];
try {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryManager.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryManager.java
index 35c71b192..0fd57afaf 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryManager.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryManager.java
@@ -304,7 +304,7 @@ public class RepositoryManager {
broadcastRepositoryChange(root);
}
- public void startup() throws TeamException {
+ public void startup() {
loadState();
loadCommentHistory();
CVSProviderPlugin.getPlugin().addRepositoryListener(new ICVSListener() {
@@ -322,7 +322,7 @@ public class RepositoryManager {
saveCommentHistory();
}
- private void loadState() throws TeamException {
+ private void loadState() {
IPath pluginStateLocation = CVSUIPlugin.getPlugin().getStateLocation().append(REPOSITORIES_VIEW_FILE);
File file = pluginStateLocation.toFile();
if (file.exists()) {
@@ -359,7 +359,7 @@ public class RepositoryManager {
}
}
}
- private void loadCommentHistory() throws TeamException {
+ private void loadCommentHistory() {
IPath pluginStateLocation = CVSUIPlugin.getPlugin().getStateLocation().append(COMMENT_HIST_FILE);
File file = pluginStateLocation.toFile();
if (!file.exists()) return;
@@ -399,7 +399,7 @@ public class RepositoryManager {
throw new TeamException(new Status(Status.ERROR, CVSUIPlugin.ID, TeamException.UNABLE, Policy.bind("RepositoryManager.save",stateFile.getAbsolutePath()), e)); //$NON-NLS-1$
}
}
- private void writeState(XMLWriter writer) throws IOException, CVSException {
+ private void writeState(XMLWriter writer) {
writer.startTag(RepositoriesViewContentHandler.REPOSITORIES_VIEW_TAG, null, true);
// Write the repositories
Collection repos = Arrays.asList(getKnownRepositoryLocations());
@@ -481,7 +481,7 @@ public class RepositoryManager {
Set filenames = new HashSet();
int numFilenames = dis.readInt();
for (int k = 0; k < numFilenames; k++) {
- filenames.add(name + "/" + dis.readUTF());
+ filenames.add(name + "/" + dis.readUTF()); //$NON-NLS-1$
}
repoRoot.setAutoRefreshFiles(name, (String[]) filenames.toArray(new String[filenames.size()]));
}
@@ -516,7 +516,7 @@ public class RepositoryManager {
throw new TeamException(new Status(Status.ERROR, CVSUIPlugin.ID, TeamException.UNABLE, Policy.bind("RepositoryManager.save",histFile.getAbsolutePath()), e)); //$NON-NLS-1$
}
}
- private void writeCommentHistory(XMLWriter writer) throws IOException, CVSException {
+ private void writeCommentHistory(XMLWriter writer) {
writer.startTag(ELEMENT_COMMIT_HISTORY, null, false);
for (int i=0; i<previousComments.length && i<MAX_COMMENTS; i++)
writer.printSimpleTag(ELEMENT_COMMIT_COMMENT, previousComments[i]);
@@ -532,16 +532,6 @@ public class RepositoryManager {
}
/**
- * Method getCurrentComment.
- * @return String
- */
- private String getCurrentComment() {
- if (previousComments.length == 0)
- return ""; //$NON-NLS-1$
- return previousComments[0];
- }
-
- /**
* Return the entered comment or null if canceled.
*/
public String promptForComment(final Shell shell, IResource[] resourcesToCommit) {
@@ -725,7 +715,7 @@ public class RepositoryManager {
* @param location
* @param label
*/
- public void setLabel(CVSRepositoryLocation location, String label) throws CVSException {
+ public void setLabel(CVSRepositoryLocation location, String label) {
RepositoryRoot root = getRepositoryRootFor(location);
String oldLabel = root.getName();
if (oldLabel == null) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SyncInfoSetDetailsDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SyncInfoSetDetailsDialog.java
index 1e891c49f..9a8200f5f 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SyncInfoSetDetailsDialog.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SyncInfoSetDetailsDialog.java
@@ -38,7 +38,6 @@ public abstract class SyncInfoSetDetailsDialog extends DetailsDialog {
private SyncInfoSet syncSet;
private Object[] selectedResources;
- private String detailsTitle;
/**
* @param parentShell
@@ -47,7 +46,7 @@ public abstract class SyncInfoSetDetailsDialog extends DetailsDialog {
public SyncInfoSetDetailsDialog(Shell parentShell, String dialogTitle, String detailsTitle, SyncInfoSet syncSet) {
super(parentShell, dialogTitle);
this.syncSet = syncSet;
- this.detailsTitle = detailsTitle;
+ //this.detailsTitle = detailsTitle;
}
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java
index e6978876c..4f772e39a 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java
@@ -480,7 +480,7 @@ public class GenerateDiffFileWizard extends Wizard {
String iconPath;
iconPath = "icons/full/"; //$NON-NLS-1$
try {
- URL installURL = CVSUIPlugin.getPlugin().getDescriptor().getInstallURL();
+ URL installURL = CVSUIPlugin.getPlugin().getBundle().getEntry("/"); //$NON-NLS-1$
URL url = new URL(installURL, iconPath + "wizards/newconnect_wiz.gif"); //$NON-NLS-1$
ImageDescriptor desc = ImageDescriptor.createFromURL(url);
setDefaultPageImageDescriptor(desc);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSummaryPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSummaryPage.java
index b605bbf15..7322eaaf1 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSummaryPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSummaryPage.java
@@ -210,7 +210,7 @@ public class KSubstWizardSummaryPage extends CVSWizardPage {
});
// add a cell editor in the Keyword Substitution Mode column
- TableEditor tableEditor = new TableEditor(table);
+ new TableEditor(table);
CellEditor cellEditor = new ComboBoxCellEditor(table, ksubstOptionsDisplayText);
tableViewer.setCellEditors(new CellEditor[] { null, cellEditor });
tableViewer.setColumnProperties(new String[] { "file", "mode" }); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemPropertiesPage.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemPropertiesPage.java
index 309f98030..5db059449 100644
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemPropertiesPage.java
+++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemPropertiesPage.java
@@ -15,10 +15,7 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.team.core.RepositoryProvider;
+import org.eclipse.swt.widgets.*;
import org.eclipse.ui.dialogs.PropertyPage;
/*
* A property page which displays the file system specific properties
@@ -74,9 +71,7 @@ public class FileSystemPropertiesPage extends PropertyPage {
layout.marginHeight = layout.marginWidth = 0;
composite.setLayout(layout);
composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- IResource resource = getSelectedElement();
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject());
+
return composite;
}
}
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 04935f9f5..4d0316af8 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
@@ -82,7 +82,7 @@ public class ProjectSetSerializer implements IProjectSetSerializer {
* @return
*/
private String asReference(FileSystemProvider provider) {
- return provider.getProject().getName() + "," + provider.getRoot().toString();
+ return provider.getProject().getName() + "," + provider.getRoot().toString(); //$NON-NLS-1$
}
/**

Back to the top