Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2016-04-12 05:40:01 +0000
committerSergey Prigogin2016-04-12 17:10:44 +0000
commit132925c986c76f54c95685d5fa19b26a3a8d7b10 (patch)
treed879828b77acc804eabb8915a65959ce9e09c9af /bundles/org.eclipse.team.ui
parent2c29d2886b5f82ebeae2f33f39249288387dbc97 (diff)
downloadeclipse.platform.team-132925c986c76f54c95685d5fa19b26a3a8d7b10.tar.gz
eclipse.platform.team-132925c986c76f54c95685d5fa19b26a3a8d7b10.tar.xz
eclipse.platform.team-132925c986c76f54c95685d5fa19b26a3a8d7b10.zip
Bug 491484 - Add @Override to org.eclipse.team.ui
Split the generated cleanup up to avoid a silly CQ for that. Change-Id: Ice9f06131ae1500b6882b463eca12bfe507055ca Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'bundles/org.eclipse.team.ui')
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DefaultUIFileModificationValidator.java31
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetContentHandler.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java3
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PropertyChangeHandler.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/SWTUtils.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/StorageTypedElement.java7
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamAdapterFactory.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamCapabilityHelper.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/UIProjectSetSerializationContext.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java9
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareAction.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareRevisionAction.java3
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java3
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ImportProjectSetAction.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/JobRunnableContext.java15
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/OpenRevisionAction.java3
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/OpenWithMenu.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ProgressDialogRunnableContext.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java24
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/AdditionalMappingsDialog.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialogWithProjects.java7
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MultipleYesNoPrompter.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/NoChangesDialog.java13
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PreferencePageContainerDialog.java21
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PromptingDialog.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingHierarchyArea.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingResourceDisplayArea.java48
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingSelectionArea.java15
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java13
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareLocalHistory.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DateHistoryCategory.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DialogHistoryPageSite.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/EditionHistoryPage.java20
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionEditorInput.java27
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionTypedElement.java5
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryDropAdapter.java5
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryTableProvider.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java30
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryViewDefaultPage.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/HistoryPageSourceWorkbenchPart.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java42
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPageSource.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryTableProvider.java9
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/MessageHistoryCategory.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/OpenLocalFileAction.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ReplaceLocalHistory.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java5
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/WorkbenchHistoryPageSite.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/AbstractCompareInput.java11
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/BuildScopeOperation.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonViewerAdvisor.java33
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DefaultResourceMappingMerger.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeChangesSection.java25
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeStatusLineContributionGroup.java5
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorAction.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorDialog.java5
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/GererateRejFileAction.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/IgnoreLeadingPathSegmentsAction.java3
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAction.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllActionHandler.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllOperation.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeIncomingChangesAction.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelCompareEditorInput.java18
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelEnablementPreferencePage.java11
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSelectionDropDownAction.java9
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSynchronizePage.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RemoveFromViewAction.java3
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceCompareInputChangeNotifier.java18
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDiffCompareInput.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDragAdapterAssistant.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMappingLabelProvider.java5
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMarkAsMergedHandler.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeActionHandler.java5
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeHandler.java9
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelActionProvider.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java25
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelLabelProvider.java13
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelPersistenceAdapter.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelProviderOperation.java3
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipant.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipantFactory.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelSorter.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RestoreRemovedItemsAction.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ReversePatchAction.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ShowModelProviderAction.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StorageStreamMerger.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StreamMergerDelegate.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/SynchronizationResourceMappingContext.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/TeamViewerSorter.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/WorkspaceTeamStateProvider.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/FileTypeTable.java35
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/IgnorePreferencePage.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/ResourceModelPreferencePage.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java7
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TextPreferencePage.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantRegistry.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardDescription.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardRegistry.java1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderDescriptor.java7
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderManager.java8
108 files changed, 833 insertions, 62 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DefaultUIFileModificationValidator.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DefaultUIFileModificationValidator.java
index 20f1f37a2..b1fae2ef5 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DefaultUIFileModificationValidator.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DefaultUIFileModificationValidator.java
@@ -52,14 +52,16 @@ public class DefaultUIFileModificationValidator extends DefaultFileModificationV
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createMainDialogArea(org.eclipse.swt.widgets.Composite)
*/
- protected void createMainDialogArea(Composite parent) {
+ @Override
+ protected void createMainDialogArea(Composite parent) {
createWrappingLabel(parent, TeamUIMessages.DefaultUIFileModificationValidator_1);
}
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createDropDownDialogArea(org.eclipse.swt.widgets.Composite)
*/
- protected Composite createDropDownDialogArea(Composite parent) {
+ @Override
+ protected Composite createDropDownDialogArea(Composite parent) {
Composite composite = createComposite(parent);
createWrappingLabel(composite, TeamUIMessages.DefaultUIFileModificationValidator_2);
org.eclipse.swt.widgets.List fileList = new org.eclipse.swt.widgets.List(composite, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
@@ -78,28 +80,32 @@ public class DefaultUIFileModificationValidator extends DefaultFileModificationV
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#updateEnablements()
*/
- protected void updateEnablements() {
+ @Override
+ protected void updateEnablements() {
// Nothing to do
}
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeCancelButton()
*/
- protected boolean includeCancelButton() {
+ @Override
+ protected boolean includeCancelButton() {
return false;
}
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeOkButton()
*/
- protected boolean includeOkButton() {
+ @Override
+ protected boolean includeOkButton() {
return false;
}
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
*/
- protected void createButtonsForButtonBar(Composite parent) {
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.YES_ID, IDialogConstants.YES_LABEL, true);
createButton(parent, IDialogConstants.NO_ID, IDialogConstants.NO_LABEL, true);
super.createButtonsForButtonBar(parent);
@@ -108,7 +114,8 @@ public class DefaultUIFileModificationValidator extends DefaultFileModificationV
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#buttonPressed(int)
*/
- protected void buttonPressed(int id) {
+ @Override
+ protected void buttonPressed(int id) {
if (IDialogConstants.YES_ID == id)
okPressed();
else if (IDialogConstants.NO_ID == id)
@@ -121,20 +128,23 @@ public class DefaultUIFileModificationValidator extends DefaultFileModificationV
/* (non-Javadoc)
* @see org.eclipse.team.internal.core.DefaultFileModificationValidator#validateEdit(org.eclipse.core.resources.IFile[], org.eclipse.core.resources.team.FileModificationValidationContext)
*/
- public IStatus validateEdit(final IFile[] allFiles, FileModificationValidationContext context) {
+ @Override
+ public IStatus validateEdit(final IFile[] allFiles, FileModificationValidationContext context) {
final IFile[] readOnlyFiles = getReadOnlyFiles(allFiles);
if (readOnlyFiles.length > 0 && context != null) {
final Shell shell = getShell(context);
final boolean[] ok = new boolean[] { false };
if (readOnlyFiles.length == 1) {
shell.getDisplay().syncExec(new Runnable() {
- public void run() {
+ @Override
+ public void run() {
ok[0] = MessageDialog.openQuestion(shell, TeamUIMessages.DefaultUIFileModificationValidator_3, NLS.bind(TeamUIMessages.DefaultUIFileModificationValidator_4, new String[] { readOnlyFiles[0].getFullPath().toString() })); //
}
});
} else {
shell.getDisplay().syncExec(new Runnable() {
- public void run() {
+ @Override
+ public void run() {
ok[0] = FileListDialog.openQuestion(shell, readOnlyFiles);
}
});
@@ -156,6 +166,7 @@ public class DefaultUIFileModificationValidator extends DefaultFileModificationV
return Utils.getShell(null, true);
}
+ @Override
public IStatus validateSave(IFile file) {
if (file.isReadOnly() && isMakeWrittableWhenContextNotProvided()) {
IFile[] readOnlyFiles = new IFile[] { file };
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java
index 2fd168c6e..de14317a2 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java
@@ -43,6 +43,7 @@ public class Policy {
}
static final DebugOptionsListener DEBUG_OPTIONS_LISTENER = new DebugOptionsListener() {
+ @Override
public void optionsChanged(DebugOptions options) {
boolean DEBUG = options.getBooleanOption(TeamUIPlugin.ID + "/debug", false); //$NON-NLS-1$
DEBUG_SYNC_MODELS = DEBUG && options.getBooleanOption(TeamUIPlugin.ID + "/syncmodels", false); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetContentHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetContentHandler.java
index f0b5d2bc1..333ff0ec7 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetContentHandler.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetContentHandler.java
@@ -28,6 +28,7 @@ public class ProjectSetContentHandler extends DefaultHandler {
List references;
boolean isVersionOne = false;
+ @Override
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
String elementName = getElementName(namespaceURI, localName, qName);
if (elementName.equals("psf")) { //$NON-NLS-1$
@@ -54,6 +55,7 @@ public class ProjectSetContentHandler extends DefaultHandler {
}
}
+ @Override
public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
String elementName = getElementName(namespaceURI, localName, qName);
if (elementName.equals("psf")) { //$NON-NLS-1$
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java
index 422d9f0fb..9ed7144ee 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java
@@ -158,6 +158,7 @@ public class ProjectSetImporter {
MessageDialog.QUESTION, buttons, 0);
shell.getDisplay().syncExec(new Runnable() {
+ @Override
public void run() {
dialog.open();
}
@@ -280,10 +281,12 @@ public class ProjectSetImporter {
public AdviceDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage, int dialogImageType, String[] dialogButtonLabels, int defaultIndex) {
super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
}
+ @Override
protected Control createCustomArea(Composite parent) {
final Button checkBox = new Button(parent, SWT.CHECK);
checkBox.setText(TeamUIMessages.ImportProjectSetDialog_duplicatedWorkingSet_applyToAll);
checkBox.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
applyToAll = checkBox.getSelection();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PropertyChangeHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PropertyChangeHandler.java
index dd9b8bce1..4c8f22e32 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PropertyChangeHandler.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PropertyChangeHandler.java
@@ -32,6 +32,7 @@ public class PropertyChangeHandler {
/**
* @see org.eclipse.core.runtime.ISafeRunnable#handleException(java.lang.Throwable)
*/
+ @Override
public void handleException(Throwable exception) {
TeamUIPlugin.log(IStatus.ERROR, TeamUIMessages.AbstractSynchronizeParticipant_5, exception);
}
@@ -39,6 +40,7 @@ public class PropertyChangeHandler {
/**
* @see org.eclipse.core.runtime.ISafeRunnable#run()
*/
+ @Override
public void run() throws Exception {
fListener.propertyChange(fEvent);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/SWTUtils.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/SWTUtils.java
index e98487251..925d38563 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/SWTUtils.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/SWTUtils.java
@@ -51,6 +51,7 @@ public class SWTUtils {
Link link = new Link(parent, SWT.NONE);
link.setText(getLinkLabel(pageId, message));
link.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
PreferenceDialog prefDialog = PreferencesUtil.createPreferenceDialogOn(shell, pageId, displayIds, null);
prefDialog.open();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/StorageTypedElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/StorageTypedElement.java
index f21a3addc..a1c9ee92e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/StorageTypedElement.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/StorageTypedElement.java
@@ -32,6 +32,7 @@ public abstract class StorageTypedElement implements ITypedElement, IEncodedStre
this.localEncoding = localEncoding;
}
+ @Override
public InputStream getContents() throws CoreException {
if (bufferedContents == null) {
cacheContents(new NullProgressMonitor());
@@ -72,6 +73,7 @@ public abstract class StorageTypedElement implements ITypedElement, IEncodedStre
/* (non-Javadoc)
* @see org.eclipse.compare.ITypedElement#getImage()
*/
+ @Override
public Image getImage() {
return CompareUI.getImage(getType());
}
@@ -79,6 +81,7 @@ public abstract class StorageTypedElement implements ITypedElement, IEncodedStre
/* (non-Javadoc)
* @see org.eclipse.compare.ITypedElement#getType()
*/
+ @Override
public String getType() {
String name = getName();
if (name != null) {
@@ -95,6 +98,7 @@ public abstract class StorageTypedElement implements ITypedElement, IEncodedStre
/* (non-Javadoc)
* @see org.eclipse.compare.IEncodedStreamContentAccessor#getCharset()
*/
+ @Override
public String getCharset() throws CoreException {
if (localEncoding != null)
return localEncoding;
@@ -111,14 +115,17 @@ public abstract class StorageTypedElement implements ITypedElement, IEncodedStre
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
+ @Override
public Object getAdapter(Class adapter) {
if (adapter == ISharedDocumentAdapter.class) {
synchronized (this) {
if (sharedDocumentAdapter == null)
sharedDocumentAdapter = new SharedDocumentAdapter() {
+ @Override
public IEditorInput getDocumentKey(Object element) {
return StorageTypedElement.this.getDocumentKey(element);
}
+ @Override
public void flushDocument(IDocumentProvider provider,
IEditorInput documentKey, IDocument document,
boolean overwrite)
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamAdapterFactory.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamAdapterFactory.java
index 52a43f25a..709852c1d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamAdapterFactory.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamAdapterFactory.java
@@ -33,6 +33,7 @@ public class TeamAdapterFactory implements IAdapterFactory {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
*/
+ @Override
public Object getAdapter(Object adaptableObject, Class adapterType) {
if(adaptableObject instanceof DiffNode && adapterType == IWorkbenchAdapter.class) {
return diffNodeAdapter;
@@ -65,6 +66,7 @@ public class TeamAdapterFactory implements IAdapterFactory {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
*/
+ @Override
public Class[] getAdapterList() {
return new Class[] {
IWorkbenchAdapter.class,
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamCapabilityHelper.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamCapabilityHelper.java
index 0709076d7..e4ac84343 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamCapabilityHelper.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamCapabilityHelper.java
@@ -95,9 +95,11 @@ public class TeamCapabilityHelper {
continue;
}
providerIdToPluginId.put(id, new IPluginContribution() {
+ @Override
public String getLocalId() {
return id;
}
+ @Override
public String getPluginId() {
return pluginId;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
index b8e5ad023..53a5190ac 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
@@ -108,6 +108,7 @@ public class TeamUIPlugin extends AbstractUIPlugin {
final Object [] ret = new Object[1];
final CoreException [] exc = new CoreException[1];
BusyIndicator.showWhile(null, new Runnable() {
+ @Override
public void run() {
try {
ret[0] = element.createExecutableExtension(classAttribute);
@@ -148,6 +149,7 @@ public class TeamUIPlugin extends AbstractUIPlugin {
/**
* Initializes the preferences for this plugin if necessary.
*/
+ @Override
protected void initializeDefaultPluginPreferences() {
IPreferenceStore store = getPreferenceStore();
store.setDefault(IPreferenceIds.SYNCVIEW_VIEW_SYNCINFO_IN_LABEL, false);
@@ -212,6 +214,7 @@ public class TeamUIPlugin extends AbstractUIPlugin {
/**
* @see Plugin#start(BundleContext)
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
@@ -230,11 +233,13 @@ public class TeamUIPlugin extends AbstractUIPlugin {
IPreferenceStore store = getPreferenceStore();
if (store.getBoolean(IPreferenceIds.PREF_WORKSPACE_FIRST_TIME)) {
Job capabilityInitializer = new Job("") { //$NON-NLS-1$
+ @Override
protected IStatus run(IProgressMonitor monitor) {
TeamCapabilityHelper.getInstance();
getPreferenceStore().setValue(IPreferenceIds.PREF_WORKSPACE_FIRST_TIME, false);
return Status.OK_STATUS;
}
+ @Override
public boolean shouldRun() {
// Only initialize the capability helper if the UI is running (bug 76348)
return PlatformUI.isWorkbenchRunning();
@@ -251,6 +256,7 @@ public class TeamUIPlugin extends AbstractUIPlugin {
/* (non-Javadoc)
* @see Plugin#stop(BundleContext)
*/
+ @Override
public void stop(BundleContext context) throws Exception {
try {
// unregister debug options listener
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/UIProjectSetSerializationContext.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/UIProjectSetSerializationContext.java
index 1c321b129..8f42ea7d0 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/UIProjectSetSerializationContext.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/UIProjectSetSerializationContext.java
@@ -57,6 +57,7 @@ public class UIProjectSetSerializationContext extends ProjectSetSerializationCon
*
* @return the shell (not <code>null</code>)
*/
+ @Override
public Object getShell() {
return shell;
}
@@ -79,9 +80,11 @@ public class UIProjectSetSerializationContext extends ProjectSetSerializationCon
*
* @see org.eclipse.team.core.ProjectSetSerializationContext#confirmOverwrite(org.eclipse.core.resources.IProject[])
*/
+ @Override
public IProject[] confirmOverwrite(final IProject[] projects) throws TeamException {
IPromptCondition prompt = new IPromptCondition() {
List resources = Arrays.asList(projects);
+ @Override
public boolean needsPrompt(IResource resource) {
if (resource instanceof IProject) {
IProject project = (IProject) resource;
@@ -89,6 +92,7 @@ public class UIProjectSetSerializationContext extends ProjectSetSerializationCon
}
return false;
}
+ @Override
public String promptMessage(IResource resource) {
if (resource.exists())
return NLS.bind(TeamUIMessages.UIProjectSetSerializationContext_0, new String[] { resource.getName() });
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
index 84a48abd8..028c9a6e3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
@@ -144,9 +144,11 @@ public class Utils {
}
public static final Comparator resourceComparator = new Comparator() {
+ @Override
public boolean equals(Object obj) {
return false;
}
+ @Override
public int compare(Object o1, Object o2) {
IResource resource0 = (IResource) o1;
IResource resource1 = (IResource) o2;
@@ -238,6 +240,7 @@ public class Utils {
final Exception[] holder = new Exception[1];
BusyIndicator.showWhile(parent.getDisplay(), new Runnable() {
+ @Override
public void run() {
try {
runnable.run(new NullProgressMonitor());
@@ -288,6 +291,7 @@ public class Utils {
if (syncIfNecessary) {
final Shell[] result = new Shell[] { null };
Runnable r = new Runnable() {
+ @Override
public void run() {
result[0] = new Shell(Display.getDefault());
}
@@ -305,6 +309,7 @@ public class Utils {
*/
public static void handle(final Throwable exception) {
TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
IStatus error = null;
Throwable t = exception;
@@ -410,6 +415,7 @@ public class Utils {
* @deprecated As of 3.5, replaced by
* {@link #updateLabels(SyncInfo, CompareConfiguration, IProgressMonitor)}
*/
+ @Deprecated
public static void updateLabels(SyncInfo sync, CompareConfiguration config) {
updateLabels(sync, config, null);
}
@@ -851,6 +857,7 @@ public class Utils {
final Control ctrl = v.getControl();
if (ctrl != null && !ctrl.isDisposed()) {
ctrl.getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
if (!ctrl.isDisposed()) {
BusyIndicator.showWhile(ctrl.getDisplay(), r);
@@ -869,6 +876,7 @@ public class Utils {
public static void syncExec(final Runnable r, final Control ctrl) {
if (ctrl != null && !ctrl.isDisposed()) {
ctrl.getDisplay().syncExec(new Runnable() {
+ @Override
public void run() {
if (!ctrl.isDisposed()) {
BusyIndicator.showWhile(ctrl.getDisplay(), r);
@@ -881,6 +889,7 @@ public class Utils {
public static void asyncExec(final Runnable r, final Control ctrl) {
if (ctrl != null && !ctrl.isDisposed()) {
ctrl.getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
if (!ctrl.isDisposed()) {
BusyIndicator.showWhile(ctrl.getDisplay(), r);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java
index 1d077ecec..34130c202 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java
@@ -24,10 +24,12 @@ import org.eclipse.team.internal.ui.synchronize.patch.ApplyPatchOperation;
public class ApplyPatchAction extends TeamAction {
+ @Override
public boolean isEnabled() {
return true;
}
+ @Override
protected void execute(IAction action) throws InvocationTargetException,
InterruptedException {
IResource[] resources = getSelectedResources();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareAction.java
index 6f34ac870..de06efa68 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareAction.java
@@ -32,6 +32,7 @@ import org.eclipse.ui.*;
public class CompareAction extends TeamAction {
+ @Override
protected void execute(IAction action) throws InvocationTargetException,
InterruptedException {
@@ -89,6 +90,7 @@ public class CompareAction extends TeamAction {
}
}
+ @Override
public boolean isEnabled() {
int l = getSelectedResources().length;
return l == 2 || l == 3;
@@ -117,6 +119,7 @@ public class CompareAction extends TeamAction {
this.theResources = theResources;
}
+ @Override
protected Control createCustomArea(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new GridLayout());
@@ -142,6 +145,7 @@ public class CompareAction extends TeamAction {
}
private SelectionListener selectionListener = new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
Button selectedButton = (Button) e.widget;
if (!selectedButton.getSelection())
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareRevisionAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareRevisionAction.java
index 50c293266..33e55289f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareRevisionAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareRevisionAction.java
@@ -44,6 +44,7 @@ public class CompareRevisionAction extends BaseSelectionListenerAction {
this(TeamUIMessages.LocalHistoryPage_CompareAction, page);
}
+ @Override
public void run() {
IStructuredSelection structSel = selection;
@@ -175,11 +176,13 @@ public class CompareRevisionAction extends BaseSelectionListenerAction {
* @deprecated As of 3.5, replaced by
* {@link Utils#findReusableCompareEditor(CompareEditorInput, IWorkbenchPage, Class[])}
*/
+ @Deprecated
public static IEditorPart findReusableCompareEditor(IWorkbenchPage workbenchPage) {
return Utils.findReusableCompareEditor(null, workbenchPage,
new Class[] { CompareFileRevisionEditorInput.class });
}
+ @Override
protected boolean updateSelection(IStructuredSelection selection) {
this.selection = selection;
if (selection.size() == 1){
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java
index 3f2d8d936..08a58a801 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java
@@ -28,9 +28,11 @@ import org.eclipse.team.internal.ui.wizards.ConfigureProjectWizard;
*/
public class ConfigureProjectAction extends TeamAction {
+ @Override
protected void execute(IAction action) throws InvocationTargetException,
InterruptedException {
run(new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
if (!isEnabled())
@@ -47,6 +49,7 @@ public class ConfigureProjectAction extends TeamAction {
/**
* @see TeamAction#isEnabled()
*/
+ @Override
public boolean isEnabled() {
IProject[] selectedProjects = getSelectedProjects();
for (int i = 0; i < selectedProjects.length; i++) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ImportProjectSetAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ImportProjectSetAction.java
index eff765b8a..16f013868 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ImportProjectSetAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ImportProjectSetAction.java
@@ -33,10 +33,12 @@ public class ImportProjectSetAction extends ActionDelegate implements IObjectAct
private IStructuredSelection fSelection;
+ @Override
public void run(IAction action) {
final Shell shell= Display.getDefault().getActiveShell();
try {
new ProgressMonitorDialog(shell).run(true, true, new WorkspaceModifyOperation(null) {
+ @Override
protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
Iterator iterator= fSelection.iterator();
while (iterator.hasNext()) {
@@ -61,12 +63,14 @@ public class ImportProjectSetAction extends ActionDelegate implements IObjectAct
}
}
+ @Override
public void selectionChanged(IAction action, ISelection sel) {
if (sel instanceof IStructuredSelection) {
fSelection= (IStructuredSelection) sel;
}
}
+ @Override
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/JobRunnableContext.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/JobRunnableContext.java
index 7711ad982..b07f8bb5d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/JobRunnableContext.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/JobRunnableContext.java
@@ -48,13 +48,16 @@ public class JobRunnableContext implements ITeamRunnableContext {
super(name);
this.runnable = runnable;
}
- public IStatus run(IProgressMonitor monitor) {
+ @Override
+ public IStatus run(IProgressMonitor monitor) {
return JobRunnableContext.this.run(runnable, monitor);
}
+ @Override
public boolean belongsTo(Object family) {
return JobRunnableContext.this.belongsTo(this, family);
}
- public IRunnableWithProgress getRunnable() {
+ @Override
+ public IRunnableWithProgress getRunnable() {
return runnable;
}
}
@@ -68,13 +71,16 @@ public class JobRunnableContext implements ITeamRunnableContext {
super(name);
this.runnable = runnable;
}
- public IStatus runInWorkspace(IProgressMonitor monitor) {
+ @Override
+ public IStatus runInWorkspace(IProgressMonitor monitor) {
return JobRunnableContext.this.run(runnable, monitor);
}
+ @Override
public boolean belongsTo(Object family) {
return JobRunnableContext.this.belongsTo(this, family);
}
- public IRunnableWithProgress getRunnable() {
+ @Override
+ public IRunnableWithProgress getRunnable() {
return runnable;
}
}
@@ -87,6 +93,7 @@ public class JobRunnableContext implements ITeamRunnableContext {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.operations.ITeamRunnableContext#run(java.lang.String, boolean, org.eclipse.jface.operation.IRunnableWithProgress)
*/
+ @Override
public void run(IRunnableWithProgress runnable) {
Job job;
if (schedulingRule == null && !postponeBuild) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/OpenRevisionAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/OpenRevisionAction.java
index 04d53a5d9..58355bf53 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/OpenRevisionAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/OpenRevisionAction.java
@@ -37,6 +37,7 @@ public class OpenRevisionAction extends BaseSelectionListenerAction {
this.page = page;
}
+ @Override
public void run() {
IStructuredSelection structSel = selection;
@@ -56,6 +57,7 @@ public class OpenRevisionAction extends BaseSelectionListenerAction {
MessageDialog.openError(page.getSite().getShell(), TeamUIMessages.OpenRevisionAction_DeletedRevTitle, TeamUIMessages.OpenRevisionAction_DeletedRevMessage);
} else {
IRunnableWithProgress runnable = new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
Utils.openEditor(page.getSite().getPage(), revision, monitor);
@@ -78,6 +80,7 @@ public class OpenRevisionAction extends BaseSelectionListenerAction {
}
}
+ @Override
protected boolean updateSelection(IStructuredSelection selection) {
this.selection = selection;
return shouldShow();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/OpenWithMenu.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/OpenWithMenu.java
index c9c93340e..eecac58e0 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/OpenWithMenu.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/OpenWithMenu.java
@@ -76,6 +76,7 @@ public class OpenWithMenu extends ContributionItem {
private static final Comparator comparer = new Comparator() {
private Collator collator = Collator.getInstance();
+ @Override
public int compare(Object arg0, Object arg1) {
String s1 = ((IEditorDescriptor) arg0).getLabel();
String s2 = ((IEditorDescriptor) arg1).getLabel();
@@ -164,6 +165,7 @@ public class OpenWithMenu extends ContributionItem {
menuItem.setImage(image);
}
Listener listener = new Listener() {
+ @Override
public void handleEvent(Event event) {
switch (event.type) {
case SWT.Selection:
@@ -193,6 +195,7 @@ public class OpenWithMenu extends ContributionItem {
final MenuItem menuItem = new MenuItem(menu, SWT.PUSH);
menuItem.setText(TeamUIMessages.LocalHistoryPage_OpenWithMenu_Other);
Listener listener = new Listener() {
+ @Override
public void handleEvent(Event event) {
switch (event.type) {
case SWT.Selection:
@@ -216,6 +219,7 @@ public class OpenWithMenu extends ContributionItem {
menuItem.addListener(SWT.Selection, listener);
}
+ @Override
public void fill(Menu menu, int index) {
final IFileRevision fileRevision = getFileRevision();
if (fileRevision == null) {
@@ -310,6 +314,7 @@ public class OpenWithMenu extends ContributionItem {
.setText(TeamUIMessages.LocalHistoryPage_OpenWithMenu_DefaultEditorDescription);
Listener listener = new Listener() {
+ @Override
public void handleEvent(Event event) {
switch (event.type) {
case SWT.Selection:
@@ -395,6 +400,7 @@ public class OpenWithMenu extends ContributionItem {
/*
* (non-Javadoc) Returns whether this menu is dynamic.
*/
+ @Override
public boolean isDynamic() {
return true;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ProgressDialogRunnableContext.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ProgressDialogRunnableContext.java
index 38e6ae46f..a9793e451 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ProgressDialogRunnableContext.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ProgressDialogRunnableContext.java
@@ -65,6 +65,7 @@ public class ProgressDialogRunnableContext implements ITeamRunnableContext {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.actions.ITeamRunnableContext#run(org.eclipse.jface.operation.IRunnableWithProgress)
*/
+ @Override
public void run(IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
getRunnableContext().run(true /* fork */, true /* cancelable */, wrapRunnable(runnable));
}
@@ -72,6 +73,7 @@ public class ProgressDialogRunnableContext implements ITeamRunnableContext {
private IRunnableContext getRunnableContext() {
if (runnableContext == null) {
return new IRunnableContext() {
+ @Override
public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable)
throws InvocationTargetException, InterruptedException {
IProgressService manager = PlatformUI.getWorkbench().getProgressService();
@@ -88,6 +90,7 @@ public class ProgressDialogRunnableContext implements ITeamRunnableContext {
*/
private IRunnableWithProgress wrapRunnable(final IRunnableWithProgress runnable) {
return new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
if (schedulingRule == null && !postponeBuild) {
@@ -95,6 +98,7 @@ public class ProgressDialogRunnableContext implements ITeamRunnableContext {
} else {
final Exception[] exception = new Exception[] { null };
ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
+ @Override
public void run(IProgressMonitor pm) throws CoreException {
try {
runnable.run(pm);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
index 286337019..b42d57d6d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
@@ -59,35 +59,44 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
private IWorkbenchPart targetPart;
private IWorkbenchWindow window;
private IPartListener2 targetPartListener = new IPartListener2() {
+ @Override
public void partActivated(IWorkbenchPartReference partRef) {
}
+ @Override
public void partBroughtToTop(IWorkbenchPartReference partRef) {
}
+ @Override
public void partClosed(IWorkbenchPartReference partRef) {
if (targetPart == partRef.getPart(false)) {
targetPart = null;
}
}
+ @Override
public void partDeactivated(IWorkbenchPartReference partRef) {
}
+ @Override
public void partHidden(IWorkbenchPartReference partRef) {
}
+ @Override
public void partInputChanged(IWorkbenchPartReference partRef) {
}
+ @Override
public void partOpened(IWorkbenchPartReference partRef) {
}
+ @Override
public void partVisible(IWorkbenchPartReference partRef) {
}
};
private ISelectionListener selectionListener = new ISelectionListener() {
+ @Override
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
if(selection instanceof IStructuredSelection)
TeamAction.this.selection = (IStructuredSelection)selection;
@@ -261,6 +270,7 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
switch (progressKind) {
case PROGRESS_BUSYCURSOR :
BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
+ @Override
public void run() {
try {
runnable.run(new NullProgressMonitor());
@@ -291,6 +301,7 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
/*
* Method declared on IActionDelegate.
*/
+ @Override
public void selectionChanged(IAction action, ISelection selection) {
if (selection instanceof IStructuredSelection) {
this.selection = (IStructuredSelection) selection;
@@ -332,6 +343,7 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
/*
* Method declared on IObjectActionDelegate.
*/
+ @Override
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
if(targetPart != null) {
this.shell = targetPart.getSite().getShell();
@@ -411,6 +423,7 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
/* (non-Javadoc)
* @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
*/
+ @Override
public void init(IViewPart view) {
if(view != null) {
this.shell = view.getSite().getShell();
@@ -418,6 +431,7 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
}
}
+ @Override
public void init(IWorkbenchWindow window) {
this.window = window;
this.shell = window.getShell();
@@ -429,6 +443,7 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
return window;
}
+ @Override
public void dispose() {
super.dispose();
if(window != null) {
@@ -464,6 +479,7 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
* </p>
* @throws ExecutionException
*/
+ @Override
public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow activeWorkbenchWindow = HandlerUtil.getActiveWorkbenchWindow(event);
if (activeWorkbenchWindow != null) {
@@ -510,6 +526,7 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
/**
* Common run method for all Team actions.
*/
+ @Override
public void run(IAction action) {
try {
execute(action);
@@ -537,7 +554,8 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
* <code>IActionDelegate2</code> method does nothing. Subclasses may
* reimplement.
*/
- public void init(IAction action) {
+ @Override
+ public void init(IAction action) {
}
/**
@@ -545,13 +563,15 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
* <code>IActionDelegate2</code> method redirects to the <code>run</code>
* method. Subclasses may reimplement.
*/
- final public void runWithEvent(IAction action, Event event) {
+ @Override
+ final public void runWithEvent(IAction action, Event event) {
run(action);
}
/* (non-Javadoc)
* @see org.eclipse.core.commands.AbstractHandler#setEnabled(java.lang.Object)
*/
+ @Override
public void setEnabled(Object evaluationContext) {
IWorkbenchWindow activeWorkbenchWindow = (IWorkbenchWindow) HandlerUtil
.getVariable(evaluationContext,
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/AdditionalMappingsDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/AdditionalMappingsDialog.java
index e308411c6..ef58402d8 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/AdditionalMappingsDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/AdditionalMappingsDialog.java
@@ -36,6 +36,7 @@ public class AdditionalMappingsDialog extends DetailsDialog {
this.context = context;
}
+ @Override
protected void createMainDialogArea(Composite parent) {
createWrappingLabel(parent, TeamUIMessages.AdditionalMappingsDialog_0);
createSelectedMappingsArea(parent);
@@ -80,9 +81,11 @@ public class AdditionalMappingsDialog extends DetailsDialog {
final Button forcePreviewButton = SWTUtils.createCheckBox(parent, previewMessage);
forcePreviewButton.setSelection(forcePreview);
forcePreviewButton.addSelectionListener(new SelectionListener() {
+ @Override
public void widgetDefaultSelected(SelectionEvent e) {
// Ignore
}
+ @Override
public void widgetSelected(SelectionEvent e) {
forcePreview = forcePreviewButton.getSelection();
}
@@ -90,17 +93,20 @@ public class AdditionalMappingsDialog extends DetailsDialog {
}
}
- protected Composite createDropDownDialogArea(Composite parent) {
+ @Override
+ protected Composite createDropDownDialogArea(Composite parent) {
// TODO Auto-generated method stub
return null;
}
- protected void updateEnablements() {
+ @Override
+ protected void updateEnablements() {
// TODO Auto-generated method stub
}
- protected boolean includeDetailsButton() {
+ @Override
+ protected boolean includeDetailsButton() {
return false;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java
index ac4097822..a4601a26d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java
@@ -87,6 +87,7 @@ abstract public class DetailsDialog extends TrayDialog {
* Note that the Details button will only be visible if the error being
* displayed specifies child details.
*/
+ @Override
protected void buttonPressed(int id) {
if (id == IDialogConstants.DETAILS_ID) { // was the details button pressed?
toggleDetailsArea();
@@ -98,6 +99,7 @@ abstract public class DetailsDialog extends TrayDialog {
/* (non-Javadoc)
* Method declared in Window.
*/
+ @Override
protected void configureShell(Shell shell) {
super.configureShell(shell);
shell.setText(title);
@@ -110,6 +112,7 @@ abstract public class DetailsDialog extends TrayDialog {
/* (non-Javadoc)
* Method declared on Dialog.
*/
+ @Override
protected void createButtonsForButtonBar(Composite parent) {
// create OK and Details buttons
if(includeOkButton()) {
@@ -137,6 +140,7 @@ abstract public class DetailsDialog extends TrayDialog {
* Creates and returns the contents of the upper part
* of the dialog (above the button bar).
*/
+ @Override
final protected Control createDialogArea(Composite parent) {
applyDialogFont(parent);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialogWithProjects.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialogWithProjects.java
index d4b1e4966..0cdba2677 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialogWithProjects.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialogWithProjects.java
@@ -52,6 +52,7 @@ public class DetailsDialogWithProjects extends DetailsDialog {
/**
* @see DetailsDialog#createMainDialogArea(Composite)
*/
+ @Override
protected void createMainDialogArea(Composite composite) {
Label label = new Label(composite, SWT.WRAP);
label.setText(message);
@@ -64,6 +65,7 @@ public class DetailsDialogWithProjects extends DetailsDialog {
/**
* @see DetailsDialog#createDropDownDialogArea(Composite)
*/
+ @Override
protected Composite createDropDownDialogArea(Composite parent) {
// create a composite with standard margins and spacing
Composite composite = new Composite(parent, SWT.NONE);
@@ -96,6 +98,7 @@ public class DetailsDialogWithProjects extends DetailsDialog {
/**
* @see DetailsDialog#updateEnablements()
*/
+ @Override
protected void updateEnablements() {
setPageComplete(true);
}
@@ -103,6 +106,7 @@ public class DetailsDialogWithProjects extends DetailsDialog {
/**
* @see DetailsDialog#includeCancelButton()
*/
+ @Override
protected boolean includeCancelButton() {
return includeCancelButton;
}
@@ -111,7 +115,8 @@ public class DetailsDialogWithProjects extends DetailsDialog {
* @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#isMainGrabVertical()
* @since 3.4
*/
- protected boolean isMainGrabVertical() {
+ @Override
+ protected boolean isMainGrabVertical() {
return false;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MultipleYesNoPrompter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MultipleYesNoPrompter.java
index 10100a58a..1e8e6f6b7 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MultipleYesNoPrompter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MultipleYesNoPrompter.java
@@ -111,6 +111,7 @@ public class MultipleYesNoPrompter {
// which is probably not running in the UI thread.
shell.getDisplay().syncExec(
new Runnable() {
+ @Override
public void run() {
dialog.open();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/NoChangesDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/NoChangesDialog.java
index 76692f97e..5ba61f86d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/NoChangesDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/NoChangesDialog.java
@@ -34,10 +34,12 @@ public class NoChangesDialog extends DetailsDialog {
this.scope = scope;
}
+ @Override
protected void initializeStyle() {
// Use the default dialog style
}
+ @Override
protected Composite createDropDownDialogArea(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
@@ -53,6 +55,7 @@ public class NoChangesDialog extends DetailsDialog {
return composite;
}
+ @Override
protected void createMainDialogArea(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
@@ -63,6 +66,7 @@ public class NoChangesDialog extends DetailsDialog {
createMessageArea(composite);
}
+ @Override
protected void updateEnablements() {
// Nothing to do
}
@@ -112,7 +116,8 @@ public class NoChangesDialog extends DetailsDialog {
final Image[] image = new Image[1];
display.syncExec(new Runnable() {
- public void run() {
+ @Override
+ public void run() {
image[0] = display.getSystemImage(imageID);
}
});
@@ -120,11 +125,13 @@ public class NoChangesDialog extends DetailsDialog {
return image[0];
}
- public boolean isHelpAvailable() {
+ @Override
+ public boolean isHelpAvailable() {
return false;
}
- protected boolean includeCancelButton() {
+ @Override
+ protected boolean includeCancelButton() {
return false;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PreferencePageContainerDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PreferencePageContainerDialog.java
index 5cf285ab3..a81fff0ac 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PreferencePageContainerDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PreferencePageContainerDialog.java
@@ -81,6 +81,7 @@ public class PreferencePageContainerDialog extends TrayDialog
/**
* @see Dialog#okPressed()
*/
+ @Override
protected void okPressed() {
for (int i = 0; i < pages.length; i++) {
PreferencePage page = pages[i];
@@ -106,6 +107,7 @@ public class PreferencePageContainerDialog extends TrayDialog
/**
* @see Dialog#createDialogArea(Composite)
*/
+ @Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite)super.createDialogArea(parent);
((GridLayout) composite.getLayout()).numColumns = 1;
@@ -128,6 +130,7 @@ public class PreferencePageContainerDialog extends TrayDialog
applyDialogFont(parent);
composite.addHelpListener(new HelpListener(){
+ @Override
public void helpRequested(HelpEvent e) {
currentPage.performHelp();
}
@@ -152,7 +155,8 @@ public class PreferencePageContainerDialog extends TrayDialog
}
tabFolder.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
updatePageSelection();
}
});
@@ -245,6 +249,7 @@ public class PreferencePageContainerDialog extends TrayDialog
fMessageLabel.setFont(JFaceResources.getBannerFont());
final IPropertyChangeListener fontListener = new IPropertyChangeListener() {
+ @Override
public void propertyChange(PropertyChangeEvent event) {
if(JFaceResources.BANNER_FONT.equals(event.getProperty()) ||
JFaceResources.DIALOG_FONT.equals(event.getProperty())) {
@@ -254,6 +259,7 @@ public class PreferencePageContainerDialog extends TrayDialog
};
fMessageLabel.addDisposeListener(new DisposeListener() {
+ @Override
public void widgetDisposed(DisposeEvent event) {
JFaceResources.getFontRegistry().removeListener(fontListener);
}
@@ -356,6 +362,7 @@ public class PreferencePageContainerDialog extends TrayDialog
/**
* @see IPreferencePageContainer#updateMessage()
*/
+ @Override
public void updateMessage() {
if (currentPage != null) {
String pageMessage = currentPage.getMessage();
@@ -387,6 +394,7 @@ public class PreferencePageContainerDialog extends TrayDialog
/**
* @see IPreferencePageContainer#getPreferenceStore()
*/
+ @Override
public IPreferenceStore getPreferenceStore() {
return null;
}
@@ -394,6 +402,7 @@ public class PreferencePageContainerDialog extends TrayDialog
/**
* @see IPreferencePageContainer#updateButtons()
*/
+ @Override
public void updateButtons() {
if (fOkButton != null) {
boolean isValid = true;
@@ -411,6 +420,7 @@ public class PreferencePageContainerDialog extends TrayDialog
/**
* @see IPreferencePageContainer#updateTitle()
*/
+ @Override
public void updateTitle() {
updateMessage();
}
@@ -418,6 +428,7 @@ public class PreferencePageContainerDialog extends TrayDialog
/**
* @see Dialog#createButtonsForButtonBar(Composite)
*/
+ @Override
protected void createButtonsForButtonBar(Composite parent) {
fOkButton= createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
@@ -452,14 +463,17 @@ public class PreferencePageContainerDialog extends TrayDialog
}
- public void addPageChangedListener(final IPageChangedListener listener) {
+ @Override
+ public void addPageChangedListener(final IPageChangedListener listener) {
pageChangedListeners.add(listener);
}
+ @Override
public Object getSelectedPage() {
return currentPage;
}
+ @Override
public void removePageChangedListener(IPageChangedListener listener) {
pageChangedListeners.remove(listener);
}
@@ -469,7 +483,8 @@ public class PreferencePageContainerDialog extends TrayDialog
for (int i = 0; i < listeners.length; i++) {
final IPageChangedListener l = (IPageChangedListener) listeners[i];
SafeRunnable.run(new SafeRunnable() {
- public void run() {
+ @Override
+ public void run() {
l.pageChanged(event);
}
});
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PromptingDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PromptingDialog.java
index 28b9aa853..62a5a6289 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PromptingDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PromptingDialog.java
@@ -39,6 +39,7 @@ public class PromptingDialog extends MultipleYesNoPrompter {
public PromptingDialog(final Shell shell, IResource[] resources, IPromptCondition condition, String title, boolean allOrNothing) {
super(new IShellProvider() {
+ @Override
public Shell getShell() {
return shell;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingHierarchyArea.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingHierarchyArea.java
index 438c756f4..7a2ab62db 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingHierarchyArea.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingHierarchyArea.java
@@ -44,6 +44,7 @@ public class ResourceMappingHierarchyArea extends DialogArea implements INavigat
this.context = context;
}
+ @Override
public void createArea(Composite parent) {
Composite composite = new Composite(parent, SWT.NULL);
GridLayout layout = new GridLayout(1, false);
@@ -96,6 +97,7 @@ public class ResourceMappingHierarchyArea extends DialogArea implements INavigat
/* (non-Javadoc)
* @see org.eclipse.ui.navigator.internal.extensions.INavigatorContentServiceListener#onLoad(org.eclipse.ui.navigator.internal.extensions.NavigatorContentExtension)
*/
+ @Override
public void onLoad(INavigatorContentExtension anExtension) {
anExtension.getStateModel().setProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_SCOPE, scope);
if (context != null) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingResourceDisplayArea.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingResourceDisplayArea.java
index 9ac36dd96..e37779099 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingResourceDisplayArea.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingResourceDisplayArea.java
@@ -82,7 +82,8 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
/* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
*/
- public Object[] getChildren(Object o) {
+ @Override
+ public Object[] getChildren(Object o) {
ResourceTraversal[] traversals = getTraversals();
List result = new ArrayList();
for (int i = 0; i < traversals.length; i++) {
@@ -104,7 +105,8 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
/* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
*/
- public ImageDescriptor getImageDescriptor(Object o) {
+ @Override
+ public ImageDescriptor getImageDescriptor(Object o) {
o = mapping;
IWorkbenchAdapter workbenchAdapter = getWorkbenchAdapter((IAdaptable)o);
if (workbenchAdapter == null) {
@@ -123,21 +125,24 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
/* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
*/
- public String getLabel(Object o) {
+ @Override
+ public String getLabel(Object o) {
return ResourceMappingResourceDisplayArea.getLabel(mapping);
}
/* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
*/
- public Object getParent(Object o) {
+ @Override
+ public Object getParent(Object o) {
return null;
}
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
- public Object getAdapter(Class adapter) {
+ @Override
+ public Object getAdapter(Class adapter) {
if (adapter == IWorkbenchAdapter.class)
return this;
return null;
@@ -163,7 +168,8 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
/* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
*/
- public Object[] getChildren(Object o) {
+ @Override
+ public Object[] getChildren(Object o) {
if (traversal.getDepth() == IResource.DEPTH_INFINITE) {
return getChildren(true);
} else if (traversal.getDepth() == IResource.DEPTH_ONE && isTraversalRoot(resource)) {
@@ -202,7 +208,8 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
/* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
*/
- public ImageDescriptor getImageDescriptor(Object object) {
+ @Override
+ public ImageDescriptor getImageDescriptor(Object object) {
IWorkbenchAdapter workbenchAdapter = getWorkbenchAdapter(resource);
if (workbenchAdapter == null)
return null;
@@ -212,7 +219,8 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
/* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
*/
- public String getLabel(Object o) {
+ @Override
+ public String getLabel(Object o) {
if (resource.getType() != IResource.PROJECT && isTraversalRoot(resource))
return resource.getFullPath().toString();
IWorkbenchAdapter workbenchAdapter = getWorkbenchAdapter(resource);
@@ -228,14 +236,16 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
/* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
*/
- public Object getParent(Object o) {
+ @Override
+ public Object getParent(Object o) {
return parent;
}
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
- public Object getAdapter(Class adapter) {
+ @Override
+ public Object getAdapter(Class adapter) {
if (adapter == IWorkbenchAdapter.class)
return this;
return null;
@@ -261,7 +271,8 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.dialogs.DialogArea#createArea(org.eclipse.swt.widgets.Composite)
*/
- public void createArea(Composite parent) {
+ @Override
+ public void createArea(Composite parent) {
Composite composite = createComposite(parent, 1, true);
label = createWrappingLabel(composite, message, 1);
@@ -272,7 +283,8 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
viewer.setContentProvider(new WorkbenchContentProvider());
viewer.setLabelProvider(new WorkbenchLabelProvider());
viewer.setComparator(new ResourceComparator(ResourceComparator.NAME) {
- public int compare(Viewer viewer, Object o1, Object o2) {
+ @Override
+ public int compare(Viewer viewer, Object o1, Object o2) {
if (o1 instanceof ResourceTraversalElement && o2 instanceof ResourceTraversalElement) {
ResourceTraversalElement e1 = (ResourceTraversalElement) o1;
ResourceTraversalElement e2 = (ResourceTraversalElement) o2;
@@ -318,7 +330,8 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
final Map result = new HashMap();
try {
PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
monitor.beginTask(null, IProgressMonitor.UNKNOWN);
ResourceTraversal[] traversals = mapping.getTraversals(context, Policy.subMonitorFor(monitor, IProgressMonitor.UNKNOWN));
@@ -335,7 +348,8 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
private void buildFilteredResourceMap(final ResourceMapping mapping, final ResourceTraversal traversal, IProgressMonitor monitor, final Map result) throws CoreException {
traversal.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
+ @Override
+ public boolean visit(IResource resource) throws CoreException {
if (filter.select(resource, mapping, traversal)) {
// Add the resource to the result
result.put(resource, new ArrayList());
@@ -370,7 +384,8 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
final List traversals = new ArrayList();
try {
PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
traversals.add(mapping.getTraversals(context, monitor));
} catch (CoreException e) {
@@ -391,7 +406,8 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
final List members = new ArrayList();
try {
PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
members.add(context.fetchMembers(container, monitor));
} catch (CoreException e) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingSelectionArea.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingSelectionArea.java
index ba2ef80ec..df7862936 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingSelectionArea.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingSelectionArea.java
@@ -60,7 +60,8 @@ public class ResourceMappingSelectionArea extends DialogArea {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.dialogs.DialogArea#createArea(org.eclipse.swt.widgets.Composite)
*/
- public void createArea(Composite parent) {
+ @Override
+ public void createArea(Composite parent) {
Composite composite = createComposite(parent, 1, true);
GridLayout layout = new GridLayout(1, false);
layout.marginHeight = 0;
@@ -82,7 +83,8 @@ public class ResourceMappingSelectionArea extends DialogArea {
viewer.setInput(new AdaptableList(mappings));
if (isSupportsSelection()) {
viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
ResourceMapping oldSelection = selectedMapping;
selectedMapping = internalGetSelectedMapping();
if (oldSelection != selectedMapping)
@@ -97,7 +99,8 @@ public class ResourceMappingSelectionArea extends DialogArea {
private void initializeCheckboxViewer(Composite composite) {
final CheckboxTableViewer checkboxViewer = getCheckboxTableViewer();
checkboxViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
+ @Override
+ public void checkStateChanged(CheckStateChangedEvent event) {
ResourceMapping[] oldMappings = checkedMappings;
checkedMappings = internalGetCheckedMappings();
if (oldMappings != checkedMappings)
@@ -113,7 +116,8 @@ public class ResourceMappingSelectionArea extends DialogArea {
selectAll.setText(TeamUIMessages.ResourceMappingSelectionArea_0);
selectAll.setLayoutData(new GridData(GridData.FILL_BOTH));
selectAll.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
checkboxViewer.setAllChecked(true);
}
});
@@ -122,7 +126,8 @@ public class ResourceMappingSelectionArea extends DialogArea {
deselectAll.setText(TeamUIMessages.ResourceMappingSelectionArea_1);
deselectAll.setLayoutData(new GridData(GridData.FILL_BOTH));
deselectAll.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
checkboxViewer.setAllChecked(false);
}
});
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java
index 4e4f912e5..8e8ca79a6 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java
@@ -33,6 +33,7 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
private ITypedElement right;
CompareInputChangeNotifier notifier = new CompareInputChangeNotifier() {
+ @Override
protected IResource[] getResources(ICompareInput input) {
IResource resource = getResource(input);
if (resource == null)
@@ -47,6 +48,7 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
* corresponding left and right objects are identical. The content is not
* considered.
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this)
return true;
@@ -62,16 +64,20 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
public MyDiffNode(ITypedElement left, ITypedElement right) {
super(Differencer.CHANGE, null, left, right);
}
+ @Override
public void fireChange() {
super.fireChange();
}
+ @Override
protected CompareInputChangeNotifier getChangeNotifier() {
return notifier;
}
+ @Override
public boolean needsUpdate() {
// The remote never changes
return false;
}
+ @Override
public void update() {
fireChange();
}
@@ -93,6 +99,7 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.LocalResourceCompareEditorInput#internalPrepareInput(org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
protected ICompareInput prepareCompareInput(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
ICompareInput input = createCompareInput();
getCompareConfiguration().setLeftEditable(isLeftEditable(input));
@@ -209,6 +216,7 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#getToolTipText()
*/
+ @Override
public String getToolTipText() {
Object[] titleObject = new Object[3];
titleObject[0] = getLongName(left);
@@ -220,6 +228,7 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#getTitle()
*/
+ @Override
public String getTitle() {
Object[] titleObject = new Object[3];
titleObject[0] = getShortName(left);
@@ -231,6 +240,7 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#getAdapter(java.lang.Class)
*/
+ @Override
public Object getAdapter(Class adapter) {
if (adapter == IFile.class || adapter == IResource.class) {
if (getLocalElement() != null) {
@@ -291,6 +301,7 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.LocalResourceCompareEditorInput#fireInputChange()
*/
+ @Override
protected void fireInputChange() {
((MyDiffNode)getCompareResult()).fireChange();
}
@@ -298,6 +309,7 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SaveableCompareEditorInput#contentsCreated()
*/
+ @Override
protected void contentsCreated() {
super.contentsCreated();
notifier.initialize();
@@ -306,6 +318,7 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SaveableCompareEditorInput#handleDispose()
*/
+ @Override
protected void handleDispose() {
super.handleDispose();
notifier.dispose();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareLocalHistory.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareLocalHistory.java
index 918f44122..2e8613a04 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareLocalHistory.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareLocalHistory.java
@@ -14,10 +14,12 @@ import org.eclipse.team.internal.ui.TeamUIMessages;
public class CompareLocalHistory extends ShowLocalHistory {
+ @Override
protected boolean isCompare() {
return true;
}
+ @Override
protected String getPromptTitle() {
return TeamUIMessages.CompareLocalHistory_0;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DateHistoryCategory.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DateHistoryCategory.java
index 81650c4d1..67fc7400f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DateHistoryCategory.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DateHistoryCategory.java
@@ -40,6 +40,7 @@ public class DateHistoryCategory extends AbstractHistoryCategory {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.AbstractCVSHistoryCategory#getName()
*/
+ @Override
public String getName() {
return name;
}
@@ -47,6 +48,7 @@ public class DateHistoryCategory extends AbstractHistoryCategory {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.AbstractCVSHistoryCategory#collectFileRevisions(org.eclipse.team.core.history.IFileRevision[], boolean)
*/
+ @Override
public boolean collectFileRevisions(IFileRevision[] fileRevisions, boolean shouldRemove) {
ArrayList pertinentRevisions = new ArrayList();
@@ -111,6 +113,7 @@ public class DateHistoryCategory extends AbstractHistoryCategory {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.AbstractCVSHistoryCategory#getRevisions()
*/
+ @Override
public IFileRevision[] getRevisions() {
return revisions;
}
@@ -118,6 +121,7 @@ public class DateHistoryCategory extends AbstractHistoryCategory {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.AbstractCVSHistoryCategory#hasRevisions()
*/
+ @Override
public boolean hasRevisions() {
if (revisions != null && revisions.length > 0)
return true;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DialogHistoryPageSite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DialogHistoryPageSite.java
index 367d0db92..568cf4f84 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DialogHistoryPageSite.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DialogHistoryPageSite.java
@@ -27,26 +27,32 @@ public class DialogHistoryPageSite implements IHistoryPageSite {
this.shell = shell;
}
+ @Override
public IPageSite getWorkbenchPageSite() {
return null;
}
+ @Override
public IWorkbenchPart getPart() {
return null;
}
+ @Override
public Shell getShell() {
return shell;
}
+ @Override
public ISelectionProvider getSelectionProvider() {
return selectionProvider;
}
+ @Override
public void setSelectionProvider(ISelectionProvider provider) {
this.selectionProvider = provider;
}
+ @Override
public void setFocus() {
// Nothing to do
}
@@ -55,10 +61,12 @@ public class DialogHistoryPageSite implements IHistoryPageSite {
this.toolBarManager = toolBarManager;
}
+ @Override
public boolean isModal() {
return true;
}
+ @Override
public IToolBarManager getToolBarManager() {
return toolBarManager;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/EditionHistoryPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/EditionHistoryPage.java
index 814696620..4ed663e8b 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/EditionHistoryPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/EditionHistoryPage.java
@@ -55,12 +55,14 @@ public class EditionHistoryPage extends LocalHistoryPage {
super(page);
}
+ @Override
protected ITypedElement getElementFor(IResource resource) {
if (resource.equals(file))
return localFileElement;
return super.getElementFor(resource);
}
+ @Override
protected CompareFileRevisionEditorInput createCompareEditorInput(ITypedElement left, ITypedElement right, IWorkbenchPage page) {
ITypedElement leftEdition = getEdition(left);
boolean leftIsLocal = false;
@@ -98,6 +100,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
this.leftIsLocal = leftIsLocal;
}
+ @Override
public LocalResourceTypedElement getLocalElement() {
if (leftRevision instanceof LocalResourceTypedElement) {
return (LocalResourceTypedElement) leftRevision;
@@ -105,6 +108,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
return super.getLocalElement();
}
+ @Override
protected FileRevisionTypedElement getRightRevision() {
if (rightRevision instanceof FileRevisionTypedElement) {
return (FileRevisionTypedElement) rightRevision;
@@ -112,18 +116,21 @@ public class EditionHistoryPage extends LocalHistoryPage {
return null;
}
+ @Override
protected FileRevisionTypedElement getLeftRevision() {
if (leftRevision instanceof FileRevisionTypedElement) {
return (FileRevisionTypedElement) leftRevision;
}
return null;
}
+ @Override
public Object getAdapter(Class adapter) {
if (adapter == IFile.class)
return null;
return super.getAdapter(adapter);
}
+ @Override
protected void handleDispose() {
if (leftIsLocal && structureCreator != null)
internalDestroy(structureCreator, getLeft());
@@ -174,6 +181,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
structureCreator = CompareUI.createStructureCreator(localFileElement);
}
+ @Override
public void setSite(IHistoryPageSite site) {
super.setSite(site);
// If the site is modal, create the local edition
@@ -185,6 +193,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.history.LocalHistoryPage#getFile()
*/
+ @Override
protected IFile getFile() {
return file;
}
@@ -192,6 +201,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.history.LocalHistoryPage#update(org.eclipse.team.core.history.IFileRevision[], org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
protected void update(IFileRevision[] revisions, IProgressMonitor monitor) {
monitor.beginTask(null, 100);
ITypedElement te = null;
@@ -237,6 +247,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
private static void sortDescending(IFileRevision[] revisions) {
Arrays.sort(revisions, new Comparator() {
+ @Override
public int compare(Object o1, Object o2) {
IFileRevision d1= (IFileRevision) o1;
IFileRevision d2= (IFileRevision) o2;
@@ -262,6 +273,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.history.LocalHistoryPage#getCompareInput(java.lang.Object)
*/
+ @Override
public ICompareInput getCompareInput(Object object) {
ITypedElement edition = getEditionFor(object);
if (edition != null && localEdition != null)
@@ -307,6 +319,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.history.LocalHistoryPage#isValidInput(java.lang.Object)
*/
+ @Override
public boolean isValidInput(Object object) {
// This page doesn't support input changes
return object.equals(element);
@@ -315,6 +328,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.history.LocalHistoryPage#dispose()
*/
+ @Override
public void dispose() {
try {
disconnect();
@@ -351,12 +365,14 @@ public class EditionHistoryPage extends LocalHistoryPage {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.history.LocalHistoryPage#getNoChangesMessage()
*/
+ @Override
protected String getNoChangesMessage() {
if (name != null)
return NLS.bind(TeamUIMessages.EditionHistoryPage_0, name);
return TeamUIMessages.EditionHistoryPage_1;
}
+ @Override
protected Image getImage(Object object) {
if (object == localEdition)
return localEdition.getImage();
@@ -366,6 +382,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
return super.getImage(object);
}
+ @Override
protected String getLabel(Object object) {
Object revision = getRevisionFor(object);
if (revision != null)
@@ -388,6 +405,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.history.LocalHistoryPage#getName()
*/
+ @Override
public String getName() {
if (name != null)
return name;
@@ -397,6 +415,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.history.LocalHistoryPage#getDescription()
*/
+ @Override
public String getDescription() {
if (name != null)
return NLS.bind(TeamUIMessages.EditionHistoryPage_2, name);
@@ -406,6 +425,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.history.LocalHistoryPage#createCompareAction()
*/
+ @Override
protected CompareRevisionAction createCompareAction() {
return new CompareEditionAction(this);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionEditorInput.java
index 8e960cdde..8b0669a62 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionEditorInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionEditorInput.java
@@ -50,34 +50,42 @@ public class FileRevisionEditorInput extends PlatformObject implements IWorkbenc
return storage;
if (storage instanceof IFileState) {
return new IFileState() {
+ @Override
public Object getAdapter(Class adapter) {
return storage.getAdapter(adapter);
}
+ @Override
public boolean isReadOnly() {
return storage.isReadOnly();
}
+ @Override
public String getName() {
return storage.getName();
}
+ @Override
public IPath getFullPath() {
return storage.getFullPath();
}
+ @Override
public InputStream getContents() throws CoreException {
return storage.getContents();
}
+ @Override
public String getCharset() throws CoreException {
return charset;
}
+ @Override
public boolean exists() {
return ((IFileState) storage).exists();
}
+ @Override
public long getModificationTime() {
return ((IFileState) storage).getModificationTime();
}
@@ -85,26 +93,32 @@ public class FileRevisionEditorInput extends PlatformObject implements IWorkbenc
}
return new IEncodedStorage() {
+ @Override
public Object getAdapter(Class adapter) {
return storage.getAdapter(adapter);
}
+ @Override
public boolean isReadOnly() {
return storage.isReadOnly();
}
+ @Override
public String getName() {
return storage.getName();
}
+ @Override
public IPath getFullPath() {
return storage.getFullPath();
}
+ @Override
public InputStream getContents() throws CoreException {
return storage.getContents();
}
+ @Override
public String getCharset() throws CoreException {
return charset;
}
@@ -131,18 +145,22 @@ public class FileRevisionEditorInput extends PlatformObject implements IWorkbenc
this(revision, wrapStorage(storage, charset));
}
+ @Override
public IStorage getStorage() throws CoreException {
return storage;
}
+ @Override
public boolean exists() {
return true;
}
+ @Override
public ImageDescriptor getImageDescriptor() {
return null;
}
+ @Override
public String getName() {
IFileRevision rev = (IFileRevision)getAdapter(IFileRevision.class);
if (rev != null)
@@ -154,15 +172,18 @@ public class FileRevisionEditorInput extends PlatformObject implements IWorkbenc
}
+ @Override
public IPersistableElement getPersistable() {
//can't persist
return null;
}
+ @Override
public String getToolTipText() {
return storage.getFullPath().toString();
}
+ @Override
public Object getAdapter(Class adapter) {
if (adapter == IWorkbenchAdapter.class)
return this;
@@ -174,14 +195,17 @@ public class FileRevisionEditorInput extends PlatformObject implements IWorkbenc
return Utils.getAdapter(fileRevision, adapter);
}
+ @Override
public Object[] getChildren(Object o) {
return new Object[0];
}
+ @Override
public ImageDescriptor getImageDescriptor(Object object) {
return null;
}
+ @Override
public String getLabel(Object o) {
IFileRevision rev = (IFileRevision)getAdapter(IFileRevision.class);
if (rev != null)
@@ -189,10 +213,12 @@ public class FileRevisionEditorInput extends PlatformObject implements IWorkbenc
return storage.getName();
}
+ @Override
public Object getParent(Object o) {
return null;
}
+ @Override
public boolean equals(Object obj) {
if (obj instanceof FileRevisionEditorInput) {
FileRevisionEditorInput other = (FileRevisionEditorInput) obj;
@@ -201,6 +227,7 @@ public class FileRevisionEditorInput extends PlatformObject implements IWorkbenc
return false;
}
+ @Override
public int hashCode() {
return fileRevision.hashCode();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionTypedElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionTypedElement.java
index 2a12bf8ba..2153e54b2 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionTypedElement.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionTypedElement.java
@@ -53,6 +53,7 @@ public class FileRevisionTypedElement extends StorageTypedElement {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.StorageTypedElement#getName()
*/
+ @Override
public String getName() {
return fileRevision.getName();
}
@@ -60,6 +61,7 @@ public class FileRevisionTypedElement extends StorageTypedElement {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.StorageTypedElement#getElementStorage(org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
protected IStorage fetchContents(IProgressMonitor monitor) throws CoreException {
return fileRevision.getStorage(monitor);
@@ -105,6 +107,7 @@ public class FileRevisionTypedElement extends StorageTypedElement {
/* (non-Javadoc)
* @see org.eclipse.compare.ISharedDocumentAdapter#getDocumentKey(java.lang.Object)
*/
+ @Override
public IEditorInput getDocumentKey(Object element) {
if (element == this && getBufferedStorage() != null) {
return new FileRevisionEditorInput(fileRevision, getBufferedStorage(), getLocalEncoding());
@@ -115,10 +118,12 @@ public class FileRevisionTypedElement extends StorageTypedElement {
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
+ @Override
public int hashCode() {
return fileRevision.hashCode();
}
+ @Override
public boolean equals(Object obj) {
if (obj == this)
return true;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryDropAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryDropAdapter.java
index d05bf8bd5..78b09316d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryDropAdapter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryDropAdapter.java
@@ -30,6 +30,7 @@ public class GenericHistoryDropAdapter extends PluginDropAdapter {
* want to really execute a DROP_MOVE, although we want to respond
* to it.
*/
+ @Override
public void dragOver(DropTargetEvent event) {
if ((event.operations & DND.DROP_LINK) == DND.DROP_LINK) {
event.detail = DND.DROP_LINK;
@@ -42,11 +43,13 @@ public class GenericHistoryDropAdapter extends PluginDropAdapter {
* want to really execute a DROP_MOVE, although we want to respond
* to it.
*/
+ @Override
public void drop(DropTargetEvent event) {
super.drop(event);
event.detail = DND.DROP_LINK;
}
+ @Override
public boolean performDrop(Object data) {
if (data == null)
return false;
@@ -64,6 +67,7 @@ public class GenericHistoryDropAdapter extends PluginDropAdapter {
return false;
}
+ @Override
public boolean validateDrop(Object target, int operation, TransferData transferType) {
if (transferType != null && ResourceTransfer.getInstance().isSupportedType(transferType)) {
return true;
@@ -72,6 +76,7 @@ public class GenericHistoryDropAdapter extends PluginDropAdapter {
return super.validateDrop(target, operation, transferType);
}
+ @Override
protected Object getCurrentTarget() {
return view;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryTableProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryTableProvider.java
index 2d5eb83c9..354a8b145 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryTableProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryTableProvider.java
@@ -57,9 +57,11 @@ public class GenericHistoryTableProvider {
*/
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) {
IFileRevision entry = adaptToFileRevision(element);
if (entry == null) return ""; //$NON-NLS-1$
@@ -89,6 +91,7 @@ public class GenericHistoryTableProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
*/
+ @Override
public Color getForeground(Object element) {
IFileRevision entry = adaptToFileRevision(element);
if (!entry.exists()) {
@@ -100,6 +103,7 @@ public class GenericHistoryTableProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
*/
+ @Override
public Color getBackground(Object element) {
return null;
}
@@ -107,6 +111,7 @@ public class GenericHistoryTableProvider {
* (non-Javadoc)
* @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
*/
+ @Override
public Font getFont(Object element) {
IFileRevision entry = adaptToFileRevision(element);
if (entry == null)
@@ -154,6 +159,7 @@ public class GenericHistoryTableProvider {
* 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) {
IFileRevision e1 = adaptToFileRevision(o1);
IFileRevision e2 = adaptToFileRevision(o2);
@@ -255,6 +261,7 @@ public class GenericHistoryTableProvider {
viewer.setComparator(sorter);
table.addDisposeListener(new DisposeListener() {
+ @Override
public void widgetDisposed(DisposeEvent e) {
if(currentRevisionFont != null) {
currentRevisionFont.dispose();
@@ -322,6 +329,7 @@ public class GenericHistoryTableProvider {
* 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.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java
index ee8b7f604..c3e184d73 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java
@@ -148,6 +148,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
this.name = name;
this.source = source;
}
+ @Override
public boolean equals(Object obj) {
if (obj instanceof NavigationHistoryEntry) {
NavigationHistoryEntry other = (NavigationHistoryEntry) obj;
@@ -160,6 +161,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
return object.equals(historyPage.getInput())
&& sameSource(source, pageSource);
}
+ @Override
public int hashCode() {
return object.hashCode();
}
@@ -167,12 +169,14 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
abstract class MenuCreator implements IMenuCreator {
private MenuManager menuManager;
+ @Override
public void dispose() {
if(menuManager != null) {
menuManager.dispose();
menuManager = null;
}
}
+ @Override
public Menu getMenu(Control parent) {
Menu fMenu = null;
if (menuManager == null) {
@@ -194,6 +198,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
menuManager.update(true);
}
protected abstract IAction[] getDropDownActions();
+ @Override
public Menu getMenu(Menu parent) {
return null;
}
@@ -211,6 +216,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
public NavigationHistoryAction() {
menuCreator = new MenuCreator() {
+ @Override
protected IAction[] getDropDownActions() {
return getActions();
}
@@ -230,6 +236,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
protected NavigationHistoryEntry[] getDropDownEntries() {
return navigationHistory.getEntries();
}
+ @Override
public void run() {
navigationHistory.gotoPreviousEntry();
updateCheckState();
@@ -274,6 +281,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
super(navigationHistoryEntry.name);
this.navigationHistoryEntry = navigationHistoryEntry;
}
+ @Override
public void run() {
navigationHistory.gotoEntry(navigationHistoryEntry);
navigateAction.updateCheckState();
@@ -304,6 +312,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
*/
private Object lastSelectedElement;
+ @Override
public void partActivated(IWorkbenchPart part) {
// don't call super.partActivated(IWorkbenchPart), it will be done in #showHistoryPageFor(...)
if (part instanceof IEditorPart)
@@ -314,6 +323,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
private boolean isUpdatingSelection = false;
+ @Override
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
if (isUpdatingSelection)
return;
@@ -352,6 +362,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
* @see org.eclipse.ui.part.PageBookView#init(org.eclipse.ui.IViewSite)
* @since 3.6.300
*/
+ @Override
public void init(IViewSite site) throws PartInitException {
super.init(site);
@@ -366,6 +377,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
lastSelectedElement= getSite().getPage().getActiveEditor();
}
+ @Override
public void createPartControl(Composite parent) {
super.createPartControl(parent);
@@ -387,6 +399,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
private void configureToolbars(IActionBars actionBars) {
pinAction = new Action(TeamUIMessages.GenericHistoryView_PinCurrentHistory, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_PINNED)) {
+ @Override
public void run() {
if (isChecked()) {
//uncheck editor linking
@@ -400,6 +413,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
pinAction.setToolTipText(TeamUIMessages.GenericHistoryView_0);
refreshAction = new Action(TeamUIMessages.GenericHistoryView_Refresh, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_REFRESH)) {
+ @Override
public void run() {
getHistoryPage().refresh();
}
@@ -408,6 +422,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
refreshAction.setEnabled(true);
linkWithEditorAction = new Action(TeamUIMessages.GenericHistoryView_LinkWithEditor, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_LINK_WITH)) {
+ @Override
public void run() {
if (isChecked()) {
// uncheck pinned
@@ -476,6 +491,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
dropTarget.addDropListener(dropAdapter);
}
+ @Override
public void setFocus() {
if (isLinkingEnabled() && lastSelectedElement != null) {
showLastSelectedElement();
@@ -506,6 +522,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
}
}
+ @Override
protected void showPageRec(PageRec pageRec) {
super.showPageRec(pageRec);
addNavigationHistoryEntry();
@@ -519,6 +536,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
}
}
+ @Override
public IHistoryPage showHistoryFor(Object object, boolean force) {
return showHistoryPageFor(object, true, force, null);
}
@@ -565,6 +583,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
return getHistoryPage();
}
+ @Override
protected PageRec getPageRec(IWorkbenchPart part) {
PageRec rec = super.getPageRec(part);
if (rec != null) {
@@ -693,6 +712,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
return viewPinned;
}
+ @Override
protected PageRec doCreatePage(IWorkbenchPart part) {
HistoryPageSourceWorkbenchPart p = (HistoryPageSourceWorkbenchPart) part;
IHistoryPageSource source = p.getSource();
@@ -711,6 +731,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
return null;
}
+ @Override
protected void doDestroyPage(IWorkbenchPart part, PageRec pageRecord) {
IPage page = pageRecord.page;
if (page instanceof IHistoryPage)
@@ -719,10 +740,12 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
pageRecord.dispose();
}
+ @Override
protected IWorkbenchPart getBootstrapPart() {
return null;
}
+ @Override
protected boolean isImportant(IWorkbenchPart part) {
if (part instanceof HistoryPageSourceWorkbenchPart) {
HistoryPageSourceWorkbenchPart p = (HistoryPageSourceWorkbenchPart)part;
@@ -732,6 +755,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
return false;
}
+ @Override
protected IPage createDefaultPage(PageBook book) {
GenericHistoryViewDefaultPage page = new GenericHistoryViewDefaultPage();
initPage(page);
@@ -769,6 +793,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
return getViewSite().getPage().isPartVisible(this);
}
+ @Override
public void dispose() {
super.dispose();
//Remove the drop listener
@@ -780,10 +805,12 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
navigateAction.dispose();
}
+ @Override
public IHistoryPage showHistoryFor(Object object) {
return showHistoryFor(object, false);
}
+ @Override
public IHistoryPage getHistoryPage() {
return (IHistoryPage) getCurrentPage();
}
@@ -791,10 +818,12 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
/* (non-Javadoc)
* @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
*/
+ @Override
public void propertyChange(PropertyChangeEvent event) {
if (event.getSource() == getCurrentPage()) {
if (event.getProperty().equals(IHistoryPage.P_NAME)) {
Display.getDefault().asyncExec(new Runnable() {
+ @Override
public void run() {
IHistoryPage historyPage = getHistoryPage();
setContentDescription(historyPage.getName());
@@ -824,6 +853,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
showHistoryPageFor(object, false, false, null);
}
+ @Override
public boolean show(ShowInContext context) {
ISelection selection = context.getSelection();
if (selection instanceof IStructuredSelection) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryViewDefaultPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryViewDefaultPage.java
index a21d1ef2e..12858f2b4 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryViewDefaultPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryViewDefaultPage.java
@@ -22,44 +22,54 @@ public class GenericHistoryViewDefaultPage extends HistoryPage {
private Composite pgComp;
+ @Override
public void createControl(Composite parent) {
pgComp = new Composite(parent, SWT.NULL);
pgComp.setLayout(new FillLayout());
pgComp.setBackground(JFaceColors.getBannerBackground(pgComp.getDisplay()));
}
+ @Override
public Control getControl() {
return pgComp;
}
+ @Override
public void setFocus() {
pgComp.setFocus();
}
+ @Override
public boolean isValidInput(Object object) {
return false;
}
+ @Override
public void refresh() {
//nothing to refresh
}
+ @Override
public String getName() {
return ""; //$NON-NLS-1$
}
+ @Override
public Object getAdapter(Class adapter) {
return null;
}
+ @Override
public String getDescription() {
return null;
}
+ @Override
public Object getInput() {
return null;
}
+ @Override
public boolean inputSet() {
//no history to show
return false;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/HistoryPageSourceWorkbenchPart.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/HistoryPageSourceWorkbenchPart.java
index f38479146..ce9ed9685 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/HistoryPageSourceWorkbenchPart.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/HistoryPageSourceWorkbenchPart.java
@@ -27,6 +27,7 @@ public class HistoryPageSourceWorkbenchPart implements IWorkbenchPart {
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
+ @Override
public boolean equals(Object obj) {
return (obj instanceof HistoryPageSourceWorkbenchPart) &&
source.equals(((HistoryPageSourceWorkbenchPart)obj).getSource());
@@ -35,6 +36,7 @@ public class HistoryPageSourceWorkbenchPart implements IWorkbenchPart {
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
+ @Override
public int hashCode() {
return source.hashCode();
}
@@ -58,24 +60,28 @@ public class HistoryPageSourceWorkbenchPart implements IWorkbenchPart {
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPart#addPropertyListener(org.eclipse.ui.IPropertyListener)
*/
+ @Override
public void addPropertyListener(IPropertyListener listener) {
}
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
*/
+ @Override
public void createPartControl(Composite parent) {
}
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPart#dispose()
*/
+ @Override
public void dispose() {
}
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPart#getSite()
*/
+ @Override
public IWorkbenchPartSite getSite() {
return site;
}
@@ -83,6 +89,7 @@ public class HistoryPageSourceWorkbenchPart implements IWorkbenchPart {
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPart#getTitle()
*/
+ @Override
public String getTitle() {
return ""; //$NON-NLS-1$
}
@@ -90,6 +97,7 @@ public class HistoryPageSourceWorkbenchPart implements IWorkbenchPart {
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPart#getTitleImage()
*/
+ @Override
public Image getTitleImage() {
return null;
}
@@ -97,6 +105,7 @@ public class HistoryPageSourceWorkbenchPart implements IWorkbenchPart {
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPart#getTitleToolTip()
*/
+ @Override
public String getTitleToolTip() {
return ""; //$NON-NLS-1$
}
@@ -104,18 +113,21 @@ public class HistoryPageSourceWorkbenchPart implements IWorkbenchPart {
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPart#removePropertyListener(org.eclipse.ui.IPropertyListener)
*/
+ @Override
public void removePropertyListener(IPropertyListener listener) {
}
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPart#setFocus()
*/
+ @Override
public void setFocus() {
}
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
+ @Override
public Object getAdapter(Class adapter) {
return null;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java
index 3b86fd6be..00e9bd6b8 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java
@@ -92,6 +92,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
private IFileRevision currentSelection;
private final class LocalHistoryContentProvider implements ITreeContentProvider {
+ @Override
public Object[] getElements(Object inputElement) {
if (inputElement instanceof IFileHistory) {
// The entries of already been fetch so return them
@@ -107,14 +108,17 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
return new Object[0];
}
+ @Override
public void dispose() {
// Nothing to do
}
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
// Nothing to do
}
+ @Override
public Object[] getChildren(Object parentElement) {
if (parentElement instanceof AbstractHistoryCategory){
return ((AbstractHistoryCategory) parentElement).getRevisions();
@@ -123,10 +127,12 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
return new Object[0];
}
+ @Override
public Object getParent(Object element) {
return null;
}
+ @Override
public boolean hasChildren(Object element) {
if (element instanceof AbstractHistoryCategory){
return ((AbstractHistoryCategory) element).hasRevisions();
@@ -157,6 +163,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
return -1;
}
+ @Override
protected long getModificationDate(Object element) {
IFileRevision entry = adaptToFileRevision(element);
if (entry != null)
@@ -164,6 +171,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
return -1;
}
+ @Override
protected boolean isCurrentEdition(Object element) {
IFileRevision entry = adaptToFileRevision(element);
if (entry == null)
@@ -173,6 +181,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
return (tempCurrentTimeStamp != -1 && tempCurrentTimeStamp==timestamp);
}
+ @Override
protected boolean isDeletedEdition(Object element) {
IFileRevision entry = adaptToFileRevision(element);
return (!entry.exists());
@@ -183,6 +192,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
public RefreshFileHistory() {
super(TeamUIMessages.LocalHistoryPage_FetchLocalHistoryMessage);
}
+ @Override
public IStatus run(IProgressMonitor monitor) {
try {
IStatus status = Status.OK_STATUS;
@@ -216,6 +226,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
}
private class HistoryResourceListener implements IResourceChangeListener {
+ @Override
public void resourceChanged(IResourceChangeEvent event) {
IResourceDelta root = event.getDelta();
@@ -225,6 +236,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
IResourceDelta resourceDelta = root.findMember(file.getFullPath());
if (resourceDelta != null){
Display.getDefault().asyncExec(new Runnable() {
+ @Override
public void run() {
refresh();
}
@@ -242,6 +254,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
super();
}
+ @Override
public boolean inputSet() {
currentFileRevision = null;
IFile tempFile = getFile();
@@ -287,6 +300,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
return null;
}
+ @Override
public void createControl(Composite parent) {
localComposite = new Composite(parent, SWT.NONE);
@@ -316,6 +330,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
final IPreferenceStore store = TeamUIPlugin.getPlugin().getPreferenceStore();
//Group by Date
groupByDateMode = new Action(TeamUIMessages.LocalHistoryPage_GroupRevisionsByDateAction, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_DATES_CATEGORY)){
+ @Override
public void run() {
groupingOn = !groupingOn;
store.setValue(IPreferenceIds.PREF_GROUPBYDATE_MODE, groupingOn);
@@ -330,6 +345,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
//Collapse All
collapseAll = new Action(TeamUIMessages.LocalHistoryPage_CollapseAllAction, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COLLAPSE_ALL)) {
+ @Override
public void run() {
treeViewer.collapseAll();
}
@@ -343,6 +359,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
//Compare Mode Action
if ((compareMode & ALWAYS) == 0) {
compareModeAction = new Action(TeamUIMessages.LocalHistoryPage_CompareModeAction,TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COMPARE_VIEW)) {
+ @Override
public void run() {
// switch the mode
compareMode = compareMode == ON ? OFF : ON;
@@ -355,6 +372,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
compareModeAction.setChecked(compareMode == ON);
getContentsAction = getContextMenuAction(TeamUIMessages.LocalHistoryPage_GetContents, true /* needs progress */, new IWorkspaceRunnable() {
+ @Override
public void run(IProgressMonitor monitor) throws CoreException {
monitor.beginTask(null, 100);
try {
@@ -379,6 +397,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
compareAction = createCompareAction();
compareAction.setEnabled(!treeViewer.getSelection().isEmpty());
treeViewer.getTree().addSelectionListener(new SelectionAdapter(){
+ @Override
public void widgetSelected(SelectionEvent e) {
compareAction.setCurrentFileRevision(getCurrentFileRevision());
compareAction.selectionChanged((IStructuredSelection) treeViewer.getSelection());
@@ -390,6 +409,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
openAction = new OpenRevisionAction(TeamUIMessages.LocalHistoryPage_OpenAction, this);
openAction.setEnabled(!treeViewer.getSelection().isEmpty());
treeViewer.getTree().addSelectionListener(new SelectionAdapter(){
+ @Override
public void widgetSelected(SelectionEvent e) {
openAction.selectionChanged((IStructuredSelection) treeViewer.getSelection());
}
@@ -398,6 +418,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
// Add 'Open With...' sub-menu
openWithMenu = new OpenWithMenu(this);
treeViewer.getTree().addSelectionListener(new SelectionAdapter(){
+ @Override
public void widgetSelected(SelectionEvent e) {
openWithMenu.selectionChanged((IStructuredSelection) treeViewer.getSelection());
}
@@ -405,6 +426,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
}
new OpenAndLinkWithEditorHelper(treeViewer) {
+ @Override
protected void open(ISelection selection, boolean activate) {
if (getSite() != null && selection instanceof IStructuredSelection) {
IStructuredSelection structuredSelection= (IStructuredSelection)selection;
@@ -422,6 +444,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
}
}
+ @Override
protected void activate(ISelection selection) {
int currentMode= OpenStrategy.getOpenMethod();
try {
@@ -432,6 +455,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
}
}
+ @Override
protected void linkToEditor(ISelection selection) {
// XXX: Not yet implemented, see http://bugs.eclipse.org/324185
}
@@ -441,6 +465,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
MenuManager menuMgr = new MenuManager();
Menu menu = menuMgr.createContextMenu(treeViewer.getTree());
menuMgr.addMenuListener(new IMenuListener() {
+ @Override
public void menuAboutToShow(IMenuManager menuMgr) {
fillTableMenu(menuMgr);
}
@@ -537,34 +562,41 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
return viewer;
}
+ @Override
public Control getControl() {
return localComposite;
}
+ @Override
public void setFocus() {
localComposite.setFocus();
}
+ @Override
public String getDescription() {
if (getFile() != null)
return getFile().getFullPath().toString();
return null;
}
+ @Override
public String getName() {
if (getFile() != null)
return getFile().getName();
return ""; //$NON-NLS-1$
}
+ @Override
public boolean isValidInput(Object object) {
return object instanceof IFile;
}
+ @Override
public void refresh() {
refreshHistory(true);
}
+ @Override
public Object getAdapter(Class adapter) {
if(adapter == IHistoryCompareAdapter.class) {
return this;
@@ -572,7 +604,8 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
return null;
}
- public void dispose() {
+ @Override
+ public void dispose() {
shutdown = true;
if (resourceListener != null){
@@ -600,6 +633,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
private Action getContextMenuAction(String title, final boolean needsProgressDialog, final IWorkspaceRunnable action) {
return new Action(title) {
+ @Override
public void run() {
try {
if (file == null) return;
@@ -614,6 +648,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
currentSelection = (IFileRevision)o;
if(needsProgressDialog) {
PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
action.run(monitor);
@@ -637,6 +672,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
}
}
+ @Override
public boolean isEnabled() {
ISelection selection = treeViewer.getSelection();
if (!(selection instanceof IStructuredSelection)) return false;
@@ -655,6 +691,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
final MessageDialog dialog = new MessageDialog(parentSite.getShell(), title, null, msg, MessageDialog.QUESTION, new String[] {IDialogConstants.YES_LABEL, IDialogConstants.CANCEL_LABEL}, 0);
final int[] result = new int[1];
parentSite.getShell().getDisplay().syncExec(new Runnable() {
+ @Override
public void run() {
result[0] = dialog.open();
}
@@ -673,6 +710,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
compareModeAction.setChecked(compareMode == ON);
}
+ @Override
public ICompareInput getCompareInput(Object object) {
if (object instanceof IFileRevision){
IFileRevision selectedFileRevision = (IFileRevision)object;
@@ -687,6 +725,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
/* (non-Javadoc)
* @see org.eclipse.team.ui.history.IHistoryCompareAdapter#prepareInput(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public void prepareInput(ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor) {
Object right = input.getRight();
if (right != null) {
@@ -746,6 +785,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
final AbstractHistoryCategory[] categories = groupRevisions(revisions, monitor);
// Update the tree in the UI thread
Utils.asyncExec(new Runnable() {
+ @Override
public void run() {
if (Policy.DEBUG_HISTORY) {
String time = new SimpleDateFormat("m:ss.SSS").format(new Date(System.currentTimeMillis())); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPageSource.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPageSource.java
index 70ea968c9..4f934752c 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPageSource.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPageSource.java
@@ -29,10 +29,12 @@ public class LocalHistoryPageSource extends HistoryPageSource {
return null;
}
+ @Override
public boolean canShowHistoryFor(Object object) {
return getFile(object) != null;
}
+ @Override
public Page createPage(Object object) {
LocalHistoryPage page = new LocalHistoryPage();
return page;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryTableProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryTableProvider.java
index d10ca7046..94832d5f3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryTableProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryTableProvider.java
@@ -49,6 +49,7 @@ public class LocalHistoryTableProvider {
private Font currentRevisionFont = null;
private IPropertyChangeListener themeListener = new IPropertyChangeListener() {
+ @Override
public void propertyChange(PropertyChangeEvent event) {
LocalHistoryTableProvider.this.viewer.refresh();
}
@@ -58,6 +59,7 @@ public class LocalHistoryTableProvider {
PlatformUI.getWorkbench().getThemeManager().addPropertyChangeListener(themeListener);
}
+ @Override
public void dispose() {
if (dateImage != null){
dateImage.dispose();
@@ -78,6 +80,7 @@ public class LocalHistoryTableProvider {
}
}
+ @Override
public Image getColumnImage(Object element, int columnIndex) {
if (columnIndex == COL_DATE) {
if (element instanceof DateHistoryCategory) {
@@ -96,6 +99,7 @@ public class LocalHistoryTableProvider {
return null;
}
+ @Override
public String getColumnText(Object element, int columnIndex) {
if (columnIndex == COL_DATE) {
if (element instanceof AbstractHistoryCategory){
@@ -114,6 +118,7 @@ public class LocalHistoryTableProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
*/
+ @Override
public Color getForeground(Object element) {
if (element instanceof AbstractHistoryCategory){
// TODO: We should have a Team theme for this
@@ -131,6 +136,7 @@ public class LocalHistoryTableProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
*/
+ @Override
public Color getBackground(Object element) {
return null;
}
@@ -139,6 +145,7 @@ public class LocalHistoryTableProvider {
* (non-Javadoc)
* @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
*/
+ @Override
public Font getFont(Object element) {
if (element instanceof AbstractHistoryCategory) {
return getCurrentRevisionFont();
@@ -186,6 +193,7 @@ public class LocalHistoryTableProvider {
* 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 AbstractCVSHistoryCategory || o2 instanceof AbstractCVSHistoryCategory)
return 0;*/
@@ -255,6 +263,7 @@ public class LocalHistoryTableProvider {
*/
private void createColumns(Tree tree, TableLayout layout) {
SelectionListener headerListener = new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
// column selected - need to sort
int column = viewer.getTree().indexOf((TreeColumn) e.widget);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/MessageHistoryCategory.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/MessageHistoryCategory.java
index e1d75af16..d9b00ce7d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/MessageHistoryCategory.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/MessageHistoryCategory.java
@@ -18,18 +18,22 @@ public class MessageHistoryCategory extends AbstractHistoryCategory {
public MessageHistoryCategory(String message){
this.message = message;
}
+ @Override
public String getName() {
return message;
}
+ @Override
public boolean collectFileRevisions(IFileRevision[] fileRevisions, boolean shouldRemove) {
return false;
}
+ @Override
public IFileRevision[] getRevisions() {
return new IFileRevision[0];
}
+ @Override
public boolean hasRevisions() {
return false;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/OpenLocalFileAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/OpenLocalFileAction.java
index 55a14fab3..059b882bc 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/OpenLocalFileAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/OpenLocalFileAction.java
@@ -29,6 +29,7 @@ public class OpenLocalFileAction extends BaseSelectionListenerAction {
super(text);
}
+ @Override
public void run() {
try {
IStructuredSelection structSel = getStructuredSelection();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ReplaceLocalHistory.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ReplaceLocalHistory.java
index a6b8379e2..1564bd052 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ReplaceLocalHistory.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ReplaceLocalHistory.java
@@ -24,12 +24,14 @@ import org.eclipse.team.ui.history.IHistoryPageSource;
public class ReplaceLocalHistory extends ShowLocalHistory {
+ @Override
public void run(IAction action) {
final IFile file = (IFile) getSelection().getFirstElement();
IFileState states[]= getLocalHistory();
if (states == null || states.length == 0)
return;
Runnable r = new Runnable() {
+ @Override
public void run() {
showCompareInDialog(getShell(), file);
}
@@ -44,12 +46,15 @@ public class ReplaceLocalHistory extends ShowLocalHistory {
cc.setLeftEditable(false);
cc.setRightEditable(false);
HistoryPageCompareEditorInput input = new HistoryPageCompareEditorInput(cc, pageSource, object) {
+ @Override
public boolean isEditionSelectionDialog() {
return true;
}
+ @Override
public String getOKButtonLabel() {
return TeamUIMessages.ReplaceLocalHistory_0;
}
+ @Override
public boolean okPressed() {
try {
Object o = getSelectedEdition();
@@ -67,6 +72,7 @@ public class ReplaceLocalHistory extends ShowLocalHistory {
}
}
+ @Override
protected String getPromptTitle() {
return TeamUIMessages.ReplaceLocalHistory_1;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java
index 19e90e53f..e34681d3d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java
@@ -34,15 +34,18 @@ public class ShowLocalHistory extends ActionDelegate implements IObjectActionDel
private IStructuredSelection fSelection;
private IWorkbenchPart targetPart;
+ @Override
public void run(IAction action) {
IFileState states[]= getLocalHistory();
if (states == null || states.length == 0)
return;
try {
PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
final IResource resource = (IResource) fSelection.getFirstElement();
Runnable r = new Runnable() {
+ @Override
public void run() {
IHistoryView view = TeamUI.showHistoryFor(TeamUIPlugin.getActivePage(), resource, LocalHistoryPageSource.getInstance());
IHistoryPage page = view.getHistoryPage();
@@ -61,11 +64,13 @@ public class ShowLocalHistory extends ActionDelegate implements IObjectActionDel
}
}
+ @Override
public void selectionChanged(IAction action, ISelection sel) {
if (sel instanceof IStructuredSelection) {
fSelection= (IStructuredSelection) sel;
}
}
+ @Override
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
this.targetPart = targetPart;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/WorkbenchHistoryPageSite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/WorkbenchHistoryPageSite.java
index faad3201d..72ff45c6b 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/WorkbenchHistoryPageSite.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/WorkbenchHistoryPageSite.java
@@ -27,34 +27,42 @@ public class WorkbenchHistoryPageSite implements IHistoryPageSite {
this.site = site;
}
+ @Override
public IPageSite getWorkbenchPageSite() {
return site;
}
+ @Override
public IWorkbenchPart getPart() {
return part;
}
+ @Override
public Shell getShell() {
return site.getShell();
}
+ @Override
public ISelectionProvider getSelectionProvider() {
return site.getSelectionProvider();
}
+ @Override
public void setSelectionProvider(ISelectionProvider provider) {
site.setSelectionProvider(provider);
}
+ @Override
public void setFocus() {
// Nothing to do
}
+ @Override
public boolean isModal() {
return false;
}
+ @Override
public IToolBarManager getToolBarManager() {
return site.getActionBars().getToolBarManager();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/AbstractCompareInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/AbstractCompareInput.java
index 3605f59ac..d9b79555b 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/AbstractCompareInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/AbstractCompareInput.java
@@ -41,6 +41,7 @@ public abstract class AbstractCompareInput implements ICompareInput {
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.DiffNode#addCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener)
*/
+ @Override
public void addCompareInputChangeListener(
ICompareInputChangeListener listener) {
if (!containsListener(listener)) {
@@ -52,6 +53,7 @@ public abstract class AbstractCompareInput implements ICompareInput {
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.DiffNode#removeCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener)
*/
+ @Override
public void removeCompareInputChangeListener(
ICompareInputChangeListener listener) {
if (containsListener(listener)) {
@@ -70,9 +72,11 @@ public abstract class AbstractCompareInput implements ICompareInput {
for (int i = 0; i < allListeners.length; i++) {
final ICompareInputChangeListener listener = (ICompareInputChangeListener)allListeners[i];
SafeRunner.run(new ISafeRunnable() {
+ @Override
public void run() throws Exception {
listener.compareInputChanged(AbstractCompareInput.this);
}
+ @Override
public void handleException(Throwable exception) {
// Logged by the safe runner
}
@@ -96,6 +100,7 @@ public abstract class AbstractCompareInput implements ICompareInput {
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.ICompareInput#copy(boolean)
*/
+ @Override
public void copy(boolean leftToRight) {
Assert.isTrue(false, "Copy is not support by this type of compare input"); //$NON-NLS-1$
}
@@ -103,6 +108,7 @@ public abstract class AbstractCompareInput implements ICompareInput {
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.ICompareInput#getAncestor()
*/
+ @Override
public ITypedElement getAncestor() {
return ancestor;
}
@@ -110,6 +116,7 @@ public abstract class AbstractCompareInput implements ICompareInput {
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.ICompareInput#getImage()
*/
+ @Override
public Image getImage() {
return getMainElement().getImage();
}
@@ -133,6 +140,7 @@ public abstract class AbstractCompareInput implements ICompareInput {
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.ICompareInput#getKind()
*/
+ @Override
public int getKind() {
return kind;
}
@@ -148,6 +156,7 @@ public abstract class AbstractCompareInput implements ICompareInput {
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.ICompareInput#getLeft()
*/
+ @Override
public ITypedElement getLeft() {
return left;
}
@@ -155,6 +164,7 @@ public abstract class AbstractCompareInput implements ICompareInput {
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.ICompareInput#getName()
*/
+ @Override
public String getName() {
return getMainElement().getName();
}
@@ -162,6 +172,7 @@ public abstract class AbstractCompareInput implements ICompareInput {
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.ICompareInput#getRight()
*/
+ @Override
public ITypedElement getRight() {
return right;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/BuildScopeOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/BuildScopeOperation.java
index 6ed7b6111..9add175df 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/BuildScopeOperation.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/BuildScopeOperation.java
@@ -34,6 +34,7 @@ public class BuildScopeOperation extends ModelOperation {
/* (non-Javadoc)
* @see org.eclipse.team.ui.operations.ModelOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
protected void execute(IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException {
// Do nothing since we only want to build the scope
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonViewerAdvisor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonViewerAdvisor.java
index f474a391c..319c32f78 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonViewerAdvisor.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonViewerAdvisor.java
@@ -51,27 +51,33 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
super(id, parent, style);
this.listener = listener;
}
+ @Override
public void createChildren(TreeItem item) {
super.createChildren(item);
}
+ @Override
public void openSelection() {
fireOpen(new OpenEvent(this, getSelection()));
}
+ @Override
protected void internalRefresh(Object element, boolean updateLabels) {
TreePath[] expanded = getVisibleExpandedPaths();
super.internalRefresh(element, updateLabels);
setExpandedTreePaths(expanded);
checkForEmptyViewer();
}
+ @Override
protected void internalRemove(Object parent, Object[] elements) {
super.internalRemove(parent, elements);
if (parent == getInput())
checkForEmptyViewer();
}
+ @Override
protected void internalRemove(Object[] elements) {
super.internalRemove(elements);
checkForEmptyViewer();
}
+ @Override
protected void internalAdd(Widget widget, Object parentElement, Object[] childElements) {
super.internalAdd(widget, parentElement, childElements);
if (empty) {
@@ -80,6 +86,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
}
}
+ @Override
protected void inputChanged(Object input, Object oldInput) {
super.inputChanged(input, oldInput);
checkForEmptyViewer();
@@ -105,6 +112,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
return empty;
}
+ @Override
protected void initDragAndDrop() {
getNavigatorContentService().getDnDService().bindDragAssistant(new ResourceDragAdapterAssistant());
super.initDragAndDrop();
@@ -148,6 +156,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
super(parent);
}
+ @Override
public void setGlobalActionHandler(String actionID, IAction handler) {
if (handler == null) {
// Only remove the handler if it was set
@@ -165,6 +174,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
}
}
+ @Override
public void clearGlobalActionHandlers() {
// When cleared, also remove the ids from the parent
Map handlers = getGlobalActionHandlers();
@@ -180,6 +190,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
super.clearGlobalActionHandlers();
}
+ @Override
public void updateActionBars() {
// On update, push all or action handlers into our parent
Map newActionHandlers = getGlobalActionHandlers();
@@ -220,10 +231,12 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
ISynchronizationScope scope = getScope(configuration);
bindTeamContentProviders(v);
scope.addScopeChangeListener(new ISynchronizationScopeChangeListener() {
+ @Override
public void scopeChanged(final ISynchronizationScope scope,
ResourceMapping[] newMappings, ResourceTraversal[] newTraversals) {
enableContentProviders(v, configuration);
Utils.asyncExec(new Runnable() {
+ @Override
public void run() {
v.refresh();
}
@@ -304,6 +317,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
}
DecorationContext decorationContext = new DecorationContext();
decorationContext.putProperty(SynchronizationStateTester.PROP_TESTER, new SynchronizationStateTester() {
+ @Override
public boolean isStateDecorationEnabled() {
return false;
}
@@ -323,6 +337,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
}
DecorationContext decorationContext = new DecorationContext();
decorationContext.putProperty(SynchronizationStateTester.PROP_TESTER, new SynchronizationStateTester() {
+ @Override
public boolean isStateDecorationEnabled() {
return false;
}
@@ -343,10 +358,12 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
this.slp = slp;
}
+ @Override
public StyledString getStyledText(Object element) {
return slp.getStyledText(element);
}
+ @Override
public Font getFont(Object element) {
// DelegatingStyledCellLabelProvider does not implement
// IFontProvider
@@ -354,6 +371,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
}
}
+ @Override
public void setInitialInput() {
CommonViewer viewer = (CommonViewer)getViewer();
viewer.setInput(getInitialInput());
@@ -363,6 +381,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#initializeViewer(org.eclipse.jface.viewers.StructuredViewer)
*/
+ @Override
public void initializeViewer(StructuredViewer viewer) {
createActionService((CommonViewer)viewer, getConfiguration());
super.initializeViewer(viewer);
@@ -407,6 +426,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
/* (non-Javadoc)
* @see org.eclipse.ui.navigator.internal.extensions.INavigatorContentServiceListener#onLoad(org.eclipse.ui.navigator.internal.extensions.NavigatorContentExtension)
*/
+ @Override
public void onLoad(INavigatorContentExtension anExtension) {
extensions.add(anExtension);
ISynchronizationContext context = getParticipant().getContext();
@@ -422,6 +442,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#getContextMenuId(org.eclipse.jface.viewers.StructuredViewer)
*/
+ @Override
protected String getContextMenuId(StructuredViewer viewer) {
return ((CommonViewer)viewer).getNavigatorContentService().getViewerDescriptor().getPopupMenuId();
}
@@ -429,6 +450,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#registerContextMenu(org.eclipse.jface.viewers.StructuredViewer, org.eclipse.jface.action.MenuManager)
*/
+ @Override
protected void registerContextMenu(StructuredViewer viewer, MenuManager menuMgr) {
actionService.prepareMenuForPlatformContributions(menuMgr,
viewer, false);
@@ -437,6 +459,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#fillContextMenu(org.eclipse.jface.viewers.StructuredViewer, org.eclipse.jface.action.IMenuManager)
*/
+ @Override
protected void fillContextMenu(StructuredViewer viewer, IMenuManager manager) {
// Clear any handlers from the menu
if (manager instanceof CommonMenuManager) {
@@ -456,6 +479,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#dispose()
*/
+ @Override
public void dispose() {
TeamUI.getTeamContentProviderManager().removePropertyChangeListener(this);
getConfiguration().removePropertyChangeListener(this);
@@ -466,6 +490,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#updateActionBars(org.eclipse.jface.viewers.IStructuredSelection)
*/
+ @Override
protected void updateActionBars(IStructuredSelection selection) {
super.updateActionBars(selection);
if (!getConfiguration().getSite().isModal()) {
@@ -483,6 +508,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#createContextMenuManager(java.lang.String)
*/
+ @Override
protected MenuManager createContextMenuManager(String targetID) {
return new CommonMenuManager(targetID);
}
@@ -490,6 +516,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#addContextMenuGroups(org.eclipse.jface.action.IMenuManager)
*/
+ @Override
protected void addContextMenuGroups(IMenuManager manager) {
// Don't do anything. The groups will be added by the action service
}
@@ -498,16 +525,19 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
this.emptyTreeListener = emptyTreeListener;
}
+ @Override
public void treeEmpty(TreeViewer viewer) {
if (emptyTreeListener != null)
emptyTreeListener.treeEmpty(viewer);
}
+ @Override
public void notEmpty(TreeViewer viewer) {
if (emptyTreeListener != null)
emptyTreeListener.notEmpty(viewer);
}
+ @Override
public void propertyChange(final PropertyChangeEvent event) {
if (event.getProperty().equals(ITeamContentProviderManager.PROP_ENABLED_MODEL_PROVIDERS)) {
enableContentProviders((CommonViewer)getViewer(), getConfiguration());
@@ -515,6 +545,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
enableContentProviders((CommonViewer)getViewer(), getConfiguration());
final Viewer viewer = getViewer();
Utils.syncExec(new Runnable() {
+ @Override
public void run() {
Object viewerInput = ModelSynchronizePage.getViewerInput(getConfiguration(), (String)event.getNewValue());
if (viewer != null && viewerInput != null) {
@@ -528,6 +559,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
}
}
+ @Override
protected boolean handleDoubleClick(StructuredViewer viewer, DoubleClickEvent event) {
if (isOpenable(event.getSelection())) {
return true;
@@ -543,6 +575,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
return getParticipant().hasCompareInputFor(object);
}
+ @Override
protected void expandToNextDiff(Object element) {
((TreeViewer)getViewer()).expandToLevel(element, AbstractTreeViewer.ALL_LEVELS);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java
index f0723c3e2..d174dc678 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java
@@ -81,6 +81,7 @@ public abstract class CompareInputChangeNotifier implements
super(TeamUIMessages.CompareInputChangeNotifier_0, TeamUIMessages.CompareInputChangeNotifier_1);
}
+ @Override
protected boolean doDispatchEvents(IProgressMonitor monitor)
throws TeamException {
ICompareInput[] toDispatch;
@@ -103,6 +104,7 @@ public abstract class CompareInputChangeNotifier implements
return true;
}
+ @Override
protected void processEvent(Event event, IProgressMonitor monitor)
throws CoreException {
int type = event.getType();
@@ -153,11 +155,13 @@ public abstract class CompareInputChangeNotifier implements
super.queueEvent(event, false);
}
+ @Override
protected long getShortDispatchDelay() {
// Only wait 250 for additional changes to come in
return 250;
}
+ @Override
protected boolean belongsTo(Object family) {
return CompareInputChangeNotifier.this.belongsTo(family);
}
@@ -249,6 +253,7 @@ public abstract class CompareInputChangeNotifier implements
protected void dispatchChanges(final ICompareInput[] inputs, IProgressMonitor monitor) {
prepareInputs(inputs, monitor);
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
fireChanges(inputs);
}
@@ -307,6 +312,7 @@ public abstract class CompareInputChangeNotifier implements
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
*/
+ @Override
public void resourceChanged(IResourceChangeEvent event) {
List changedInputs = new ArrayList();
ICompareInput[] inputs = getConnectedInputs();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DefaultResourceMappingMerger.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DefaultResourceMappingMerger.java
index 6d98c0431..84cc2b35b 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DefaultResourceMappingMerger.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DefaultResourceMappingMerger.java
@@ -29,6 +29,7 @@ public class DefaultResourceMappingMerger extends ResourceMappingMerger {
/* (non-Javadoc)
* @see org.eclipse.team.core.mapping.ResourceMappingMerger#getModelProvider()
*/
+ @Override
protected ModelProvider getModelProvider() {
return provider;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeChangesSection.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeChangesSection.java
index 6a00e1efd..85e60499e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeChangesSection.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeChangesSection.java
@@ -60,6 +60,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
context.getDiffTree().addDiffChangeListener(this);
getConfiguration().addPropertyChangeListener(this);
jobChangeListener = new JobChangeAdapter() {
+ @Override
public void running(IJobChangeEvent event) {
if (isJobOfInterest(event.getJob())) {
if (context.getDiffTree().isEmpty())
@@ -74,6 +75,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
return true;
return false;
}
+ @Override
public void done(IJobChangeEvent event) {
if (isJobOfInterest(event.getJob())) {
if (context.getDiffTree().isEmpty())
@@ -84,6 +86,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
Job.getJobManager().addJobChangeListener(jobChangeListener);
}
+ @Override
public void dispose() {
context.getDiffTree().removeDiffChangeListener(this);
getConfiguration().removePropertyChangeListener(this);
@@ -91,10 +94,12 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
super.dispose();
}
+ @Override
protected int getChangesCount() {
return context.getDiffTree().size();
}
+ @Override
protected long getChangesInMode(int candidateMode) {
long numChanges;
long numConflicts = context.getDiffTree().countFor(IThreeWayDiff.CONFLICTING, IThreeWayDiff.DIRECTION_MASK);
@@ -144,6 +149,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
return (context.getDiffTree().hasMatchingDiffs(traversals, FastDiffFilter.getStateFilter(states, mask)));
}
+ @Override
protected long getVisibleChangesCount() {
ISynchronizePageConfiguration configuration = getConfiguration();
if (configuration.getComparisonType() == ISynchronizePageConfiguration.TWO_WAY) {
@@ -167,6 +173,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
return getChangesInMode(currentMode);
}
+ @Override
protected int getCandidateMode() {
SynchronizePageConfiguration configuration = (SynchronizePageConfiguration)getConfiguration();
long outgoingChanges = context.getDiffTree().countFor(IThreeWayDiff.OUTGOING, IThreeWayDiff.DIRECTION_MASK);
@@ -190,6 +197,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
return configuration.getMode();
}
+ @Override
public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
IStatus[] errors = event.getErrors();
if (errors.length > 0) {
@@ -201,10 +209,12 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
/* (non-Javadoc)
* @see org.eclipse.team.core.diff.IDiffChangeListener#propertyChanged(int, org.eclipse.core.runtime.IPath[])
*/
+ @Override
public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
// Do nothing
}
+ @Override
public void propertyChange(PropertyChangeEvent event) {
if (event.getProperty().equals(ISynchronizePageConfiguration.P_MODE)
|| event.getProperty().equals(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER)) {
@@ -212,6 +222,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
}
}
+ @Override
protected Composite getEmptyChangesComposite(Composite parent) {
if (context.getDiffTree().isEmpty()) {
SubscriberDiffTreeEventHandler handler = getHandler();
@@ -322,6 +333,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
Hyperlink link = getForms().createHyperlink(composite, TeamUIMessages.DiffTreeChangesSection_12, SWT.WRAP);
link.addHyperlinkListener(new HyperlinkAdapter() {
+ @Override
public void linkActivated(HyperlinkEvent e) {
ModelSynchronizeParticipant participant = (ModelSynchronizeParticipant)getConfiguration().getParticipant();
ModelProvider[] providers = participant.getEnabledModelProviders();
@@ -376,6 +388,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
.getProperty(StartupPreferencePage.STARTUP_PREFERENCES);
Hyperlink link = getForms().createHyperlink(composite, TeamUIMessages.DiffTreeChangesSection_4, SWT.WRAP);
link.addHyperlinkListener(new HyperlinkAdapter() {
+ @Override
public void linkActivated(HyperlinkEvent e) {
if (remember[0] && store != null) {
store.putValue(StartupPreferencePage.PROP_STARTUP_ACTION, StartupPreferencePage.STARTUP_ACTION_POPULATE);
@@ -387,6 +400,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
link = getForms().createHyperlink(composite, TeamUIMessages.DiffTreeChangesSection_5, SWT.WRAP);
link.addHyperlinkListener(new HyperlinkAdapter() {
+ @Override
public void linkActivated(HyperlinkEvent e) {
if (remember[0] && store != null) {
store.putValue(StartupPreferencePage.PROP_STARTUP_ACTION, StartupPreferencePage.STARTUP_ACTION_SYNCHRONIZE);
@@ -406,9 +420,11 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
data.widthHint = 100;
rememberButton.setLayoutData(data);
rememberButton.addSelectionListener(new SelectionListener() {
+ @Override
public void widgetSelected(SelectionEvent e) {
remember[0] = rememberButton.getSelection();
}
+ @Override
public void widgetDefaultSelected(SelectionEvent e) {
// Do nothing
}
@@ -468,6 +484,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
Hyperlink link = getForms().createHyperlink(composite, NLS.bind(TeamUIMessages.DiffTreeChangesSection_2, new String[] { provider.getDescriptor().getLabel() }), SWT.WRAP);
link.addHyperlinkListener(new HyperlinkAdapter() {
+ @Override
public void linkActivated(HyperlinkEvent e) {
getConfiguration().setProperty(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER, provider.getDescriptor().getId() );
}
@@ -477,6 +494,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
new Label(composite, SWT.NONE);
Hyperlink link2 = getForms().createHyperlink(composite, TeamUIMessages.DiffTreeChangesSection_13, SWT.WRAP);
link2.addHyperlinkListener(new HyperlinkAdapter() {
+ @Override
public void linkActivated(HyperlinkEvent e) {
getConfiguration().setProperty(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER, ModelSynchronizeParticipant.ALL_MODEL_PROVIDERS_VISIBLE );
}
@@ -486,6 +504,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
return composite;
}
+ @Override
public void treeEmpty(TreeViewer viewer) {
handleEmptyViewer();
}
@@ -493,6 +512,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
private void handleEmptyViewer() {
// Override stand behavior to do our best to show something
TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
if (!getContainer().isDisposed())
updatePage(getEmptyChangesComposite(getContainer()));
@@ -500,10 +520,12 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
});
}
+ @Override
protected void calculateDescription() {
if (errors != null && errors.length > 0) {
if (!showingError) {
TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
updatePage(getErrorComposite(getContainer()));
showingError = true;
@@ -529,6 +551,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
return false;
}
+ @Override
public void notEmpty(TreeViewer viewer) {
calculateDescription();
}
@@ -547,6 +570,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
Hyperlink link = getForms().createHyperlink(composite, TeamUIMessages.ChangesSection_8, SWT.WRAP);
link.addHyperlinkListener(new HyperlinkAdapter() {
+ @Override
public void linkActivated(HyperlinkEvent e) {
showErrors();
}
@@ -555,6 +579,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
link = getForms().createHyperlink(composite, TeamUIMessages.ChangesSection_9, SWT.WRAP);
link.addHyperlinkListener(new HyperlinkAdapter() {
+ @Override
public void linkActivated(HyperlinkEvent e) {
errors = null;
calculateDescription();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeStatusLineContributionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeStatusLineContributionGroup.java
index 4e421e88b..1e13c3e52 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeStatusLineContributionGroup.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeStatusLineContributionGroup.java
@@ -28,11 +28,13 @@ public class DiffTreeStatusLineContributionGroup extends
getSynchronizationContext().getDiffTree().addDiffChangeListener(this);
}
+ @Override
public void dispose() {
getSynchronizationContext().getDiffTree().removeDiffChangeListener(this);
super.dispose();
}
+ @Override
protected int getChangeCount() {
return getSynchronizationContext().getDiffTree().size();
}
@@ -41,6 +43,7 @@ public class DiffTreeStatusLineContributionGroup extends
return (ISynchronizationContext)getConfiguration().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
}
+ @Override
protected int countFor(int state) {
switch (state) {
case SyncInfo.OUTGOING:
@@ -56,6 +59,7 @@ public class DiffTreeStatusLineContributionGroup extends
return (int)getSynchronizationContext().getDiffTree().countFor(state, IThreeWayDiff.DIRECTION_MASK);
}
+ @Override
public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
updateCounts();
}
@@ -63,6 +67,7 @@ public class DiffTreeStatusLineContributionGroup extends
/* (non-Javadoc)
* @see org.eclipse.team.core.diff.IDiffChangeListener#propertyChanged(int, org.eclipse.core.runtime.IPath[])
*/
+ @Override
public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
// Do nothing
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorAction.java
index 9907f181c..d9260ce2b 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorAction.java
@@ -32,6 +32,7 @@ public class FuzzFactorAction extends Action {
subscriber = (ApplyPatchSubscriber) context.getSubscriber();
}
+ @Override
public void run() {
FuzzFactorDialog dialog = new FuzzFactorDialog(Display.getCurrent()
.getActiveShell(), subscriber.getPatcher());
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorDialog.java
index d3667ac06..1ec614144 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorDialog.java
@@ -44,6 +44,7 @@ public class FuzzFactorDialog extends Dialog {
return fuzzFactor;
}
+ @Override
protected Control createDialogArea(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout(2, false);
@@ -68,6 +69,7 @@ public class FuzzFactorDialog extends Dialog {
data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
valueText.setLayoutData(data);
valueText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e) {
validateInput();
}
@@ -84,6 +86,7 @@ public class FuzzFactorDialog extends Dialog {
data.widthHint = Math.max(widthHint, minSize.x);
guessButton.setLayoutData(data);
guessButton.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
patcher.setFuzz(-1);
int fuzz = guessFuzzFactor();
@@ -136,6 +139,7 @@ public class FuzzFactorDialog extends Dialog {
}
}
+ @Override
protected void configureShell(Shell shell) {
super.configureShell(shell);
shell.setText(TeamUIMessages.FuzzFactorDialog_title);
@@ -146,6 +150,7 @@ public class FuzzFactorDialog extends Dialog {
try {
PlatformUI.getWorkbench().getProgressService().run(true, true,
new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) {
result[0] = patcher.guessFuzzFactor(monitor);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/GererateRejFileAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/GererateRejFileAction.java
index 898c3e1f1..bdeb43587 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/GererateRejFileAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/GererateRejFileAction.java
@@ -28,10 +28,12 @@ public class GererateRejFileAction extends Action {
subscriber = (ApplyPatchSubscriber) context.getSubscriber();
}
+ @Override
public boolean isChecked() {
return subscriber.getPatcher().isGenerateRejectFile();
}
+ @Override
public void run() {
boolean oldValue = subscriber.getPatcher().isGenerateRejectFile();
subscriber.getPatcher().setGenerateRejectFile(!oldValue);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/IgnoreLeadingPathSegmentsAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/IgnoreLeadingPathSegmentsAction.java
index cd2a12543..d5bda6837 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/IgnoreLeadingPathSegmentsAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/IgnoreLeadingPathSegmentsAction.java
@@ -39,10 +39,12 @@ public class IgnoreLeadingPathSegmentsAction extends Action {
subscriber = (ApplyPatchSubscriber) context.getSubscriber();
}
+ @Override
public boolean isEnabled() {
return !subscriber.getPatcher().isWorkspacePatch();
}
+ @Override
public void run() {
int oldValue = subscriber.getPatcher().getStripPrefixSegments();
maxValue = subscriber.getPatcher().calculatePrefixSegmentCount() - 1;
@@ -53,6 +55,7 @@ public class IgnoreLeadingPathSegmentsAction extends Action {
TeamUIMessages.IgnoreLeadingPathSegmentsDialog_message,
new Integer(maxValue)), new Integer(oldValue)
.toString(), new IInputValidator() {
+ @Override
public String isValid(String input) {
try {
int i = Integer.parseInt(input);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAction.java
index c4a8f669d..f0ca7ed5a 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAction.java
@@ -46,6 +46,7 @@ public class MergeAction extends Action {
this.configuration = configuration;
}
+ @Override
public void runWithEvent(Event event) {
IHandler handler = getHandler();
if (handler != null && handler.isEnabled()) {
@@ -59,6 +60,7 @@ public class MergeAction extends Action {
final SaveableComparison target = targetBuffer;
try {
PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) throws InvocationTargetException,
InterruptedException {
try {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllActionHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllActionHandler.java
index 43cb95c33..2f0294e5d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllActionHandler.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllActionHandler.java
@@ -38,6 +38,7 @@ public class MergeAllActionHandler extends MergeActionHandler implements IDiffCh
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.MergeActionHandler#getOperation()
*/
+ @Override
protected synchronized SynchronizationOperation getOperation() {
if (operation == null) {
operation = createOperation();
@@ -60,6 +61,7 @@ public class MergeAllActionHandler extends MergeActionHandler implements IDiffCh
/* (non-Javadoc)
* @see org.eclipse.team.core.diff.IDiffChangeListener#diffsChanged(org.eclipse.team.core.diff.IDiffChangeEvent, org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
synchronized (this) {
operation = null;
@@ -71,6 +73,7 @@ public class MergeAllActionHandler extends MergeActionHandler implements IDiffCh
/* (non-Javadoc)
* @see org.eclipse.team.core.diff.IDiffChangeListener#propertyChanged(org.eclipse.team.core.diff.IDiffTree, int, org.eclipse.core.runtime.IPath[])
*/
+ @Override
public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
// Nothing to do
}
@@ -78,11 +81,13 @@ public class MergeAllActionHandler extends MergeActionHandler implements IDiffCh
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.MergeActionHandler#dispose()
*/
+ @Override
public void dispose() {
getContext().getDiffTree().removeDiffChangeListener(this);
super.dispose();
}
+ @Override
public Object execute(ExecutionEvent event) throws ExecutionException {
if (saveDirtyEditors() && promptToUpdate())
return super.execute(event);
@@ -156,6 +161,7 @@ public class MergeAllActionHandler extends MergeActionHandler implements IDiffCh
return false;
final boolean[] result = new boolean[] {true};
TeamUIPlugin.getStandardDisplay().syncExec(new Runnable() {
+ @Override
public void run() {
String sizeString = Long.toString(count);
String message = tree.size() > 1 ? NLS.bind(TeamUIMessages.MergeAllActionHandler_1, new String[] { sizeString }) :
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllOperation.java
index 1bdec37e4..96971f099 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllOperation.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllOperation.java
@@ -39,19 +39,24 @@ public final class MergeAllOperation extends SynchronizationOperation {
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public void execute(IProgressMonitor monitor) throws InvocationTargetException,
InterruptedException {
new ModelMergeOperation(getPart(), ((SynchronizationContext)context).getScopeManager()) {
+ @Override
public boolean isPreviewRequested() {
return false;
}
+ @Override
protected void initializeContext(IProgressMonitor monitor) throws CoreException {
monitor.beginTask(null, 10);
monitor.done();
}
+ @Override
protected ISynchronizationContext getContext() {
return context;
}
+ @Override
protected void executeMerge(IProgressMonitor monitor) throws CoreException {
monitor.beginTask(null, 100);
if (!hasChangesOfInterest()) {
@@ -77,8 +82,10 @@ public final class MergeAllOperation extends SynchronizationOperation {
private boolean promptToContinue(final IStatus status) {
final boolean[] result = new boolean[] { false };
Runnable runnable = new Runnable() {
+ @Override
public void run() {
ErrorDialog dialog = new ErrorDialog(getShell(), TeamUIMessages.ModelMergeOperation_0, TeamUIMessages.ModelMergeOperation_1, status, IStatus.ERROR | IStatus.WARNING | IStatus.INFO) {
+ @Override
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.YES_ID, IDialogConstants.YES_LABEL,
false);
@@ -89,6 +96,7 @@ public final class MergeAllOperation extends SynchronizationOperation {
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.ErrorDialog#buttonPressed(int)
*/
+ @Override
protected void buttonPressed(int id) {
if (id == IDialogConstants.YES_ID)
super.buttonPressed(IDialogConstants.OK_ID);
@@ -110,6 +118,7 @@ public final class MergeAllOperation extends SynchronizationOperation {
/* (non-Javadoc)
* @see org.eclipse.team.ui.TeamOperation#canRunAsJob()
*/
+ @Override
protected boolean canRunAsJob() {
return true;
}
@@ -117,6 +126,7 @@ public final class MergeAllOperation extends SynchronizationOperation {
/* (non-Javadoc)
* @see org.eclipse.team.ui.TeamOperation#getJobName()
*/
+ @Override
protected String getJobName() {;
return jobName;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeIncomingChangesAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeIncomingChangesAction.java
index 19793f48a..150f29a73 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeIncomingChangesAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeIncomingChangesAction.java
@@ -42,6 +42,7 @@ public class MergeIncomingChangesAction extends ModelParticipantAction implement
handler.addHandlerListener(this);
}
+ @Override
public void runWithEvent(Event event) {
if (handler == null || !handler.isEnabled())
return;
@@ -74,6 +75,7 @@ public class MergeIncomingChangesAction extends ModelParticipantAction implement
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.mapping.ModelProviderAction#isEnabledForSelection(org.eclipse.jface.viewers.IStructuredSelection)
*/
+ @Override
protected boolean isEnabledForSelection(IStructuredSelection selection) {
return handler.isEnabled();
}
@@ -83,6 +85,7 @@ public class MergeIncomingChangesAction extends ModelParticipantAction implement
*/
protected FastDiffFilter getDiffFilter() {
return new FastDiffFilter() {
+ @Override
public boolean select(IDiff node) {
if (node instanceof IThreeWayDiff) {
IThreeWayDiff twd = (IThreeWayDiff) node;
@@ -95,10 +98,12 @@ public class MergeIncomingChangesAction extends ModelParticipantAction implement
};
}
+ @Override
protected void handleTargetSaveableChange() throws InvocationTargetException, InterruptedException {
final SaveableComparison currentBuffer = getActiveSaveable();
if (currentBuffer != null && currentBuffer.isDirty()) {
PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) throws InvocationTargetException,
InterruptedException {
try {
@@ -119,6 +124,7 @@ public class MergeIncomingChangesAction extends ModelParticipantAction implement
/**
* @param handlerEvent
*/
+ @Override
public void handlerChanged(HandlerEvent handlerEvent) {
setEnabled(handler.isEnabled());
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelCompareEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelCompareEditorInput.java
index 2474bf0c3..e7fd554ae 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelCompareEditorInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelCompareEditorInput.java
@@ -51,6 +51,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
this.participant = participant;
this.input = input;
contextListener = new ICacheListener() {
+ @Override
public void cacheDisposed(ICache cache) {
closeEditor(true);
}
@@ -71,6 +72,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#contentsCreated()
*/
+ @Override
protected void contentsCreated() {
super.contentsCreated();
participant.getContext().getCache().addCacheListener(contextListener);
@@ -79,6 +81,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#handleDispose()
*/
+ @Override
protected void handleDispose() {
super.handleDispose();
participant.getContext().getCache().removeCacheListener(contextListener);
@@ -86,6 +89,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
ICompareNavigator navigator = (ICompareNavigator)synchronizeConfiguration.getProperty(SynchronizePageConfiguration.P_INPUT_NAVIGATOR);
if (navigator != null && navigator == super.getNavigator()) {
synchronizeConfiguration.setProperty(SynchronizePageConfiguration.P_INPUT_NAVIGATOR, new CompareNavigator() {
+ @Override
protected INavigatable[] getNavigatables() {
return new INavigatable[0];
}
@@ -96,6 +100,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.LocalResourceCompareEditorInput#createSaveable()
*/
+ @Override
protected Saveable createSaveable() {
if (input instanceof ISynchronizationCompareInput) {
ISynchronizationCompareInput mci = (ISynchronizationCompareInput) input;
@@ -109,6 +114,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#prepareInput(org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
protected ICompareInput prepareCompareInput(IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException {
monitor.beginTask(TeamUIMessages.SyncInfoCompareInput_3, 100);
@@ -152,6 +158,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
* (non-Javadoc)
* @see org.eclipse.ui.IEditorInput#getToolTipText()
*/
+ @Override
public String getToolTipText() {
String fullPath;
ISynchronizationCompareInput adapter = asModelCompareInput(input);
@@ -166,6 +173,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.LocalResourceCompareEditorInput#fireInputChange()
*/
+ @Override
protected void fireInputChange() {
if (input instanceof ResourceDiffCompareInput) {
ResourceDiffCompareInput rdci = (ResourceDiffCompareInput) input;
@@ -176,11 +184,13 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#registerContextMenu(org.eclipse.jface.action.MenuManager)
*/
+ @Override
public void registerContextMenu(MenuManager menu, ISelectionProvider provider) {
super.registerContextMenu(menu, provider);
Saveable saveable = getSaveable();
if (saveable instanceof LocalResourceSaveableComparison) {
menu.addMenuListener(new IMenuListener() {
+ @Override
public void menuAboutToShow(IMenuManager manager) {
handleMenuAboutToShow(manager);
}
@@ -193,6 +203,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
final ResourceMarkAsMergedHandler markAsMergedHandler = new ResourceMarkAsMergedHandler(getSynchronizeConfiguration());
markAsMergedHandler.updateEnablement(selection);
Action markAsMergedAction = new Action(TeamUIMessages.ModelCompareEditorInput_0) {
+ @Override
public void run() {
try {
markAsMergedHandler.execute(new ExecutionEvent());
@@ -208,6 +219,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
final ResourceMergeHandler mergeHandler = new ResourceMergeHandler(getSynchronizeConfiguration(), false);
mergeHandler.updateEnablement(selection);
Action mergeAction = new Action(TeamUIMessages.ModelCompareEditorInput_1) {
+ @Override
public void run() {
try {
mergeHandler.execute(new ExecutionEvent());
@@ -223,6 +235,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
final ResourceMergeHandler overwriteHandler = new ResourceMergeHandler(getSynchronizeConfiguration(), true);
overwriteHandler.updateEnablement(selection);
Action overwriteAction = new Action(TeamUIMessages.ModelCompareEditorInput_2) {
+ @Override
public void run() {
try {
overwriteHandler.execute(new ExecutionEvent());
@@ -246,6 +259,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
return synchronizeConfiguration;
}
+ @Override
public void propertyChange(PropertyChangeEvent event) {
if (event.getProperty().equals(CompareConfiguration.IGNORE_WHITESPACE)) {
synchronizeConfiguration.setProperty(IGNORE_WHITSPACE_PAGE_PROPERTY, event.getNewValue());
@@ -255,10 +269,12 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#belongsTo(java.lang.Object)
*/
+ @Override
public boolean belongsTo(Object family) {
return super.belongsTo(family) || family == participant;
}
+ @Override
public synchronized ICompareNavigator getNavigator() {
if (isSelectedInSynchronizeView()) {
ICompareNavigator nav = (ICompareNavigator)synchronizeConfiguration.getProperty(SynchronizePageConfiguration.P_NAVIGATOR);
@@ -282,6 +298,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this)
return true;
@@ -295,6 +312,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
+ @Override
public int hashCode() {
return input.hashCode();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java
index 66ef48f2f..b8ca30776 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java
@@ -59,6 +59,7 @@ public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage
ResourceMappingContext.LOCAL_CONTEXT, true);
}
+ @Override
protected ContainerCheckedTreeViewer createViewer(Composite top) {
GridData data;
fViewer = new ContainerCheckedTreeViewer(top, SWT.BORDER);
@@ -73,6 +74,7 @@ public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage
fViewer.setContentProvider(service.createCommonContentProvider());
fViewer.setLabelProvider(new DecoratingLabelProvider(service.createCommonLabelProvider(), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
fViewer.addCheckStateListener(new ICheckStateListener() {
+ @Override
public void checkStateChanged(CheckStateChangedEvent event) {
Object element = event.getElement();
//If the workspace model has been checked, switch the scope to workspace
@@ -94,10 +96,12 @@ public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage
});
fViewer.getTree().addTreeListener(new TreeListener(){
+ @Override
public void treeCollapsed(TreeEvent e) {
//no-op
}
+ @Override
public void treeExpanded(TreeEvent e) {
if (isWorkingSetSelected())
checkWorkingSetElements();
@@ -143,15 +147,18 @@ public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage
return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
}
+ @Override
public void dispose() {
service.dispose();
super.dispose();
}
+ @Override
protected void checkAll() {
getViewer().setCheckedElements(manager.getScope().getModelProviders());
}
+ @Override
protected boolean checkWorkingSetElements() {
List allWorkingSetElements = new ArrayList();
IWorkingSet[] workingSets = getWorkingSets();
@@ -186,10 +193,12 @@ public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage
return false;
}
+ @Override
public void onLoad(INavigatorContentExtension anExtension) {
anExtension.getStateModel().setProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_SCOPE, manager.getScope());
}
+ @Override
public void setVisible(boolean visible) {
super.setVisible(visible);
if (visible && !initialized) {
@@ -227,6 +236,7 @@ public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage
private void initialize() {
try {
getContainer().run(true, true, new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) throws InvocationTargetException,
InterruptedException {
try {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelEnablementPreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelEnablementPreferencePage.java
index 4d07a4707..846b10dc3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelEnablementPreferencePage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelEnablementPreferencePage.java
@@ -40,6 +40,7 @@ public class ModelEnablementPreferencePage extends PreferencePage implements IWo
private CheckboxTableViewer tableViewer;
+ @Override
protected Control createContents(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
@@ -52,12 +53,15 @@ public class ModelEnablementPreferencePage extends PreferencePage implements IWo
tableViewer = CheckboxTableViewer.newCheckList(composite, SWT.BORDER);
tableViewer.getTable().setLayoutData(new GridData(GridData.FILL_BOTH));
tableViewer.setContentProvider(new IStructuredContentProvider() {
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
// noting to do
}
+ @Override
public void dispose() {
// nothing to do
}
+ @Override
public Object[] getElements(Object element) {
if (element instanceof ITeamContentProviderManager) {
ITeamContentProviderManager manager = (ITeamContentProviderManager) element;
@@ -68,6 +72,7 @@ public class ModelEnablementPreferencePage extends PreferencePage implements IWo
});
tableViewer.setLabelProvider(new LabelProvider() {
Map images = new HashMap();
+ @Override
public String getText(Object element) {
if (element instanceof ITeamContentProviderDescriptor) {
ITeamContentProviderDescriptor desc = (ITeamContentProviderDescriptor) element;
@@ -88,6 +93,7 @@ public class ModelEnablementPreferencePage extends PreferencePage implements IWo
}
return modelProviderID;
}
+ @Override
public Image getImage(Object element) {
if (element instanceof ITeamContentProviderDescriptor) {
ITeamContentProviderDescriptor desc = (ITeamContentProviderDescriptor) element;
@@ -105,6 +111,7 @@ public class ModelEnablementPreferencePage extends PreferencePage implements IWo
}
return super.getImage(element);
}
+ @Override
public void dispose() {
for (Iterator iter = images.values().iterator(); iter.hasNext();) {
Image image = (Image) iter.next();
@@ -114,6 +121,7 @@ public class ModelEnablementPreferencePage extends PreferencePage implements IWo
}
});
tableViewer.setComparator(new ViewerComparator() {
+ @Override
public int compare(Viewer viewer, Object e1, Object e2) {
if (e1 instanceof ITeamContentProviderDescriptor && e2 instanceof ITeamContentProviderDescriptor) {
ITeamContentProviderDescriptor d1 = (ITeamContentProviderDescriptor) e1;
@@ -147,6 +155,7 @@ public class ModelEnablementPreferencePage extends PreferencePage implements IWo
tableViewer.setCheckedElements(previosulyEnabled.toArray());
}
+ @Override
public boolean performOk() {
Object[] checked = tableViewer.getCheckedElements();
Set nowEnabled = new HashSet();
@@ -178,10 +187,12 @@ public class ModelEnablementPreferencePage extends PreferencePage implements IWo
return false;
}
+ @Override
protected void performDefaults() {
tableViewer.setCheckedElements(TeamUI.getTeamContentProviderManager().getDescriptors());
}
+ @Override
public void init(IWorkbench workbench) {
// ignore
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSelectionDropDownAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSelectionDropDownAction.java
index 398a6e72d..3df56f465 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSelectionDropDownAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSelectionDropDownAction.java
@@ -35,12 +35,14 @@ public class ModelSelectionDropDownAction extends Action implements ISynchroniza
private Action showAllFlatAction;
private class MenuCreator implements IMenuCreator {
+ @Override
public void dispose() {
if(menuManager != null) {
menuManager.dispose();
menuManager = null;
}
}
+ @Override
public Menu getMenu(Control parent) {
Menu fMenu = null;
if (menuManager == null) {
@@ -63,6 +65,7 @@ public class ModelSelectionDropDownAction extends Action implements ISynchroniza
return fMenu;
}
+ @Override
public Menu getMenu(Menu parent) {
return null;
}
@@ -72,6 +75,7 @@ public class ModelSelectionDropDownAction extends Action implements ISynchroniza
Utils.initAction(this, "action.pickModels."); //$NON-NLS-1$
this.configuration = configuration;
listener = new org.eclipse.jface.util.IPropertyChangeListener() {
+ @Override
public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event) {
if (event.getProperty() == ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER) {
update();
@@ -85,6 +89,7 @@ public class ModelSelectionDropDownAction extends Action implements ISynchroniza
TeamUI.getTeamContentProviderManager().addPropertyChangeListener(listener);
getSynchronizationContext().getScope().addScopeChangeListener(this);
showAllAction = new Action(TeamUIMessages.ModelSelectionDropDownAction_0, IAction.AS_RADIO_BUTTON) {
+ @Override
public void run() {
ModelSelectionDropDownAction.this.configuration.setProperty(
ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER,
@@ -94,6 +99,7 @@ public class ModelSelectionDropDownAction extends Action implements ISynchroniza
//showAllAction.setImageDescriptor(TeamImages.getImageDescriptor(ITeamUIImages.IMG_HIERARCHICAL));
//showAllAction.setActionDefinitionId("org.eclipse.team.ui.showAllModels"); //$NON-NLS-1$
showAllFlatAction = new Action(TeamUIMessages.ModelSelectionDropDownAction_2, IAction.AS_CHECK_BOX) {
+ @Override
public void run() {
boolean checked = showAllFlatAction.isChecked();
ModelSelectionDropDownAction.this.configuration.setProperty(
@@ -205,6 +211,7 @@ public class ModelSelectionDropDownAction extends Action implements ISynchroniza
/* (non-Javadoc)
* @see org.eclipse.jface.action.IAction#run()
*/
+ @Override
public void run() {
ModelProvider next = getNextProvider();
if (next == null) return;
@@ -215,6 +222,7 @@ public class ModelSelectionDropDownAction extends Action implements ISynchroniza
/* (non-Javadoc)
* @see org.eclipse.team.core.mapping.ISynchronizationScopeChangeListener#scopeChanged(org.eclipse.team.core.mapping.ISynchronizationScope, org.eclipse.core.resources.mapping.ResourceMapping[], org.eclipse.core.resources.mapping.ResourceTraversal[])
*/
+ @Override
public void scopeChanged(ISynchronizationScope scope, ResourceMapping[] newMappings, ResourceTraversal[] newTraversals) {
if (newMappings.length > 0) {
rebuildMenu();
@@ -224,6 +232,7 @@ public class ModelSelectionDropDownAction extends Action implements ISynchroniza
private void rebuildMenu() {
Display display = TeamUIPlugin.getStandardDisplay();
display.asyncExec(new Runnable() {
+ @Override
public void run() {
if(menuManager != null) {
menuManager.dispose();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSynchronizePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSynchronizePage.java
index d0abb4adc..154c1eef4 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSynchronizePage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSynchronizePage.java
@@ -52,6 +52,7 @@ public class ModelSynchronizePage extends AbstractSynchronizePage {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizePage#reset()
*/
+ @Override
public void reset() {
// TODO Auto-generated method stub
@@ -60,6 +61,7 @@ public class ModelSynchronizePage extends AbstractSynchronizePage {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizePage#updateMode(int)
*/
+ @Override
protected void updateMode(int mode) {
// Nothing to do
}
@@ -75,6 +77,7 @@ public class ModelSynchronizePage extends AbstractSynchronizePage {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizePage#createViewerAdvisor(org.eclipse.swt.widgets.Composite)
*/
+ @Override
protected AbstractViewerAdvisor createViewerAdvisor(Composite parent) {
CommonViewerAdvisor commonViewerAdvisor = new CommonViewerAdvisor(parent, getConfiguration());
commonViewerAdvisor.addEmptyTreeListener((DiffTreeChangesSection)getChangesSection());
@@ -85,10 +88,12 @@ public class ModelSynchronizePage extends AbstractSynchronizePage {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizePage#createChangesSection()
*/
+ @Override
protected ChangesSection createChangesSection(Composite parent) {
return new DiffTreeChangesSection(parent, this, getConfiguration());
}
+ @Override
public void init(ISynchronizePageSite site) {
super.init(site);
IDialogSettings pageSettings = site.getPageSettings();
@@ -104,6 +109,7 @@ public class ModelSynchronizePage extends AbstractSynchronizePage {
}
}
+ @Override
public boolean aboutToChangeProperty(ISynchronizePageConfiguration configuration, String key, Object newValue) {
if (key.equals(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER)) {
if (!(newValue instanceof String)) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RemoveFromViewAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RemoveFromViewAction.java
index 2d04acf69..c97e6a4af 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RemoveFromViewAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RemoveFromViewAction.java
@@ -42,10 +42,12 @@ public class RemoveFromViewAction extends ResourceModelParticipantAction {
/* (non-Javadoc)
* @see org.eclipse.jface.action.Action#run()
*/
+ @Override
public void run() {
if (confirmRemove()) {
try {
PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) throws InvocationTargetException,
InterruptedException {
try {
@@ -113,6 +115,7 @@ public class RemoveFromViewAction extends ResourceModelParticipantAction {
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ModelParticipantAction#isEnabledForSelection(org.eclipse.jface.viewers.IStructuredSelection)
*/
+ @Override
protected boolean isEnabledForSelection(IStructuredSelection selection) {
// Only enable if the selected elements adapt to IResource
if (selection.isEmpty())
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceCompareInputChangeNotifier.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceCompareInputChangeNotifier.java
index 6c468a75f..5ff82b795 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceCompareInputChangeNotifier.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceCompareInputChangeNotifier.java
@@ -44,11 +44,13 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
private class CompareInputLabelProvider extends BaseLabelProvider implements ICompareInputLabelProvider {
+ @Override
public Image getAncestorImage(Object input) {
// No image desired
return null;
}
+ @Override
public String getAncestorLabel(Object input) {
if (input instanceof ResourceDiffCompareInput) {
ResourceDiffCompareInput rdci = (ResourceDiffCompareInput) input;
@@ -73,11 +75,13 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
return null;
}
+ @Override
public Image getLeftImage(Object input) {
// No image desired
return null;
}
+ @Override
public String getLeftLabel(Object input) {
if (input instanceof ResourceDiffCompareInput) {
ResourceDiffCompareInput rdci = (ResourceDiffCompareInput) input;
@@ -102,11 +106,13 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
return null;
}
+ @Override
public Image getRightImage(Object input) {
// No image desired
return null;
}
+ @Override
public String getRightLabel(Object input) {
if (input instanceof ResourceDiffCompareInput) {
ResourceDiffCompareInput rdci = (ResourceDiffCompareInput) input;
@@ -131,6 +137,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
return null;
}
+ @Override
public Image getImage(Object element) {
if (element instanceof ICompareInput) {
ICompareInput ci = (ICompareInput) element;
@@ -139,6 +146,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
return null;
}
+ @Override
public String getText(Object element) {
if (element instanceof ICompareInput) {
ICompareInput ci = (ICompareInput) element;
@@ -149,6 +157,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
public void fireChangeEvent(final Object element) {
Display.getDefault().asyncExec(new Runnable() {
+ @Override
public void run() {
fireLabelProviderChanged(new LabelProviderChangedEvent(CompareInputLabelProvider.this, element));
}
@@ -187,9 +196,11 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
initialize();
}
+ @Override
public void initialize() {
context.getDiffTree().addDiffChangeListener(this);
context.getCache().addCacheListener(new ICacheListener() {
+ @Override
public void cacheDisposed(ICache cache) {
dispose();
}
@@ -200,6 +211,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.mapping.CompareInputChangeNotifier#dispose()
*/
+ @Override
public void dispose() {
super.dispose();
context.getDiffTree().removeDiffChangeListener(this);
@@ -209,6 +221,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
/* (non-Javadoc)
* @see org.eclipse.team.core.diff.IDiffChangeListener#diffsChanged(org.eclipse.team.core.diff.IDiffChangeEvent, org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
Set changedInputs = new HashSet();
IDiff[] added = event.getAdditions();
@@ -240,6 +253,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
/* (non-Javadoc)
* @see org.eclipse.team.core.diff.IDiffChangeListener#propertyChanged(org.eclipse.team.core.diff.IDiffTree, int, org.eclipse.core.runtime.IPath[])
*/
+ @Override
public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
// Property changes are not interesting w.r.t. state changes
}
@@ -247,6 +261,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.mapping.CompareInputChangeNotifier#getResources(org.eclipse.compare.structuremergeviewer.ICompareInput)
*/
+ @Override
protected IResource[] getResources(ICompareInput input) {
IResource resource = getResource(input);
if (resource == null)
@@ -289,6 +304,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.mapping.CompareInputChangeNotifier#prepareInput(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
protected void prepareInput(ICompareInput input, IProgressMonitor monitor) {
if (input instanceof ResourceDiffCompareInput) {
ResourceDiffCompareInput rdci = (ResourceDiffCompareInput) input;
@@ -317,6 +333,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
return;
fetchingInput= input;
runInBackground(new IWorkspaceRunnable() {
+ @Override
public void run(IProgressMonitor monitor) throws CoreException {
fetchAuthors(input, monitor);
}
@@ -340,6 +357,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
return context;
}
+ @Override
protected boolean belongsTo(Object family) {
return family == getContext();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDiffCompareInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDiffCompareInput.java
index 942dc9cfb..e4d4ab2e8 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDiffCompareInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDiffCompareInput.java
@@ -164,6 +164,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
* This method is public so that the change can be fired
* by the containing editor input on a save.
*/
+ @Override
public void fireChange() {
super.fireChange();
}
@@ -171,6 +172,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.ISynchronizationCompareInput#prepareInput(org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public void prepareInput(CompareConfiguration configuration, IProgressMonitor monitor) throws CoreException {
configuration.setLabelProvider(this, ((ResourceCompareInputChangeNotifier)getChangeNotifier()).getLabelProvider());
ensureContentsCached(getAncestor(), getRight(), monitor);
@@ -179,6 +181,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.ISynchronizationCompareInput#getSaveable()
*/
+ @Override
public SaveableComparison getSaveable() {
return null;
}
@@ -186,6 +189,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
+ @Override
public Object getAdapter(Class adapter) {
if (adapter == IFile.class || adapter == IResource.class) {
return ResourceDiffTree.getResourceFor(node);
@@ -200,6 +204,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.ISynchronizationCompareInput#getFullPath()
*/
+ @Override
public String getFullPath() {
final IResource resource = ResourceDiffTree.getResourceFor(node);
if (resource != null)
@@ -210,6 +215,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.ISynchronizationCompareInput#isCompareInputFor(java.lang.Object)
*/
+ @Override
public boolean isCompareInputFor(Object object) {
final IResource resource = ResourceDiffTree.getResourceFor(node);
IResource other = Utils.getResource(object);
@@ -221,6 +227,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
/* (non-Javadoc)
* @see org.eclipse.compare.IResourceProvider#getResource()
*/
+ @Override
public IResource getResource() {
return ResourceDiffTree.getResourceFor(node);
}
@@ -230,6 +237,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
* translate them into compare input change events by calling {@link #update()}.
* @return a compare input change notifier
*/
+ @Override
public CompareInputChangeNotifier getChangeNotifier() {
return ResourceCompareInputChangeNotifier.getChangeNotifier(context);
}
@@ -237,6 +245,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.DiffNode#equals(java.lang.Object)
*/
+ @Override
public boolean equals(Object other) {
if (other == this)
return true;
@@ -261,6 +270,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.DiffNode#hashCode()
*/
+ @Override
public int hashCode() {
return getResource().hashCode();
}
@@ -269,6 +279,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
* Re-obtain the diff for this compare input and update the kind and 3
* contributor appropriately.
*/
+ @Override
public void update() {
IDiff newNode = context.getDiffTree().getDiff(getResource());
if (newNode == null) {
@@ -319,6 +330,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
* Return whether the diff associated with this input has changed.
* @return whether the diff associated with this input has changed
*/
+ @Override
public boolean needsUpdate() {
IDiff newNode= context.getDiffTree().getDiff(getResource());
return newNode == null || !newNode.equals(node);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDragAdapterAssistant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDragAdapterAssistant.java
index 3793bec14..0e7927afe 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDragAdapterAssistant.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDragAdapterAssistant.java
@@ -41,6 +41,7 @@ public class ResourceDragAdapterAssistant extends CommonDragAdapterAssistant {
*
* @see org.eclipse.ui.navigator.CommonDragAdapterAssistant#getSupportedTransferTypes()
*/
+ @Override
public Transfer[] getSupportedTransferTypes() {
return SUPPORTED_TRANSFERS;
}
@@ -51,6 +52,7 @@ public class ResourceDragAdapterAssistant extends CommonDragAdapterAssistant {
* @see org.eclipse.ui.navigator.CommonDragAdapterAssistant#setDragData(org.eclipse.swt.dnd.DragSourceEvent,
* org.eclipse.jface.viewers.IStructuredSelection)
*/
+ @Override
public boolean setDragData(DragSourceEvent anEvent,
IStructuredSelection aSelection) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMappingLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMappingLabelProvider.java
index 5f65b3880..e6e5cb985 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMappingLabelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMappingLabelProvider.java
@@ -18,6 +18,7 @@ import org.eclipse.ui.model.WorkbenchLabelProvider;
public class ResourceMappingLabelProvider extends LabelProvider {
WorkbenchLabelProvider provider = new WorkbenchLabelProvider();
+ @Override
public String getText(Object element) {
if (element instanceof ResourceMapping) {
ResourceMapping mapping = (ResourceMapping) element;
@@ -35,6 +36,7 @@ public class ResourceMappingLabelProvider extends LabelProvider {
return text;
return super.getText(element);
}
+ @Override
public Image getImage(Object element) {
Image image = provider.getImage(element);
if (image != null)
@@ -47,7 +49,8 @@ public class ResourceMappingLabelProvider extends LabelProvider {
}
return super.getImage(element);
}
- public void dispose() {
+ @Override
+ public void dispose() {
provider.dispose();
super.dispose();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMarkAsMergedHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMarkAsMergedHandler.java
index 0569a9bb1..3ceb2637e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMarkAsMergedHandler.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMarkAsMergedHandler.java
@@ -40,6 +40,7 @@ public class ResourceMarkAsMergedHandler extends ResourceMergeActionHandler {
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.MergeActionHandler#getOperation()
*/
+ @Override
protected synchronized SynchronizationOperation getOperation() {
if (operation == null) {
operation = new ResourceModelProviderOperation(getConfiguration(),
@@ -47,6 +48,7 @@ public class ResourceMarkAsMergedHandler extends ResourceMergeActionHandler {
/* (non-Javadoc)
* @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public void execute(IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException {
try {
@@ -54,6 +56,7 @@ public class ResourceMarkAsMergedHandler extends ResourceMergeActionHandler {
final IDiff[] deltas = getTargetDiffs();
ISchedulingRule rule = getMergeRule(context, deltas);
context.run(new IWorkspaceRunnable() {
+ @Override
public void run(IProgressMonitor monitor)
throws CoreException {
markAsMerged(deltas, context, monitor);
@@ -90,8 +93,10 @@ public class ResourceMarkAsMergedHandler extends ResourceMergeActionHandler {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.mapping.ResourceModelProviderOperation#getDiffFilter()
*/
+ @Override
protected FastDiffFilter getDiffFilter() {
return new FastDiffFilter() {
+ @Override
public boolean select(IDiff node) {
if (node instanceof IThreeWayDiff) {
IThreeWayDiff twd = (IThreeWayDiff) node;
@@ -104,6 +109,7 @@ public class ResourceMarkAsMergedHandler extends ResourceMergeActionHandler {
}
};
}
+ @Override
protected String getJobName() {
IDiff[] diffs = getTargetDiffs();
if (diffs.length == 1)
@@ -119,6 +125,7 @@ public class ResourceMarkAsMergedHandler extends ResourceMergeActionHandler {
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.MergeActionHandler#updateEnablement(org.eclipse.jface.viewers.IStructuredSelection)
*/
+ @Override
public void updateEnablement(IStructuredSelection selection) {
synchronized (this) {
operation = null;
@@ -134,6 +141,7 @@ public class ResourceMarkAsMergedHandler extends ResourceMergeActionHandler {
}
}
+ @Override
public Object execute(ExecutionEvent event) throws ExecutionException {
if (saveDirtyEditors())
return super.execute(event);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeActionHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeActionHandler.java
index b1b29a55b..e6cfd5def 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeActionHandler.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeActionHandler.java
@@ -115,12 +115,15 @@ public abstract class ResourceMergeActionHandler extends MergeActionHandler impl
return (ISynchronizationContext)getConfiguration().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
}
+ @Override
public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
// Nothing to do
}
+ @Override
public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
Utils.syncExec(new Runnable() {
+ @Override
public void run() {
updateEnablement(getStructuredSelection());
}
@@ -128,9 +131,11 @@ public abstract class ResourceMergeActionHandler extends MergeActionHandler impl
}
+ @Override
public void propertyChange(PropertyChangeEvent event) {
if (event.getProperty() == ISynchronizePageConfiguration.P_MODE) {
Utils.syncExec(new Runnable() {
+ @Override
public void run() {
updateEnablement(getStructuredSelection());
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeHandler.java
index 7baf9c9cd..07458083d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeHandler.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeHandler.java
@@ -41,12 +41,14 @@ public class ResourceMergeHandler extends ResourceMergeActionHandler {
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.MergeActionHandler#getOperation()
*/
+ @Override
protected synchronized SynchronizationOperation getOperation() {
if (operation == null) {
operation = new ResourceModelProviderOperation(getConfiguration(), getStructuredSelection()) {
/* (non-Javadoc)
* @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public void execute(IProgressMonitor monitor) throws InvocationTargetException,
InterruptedException {
try {
@@ -65,8 +67,10 @@ public class ResourceMergeHandler extends ResourceMergeActionHandler {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.mapping.ResourceModelProviderOperation#getDiffFilter()
*/
+ @Override
protected FastDiffFilter getDiffFilter() {
return new FastDiffFilter() {
+ @Override
public boolean select(IDiff node) {
if (node instanceof IThreeWayDiff) {
IThreeWayDiff twd = (IThreeWayDiff) node;
@@ -80,6 +84,7 @@ public class ResourceMergeHandler extends ResourceMergeActionHandler {
}
};
}
+ @Override
protected String getJobName() {
IDiff[] diffs = getTargetDiffs();
if (overwrite) {
@@ -100,6 +105,7 @@ public class ResourceMergeHandler extends ResourceMergeActionHandler {
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.MergeActionHandler#updateEnablement(org.eclipse.jface.viewers.IStructuredSelection)
*/
+ @Override
public void updateEnablement(IStructuredSelection selection) {
synchronized (this) {
operation = null;
@@ -112,6 +118,7 @@ public class ResourceMergeHandler extends ResourceMergeActionHandler {
}
}
+ @Override
public Object execute(ExecutionEvent event) throws ExecutionException {
if (saveDirtyEditors() && (!overwrite || promptToConfirm()))
return super.execute(event);
@@ -125,6 +132,7 @@ public class ResourceMergeHandler extends ResourceMergeActionHandler {
Shell shell = getConfiguration().getSite().getShell();
if (!shell.isDisposed()) {
Utils.syncExec(new Runnable() {
+ @Override
public void run() {
confirmed[0] = promptToConfirm();
}
@@ -140,6 +148,7 @@ public class ResourceMergeHandler extends ResourceMergeActionHandler {
protected void promptForNoChanges() {
Utils.syncExec(new Runnable() {
+ @Override
public void run() {
MessageDialog.openInformation(getConfiguration().getSite().getShell(), TeamUIMessages.ResourceMergeHandler_6, TeamUIMessages.ResourceMergeHandler_7);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelActionProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelActionProvider.java
index f705f9571..4cbe97c1a 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelActionProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelActionProvider.java
@@ -34,6 +34,7 @@ public class ResourceModelActionProvider extends SynchronizationActionProvider {
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationActionProvider#initialize()
*/
+ @Override
protected void initialize() {
super.initialize();
// Register the merge, overwrite and mark-as-merged handlers
@@ -72,6 +73,7 @@ public class ResourceModelActionProvider extends SynchronizationActionProvider {
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationActionProvider#fillActionBars(org.eclipse.ui.IActionBars)
*/
+ @Override
public void fillActionBars(IActionBars actionBars) {
super.fillActionBars(actionBars);
if (refactorActions != null) refactorActions.fillActionBars(actionBars);
@@ -80,6 +82,7 @@ public class ResourceModelActionProvider extends SynchronizationActionProvider {
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationActionProvider#fillContextMenu(org.eclipse.jface.action.IMenuManager)
*/
+ @Override
public void fillContextMenu(IMenuManager menu) {
super.fillContextMenu(menu);
IContributionItem editGroup = menu.find(ISynchronizePageConfiguration.EDIT_GROUP);
@@ -91,6 +94,7 @@ public class ResourceModelActionProvider extends SynchronizationActionProvider {
/* (non-Javadoc)
* @see org.eclipse.ui.actions.ActionGroup#updateActionBars()
*/
+ @Override
public void updateActionBars() {
super.updateActionBars();
if (refactorActions != null) refactorActions.updateActionBars();
@@ -99,6 +103,7 @@ public class ResourceModelActionProvider extends SynchronizationActionProvider {
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#dispose()
*/
+ @Override
public void dispose() {
super.dispose();
if (refactorActions != null) refactorActions.dispose();
@@ -107,7 +112,8 @@ public class ResourceModelActionProvider extends SynchronizationActionProvider {
/* (non-Javadoc)
* @see org.eclipse.ui.actions.ActionGroup#setContext(org.eclipse.ui.actions.ActionContext)
*/
- public void setContext(ActionContext context) {
+ @Override
+ public void setContext(ActionContext context) {
super.setContext(context);
if (refactorActions != null) refactorActions.setContext(context);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java
index 90b159d5f..52c5c0275 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java
@@ -48,6 +48,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#getDelegateContentProvider()
*/
+ @Override
protected ITreeContentProvider getDelegateContentProvider() {
if (provider == null)
provider = new WorkbenchContentProvider();
@@ -57,6 +58,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#getModelProviderId()
*/
+ @Override
protected String getModelProviderId() {
return ModelProvider.RESOURCE_MODEL_PROVIDER_ID;
}
@@ -64,6 +66,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#getModelRoot()
*/
+ @Override
protected Object getModelRoot() {
return ResourcesPlugin.getWorkspace().getRoot();
}
@@ -71,6 +74,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#isInScope(org.eclipse.team.core.mapping.IResourceMappingScope, java.lang.Object, java.lang.Object)
*/
+ @Override
protected boolean isInScope(ISynchronizationScope scope, Object parent, Object elementOrPath) {
Object object = internalGetElement(elementOrPath);
if (object instanceof IResource) {
@@ -101,6 +105,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
*/
+ @Override
public void init(ICommonContentExtensionSite site) {
super.init(site);
TeamUIPlugin.getPlugin().getPreferenceStore().addPropertyChangeListener(this);
@@ -109,6 +114,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#dispose()
*/
+ @Override
public void dispose() {
if (provider != null)
provider.dispose();
@@ -116,6 +122,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
TeamUIPlugin.getPlugin().getPreferenceStore().removePropertyChangeListener(this);
}
+ @Override
public void propertyChange(PropertyChangeEvent event) {
if (event.getProperty().equals(IPreferenceIds.SYNCVIEW_DEFAULT_LAYOUT)) {
refresh();
@@ -126,6 +133,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#getChildrenInContext(org.eclipse.team.core.mapping.ISynchronizationContext, java.lang.Object, java.lang.Object[])
*/
+ @Override
protected Object[] getChildrenInContext(ISynchronizationContext context, Object parentOrPath, Object[] children) {
Object parent = internalGetElement(parentOrPath);
if (parent instanceof IResource) {
@@ -161,6 +169,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
return result.toArray(new Object[result.size()]);
}
+ @Override
protected ResourceTraversal[] getTraversals(ISynchronizationContext context, Object elementOrPath) {
Object object = internalGetElement(elementOrPath);
ISynchronizationScope scope = context.getScope();
@@ -242,6 +251,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#hasChildrenInContext(org.eclipse.team.core.mapping.ISynchronizationContext, java.lang.Object)
*/
+ @Override
protected boolean hasChildrenInContext(ISynchronizationContext context, Object elementOrPath) {
return getTraversalCalculator().hasChildren(context, elementOrPath);
}
@@ -249,8 +259,10 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#propertyChanged(int, org.eclipse.core.runtime.IPath[])
*/
+ @Override
public void propertyChanged(IDiffTree tree, final int property, final IPath[] paths) {
Utils.syncExec(new Runnable() {
+ @Override
public void run() {
ISynchronizationContext context = getContext();
if (context != null) {
@@ -301,6 +313,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
return (StructuredViewer)getViewer();
}
+ @Override
public Object[] getChildren(Object parent) {
if (parent instanceof ISynchronizationContext) {
// Put the resource projects directly under the context
@@ -309,6 +322,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
return super.getChildren(parent);
}
+ @Override
public boolean hasChildren(Object element) {
if (element instanceof ISynchronizationContext) {
// Put the resource projects directly under the context
@@ -317,6 +331,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
return super.hasChildren(element);
}
+ @Override
public Object[] getElements(Object parent) {
if (parent instanceof ISynchronizationContext) {
// Put the resource projects directly under the context
@@ -325,6 +340,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
return super.getElements(parent);
}
+ @Override
public Object getParent(Object elementOrPath) {
Object element = internalGetElement(elementOrPath);
if (element instanceof IProject) {
@@ -335,8 +351,10 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
return super.getParent(elementOrPath);
}
+ @Override
protected void refresh() {
Utils.syncExec(new Runnable() {
+ @Override
public void run() {
TreeViewer treeViewer = ((TreeViewer)getViewer());
treeViewer.refresh();
@@ -355,18 +373,22 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
return ResourceModelTraversalCalculator.getTraversalCalculator(getConfiguration());
}
+ @Override
protected boolean isVisible(IDiff diff) {
return super.isVisible(diff);
}
+ @Override
public Object[] getChildren(TreePath parentPath) {
return getChildren((Object)parentPath);
}
+ @Override
public boolean hasChildren(TreePath path) {
return hasChildren((Object)path);
}
+ @Override
public TreePath[] getParents(Object element) {
TreePath path = getTraversalCalculator().getParentPath(getContext(), getModelProvider(), element);
if (path != null) {
@@ -390,8 +412,10 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
return null;
}
+ @Override
public void diffsChanged(final IDiffChangeEvent event, IProgressMonitor monitor) {
Utils.syncExec(new Runnable() {
+ @Override
public void run() {
handleChange(event);
}
@@ -467,6 +491,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
private boolean hasVisibleChanges(IDiffTree tree, IResource resource) {
return tree.hasMatchingDiffs(resource.getFullPath(), new FastDiffFilter() {
+ @Override
public boolean select(IDiff diff) {
return isVisible(diff);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelLabelProvider.java
index c137ea85b..86b321593 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelLabelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelLabelProvider.java
@@ -35,6 +35,7 @@ public class ResourceModelLabelProvider extends
SynchronizationLabelProvider implements IFontProvider, IResourceChangeListener, ITreePathLabelProvider {
public static final FastDiffFilter CONFLICT_FILTER = new FastDiffFilter() {
+ @Override
public boolean select(IDiff diff) {
if (diff instanceof IThreeWayDiff) {
IThreeWayDiff twd = (IThreeWayDiff) diff;
@@ -48,6 +49,7 @@ public class ResourceModelLabelProvider extends
private ResourceModelContentProvider contentProvider;
private ImageManager localImageManager;
+ @Override
public void init(ICommonContentExtensionSite site) {
ITreeContentProvider aContentProvider = site.getExtension().getContentProvider();
if (aContentProvider instanceof ResourceModelContentProvider) {
@@ -57,6 +59,7 @@ public class ResourceModelLabelProvider extends
super.init(site);
}
+ @Override
public void dispose() {
ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
if (localImageManager != null)
@@ -69,6 +72,7 @@ public class ResourceModelLabelProvider extends
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.mapping.SynchronizationOperationLabelProvider#getBaseLabelProvider()
*/
+ @Override
protected ILabelProvider getDelegateLabelProvider() {
if (provider == null)
provider = new WorkbenchLabelProvider();
@@ -78,6 +82,7 @@ public class ResourceModelLabelProvider extends
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.AbstractSynchronizationLabelProvider#getSyncDelta(java.lang.Object)
*/
+ @Override
protected IDiff getDiff(Object elementOrPath) {
IResource resource = getResource(elementOrPath);
IResourceDiffTree tree = getDiffTree(elementOrPath);
@@ -99,6 +104,7 @@ public class ResourceModelLabelProvider extends
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvider#isIncludeOverlays()
*/
+ @Override
protected boolean isIncludeOverlays() {
return true;
}
@@ -106,6 +112,7 @@ public class ResourceModelLabelProvider extends
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvider#isBusy(java.lang.Object)
*/
+ @Override
protected boolean isBusy(Object elementOrPath) {
IResource resource = getResource(elementOrPath);
IResourceDiffTree tree = getDiffTree(elementOrPath);
@@ -125,6 +132,7 @@ public class ResourceModelLabelProvider extends
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvider#hasDecendantConflicts(java.lang.Object)
*/
+ @Override
protected boolean hasDecendantConflicts(Object elementOrPath) {
IResource resource = getResource(elementOrPath);
IResourceDiffTree tree = getDiffTree(elementOrPath);
@@ -147,6 +155,7 @@ public class ResourceModelLabelProvider extends
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
*/
+ @Override
public void resourceChanged(IResourceChangeEvent event) {
String[] markerTypes = new String[] {IMarker.PROBLEM};
final Set handledResources = new HashSet();
@@ -173,6 +182,7 @@ public class ResourceModelLabelProvider extends
protected void updateLabels(final Object[] resources) {
Utils.asyncExec(new Runnable() {
+ @Override
public void run() {
contentProvider.getStructuredViewer().update(
resources, null);
@@ -180,6 +190,7 @@ public class ResourceModelLabelProvider extends
}, contentProvider.getStructuredViewer());
}
+ @Override
protected String getDelegateText(Object elementOrPath) {
if (getConfiguration() != null) {
String label = getTraversalCalculator().getLabel(elementOrPath);
@@ -189,6 +200,7 @@ public class ResourceModelLabelProvider extends
return super.getDelegateText(internalGetElement(elementOrPath));
}
+ @Override
protected Image getDelegateImage(Object elementOrPath) {
if (getConfiguration() != null && getTraversalCalculator().isCompressedFolder(elementOrPath)) {
return getImageManager().getImage(TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COMPRESSED_FOLDER));
@@ -212,6 +224,7 @@ public class ResourceModelLabelProvider extends
return (ISynchronizePageConfiguration)getExtensionSite().getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION);
}
+ @Override
public void updateLabel(ViewerLabel label, TreePath elementPath) {
label.setImage(getImage(elementPath));
label.setText(getText(elementPath));
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelPersistenceAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelPersistenceAdapter.java
index e95bd5862..0d90935df 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelPersistenceAdapter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelPersistenceAdapter.java
@@ -38,6 +38,7 @@ public class ResourceModelPersistenceAdapter extends SynchronizationCompareAdapt
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationCompareAdapter#save(org.eclipse.core.resources.mapping.ResourceMapping[], org.eclipse.ui.IMemento)
*/
+ @Override
public void save(ResourceMapping[] mappings, IMemento memento) {
for (int i = 0; i < mappings.length; i++) {
ResourceMapping mapping = mappings[i];
@@ -62,6 +63,7 @@ public class ResourceModelPersistenceAdapter extends SynchronizationCompareAdapt
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationCompareAdapter#restore(org.eclipse.ui.IMemento)
*/
+ @Override
public ResourceMapping[] restore(IMemento memento) {
IMemento[] children = memento.getChildren(RESOURCES);
List result = new ArrayList();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelProviderOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelProviderOperation.java
index 11b92c891..0c143acd5 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelProviderOperation.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelProviderOperation.java
@@ -148,6 +148,7 @@ public abstract class ResourceModelProviderOperation extends SynchronizationOper
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.ModelProviderOperation#shouldRun()
*/
+ @Override
public boolean shouldRun() {
Object[] elements = getElements();
for (int i = 0; i < elements.length; i++) {
@@ -174,6 +175,7 @@ public abstract class ResourceModelProviderOperation extends SynchronizationOper
/* (non-Javadoc)
* @see org.eclipse.team.ui.TeamOperation#canRunAsJob()
*/
+ @Override
protected boolean canRunAsJob() {
return true;
}
@@ -190,6 +192,7 @@ public abstract class ResourceModelProviderOperation extends SynchronizationOper
return elementOrPath;
}
+ @Override
public boolean belongsTo(Object family) {
if (family == getContext()) {
return true;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipant.java
index b28bdbb4f..3b9b77a3a 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipant.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipant.java
@@ -73,6 +73,7 @@ public class ResourceModelScopeParticipant implements
return false;
}
+ @Override
public ResourceMapping[] handleContextChange(
ISynchronizationScope scope, IResource[] resources,
IProject[] projects) {
@@ -131,6 +132,7 @@ public class ResourceModelScopeParticipant implements
}
}
+ @Override
public void dispose() {
ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
if (PlatformUI.isWorkbenchRunning())
@@ -140,6 +142,7 @@ public class ResourceModelScopeParticipant implements
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
*/
+ @Override
public void resourceChanged(IResourceChangeEvent event) {
// Only interested in project additions and removals
Set result = new HashSet();
@@ -175,6 +178,7 @@ public class ResourceModelScopeParticipant implements
scope.refresh(mappings);
}
+ @Override
public void propertyChange(PropertyChangeEvent event) {
if (event.getProperty() == IWorkingSetManager.CHANGE_WORKING_SET_CONTENT_CHANGE) {
IWorkingSet newSet = (IWorkingSet) event.getNewValue();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipantFactory.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipantFactory.java
index 665042c7d..28bfac6c7 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipantFactory.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipantFactory.java
@@ -25,6 +25,7 @@ public class ResourceModelScopeParticipantFactory implements
/* (non-Javadoc)
* @see org.eclipse.team.core.mapping.IResourceMappingScopeParticipantFactory#createParticipant(org.eclipse.core.resources.mapping.ModelProvider, org.eclipse.team.core.mapping.provider.ResourceMappingScopeManager)
*/
+ @Override
public ISynchronizationScopeParticipant createParticipant(
ModelProvider provider, ISynchronizationScope scope) {
return new ResourceModelScopeParticipant(this.provider, scope);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelSorter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelSorter.java
index 155a5d6d2..eda6b8587 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelSorter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelSorter.java
@@ -25,6 +25,7 @@ public class ResourceModelSorter extends ResourceSorter {
super(NAME);
}
+ @Override
protected int compareNames(IResource r1, IResource r2) {
if (getLayout().equals(IPreferenceIds.COMPRESSED_LAYOUT)
&& r1 instanceof IFolder
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RestoreRemovedItemsAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RestoreRemovedItemsAction.java
index 15bad0c31..c06694bc5 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RestoreRemovedItemsAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RestoreRemovedItemsAction.java
@@ -24,6 +24,7 @@ public class RestoreRemovedItemsAction extends ResourceModelParticipantAction {
Utils.initAction(this, "action.restoreRemovedFromView."); //$NON-NLS-1$
}
+ @Override
public void run() {
ISynchronizationContext context = getSynchronizationContext();
if(context instanceof SubscriberMergeContext){
@@ -34,6 +35,7 @@ public class RestoreRemovedItemsAction extends ResourceModelParticipantAction {
super.run();
}
+ @Override
protected boolean isEnabledForSelection(IStructuredSelection selection) {
return true;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ReversePatchAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ReversePatchAction.java
index 1d3822b98..005868aef 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ReversePatchAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ReversePatchAction.java
@@ -32,10 +32,12 @@ public class ReversePatchAction extends Action {
subscriber = (ApplyPatchSubscriber) context.getSubscriber();
}
+ @Override
public boolean isChecked() {
return subscriber.getPatcher().isReversed();
}
+ @Override
public void run() {
boolean oldValue = subscriber.getPatcher().isReversed();
subscriber.getPatcher().setReversed(!oldValue);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ShowModelProviderAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ShowModelProviderAction.java
index d5bc378dd..82ebaa661 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ShowModelProviderAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ShowModelProviderAction.java
@@ -39,6 +39,7 @@ public class ShowModelProviderAction extends Action {
return desc.getImageDescriptor();
}
+ @Override
public void run() {
configuration.setProperty(
ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER,
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StorageStreamMerger.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StorageStreamMerger.java
index 93ea331eb..2ca4a391d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StorageStreamMerger.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StorageStreamMerger.java
@@ -32,6 +32,7 @@ public class StorageStreamMerger implements IStorageMerger {
this.merger = merger;
}
+ @Override
public IStatus merge(OutputStream output, String outputEncoding, IStorage ancestorStorage, IStorage targetStorage, IStorage otherStorage, IProgressMonitor monitor) throws CoreException {
InputStream ancestorStream = null;
InputStream remoteStream = null;
@@ -89,6 +90,7 @@ public class StorageStreamMerger implements IStorageMerger {
/* (non-Javadoc)
* @see org.eclipse.team.core.mapping.IStorageMerger#canMergeWithoutAncestor()
*/
+ @Override
public boolean canMergeWithoutAncestor() {
return false;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StreamMergerDelegate.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StreamMergerDelegate.java
index 81b8c5e32..fc605f81e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StreamMergerDelegate.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StreamMergerDelegate.java
@@ -27,6 +27,7 @@ public class StreamMergerDelegate implements IStreamMergerDelegate {
TeamPlugin.getPlugin().setMergerDelegate(new StreamMergerDelegate());
}
+ @Override
public IStorageMerger findMerger(IStorage target) {
try {
IContentType type = DelegatingStorageMerger.getContentType(target);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/SynchronizationResourceMappingContext.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/SynchronizationResourceMappingContext.java
index d61c3574d..363a58921 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/SynchronizationResourceMappingContext.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/SynchronizationResourceMappingContext.java
@@ -47,6 +47,7 @@ public final class SynchronizationResourceMappingContext extends
/* (non-Javadoc)
* @see org.eclipse.core.resources.mapping.RemoteResourceMappingContext#isThreeWay()
*/
+ @Override
public boolean isThreeWay() {
return context.getType() == ISynchronizationContext.THREE_WAY;
}
@@ -54,6 +55,7 @@ public final class SynchronizationResourceMappingContext extends
/* (non-Javadoc)
* @see org.eclipse.core.resources.mapping.RemoteResourceMappingContext#hasRemoteChange(org.eclipse.core.resources.IResource, org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public boolean hasRemoteChange(IResource resource, IProgressMonitor monitor) throws CoreException {
IDiff diff = context.getDiffTree().getDiff(resource);
if (diff instanceof IThreeWayDiff) {
@@ -67,6 +69,7 @@ public final class SynchronizationResourceMappingContext extends
/* (non-Javadoc)
* @see org.eclipse.core.resources.mapping.RemoteResourceMappingContext#hasLocalChange(org.eclipse.core.resources.IResource, org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public boolean hasLocalChange(IResource resource, IProgressMonitor monitor) throws CoreException {
IDiff diff = context.getDiffTree().getDiff(resource);
if (diff instanceof IThreeWayDiff) {
@@ -80,6 +83,7 @@ public final class SynchronizationResourceMappingContext extends
/* (non-Javadoc)
* @see org.eclipse.core.resources.mapping.RemoteResourceMappingContext#fetchRemoteContents(org.eclipse.core.resources.IFile, org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public IStorage fetchRemoteContents(IFile file, IProgressMonitor monitor) throws CoreException {
IDiff diff = context.getDiffTree().getDiff(file);
if (diff instanceof IThreeWayDiff) {
@@ -99,6 +103,7 @@ public final class SynchronizationResourceMappingContext extends
/* (non-Javadoc)
* @see org.eclipse.core.resources.mapping.RemoteResourceMappingContext#fetchBaseContents(org.eclipse.core.resources.IFile, org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public IStorage fetchBaseContents(IFile file, IProgressMonitor monitor) throws CoreException {
IDiff diff = context.getDiffTree().getDiff(file);
if (diff instanceof IThreeWayDiff) {
@@ -117,6 +122,7 @@ public final class SynchronizationResourceMappingContext extends
return null;
}
+ @Override
public IResource[] fetchMembers(IContainer container, IProgressMonitor monitor) throws CoreException {
Set result = new HashSet();
IResource[] children = container.members();
@@ -144,6 +150,7 @@ public final class SynchronizationResourceMappingContext extends
return (IResource[]) result.toArray(new IResource[result.size()]);
}
+ @Override
public void refresh(ResourceTraversal[] traversals, int flags, IProgressMonitor monitor) throws CoreException {
//context.refresh(traversals, flags, monitor);
}
@@ -152,6 +159,7 @@ public final class SynchronizationResourceMappingContext extends
return context;
}
+ @Override
public IProject[] getProjects() {
Set projects = new HashSet();
IResource[] roots = context.getScope().getRoots();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/TeamViewerSorter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/TeamViewerSorter.java
index b01a4f4c8..da06e845b 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/TeamViewerSorter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/TeamViewerSorter.java
@@ -28,6 +28,7 @@ public class TeamViewerSorter extends TreePathViewerSorter {
this.resourceComparator = new ResourceComparator(ResourceComparator.NAME);
}
+ @Override
public int category(Object element) {
if (element instanceof ModelProvider) {
return 2;
@@ -40,6 +41,7 @@ public class TeamViewerSorter extends TreePathViewerSorter {
return super.category(element);
}
+ @Override
public int compare(Viewer viewer, TreePath parentPath, Object e1, Object e2) {
if (parentPath == null || parentPath.getSegmentCount() == 0) {
// We need to handle the sorting at the top level
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/WorkspaceTeamStateProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/WorkspaceTeamStateProvider.java
index 1f68671f5..c97a42d80 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/WorkspaceTeamStateProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/WorkspaceTeamStateProvider.java
@@ -56,6 +56,7 @@ public class WorkspaceTeamStateProvider extends TeamStateProvider
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.DecoratedStateProvider#isDecorationEnabled(java.lang.Object)
*/
+ @Override
public final boolean isDecorationEnabled(Object element) {
ITeamStateProvider provider = getDecoratedStateProvider(element);
if (provider != null)
@@ -66,6 +67,7 @@ public class WorkspaceTeamStateProvider extends TeamStateProvider
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.DecoratedStateProvider#isDecorated(java.lang.Object)
*/
+ @Override
public boolean hasDecoratedState(Object element) throws CoreException {
ITeamStateProvider provider = getDecoratedStateProvider(element);
if (provider != null)
@@ -76,6 +78,7 @@ public class WorkspaceTeamStateProvider extends TeamStateProvider
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.DecoratedStateProvider#getDecoratedStateMask(java.lang.Object)
*/
+ @Override
public final int getDecoratedStateMask(Object element) {
ITeamStateProvider provider = getDecoratedStateProvider(element);
if (provider != null)
@@ -86,6 +89,7 @@ public class WorkspaceTeamStateProvider extends TeamStateProvider
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.ITeamStateProvider#getDecoratedProperties(java.lang.Object)
*/
+ @Override
public String[] getDecoratedProperties(Object element) {
ITeamStateProvider provider = getDecoratedStateProvider(element);
if (provider != null)
@@ -97,6 +101,7 @@ public class WorkspaceTeamStateProvider extends TeamStateProvider
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.DecoratedStateProvider#getState(java.lang.Object, int, org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public ITeamStateDescription getStateDescription(Object element, int stateMask,
String[] properties, IProgressMonitor monitor) throws CoreException {
ITeamStateProvider provider = getDecoratedStateProvider(element);
@@ -108,6 +113,7 @@ public class WorkspaceTeamStateProvider extends TeamStateProvider
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.ITeamStateProvider#getResourceMappingContext(java.lang.Object)
*/
+ @Override
public ResourceMappingContext getResourceMappingContext(Object element) {
ITeamStateProvider provider = getDecoratedStateProvider(element);
if (provider != null)
@@ -190,6 +196,7 @@ public class WorkspaceTeamStateProvider extends TeamStateProvider
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.IDecoratedStateChangeListener#decoratedStateChanged(org.eclipse.team.ui.mapping.IDecoratedStateChangeEvent)
*/
+ @Override
public void teamStateChanged(ITeamStateChangeEvent event) {
fireStateChangeEvent(event);
}
@@ -197,6 +204,7 @@ public class WorkspaceTeamStateProvider extends TeamStateProvider
/* (non-Javadoc)
* @see org.eclipse.team.internal.core.IRepositoryProviderListener#providerUnmapped(org.eclipse.core.resources.IProject)
*/
+ @Override
public void providerUnmapped(IProject project) {
// We don't need to worry about this
}
@@ -204,6 +212,7 @@ public class WorkspaceTeamStateProvider extends TeamStateProvider
/* (non-Javadoc)
* @see org.eclipse.team.internal.core.IRepositoryProviderListener#providerMapped(org.eclipse.team.core.RepositoryProvider)
*/
+ @Override
public void providerMapped(RepositoryProvider provider) {
String id = provider.getID();
listenerForStateChangesForId(id);
@@ -212,6 +221,7 @@ public class WorkspaceTeamStateProvider extends TeamStateProvider
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
*/
+ @Override
public void resourceChanged(IResourceChangeEvent event) {
IResourceDelta delta = event.getDelta();
IResourceDelta[] projectDeltas = delta
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/FileTypeTable.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/FileTypeTable.java
index 875b86ea9..fda56fc70 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/FileTypeTable.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/FileTypeTable.java
@@ -48,6 +48,7 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
return 2;
}
+ @Override
public int compare(Viewer viewer,Object e1,Object e2) {
final int compare= getCategory(e1) - getCategory(e2);
if (compare != 0)
@@ -67,6 +68,7 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
/* (non-Javadoc)
* @see java.lang.Comparable#compareTo(java.lang.Object)
*/
+ @Override
public int compareTo(Object o) {
return name.compareTo(((Item)o).name);
}
@@ -168,7 +170,8 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
}
- public Object getValue(Object element, String property) {
+ @Override
+ public Object getValue(Object element, String property) {
final Item item= (Item)element;
@@ -185,11 +188,13 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
return null;
}
- public boolean canModify(Object element, String property) {
+ @Override
+ public boolean canModify(Object element, String property) {
return PROPERTY_MODE.equals(property) || (fShowSaveColumn && PROPERTY_SAVE.equals(property));
}
- public void modify(Object element, String property, Object value) {
+ @Override
+ public void modify(Object element, String property, Object value) {
final IStructuredSelection selection = (IStructuredSelection)fTableViewer.getSelection();
final Item item= (Item)selection.getFirstElement();
@@ -211,11 +216,13 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
fTableViewer.refresh(item);
}
- public Image getColumnImage(Object element, int columnIndex) {
+ @Override
+ public Image getColumnImage(Object element, int columnIndex) {
return null;
}
- public String getColumnText(Object element, int columnIndex) {
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
final Item item= (Item) element;
@@ -240,21 +247,27 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
return null;
}
- public void addListener(ILabelProviderListener listener) {}
+ @Override
+ public void addListener(ILabelProviderListener listener) {}
- public void dispose() {}
+ @Override
+ public void dispose() {}
- public boolean isLabelProperty(Object element, String property) {
+ @Override
+ public boolean isLabelProperty(Object element, String property) {
return false;
}
- public void removeListener(ILabelProviderListener listener) {}
+ @Override
+ public void removeListener(ILabelProviderListener listener) {}
- public Object[] getElements(Object inputElement) {
+ @Override
+ public Object[] getElements(Object inputElement) {
return ((Collection)inputElement).toArray();
}
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
public IStructuredSelection getSelection() {
return (IStructuredSelection)fTableViewer.getSelection();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/IgnorePreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/IgnorePreferencePage.java
index c3b57c26f..43e49e5b0 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/IgnorePreferencePage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/IgnorePreferencePage.java
@@ -30,6 +30,7 @@ public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPr
private Table ignoreTable;
private Button addButton;
private Button removeButton;
+ @Override
public void init(IWorkbench workbench) {
setDescription(TeamUIMessages.IgnorePreferencePage_description);
}
@@ -39,6 +40,7 @@ public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPr
*
* @param ancestor the parent for the preference page
*/
+ @Override
protected Control createContents(Composite ancestor) {
Composite parent = new Composite(ancestor, SWT.NULL);
@@ -64,6 +66,7 @@ public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPr
gd.heightHint = 300;
ignoreTable.setLayoutData(gd);
ignoreTable.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event e) {
handleSelection();
}
@@ -79,6 +82,7 @@ public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPr
addButton = new Button(buttons, SWT.PUSH);
addButton.setText(TeamUIMessages.IgnorePreferencePage_add);
addButton.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event e) {
addIgnore();
}
@@ -88,6 +92,7 @@ public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPr
removeButton.setText(TeamUIMessages.IgnorePreferencePage_remove);
removeButton.setEnabled(false);
removeButton.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event e) {
removeIgnore();
}
@@ -107,6 +112,7 @@ public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPr
*
* @return whether it is okay to close the preference page
*/
+ @Override
public boolean performOk() {
int count = ignoreTable.getItemCount();
String[] patterns = new String[count];
@@ -121,6 +127,7 @@ public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPr
return true;
}
+ @Override
protected void performDefaults() {
super.performDefaults();
ignoreTable.removeAll();
@@ -143,6 +150,7 @@ public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPr
private void addIgnore() {
InputDialog dialog = new InputDialog(getShell(), TeamUIMessages.IgnorePreferencePage_enterPatternShort, TeamUIMessages.IgnorePreferencePage_enterPatternLong, null, null) {
+ @Override
protected Control createDialogArea(Composite parent) {
Control control = super.createDialogArea(parent);
PlatformUI.getWorkbench().getHelpSystem().setHelp(control, IHelpContextIds.IGNORE_PREFERENCE_PAGE);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/ResourceModelPreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/ResourceModelPreferencePage.java
index 6be5face0..d90c5310d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/ResourceModelPreferencePage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/ResourceModelPreferencePage.java
@@ -30,6 +30,7 @@ public class ResourceModelPreferencePage extends FieldEditorPreferencePage imple
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
+ @Override
public void createControl(Composite parent) {
super.createControl(parent);
// set F1 help
@@ -39,6 +40,7 @@ public class ResourceModelPreferencePage extends FieldEditorPreferencePage imple
/* (non-Javadoc)
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
*/
+ @Override
protected void createFieldEditors() {
defaultLayout = new RadioGroupFieldEditor(SYNCVIEW_DEFAULT_LAYOUT,
TeamUIMessages.SyncViewerPreferencePage_0, 3,
@@ -54,6 +56,7 @@ public class ResourceModelPreferencePage extends FieldEditorPreferencePage imple
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
*/
+ @Override
public void init(IWorkbench workbench) {
// Nothing to do
}
@@ -61,6 +64,7 @@ public class ResourceModelPreferencePage extends FieldEditorPreferencePage imple
/* (non-Javadoc)
* @see org.eclipse.jface.preference.IPreferencePage#performOk()
*/
+ @Override
public boolean performOk() {
TeamUIPlugin.getPlugin().savePluginPreferences();
return super.performOk();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java
index 663928ae4..69cdd6dae 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java
@@ -40,6 +40,7 @@ public class SyncViewerPreferencePage extends FieldEditorPreferencePage implemen
/*
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
*/
+ @Override
public int compare(Object o1, Object o2) {
if (o1 instanceof IPerspectiveDescriptor && o2 instanceof IPerspectiveDescriptor) {
String id1= ((IPerspectiveDescriptor)o1).getLabel();
@@ -60,6 +61,7 @@ public class SyncViewerPreferencePage extends FieldEditorPreferencePage implemen
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
+ @Override
public void createControl(Composite parent) {
super.createControl(parent);
// set F1 help
@@ -69,6 +71,7 @@ public class SyncViewerPreferencePage extends FieldEditorPreferencePage implemen
/* (non-Javadoc)
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
*/
+ @Override
public void createFieldEditors() {
showSyncInLabels = new BooleanFieldEditor(SYNCVIEW_VIEW_SYNCINFO_IN_LABEL, TeamUIMessages.SyncViewerPreferencePage_19, SWT.NONE, getFieldEditorParent());
addField(showSyncInLabels);
@@ -183,12 +186,14 @@ public class SyncViewerPreferencePage extends FieldEditorPreferencePage implemen
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
*/
+ @Override
public void init(IWorkbench workbench) {
}
/* (non-Javadoc)
* @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
*/
+ @Override
public void propertyChange(PropertyChangeEvent event) {
//if(event.getSource() == bkgScheduledRefresh || event.getSource() == scheduledDelay) {
// updateEnablements();
@@ -199,6 +204,7 @@ public class SyncViewerPreferencePage extends FieldEditorPreferencePage implemen
/* (non-Javadoc)
* @see org.eclipse.jface.preference.IPreferencePage#performOk()
*/
+ @Override
public boolean performOk() {
TeamUIPlugin.getPlugin().savePluginPreferences();
return super.performOk();
@@ -207,6 +213,7 @@ public class SyncViewerPreferencePage extends FieldEditorPreferencePage implemen
/* (non-Javadoc)
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#checkState()
*/
+ @Override
protected void initialize() {
super.initialize();
updateEnablements();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TextPreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TextPreferencePage.java
index 66c896048..4c3867f81 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TextPreferencePage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TextPreferencePage.java
@@ -38,6 +38,7 @@ import org.eclipse.ui.*;
public class TextPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
private static final class ExtensionValidator implements IInputValidator {
+ @Override
public String isValid(String newText) {
if (newText.trim().length() == 0)
return ""; //$NON-NLS-1$
@@ -78,6 +79,7 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
}
private static final class FilenameValidator implements IInputValidator {
+ @Override
public String isValid(String newText) {
if (newText.trim().length() == 0)
return ""; //$NON-NLS-1$
@@ -140,12 +142,14 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
*/
+ @Override
public void init(IWorkbench workbench) {
}
/* (non-Javadoc)
* @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
*/
+ @Override
protected Control createContents(Composite parent) {
initializeDialogUnits(parent);
@@ -157,12 +161,14 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
fTable= new FileTypeTable(composite, fItems, false);
fTable.getViewer().getControl().addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event e) {
handleSelection();
}
});
fTable.getViewer().addDoubleClickListener(new IDoubleClickListener() {
+ @Override
public void doubleClick(DoubleClickEvent event) {
final ISelection selection = event.getSelection();
if (selection == null || !(selection instanceof IStructuredSelection)) {
@@ -198,11 +204,13 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
fRemoveButton.setLayoutData(SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.FILL, SWT.FILL, false, false));
addExtensionButton.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event e) {
addExtension();
}
});
addNameButton.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event e) {
addName();
}
@@ -210,6 +218,7 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
fChangeButton.setEnabled(false);
fChangeButton.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event e) {
changePattern();
}
@@ -217,6 +226,7 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
fRemoveButton.setEnabled(false);
fRemoveButton.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event e) {
removePattern();
}
@@ -230,6 +240,7 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
return composite;
}
+ @Override
protected void performDefaults() {
super.performDefaults();
initializeItems();
@@ -242,6 +253,7 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
*
* @return whether it is okay to close the preference page
*/
+ @Override
public boolean performOk() {
final ArrayList extensionsList= new ArrayList();
final ArrayList extensionsModesList= new ArrayList();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java
index 3bc4aa284..84dcfcc72 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java
@@ -46,7 +46,8 @@ public abstract class RegistryReader {
final Object[] ret = new Object[1];
final CoreException[] exc = new CoreException[1];
BusyIndicator.showWhile(null, new Runnable() {
- public void run() {
+ @Override
+ public void run() {
try {
ret[0] = element
.createExecutableExtension(classAttribute);
@@ -134,6 +135,7 @@ public abstract class RegistryReader {
// more than one extension for an extension point is
// dependent in the order listed in the XML file.
Sorter sorter = new Sorter() {
+ @Override
public boolean compare(Object extension1, Object extension2) {
String s1 = ((IExtension) extension1).getNamespaceIdentifier();
String s2 = ((IExtension) extension2).getNamespaceIdentifier();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java
index 6cbe89cfa..d024c2a7f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java
@@ -55,14 +55,17 @@ public class SynchronizeParticipantDescriptor implements ISynchronizeParticipant
*
* @return the description
*/
+ @Override
public String getDescription() {
return description;
}
+ @Override
public String getId() {
return id;
}
+ @Override
public ImageDescriptor getImageDescriptor() {
if (imageDescriptor != null)
return imageDescriptor;
@@ -73,6 +76,7 @@ public class SynchronizeParticipantDescriptor implements ISynchronizeParticipant
return imageDescriptor;
}
+ @Override
public String getName() {
return label;
}
@@ -80,6 +84,7 @@ public class SynchronizeParticipantDescriptor implements ISynchronizeParticipant
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeParticipantDescriptor#isPersistent()
*/
+ @Override
public boolean isPersistent() {
return persistent;
}
@@ -114,6 +119,7 @@ public class SynchronizeParticipantDescriptor implements ISynchronizeParticipant
* Returns a string representation of this descriptor. For debugging
* purposes only.
*/
+ @Override
public String toString() {
return "Synchronize Participant(" + getId() + ")"; //$NON-NLS-2$//$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantRegistry.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantRegistry.java
index 6a908d11f..1b9dc2e77 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantRegistry.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantRegistry.java
@@ -30,6 +30,7 @@ public class SynchronizeParticipantRegistry extends RegistryReader {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.registry.RegistryReader#readElement(org.eclipse.core.runtime.IConfigurationElement)
*/
+ @Override
protected boolean readElement(IConfigurationElement element) {
if (element.getName().equals(TAG_SYNCPARTICIPANT)) {
String descText = getDescription(element);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardDescription.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardDescription.java
index 74df1d554..dba7782b6 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardDescription.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardDescription.java
@@ -81,6 +81,7 @@ public class SynchronizeWizardDescription {
return label;
}
+ @Override
public String toString() {
return "Synchronize Participant Creation Wizard(" + getId() + ")"; //$NON-NLS-2$//$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardRegistry.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardRegistry.java
index 39dd71805..a84635e21 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardRegistry.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardRegistry.java
@@ -26,6 +26,7 @@ public class SynchronizeWizardRegistry extends RegistryReader {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.registry.RegistryReader#readElement(org.eclipse.core.runtime.IConfigurationElement)
*/
+ @Override
protected boolean readElement(IConfigurationElement element) {
if (element.getName().equals(TAG_SYNCHRONIZE_WIZARD)) {
String descText = getDescription(element);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderDescriptor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderDescriptor.java
index d973a3997..2a07dea5c 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderDescriptor.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderDescriptor.java
@@ -99,6 +99,7 @@ public class TeamContentProviderDescriptor implements ITeamContentProviderDescri
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.registry.ITeamContentProviderDescriptor#getContentExtensionId()
*/
+ @Override
public String getContentExtensionId() {
return contentExtensionId;
}
@@ -106,6 +107,7 @@ public class TeamContentProviderDescriptor implements ITeamContentProviderDescri
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.registry.ITeamContentProviderDescriptor#getModelProviderId()
*/
+ @Override
public String getModelProviderId() {
return modelProviderId;
}
@@ -113,6 +115,7 @@ public class TeamContentProviderDescriptor implements ITeamContentProviderDescri
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.registry.ITeamContentProviderDescriptor#getImageDescriptor()
*/
+ @Override
public ImageDescriptor getImageDescriptor() {
if (imageDescriptor != null)
return imageDescriptor;
@@ -126,6 +129,7 @@ public class TeamContentProviderDescriptor implements ITeamContentProviderDescri
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.registry.ITeamContentProviderDescriptor#createPreferencePage()
*/
+ @Override
public IPreferencePage createPreferencePage() throws CoreException {
if (configElement.getAttribute(ATT_PREFERENCE_PAGE) == null)
return null;
@@ -136,6 +140,7 @@ public class TeamContentProviderDescriptor implements ITeamContentProviderDescri
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.ITeamContentProviderDescriptor#isEnabled()
*/
+ @Override
public boolean isEnabled() {
if (!hasPreferences()) {
return true;
@@ -207,6 +212,7 @@ public class TeamContentProviderDescriptor implements ITeamContentProviderDescri
}
}
+ @Override
public String getName() {
if (contentProviderName != null)
return contentProviderName;
@@ -217,6 +223,7 @@ public class TeamContentProviderDescriptor implements ITeamContentProviderDescri
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.ITeamContentProviderDescriptor#isFlatLayoutSupported()
*/
+ @Override
public boolean isFlatLayoutSupported() {
return supportsFlatLayout;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderManager.java
index 64284c511..e96631b7f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderManager.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderManager.java
@@ -42,6 +42,7 @@ public class TeamContentProviderManager implements ITeamContentProviderManager {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.registry.ITeamContentProviderManager#getDescriptors()
*/
+ @Override
public ITeamContentProviderDescriptor[] getDescriptors() {
lazyInitialize();
return (ITeamContentProviderDescriptor[]) descriptors.values().toArray(new ITeamContentProviderDescriptor[descriptors.size()]);
@@ -50,6 +51,7 @@ public class TeamContentProviderManager implements ITeamContentProviderManager {
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.ITeamContentProviderManager#getContentProviderIds(org.eclipse.team.core.mapping.ISynchronizationScope)
*/
+ @Override
public String[] getContentProviderIds(ISynchronizationScope scope) {
List result = new ArrayList();
ITeamContentProviderDescriptor[] descriptors = getDescriptors();
@@ -64,6 +66,7 @@ public class TeamContentProviderManager implements ITeamContentProviderManager {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.registry.ITeamContentProviderManager#getDescriptor(java.lang.String)
*/
+ @Override
public ITeamContentProviderDescriptor getDescriptor(String modelProviderId) {
lazyInitialize();
return (ITeamContentProviderDescriptor)descriptors.get(modelProviderId);
@@ -87,10 +90,12 @@ public class TeamContentProviderManager implements ITeamContentProviderManager {
}
}
+ @Override
public void addPropertyChangeListener(IPropertyChangeListener listener) {
listeners.add(listener);
}
+ @Override
public void removePropertyChangeListener(IPropertyChangeListener listener) {
listeners.remove(listener);
}
@@ -100,9 +105,11 @@ public class TeamContentProviderManager implements ITeamContentProviderManager {
for (int i = 0; i < allListeners.length; i++) {
final IPropertyChangeListener listener = (IPropertyChangeListener)allListeners[i];
SafeRunner.run(new ISafeRunnable() {
+ @Override
public void run() throws Exception {
listener.propertyChange(event);
}
+ @Override
public void handleException(Throwable exception) {
// handler by runner
}
@@ -114,6 +121,7 @@ public class TeamContentProviderManager implements ITeamContentProviderManager {
firePropertyChange(new PropertyChangeEvent(this, PROP_ENABLED_MODEL_PROVIDERS, oldEnabled, newEnabled));
}
+ @Override
public void setEnabledDescriptors(ITeamContentProviderDescriptor[] descriptors) {
List previouslyEnabled = new ArrayList();
for (Iterator iter = this.descriptors.values().iterator(); iter.hasNext();) {

Back to the top