Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-10-29 08:31:20 -0400
committerAlexander Kurtakov2018-10-29 08:43:06 -0400
commita6c8c68869fed5544105d9c25733be3a64b64ce1 (patch)
tree8c7218fa1b8a870e59f4d0494d9f2f3b39253495
parent39be69e058bd4a1b47010033110b81fddf347fb0 (diff)
downloadeclipse.platform.team-a6c8c68869fed5544105d9c25733be3a64b64ce1.tar.gz
eclipse.platform.team-a6c8c68869fed5544105d9c25733be3a64b64ce1.tar.xz
eclipse.platform.team-a6c8c68869fed5544105d9c25733be3a64b64ce1.zip
Remove not needed casts.I20181029-1800
Change-Id: Iec0ce85210f3d8900ddb382b068f0c69e0b6a4fd Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/pom.xml2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryTableProvider.java14
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java8
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java66
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryTableProvider.java14
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java11
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java8
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ApplyPatchAction.java7
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSModelProviderAction.java3
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CheckedInChangeSetCollector.java25
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/MergeSubscriberContext.java9
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelMergeParticipant.java14
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/OpenChangeSetAction.java7
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheTreeContentsOperation.java15
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectSelectionPage.java10
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipant.java15
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OpenChangeSetAction.java25
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateOperation.java12
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsWizard.java8
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizard.java36
21 files changed, 233 insertions, 78 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF
index d1a98350d..dde714011 100644
--- a/bundles/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.team.cvs.ui; singleton:=true
-Bundle-Version: 3.4.200.qualifier
+Bundle-Version: 3.4.300.qualifier
Bundle-Activator: org.eclipse.team.internal.ccvs.ui.CVSUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.team.cvs.ui/pom.xml b/bundles/org.eclipse.team.cvs.ui/pom.xml
index 3669f6a51..1039d3264 100644
--- a/bundles/org.eclipse.team.cvs.ui/pom.xml
+++ b/bundles/org.eclipse.team.cvs.ui/pom.xml
@@ -19,6 +19,6 @@
</parent>
<groupId>org.eclipse.team</groupId>
<artifactId>org.eclipse.team.cvs.ui</artifactId>
- <version>3.4.200-SNAPSHOT</version>
+ <version>3.4.300-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryTableProvider.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryTableProvider.java
index aabcd0c21..5650cd6bf 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryTableProvider.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryTableProvider.java
@@ -119,6 +119,7 @@ public class CVSHistoryTableProvider {
PlatformUI.getWorkbench().getThemeManager().addPropertyChangeListener(themeListener= new ThemeListener(provider));
}
+ @Override
public void dispose() {
if (dateImage != null){
dateImage.dispose();
@@ -143,6 +144,7 @@ public class CVSHistoryTableProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipText(java.lang.Object)
*/
+ @Override
public String getToolTipText(Object element) {
if (column == COL_COMMENT && !isSingleLine(element)) {
IFileRevision entry = adaptToFileRevision(element);
@@ -155,6 +157,7 @@ public class CVSHistoryTableProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.CellLabelProvider#useNativeToolTip(java.lang.Object)
*/
+ @Override
public boolean useNativeToolTip(Object object) {
return column != COL_COMMENT || isSingleLine(object);
}
@@ -169,6 +172,7 @@ public class CVSHistoryTableProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ColumnLabelProvider#getImage(java.lang.Object)
*/
+ @Override
public Image getImage(Object element) {
return getColumnImage(element, column);
}
@@ -207,6 +211,7 @@ public class CVSHistoryTableProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ColumnLabelProvider#getText(java.lang.Object)
*/
+ @Override
public String getText(Object element) {
return getColumnText(element, column);
}
@@ -274,6 +279,7 @@ public class CVSHistoryTableProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
*/
+ @Override
public Color getForeground(Object element) {
if (element instanceof AbstractHistoryCategory){
ITheme current = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme();
@@ -291,6 +297,7 @@ public class CVSHistoryTableProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
*/
+ @Override
public Color getBackground(Object element) {
return null;
}
@@ -299,6 +306,7 @@ public class CVSHistoryTableProvider {
* (non-Javadoc)
* @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
*/
+ @Override
public Font getFont(Object element) {
if (element instanceof AbstractHistoryCategory) {
return getCurrentRevisionFont();
@@ -369,6 +377,7 @@ public class CVSHistoryTableProvider {
* Compares two log entries, sorting first by the main column of this sorter,
* then by subsequent columns, depending on the column sort order.
*/
+ @Override
public int compare(Viewer compareViewer, Object o1, Object o2) {
if (o1 instanceof AbstractHistoryCategory || o2 instanceof AbstractHistoryCategory)
return 0;
@@ -490,7 +499,7 @@ public class CVSHistoryTableProvider {
if (element instanceof IFileRevision) {
entry = (IFileRevision) element;
} else if (element instanceof IAdaptable) {
- entry = (IFileRevision) ((IAdaptable) element).getAdapter(IFileRevision.class);
+ entry = ((IAdaptable) element).getAdapter(IFileRevision.class);
} else if (element instanceof AbstractHistoryCategory){
if (((AbstractHistoryCategory) element).hasRevisions())
entry = ((AbstractHistoryCategory) element).getRevisions()[0];
@@ -524,6 +533,7 @@ public class CVSHistoryTableProvider {
viewer.refresh();
tree.addDisposeListener(new DisposeListener() {
+ @Override
public void widgetDisposed(DisposeEvent e) {
if (currentRevisionFont != null) {
currentRevisionFont.dispose();
@@ -728,6 +738,7 @@ public class CVSHistoryTableProvider {
* presses on the same column header will
* toggle sorting order (ascending/descending).
*/
+ @Override
public void widgetSelected(SelectionEvent e) {
// column selected - need to sort
int column = treeViewer.getTree().indexOf((TreeColumn) e.widget);
@@ -787,6 +798,7 @@ public class CVSHistoryTableProvider {
ThemeListener(CVSHistoryTableProvider provider) {
this.provider= provider;
}
+ @Override
public void propertyChange(PropertyChangeEvent event) {
provider.viewer.refresh();
}
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 cddfde9ac..9d94bd3cc 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
@@ -207,6 +207,7 @@ public class CVSUIPlugin extends AbstractUIPlugin {
private static boolean promptToRefresh(final Shell shell, final IResource[] resources, final IStatus status) {
final boolean[] result = new boolean[] { false};
Runnable runnable = new Runnable() {
+ @Override
public void run() {
Shell shellToUse = shell;
if (shell == null) {
@@ -487,6 +488,7 @@ public class CVSUIPlugin extends AbstractUIPlugin {
final String message, final IStatus status, int flags) {
// Create a runnable that will display the error status
final IOpenableInShell openable = new IOpenableInShell() {
+ @Override
public void open(Shell shell) {
if (status.getSeverity() == IStatus.INFO
&& !status.isMultiStatus()) {
@@ -534,6 +536,7 @@ public class CVSUIPlugin extends AbstractUIPlugin {
// Create a runnable that will display the error status
final Shell shell = providedShell;
Runnable outerRunnable = new Runnable() {
+ @Override
public void run() {
Shell displayShell;
if (shell == null) {
@@ -570,6 +573,7 @@ public class CVSUIPlugin extends AbstractUIPlugin {
/**
* Initializes the preferences for this plugin if necessary.
*/
+ @Override
protected void initializeDefaultPluginPreferences() {
IPreferenceStore store = getPreferenceStore();
// Get the plugin preferences for CVS Core
@@ -684,6 +688,7 @@ public class CVSUIPlugin extends AbstractUIPlugin {
/**
* @see Plugin#start(BundleContext)
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
@@ -724,6 +729,7 @@ public class CVSUIPlugin extends AbstractUIPlugin {
/**
* @see Plugin#stop(BundleContext)
*/
+ @Override
public void stop(BundleContext context) throws Exception {
try {
// unregister debug options listener
@@ -755,7 +761,7 @@ public class CVSUIPlugin extends AbstractUIPlugin {
IWorkbench workbench = getWorkbench();
IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
try {
- return Utils.openEditor(page, (IFileRevision)file.getAdapter(IFileRevision.class), monitor);
+ return Utils.openEditor(page, file.getAdapter(IFileRevision.class), monitor);
} catch (CoreException e) {
throw new InvocationTargetException(e);
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java
index 7403a1333..4e7e975d4 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java
@@ -24,8 +24,9 @@ import java.util.*;
import org.eclipse.core.resources.IProject;
import org.eclipse.jface.action.*;
import org.eclipse.jface.commands.ActionHandler;
-import org.eclipse.jface.dialogs.*;
import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.text.*;
@@ -89,7 +90,7 @@ public class CommitCommentArea extends DialogArea {
support.install(EditorsUI.getPreferenceStore());
- final IHandlerService handlerService = (IHandlerService)PlatformUI.getWorkbench().getService(IHandlerService.class);
+ final IHandlerService handlerService = PlatformUI.getWorkbench().getService(IHandlerService.class);
final IHandlerActivation handlerActivation = installQuickFixActionHandler(handlerService, sourceViewer);
final TextViewerAction cutAction = new TextViewerAction(sourceViewer, ITextOperationTarget.CUT);
@@ -119,6 +120,7 @@ public class CommitCommentArea extends DialogArea {
quickFixMenu.setVisible(true);
quickFixMenu.addMenuListener(new IMenuListener() {
+ @Override
public void menuAboutToShow(IMenuManager manager) {
quickFixMenu.removeAll();
@@ -135,14 +137,16 @@ public class CommitCommentArea extends DialogArea {
/* (non-Javadoc)
* @see org.eclipse.jface.action.Action#run()
*/
- public void run() {
+ @Override
+ public void run() {
proposal.apply(sourceViewer.getDocument());
}
/* (non-Javadoc)
* @see org.eclipse.jface.action.Action#getImageDescriptor()
*/
- public ImageDescriptor getImageDescriptor() {
+ @Override
+ public ImageDescriptor getImageDescriptor() {
if (proposal.getImage() != null) {
return ImageDescriptor.createFromImage(proposal.getImage());
}
@@ -163,10 +167,11 @@ public class CommitCommentArea extends DialogArea {
private IHandlerActivation pasteHandlerActivation;
private IHandlerActivation selectAllHandlerActivation;
+ @Override
public void focusGained(FocusEvent e) {
cutAction.update();
copyAction.update();
- IHandlerService service = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
+ IHandlerService service = PlatformUI.getWorkbench().getService(IHandlerService.class);
this.cutHandlerActivation = service.activateHandler(IWorkbenchCommandConstants.EDIT_CUT, new ActionHandler(cutAction), new ActiveShellExpression(getComposite().getShell()));
this.copyHandlerActivation = service.activateHandler(IWorkbenchCommandConstants.EDIT_COPY, new ActionHandler(copyAction), new ActiveShellExpression(getComposite().getShell()));
this.pasteHandlerActivation = service.activateHandler(IWorkbenchCommandConstants.EDIT_PASTE, new ActionHandler(pasteAction), new ActiveShellExpression(getComposite().getShell()));
@@ -178,8 +183,9 @@ public class CommitCommentArea extends DialogArea {
/* (non-Javadoc)
* @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
*/
+ @Override
public void focusLost(FocusEvent e) {
- IHandlerService service = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
+ IHandlerService service = PlatformUI.getWorkbench().getService(IHandlerService.class);
if (cutHandlerActivation != null) {
service.deactivateHandler(cutHandlerActivation);
@@ -202,7 +208,8 @@ public class CommitCommentArea extends DialogArea {
sourceViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
cutAction.update();
copyAction.update();
}
@@ -211,6 +218,7 @@ public class CommitCommentArea extends DialogArea {
sourceViewer.getTextWidget().addDisposeListener(new DisposeListener() {
+ @Override
public void widgetDisposed(DisposeEvent e) {
support.uninstall();
handlerService.deactivateHandler(handlerActivation);
@@ -264,7 +272,8 @@ public class CommitCommentArea extends DialogArea {
/* (non-Javadoc)
* @see org.eclipse.jface.action.Action#run()
*/
- public void run() {
+ @Override
+ public void run() {
textOperationTarget.doOperation(ISourceViewer.QUICK_ASSIST);
}
};
@@ -272,21 +281,24 @@ public class CommitCommentArea extends DialogArea {
return new ActionHandler(quickFixAction);
}
- public void modifyText(ModifyEvent e) {
+ @Override
+ public void modifyText(ModifyEvent e) {
final String old = fText;
fText = fTextField.getText();
if (!fText.equals(old))
firePropertyChangeChange(COMMENT_MODIFIED, old, fText);
}
- public void keyTraversed(TraverseEvent e) {
+ @Override
+ public void keyTraversed(TraverseEvent e) {
if (e.detail == SWT.TRAVERSE_RETURN && (e.stateMask & SWT.CTRL) != 0) {
e.doit = false;
firePropertyChangeChange(OK_REQUESTED, null, null);
}
}
- public void focusGained(FocusEvent e) {
+ @Override
+ public void focusGained(FocusEvent e) {
if (fText.length() > 0)
return;
@@ -301,7 +313,8 @@ public class CommitCommentArea extends DialogArea {
}
}
- public void focusLost(FocusEvent e) {
+ @Override
+ public void focusLost(FocusEvent e) {
if (fText.length() > 0)
return;
@@ -321,7 +334,8 @@ public class CommitCommentArea extends DialogArea {
fTextField.setEnabled(enabled);
}
- public void update(Observable o, Object arg) {
+ @Override
+ public void update(Observable o, Object arg) {
if (arg instanceof String) {
setText((String)arg); // triggers a modify event
}
@@ -343,10 +357,12 @@ public class CommitCommentArea extends DialogArea {
fTextField.setFocus();
}
- public void documentAboutToBeChanged(DocumentEvent event) {
+ @Override
+ public void documentAboutToBeChanged(DocumentEvent event) {
}
- public void documentChanged(DocumentEvent event) {
+ @Override
+ public void documentChanged(DocumentEvent event) {
modifyText(null);
}
}
@@ -393,7 +409,8 @@ public class CommitCommentArea extends DialogArea {
fCombo.setText(fMessage);
}
- public void widgetSelected(SelectionEvent e) {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
int index = fCombo.getSelectionIndex();
if (index > 0) {
index--;
@@ -410,16 +427,19 @@ public class CommitCommentArea extends DialogArea {
}
}
- public void widgetDefaultSelected(SelectionEvent e) {
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
}
- public void focusGained(FocusEvent e) {
+ @Override
+ public void focusGained(FocusEvent e) {
}
/* (non-Javadoc)
* @see org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent)
*/
- public void focusLost(FocusEvent e) {
+ @Override
+ public void focusLost(FocusEvent e) {
fCombo.removeSelectionListener(this);
try {
fCombo.setText(fMessage);
@@ -455,7 +475,8 @@ public class CommitCommentArea extends DialogArea {
/**
* @see org.eclipse.team.internal.ccvs.ui.DialogArea#createArea(org.eclipse.swt.widgets.Composite)
*/
- public void createArea(Composite parent) {
+ @Override
+ public void createArea(Composite parent) {
Dialog.applyDialogFont(parent);
initializeDialogUnits(parent);
@@ -472,10 +493,12 @@ public class CommitCommentArea extends DialogArea {
templatesPrefsLink.setText("<a href=\"configureTemplates\">" + //$NON-NLS-1$
CONFIGURE_TEMPLATES_MESSAGE + "</a>"); //$NON-NLS-1$
templatesPrefsLink.addSelectionListener(new SelectionListener() {
+ @Override
public void widgetDefaultSelected(SelectionEvent e) {
openCommentTemplatesPreferencePage();
}
+ @Override
public void widgetSelected(SelectionEvent e) {
openCommentTemplatesPreferencePage();
}
@@ -604,7 +627,8 @@ public class CommitCommentArea extends DialogArea {
return fComposite;
}
- protected void firePropertyChangeChange(String property, Object oldValue, Object newValue) {
+ @Override
+ protected void firePropertyChangeChange(String property, Object oldValue, Object newValue) {
super.firePropertyChangeChange(property, oldValue, newValue);
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryTableProvider.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryTableProvider.java
index 463053790..69346b6b0 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryTableProvider.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryTableProvider.java
@@ -14,7 +14,6 @@
*******************************************************************************/
package org.eclipse.team.internal.ccvs.ui;
-import com.ibm.icu.text.DateFormat;
import java.util.Date;
import org.eclipse.core.runtime.IAdaptable;
@@ -29,6 +28,8 @@ import org.eclipse.swt.widgets.*;
import org.eclipse.team.internal.ccvs.core.*;
import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
+import com.ibm.icu.text.DateFormat;
+
/**
* This class provides the table and it's required components for a file's revision
* history
@@ -60,9 +61,11 @@ public class HistoryTableProvider {
*/
class HistoryLabelProvider extends LabelProvider implements ITableLabelProvider, IColorProvider, IFontProvider {
private DateFormat dateFormat;
+ @Override
public Image getColumnImage(Object element, int columnIndex) {
return null;
}
+ @Override
public String getColumnText(Object element, int columnIndex) {
ILogEntry entry = adaptToLogEntry(element);
if (entry == null) return ""; //$NON-NLS-1$
@@ -124,6 +127,7 @@ public class HistoryTableProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
*/
+ @Override
public Color getForeground(Object element) {
ILogEntry entry = adaptToLogEntry(element);
if (entry.isDeletion()) {
@@ -135,6 +139,7 @@ public class HistoryTableProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
*/
+ @Override
public Color getBackground(Object element) {
return null;
}
@@ -142,6 +147,7 @@ public class HistoryTableProvider {
* (non-Javadoc)
* @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
*/
+ @Override
public Font getFont(Object element) {
ILogEntry entry = adaptToLogEntry(element);
if (entry == null)
@@ -192,6 +198,7 @@ public class HistoryTableProvider {
* Compares two log entries, sorting first by the main column of this sorter,
* then by subsequent columns, depending on the column sort order.
*/
+ @Override
public int compare(Viewer viewer, Object o1, Object o2) {
ILogEntry e1 = adaptToLogEntry(o1);
ILogEntry e2 = adaptToLogEntry(o2);
@@ -276,7 +283,7 @@ public class HistoryTableProvider {
if (element instanceof ILogEntry) {
entry = (ILogEntry) element;
} else if (element instanceof IAdaptable) {
- entry = (ILogEntry)((IAdaptable)element).getAdapter(ILogEntry.class);
+ entry = ((IAdaptable)element).getAdapter(ILogEntry.class);
}
return entry;
}
@@ -310,6 +317,7 @@ public class HistoryTableProvider {
viewer.setComparator(sorter);
table.addDisposeListener(new DisposeListener() {
+ @Override
public void widgetDisposed(DisposeEvent e) {
if(currentRevisionFont != null) {
currentRevisionFont.dispose();
@@ -350,6 +358,7 @@ public class HistoryTableProvider {
viewer.setComparator(sorter);
table.addDisposeListener(new DisposeListener() {
+ @Override
public void widgetDisposed(DisposeEvent e) {
if(currentRevisionFont != null) {
currentRevisionFont.dispose();
@@ -430,6 +439,7 @@ public class HistoryTableProvider {
* presses on the same column header will
* toggle sorting order (ascending/descending).
*/
+ @Override
public void widgetSelected(SelectionEvent e) {
// column selected - need to sort
int column = tableViewer.getTable().indexOf((TableColumn) e.widget);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java
index 3509009e0..0dcce6704 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java
@@ -40,16 +40,18 @@ public class CompareWithRevisionAction extends WorkspaceAction {
/*
* @see CVSAction#execute(IAction)
*/
+ @Override
public void execute(IAction action) throws InvocationTargetException, InterruptedException {
// Show the compare viewer
run(new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) throws InterruptedException, InvocationTargetException {
if (isShowInDialog()) {
IFile file = (IFile) getSelectedResources()[0];
showCompareInDialog(getShell(), file);
} else {
- IHistoryView view = TeamUI.showHistoryFor(TeamUIPlugin.getActivePage(), (IFile)getSelectedResources()[0], null);
+ IHistoryView view = TeamUI.showHistoryFor(TeamUIPlugin.getActivePage(), getSelectedResources()[0], null);
IHistoryPage page = view.getHistoryPage();
if (page instanceof CVSHistoryPage){
CVSHistoryPage cvsHistoryPage = (CVSHistoryPage) page;
@@ -67,6 +69,7 @@ public class CompareWithRevisionAction extends WorkspaceAction {
cc.setLeftEditable(true);
cc.setRightEditable(false);
HistoryPageCompareEditorInput input = new HistoryPageCompareEditorInput(cc, pageSource, object) {
+ @Override
public void saveChanges(IProgressMonitor monitor) throws CoreException {
super.saveChanges(monitor);
((CVSHistoryPage)getHistoryPage()).saveChanges(monitor);
@@ -87,6 +90,7 @@ public class CompareWithRevisionAction extends WorkspaceAction {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.actions.CVSAction#getErrorTitle()
*/
+ @Override
protected String getErrorTitle() {
return CVSUIMessages.CompareWithRevisionAction_compare;
}
@@ -94,6 +98,7 @@ public class CompareWithRevisionAction extends WorkspaceAction {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForCVSResource(org.eclipse.team.internal.ccvs.core.ICVSResource)
*/
+ @Override
protected boolean isEnabledForCVSResource(ICVSResource cvsResource) throws CVSException {
return (!cvsResource.isFolder() && super.isEnabledForCVSResource(cvsResource));
}
@@ -101,6 +106,7 @@ public class CompareWithRevisionAction extends WorkspaceAction {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForMultipleResources()
*/
+ @Override
protected boolean isEnabledForMultipleResources() {
return false;
}
@@ -108,14 +114,17 @@ public class CompareWithRevisionAction extends WorkspaceAction {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForAddedResources()
*/
+ @Override
protected boolean isEnabledForAddedResources() {
return true;
}
+ @Override
protected boolean isEnabledForUnmanagedResources() {
return true;
}
+ @Override
protected boolean isEnabledForIgnoredResources() {
return true;
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java
index 00ca91ffc..f883d4959 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java
@@ -45,6 +45,7 @@ import org.eclipse.ui.*;
*/
public class SyncAction extends WorkspaceTraversalAction {
+ @Override
public void execute(IAction action) throws InvocationTargetException {
// First, see if there is a single file selected
if (isOpenEditorForSingleFile()) {
@@ -187,6 +188,7 @@ public class SyncAction extends WorkspaceTraversalAction {
public static void showSingleFileComparison(final Shell shell, final Subscriber subscriber, final IResource resource, final IWorkbenchPage page) {
try {
PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
subscriber.refresh(new IResource[]{resource}, IResource.DEPTH_ZERO, monitor);
@@ -198,6 +200,7 @@ public class SyncAction extends WorkspaceTraversalAction {
final SyncInfo info = subscriber.getSyncInfo(resource);
if (info == null) return;
shell.getDisplay().syncExec(new Runnable() {
+ @Override
public void run() {
if (info.getKind() == SyncInfo.IN_SYNC) {
MessageDialog.openInformation(shell, CVSUIMessages.SyncAction_noChangesTitle, CVSUIMessages.SyncAction_noChangesMessage); //
@@ -225,15 +228,18 @@ public class SyncAction extends WorkspaceTraversalAction {
*
* @see org.eclipse.team.internal.ccvs.ui.actions.WorkspaceAction#isEnabledForCVSResource(org.eclipse.team.internal.ccvs.core.ICVSResource)
*/
+ @Override
protected boolean isEnabledForCVSResource(ICVSResource cvsResource) throws CVSException {
return (super.isEnabledForCVSResource(cvsResource) || (cvsResource.getParent().isCVSFolder() && !cvsResource.isIgnored()));
}
+ @Override
public String getId() {
return ICVSUIConstants.CMD_SYNCHRONIZE;
}
+ @Override
public boolean isEnabled() {
if(super.isEnabled()){
return true;
@@ -272,7 +278,7 @@ public class SyncAction extends WorkspaceTraversalAction {
IAdaptable ad[] = sets[i].getElements();
if (ad != null) {
for (int j = 0; j < ad.length; j++) {
- IResource resource = (IResource) ad[j]
+ IResource resource = ad[j]
.getAdapter(IResource.class);
if (resource != null) {
projects.add(resource.getProject());
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ApplyPatchAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ApplyPatchAction.java
index 943b62b62..6f435e3b9 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ApplyPatchAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ApplyPatchAction.java
@@ -33,8 +33,9 @@ public class ApplyPatchAction extends CVSModelProviderAction implements
getSynchronizationContext().getDiffTree().addDiffChangeListener(this);
}
+ @Override
protected void execute() {
- IResource resource = (IResource) Platform.getAdapterManager()
+ IResource resource = Platform.getAdapterManager()
.getAdapter(getStructuredSelection().getFirstElement(),
IResource.class);
@@ -59,6 +60,7 @@ public class ApplyPatchAction extends CVSModelProviderAction implements
BusyIndicator.showWhile(Display.getDefault(), op);
}
+ @Override
protected boolean isEnabledForSelection(IStructuredSelection selection) {
return internalIsEnabled(selection);
}
@@ -72,14 +74,17 @@ public class ApplyPatchAction extends CVSModelProviderAction implements
return adapter != null;
}
+ @Override
public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
updateEnablement();
}
+ @Override
public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
// do nothing
}
+ @Override
protected String getBundleKeyPrefix() {
return "ApplyPatchAction."; //$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSModelProviderAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSModelProviderAction.java
index 23d92ff4d..1f7c88a77 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSModelProviderAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CVSModelProviderAction.java
@@ -45,7 +45,7 @@ public abstract class CVSModelProviderAction extends ResourceModelParticipantAct
protected ResourceMapping[] getResourceMappings(IStructuredSelection selection) {
List mappings = new ArrayList();
for (Iterator iter = selection.iterator(); iter.hasNext();) {
- Object element = (Object) iter.next();
+ Object element = iter.next();
ResourceMapping mapping = Utils.getResourceMapping(element);
if (mapping != null)
mappings.add(mapping);
@@ -127,6 +127,7 @@ public abstract class CVSModelProviderAction extends ResourceModelParticipantAct
return true;
}
+ @Override
public void run() {
if (saveDirtyEditors())
execute();
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CheckedInChangeSetCollector.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CheckedInChangeSetCollector.java
index 1c3a7000a..b15deaeb5 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CheckedInChangeSetCollector.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/CheckedInChangeSetCollector.java
@@ -13,12 +13,7 @@
*******************************************************************************/
package org.eclipse.team.internal.ccvs.ui.mappings;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.*;
@@ -63,15 +58,18 @@ public class CheckedInChangeSetCollector extends BatchingChangeSetManager implem
this.kind = kind;
}
+ @Override
protected int calculateKind() throws TeamException {
return kind;
}
}
IDiffChangeListener diffTreeListener = new IDiffChangeListener() {
+ @Override
public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
// Ignore
}
+ @Override
public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
if (event.getTree().isEmpty()) {
ChangeSet changeSet = getChangeSet(event.getTree());
@@ -128,7 +126,8 @@ public class CheckedInChangeSetCollector extends BatchingChangeSetManager implem
return configuration;
}
- protected void handleSetAdded(ChangeSet set) {
+ @Override
+ protected void handleSetAdded(ChangeSet set) {
((DiffChangeSet)set).getDiffTree().addDiffChangeListener(diffTreeListener);
super.handleSetAdded(set);
if (updatedSets != null) {
@@ -137,7 +136,8 @@ public class CheckedInChangeSetCollector extends BatchingChangeSetManager implem
}
}
- protected void handleSetRemoved(ChangeSet set) {
+ @Override
+ protected void handleSetRemoved(ChangeSet set) {
((DiffChangeSet)set).getDiffTree().removeDiffChangeListener(diffTreeListener);
super.handleSetRemoved(set);
}
@@ -197,7 +197,8 @@ public class CheckedInChangeSetCollector extends BatchingChangeSetManager implem
configuration.setProperty(LOG_ENTRY_HANDLER, logEntryHandler);
// Use an action group to get notified when the configuration is disposed
configuration.addActionContribution(new SynchronizePageActionGroup() {
- public void dispose() {
+ @Override
+ public void dispose() {
super.dispose();
LogEntryCacheUpdateHandler handler = (LogEntryCacheUpdateHandler)configuration.getProperty(LOG_ENTRY_HANDLER);
if (handler != null) {
@@ -235,6 +236,7 @@ public class CheckedInChangeSetCollector extends BatchingChangeSetManager implem
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.views.HierarchicalModelProvider#dispose()
*/
+ @Override
public void dispose() {
// No longer listen for log entry changes
// (The handler is disposed with the page)
@@ -407,7 +409,7 @@ public class CheckedInChangeSetCollector extends BatchingChangeSetManager implem
}
private SyncInfoToDiffConverter getConverter() {
- SyncInfoToDiffConverter converter = (SyncInfoToDiffConverter)Adapters.adapt(subscriber, SyncInfoToDiffConverter.class);
+ SyncInfoToDiffConverter converter = Adapters.adapt(subscriber, SyncInfoToDiffConverter.class);
if (converter == null)
converter = SyncInfoToDiffConverter.getDefault();
return converter;
@@ -463,7 +465,8 @@ public class CheckedInChangeSetCollector extends BatchingChangeSetManager implem
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.subscriber.LogEntryCacheUpdateHandler.ILogsFetchedListener#logEntriesFetched(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
*/
- public void logEntriesFetched(SyncInfoSet set, LogEntryCache logEntryCache, IProgressMonitor monitor) {
+ @Override
+ public void logEntriesFetched(SyncInfoSet set, LogEntryCache logEntryCache, IProgressMonitor monitor) {
if (disposed) return;
// Hold on to the cache so we can use it while commit sets are visible
this.logEntryCache = logEntryCache;
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/MergeSubscriberContext.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/MergeSubscriberContext.java
index c51899f94..b390c93de 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/MergeSubscriberContext.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/MergeSubscriberContext.java
@@ -49,16 +49,20 @@ public class MergeSubscriberContext extends CVSSubscriberMergeContext {
/* (non-Javadoc)
* @see org.eclipse.team.core.mapping.IMergeContext#markAsMerged(org.eclipse.team.core.diff.IDiffNode, boolean, org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public void markAsMerged(final IDiff diff, boolean inSyncHint, IProgressMonitor monitor) throws CoreException {
run(new IWorkspaceRunnable() {
+ @Override
public void run(IProgressMonitor monitor) throws CoreException {
((CVSMergeSubscriber)getSubscriber()).merged(new IResource[] { getDiffTree().getResource(diff)});
}
}, getMergeRule(diff), IResource.NONE, monitor);
}
+ @Override
public void markAsMerged(final IDiff[] diffs, boolean inSyncHint, IProgressMonitor monitor) throws CoreException {
run(new IWorkspaceRunnable() {
+ @Override
public void run(IProgressMonitor monitor) throws CoreException {
List result = new ArrayList();
for (int i = 0; i < diffs.length; i++) {
@@ -70,6 +74,7 @@ public class MergeSubscriberContext extends CVSSubscriberMergeContext {
}, getMergeRule(diffs), IResource.NONE, monitor);
}
+ @Override
public void dispose() {
if (cancel)
((CVSMergeSubscriber)getSubscriber()).cancel();
@@ -80,9 +85,11 @@ public class MergeSubscriberContext extends CVSSubscriberMergeContext {
cancel = b;
}
+ @Override
public IStatus merge(final IDiff diff, final boolean ignoreLocalChanges, IProgressMonitor monitor) throws CoreException {
final IStatus[] status = new IStatus[] { Status.OK_STATUS };
run(new IWorkspaceRunnable() {
+ @Override
public void run(IProgressMonitor monitor) throws CoreException {
IThreeWayDiff currentDiff = (IThreeWayDiff)getSubscriber().getDiff(getDiffTree().getResource(diff));
if (!MergeSubscriberContext.this.equals(currentDiff, (IThreeWayDiff)diff)) {
@@ -95,7 +102,7 @@ public class MergeSubscriberContext extends CVSSubscriberMergeContext {
IThreeWayDiff twd = (IThreeWayDiff) diff;
if (twd.getKind() == IDiff.ADD && twd.getDirection() == IThreeWayDiff.INCOMING) {
IFileRevision remote = Utils.getRemote(diff);
- IResourceVariant variant = (IResourceVariant)Adapters.adapt(remote, IResourceVariant.class);
+ IResourceVariant variant = Adapters.adapt(remote, IResourceVariant.class);
byte[] syncBytes = variant.asBytes();
MutableResourceSyncInfo info = new MutableResourceSyncInfo(resource.getName(), ResourceSyncInfo.ADDED_REVISION);
info.setKeywordMode(ResourceSyncInfo.getKeywordMode(syncBytes));
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelMergeParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelMergeParticipant.java
index d49cf7a66..681e76596 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelMergeParticipant.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ModelMergeParticipant.java
@@ -55,6 +55,7 @@ public class ModelMergeParticipant extends CVSModelSynchronizeParticipant {
private final static String CTX_END_TAG_TYPE = "end_tag_type"; //$NON-NLS-1$
public class MergeActionGroup extends ModelSynchronizeParticipantActionGroup {
+ @Override
public void initialize(ISynchronizePageConfiguration configuration) {
super.initialize(configuration);
if (!configuration.getSite().isModal()) {
@@ -81,6 +82,7 @@ public class ModelMergeParticipant extends CVSModelSynchronizeParticipant {
initialize();
}
+ @Override
protected ModelSynchronizeParticipantActionGroup createMergeActionGroup() {
return new MergeActionGroup();
}
@@ -88,6 +90,7 @@ public class ModelMergeParticipant extends CVSModelSynchronizeParticipant {
/* (non-Javadoc)
* @see org.eclipse.team.ui.operations.ModelSynchronizeParticipant#initializeConfiguration(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
*/
+ @Override
protected void initializeConfiguration(ISynchronizePageConfiguration configuration) {
configuration.setProperty(ISynchronizePageConfiguration.P_VIEWER_ID, VIEWER_ID);
super.initializeConfiguration(configuration);
@@ -99,7 +102,7 @@ public class ModelMergeParticipant extends CVSModelSynchronizeParticipant {
try {
ISynchronizeParticipantDescriptor descriptor = TeamUI.getSynchronizeManager().getParticipantDescriptor(ID);
setInitializationData(descriptor);
- CVSMergeSubscriber s = (CVSMergeSubscriber)getSubscriber();
+ CVSMergeSubscriber s = getSubscriber();
setSecondaryId(s.getId().getLocalName());
} catch (CoreException e) {
CVSUIPlugin.log(e);
@@ -110,6 +113,7 @@ public class ModelMergeParticipant extends CVSModelSynchronizeParticipant {
return (CVSMergeSubscriber)((MergeSubscriberContext)getContext()).getSubscriber();
}
+ @Override
public void init(String secondaryId, IMemento memento) throws PartInitException {
if(memento != null) {
ISynchronizeParticipantDescriptor descriptor = TeamUI.getSynchronizeManager().getParticipantDescriptor(ID);
@@ -132,6 +136,7 @@ public class ModelMergeParticipant extends CVSModelSynchronizeParticipant {
}
}
+ @Override
public void saveState(IMemento memento) {
super.saveState(memento);
write(subscriber, memento.createChild(CTX_SUBSCRIBER));
@@ -183,10 +188,12 @@ public class ModelMergeParticipant extends CVSModelSynchronizeParticipant {
}
}
+ @Override
protected String getShortTaskName() {
return CVSUIMessages.Participant_merging;
}
+ @Override
public void dispose() {
if(TeamUI.getSynchronizeManager().get(getId(), getSecondaryId()) != null) {
// If the participant is managed by the synchronize manager then we
@@ -196,11 +203,13 @@ public class ModelMergeParticipant extends CVSModelSynchronizeParticipant {
super.dispose();
}
+ @Override
protected ISynchronizationScopeManager createScopeManager(ResourceMapping[] mappings) {
return new SubscriberScopeManager(subscriber.getName(),
mappings, subscriber, true);
}
+ @Override
protected MergeContext restoreContext(ISynchronizationScopeManager manager) throws CoreException {
return MergeSubscriberContext.createContext(manager, subscriber);
}
@@ -208,8 +217,9 @@ public class ModelMergeParticipant extends CVSModelSynchronizeParticipant {
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#getName()
*/
+ @Override
public String getName() {
- return NLS.bind(CVSUIMessages.CompareParticipant_0, new String[] { ((CVSMergeSubscriber)getSubscriber()).getName(), Utils.getScopeDescription(getContext().getScope()) });
+ return NLS.bind(CVSUIMessages.CompareParticipant_0, new String[] { getSubscriber().getName(), Utils.getScopeDescription(getContext().getScope()) });
}
/*
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/OpenChangeSetAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/OpenChangeSetAction.java
index f4c5f471c..365f33c47 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/OpenChangeSetAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/OpenChangeSetAction.java
@@ -58,7 +58,7 @@ class OpenChangeSetAction extends ResourceModelParticipantAction {
if (selection.size() == 1) {
Object o = selection.getFirstElement();
if (o instanceof IAdaptable) {
- ChangeSet set = (ChangeSet)((IAdaptable)o).getAdapter(ChangeSet.class);
+ ChangeSet set = ((IAdaptable)o).getAdapter(ChangeSet.class);
if (set != null)
return set;
}
@@ -92,6 +92,7 @@ class OpenChangeSetAction extends ResourceModelParticipantAction {
return null;
}
+ @Override
protected boolean isEnabledForSelection(IStructuredSelection selection) {
// The selection only contains appropriate files so
// only enable if the selection is contained within a single change set
@@ -208,9 +209,11 @@ class OpenChangeSetAction extends ResourceModelParticipantAction {
return (CheckedInChangeSetCollector)getConfiguration().getProperty(CVSChangeSetCollector.CVS_CHECKED_IN_COLLECTOR);
}
- public void run() {
+ @Override
+ public void run() {
try {
PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) throws InvocationTargetException,
InterruptedException {
openEditor(monitor);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheTreeContentsOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheTreeContentsOperation.java
index aee0e9478..61c410d69 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheTreeContentsOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheTreeContentsOperation.java
@@ -52,6 +52,7 @@ public abstract class CacheTreeContentsOperation extends SingleCommandOperation
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.operations.SingleCommandOperation#execute(org.eclipse.team.internal.ccvs.core.CVSTeamProvider, org.eclipse.core.resources.IResource[], boolean, org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
protected void execute(CVSTeamProvider provider, IResource[] resources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException {
IResource[] files = getFilesWithUncachedContents(resources, recurse);
if (files.length > 0)
@@ -79,7 +80,7 @@ public abstract class CacheTreeContentsOperation extends SingleCommandOperation
IResource local = getTree().getResource(node);
IFileRevision remote = getRemoteFileState(twd);
if (remote != null) {
- IResourceVariant variant = (IResourceVariant)Adapters.adapt(remote, IResourceVariant.class);
+ IResourceVariant variant = Adapters.adapt(remote, IResourceVariant.class);
if (local.getType() == IResource.FILE
&& isEnabledForDirection(twd.getDirection())
&& variant instanceof RemoteFile) {
@@ -114,6 +115,7 @@ public abstract class CacheTreeContentsOperation extends SingleCommandOperation
*
* @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#getLocalRoot(org.eclipse.team.internal.ccvs.core.CVSTeamProvider)
*/
+ @Override
protected ICVSFolder getLocalRoot(CVSTeamProvider provider)
throws CVSException {
try {
@@ -129,6 +131,7 @@ public abstract class CacheTreeContentsOperation extends SingleCommandOperation
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#getCVSArguments(org.eclipse.core.resources.IResource[])
*/
+ @Override
protected ICVSResource[] getCVSArguments(Session session, IResource[] resources) {
List result = new ArrayList();
for (int i = 0; i < resources.length; i++) {
@@ -148,6 +151,7 @@ public abstract class CacheTreeContentsOperation extends SingleCommandOperation
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.operations.SingleCommandOperation#executeCommand(org.eclipse.team.internal.ccvs.core.client.Session, org.eclipse.team.internal.ccvs.core.CVSTeamProvider, org.eclipse.team.internal.ccvs.core.ICVSResource[], boolean, org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
protected IStatus executeCommand(Session session, CVSTeamProvider provider, ICVSResource[] resources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException {
return Command.UPDATE.execute(
session,
@@ -155,16 +159,20 @@ public abstract class CacheTreeContentsOperation extends SingleCommandOperation
getLocalOptions(true),
resources,
new UpdateListener(new IUpdateMessageListener() {
+ @Override
public void fileInformation(int type, ICVSFolder parent, String filename) {
// Do nothing
}
+ @Override
public void fileDoesNotExist(ICVSFolder parent, String filename) {
// Do nothing
}
+ @Override
public void directoryInformation(ICVSFolder commandRoot, String path,
boolean newDirectory) {
// Do nothing
}
+ @Override
public void directoryDoesNotExist(ICVSFolder commandRoot, String path) {
// Do nothing
}
@@ -175,6 +183,7 @@ public abstract class CacheTreeContentsOperation extends SingleCommandOperation
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.operations.SingleCommandOperation#getLocalOptions(boolean)
*/
+ @Override
protected LocalOption[] getLocalOptions(boolean recurse) {
return Update.IGNORE_LOCAL_CHANGES.addTo(super.getLocalOptions(recurse));
}
@@ -182,6 +191,7 @@ public abstract class CacheTreeContentsOperation extends SingleCommandOperation
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#getTaskName(org.eclipse.team.internal.ccvs.core.CVSTeamProvider)
*/
+ @Override
protected String getTaskName(CVSTeamProvider provider) {
return NLS.bind(CVSUIMessages.CacheTreeContentsOperation_0, new String[] {provider.getProject().getName()});
}
@@ -189,6 +199,7 @@ public abstract class CacheTreeContentsOperation extends SingleCommandOperation
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
*/
+ @Override
protected String getTaskName() {
return CVSUIMessages.CacheTreeContentsOperation_1;
}
@@ -204,6 +215,7 @@ public abstract class CacheTreeContentsOperation extends SingleCommandOperation
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#consultModelsForMappings()
*/
+ @Override
public boolean consultModelsForMappings() {
return false;
}
@@ -211,6 +223,7 @@ public abstract class CacheTreeContentsOperation extends SingleCommandOperation
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#isReportableError(org.eclipse.core.runtime.IStatus)
*/
+ @Override
protected boolean isReportableError(IStatus status) {
return super.isReportableError(status) && status.getSeverity() == IStatus.ERROR;
}
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 53d3a78f6..21b59b888 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
@@ -50,18 +50,23 @@ public class RefreshRemoteProjectSelectionPage extends CVSWizardPage {
* Custom input provider which returns the list of root folders
*/
private class InputElement implements IWorkbenchAdapter, IAdaptable {
+ @Override
public Object[] getChildren(Object o) {
return rootFolders;
}
+ @Override
public ImageDescriptor getImageDescriptor(Object object) {
return null;
}
+ @Override
public String getLabel(Object o) {
return null;
}
+ @Override
public Object getParent(Object o) {
return null;
}
+ @Override
public <T> T getAdapter(Class<T> adapter) {
if (adapter == IWorkbenchAdapter.class) return adapter.cast(this);
return null;
@@ -91,6 +96,7 @@ public class RefreshRemoteProjectSelectionPage extends CVSWizardPage {
/**
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
+ @Override
public void createControl(Composite parent) {
final Composite composite = new Composite(parent, SWT.NONE);
@@ -109,6 +115,7 @@ public class RefreshRemoteProjectSelectionPage extends CVSWizardPage {
listArea.createArea(composite);
listArea.addPropertyChangeListener(new IPropertyChangeListener() {
+ @Override
public void propertyChange(PropertyChangeEvent event) {
updateEnablement();
}
@@ -118,6 +125,7 @@ public class RefreshRemoteProjectSelectionPage extends CVSWizardPage {
workingSetArea = new WorkingSetSelectionArea(getShell(), CVSUIMessages.RefreshRemoteProjectSelectionPage_noWorkingSet, CVSUIMessages.RefreshRemoteProjectSelectionPage_workingSet, settings); //
setWorkingSet(workingSet);
workingSetArea.addPropertyChangeListener(new IPropertyChangeListener() {
+ @Override
public void propertyChange(PropertyChangeEvent event) {
workingSet = (IWorkingSet)event.getNewValue();
handleWorkingSetChange();
@@ -168,6 +176,6 @@ public class RefreshRemoteProjectSelectionPage extends CVSWizardPage {
*/
public ICVSRemoteResource[] getSelectedRemoteProject() {
Object[] checked = listArea.getViewer().getCheckedElements();
- return (ICVSRemoteResource[]) Arrays.asList(checked).toArray(new ICVSRemoteResource[checked.length]);
+ return Arrays.asList(checked).toArray(new ICVSRemoteResource[checked.length]);
}
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipant.java
index 366872055..624e0f435 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipant.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipant.java
@@ -42,6 +42,7 @@ public class CVSParticipant extends SubscriberParticipant implements IChangeSetP
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.subscribers.SubscriberParticipant#initializeConfiguration(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
*/
+ @Override
protected void initializeConfiguration(ISynchronizePageConfiguration configuration) {
super.initializeConfiguration(configuration);
// The decorator adds itself to the configuration
@@ -52,7 +53,8 @@ public class CVSParticipant extends SubscriberParticipant implements IChangeSetP
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SubscriberParticipant#updateLabels(org.eclipse.team.ui.synchronize.ISynchronizeModelElement, org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor)
*/
- public void prepareCompareInput(ISynchronizeModelElement element, CompareConfiguration config, IProgressMonitor monitor) throws TeamException {
+ @Override
+ public void prepareCompareInput(ISynchronizeModelElement element, CompareConfiguration config, IProgressMonitor monitor) throws TeamException {
monitor.beginTask(null, 100);
deriveBaseContentsFromLocal(element, Policy.subMonitorFor(monitor, 10));
super.prepareCompareInput(element, config, Policy.subMonitorFor(monitor, 80));
@@ -100,7 +102,7 @@ public class CVSParticipant extends SubscriberParticipant implements IChangeSetP
protected static SyncInfo getSyncInfo(ISynchronizeModelElement element) {
if (element instanceof IAdaptable) {
- return (SyncInfo)((IAdaptable)element).getAdapter(SyncInfo.class);
+ return ((IAdaptable)element).getAdapter(SyncInfo.class);
}
return null;
}
@@ -144,7 +146,8 @@ public class CVSParticipant extends SubscriberParticipant implements IChangeSetP
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#getPreferencePages()
*/
- public PreferencePage[] getPreferencePages() {
+ @Override
+ public PreferencePage[] getPreferencePages() {
return addCVSPreferencePages(super.getPreferencePages());
}
@@ -161,7 +164,8 @@ public class CVSParticipant extends SubscriberParticipant implements IChangeSetP
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#getChangeSetCapability()
*/
- public ChangeSetCapability getChangeSetCapability() {
+ @Override
+ public ChangeSetCapability getChangeSetCapability() {
if (capability == null) {
capability = createChangeSetCapability();
}
@@ -179,7 +183,8 @@ public class CVSParticipant extends SubscriberParticipant implements IChangeSetP
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#isViewerContributionsSupported()
*/
- protected boolean isViewerContributionsSupported() {
+ @Override
+ protected boolean isViewerContributionsSupported() {
return true;
}
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OpenChangeSetAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OpenChangeSetAction.java
index 9b13486ed..57e1a7794 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OpenChangeSetAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OpenChangeSetAction.java
@@ -14,7 +14,6 @@
package org.eclipse.team.internal.ccvs.ui.subscriber;
import java.lang.reflect.InvocationTargetException;
-import com.ibm.icu.text.DateFormat;
import org.eclipse.compare.structuremergeviewer.IDiffElement;
import org.eclipse.core.resources.IResource;
@@ -34,6 +33,8 @@ import org.eclipse.team.internal.core.subscribers.CheckedInChangeSet;
import org.eclipse.team.internal.ui.synchronize.ChangeSetDiffNode;
import org.eclipse.team.ui.synchronize.*;
+import com.ibm.icu.text.DateFormat;
+
class OpenChangeSetAction extends SynchronizeModelAction {
protected OpenChangeSetAction(ISynchronizePageConfiguration configuration) {
@@ -43,17 +44,20 @@ class OpenChangeSetAction extends SynchronizeModelAction {
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#getSyncInfoFilter()
*/
- protected FastSyncInfoFilter getSyncInfoFilter() {
+ @Override
+ protected FastSyncInfoFilter getSyncInfoFilter() {
return new AndSyncInfoFilter(new FastSyncInfoFilter[] {
new FastSyncInfoFilter() {
- public boolean select(SyncInfo info) {
+ @Override
+ public boolean select(SyncInfo info) {
return info.getLocal().getType() == IResource.FILE;
}
},
new OrSyncInfoFilter(new FastSyncInfoFilter[] {
new SyncInfoDirectionFilter(new int[] { SyncInfo.INCOMING, SyncInfo.CONFLICTING }),
new FastSyncInfoFilter() {
- public boolean select(SyncInfo info) {
+ @Override
+ public boolean select(SyncInfo info) {
return !info.getComparator().isThreeWay();
}
}
@@ -66,7 +70,7 @@ class OpenChangeSetAction extends SynchronizeModelAction {
if (selection.size() == 1) {
Object o = selection.getFirstElement();
if (o instanceof IAdaptable) {
- ChangeSet set = (ChangeSet)((IAdaptable)o).getAdapter(ChangeSet.class);
+ ChangeSet set = ((IAdaptable)o).getAdapter(ChangeSet.class);
if (set != null)
return set;
}
@@ -93,7 +97,7 @@ class OpenChangeSetAction extends SynchronizeModelAction {
private ChangeSet getChangeSet(ISynchronizeModelElement element) {
if (element == null) return null;
if (element instanceof IAdaptable) {
- ChangeSet set = (ChangeSet)((IAdaptable)element).getAdapter(ChangeSet.class);
+ ChangeSet set = ((IAdaptable)element).getAdapter(ChangeSet.class);
if (set != null)
return set;
}
@@ -103,7 +107,8 @@ class OpenChangeSetAction extends SynchronizeModelAction {
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
*/
- protected boolean updateSelection(IStructuredSelection selection) {
+ @Override
+ protected boolean updateSelection(IStructuredSelection selection) {
boolean enabled = super.updateSelection(selection);
if (enabled) {
// The selection only contains appropriate files so
@@ -117,9 +122,11 @@ class OpenChangeSetAction extends SynchronizeModelAction {
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#getSubscriberOperation(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration, org.eclipse.compare.structuremergeviewer.IDiffElement[])
*/
- protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
+ @Override
+ protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
return new SynchronizeModelOperation(configuration, elements) {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
SyncInfoSet set = getSyncInfoSet();
SyncInfo[] infos = set.getSyncInfos();
if (infos.length > 0) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateOperation.java
index 0a0540e5a..1f115f650 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateOperation.java
@@ -49,6 +49,7 @@ public class RefreshDirtyStateOperation extends CVSSubscriberOperation {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberOperation#run(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
protected void runWithProjectRule(IProject project, SyncInfoSet set, IProgressMonitor monitor) throws TeamException {
final SyncInfo[] infos = set.getSyncInfos();
if (infos.length == 0) return;
@@ -62,6 +63,7 @@ public class RefreshDirtyStateOperation extends CVSSubscriberOperation {
ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor(project);
final ContentComparisonSyncInfoFilter comparator = new SyncInfoFilter.ContentComparisonSyncInfoFilter(false);
folder.run(new ICVSRunnable() {
+ @Override
public void run(IProgressMonitor monitor) throws CVSException {
monitor.beginTask(null, infos.length * 100);
for (int i = 0; i < infos.length; i++) {
@@ -90,7 +92,7 @@ public class RefreshDirtyStateOperation extends CVSSubscriberOperation {
}
private SyncInfoToDiffConverter getConverter() {
- SyncInfoToDiffConverter converter = (SyncInfoToDiffConverter)CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().getAdapter(SyncInfoToDiffConverter.class);
+ SyncInfoToDiffConverter converter = CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().getAdapter(SyncInfoToDiffConverter.class);
if (converter == null)
return SyncInfoToDiffConverter.getDefault();
return converter;
@@ -103,11 +105,13 @@ public class RefreshDirtyStateOperation extends CVSSubscriberOperation {
IDiff node = nodes[i];
tree.add(node);
}
- new CacheBaseContentsOperation(getPart(), new ResourceMapping[] { (ResourceMapping)project.getAdapter(ResourceMapping.class) },
+ new CacheBaseContentsOperation(getPart(), new ResourceMapping[] { project.getAdapter(ResourceMapping.class) },
tree, true) {
+ @Override
protected ResourceMappingContext getResourceMappingContext() {
return new SingleProjectSubscriberContext(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber(), false, project);
}
+ @Override
protected SynchronizationScopeManager createScopeManager(boolean consultModels) {
return new SingleProjectScopeManager(getJobName(), getSelectedMappings(), getResourceMappingContext(), consultModels, project);
}
@@ -119,13 +123,15 @@ public class RefreshDirtyStateOperation extends CVSSubscriberOperation {
}
}
- protected String getErrorTitle() {
+ @Override
+ protected String getErrorTitle() {
return CVSUIMessages.RefreshDirtyStateOperation_0;
}
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberAction#getJobName(org.eclipse.team.ui.sync.SyncInfoSet)
*/
+ @Override
protected String getJobName() {
return CVSUIMessages.RefreshDirtyStateOperation_1;
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsWizard.java
index 5d590f4e5..3bda16e63 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsWizard.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsWizard.java
@@ -51,6 +51,7 @@ public class CheckoutAsWizard extends Wizard {
/**
* @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
*/
+ @Override
public void resourceChanged(IResourceChangeEvent event) {
IResourceDelta root = event.getDelta();
IResourceDelta[] projectDeltas = root.getAffectedChildren();
@@ -94,6 +95,7 @@ public class CheckoutAsWizard extends Wizard {
/**
* @see org.eclipse.jface.wizard.IWizard#addPages()
*/
+ @Override
public void addPages() {
setNeedsProgressMonitor(true);
ImageDescriptor substImage = CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_CHECKOUT);
@@ -128,6 +130,7 @@ public class CheckoutAsWizard extends Wizard {
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.IWizard#performFinish()
*/
+ @Override
public boolean performFinish() {
try {
if (mainPage.isPerformConfigure()) {
@@ -160,6 +163,7 @@ public class CheckoutAsWizard extends Wizard {
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.IWizard#canFinish()
*/
+ @Override
public boolean canFinish() {
return (mainPage.isPageComplete()
&& (mainPage.isPerformConfigure()
@@ -170,6 +174,7 @@ public class CheckoutAsWizard extends Wizard {
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.IWizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
*/
+ @Override
public IWizardPage getNextPage(IWizardPage page) {
if (page == mainPage) {
if (mainPage.isPerformConfigure()) return tagSelectionPage;
@@ -223,7 +228,7 @@ public class CheckoutAsWizard extends Wizard {
* Return the remote folders to be checked out
*/
private ICVSRemoteFolder[] getRemoteFolders() {
- ICVSRemoteFolder[] folders = (ICVSRemoteFolder[]) remoteFolders.clone();
+ ICVSRemoteFolder[] folders = remoteFolders.clone();
CVSTag selectedTag = getSelectedTag();
// see bug 160851
if(selectedTag != null){
@@ -257,6 +262,7 @@ public class CheckoutAsWizard extends Wizard {
ICVSRemoteFolder folder = getRemoteFolder();
final boolean recurse = mainPage.isRecurse();
new CheckoutSingleProjectOperation(part, folder, newProject, targetLocation, false, mainPage.getWorkingSets()) {
+ @Override
protected boolean isRecursive() {
return recurse;
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizard.java
index 336686a71..72f9a9dd9 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizard.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizard.java
@@ -92,7 +92,8 @@ public class CommitWizard extends ResizableWizard {
fModesForNamesForOneTime= modes;
}
- protected void execute(IProgressMonitor monitor) throws CVSException, InterruptedException {
+ @Override
+ protected void execute(IProgressMonitor monitor) throws CVSException, InterruptedException {
try {
monitor.beginTask(null, (fNewResources.length + fAllResources.length) * 100);
if (fNewResources.length > 0) {
@@ -103,7 +104,8 @@ public class CommitWizard extends ResizableWizard {
}
if (fAllResources.length > 0) {
CommitOperation commitOperation = new CommitOperation(getPart(), RepositoryProviderOperation.asResourceMappers(fAllResources), new Command.LocalOption[0], fComment) {
- public boolean consultModelsForMappings() {
+ @Override
+ public boolean consultModelsForMappings() {
// Do not consult models from the commit wizard
return false;
}
@@ -117,11 +119,13 @@ public class CommitWizard extends ResizableWizard {
}
}
- protected String getJobName() {
+ @Override
+ protected String getJobName() {
return CVSUIMessages.CommitWizard_0;
}
- protected String getTaskName() {
+ @Override
+ protected String getTaskName() {
return CVSUIMessages.CommitWizard_1;
}
@@ -138,6 +142,7 @@ public class CommitWizard extends ResizableWizard {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.jobs.IJobChangeListener#done(org.eclipse.core.runtime.jobs.IJobChangeEvent)
*/
+ @Override
public void done(IJobChangeEvent event) {
super.done(event);
if (jobListener != null)
@@ -147,6 +152,7 @@ public class CommitWizard extends ResizableWizard {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.jobs.IJobChangeListener#scheduled(org.eclipse.core.runtime.jobs.IJobChangeEvent)
*/
+ @Override
public void scheduled(IJobChangeEvent event) {
super.scheduled(event);
if (jobListener != null)
@@ -196,7 +202,7 @@ public class CommitWizard extends ResizableWizard {
private void getAllOutOfSync() throws CVSException {
try {
ISynchronizationContext context = getParticipant().getContext();
- SubscriberDiffTreeEventHandler handler = (SubscriberDiffTreeEventHandler) Adapters.adapt(context, SubscriberDiffTreeEventHandler.class);
+ SubscriberDiffTreeEventHandler handler = Adapters.adapt(context, SubscriberDiffTreeEventHandler.class);
handler.initializeIfNeeded();
Job.getJobManager().join(context, null);
} catch (InterruptedException e) {
@@ -207,6 +213,7 @@ public class CommitWizard extends ResizableWizard {
public boolean hasOutgoingChanges() {
IResourceDiffTree tree = getDiffTree();
return tree != null && tree.hasMatchingDiffs(ResourcesPlugin.getWorkspace().getRoot().getFullPath(), new FastDiffFilter() {
+ @Override
public boolean select(IDiff diff) {
return AbstractCommitAction.hasLocalChange(diff);
}
@@ -216,6 +223,7 @@ public class CommitWizard extends ResizableWizard {
boolean hasConflicts() {
IResourceDiffTree tree = getDiffTree();
return tree != null && tree.hasMatchingDiffs(ResourcesPlugin.getWorkspace().getRoot().getFullPath(), new FastDiffFilter() {
+ @Override
public boolean select(IDiff diff) {
if (diff instanceof IThreeWayDiff) {
IThreeWayDiff twd = (IThreeWayDiff) diff;
@@ -260,14 +268,16 @@ public class CommitWizard extends ResizableWizard {
return fParticipant;
}
- public boolean canFinish() {
+ @Override
+ public boolean canFinish() {
final IWizardPage current= getContainer().getCurrentPage();
if (current == fFileTypePage && fCommitPage != null)
return false;
return super.canFinish();
}
- public boolean performFinish() {
+ @Override
+ public boolean performFinish() {
final String comment= fCommitPage.getComment(getShell());
if (comment == null)
@@ -321,12 +331,14 @@ public class CommitWizard extends ResizableWizard {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.wizards.ResizableWizard#performCancel()
*/
- public boolean performCancel() {
+ @Override
+ public boolean performCancel() {
fCommitPage.finish();
return super.performCancel();
}
- public void addPages() {
+ @Override
+ public void addPages() {
final Collection names= new HashSet();
final Collection extensions= new HashSet();
@@ -343,7 +355,8 @@ public class CommitWizard extends ResizableWizard {
super.addPages();
}
- public void dispose() {
+ @Override
+ public void dispose() {
fParticipant.dispose();
super.dispose();
}
@@ -374,7 +387,8 @@ public class CommitWizard extends ResizableWizard {
try {
final IResource [][] resources = new IResource[][] { null };
PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
resources[0] = getDeepResourcesToCommit(traversals, monitor);
} catch (CoreException e) {

Back to the top