Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2016-04-12 17:48:16 +0000
committerLars Vogel2016-04-12 17:48:36 +0000
commit790652f8bd1c247f29872621ca43f5b825104677 (patch)
treedf0dccf866f7453fad56c7a49169fb151fb11509
parente3b27690981c05c355fb29a3f213d6028dda3290 (diff)
downloadeclipse.platform.team-790652f8bd1c247f29872621ca43f5b825104677.tar.gz
eclipse.platform.team-790652f8bd1c247f29872621ca43f5b825104677.tar.xz
eclipse.platform.team-790652f8bd1c247f29872621ca43f5b825104677.zip
Bug 491533 - Run remove unnecessary whitespace cleanup onY20160414-1000I20160417-1112
org.eclipse.team.ui Change-Id: I422dc120f97d04250967609c7d423377ec11bf01 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--bundles/.project11
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DefaultUIFileModificationValidator.java30
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IHelpContextIds.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java24
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ITeamUIImages.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PixelConverter.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetContentHandler.java24
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java28
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PropertyChangeHandler.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/SWTUtils.java70
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/StorageTypedElement.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamAdapterFactory.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamCapabilityHelper.java24
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java44
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java102
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/UIProjectSetSerializationContext.java22
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java78
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareRevisionAction.java36
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java14
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ITeamRunnableContext.java2
-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.java18
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/OpenRevisionAction.java14
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/OpenWithMenu.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ProgressDialogRunnableContext.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java82
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/AdditionalMappingsDialog.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java60
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialogWithProjects.java24
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DialogArea.java28
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IPromptCondition.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IResourceMappingResourceFilter.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MultipleYesNoPrompter.java28
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/NoChangesDialog.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PreferencePageContainerDialog.java116
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PromptingDialog.java18
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingHierarchyArea.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingResourceDisplayArea.java46
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/ResourceMappingSelectionArea.java28
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/AbstractHistoryCategory.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java38
-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.java30
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/DialogHistoryPageSite.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/EditionHistoryPage.java52
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionEditorInput.java20
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/FileRevisionTypedElement.java20
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryDropAdapter.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryTableProvider.java72
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryViewDefaultPage.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java132
-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.java64
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/MessageHistoryCategory.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ReplaceLocalHistory.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/ShowLocalHistory.java14
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/AbstractCompareInput.java16
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/BuildScopeOperation.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonMenuManager.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonViewerAdvisor.java56
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java52
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DefaultResourceMappingMerger.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeChangesSection.java76
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeStatusLineContributionGroup.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAction.java16
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllActionHandler.java24
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeAllOperation.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/MergeIncomingChangesAction.java14
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelCompareEditorInput.java30
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java28
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelEnablementPreferencePage.java24
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSelectionDropDownAction.java20
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSynchronizePage.java18
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/RemoveFromViewAction.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceCompareInputChangeNotifier.java42
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDiffCompareInput.java22
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDragAdapterAssistant.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMappingLabelProvider.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMarkAsMergedHandler.java22
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeActionHandler.java18
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceMergeHandler.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelActionProvider.java18
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java46
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelLabelProvider.java30
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelParticipantAction.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelPersistenceAdapter.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelProviderOperation.java20
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelScopeParticipant.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelSorter.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelTraversalCalculator.java40
-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/ShowModelProviderAction.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StorageStreamMerger.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/StreamMergerDelegate.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/SynchronizationResourceMappingContext.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/TeamViewerSorter.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/WorkspaceTeamStateProvider.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/FileTypeTable.java88
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/IgnorePreferencePage.java38
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/ResourceModelPreferencePage.java20
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java118
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TextPreferencePage.java120
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java14
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java16
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantRegistry.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardDescription.java24
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardRegistry.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderDescriptor.java20
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamContentProviderManager.java22
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorDescription.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorManager.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java138
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizePage.java58
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractTreeViewerAdvisor.java46
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractViewerAdvisor.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActionDelegateWrapper.java14
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActiveChangeSetCollector.java52
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetCapability.java40
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetDiffNode.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetLabelDecorator.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelManager.java40
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelProvider.java56
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelSorter.java24
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangesSection.java24
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompositeModelProvider.java36
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompressedFoldersModelProvider.java48
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureRefreshScheduleDialog.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureSynchronizeScheduleComposite.java58
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DecoratingColorLabelProvider.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DialogSynchronizePageSite.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DiffNodeWorkbenchAdapter.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter.java22
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/FlatModelProvider.java70
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ForwardingChangesSection.java30
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java70
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshResourceSelectionPage.java32
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelManager.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelProvider.java22
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IChangeSetProvider.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshEvent.java46
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshSubscriberListener.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshable.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProvider.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProviderDescriptor.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ImageManager.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java52
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/MultiLabelDecorator.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshChangeListener.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshEvent.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshModelParticipantJob.java14
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java118
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberParticipantJob.java24
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicy.java20
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SaveablesCompareEditorInput.java46
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ScopableSubscriberParticipant.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StartupPreferencePage.java18
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java64
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantPage.java36
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java70
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoModelElement.java48
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangeSetCollector.java48
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangesSection.java54
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java122
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElement.java40
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementLabelProvider.java28
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementSorter.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelManager.java18
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java36
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelUpdateHandler.java96
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizePageConfiguration.java80
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java90
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewWorkbenchPart.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSynchronizingPerspective.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.java68
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/UnchangedResourceModelElement.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchAction.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ChangeSetActionGroup.java116
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/CopyToClipboardAction.java30
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DefaultSynchronizePageActions.java18
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DirectionFilterActionGroup.java44
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshAction.java32
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/NavigateAction.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenFileInSystemEditorAction.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java48
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenWithActionGroup.java14
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PasteAction.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PinParticipantAction.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefactorActionGroup.java16
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefreshActionContribution.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java16
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RestoreRemovedItemsAction.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ShowSynchronizeParticipantAction.java14
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java52
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java24
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SubscriberActionContribution.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncInfoSetStatusLineContributionGroup.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncViewerShowPreferencesAction.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizeAndRefreshAction.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java20
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchModelCompareEditorInput.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchModelSynchronizeParticipant.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchOperation.java40
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSubscriber.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchModelProvider.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchWorkbenchLabelProvider.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchWorkspace.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardElement.java30
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureMultipleProjectsWizard.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java48
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java62
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java34
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java136
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java52
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalSynchronizeWizard.java14
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java40
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java24
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSelectionPage.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.java32
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfFilenameStore.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfStore.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfUrlStore.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/TeamWizardPage.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizardExtension.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISaveableWorkbenchPart.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IScmUrlImportWizardPage.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageCompareEditorInput.java32
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageSaveablePart.java70
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartAdapter.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartDialog.java32
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamOperation.java96
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java34
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/ElementLocalHistoryPageSource.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPage.java28
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageCompareEditorInput.java24
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSaveablePart.java16
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSource.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryCompareAdapter.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPage.java62
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSite.java20
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSource.java16
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryView.java20
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/RevisionAnnotationController.java74
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareAdapter.java28
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareInput.java18
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderDescriptor.java14
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderManager.java26
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeEvent.java20
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeListener.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateDescription.java14
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateProvider.java26
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/MergeActionHandler.java20
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SaveableComparison.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationActionProvider.java28
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationCompareAdapter.java14
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationContentProvider.java68
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationLabelProvider.java20
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationOperation.java16
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationStateTester.java34
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeLabelProvider.java62
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java72
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeScope.java46
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java54
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelChangeListener.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelElement.java26
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePage.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java96
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageSite.java16
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java110
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java22
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantListener.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantReference.java22
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java24
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeView.java16
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelMergeOperation.java36
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelOperation.java28
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantAction.java36
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantMergeOperation.java34
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantWizard.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java94
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipantActionGroup.java42
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageCompareEditorInput.java72
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageDialog.java32
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPagePane.java36
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageSaveablePart.java54
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantSynchronizeWizard.java38
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ResourceScope.java32
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java46
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java156
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipantWizard.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberTeamStateProvider.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java36
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java50
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelOperation.java26
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java78
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateChangeEvent.java12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateDescription.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateProvider.java18
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java34
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkspaceScope.java10
314 files changed, 4423 insertions, 4412 deletions
diff --git a/bundles/.project b/bundles/.project
new file mode 100644
index 000000000..38d4784c8
--- /dev/null
+++ b/bundles/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>bundles</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
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 b1fae2ef5..db8446cfc 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
@@ -42,9 +42,9 @@ public class DefaultUIFileModificationValidator extends DefaultFileModificationV
int code = dialog.open();
return code == OK;
}
-
+
public FileListDialog(Shell parentShell, IFile[] files) {
- super(parentShell, TeamUIMessages.DefaultUIFileModificationValidator_0);
+ super(parentShell, TeamUIMessages.DefaultUIFileModificationValidator_0);
this.files = files;
setImageKey(DLG_IMG_WARNING);
}
@@ -54,7 +54,7 @@ public class DefaultUIFileModificationValidator extends DefaultFileModificationV
*/
@Override
protected void createMainDialogArea(Composite parent) {
- createWrappingLabel(parent, TeamUIMessages.DefaultUIFileModificationValidator_1);
+ createWrappingLabel(parent, TeamUIMessages.DefaultUIFileModificationValidator_1);
}
/* (non-Javadoc)
@@ -63,9 +63,9 @@ public class DefaultUIFileModificationValidator extends DefaultFileModificationV
@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);
- GridData data = new GridData ();
+ 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);
+ GridData data = new GridData ();
data.heightHint = 75;
data.horizontalAlignment = GridData.FILL;
data.grabExcessHorizontalSpace = true;
@@ -73,7 +73,7 @@ public class DefaultUIFileModificationValidator extends DefaultFileModificationV
fileList.setFont(parent.getFont());
for (int i = 0; i < files.length; i++) {
fileList.add(files[i].getFullPath().toString());
- }
+ }
return composite;
}
@@ -84,7 +84,7 @@ public class DefaultUIFileModificationValidator extends DefaultFileModificationV
protected void updateEnablements() {
// Nothing to do
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeCancelButton()
*/
@@ -92,7 +92,7 @@ public class DefaultUIFileModificationValidator extends DefaultFileModificationV
protected boolean includeCancelButton() {
return false;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeOkButton()
*/
@@ -100,7 +100,7 @@ public class DefaultUIFileModificationValidator extends DefaultFileModificationV
protected boolean includeOkButton() {
return false;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
*/
@@ -110,7 +110,7 @@ public class DefaultUIFileModificationValidator extends DefaultFileModificationV
createButton(parent, IDialogConstants.NO_ID, IDialogConstants.NO_LABEL, true);
super.createButtonsForButtonBar(parent);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#buttonPressed(int)
*/
@@ -124,7 +124,7 @@ public class DefaultUIFileModificationValidator extends DefaultFileModificationV
super.buttonPressed(id);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.core.DefaultFileModificationValidator#validateEdit(org.eclipse.core.resources.IFile[], org.eclipse.core.resources.team.FileModificationValidationContext)
*/
@@ -138,7 +138,7 @@ public class DefaultUIFileModificationValidator extends DefaultFileModificationV
shell.getDisplay().syncExec(new Runnable() {
@Override
public void run() {
- ok[0] = MessageDialog.openQuestion(shell, TeamUIMessages.DefaultUIFileModificationValidator_3, NLS.bind(TeamUIMessages.DefaultUIFileModificationValidator_4, new String[] { readOnlyFiles[0].getFullPath().toString() })); //
+ ok[0] = MessageDialog.openQuestion(shell, TeamUIMessages.DefaultUIFileModificationValidator_3, NLS.bind(TeamUIMessages.DefaultUIFileModificationValidator_4, new String[] { readOnlyFiles[0].getFullPath().toString() })); //
}
});
} else {
@@ -159,7 +159,7 @@ public class DefaultUIFileModificationValidator extends DefaultFileModificationV
}
return getStatus(readOnlyFiles);
}
-
+
private Shell getShell(FileModificationValidationContext context) {
if (context.getShell() != null)
return (Shell)context.getShell();
@@ -176,7 +176,7 @@ public class DefaultUIFileModificationValidator extends DefaultFileModificationV
return getDefaultStatus(file);
}
}
-
+
private boolean isMakeWrittableWhenContextNotProvided() {
return TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.MAKE_FILE_WRITTABLE_IF_CONTEXT_MISSING);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IHelpContextIds.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IHelpContextIds.java
index ed2c6d44b..863b841c3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IHelpContextIds.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IHelpContextIds.java
@@ -15,7 +15,7 @@ public interface IHelpContextIds {
// Dialogs
public static final String CONFIGURE_REFRESH_SCHEDULE_DIALOG = PREFIX + "configre_refresh_schedule_dialog_context"; //$NON-NLS-1$
-
+
// Preference Pages
public static final String IGNORE_PREFERENCE_PAGE = PREFIX + "ignore_preference_page_context"; //$NON-NLS-1$
public static final String MODEL_PREFERENCE_PAGE = PREFIX + "model_preference_page_context"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java
index 88e08739d..ce85b9131 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java
@@ -18,39 +18,39 @@ public interface IPreferenceIds {
* is used to select the initial layout.
*/
public static final String SYNCVIEW_DEFAULT_LAYOUT = PREFIX + "default_layout"; //$NON-NLS-1$
-
+
/*
* Values used to indicate which layout to use as the default.
*/
public static final String FLAT_LAYOUT = PREFIX + "flay_layout"; //$NON-NLS-1$
public static final String COMPRESSED_LAYOUT = PREFIX + "compressed_layout"; //$NON-NLS-1$
public static final String TREE_LAYOUT = PREFIX + "tree_layout"; //$NON-NLS-1$
-
+
/*
* Previous preference which is kept so it can be converted to the new preference (SYNCVIEW_DEFAULT_LAYOUT)
* @deprecated
*/
public static final String SYNCVIEW_COMPRESS_FOLDERS = PREFIX + "compress_folders"; //$NON-NLS-1$
-
+
/*
* Preference to enable displaying synchronization state in the elements label. This
* preference is used automatically with {@link StructuredViewerAdvisor}.
*/
public static final String SYNCVIEW_VIEW_SYNCINFO_IN_LABEL = PREFIX + "view_syncinfo_in_label"; //$NON-NLS-1$
-
+
/*
* Preference to enable the presence of the author field in a compare editor
*/
public static final String SHOW_AUTHOR_IN_COMPARE_EDITOR = PREFIX + "show_author_in_compare_editor"; //$NON-NLS-1$
-
+
/*
* Preference to enable the presence of the author field in a compare editor
*/
public static final String MAKE_FILE_WRITTABLE_IF_CONTEXT_MISSING = PREFIX + "validate_edit_with_no_context"; //$NON-NLS-1$
public static final String REUSE_OPEN_COMPARE_EDITOR= PREFIX + "reuse_open_compare_editors"; //$NON-NLS-1$
-
+
/*
- * Preference to enable the import of a project set to be run in the background
+ * Preference to enable the import of a project set to be run in the background
*/
public static final String RUN_IMPORT_IN_BACKGROUND= PREFIX + "run_import_in_background_"; //$NON-NLS-1$
@@ -65,26 +65,26 @@ public interface IPreferenceIds {
public static final String SYNCVIEW_DEFAULT_PERSPECTIVE = PREFIX + "syncview_default_perspective"; //$NON-NLS-1$
public static final String SYNCVIEW_DEFAULT_PERSPECTIVE_NONE = PREFIX + "sync_view_perspective_none"; //$NON-NLS-1$
public static final String SYNCHRONIZING_COMPLETE_PERSPECTIVE = PREFIX + "sychronizing_default_perspective_to_show"; //$NON-NLS-1$
-
+
/*
* Preference to save the last participant selected via the global synchronize action.
*/
public static final String SYNCHRONIZING_DEFAULT_PARTICIPANT = PREFIX + "sychronizing_default_participant"; //$NON-NLS-1$
public static final String SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID = PREFIX + "sychronizing_default_participant_sec_id"; //$NON-NLS-1$
-
+
/*
* Preference for disabling various prompts
*/
public static final String SYNCVIEW_REMOVE_FROM_VIEW_NO_PROMPT = PREFIX + "remove_from_view_without_prompt"; //$NON-NLS-1$
-
+
/*
* Preference to determine if the workspace is started for the first time.
*/
public static final String PREF_WORKSPACE_FIRST_TIME = PREFIX + "first_time"; //$NON-NLS-1$
-
+
/*
* Preferences for the Local History Page
*/
public static final String PREF_GROUPBYDATE_MODE = PREFIX + "group_bydate_mode"; //$NON-NLS-1$
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ITeamUIImages.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ITeamUIImages.java
index 13e08992e..3729c31c5 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ITeamUIImages.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ITeamUIImages.java
@@ -12,7 +12,7 @@ package org.eclipse.team.internal.ui;
/**
* Internal images for team ui.
- *
+ *
* @since 3.0
*/
public interface ITeamUIImages {
@@ -171,19 +171,19 @@ public interface ITeamUIImages {
*/
public final String IMG_PINNED = "elcl16/pin.gif"; //$NON-NLS-1$
/**
- * Previous history
+ * Previous history
*/
public final String IMG_PREVIOUS = "elcl16/prev_nav.gif"; //$NON-NLS-1$
-
+
//objects
public final String IMG_SITE_ELEMENT = "elcl16/site_element.gif"; //$NON-NLS-1$
- public final String IMG_CHANGE_FILTER = "elcl16/change_filter.gif"; //$NON-NLS-1$
+ public final String IMG_CHANGE_FILTER = "elcl16/change_filter.gif"; //$NON-NLS-1$
public final String IMG_COMPRESSED_FOLDER = "obj/compressed_folder_obj.gif"; //$NON-NLS-1$
public final String IMG_HIERARCHICAL = "elcl16/hierarchicalLayout.gif"; //$NON-NLS-1$
public final String IMG_FLAT = "elcl16/flatLayout.gif"; //$NON-NLS-1$
public final String IMG_SYNC_VIEW = "eview16/synch_synch.gif"; //$NON-NLS-1$
public final String IMG_CHANGE_SET = "obj/changeset_obj.gif"; //$NON-NLS-1$
-
+
/**
* Images used by the Local History Page
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PixelConverter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PixelConverter.java
index 6e1f207e5..73cd55a20 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PixelConverter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/PixelConverter.java
@@ -16,9 +16,9 @@ import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.widgets.Control;
public class PixelConverter {
-
+
private final FontMetrics fFontMetrics;
-
+
public PixelConverter(Control control) {
GC gc = new GC(control);
try {
@@ -28,7 +28,7 @@ public class PixelConverter {
gc.dispose();
}
}
-
+
public int convertHeightInCharsToPixels(int chars) {
return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars);
}
@@ -40,7 +40,7 @@ public class PixelConverter {
public int convertVerticalDLUsToPixels(int dlus) {
return Dialog.convertVerticalDLUsToPixels(fFontMetrics, dlus);
}
-
+
public int convertWidthInCharsToPixels(int chars) {
return Dialog.convertWidthInCharsToPixels(fFontMetrics, chars);
}
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 de14317a2..32532b2a5 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
@@ -27,7 +27,7 @@ public class Policy {
public static boolean DEBUG_HISTORY = false;
public static boolean DEBUG_DND = false;
public static boolean DEBUG_COMPARE_EDITOR_INPUT = false;
-
+
private static String ACTION_BUNDLE = "org.eclipse.team.internal.ui.actions.actions"; //$NON-NLS-1$
private static ResourceBundle actionBundle = null;
@@ -55,7 +55,7 @@ public class Policy {
/**
* Checks if the progress monitor is canceled.
- *
+ *
* @param monitor the onitor to check for cancellation
* @throws OperationCanceledException if the monitor is canceled
*/
@@ -64,7 +64,7 @@ public class Policy {
throw new OperationCanceledException();
}
}
-
+
public static IProgressMonitor subMonitorFor(IProgressMonitor monitor, int ticks) {
if (monitor == null)
return new NullProgressMonitor();
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 333ff0ec7..179d5d703 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
@@ -27,11 +27,11 @@ public class ProjectSetContentHandler extends DefaultHandler {
String id;
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$
+ if (elementName.equals("psf")) { //$NON-NLS-1$
map = new HashMap();
inPsf = true;
String version = atts.getValue("version"); //$NON-NLS-1$
@@ -39,15 +39,15 @@ public class ProjectSetContentHandler extends DefaultHandler {
return;
}
if (isVersionOne) return;
- if (elementName.equals("provider")) { //$NON-NLS-1$
- if (!inPsf) throw new SAXException(TeamUIMessages.ProjectSetContentHandler_Element_provider_must_be_contained_in_element_psf_4);
+ if (elementName.equals("provider")) { //$NON-NLS-1$
+ if (!inPsf) throw new SAXException(TeamUIMessages.ProjectSetContentHandler_Element_provider_must_be_contained_in_element_psf_4);
inProvider = true;
id = atts.getValue("id"); //$NON-NLS-1$
references = new ArrayList();
return;
}
- if (elementName.equals("project")) { //$NON-NLS-1$
- if (!inProvider) throw new SAXException(TeamUIMessages.ProjectSetContentHandler_Element_project_must_be_contained_in_element_provider_7);
+ if (elementName.equals("project")) { //$NON-NLS-1$
+ if (!inProvider) throw new SAXException(TeamUIMessages.ProjectSetContentHandler_Element_project_must_be_contained_in_element_provider_7);
inProject = true;
String reference = atts.getValue("reference"); //$NON-NLS-1$
references.add(reference);
@@ -58,31 +58,31 @@ 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$
+ if (elementName.equals("psf")) { //$NON-NLS-1$
inPsf = false;
return;
}
if (isVersionOne) return;
- if (elementName.equals("provider")) { //$NON-NLS-1$
+ if (elementName.equals("provider")) { //$NON-NLS-1$
map.put(id, references);
references = null;
inProvider = false;
return;
}
- if (elementName.equals("project")) { //$NON-NLS-1$
+ if (elementName.equals("project")) { //$NON-NLS-1$
inProject = false;
return;
}
}
-
+
public Map getReferences() {
return map;
}
-
+
public boolean isVersionOne() {
return isVersionOne;
}
-
+
/*
* Couldn't figure out from the SAX API exactly when localName vs. qName is used.
* However, the XML for project sets doesn't use namespaces so either of the two names
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 9ed7144ee..2d692c3bf 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
@@ -34,7 +34,7 @@ public class ProjectSetImporter {
/**
* Imports a psf file based on a file content. This may be used when psf
* file is imported from any other location that local filesystem.
- *
+ *
* @param psfContents
* the content of the psf file.
* @param filename
@@ -54,7 +54,7 @@ public class ProjectSetImporter {
/**
* Imports a psf file.
- *
+ *
* @param filename
* @param shell
* @param monitor
@@ -72,7 +72,7 @@ public class ProjectSetImporter {
throws InvocationTargetException {
try {
String version = xmlMemento.getString("version"); //$NON-NLS-1$
-
+
List newProjects = new ArrayList();
if (version.equals("1.0")){ //$NON-NLS-1$
IProjectSetSerializer serializer = Team.getProjectSetSerializer("versionOneSerializer"); //$NON-NLS-1$
@@ -93,7 +93,7 @@ public class ProjectSetImporter {
}
try {
String id = providers[i].getString("id"); //$NON-NLS-1$
- TeamCapabilityHelper.getInstance().processRepositoryId(id,
+ TeamCapabilityHelper.getInstance().processRepositoryId(id,
PlatformUI.getWorkbench().getActivitySupport());
RepositoryProviderType providerType = RepositoryProviderType.getProviderType(id);
if (providerType == null) {
@@ -101,7 +101,7 @@ public class ProjectSetImporter {
providerType = TeamPlugin.getAliasType(id);
}
if (providerType == null) {
- throw new TeamException(new Status(IStatus.ERROR, TeamUIPlugin.ID, 0, NLS.bind(TeamUIMessages.ProjectSetImportWizard_0, new String[] { id }), null));
+ throw new TeamException(new Status(IStatus.ERROR, TeamUIPlugin.ID, 0, NLS.bind(TeamUIMessages.ProjectSetImportWizard_0, new String[] { id }), null));
}
ProjectSetCapability serializer = providerType.getProjectSetCapability();
ProjectSetCapability.ensureBackwardsCompatible(providerType, serializer);
@@ -122,14 +122,14 @@ public class ProjectSetImporter {
}
throw new TeamException(new MultiStatus(TeamUIPlugin.ID, 0, status, TeamUIMessages.ProjectSetImportWizard_1, null));
}
-
+
//try working sets
IMemento[] sets = xmlMemento.getChildren("workingSets"); //$NON-NLS-1$
IWorkingSetManager wsManager = TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager();
boolean replaceAll = false;
boolean mergeAll = false;
boolean skipAll = false;
-
+
for (int i = 0; i < sets.length; i++) {
IWorkingSet newWs = wsManager.createWorkingSet(sets[i]);
if (newWs != null) {
@@ -156,14 +156,14 @@ public class ProjectSetImporter {
final AdviceDialog dialog = new AdviceDialog(
shell, title, null, msg,
MessageDialog.QUESTION, buttons, 0);
-
+
shell.getDisplay().syncExec(new Runnable() {
@Override
public void run() {
dialog.open();
}
});
-
+
switch (dialog.getReturnCode()) {
case 0: // overwrite
replaceWorkingSet(wsManager, newWs, oldWs);
@@ -184,7 +184,7 @@ public class ProjectSetImporter {
}
}
}
-
+
return (IProject[]) newProjects.toArray(new IProject[newProjects.size()]);
} catch (TeamException e) {
throw new InvocationTargetException(e);
@@ -230,7 +230,7 @@ public class ProjectSetImporter {
/**
* Check if given file is a valid psf file
- *
+ *
* @param filename
* @return <code>true</code> is file is a valid psf file
*/
@@ -244,7 +244,7 @@ public class ProjectSetImporter {
/**
* Check if given string is a valid project set
- *
+ *
* @param psfContent
* @return <code>true</code> if psfContent is a valid project set
*/
@@ -262,11 +262,11 @@ public class ProjectSetImporter {
private static void mergeWorkingSets(IWorkingSet newWs, IWorkingSet oldWs) {
IAdaptable[] oldElements = oldWs.getElements();
IAdaptable[] newElements = newWs.getElements();
-
+
Set combinedElements = new HashSet();
combinedElements.addAll(Arrays.asList(oldElements));
combinedElements.addAll(Arrays.asList(newElements));
-
+
oldWs.setElements((IAdaptable[]) combinedElements.toArray(new IAdaptable[0]));
}
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 4c8f22e32..cb33f75bb 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
@@ -20,7 +20,7 @@ import org.eclipse.jface.util.PropertyChangeEvent;
public class PropertyChangeHandler {
private ListenerList fListeners = new ListenerList(ListenerList.IDENTITY);
-
+
/**
* Notifies listeners of property changes, handling any exceptions
*/
@@ -34,7 +34,7 @@ public class PropertyChangeHandler {
*/
@Override
public void handleException(Throwable exception) {
- TeamUIPlugin.log(IStatus.ERROR, TeamUIMessages.AbstractSynchronizeParticipant_5, exception);
+ TeamUIPlugin.log(IStatus.ERROR, TeamUIMessages.AbstractSynchronizeParticipant_5, exception);
}
/**
@@ -47,7 +47,7 @@ public class PropertyChangeHandler {
/**
* Notifies listeners of the property change
- *
+ *
* @param event
* the property change event
*/
@@ -64,7 +64,7 @@ public class PropertyChangeHandler {
fListener = null;
}
}
-
+
public void addPropertyChangeListener(IPropertyChangeListener listener) {
fListeners.add(listener);
}
@@ -72,10 +72,10 @@ public class PropertyChangeHandler {
public void removePropertyChangeListener(IPropertyChangeListener listener) {
fListeners.remove(listener);
}
-
+
public void firePropertyChange(Object source, String property, Object oldValue, Object newValue) {
PropertyNotifier notifier = new PropertyNotifier();
notifier.notify(new PropertyChangeEvent(source, property, oldValue, newValue));
}
-
+
}
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 925d38563..3313b5eaf 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -33,7 +33,7 @@ import com.ibm.icu.text.MessageFormat;
public class SWTUtils {
-
+
public static final int MARGINS_DEFAULT= -1;
public static final int MARGINS_NONE= 0;
public static final int MARGINS_DIALOG= 1;
@@ -42,11 +42,11 @@ public class SWTUtils {
final PreferenceLinkArea area = new PreferenceLinkArea(parent, SWT.NONE, pageId, text, container, null);
return area;
}
-
+
public static Link createPreferenceLink(final Shell shell, Composite parent, final String pageId, String message) {
return createPreferenceLink(shell, parent, pageId, new String[] {pageId}, message);
}
-
+
public static Link createPreferenceLink(final Shell shell, Composite parent, final String pageId, final String[] displayIds, String message) {
Link link = new Link(parent, SWT.NONE);
link.setText(getLinkLabel(pageId, message));
@@ -59,7 +59,7 @@ public class SWTUtils {
});
return link;
}
-
+
private static String getLinkLabel(String pageId, String message) {
IPreferenceNode node = getPreferenceNode(pageId);
if (node == null) {
@@ -68,10 +68,10 @@ public class SWTUtils {
return MessageFormat.format(message, node.getLabelText());
}
}
-
+
/**
* Get the preference node with pageId.
- *
+ *
* @param pageId
* @return IPreferenceNode
*/
@@ -87,11 +87,11 @@ public class SWTUtils {
return null;
}
-
+
public static GridData createGridData(int width, int height, boolean hFill, boolean vFill) {
return createGridData(width, height, hFill ? SWT.FILL : SWT.BEGINNING, vFill ? SWT.FILL : SWT.CENTER, hFill, vFill);
}
-
+
public static GridData createGridData(int width, int height, int hAlign, int vAlign, boolean hGrab, boolean vGrab) {
final GridData gd= new GridData(hAlign, vAlign, hGrab, vGrab);
gd.widthHint= width;
@@ -102,7 +102,7 @@ public class SWTUtils {
public static GridData createHFillGridData() {
return createHFillGridData(1);
}
-
+
public static GridData createHFillGridData(int span) {
final GridData gd= createGridData(0, SWT.DEFAULT, SWT.FILL, SWT.CENTER, true, false);
gd.horizontalSpan= span;
@@ -112,7 +112,7 @@ public class SWTUtils {
public static Composite createHFillComposite(Composite parent, int margins) {
return createHFillComposite(parent, margins, 1);
}
-
+
public static Composite createHFillComposite(Composite parent, int margins, int columns) {
final Composite composite= new Composite(parent, SWT.NONE);
composite.setFont(parent.getFont());
@@ -120,11 +120,11 @@ public class SWTUtils {
composite.setLayout(createGridLayout(columns, new PixelConverter(parent), margins));
return composite;
}
-
+
public static Composite createHVFillComposite(Composite parent, int margins) {
return createHVFillComposite(parent, margins, 1);
}
-
+
public static Composite createHVFillComposite(Composite parent, int margins, int columns) {
final Composite composite= new Composite(parent, SWT.NONE);
composite.setFont(parent.getFont());
@@ -133,15 +133,15 @@ public class SWTUtils {
return composite;
}
-
+
/**
* Groups
*/
-
+
public static Group createHFillGroup(Composite parent, String text, int margins) {
return createHFillGroup(parent, text, margins, 1);
}
-
+
public static Group createHFillGroup(Composite parent, String text, int margins, int rows) {
final Group group= new Group(parent, SWT.NONE);
group.setFont(parent.getFont());
@@ -151,11 +151,11 @@ public class SWTUtils {
group.setLayout(createGridLayout(rows, new PixelConverter(parent), margins));
return group;
}
-
+
public static Group createHVFillGroup(Composite parent, String text, int margins) {
return createHVFillGroup(parent, text, margins, 1);
}
-
+
public static Group createHVFillGroup(Composite parent, String text, int margins, int rows) {
final Group group= new Group(parent, SWT.NONE);
group.setFont(parent.getFont());
@@ -165,27 +165,27 @@ public class SWTUtils {
group.setLayout(createGridLayout(rows, new PixelConverter(parent), margins));
return group;
}
-
+
/**
* Grid data
*/
-
+
public static GridData createHVFillGridData() {
return createHVFillGridData(1);
}
-
+
public static GridData createHVFillGridData(int span) {
final GridData gd= createGridData(0, 0, true, true);
gd.horizontalSpan= span;
return gd;
}
-
+
/**
* Create a grid layout with the specified number of columns and the
* standard spacings.
- *
+ *
* @param numColumns
* the number of columns
* @param converter
@@ -197,11 +197,11 @@ public class SWTUtils {
*/
public static GridLayout createGridLayout(int numColumns, PixelConverter converter, int margins) {
Assert.isTrue(margins == MARGINS_DEFAULT || margins == MARGINS_NONE || margins == MARGINS_DIALOG);
-
+
final GridLayout layout= new GridLayout(numColumns, false);
layout.horizontalSpacing= converter.convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
layout.verticalSpacing= converter.convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
-
+
switch (margins) {
case MARGINS_NONE:
layout.marginLeft= layout.marginRight= 0;
@@ -218,8 +218,8 @@ public class SWTUtils {
layout.marginWidth= layout.marginHeight= 0;
return layout;
}
-
-
+
+
public static Label createLabel(Composite parent, String message) {
return createLabel(parent, message, 1);
}
@@ -231,7 +231,7 @@ public class SWTUtils {
label.setLayoutData(createHFillGridData(span));
return label;
}
-
+
public static Button createCheckBox(Composite parent, String message) {
return createCheckBox(parent, message, 1);
}
@@ -242,7 +242,7 @@ public class SWTUtils {
button.setLayoutData(createHFillGridData(span));
return button;
}
-
+
public static Button createRadioButton(Composite parent, String message) {
return createRadioButton(parent, message, 1);
}
@@ -254,7 +254,7 @@ public class SWTUtils {
return button;
}
-
+
public static Text createText(Composite parent) {
return createText(parent, 1);
}
@@ -264,7 +264,7 @@ public class SWTUtils {
text.setLayoutData(createHFillGridData(span));
return text;
}
-
+
public static Control createPlaceholder(Composite parent, int heightInChars, int span) {
Assert.isTrue(heightInChars > 0);
@@ -276,16 +276,16 @@ public class SWTUtils {
return placeHolder;
}
-
+
public static Control createPlaceholder(Composite parent, int heightInChars) {
return createPlaceholder(parent, heightInChars, 1);
}
-
+
public static PixelConverter createDialogPixelConverter(Control control) {
Dialog.applyDialogFont(control);
return new PixelConverter(control);
}
-
+
public static int calculateControlSize(PixelConverter converter, Control [] controls) {
return calculateControlSize(converter, controls, 0, controls.length - 1);
}
@@ -299,7 +299,7 @@ public class SWTUtils {
}
return minimum;
}
-
+
public static void equalizeControls(PixelConverter converter, Control [] controls) {
equalizeControls(converter, controls, 0, controls.length - 1);
}
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 a1c9ee92e..532033752 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
@@ -27,11 +27,11 @@ public abstract class StorageTypedElement implements ITypedElement, IEncodedStre
private IStorage bufferedContents;
private final String localEncoding;
private ISharedDocumentAdapter sharedDocumentAdapter;
-
+
public StorageTypedElement(String localEncoding){
this.localEncoding = localEncoding;
}
-
+
@Override
public InputStream getContents() throws CoreException {
if (bufferedContents == null) {
@@ -48,7 +48,7 @@ public abstract class StorageTypedElement implements ITypedElement, IEncodedStre
* This method should be invoked before {@link #getContents()}
* to ensure that a round trip is not made in that method.
* @param monitor a progress monitor.
- * @throws CoreException
+ * @throws CoreException
*/
public void cacheContents(IProgressMonitor monitor) throws CoreException {
bufferedContents = fetchContents(monitor);
@@ -69,7 +69,7 @@ public abstract class StorageTypedElement implements ITypedElement, IEncodedStre
public IStorage getBufferedStorage() {
return bufferedContents;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.ITypedElement#getImage()
*/
@@ -111,7 +111,7 @@ public abstract class StorageTypedElement implements ITypedElement, IEncodedStre
}
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
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 709852c1d..d03048d82 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
@@ -27,9 +27,9 @@ import org.eclipse.ui.model.IWorkbenchAdapter;
public class TeamAdapterFactory implements IAdapterFactory {
private DiffNodeWorkbenchAdapter diffNodeAdapter = new DiffNodeWorkbenchAdapter();
-
+
private static final ISynchronizationCompareAdapter COMPARE_ADAPTER = new ResourceModelPersistenceAdapter();
-
+
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
*/
@@ -56,7 +56,7 @@ public class TeamAdapterFactory implements IAdapterFactory {
RepositoryProviderType rpt = (RepositoryProviderType) adaptableObject;
return TeamUIPlugin.getPlugin().getDecoratedStateProvider(rpt);
}
-
+
if (IFileRevision.class == adapterType && adaptableObject instanceof FileRevisionEditorInput) {
return ((FileRevisionEditorInput)adaptableObject).getFileRevision();
}
@@ -68,9 +68,9 @@ public class TeamAdapterFactory implements IAdapterFactory {
*/
@Override
public Class[] getAdapterList() {
- return new Class[] {
+ return new Class[] {
IWorkbenchAdapter.class,
- IResourceMappingMerger.class,
+ IResourceMappingMerger.class,
ISynchronizationCompareAdapter.class,
ISynchronizationScopeParticipantFactory.class,
ITeamStateProvider.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 e4ac84343..ef831317f 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
@@ -26,11 +26,11 @@ import org.eclipse.ui.activities.*;
/**
* Utility class that manages promotion of team capabilities in response to workspace changes
* and existing repository providers.
- *
+ *
* @since 3.0
*/
public class TeamCapabilityHelper {
-
+
/**
* Mapping from repository provider id to IPluginContribution. Used for proper
* activity mapping of natures.
@@ -41,7 +41,7 @@ public class TeamCapabilityHelper {
* Singleton instance.
*/
private static TeamCapabilityHelper singleton;
-
+
/**
* Get the singleton instance of this class.
* @return the singleton instance of this class.
@@ -49,19 +49,19 @@ public class TeamCapabilityHelper {
*/
public static TeamCapabilityHelper getInstance() {
if (singleton == null) {
- singleton = new TeamCapabilityHelper();
+ singleton = new TeamCapabilityHelper();
}
return singleton;
}
-
+
/**
- * Create a new <code>IDEWorkbenchActivityHelper</code> which will listen
+ * Create a new <code>IDEWorkbenchActivityHelper</code> which will listen
* for workspace changes and promote activities accordingly.
*/
private TeamCapabilityHelper() {
providerIdToPluginId = new HashMap();
loadRepositoryProviderIds();
-
+
// crawl the initial projects
IProject [] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
IWorkbenchActivitySupport workbenchActivitySupport = PlatformUI.getWorkbench().getActivitySupport();
@@ -73,7 +73,7 @@ public class TeamCapabilityHelper {
}
}
}
-
+
/**
* Loads the list of registered provider types
*/
@@ -112,7 +112,7 @@ public class TeamCapabilityHelper {
/**
* Handle natures for the given project.
- *
+ *
* @param project the project
* @param workbenchActivitySupport the activity support
*/
@@ -125,7 +125,7 @@ public class TeamCapabilityHelper {
/**
* Helper method that enables the activities for the given repository provider.
- *
+ *
* @param id the repository provider id
* @param workbenchActivitySupport the activity support
*/
@@ -153,14 +153,14 @@ public class TeamCapabilityHelper {
* Returns the provider id for this project or <code>null</code> if no providers are mapped
* to this project. Note that this won't instantiate the provider, but instead will simply query
* the persistent property
- *
+ *
* @param project the project to query.
* @return the provider id for this project or <code>null</code> if no providers are mapped
* to this project
* @throws CoreException
*/
public String getProviderIdFor(IProject project) throws CoreException {
- if(project.isAccessible()) {
+ if(project.isAccessible()) {
//First, look for the session property
Object prop = project.getSessionProperty(TeamPlugin.PROVIDER_PROP_KEY);
if(prop != null && prop instanceof RepositoryProvider) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java
index aa1b79b24..099f642b5 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java
@@ -14,14 +14,14 @@ package org.eclipse.team.internal.ui;
import org.eclipse.osgi.util.NLS;
public class TeamUIMessages extends NLS {
-
+
private static final String BUNDLE_NAME = "org.eclipse.team.internal.ui.messages";//$NON-NLS-1$
static {
// load message values from bundle file
NLS.initializeMessages(BUNDLE_NAME, TeamUIMessages.class);
}
-
+
public static String ConfigureMultipleProjectsWizard_0;
public static String ConfigureMultipleProjectsWizard_1;
@@ -33,7 +33,7 @@ public class TeamUIMessages extends NLS {
public static String ProjectSelectionPage_2;
public static String TextPreferencePage_ExtensionNotCompleted;
-
+
public static String CompareInputChangeNotifier_0;
public static String CompareInputChangeNotifier_1;
@@ -109,7 +109,7 @@ public class TeamUIMessages extends NLS {
public static String ImportProjectSetMainPage_Project_Set_Url;
public static String ImportProjectSetMainPage_Browse;
-
+
public static String ImportProjectSetDialog_duplicatedWorkingSet_title;
public static String ImportProjectSetDialog_duplicatedWorkingSet_message;
public static String ImportProjectSetDialog_duplicatedWorkingSet_replace;
@@ -119,7 +119,7 @@ public class TeamUIMessages extends NLS {
public static String ImportProjectSetDialog_malformed_url;
public static String information;
-
+
public static String ConfigureProjectAction_configureProject;
public static String ConfigureProjectWizard_configureProject;
public static String ConfigureSynchronizeScheduleComposite_0;
@@ -162,15 +162,15 @@ public class TeamUIMessages extends NLS {
public static String LocalHistoryPage_NoRevisionsFound;
public static String LocalHistoryPage_OpenAction;
-
+
public static String LocalHistoryPage_OpenWithMenu;
-
+
public static String LocalHistoryPage_OpenWithMenu_Other;
-
+
public static String LocalHistoryPage_OpenWithMenu_OtherDialogDescription;
-
+
public static String LocalHistoryPage_OpenWithMenu_DefaultEditorDescription;
-
+
public static String LocalHistoryPage_OpenEditorError;
public static String LocalHistoryPage_OverwriteMessage;
@@ -584,19 +584,19 @@ public class TeamUIMessages extends NLS {
public static String nameAndRevision;
public static String internal;
-
+
public static String TeamCompareEditorInput_repository;
public static String TeamCompareEditorInput_titleAncestor;
public static String TeamCompareEditorInput_titleNoAncestor;
public static String TeamCompareEditorInput_titleNoAncestorDifferent;
public static String TeamCompareEditorInput_different;
-
+
public static String TeamCompareEditorInput_comparing;
public static String TeamCompareEditorInput_new;
public static String TeamCompareEditorInput_deleted;
-
+
public static String TeamCompareEditorInput_fileProgress;
-
+
public static String GenericHistoryView_Refresh;
public static String GenericHistoryView_GetDirectDescendents;
public static String GenericHistoryView_GetPredecessor;
@@ -627,8 +627,8 @@ public class TeamUIMessages extends NLS {
public static String ResourceMappingMergeOperation_3;
public static String ResourceMappingMergeOperation_4;
-
-
+
+
public static String GenericHistoryView_PinCurrentHistory;
public static String GenericHistoryView_0;
@@ -697,27 +697,27 @@ public class TeamUIMessages extends NLS {
public static String CompareFileRevisionEditorInput_2;
public static String SynchronizationCompareAdapter_0;
-
+
public static String HistoryPage_Today;
public static String HistoryPage_Yesterday;
public static String HistoryPage_ThisMonth;
public static String HistoryPage_Previous;
-
+
public static String OpenRevisionAction_DeletedRevTitle;
public static String OpenRevisionAction_ErrorTitle;
public static String OpenRevisionAction_ErrorMessage;
public static String OpenRevisionAction_DeletedRevMessage;
-
+
public static String CompareRevisionAction_DeleteCompareMessage;
public static String CompareRevisionAction_CompareWithCurrent;
public static String CompareRevisionAction_CompareWithOther;
public static String CompareRevisionAction_Revision;
public static String CompareRevisionAction_Local;
-
+
public static String TeamAction_errorTitle;
public static String TeamAction_handlerNotEnabledTitle;
public static String TeamAction_handlerNotEnabledMessage;
-
+
public static String SelectAncestorDialog_title;
public static String SelectAncestorDialog_message;
public static String SelectAncestorDialog_option;
@@ -732,7 +732,7 @@ public class TeamUIMessages extends NLS {
public static String PatchInaccessibleProjectsPage_selectExisting;
public static String PatchInaccessibleProjectsPage_deselectAll;
public static String PatchInaccessibleProjectsPage_openingProjects;
-
+
public static String IgnoreLeadingPathSegmentsDialog_title;
public static String IgnoreLeadingPathSegmentsDialog_message;
public static String IgnoreLeadingPathSegmentsDialog_notANumber;
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 53a5190ac..5f7e4ecf6 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
@@ -49,25 +49,25 @@ import org.osgi.framework.*;
public class TeamUIPlugin extends AbstractUIPlugin {
private static TeamUIPlugin instance;
-
+
// image paths
public static final String ICON_PATH = "$nl$/icons/full/"; //$NON-NLS-1$
-
+
public static final String ID = "org.eclipse.team.ui"; //$NON-NLS-1$
-
+
// plugin id
public static final String PLUGIN_ID = "org.eclipse.team.ui"; //$NON-NLS-1$
-
+
public static final String TRIGGER_POINT_ID = "org.eclipse.team.ui.activityTriggerPoint"; //$NON-NLS-1$
-
+
private static List propertyChangeListeners = new ArrayList(5);
-
+
private Hashtable imageDescriptors = new Hashtable(20);
-
+
private WorkspaceTeamStateProvider provider;
private Map decoratedStateProviders = new HashMap();
-
+
// manages synchronize participants
private SynchronizeManager synchronizeManager;
@@ -78,8 +78,8 @@ public class TeamUIPlugin extends AbstractUIPlugin {
* Value: <code>"org.eclipse.team.internal.ui.RemoveFromView"</code>
*/
public static final String REMOVE_FROM_VIEW_ACTION_ID = "org.eclipse.team.internal.ui.RemoveFromView"; //$NON-NLS-1$
-
-
+
+
/**
* Creates a new TeamUIPlugin.
*/
@@ -96,7 +96,7 @@ public class TeamUIPlugin extends AbstractUIPlugin {
* @param element the config element defining the extension
* @param classAttribute the name of the attribute carrying the class
* @return the extension object
- * @throws CoreException
+ * @throws CoreException
*/
public static Object createExtension(final IConfigurationElement element, final String classAttribute) throws CoreException {
// If plugin has been loaded create extension.
@@ -121,15 +121,15 @@ public class TeamUIPlugin extends AbstractUIPlugin {
throw exc[0];
else
return ret[0];
- }
+ }
}
-
+
/**
* Convenience method to get the currently active workbench page. Note that
* the active page may not be the one that the usr perceives as active in
* some situations so this method of obtaining the activae page should only
* be used if no other method is available.
- *
+ *
* @return the active workbench page
*/
public static IWorkbenchPage getActivePage() {
@@ -137,10 +137,10 @@ public class TeamUIPlugin extends AbstractUIPlugin {
if (window == null) return null;
return window.getActivePage();
}
-
+
/**
* Return the default instance of the receiver. This represents the runtime plugin.
- *
+ *
* @return the singleton plugin instance
*/
public static TeamUIPlugin getPlugin() {
@@ -162,11 +162,11 @@ public class TeamUIPlugin extends AbstractUIPlugin {
store.setDefault(IPreferenceIds.SYNCVIEW_DEFAULT_LAYOUT, IPreferenceIds.COMPRESSED_LAYOUT);
store.setDefault(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE, TeamSynchronizingPerspective.ID);
store.setDefault(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT, GlobalRefreshAction.NO_DEFAULT_PARTICPANT);
- store.setDefault(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID, GlobalRefreshAction.NO_DEFAULT_PARTICPANT);
+ store.setDefault(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID, GlobalRefreshAction.NO_DEFAULT_PARTICPANT);
store.setDefault(IPreferenceIds.SYNCHRONIZING_COMPLETE_PERSPECTIVE, MessageDialogWithToggle.PROMPT);
- store.setDefault(IPreferenceIds.SYNCVIEW_REMOVE_FROM_VIEW_NO_PROMPT, false);
+ store.setDefault(IPreferenceIds.SYNCVIEW_REMOVE_FROM_VIEW_NO_PROMPT, false);
store.setDefault(IPreferenceIds.PREF_WORKSPACE_FIRST_TIME, true);
-
+
// Convert the old compressed folder preference to the new layout preference
if (!store.isDefault(IPreferenceIds.SYNCVIEW_COMPRESS_FOLDERS) && !store.getBoolean(IPreferenceIds.SYNCVIEW_COMPRESS_FOLDERS)) {
// Set the compress folder preference to the default true) \
@@ -176,16 +176,16 @@ public class TeamUIPlugin extends AbstractUIPlugin {
store.setDefault(IPreferenceIds.SYNCVIEW_DEFAULT_LAYOUT, IPreferenceIds.TREE_LAYOUT);
}
}
-
+
/**
* Convenience method for logging statuses to the plugin log
- *
+ *
* @param status the status to log
*/
public static void log(IStatus status) {
getPlugin().getLog().log(status);
}
-
+
/**
* Convenience method for logging a TeamException in such a way that the
* stacktrace is logged as well.
@@ -195,11 +195,11 @@ public class TeamUIPlugin extends AbstractUIPlugin {
IStatus status = e.getStatus();
log (status.getSeverity(), status.getMessage(), e);
}
-
+
/**
* Log the given exception along with the provided message and severity
* indicator
- *
+ *
* @param severity
* the severity
* @param message
@@ -210,7 +210,7 @@ public class TeamUIPlugin extends AbstractUIPlugin {
public static void log(int severity, String message, Throwable e) {
log(new Status(severity, ID, 0, message, e));
}
-
+
/**
* @see Plugin#start(BundleContext)
*/
@@ -247,12 +247,12 @@ public class TeamUIPlugin extends AbstractUIPlugin {
};
capabilityInitializer.setSystem(true);
capabilityInitializer.setPriority(Job.DECORATE);
- capabilityInitializer.schedule(1000);
+ capabilityInitializer.schedule(1000);
}
-
+
StreamMergerDelegate.start();
}
-
+
/* (non-Javadoc)
* @see Plugin#stop(BundleContext)
*/
@@ -284,7 +284,7 @@ public class TeamUIPlugin extends AbstractUIPlugin {
public static void addPropertyChangeListener(IPropertyChangeListener listener) {
propertyChangeListeners.add(listener);
}
-
+
/**
* Deregister as a Team property changes.
* @param listener the listener to remove
@@ -292,21 +292,21 @@ public class TeamUIPlugin extends AbstractUIPlugin {
public static void removePropertyChangeListener(IPropertyChangeListener listener) {
propertyChangeListeners.remove(listener);
}
-
+
/**
* Broadcast a Team property change.
* @param event the property change event object
*/
public static void broadcastPropertyChange(PropertyChangeEvent event) {
for (Iterator it = propertyChangeListeners.iterator(); it.hasNext();) {
- IPropertyChangeListener listener = (IPropertyChangeListener)it.next();
+ IPropertyChangeListener listener = (IPropertyChangeListener)it.next();
listener.propertyChange(event);
}
}
-
+
/**
* Creates an image and places it in the image registry.
- *
+ *
* @param id the identifier for the image
* @param baseURL the base URL for the image
*/
@@ -318,11 +318,11 @@ public class TeamUIPlugin extends AbstractUIPlugin {
ImageDescriptor desc = ImageDescriptor.createFromURL(getImageUrl(id));
imageDescriptors.put(id, desc);
}
-
+
/**
* Returns the image descriptor for the given image ID.
* Returns null if there is no such image.
- *
+ *
* @param id the identifier for the image to retrieve
* @return the image associated with the given ID
*/
@@ -335,11 +335,11 @@ public class TeamUIPlugin extends AbstractUIPlugin {
createImageDescriptor(getPlugin(), id);
}
return (ImageDescriptor)imageDescriptors.get(id);
- }
+ }
/**
* Convenience method to get an image descriptor for an extension
- *
+ *
* @param extension the extension declaring the image
* @param subdirectoryAndFilename the path to the image
* @return the image
@@ -352,7 +352,7 @@ public class TeamUIPlugin extends AbstractUIPlugin {
* Initializes the table of images used in this plugin. The plugin is
* provided because this method is called before the plugin staic
* variable has been set. See the comment on the getPlugin() method
- * for a description of why this is required.
+ * for a description of why this is required.
*/
private void initializeImages(TeamUIPlugin plugin) {
// Overlays
@@ -363,10 +363,10 @@ public class TeamUIPlugin extends AbstractUIPlugin {
createImageDescriptor(plugin, ISharedImages.IMG_ERROR_OVR);
createImageDescriptor(plugin, ISharedImages.IMG_WARNING_OVR);
createImageDescriptor(plugin, ISharedImages.IMG_HOURGLASS_OVR);
-
+
// Target Management Icons
createImageDescriptor(plugin, ITeamUIImages.IMG_SITE_ELEMENT);
-
+
// Sync View Icons
createImageDescriptor(plugin, ITeamUIImages.IMG_DLG_SYNC_INCOMING);
createImageDescriptor(plugin, ITeamUIImages.IMG_DLG_SYNC_OUTGOING);
@@ -397,14 +397,14 @@ public class TeamUIPlugin extends AbstractUIPlugin {
// Wizard banners
createImageDescriptor(plugin, ITeamUIImages.IMG_PROJECTSET_IMPORT_BANNER);
- createImageDescriptor(plugin, ITeamUIImages.IMG_PROJECTSET_EXPORT_BANNER);
+ createImageDescriptor(plugin, ITeamUIImages.IMG_PROJECTSET_EXPORT_BANNER);
createImageDescriptor(plugin, ITeamUIImages.IMG_WIZBAN_SHARE);
-
+
// Live Sync View icons
createImageDescriptor(plugin, ITeamUIImages.IMG_COMPRESSED_FOLDER);
createImageDescriptor(plugin, ITeamUIImages.IMG_SYNC_VIEW);
- createImageDescriptor(plugin, ITeamUIImages.IMG_HIERARCHICAL);
-
+ createImageDescriptor(plugin, ITeamUIImages.IMG_HIERARCHICAL);
+
// Local History Page
createImageDescriptor(plugin, ITeamUIImages.IMG_DATES_CATEGORY);
createImageDescriptor(plugin, ITeamUIImages.IMG_COMPARE_VIEW);
@@ -419,7 +419,7 @@ public class TeamUIPlugin extends AbstractUIPlugin {
* Returns the standard display to be used. The method first checks, if the
* thread calling this method has an associated display. If so, this display
* is returned. Otherwise the method returns the display for this workbench.
- *
+ *
* @return the standard display to be used
*/
public static Display getStandardDisplay() {
@@ -429,7 +429,7 @@ public class TeamUIPlugin extends AbstractUIPlugin {
}
return display;
}
-
+
public Image getImage(String key) {
Image image = getImageRegistry().get(key);
if(image == null) {
@@ -439,7 +439,7 @@ public class TeamUIPlugin extends AbstractUIPlugin {
}
return image;
}
-
+
public static void run(IRunnableWithProgress runnable) {
try {
PlatformUI.getWorkbench().getActiveWorkbenchWindow().run(true, true, runnable);
@@ -466,11 +466,11 @@ public class TeamUIPlugin extends AbstractUIPlugin {
}
return null;
}
-
+
/**
- * Return a decorated state provider that delegates to the appropriate team
+ * Return a decorated state provider that delegates to the appropriate team
* provider.
- * @return a decorated state provider that delegates to the appropriate team
+ * @return a decorated state provider that delegates to the appropriate team
* provider
*/
public synchronized ITeamStateProvider getDecoratedStateProvider() {
@@ -478,7 +478,7 @@ public class TeamUIPlugin extends AbstractUIPlugin {
provider = new WorkspaceTeamStateProvider();
return provider;
}
-
+
public ISynchronizeManager getSynchronizeManager() {
if (synchronizeManager == null) {
synchronizeManager = new SynchronizeManager();
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 8f42ea7d0..556fb9d95 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
@@ -30,8 +30,8 @@ import org.eclipse.team.internal.ui.dialogs.PromptingDialog;
* The UI based context in which project serialization occurs.
* The class may be subclasses to represent different UI based serialization contexts.
* It is recommended that all UI based serialization contexts
- * use this class directly or indirectly as their superclass.
- *
+ * use this class directly or indirectly as their superclass.
+ *
* @since 3.0
*/
public class UIProjectSetSerializationContext extends ProjectSetSerializationContext {
@@ -43,7 +43,7 @@ public class UIProjectSetSerializationContext extends ProjectSetSerializationCon
/**
* Construct a new instance
- *
+ *
* @param shell The parent shell for this UI context
*/
public UIProjectSetSerializationContext(Shell shell, String filename) {
@@ -54,14 +54,14 @@ public class UIProjectSetSerializationContext extends ProjectSetSerializationCon
/**
* Answer the shell associated with this UI context.
- *
+ *
* @return the shell (not <code>null</code>)
*/
@Override
public Object getShell() {
return shell;
}
-
+
/**
* Given an array of projects that currently exist in the workspace
* prompt the user to determine which of those projects should be overwritten.
@@ -69,15 +69,15 @@ public class UIProjectSetSerializationContext extends ProjectSetSerializationCon
* This default implementation prompts the user
* to determine which projects should be overwritten.
* Subclasses may override this as appropriate.
- *
- * @param projects
+ *
+ * @param projects
* an array of projects currently existing in the workspace
* that are desired to be overwritten.
* (not <code>null</code>, contains no <code>null</code>s)
* @return
* an array of zero or more projects that should be overwritten
* or <code>null</code> if the operation is to be canceled
- *
+ *
* @see org.eclipse.team.core.ProjectSetSerializationContext#confirmOverwrite(org.eclipse.core.resources.IProject[])
*/
@Override
@@ -95,8 +95,8 @@ public class UIProjectSetSerializationContext extends ProjectSetSerializationCon
@Override
public String promptMessage(IResource resource) {
if (resource.exists())
- return NLS.bind(TeamUIMessages.UIProjectSetSerializationContext_0, new String[] { resource.getName() });
- return NLS.bind(TeamUIMessages.UIProjectSetSerializationContext_2, new String[] { resource.getName(), getTargetFile((IProject)resource).getAbsolutePath() });
+ return NLS.bind(TeamUIMessages.UIProjectSetSerializationContext_0, new String[] { resource.getName() });
+ return NLS.bind(TeamUIMessages.UIProjectSetSerializationContext_2, new String[] { resource.getName(), getTargetFile((IProject)resource).getAbsolutePath() });
}
public File getTargetFile(IProject project) {
return new File(project.getParent().getLocation().toFile(), project.getName());
@@ -107,7 +107,7 @@ public class UIProjectSetSerializationContext extends ProjectSetSerializationCon
(Shell)getShell(),
projects,
prompt,
- TeamUIMessages.UIProjectSetSerializationContext_1);
+ TeamUIMessages.UIProjectSetSerializationContext_1);
IResource[] resourcesToOverwrite;
try {
resourcesToOverwrite = dialog.promptForMultiple();
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 028c9a6e3..e1efde9c7 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
@@ -79,7 +79,7 @@ public class Utils {
* org.eclipse.compare.internal.Utilities
*/
public static boolean TESTING_FLUSH_ON_COMPARE_INPUT_CHANGE = false;
-
+
/**
* The SortOperation takes a collection of objects and returns a sorted
* collection of these objects. Concrete instances of this class provide
@@ -155,7 +155,7 @@ public class Utils {
return resource0.getFullPath().toString().compareTo(resource1.getFullPath().toString());
}
};
-
+
/**
* Shows the given errors to the user.
* @param shell
@@ -269,7 +269,7 @@ public class Utils {
public static Shell getShell(IWorkbenchSite site) {
return getShell(site, false);
}
-
+
public static Shell getShell(IWorkbenchSite site, boolean syncIfNecessary) {
if(site != null) {
Shell shell = site.getShell();
@@ -350,11 +350,11 @@ public class Utils {
public static void initAction(IAction a, String prefix) {
Utils.initAction(a, prefix, Policy.getActionBundle());
}
-
+
public static void initAction(IAction a, String prefix, ResourceBundle bundle) {
Utils.initAction(a, prefix, bundle, null);
}
-
+
public static void updateLabels(SyncInfo sync, CompareConfiguration config, IProgressMonitor monitor) {
final IResourceVariant remote = sync.getRemote();
final IResourceVariant base = sync.getBase();
@@ -411,7 +411,7 @@ public class Utils {
/**
* DO NOT REMOVE, used in a product.
- *
+ *
* @deprecated As of 3.5, replaced by
* {@link #updateLabels(SyncInfo, CompareConfiguration, IProgressMonitor)}
*/
@@ -563,7 +563,7 @@ public class Utils {
a.setImageDescriptor(id);
}
}
-
+
public static String getString(String key, ResourceBundle b) {
try {
return b.getString(key);
@@ -660,25 +660,25 @@ public class Utils {
TeamUIPlugin.log(new Status(IStatus.ERROR, TeamUIPlugin.ID, 0, "Error traversing resource mapping", e)); //$NON-NLS-1$
}
}
-
+
public static Object[] getNonResources(Object[] elements) {
List nonResources = new ArrayList();
getResources(elements, nonResources, false, false);
return nonResources.toArray();
}
-
+
public static IResource[] getResources(Object[] element) {
return getResources(element, null, false /* isContributed */, false /* includeMappingResources */);
}
-
+
public static IResource[] getContributedResources(Object[] elements) {
return getResources(elements, null, true /* isContributed */, true /* isIncudeMappings */);
}
-
+
public static <T> T getAdapter(Object element, Class<T> adapterType) {
return Adapters.adapt(element, adapterType, false);
}
-
+
/**
* Return whether any sync nodes in the given selection or their
* descendants match the given filter.
@@ -698,7 +698,7 @@ public class Utils {
}
return false;
}
-
+
private static boolean hasMatchingDescendant(ISynchronizeModelElement element, FastSyncInfoFilter filter) {
if (element.getKind() != SyncInfo.IN_SYNC && element instanceof SyncInfoModelElement) {
SyncInfo info = ((SyncInfoModelElement) element).getSyncInfo();
@@ -722,7 +722,7 @@ public class Utils {
* This method returns all out-of-sync SyncInfos that are in the current
* selection.
* @param selected the selected objects
- *
+ *
* @return the list of selected sync infos
*/
public static IDiffElement[] getDiffNodes(Object[] selected) {
@@ -735,7 +735,7 @@ public class Utils {
}
return (IDiffElement[]) result.toArray(new IDiffElement[result.size()]);
}
-
+
private static void collectAllNodes(IDiffElement element, Set nodes) {
if(element.getKind() != SyncInfo.IN_SYNC) {
nodes.add(element);
@@ -747,7 +747,7 @@ public class Utils {
}
}
}
-
+
public static void schedule(Job job, IWorkbenchSite site) {
if (site != null) {
IWorkbenchSiteProgressService siteProgress = (IWorkbenchSiteProgressService) site.getAdapter(IWorkbenchSiteProgressService.class);
@@ -758,7 +758,7 @@ public class Utils {
}
job.schedule();
}
-
+
public static byte[] readBytes(InputStream in) {
ByteArrayOutputStream bos= new ByteArrayOutputStream();
try {
@@ -768,10 +768,10 @@ public class Utils {
break;
bos.write(c);
}
-
+
} catch (IOException ex) {
return null;
-
+
} finally {
if (in != null) {
try {
@@ -788,7 +788,7 @@ public class Utils {
}
return bos.toByteArray();
}
-
+
public static boolean equalObject(Object o1, Object o2) {
if (o1 == null && o2 == null) return true;
if (o1 == null || o2 == null) return false;
@@ -798,7 +798,7 @@ public class Utils {
public static String getKey(String id, String secondaryId) {
return secondaryId == null ? id : id + '/' + secondaryId;
}
-
+
public static String convertSelection(IResource[] resources) {
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < resources.length; i++) {
@@ -808,7 +808,7 @@ public class Utils {
}
return buffer.toString();
}
-
+
/**
* Shorten the given text <code>t</code> so that its length
* doesn't exceed the given width. This implementation
@@ -832,7 +832,7 @@ public class Utils {
sb.append(textValue.substring(length - subStrLen - addtl));
return sb.toString();
}
-
+
public static String getTypeName(ISynchronizeParticipant participant) {
ISynchronizeManager manager = TeamUI.getSynchronizeManager();
return manager.getParticipantDescriptor(participant.getId()).getName();
@@ -851,7 +851,7 @@ public class Utils {
if (display.getThread() != Thread.currentThread ()) return false;
return true;
}
-
+
public static void asyncExec(final Runnable r, StructuredViewer v) {
if(v == null) return;
final Control ctrl = v.getControl();
@@ -885,7 +885,7 @@ public class Utils {
});
}
}
-
+
public static void asyncExec(final Runnable r, final Control ctrl) {
if (ctrl != null && !ctrl.isDisposed()) {
ctrl.getDisplay().asyncExec(new Runnable() {
@@ -926,7 +926,7 @@ public class Utils {
return mapping.getModelProvider();
return null;
}
-
+
public static IResource getResource(Object o) {
IResource resource = null;
if (o instanceof IResource) {
@@ -942,8 +942,8 @@ public class Utils {
}
return resource;
}
-
-
+
+
public static ResourceMapping getResourceMapping(Object o) {
if (o instanceof ResourceMapping) {
return (ResourceMapping) o;
@@ -989,7 +989,7 @@ public class Utils {
return adapter.getName(mapping);
return pathString;
}
-
+
public static String getLabel(ModelProvider provider) {
ResourceMapping mapping = Utils.getResourceMapping(provider);
if (mapping != null) {
@@ -1014,7 +1014,7 @@ public class Utils {
return shortenText(30, desc);
return NLS.bind(TeamUIMessages.Utils_18, new Integer(mappings.length));
}
-
+
public static String convertSelection(ResourceMapping[] mappings) {
StringBuffer buffer = new StringBuffer();
boolean hadOne = false;
@@ -1087,7 +1087,7 @@ public class Utils {
return part;
}
}
-
+
public static IEditorPart openEditor(IWorkbenchPage page,
FileRevisionEditorInput editorInput) throws PartInitException {
String id = getEditorId(editorInput);
@@ -1119,7 +1119,7 @@ public class Utils {
}
}
}
-
+
public static IEditorDescriptor[] getEditors(IFileRevision revision) {
String name= revision.getName();
IEditorRegistry registry = PlatformUI.getWorkbench()
@@ -1128,7 +1128,7 @@ public class Utils {
IEditorDescriptor[] editorDescs= registry.getEditors(name/* , getContentType(revision) */);
return IDE.overrideEditorAssociations(name, null, editorDescs);
}
-
+
public static IEditorDescriptor getDefaultEditor(IFileRevision revision) {
String name= revision.getName();
// so far only the revision name is used to find the default editor
@@ -1164,7 +1164,7 @@ public class Utils {
}
return type;
}
-
+
private static IContentType getContentType(String fileName, InputStream contents) {
IContentType type = null;
if (contents != null) {
@@ -1193,15 +1193,15 @@ public class Utils {
}
return id;
}
-
+
/**
* Returns an editor that can be re-used. An open compare editor that has
* un-saved changes cannot be re-used.
- *
+ *
* @param input
* the input being opened
* @param page
- * @param editorInputClasses
+ * @param editorInputClasses
* @return an EditorPart or <code>null</code> if none can be found
*/
public static IEditorPart findReusableCompareEditor(
@@ -1213,7 +1213,7 @@ public class Utils {
IEditorPart part = editorRefs[i].getEditor(false);
if (part != null && part instanceof IReusableEditor) {
for (int j = 0; j < editorInputClasses.length; j++) {
- // check if the editor input type
+ // check if the editor input type
// complies with the types given by the caller
if (editorInputClasses[j].isInstance(part.getEditorInput())
&& part.getEditorInput().equals(input))
@@ -1238,5 +1238,5 @@ public class Utils {
// no re-usable editor found
return null;
}
-
+
}
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 34130c202..7d54b087c 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
@@ -28,7 +28,7 @@ public class ApplyPatchAction extends TeamAction {
public boolean isEnabled() {
return true;
}
-
+
@Override
protected void execute(IAction action) throws InvocationTargetException,
InterruptedException {
@@ -45,14 +45,14 @@ public class ApplyPatchAction extends TeamAction {
TeamUIPlugin.log(e);
}
}
-
+
final ApplyPatchOperation op;
if (isPatch) {
op= new ApplyPatchOperation(getTargetPart(), (IFile)resource, null, new CompareConfiguration());
} else {
op= new ApplyPatchOperation(getTargetPart(), resource);
}
- BusyIndicator.showWhile(Display.getDefault(), op);
+ BusyIndicator.showWhile(Display.getDefault(), op);
}
}
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 33e55289f..72a0ad8c1 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
@@ -30,16 +30,16 @@ import org.eclipse.ui.*;
import org.eclipse.ui.actions.BaseSelectionListenerAction;
public class CompareRevisionAction extends BaseSelectionListenerAction {
-
+
HistoryPage page;
IStructuredSelection selection;
IFileRevision currentFileRevision;
-
+
public CompareRevisionAction(String text, HistoryPage page) {
super(text);
this.page = page;
}
-
+
public CompareRevisionAction(HistoryPage page) {
this(TeamUIMessages.LocalHistoryPage_CompareAction, page);
}
@@ -47,15 +47,15 @@ public class CompareRevisionAction extends BaseSelectionListenerAction {
@Override
public void run() {
IStructuredSelection structSel = selection;
-
+
if (structSel == null)
return;
-
+
Object[] objArray = structSel.toArray();
IFileRevision file1 = null;
IFileRevision file2 = null;
-
+
switch (structSel.size()){
case 1:
file1 = getCurrentFileRevision();
@@ -65,11 +65,11 @@ public class CompareRevisionAction extends BaseSelectionListenerAction {
else
return;
break;
-
+
case 2:
Object tempRevision2 = objArray[0];
Object tempRevision3 = objArray[1];
-
+
if (tempRevision2 instanceof IFileRevision &&
tempRevision3 instanceof IFileRevision){
file1 = (IFileRevision) objArray[0];
@@ -84,7 +84,7 @@ public class CompareRevisionAction extends BaseSelectionListenerAction {
MessageDialog.openError(page.getSite().getShell(), TeamUIMessages.OpenRevisionAction_DeletedRevTitle, TeamUIMessages.CompareRevisionAction_DeleteCompareMessage);
return;
}
-
+
IResource resource = getResource(file2);
if (resource != null) {
IFileRevision temp = file1;
@@ -99,7 +99,7 @@ public class CompareRevisionAction extends BaseSelectionListenerAction {
left = new FileRevisionTypedElement(file1, getLocalEncoding());
}
ITypedElement right = new FileRevisionTypedElement(file2, getLocalEncoding());
-
+
openInCompare(left, right);
}
@@ -165,14 +165,14 @@ public class CompareRevisionAction extends BaseSelectionListenerAction {
private IFileRevision getCurrentFileRevision() {
return currentFileRevision;
}
-
+
public void setCurrentFileRevision(IFileRevision fileRevision){
this.currentFileRevision = fileRevision;
}
/**
* DO NOT REMOVE, used in a product.
- *
+ *
* @deprecated As of 3.5, replaced by
* {@link Utils#findReusableCompareEditor(CompareEditorInput, IWorkbenchPage, Class[])}
*/
@@ -181,7 +181,7 @@ public class CompareRevisionAction extends BaseSelectionListenerAction {
return Utils.findReusableCompareEditor(null, workbenchPage,
new Class[] { CompareFileRevisionEditorInput.class });
}
-
+
@Override
protected boolean updateSelection(IStructuredSelection selection) {
this.selection = selection;
@@ -208,22 +208,22 @@ public class CompareRevisionAction extends BaseSelectionListenerAction {
private boolean shouldShow() {
IStructuredSelection structSel = selection;
Object[] objArray = structSel.toArray();
-
+
if (objArray.length == 0)
return false;
-
+
for (int i = 0; i < objArray.length; i++) {
-
+
//Don't bother showing if this a category
if (objArray[i] instanceof AbstractHistoryCategory)
return false;
-
+
IFileRevision revision = (IFileRevision) objArray[i];
//check to see if any of the selected revisions are deleted revisions
if (revision != null && !revision.exists())
return false;
}
-
+
return true;
}
}
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 08a58a801..b67450d5e 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
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.team.internal.ui.actions;
-
+
import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.resources.IProject;
@@ -27,7 +27,7 @@ import org.eclipse.team.internal.ui.wizards.ConfigureProjectWizard;
* configuration that is necessary.
*/
public class ConfigureProjectAction extends TeamAction {
-
+
@Override
protected void execute(IAction action) throws InvocationTargetException,
InterruptedException {
@@ -35,7 +35,7 @@ public class ConfigureProjectAction extends TeamAction {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
- if (!isEnabled())
+ if (!isEnabled())
return;
IProject[] projects = getSelectedProjects();
ConfigureProjectWizard.shareProjects(getShell(), projects);
@@ -43,9 +43,9 @@ public class ConfigureProjectAction extends TeamAction {
throw new InvocationTargetException(e);
}
}
- }, TeamUIMessages.ConfigureProjectAction_configureProject, PROGRESS_BUSYCURSOR);
+ }, TeamUIMessages.ConfigureProjectAction_configureProject, PROGRESS_BUSYCURSOR);
}
-
+
/**
* @see TeamAction#isEnabled()
*/
@@ -55,8 +55,8 @@ public class ConfigureProjectAction extends TeamAction {
for (int i = 0; i < selectedProjects.length; i++) {
IProject project = selectedProjects[i];
if (!project.isAccessible()) return false;
- if (RepositoryProvider.isShared(project)) return false;
- }
+ if (RepositoryProvider.isShared(project)) return false;
+ }
return selectedProjects.length > 0;
}
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ITeamRunnableContext.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ITeamRunnableContext.java
index 15dc3557c..dee119be5 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ITeamRunnableContext.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ITeamRunnableContext.java
@@ -22,7 +22,7 @@ import org.eclipse.jface.operation.IRunnableWithProgress;
* 3) what shell the operation should use to display info to the user
*/
public interface ITeamRunnableContext {
-
+
/**
* Run the given runnable in the context of the receiver. By default, the
* progress is provided by the active workbench windows but subclasses may
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 16f013868..f11ed25ca 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
@@ -46,7 +46,7 @@ public class ImportProjectSetAction extends ActionDelegate implements IObjectAct
if (isRunInBackgroundPreferenceOn()) {
ImportProjectSetOperation op = new ImportProjectSetOperation(null, file.getLocation().toString(), new IWorkingSet[0]);
op.run();
- } else {
+ } else {
ProjectSetImporter.importProjectSet(file.getLocation().toString(), shell, monitor);
}
}
@@ -78,5 +78,5 @@ public class ImportProjectSetAction extends ActionDelegate implements IObjectAct
return TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(
IPreferenceIds.RUN_IMPORT_IN_BACKGROUND);
}
-
+
}
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 b07f8bb5d..087b82e32 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
@@ -30,7 +30,7 @@ public class JobRunnableContext implements ITeamRunnableContext {
private String jobName;
private ISchedulingRule schedulingRule;
private boolean postponeBuild;
-
+
/*
* Interface that provides access to the runnable of the job so
* that subclasses can do belongsTo family checking.
@@ -38,7 +38,7 @@ public class JobRunnableContext implements ITeamRunnableContext {
public interface IContextJob {
IRunnableWithProgress getRunnable();
}
-
+
/*
* Class that provides a basic job (i.e. no resource specific interactions)
*/
@@ -61,7 +61,7 @@ public class JobRunnableContext implements ITeamRunnableContext {
return runnable;
}
}
-
+
/*
* Class that provides a resource job (i.e. resource specific interactions)
*/
@@ -107,7 +107,7 @@ public class JobRunnableContext implements ITeamRunnableContext {
configureJob(job);
Utils.schedule(job, site);
}
-
+
/**
* Configure the job. By default, the job is configured to be a user
* job meaning that it will make use of the progress service.
@@ -120,7 +120,7 @@ public class JobRunnableContext implements ITeamRunnableContext {
}
job.setUser(isUser());
}
-
+
/**
* Set whether the auto-build will be postponed while this
* context is executing a runnable.
@@ -129,14 +129,14 @@ public class JobRunnableContext implements ITeamRunnableContext {
public void setPostponeBuild(boolean postponeBuild) {
this.postponeBuild = postponeBuild;
}
-
+
/**
* Return whether this job context is user initiated. Subclasses may override.
*/
protected boolean isUser() {
return true;
}
-
+
/**
* Set the scheduling rule that will be obtained before the context
* executes a runnable or <code>null</code> if no scheduling rule is to be onbtained.
@@ -145,7 +145,7 @@ public class JobRunnableContext implements ITeamRunnableContext {
public void setSchedulingRule(ISchedulingRule schedulingRule) {
this.schedulingRule = schedulingRule;
}
-
+
/* private */ IStatus run(IRunnableWithProgress runnable, IProgressMonitor monitor) {
try {
runnable.run(monitor);
@@ -156,7 +156,7 @@ public class JobRunnableContext implements ITeamRunnableContext {
}
return getCompletionStatus();
}
-
+
/**
* Return the completions status for the job.
* By default, <code>Status.OK_STATUS</code>
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 58355bf53..890509257 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
@@ -31,7 +31,7 @@ public class OpenRevisionAction extends BaseSelectionListenerAction {
private IStructuredSelection selection;
private HistoryPage page;
-
+
public OpenRevisionAction(String text, HistoryPage page) {
super(text);
this.page = page;
@@ -79,31 +79,31 @@ public class OpenRevisionAction extends BaseSelectionListenerAction {
}
}
-
+
@Override
protected boolean updateSelection(IStructuredSelection selection) {
this.selection = selection;
return shouldShow();
}
-
+
private boolean shouldShow() {
IStructuredSelection structSel = selection;
Object[] objArray = structSel.toArray();
-
+
if (objArray.length == 0)
return false;
-
+
for (int i = 0; i < objArray.length; i++) {
//Don't bother showing if this a category
if (objArray[i] instanceof AbstractHistoryCategory)
return false;
-
+
IFileRevision revision = (IFileRevision) objArray[i];
//check to see if any of the selected revisions are deleted revisions
if (revision != null && !revision.exists())
return false;
}
-
+
return true;
}
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 eecac58e0..83b2225f1 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
@@ -86,7 +86,7 @@ public class OpenWithMenu extends ContributionItem {
/**
* Constructs a new instance of <code>OpenWithMenu</code>.
- *
+ *
* @param page
* the page where the editor is opened if an item within the menu
* is selected
@@ -98,7 +98,7 @@ public class OpenWithMenu extends ContributionItem {
/**
* Returns an image to show for the corresponding editor descriptor.
- *
+ *
* @param editorDesc
* the editor descriptor, or null for the system editor
* @return the image or null
@@ -143,7 +143,7 @@ public class OpenWithMenu extends ContributionItem {
/**
* Creates the menu item for the editor descriptor.
- *
+ *
* @param menu
* the menu to add the item to
* @param descriptor
@@ -182,7 +182,7 @@ public class OpenWithMenu extends ContributionItem {
/**
* Creates the Other... menu item
- *
+ *
* @param menu
* the menu to add the item to
*/
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 a9793e451..1458fe4f0 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
@@ -31,10 +31,10 @@ public class ProgressDialogRunnableContext implements ITeamRunnableContext {
private IRunnableContext runnableContext;
private ISchedulingRule schedulingRule;
private boolean postponeBuild;
-
+
public ProgressDialogRunnableContext() {
}
-
+
/**
* Set whether the auto-build will be postponed while this
* context is executing a runnable.
@@ -43,7 +43,7 @@ public class ProgressDialogRunnableContext implements ITeamRunnableContext {
public void setPostponeBuild(boolean postponeBuild) {
this.postponeBuild = postponeBuild;
}
-
+
/**
* Set the scheduling rule that will be obtained before the context
* executes a runnable or <code>null</code> if no scheduling rule is to be onbtained.
@@ -61,7 +61,7 @@ public class ProgressDialogRunnableContext implements ITeamRunnableContext {
public void setRunnableContext(IRunnableContext runnableContext) {
this.runnableContext = runnableContext;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.actions.ITeamRunnableContext#run(org.eclipse.jface.operation.IRunnableWithProgress)
*/
@@ -113,7 +113,7 @@ public class ProgressDialogRunnableContext implements ITeamRunnableContext {
if (exception[0] instanceof InvocationTargetException) {
throw (InvocationTargetException)exception[0];
} else if (exception[0] instanceof InterruptedException) {
- throw (InterruptedException)exception[0];
+ throw (InterruptedException)exception[0];
}
}
}
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 b42d57d6d..17cdc6ee6 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
@@ -39,15 +39,15 @@ import org.eclipse.ui.ide.ResourceUtil;
* The abstract superclass of all Team actions. This class contains some convenience
* methods for getting selected objects and mapping selected objects to their
* providers.
- *
+ *
* Team providers may subclass this class when creating their actions.
- * Team providers may also instantiate or subclass any of the
+ * Team providers may also instantiate or subclass any of the
* subclasses of TeamAction provided in this package.
*/
public abstract class TeamAction extends AbstractHandler implements IObjectActionDelegate, IViewActionDelegate, IWorkbenchWindowActionDelegate, IActionDelegate2 {
// The current selection
private IStructuredSelection selection;
-
+
// The shell, required for the progress dialog
private Shell shell;
@@ -94,19 +94,19 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
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;
+ TeamAction.this.selection = (IStructuredSelection)selection;
}
};
/**
* Creates an array of the given class type containing all the
* objects in the selection that adapt to the given class.
- *
+ *
* @param selection
* @param c
* @return the selected adaptables
@@ -128,12 +128,12 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
}
return (Object[])Array.newInstance(c, 0);
}
-
+
/**
* Find the object associated with the given object when it is adapted to
* the provided class. Null is returned if the given object does not adapt
* to the given class
- *
+ *
* @param adaptable
* @param c
* @return Object
@@ -151,10 +151,10 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
}
return null;
}
-
+
/**
* Returns the selected projects.
- *
+ *
* @return the selected projects
*/
protected IProject[] getSelectedProjects() {
@@ -169,36 +169,36 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
}
return (IProject[]) projects.toArray(new IProject[projects.size()]);
}
-
+
/**
* Returns an array of the given class type c that contains all
* instances of c that are either contained in the selection or
* are adapted from objects contained in the selection.
- *
+ *
* @param c
* @return the selection adapted to the given class
*/
protected Object[] getAdaptedSelection(Class c) {
return getSelectedAdaptables(selection, c);
}
-
+
/**
* Returns the selected resources.
- *
+ *
* @return the selected resources
*/
protected IResource[] getSelectedResources() {
return Utils.getContributedResources(getSelection().toArray());
}
-
+
protected IStructuredSelection getSelection() {
if (selection == null)
selection = StructuredSelection.EMPTY;
return selection;
}
-
+
/**
- * Return the selected resource mappins that contain resources in
+ * Return the selected resource mappins that contain resources in
* projects that are associated with a repository of the given id.
* @param providerId the repository provider id
* @return the resource mappings that contain resources associated with the given provider
@@ -224,7 +224,7 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
return object;
return Utils.getResourceMapping(object);
}
-
+
private boolean isMappedToProvider(ResourceMapping element, String providerId) {
IProject[] projects = element.getProjects();
for (int k = 0; k < projects.length; k++) {
@@ -236,10 +236,10 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
}
return false;
}
-
+
/**
* Convenience method for getting the current shell.
- *
+ *
* @return the shell
*/
protected Shell getShell() {
@@ -260,7 +260,7 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
/**
* Convenience method for running an operation with progress and
* error feedback.
- *
+ *
* @param runnable the runnable which executes the operation
* @param problemMessage the message to display in the case of errors
* @param progressKind one of PROGRESS_BUSYCURSOR or PROGRESS_DIALOG
@@ -297,7 +297,7 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
handle(exceptions[0], null, problemMessage);
}
}
-
+
/*
* Method declared on IActionDelegate.
*/
@@ -310,20 +310,20 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
}
}
}
-
+
/**
- * Method invoked from <code>selectionChanged(IAction, ISelection)</code>
- * to set the enablement status of the action. The instance variable
+ * Method invoked from <code>selectionChanged(IAction, ISelection)</code>
+ * to set the enablement status of the action. The instance variable
* <code>selection</code> will contain the latest selection so the methods
* <code>getSelectedResources()</code> and <code>getSelectedProjects()</code>
* will provide the proper objects.
- *
+ *
* This method can be overridden by subclasses but should not be invoked by them.
*/
protected void setActionEnablement(IAction action) {
action.setEnabled(isEnabled());
}
-
+
/**
* If an exception occurs during enablement testing, this method is invoked
* to determine if the action should be enabled or not.
@@ -339,7 +339,7 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
TeamPlugin.log(exception);
return false;
}
-
+
/*
* Method declared on IObjectActionDelegate.
*/
@@ -352,7 +352,7 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
}
/**
* Shows the given errors to the user.
- *
+ *
* @param exception the status containing the error
* @param title the title of the error dialog
* @param message the message for the error dialog
@@ -360,12 +360,12 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
protected void handle(Exception exception, String title, String message) {
Utils.handleError(getShell(), exception, title, message);
}
-
+
/**
* Convenience method that maps the given resources to their providers.
* The returned Hashtable has keys which are ITeamProviders, and values
* which are Lists of IResources that are shared with that provider.
- *
+ *
* @return a hashtable mapping providers to their resources
*/
protected Hashtable getProviderMapping(IResource[] resources) {
@@ -381,7 +381,7 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
}
return result;
}
-
+
/**
* @return IWorkbenchPart
*/
@@ -404,11 +404,11 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
if (getTargetPart() == null) return TeamUIPlugin.getActivePage();
return getTargetPart().getSite().getPage();
}
-
+
/**
* Show the view with the given ID in the perspective from which the action
* was executed. Returns null if the view is not registered.
- *
+ *
* @param viewId
* @return IViewPart
*/
@@ -419,7 +419,7 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
return null;
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
*/
@@ -430,19 +430,19 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
this.targetPart = view;
}
}
-
+
@Override
public void init(IWorkbenchWindow window) {
this.window = window;
- this.shell = window.getShell();
+ this.shell = window.getShell();
window.getSelectionService().addPostSelectionListener(selectionListener);
window.getActivePage().addPartListener(targetPartListener);
}
-
+
public IWorkbenchWindow getWindow() {
return window;
}
-
+
@Override
public void dispose() {
super.dispose();
@@ -489,7 +489,7 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
try {
execute(activeWorkbenchWindow, part, selection);
} catch (InvocationTargetException e) {
- throw new ExecutionException(TeamUIMessages.TeamAction_errorTitle, e);
+ throw new ExecutionException(TeamUIMessages.TeamAction_errorTitle, e);
} catch (InterruptedException e) {
// Operation was canceled. Ignore
}
@@ -541,7 +541,7 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
/**
* This method can be overridden by subclasses but should not be invoked by
* them.
- *
+ *
* @param e
* Exception to handle
*/
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 ef58402d8..50448c53c 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
@@ -60,7 +60,7 @@ public class AdditionalMappingsDialog extends DetailsDialog {
Label seperator = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
seperator.setLayoutData(new GridData (GridData.FILL_HORIZONTAL));
}
-
+
/*
* Create a list that allows the selection of mappings via checkbox
*/
@@ -92,7 +92,7 @@ public class AdditionalMappingsDialog extends DetailsDialog {
});
}
}
-
+
@Override
protected Composite createDropDownDialogArea(Composite parent) {
// TODO Auto-generated method stub
@@ -104,7 +104,7 @@ public class AdditionalMappingsDialog extends DetailsDialog {
// TODO Auto-generated method stub
}
-
+
@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 a4601a26d..a10935c72 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
@@ -39,7 +39,7 @@ abstract public class DetailsDialog extends TrayDialog {
* The title of the dialog.
*/
private String title;
-
+
/**
* The error message
*/
@@ -54,12 +54,12 @@ abstract public class DetailsDialog extends TrayDialog {
* Indicates whether the error details viewer is currently created.
*/
private boolean detailsCreated = false;
-
+
/**
* The key for the image to be displayed (one of the image constants on Dialog)
*/
private String imageKey = null;
-
+
/**
* Creates a details pane dialog.
* Note that the dialog will have no visual representation (no widgets)
@@ -93,7 +93,7 @@ abstract public class DetailsDialog extends TrayDialog {
toggleDetailsArea();
} else {
super.buttonPressed(id);
- }
+ }
}
/* (non-Javadoc)
@@ -130,33 +130,33 @@ abstract public class DetailsDialog extends TrayDialog {
protected String getDetailsButtonLabelShow() {
return IDialogConstants.SHOW_DETAILS_LABEL;
}
-
+
protected String getDetailsButtonLabelHide() {
return IDialogConstants.HIDE_DETAILS_LABEL;
}
-
+
/* (non-Javadoc)
* Method declared on Dialog.
- * Creates and returns the contents of the upper part
+ * 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);
initializeDialogUnits(parent);
-
+
// create composite
Composite composite = (Composite)super.createDialogArea(parent);
if (!isMainGrabVertical()) {
composite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
}
-
+
String helpContextId = getHelpContextId();
if (helpContextId != null) {
PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, helpContextId);
}
-
+
// create image
String key = getImageKey();
Image image = null;
@@ -174,7 +174,7 @@ abstract public class DetailsDialog extends TrayDialog {
layout.numColumns = 2;
top.setLayout(layout);
top.setLayoutData(new GridData(GridData.FILL_BOTH));
-
+
// add the image to the left of the composite
Label label = new Label(top, 0);
image.setBackground(label.getBackground());
@@ -182,7 +182,7 @@ abstract public class DetailsDialog extends TrayDialog {
label.setLayoutData(new GridData(
GridData.HORIZONTAL_ALIGN_CENTER |
GridData.VERTICAL_ALIGN_BEGINNING));
-
+
// add a composite to the right to contain the custom components
Composite right = new Composite(top, SWT.NONE);
layout = new GridLayout();
@@ -196,7 +196,7 @@ abstract public class DetailsDialog extends TrayDialog {
} else {
createMainDialogArea(composite);
}
-
+
if(includeErrorMessage()) {
errorMessageLabel = new Label(composite, SWT.NONE);
errorMessageLabel.setLayoutData(new GridData(
@@ -204,11 +204,11 @@ abstract public class DetailsDialog extends TrayDialog {
GridData.HORIZONTAL_ALIGN_FILL));
errorMessageLabel.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_RED));
}
-
+
Dialog.applyDialogFont(parent);
return composite;
}
-
+
/**
* Return the help context id to be used for the dialog.
* This context Id will be registered by this class.
@@ -232,7 +232,7 @@ abstract public class DetailsDialog extends TrayDialog {
/**
* Creates the dialog's top composite
- *
+ *
* @param parent the parent composite
*/
abstract protected void createMainDialogArea(Composite parent);
@@ -244,7 +244,7 @@ abstract public class DetailsDialog extends TrayDialog {
* @return the drop-down list component
*/
abstract protected Composite createDropDownDialogArea(Composite parent);
-
+
/**
* Toggles the unfolding of the details area. This is triggered by
* the user pressing the details button.
@@ -252,7 +252,7 @@ abstract public class DetailsDialog extends TrayDialog {
private void toggleDetailsArea() {
Point windowSize = getShell().getSize();
Point oldSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
+
if (detailsCreated) {
detailsComposite.dispose();
detailsCreated = false;
@@ -264,10 +264,10 @@ abstract public class DetailsDialog extends TrayDialog {
}
Dialog.applyDialogFont(getContents());
Point newSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
+
getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
}
-
+
final protected void setErrorMessage(String error) {
if(errorMessageLabel != null) {
if(error == null || error.length() == 0) {
@@ -278,23 +278,23 @@ abstract public class DetailsDialog extends TrayDialog {
errorMessageLabel.update();
}
}
-
+
final protected void setPageComplete(boolean complete) {
if(okButton != null ) {
okButton.setEnabled(complete);
}
}
-
+
abstract protected void updateEnablements();
-
+
protected boolean includeCancelButton() {
return true;
}
-
+
protected boolean includeOkButton() {
return true;
}
-
+
/**
* Returns the imageKey.
* @return String
@@ -325,7 +325,7 @@ abstract public class DetailsDialog extends TrayDialog {
label.setFont(parent.getFont());
return label;
}
-
+
protected Composite createComposite(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
@@ -334,15 +334,15 @@ abstract public class DetailsDialog extends TrayDialog {
composite.setFont(parent.getFont());
return composite;
}
-
+
protected boolean isDetailsVisible() {
return detailsCreated;
}
-
+
protected boolean includeErrorMessage() {
return true;
}
-
+
protected boolean includeDetailsButton() {
return true;
}
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 0cdba2677..736eb8a43 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
@@ -21,7 +21,7 @@ import org.eclipse.swt.widgets.*;
* Display a message with a details that can contain a list of projects
*/
public class DetailsDialogWithProjects extends DetailsDialog {
-
+
private String message;
private String detailsTitle;
private IProject[] projects;
@@ -31,7 +31,7 @@ public class DetailsDialogWithProjects extends DetailsDialog {
/**
* Constructor for DetailsDialogWithProjects.
- *
+ *
* @param parentShell the parent shell
* @param dialogTitle the dialog title
* @param dialogMessage the dialog message
@@ -55,7 +55,7 @@ public class DetailsDialogWithProjects extends DetailsDialog {
@Override
protected void createMainDialogArea(Composite composite) {
Label label = new Label(composite, SWT.WRAP);
- label.setText(message);
+ label.setText(message);
GridData data = new GridData(SWT.FILL, SWT.FILL | SWT.CENTER, true, false);
data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
label.setLayoutData(data);
@@ -76,22 +76,22 @@ public class DetailsDialogWithProjects extends DetailsDialog {
layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
composite.setLayout(layout);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
+
if (detailsTitle != null) {
Label title = new Label(composite, SWT.WRAP);
title.setText(detailsTitle);
title.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
}
-
- detailsList = new org.eclipse.swt.widgets.List(composite, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData data = new GridData (SWT.FILL, SWT.FILL, true, true);
+
+ detailsList = new org.eclipse.swt.widgets.List(composite, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+ GridData data = new GridData (SWT.FILL, SWT.FILL, true, true);
data.heightHint = convertHeightInCharsToPixels(5);
detailsList.setLayoutData(data);
-
-
+
+
for (int i = 0; i < projects.length; i++) {
- detailsList.add(projects[i].getName());
- }
+ detailsList.add(projects[i].getName());
+ }
return composite;
}
@@ -110,7 +110,7 @@ public class DetailsDialogWithProjects extends DetailsDialog {
protected boolean includeCancelButton() {
return includeCancelButton;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#isMainGrabVertical()
* @since 3.4
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DialogArea.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DialogArea.java
index d15e07500..7b91a2d47 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DialogArea.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DialogArea.java
@@ -32,19 +32,19 @@ public abstract class DialogArea {
private FontMetrics fontMetrics;
private List listeners;
-
+
/**
* Create a dialog area
*/
protected DialogArea() {
this.listeners = new ArrayList();
}
-
+
/**
* Listener for property change events. The only event of interest is for
* property SELECTED_WORKING_SET which contains the selected working set or
* <code>null</code> if none is selected.
- *
+ *
* @param listener
*/
public void addPropertyChangeListener(IPropertyChangeListener listener) {
@@ -53,7 +53,7 @@ public abstract class DialogArea {
}
/**
* Remove the provided listener from the receiver.
- *
+ *
* @param listener
*/
public void removePropertyChangeListener(IPropertyChangeListener listener) {
@@ -67,13 +67,13 @@ public abstract class DialogArea {
listener.propertyChange(event);
}
}
-
+
/**
* Code copied from <code>org.eclipse.jface.dialogs.Dialog</code> to obtain
* a FontMetrics.
*
* @param control a control from which to obtain the current font
- *
+ *
* @see org.eclipse.jface.dialogs.Dialog
*/
protected void initializeDialogUnits(Control control) {
@@ -89,7 +89,7 @@ public abstract class DialogArea {
* @param parent
*/
public abstract void createArea(Composite parent);
-
+
protected Button createCheckbox(Composite parent, String label, int span) {
Button button = new Button(parent, SWT.CHECK | SWT.LEFT);
button.setText(label);
@@ -99,7 +99,7 @@ public abstract class DialogArea {
button.setLayoutData(data);
return button;
}
-
+
protected Button createButton(Composite parent, String label, int style) {
Button button = new Button(parent, SWT.PUSH);
button.setText(label);
@@ -153,13 +153,13 @@ public abstract class DialogArea {
final Composite composite = new Composite(parent, SWT.NULL);
final Font font = parent.getFont();
composite.setFont(font);
-
+
composite.setLayout(new GridLayout(numColumns, false));
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, grab, grab));
-
+
return composite;
}
-
+
/**
* Creates composite control and sets the default layout data.
*
@@ -171,7 +171,7 @@ public abstract class DialogArea {
Composite composite = new Composite(parent, SWT.NULL);
Font font = parent.getFont();
composite.setFont(font);
-
+
// GridLayout
GridLayout layout = new GridLayout();
layout.numColumns = numColumns;
@@ -188,11 +188,11 @@ public abstract class DialogArea {
composite.setLayoutData(data);
return composite;
}
-
+
protected int convertVerticalDLUsToPixels(int dlus) {
return Dialog.convertVerticalDLUsToPixels(fontMetrics, dlus);
}
-
+
protected int convertHorizontalDLUsToPixels(int dlus) {
return Dialog.convertHorizontalDLUsToPixels(fontMetrics, dlus);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IPromptCondition.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IPromptCondition.java
index b27c9bf75..7dbc9732f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IPromptCondition.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IPromptCondition.java
@@ -14,7 +14,7 @@ import org.eclipse.core.resources.IResource;
/**
* Input to a confirm prompt
- *
+ *
* @see PromptingDialog
*/
public interface IPromptCondition {
@@ -23,7 +23,7 @@ public interface IPromptCondition {
* false otherwise.
*/
public boolean needsPrompt(IResource resource);
-
+
/**
* Answers the message to include in the prompt.
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IResourceMappingResourceFilter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IResourceMappingResourceFilter.java
index 243bfc52a..ba207fbfa 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IResourceMappingResourceFilter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IResourceMappingResourceFilter.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -20,7 +20,7 @@ import org.eclipse.core.runtime.CoreException;
* inclusion in a view.
*/
public interface IResourceMappingResourceFilter {
-
+
/**
* Return whether the resource should be included in this filter.
* @param resource the resource
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 1e8e6f6b7..c11d6d2e1 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
@@ -18,7 +18,7 @@ import org.eclipse.swt.widgets.Shell;
/**
* This class provides a Yes/No prompter that can be used for multiple questions
* during the same operation. It can be used for a single prompt (in which case
- * OK and Cancel are presented) or multiple (in which case Yes, Yes to All, No
+ * OK and Cancel are presented) or multiple (in which case Yes, Yes to All, No
* and No to All are presented). It uses the previous selection as appropriate.
*/
public class MultipleYesNoPrompter {
@@ -32,7 +32,7 @@ public class MultipleYesNoPrompter {
private boolean hasMultiple;
private boolean allOrNothing;
private IShellProvider shellProvider;
-
+
/**
* Prompt for the given resources using the specific condition. The prompt dialog will
* have the title specified.
@@ -45,26 +45,26 @@ public class MultipleYesNoPrompter {
if (hasMultiple) {
if (allOrNothing) {
buttons = new String[] {
- IDialogConstants.YES_LABEL,
+ IDialogConstants.YES_LABEL,
IDialogConstants.YES_TO_ALL_LABEL,
IDialogConstants.CANCEL_LABEL};
} else {
buttons = new String[] {
- IDialogConstants.YES_LABEL,
- IDialogConstants.YES_TO_ALL_LABEL,
- IDialogConstants.NO_LABEL,
+ IDialogConstants.YES_LABEL,
+ IDialogConstants.YES_TO_ALL_LABEL,
+ IDialogConstants.NO_LABEL,
IDialogConstants.NO_TO_ALL_LABEL,
IDialogConstants.CANCEL_LABEL};
}
} else {
- buttons = new String[] {
+ buttons = new String[] {
IDialogConstants.YES_LABEL,
- IDialogConstants.NO_LABEL,
- IDialogConstants.CANCEL_LABEL
+ IDialogConstants.NO_LABEL,
+ IDialogConstants.CANCEL_LABEL
};
- }
+ }
}
-
+
/**
* Return whether the given resource should be included in the
* target set.
@@ -104,9 +104,9 @@ public class MultipleYesNoPrompter {
private boolean confirmOverwrite(String msg) throws InterruptedException {
Shell shell = shellProvider.getShell();
if (shell == null) return false;
- final MessageDialog dialog =
+ final MessageDialog dialog =
new MessageDialog(shell, title, null, msg, MessageDialog.QUESTION, buttons, 0);
-
+
// run in syncExec because callback is from an operation,
// which is probably not running in the UI thread.
shell.getDisplay().syncExec(
@@ -121,7 +121,7 @@ public class MultipleYesNoPrompter {
case 0://Yes
return true;
case 1://Yes to all
- confirmation = YES_TO_ALL;
+ confirmation = YES_TO_ALL;
return true;
case 2://No (or CANCEL for all-or-nothing)
if (allOrNothing) {
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 5ba61f86d..01a090fc1 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
@@ -26,7 +26,7 @@ public class NoChangesDialog extends DetailsDialog {
private ResourceMappingHierarchyArea selectedMappingsArea;
private final ISynchronizationScope scope;
private final String description;
-
+
public NoChangesDialog(Shell parentShell, String dialogTitle, String message, String description, ISynchronizationScope scope) {
super(parentShell, dialogTitle);
this.message = message;
@@ -38,7 +38,7 @@ public class NoChangesDialog extends DetailsDialog {
protected void initializeStyle() {
// Use the default dialog style
}
-
+
@Override
protected Composite createDropDownDialogArea(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
@@ -70,7 +70,7 @@ public class NoChangesDialog extends DetailsDialog {
protected void updateEnablements() {
// Nothing to do
}
-
+
/*
* Code copied from IconandMessageDialog
*/
@@ -98,7 +98,7 @@ public class NoChangesDialog extends DetailsDialog {
}
return composite;
}
-
+
/*
* Code copied from IconandMessageDialog
*/
@@ -129,12 +129,12 @@ public class NoChangesDialog extends DetailsDialog {
public boolean isHelpAvailable() {
return false;
}
-
+
@Override
protected boolean includeCancelButton() {
return false;
}
-
+
public static void open(Shell shell, String title, String message, String description, ISynchronizationScope scope) {
new NoChangesDialog(shell, title, message, description, scope).open();
}
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 a81fff0ac..bd3a5b3e5 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
@@ -29,24 +29,24 @@ import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
import org.eclipse.team.internal.ui.*;
-public class PreferencePageContainerDialog extends TrayDialog
+public class PreferencePageContainerDialog extends TrayDialog
implements IPreferencePageContainer, IPageChangeProvider {
private PreferencePage[] pages;
private PreferencePage currentPage;
-
+
private Composite fTitleArea;
private Label fTitleImage;
private CLabel fMessageLabel;
-
+
private String fMessage;
private Color fNormalMsgAreaBackground;
private Image fErrorMsgImage;
private Button fOkButton;
-
+
private ListenerList pageChangedListeners = new ListenerList();
-
+
/**
* The Composite in which a page is shown.
*/
@@ -60,7 +60,7 @@ public class PreferencePageContainerDialog extends TrayDialog
private Point fMinimumPageSize = new Point(200,200);
private TabFolder tabFolder;
private Map pageMap = new HashMap();
-
+
/**
* Must declare our own images as the JFaceResource images will not be created unless
* a property/preference dialog has been shown
@@ -72,12 +72,12 @@ public class PreferencePageContainerDialog extends TrayDialog
reg.put(PREF_DLG_TITLE_IMG, ImageDescriptor.createFromFile(PreferenceDialog.class, "images/pref_dialog_title.gif"));//$NON-NLS-1$
reg.put(PREF_DLG_IMG_TITLE_ERROR, ImageDescriptor.createFromFile(Dialog.class, "images/message_error.gif"));//$NON-NLS-1$
}
-
+
public PreferencePageContainerDialog(Shell shell, PreferencePage[] pages) {
super(shell);
this.pages = pages;
}
-
+
/**
* @see Dialog#okPressed()
*/
@@ -87,12 +87,12 @@ public class PreferencePageContainerDialog extends TrayDialog
PreferencePage page = pages[i];
page.performOk();
}
-
+
handleSave();
-
+
super.okPressed();
}
-
+
/**
* Sets the title for this dialog.
* @param title the title.
@@ -103,57 +103,57 @@ public class PreferencePageContainerDialog extends TrayDialog
shell.setText(title);
}
}
-
+
/**
* @see Dialog#createDialogArea(Composite)
*/
@Override
- protected Control createDialogArea(Composite parent) {
+ protected Control createDialogArea(Composite parent) {
Composite composite = (Composite)super.createDialogArea(parent);
((GridLayout) composite.getLayout()).numColumns = 1;
-
+
createDescriptionArea(composite);
-
+
if (isSinglePage()) {
createSinglePageArea(composite, pages[0]);
} else {
createMultiplePageArea(composite);
}
-
+
// Build the separator line
Label separator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
separator.setLayoutData(gd);
-
- setTitle(TeamUIMessages.PreferencePageContainerDialog_6);
+
+ setTitle(TeamUIMessages.PreferencePageContainerDialog_6);
applyDialogFont(parent);
-
+
composite.addHelpListener(new HelpListener(){
@Override
public void helpRequested(HelpEvent e) {
currentPage.performHelp();
}
-
+
});
-
+
return composite;
}
-
+
private void createMultiplePageArea(Composite composite) {
// create a tab folder for the page
tabFolder = new TabFolder(composite, SWT.NONE);
- tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
-
+ tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
+
for (int i = 0; i < pages.length; i++) {
PreferencePage page = pages[i];
// text decoration options
TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
- tabItem.setText(page.getTitle());//
+ tabItem.setText(page.getTitle());//
tabItem.setControl(createPageArea(tabFolder, page));
pageMap.put(tabItem, page);
}
-
+
tabFolder.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -205,9 +205,9 @@ public class PreferencePageContainerDialog extends TrayDialog
layout.horizontalSpacing = 0;
titleComposite.setLayout(layout);
titleComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
+
createMessageArea(titleComposite);
-
+
Label titleBarSeparator = new Label(titleComposite, SWT.HORIZONTAL | SWT.SEPARATOR);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
titleBarSeparator.setLayoutData(gd);
@@ -220,7 +220,7 @@ public class PreferencePageContainerDialog extends TrayDialog
* @return the created title area composite
*/
private Composite createMessageArea(Composite parent) {
-
+
// Create the title area which will contain
// a title, message, and image.
fTitleArea = new Composite(parent, SWT.NONE);
@@ -230,24 +230,24 @@ public class PreferencePageContainerDialog extends TrayDialog
layout.verticalSpacing = 0;
layout.horizontalSpacing = 0;
layout.numColumns = 2;
-
+
// Get the colors for the title area
Display display = parent.getDisplay();
Color bg = JFaceColors.getBannerBackground(display);
Color fg = JFaceColors.getBannerForeground(display);
-
+
GridData layoutData = new GridData(GridData.FILL_BOTH);
fTitleArea.setLayout(layout);
fTitleArea.setLayoutData(layoutData);
fTitleArea.setBackground(bg);
-
+
// Message label
fMessageLabel = new CLabel(fTitleArea, SWT.LEFT);
fMessageLabel.setBackground(bg);
fMessageLabel.setForeground(fg);
fMessageLabel.setText(" ");//$NON-NLS-1$
fMessageLabel.setFont(JFaceResources.getBannerFont());
-
+
final IPropertyChangeListener fontListener = new IPropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent event) {
@@ -257,24 +257,24 @@ public class PreferencePageContainerDialog extends TrayDialog
}
}
};
-
+
fMessageLabel.addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent event) {
JFaceResources.getFontRegistry().removeListener(fontListener);
}
});
-
+
JFaceResources.getFontRegistry().addListener(fontListener);
-
+
GridData gd = new GridData(GridData.FILL_BOTH);
fMessageLabel.setLayoutData(gd);
-
+
// Title image
fTitleImage = new Label(fTitleArea, SWT.LEFT);
fTitleImage.setBackground(bg);
fTitleImage.setImage(TeamUIPlugin.getPlugin().getImageRegistry().get(PREF_DLG_TITLE_IMG));
- gd = new GridData();
+ gd = new GridData();
gd.horizontalAlignment = GridData.END;
fTitleImage.setLayoutData(gd);
updateMessage();
@@ -303,7 +303,7 @@ public class PreferencePageContainerDialog extends TrayDialog
fMinimumPageSize.x = size.x;
fMinimumPageSize.y = size.y;
}
-
+
/**
* Display the given error message. The currently displayed message
* is saved and will be redisplayed when the error message is set
@@ -320,21 +320,21 @@ public class PreferencePageContainerDialog extends TrayDialog
fTitleImage.setImage(TeamUIPlugin.getPlugin().getImageRegistry().get(PREF_DLG_TITLE_IMG));
fTitleArea.layout(true);
}
-
+
// show the message
setMessage(fMessage);
-
+
} else {
fMessageLabel.setText(errorMessage);
if (fMessageLabel.getImage() == null) {
// we were not previously showing an error
-
+
// lazy initialize the error background color and image
if (fErrorMsgImage == null) {
fErrorMsgImage = TeamUIPlugin.getPlugin().getImageRegistry().get(PREF_DLG_IMG_TITLE_ERROR);
}
-
- // show the error
+
+ // show the error
fNormalMsgAreaBackground = fMessageLabel.getBackground();
fMessageLabel.setBackground(JFaceColors.getErrorBackground(fMessageLabel.getDisplay()));
fMessageLabel.setImage(fErrorMsgImage);
@@ -346,7 +346,7 @@ public class PreferencePageContainerDialog extends TrayDialog
/**
* Set the message text. If the message line currently displays an error,
* the message is stored and will be shown after a call to clearErrorMessage
- * @param newMessage
+ * @param newMessage
*/
public void setMessage(String newMessage) {
fMessage = newMessage;
@@ -358,7 +358,7 @@ public class PreferencePageContainerDialog extends TrayDialog
fMessageLabel.setText(fMessage);
}
}
-
+
/**
* @see IPreferencePageContainer#updateMessage()
*/
@@ -367,17 +367,17 @@ public class PreferencePageContainerDialog extends TrayDialog
if (currentPage != null) {
String pageMessage = currentPage.getMessage();
String pageErrorMessage = currentPage.getErrorMessage();
-
+
// Adjust the font
if (pageMessage == null && pageErrorMessage == null)
fMessageLabel.setFont(JFaceResources.getBannerFont());
else
fMessageLabel.setFont(JFaceResources.getDialogFont());
-
- // Set the message and error message
+
+ // Set the message and error message
if (pageMessage == null) {
if (isSinglePage()) {
- setMessage(TeamUIMessages.PreferencePageContainerDialog_6);
+ setMessage(TeamUIMessages.PreferencePageContainerDialog_6);
} else {
//remove mnemonic see bug 75886
String title = currentPage.getTitle();
@@ -390,7 +390,7 @@ public class PreferencePageContainerDialog extends TrayDialog
setErrorMessage(pageErrorMessage);
}
}
-
+
/**
* @see IPreferencePageContainer#getPreferenceStore()
*/
@@ -424,7 +424,7 @@ public class PreferencePageContainerDialog extends TrayDialog
public void updateTitle() {
updateMessage();
}
-
+
/**
* @see Dialog#createButtonsForButtonBar(Composite)
*/
@@ -433,7 +433,7 @@ public class PreferencePageContainerDialog extends TrayDialog
fOkButton= createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}
-
+
/**
* Save the values specified in the pages.
* <p>
@@ -456,13 +456,13 @@ public class PreferencePageContainerDialog extends TrayDialog
try {
((IPersistentPreferenceStore) store).save();
} catch (IOException e) {
- Utils.handle(e);
+ Utils.handle(e);
}
}
}
}
-
+
@Override
public void addPageChangedListener(final IPageChangedListener listener) {
pageChangedListeners.add(listener);
@@ -477,7 +477,7 @@ public class PreferencePageContainerDialog extends TrayDialog
public void removePageChangedListener(IPageChangedListener listener) {
pageChangedListeners.remove(listener);
}
-
+
private void firePageChanged(final PageChangedEvent event) {
Object[] listeners = pageChangedListeners.getListeners();
for (int i = 0; i < listeners.length; i++) {
@@ -490,6 +490,6 @@ public class PreferencePageContainerDialog extends TrayDialog
});
}
}
-
-
+
+
}
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 62a5a6289..622c24dd6 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
@@ -28,21 +28,21 @@ public class PromptingDialog extends MultipleYesNoPrompter {
/**
* Prompt for the given resources using the specific condition. The prompt dialog will
* have the title specified.
- * @param shell
- * @param resources
- * @param condition
- * @param title
+ * @param shell
+ * @param resources
+ * @param condition
+ * @param title
*/
public PromptingDialog(Shell shell, IResource[] resources, IPromptCondition condition, String title) {
- this(shell, resources, condition, title, false /* all or nothing */);
+ this(shell, resources, condition, title, false /* all or nothing */);
}
-
+
public PromptingDialog(final Shell shell, IResource[] resources, IPromptCondition condition, String title, boolean allOrNothing) {
- super(new IShellProvider() {
+ super(new IShellProvider() {
@Override
public Shell getShell() {
return shell;
- }
+ }
}, title, resources.length > 1, allOrNothing);
this.resources = resources;
this.condition = condition;
@@ -52,7 +52,7 @@ public class PromptingDialog extends MultipleYesNoPrompter {
* condition a dialog won't be shown. The resources for which the user
* confirmed the action are returned.
* @return the resources
- *
+ *
* @throws InterruptedException
* if the user choose to cancel on the prompt dialog
*/
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 7a2ab62db..62c90f101 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
@@ -33,12 +33,12 @@ public class ResourceMappingHierarchyArea extends DialogArea implements INavigat
private CommonViewer viewer;
private final ISynchronizationScope scope;
private final ISynchronizationContext context;
-
-
+
+
public static ResourceMappingHierarchyArea create(ISynchronizationScope scope, ISynchronizationContext context) {
return new ResourceMappingHierarchyArea(scope, context);
}
-
+
private ResourceMappingHierarchyArea(ISynchronizationScope scope, ISynchronizationContext context) {
this.scope = scope;
this.context = context;
@@ -52,10 +52,10 @@ public class ResourceMappingHierarchyArea extends DialogArea implements INavigat
layout.marginWidth = 0;
composite.setLayout(layout);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
+
if (description != null)
createWrappingLabel(composite, description, 1);
-
+
viewer = new CommonViewer(TEAM_NAVIGATOR_CONTENT, composite, SWT.BORDER);
viewer.setSorter(new CommonViewerSorter());
viewer.setSorter(new TeamViewerSorter((CommonViewerSorter)viewer.getSorter()));
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 e37779099..c8016d6e0 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
@@ -42,11 +42,11 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
private IResourceMappingResourceFilter filter;
private Map cachedFiltering = new HashMap(); // String(mapping)-> Map: Resource -> List(IResource)
private String message;
-
+
private static IWorkbenchAdapter getWorkbenchAdapter(IAdaptable o) {
return (IWorkbenchAdapter)o.getAdapter(IWorkbenchAdapter.class);
}
-
+
/**
* Return the label that should be used for the given mapping
* as determined using the IWorkbnchAdaptable for the mapping
@@ -69,7 +69,7 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
}
return workbenchAdapter.getLabel(o);
}
-
+
public class ResourceMappingElement implements IWorkbenchAdapter, IAdaptable {
private ResourceMapping mapping;
private ResourceMappingContext context;
@@ -78,7 +78,7 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
this.mapping = mapping;
this.context = context;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
*/
@@ -127,7 +127,7 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
*/
@Override
public String getLabel(Object o) {
- return ResourceMappingResourceDisplayArea.getLabel(mapping);
+ return ResourceMappingResourceDisplayArea.getLabel(mapping);
}
/* (non-Javadoc)
@@ -148,7 +148,7 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
return null;
}
}
-
+
/**
* The model element for resources that are obtained from a traversal.
*/
@@ -157,7 +157,7 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
private ResourceMappingContext context;
private IResource resource;
private Object parent;
-
+
public ResourceTraversalElement(Object parent, ResourceTraversal traversal, IResource resource, ResourceMappingContext context) {
this.parent = parent;
this.traversal = traversal;
@@ -185,7 +185,7 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
List result = new ArrayList();
for (int i = 0; i < members.length; i++) {
IResource child = members[i];
- if ((includeFolders || child.getType() == IResource.FILE)
+ if ((includeFolders || child.getType() == IResource.FILE)
&& isIncludedInFilter(child, traversal))
result.add(new ResourceTraversalElement(this, traversal, child, context));
}
@@ -199,12 +199,12 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
private IResource[] members(IContainer container) throws CoreException {
if (context instanceof RemoteResourceMappingContext) {
- RemoteResourceMappingContext remoteContext = (RemoteResourceMappingContext) context;
+ RemoteResourceMappingContext remoteContext = (RemoteResourceMappingContext) context;
return ResourceMappingResourceDisplayArea.members(container, remoteContext);
}
return container.members();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
*/
@@ -228,7 +228,7 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
return resource.getName();
return workbenchAdapter.getLabel(resource);
}
-
+
private boolean isTraversalRoot(IResource resource) {
return ResourceMappingResourceDisplayArea.isTraversalRoot(traversal, resource);
}
@@ -240,7 +240,7 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
public Object getParent(Object o) {
return parent;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
@@ -254,27 +254,27 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
return resource;
}
}
-
+
/**
- * Create a dialog area that will display the resources contained in the
+ * Create a dialog area that will display the resources contained in the
* given mapping
* @param mapping the mapping
- * @param filter the filter
- * @param string the message to display
+ * @param filter the filter
+ * @param string the message to display
*/
public ResourceMappingResourceDisplayArea(ResourceMapping mapping, String string, IResourceMappingResourceFilter filter) {
this.mapping = mapping;
this.filter = filter;
this.message = string;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.dialogs.DialogArea#createArea(org.eclipse.swt.widgets.Composite)
*/
@Override
public void createArea(Composite parent) {
Composite composite = createComposite(parent, 1, true);
-
+
label = createWrappingLabel(composite, message, 1);
viewer = new TreeViewer(composite);
GridData gridData = new GridData(GridData.FILL_BOTH);
@@ -314,7 +314,7 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
this.mapping = mapping;
setInput(labelText);
}
-
+
private boolean isIncludedInFilter(IResource resource, ResourceTraversal traversal) {
if (filter == null)
return true;
@@ -369,7 +369,7 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
return true;
}
});
-
+
}
});
} catch (InvocationTargetException e) {
@@ -379,7 +379,7 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
}
return result;
}
-
+
/* private */ static ResourceTraversal[] getTraversals(final ResourceMapping mapping, final ResourceMappingContext context) {
final List traversals = new ArrayList();
try {
@@ -401,7 +401,7 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
}
return new ResourceTraversal[0];
}
-
+
/* private */ static IResource[] members(final IContainer container, final RemoteResourceMappingContext context) {
final List members = new ArrayList();
try {
@@ -423,7 +423,7 @@ public class ResourceMappingResourceDisplayArea extends DialogArea {
}
return new IResource[0];
}
-
+
/* private */ static boolean isTraversalRoot(ResourceTraversal traversal, IResource resource) {
IResource[] resources = traversal.getResources();
for (int i = 0; i < resources.length; i++) {
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 df7862936..daa659a87 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -35,14 +35,14 @@ public class ResourceMappingSelectionArea extends DialogArea {
* The object associated with the property is a <code>ResourceMapping</code>.
*/
public static final String SELECTED_MAPPING = "SelectedMapping"; //$NON-NLS-1$
-
+
/**
* Property constant used to indicate that the checked mappings have changed.
* The object associated with the property is a <code>ResourceMapping[]</code>
* (i.e. an array of mappings).
*/
public static final String CHECKED_MAPPINGS = "CheckedMappings"; //$NON-NLS-1$
-
+
private ResourceMapping[] mappings;
private TableViewer viewer;
private ResourceMapping[] checkedMappings;
@@ -50,7 +50,7 @@ public class ResourceMappingSelectionArea extends DialogArea {
private String description;
private boolean supportsChecking;
private boolean supportsSelection;
-
+
public ResourceMappingSelectionArea(ResourceMapping[] mappings, boolean supportSelection, boolean supportChecking) {
this.mappings = mappings;
this.supportsChecking = supportChecking;
@@ -69,10 +69,10 @@ public class ResourceMappingSelectionArea extends DialogArea {
layout.verticalSpacing = 0;
layout.horizontalSpacing = 0;
composite.setLayout(layout);
-
+
if (description != null)
createWrappingLabel(composite, description, 1);
-
+
createViewer(composite);
GridData data = new GridData(GridData.FILL_BOTH);
data.heightHint = 100;
@@ -111,9 +111,9 @@ public class ResourceMappingSelectionArea extends DialogArea {
checkedMappings = mappings;
Composite buttons = createEmbeddedButtonComposite(composite);
-
+
Button selectAll = new Button(buttons, SWT.PUSH);
- selectAll.setText(TeamUIMessages.ResourceMappingSelectionArea_0);
+ selectAll.setText(TeamUIMessages.ResourceMappingSelectionArea_0);
selectAll.setLayoutData(new GridData(GridData.FILL_BOTH));
selectAll.addSelectionListener(new SelectionAdapter() {
@Override
@@ -121,9 +121,9 @@ public class ResourceMappingSelectionArea extends DialogArea {
checkboxViewer.setAllChecked(true);
}
});
-
+
Button deselectAll = new Button(buttons, SWT.PUSH);
- deselectAll.setText(TeamUIMessages.ResourceMappingSelectionArea_1);
+ deselectAll.setText(TeamUIMessages.ResourceMappingSelectionArea_1);
deselectAll.setLayoutData(new GridData(GridData.FILL_BOTH));
deselectAll.addSelectionListener(new SelectionAdapter() {
@Override
@@ -156,7 +156,7 @@ public class ResourceMappingSelectionArea extends DialogArea {
}
return mappings;
}
-
+
private Composite createEmbeddedButtonComposite(Composite composite) {
GridData data;
Composite buttons = new Composite(composite, SWT.NONE);
@@ -170,7 +170,7 @@ public class ResourceMappingSelectionArea extends DialogArea {
buttons.setLayoutData(data);
return buttons;
}
-
+
/* private */ ResourceMapping internalGetSelectedMapping() {
ISelection selection = viewer.getSelection();
if (selection instanceof IStructuredSelection) {
@@ -181,7 +181,7 @@ public class ResourceMappingSelectionArea extends DialogArea {
}
return null;
}
-
+
public void setDescription(String description) {
this.description = description;
}
@@ -191,7 +191,7 @@ public class ResourceMappingSelectionArea extends DialogArea {
public ResourceMapping getSelectedMapping() {
return selectedMapping;
}
-
+
private CheckboxTableViewer getCheckboxTableViewer() {
return (CheckboxTableViewer)viewer;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/AbstractHistoryCategory.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/AbstractHistoryCategory.java
index 46e5229fb..4ca6f8a43 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/AbstractHistoryCategory.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/AbstractHistoryCategory.java
@@ -15,10 +15,10 @@ import org.eclipse.team.core.history.IFileRevision;
public abstract class AbstractHistoryCategory {
-
+
/**
- * Returns the name of this category.
- * @return a string
+ * Returns the name of this category.
+ * @return a string
*/
abstract public String getName();
@@ -30,7 +30,7 @@ public abstract class AbstractHistoryCategory {
public Image getImage() {
return null;
}
-
+
/**
* Returns whether this category currently has any revisions associated with it.
* @return <code>true</code> if there are any revisions, <code>false</code> otherwise.
@@ -46,7 +46,7 @@ public abstract class AbstractHistoryCategory {
* @return <code>true</code> if any revisions match this category, <code>false</code> otherwise
*/
abstract public boolean collectFileRevisions(IFileRevision[] fileRevisions, boolean shouldRemove);
-
+
/**
* Returns the file revisions that are currently associated with this category or <code>null</code> if
* there are no file revisions associated with this category.
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 8e8ca79a6..d7350217f 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -28,10 +28,10 @@ import org.eclipse.team.ui.synchronize.SaveableCompareEditorInput;
import org.eclipse.ui.IWorkbenchPage;
public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
-
+
private ITypedElement left;
private ITypedElement right;
-
+
CompareInputChangeNotifier notifier = new CompareInputChangeNotifier() {
@Override
protected IResource[] getResources(ICompareInput input) {
@@ -41,7 +41,7 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
return new IResource[] { resource };
}
};
-
+
/*
* Returns <code>true</code> if the other object is of type
* <code>CompareFileRevisionEditorInput</code> and both of their
@@ -59,7 +59,7 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
}
return false;
}
-
+
public class MyDiffNode extends AbstractCompareInput {
public MyDiffNode(ITypedElement left, ITypedElement right) {
super(Differencer.CHANGE, null, left, right);
@@ -82,12 +82,12 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
fireChange();
}
}
-
+
/**
* Creates a new CompareFileRevisionEditorInput.
- * @param left
- * @param right
- * @param page
+ * @param left
+ * @param right
+ * @param page
*/
public CompareFileRevisionEditorInput(ITypedElement left, ITypedElement right, IWorkbenchPage page) {
super(new CompareConfiguration(), page);
@@ -140,7 +140,7 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
}
}
}
-
+
private boolean isLeftEditable(ICompareInput input) {
Object left = input.getLeft();
if (left instanceof IEditableContent) {
@@ -203,7 +203,7 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
IFileState state = ((LocalFileRevision) fileObject).getState();
if (state != null) {
return NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_localRevision, new Object[]{TextProcessor.process(element.getName()), element.getTimestamp()});
- }
+ }
} else {
if (Utils.isShowAuthor())
return NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_repository, new Object[] { element.getName(), element.getContentIdentifier(), element.getAuthor() });
@@ -222,9 +222,9 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
titleObject[0] = getLongName(left);
titleObject[1] = getContentIdentifier(getLeftRevision());
titleObject[2] = getContentIdentifier(getRightRevision());
- return NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_compareResourceAndVersions, titleObject);
+ return NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_compareResourceAndVersions, titleObject);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#getTitle()
*/
@@ -234,9 +234,9 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
titleObject[0] = getShortName(left);
titleObject[1] = getContentIdentifier(getLeftRevision());
titleObject[2] = getContentIdentifier(getRightRevision());
- return NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_compareResourceAndVersions, titleObject);
+ return NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_compareResourceAndVersions, titleObject);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#getAdapter(java.lang.Class)
*/
@@ -250,7 +250,7 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
}
return super.getAdapter(adapter);
}
-
+
private String getShortName(ITypedElement element) {
if (element instanceof FileRevisionTypedElement){
FileRevisionTypedElement fileRevisionElement = (FileRevisionTypedElement) element;
@@ -262,7 +262,7 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
}
return element.getName();
}
-
+
private String getLongName(ITypedElement element) {
if (element instanceof FileRevisionTypedElement){
FileRevisionTypedElement fileRevisionElement = (FileRevisionTypedElement) element;
@@ -274,7 +274,7 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
}
return element.getName();
}
-
+
private String getContentIdentifier(ITypedElement element){
if (element instanceof FileRevisionTypedElement){
FileRevisionTypedElement fileRevisionElement = (FileRevisionTypedElement) element;
@@ -314,7 +314,7 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
super.contentsCreated();
notifier.initialize();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SaveableCompareEditorInput#handleDispose()
*/
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 2e8613a04..846b75aed 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
@@ -18,7 +18,7 @@ public class CompareLocalHistory extends ShowLocalHistory {
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 67fc7400f..8a90f5ad9 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
@@ -16,16 +16,16 @@ import com.ibm.icu.util.Calendar;
import org.eclipse.team.core.history.IFileRevision;
public class DateHistoryCategory extends AbstractHistoryCategory {
-
+
private String name;
private Calendar fromDate;
private Calendar toDate;
-
+
private IFileRevision[] revisions;
-
+
/**
- * Creates a new instance of DateCVSHistoryCategory.
- *
+ * Creates a new instance of DateCVSHistoryCategory.
+ *
* @param name the name of this category
* @param fromDate the start date for this category or <code>null</code> if you want everything up to the end date
* @param toDate the end point for this category or <code>null</code> if you want just all entries in the
@@ -36,7 +36,7 @@ public class DateHistoryCategory extends AbstractHistoryCategory {
this.fromDate = fromDate;
this.toDate = toDate;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.AbstractCVSHistoryCategory#getName()
*/
@@ -50,18 +50,18 @@ public class DateHistoryCategory extends AbstractHistoryCategory {
*/
@Override
public boolean collectFileRevisions(IFileRevision[] fileRevisions, boolean shouldRemove) {
-
+
ArrayList pertinentRevisions = new ArrayList();
ArrayList nonPertinentRevisions = new ArrayList();
-
+
for (int i = 0; i < fileRevisions.length; i++) {
//get the current file revision's date
Calendar fileRevDate = Calendar.getInstance();
fileRevDate.setTimeInMillis(fileRevisions[i].getTimestamp());
-
+
int fileRevDay = fileRevDate.get(Calendar.DAY_OF_YEAR);
int fileRevYear = fileRevDate.get(Calendar.YEAR);
-
+
if (fromDate == null){
//check to see if this revision is within the toDate range
if (((fileRevDay<toDate.get(Calendar.DAY_OF_YEAR)) && (fileRevYear == toDate.get(Calendar.YEAR))) ||
@@ -90,23 +90,23 @@ public class DateHistoryCategory extends AbstractHistoryCategory {
} else {
nonPertinentRevisions.add(fileRevisions[i]);
}
- }
+ }
}
-
+
//check mode
if (shouldRemove){
//TODO: pass in an object containing the file revision arrays and modify the contents
/*IFileRevision[] tempRevision = (IFileRevision[]) nonPertinentRevisions.toArray(new IFileRevision[nonPertinentRevisions.size()]);
System.arraycopy(tempRevision, 0, fileRevisions, 0, tempRevision.length);*/
}
-
+
if (pertinentRevisions.size() > 0){
IFileRevision[] tempRevision = (IFileRevision[]) pertinentRevisions.toArray(new IFileRevision[pertinentRevisions.size()]);
revisions = new IFileRevision[tempRevision.length];
System.arraycopy(tempRevision, 0, revisions, 0, tempRevision.length);
return true;
}
-
+
return false;
}
@@ -125,7 +125,7 @@ public class DateHistoryCategory extends AbstractHistoryCategory {
public boolean hasRevisions() {
if (revisions != null && revisions.length > 0)
return true;
-
+
return false;
}
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 568cf4f84..c8cd0e121 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
@@ -22,11 +22,11 @@ public class DialogHistoryPageSite implements IHistoryPageSite {
private ISelectionProvider selectionProvider;
private final Shell shell;
private IToolBarManager toolBarManager;
-
+
public DialogHistoryPageSite(Shell shell) {
this.shell = shell;
}
-
+
@Override
public IPageSite getWorkbenchPageSite() {
return null;
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 4ed663e8b..b68b4888f 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
@@ -30,7 +30,7 @@ import org.eclipse.team.ui.history.*;
import org.eclipse.ui.IWorkbenchPage;
/**
- * A history page for a sub-element of a file.
+ * A history page for a sub-element of a file.
* <p>
* If the site is modal, the local edition is created up-front and destroyed when the page is destroyed.
* Otherwise, the local edition is only created when needed. The {@link #getCompareInput(Object)} and
@@ -38,7 +38,7 @@ import org.eclipse.ui.IWorkbenchPage;
* methods are only used when the site is modal so they can use the localEdition.
*/
public class EditionHistoryPage extends LocalHistoryPage {
-
+
private IFile file;
private Object element;
@@ -48,9 +48,9 @@ public class EditionHistoryPage extends LocalHistoryPage {
private Map editions = new HashMap();
private ITypedElement localEdition;
private String name;
-
+
class CompareEditionAction extends CompareRevisionAction {
-
+
public CompareEditionAction(HistoryPage page) {
super(page);
}
@@ -61,7 +61,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
return localFileElement;
return super.getElementFor(resource);
}
-
+
@Override
protected CompareFileRevisionEditorInput createCompareEditorInput(ITypedElement left, ITypedElement right, IWorkbenchPage page) {
ITypedElement leftEdition = getEdition(left);
@@ -82,7 +82,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
return null;
}
}
-
+
static class CompareEditionsEditorInput extends CompareFileRevisionEditorInput {
private final ITypedElement leftRevision;
@@ -99,7 +99,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
rightRevision = right;
this.leftIsLocal = leftIsLocal;
}
-
+
@Override
public LocalResourceTypedElement getLocalElement() {
if (leftRevision instanceof LocalResourceTypedElement) {
@@ -107,7 +107,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
}
return super.getLocalElement();
}
-
+
@Override
protected FileRevisionTypedElement getRightRevision() {
if (rightRevision instanceof FileRevisionTypedElement) {
@@ -129,7 +129,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
return null;
return super.getAdapter(adapter);
}
-
+
@Override
protected void handleDispose() {
if (leftIsLocal && structureCreator != null)
@@ -138,7 +138,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
super.handleDispose();
}
}
-
+
public static ITypedElement getPreviousState(IFile file, Object element) throws TeamException {
LocalResourceTypedElement localFileElement= new LocalResourceTypedElement(file);
IStructureCreator structureCreator = CompareUI.createStructureCreator(localFileElement);
@@ -166,7 +166,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
}
return null;
}
-
+
public EditionHistoryPage(IFile file, Object element) {
super(ON | ALWAYS);
setInput(file, element);
@@ -189,7 +189,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
localEdition = createLocalEdition(structureCreator, localFileElement, element);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.history.LocalHistoryPage#getFile()
*/
@@ -244,7 +244,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
}
return (IFileRevision[]) result.toArray(new IFileRevision[result.size()]);
}
-
+
private static void sortDescending(IFileRevision[] revisions) {
Arrays.sort(revisions, new Comparator() {
@Override
@@ -284,7 +284,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
public ITypedElement getEditionFor(Object object) {
return (ITypedElement)editions.get(object);
}
-
+
private static ITypedElement createLocalEdition(IStructureCreator creator, ITypedElement input, Object element) {
if (creator == null)
return null;
@@ -302,11 +302,11 @@ public class EditionHistoryPage extends LocalHistoryPage {
}
return result;
}
-
+
private ITypedElement createEdition(ITypedElement input) {
return createEdition(structureCreator, element, input);
}
-
+
private static ITypedElement createEdition(IStructureCreator creator, Object element, ITypedElement input) {
if (creator == null)
return null;
@@ -315,7 +315,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
return (ITypedElement) edition;
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.history.LocalHistoryPage#isValidInput(java.lang.Object)
*/
@@ -324,7 +324,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
// This page doesn't support input changes
return object.equals(element);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.history.LocalHistoryPage#dispose()
*/
@@ -336,7 +336,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
super.dispose();
}
}
-
+
private void disconnect() {
if (localFileElement != null)
localFileElement.discardBuffer();
@@ -351,7 +351,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
sc2.destroy(te);
}
}
-
+
private static void destroyLocalEdition(
IStructureCreator structureCreator, LocalResourceTypedElement localFileElement, ITypedElement localEdition) {
if (localFileElement != null)
@@ -361,7 +361,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
sc2.destroy(localEdition);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.history.LocalHistoryPage#getNoChangesMessage()
*/
@@ -371,7 +371,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
return NLS.bind(TeamUIMessages.EditionHistoryPage_0, name);
return TeamUIMessages.EditionHistoryPage_1;
}
-
+
@Override
protected Image getImage(Object object) {
if (object == localEdition)
@@ -381,7 +381,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
return super.getImage(revision);
return super.getImage(object);
}
-
+
@Override
protected String getLabel(Object object) {
Object revision = getRevisionFor(object);
@@ -401,7 +401,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
}
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.history.LocalHistoryPage#getName()
*/
@@ -411,7 +411,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
return name;
return super.getName();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.history.LocalHistoryPage#getDescription()
*/
@@ -421,7 +421,7 @@ public class EditionHistoryPage extends LocalHistoryPage {
return NLS.bind(TeamUIMessages.EditionHistoryPage_2, name);
return super.getDescription();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.history.LocalHistoryPage#createCompareAction()
*/
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 8b0669a62..5a1820ae4 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
@@ -31,19 +31,19 @@ public class FileRevisionEditorInput extends PlatformObject implements IWorkbenc
private final Object fileRevision;
private final IStorage storage;
-
+
/**
* Creates FileRevisionEditorInput on the given revision.
* @param revision the file revision
- * @param monitor
+ * @param monitor
* @return a file revision editor input
- * @throws CoreException
+ * @throws CoreException
*/
public static FileRevisionEditorInput createEditorInputFor(IFileRevision revision, IProgressMonitor monitor) throws CoreException {
IStorage storage = revision.getStorage(monitor);
return new FileRevisionEditorInput(revision, storage);
}
-
+
private static IStorage wrapStorage(final IStorage storage,
final String charset) {
if (charset == null)
@@ -124,7 +124,7 @@ public class FileRevisionEditorInput extends PlatformObject implements IWorkbenc
}
};
}
-
+
/**
* Creates FileRevisionEditorInput on the given revision.
* @param revision the file revision
@@ -136,11 +136,11 @@ public class FileRevisionEditorInput extends PlatformObject implements IWorkbenc
this.fileRevision = revision;
this.storage = storage;
}
-
+
public FileRevisionEditorInput(IFileState state) {
this(state, state);
}
-
+
public FileRevisionEditorInput(Object revision, IStorage storage, String charset) {
this(revision, wrapStorage(storage, charset));
}
@@ -169,7 +169,7 @@ public class FileRevisionEditorInput extends PlatformObject implements IWorkbenc
if (state != null)
return state.getName() + " " + DateFormat.getInstance().format(new Date(state.getModificationTime())) ; //$NON-NLS-1$
return storage.getName();
-
+
}
@Override
@@ -217,7 +217,7 @@ public class FileRevisionEditorInput extends PlatformObject implements IWorkbenc
public Object getParent(Object o) {
return null;
}
-
+
@Override
public boolean equals(Object obj) {
if (obj instanceof FileRevisionEditorInput) {
@@ -226,7 +226,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 2153e54b2..3e3414df4 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
@@ -30,7 +30,7 @@ public class FileRevisionTypedElement extends StorageTypedElement {
private IFileRevision fileRevision;
private String author;
-
+
/**
* Create a typed element that wraps the given file revision.
* @param fileRevision the file revision
@@ -38,7 +38,7 @@ public class FileRevisionTypedElement extends StorageTypedElement {
public FileRevisionTypedElement(IFileRevision fileRevision){
this(fileRevision, null);
}
-
+
/**
* Create a typed element that wraps the given file revision.
* @param fileRevision the file revision
@@ -49,7 +49,7 @@ public class FileRevisionTypedElement extends StorageTypedElement {
Assert.isNotNull(fileRevision);
this.fileRevision = fileRevision;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.StorageTypedElement#getName()
*/
@@ -64,7 +64,7 @@ public class FileRevisionTypedElement extends StorageTypedElement {
@Override
protected IStorage fetchContents(IProgressMonitor monitor) throws CoreException {
return fileRevision.getStorage(monitor);
-
+
}
/**
@@ -74,7 +74,7 @@ public class FileRevisionTypedElement extends StorageTypedElement {
public String getContentIdentifier() {
return fileRevision.getContentIdentifier();
}
-
+
/**
* Return the human readable timestamp of this element.
* @return the human readable timestamp of this element
@@ -84,7 +84,7 @@ public class FileRevisionTypedElement extends StorageTypedElement {
Date dateFromLong = new Date(date);
return DateFormat.getDateTimeInstance().format(dateFromLong);
}
-
+
/**
* Return the file revision of this element.
* @return the file revision of this element
@@ -92,7 +92,7 @@ public class FileRevisionTypedElement extends StorageTypedElement {
public IFileRevision getFileRevision(){
return fileRevision;
}
-
+
/**
* Return the human readable path of this element.
* @return the human readable path of this element
@@ -103,7 +103,7 @@ public class FileRevisionTypedElement extends StorageTypedElement {
return uri.getPath();
return getName();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.ISharedDocumentAdapter#getDocumentKey(java.lang.Object)
*/
@@ -114,7 +114,7 @@ public class FileRevisionTypedElement extends StorageTypedElement {
}
return null;
}
-
+
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@@ -122,7 +122,7 @@ public class FileRevisionTypedElement extends StorageTypedElement {
public int hashCode() {
return fileRevision.hashCode();
}
-
+
@Override
public boolean equals(Object obj) {
if (obj == this)
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 78b09316d..c85509ee6 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -72,7 +72,7 @@ public class GenericHistoryDropAdapter extends PluginDropAdapter {
if (transferType != null && ResourceTransfer.getInstance().isSupportedType(transferType)) {
return true;
}
-
+
return super.validateDrop(target, operation, transferType);
}
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 354a8b145..14aafb951 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
@@ -45,7 +45,7 @@ public class GenericHistoryTableProvider {
private String currentRevision;
private TableViewer viewer;
private Font currentRevisionFont;
-
+
//column constants
private static final int COL_REVISIONID = 0;
private static final int COL_DATE= 1;
@@ -81,13 +81,13 @@ public class GenericHistoryTableProvider {
}
return ""; //$NON-NLS-1$
}
-
+
private synchronized DateFormat getDateFormat() {
if (dateFormat == null)
dateFormat = DateFormat.getInstance();
return dateFormat;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
*/
@@ -96,8 +96,8 @@ public class GenericHistoryTableProvider {
IFileRevision entry = adaptToFileRevision(element);
if (!entry.exists()) {
return Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW);
- }
-
+ }
+
return null;
}
/* (non-Javadoc)
@@ -124,7 +124,7 @@ public class GenericHistoryTableProvider {
FontData[] data = defaultFont.getFontData();
for (int i = 0; i < data.length; i++) {
data[i].setStyle(SWT.BOLD);
- }
+ }
currentRevisionFont = new Font(viewer.getTable().getDisplay(), data);
}
return currentRevisionFont;
@@ -132,23 +132,23 @@ public class GenericHistoryTableProvider {
return null;
}
}
-
+
/**
* The history sorter
*/
class HistoryComparator extends ViewerComparator {
private boolean reversed = false;
private int columnNumber;
-
+
// column headings: "Revision" "Tags" "Date" "Author" "Comment"
private int[][] SORT_ORDERS_BY_COLUMN = {
- {COL_REVISIONID, COL_DATE, COL_AUTHOR, COL_COMMENT}, /* revision */
+ {COL_REVISIONID, COL_DATE, COL_AUTHOR, COL_COMMENT}, /* revision */
{COL_REVISIONID, COL_DATE, COL_AUTHOR, COL_COMMENT}, /* tags */
{COL_DATE, COL_REVISIONID, COL_AUTHOR, COL_COMMENT}, /* date */
{COL_AUTHOR, COL_REVISIONID, COL_DATE, COL_COMMENT}, /* author */
{COL_COMMENT, COL_REVISIONID, COL_DATE, COL_AUTHOR} /* comment */
};
-
+
/**
* The constructor.
*/
@@ -190,9 +190,9 @@ public class GenericHistoryTableProvider {
long date2 = e2.getTimestamp();
if (date1 == date2)
return 0;
-
+
return date1>date2 ? -1 : 1;
-
+
case 2: /* author */
return getComparator().compare(e1.getAuthor(), e2.getAuthor());
case 3: /* comment */
@@ -231,11 +231,11 @@ public class GenericHistoryTableProvider {
}
return entry;
}
-
+
/**
* Create a TableViewer that can be used to display a list of IFileRevision instances.
* Ths method provides the labels and sorter but does not provide a content provider
- *
+ *
* @param parent
* @return TableViewer
*/
@@ -245,21 +245,21 @@ public class GenericHistoryTableProvider {
table.setLinesVisible(true);
GridData data = new GridData(GridData.FILL_BOTH);
table.setLayoutData(data);
-
+
TableLayout layout = new TableLayout();
table.setLayout(layout);
-
+
TableViewer viewer = new TableViewer(table);
-
+
createColumns(table, layout, viewer);
viewer.setLabelProvider(new HistoryLabelProvider());
-
+
// By default, reverse sort by revision.
HistoryComparator sorter = new HistoryComparator(COL_REVISIONID);
sorter.setReversed(true);
viewer.setComparator(sorter);
-
+
table.addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
@@ -268,12 +268,12 @@ public class GenericHistoryTableProvider {
}
}
});
-
+
this.viewer = viewer;
return viewer;
}
-
-
+
+
/**
* Creates the columns for the history table.
*/
@@ -282,32 +282,32 @@ public class GenericHistoryTableProvider {
// revision
TableColumn col = new TableColumn(table, SWT.NONE);
col.setResizable(true);
- col.setText(TeamUIMessages.GenericHistoryTableProvider_Revision);
+ col.setText(TeamUIMessages.GenericHistoryTableProvider_Revision);
col.addSelectionListener(headerListener);
layout.addColumnData(new ColumnWeightData(20, true));
-
+
// creation date
col = new TableColumn(table, SWT.NONE);
col.setResizable(true);
- col.setText(TeamUIMessages.GenericHistoryTableProvider_RevisionTime);
+ col.setText(TeamUIMessages.GenericHistoryTableProvider_RevisionTime);
col.addSelectionListener(headerListener);
layout.addColumnData(new ColumnWeightData(20, true));
-
+
// author
col = new TableColumn(table, SWT.NONE);
col.setResizable(true);
- col.setText(TeamUIMessages.GenericHistoryTableProvider_Author);
+ col.setText(TeamUIMessages.GenericHistoryTableProvider_Author);
col.addSelectionListener(headerListener);
layout.addColumnData(new ColumnWeightData(20, true));
-
+
//comment
col = new TableColumn(table, SWT.NONE);
col.setResizable(true);
- col.setText(TeamUIMessages.GenericHistoryTableProvider_Comment);
+ col.setText(TeamUIMessages.GenericHistoryTableProvider_Comment);
col.addSelectionListener(headerListener);
layout.addColumnData(new ColumnWeightData(50, true));
}
-
+
/**
* Adds the listener that sets the sorter.
*/
@@ -343,28 +343,28 @@ public class GenericHistoryTableProvider {
}
};
}
-
+
public void setFile(IFileHistory fileHistory, IFile file) {
this.currentFileHistory = fileHistory;
this.currentFile= file;
this.currentRevision = findCurrentRevision();
}
-
+
private String findCurrentRevision() {
-
+
RepositoryProvider teamProvider = RepositoryProvider.getProvider(currentFile.getProject());
IFileRevision fileRevision = teamProvider.getFileHistoryProvider().getWorkspaceFileRevision(currentFile);
-
+
if (fileRevision != null )
return fileRevision.getContentIdentifier();
-
+
return null;
}
public IFileHistory getIFileHistory() {
return this.currentFileHistory;
}
-
+
public String getCurrentRevision() {
return currentRevision;
}
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 c3e184d73..093dae9d9 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
@@ -332,17 +332,17 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
isUpdatingSelection = true;
if (GenericHistoryView.this == part)
return;
-
+
if (selection instanceof IStructuredSelection) {
IStructuredSelection structSelection = (IStructuredSelection) selection;
//Always take the first element - this is not intended to work with multiple selection
//Also, hang on to this selection for future use in case the history view is not visible
lastSelectedElement = structSelection.getFirstElement();
-
+
if (!isLinkingEnabled() || !checkIfPageIsVisible()) {
return;
}
-
+
showLastSelectedElement();
}
} finally {
@@ -503,7 +503,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP
if (lastSelectedElement != null) {
if (lastSelectedElement instanceof IEditorPart)
editorActivated((IEditorPart)lastSelectedElement);
- else {
+ else {
Object resource;
if (lastSelectedElement instanceof SyncInfoModelElement) {
SyncInfoModelElement syncInfoModelElement = (SyncInfoModelElement) lastSelectedElement;
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 12858f2b4..3cc4e7f71 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
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 00e9bd6b8..bc531e8a0 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
@@ -55,27 +55,27 @@ import com.ibm.icu.text.SimpleDateFormat;
import com.ibm.icu.util.Calendar;
public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdapter {
-
+
public static final int ON = 1;
public static final int OFF = 2;
public static final int ALWAYS = 4;
-
+
/* private */ IFile file;
/* private */ IFileRevision currentFileRevision;
-
+
// cached for efficiency
/* private */ LocalFileHistory localFileHistory;
-
+
/* private */ TreeViewer treeViewer;
-
+
/* private */boolean shutdown = false;
-
+
//grouping on
private boolean groupingOn = true;
//toggle constants for default click action
private int compareMode = OFF;
-
+
protected LocalFileHistoryTableProvider historyTableProvider;
private RefreshFileHistory refreshFileHistoryJob;
private Composite localComposite;
@@ -86,11 +86,11 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
private CompareRevisionAction compareAction;
private OpenRevisionAction openAction;
private OpenWithMenu openWithMenu;
-
+
private HistoryResourceListener resourceListener;
-
+
private IFileRevision currentSelection;
-
+
private final class LocalHistoryContentProvider implements ITreeContentProvider {
@Override
public Object[] getElements(Object inputElement) {
@@ -123,7 +123,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
if (parentElement instanceof AbstractHistoryCategory){
return ((AbstractHistoryCategory) parentElement).getRevisions();
}
-
+
return new Object[0];
}
@@ -162,7 +162,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
}
return -1;
}
-
+
@Override
protected long getModificationDate(Object element) {
IFileRevision entry = adaptToFileRevision(element);
@@ -170,7 +170,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
return entry.getTimestamp();
return -1;
}
-
+
@Override
protected boolean isCurrentEdition(Object element) {
IFileRevision entry = adaptToFileRevision(element);
@@ -180,14 +180,14 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
long tempCurrentTimeStamp = getCurrentRevision();
return (tempCurrentTimeStamp != -1 && tempCurrentTimeStamp==timestamp);
}
-
+
@Override
protected boolean isDeletedEdition(Object element) {
IFileRevision entry = adaptToFileRevision(element);
return (!entry.exists());
}
}
-
+
private class RefreshFileHistory extends Job {
public RefreshFileHistory() {
super(TeamUIMessages.LocalHistoryPage_FetchLocalHistoryMessage);
@@ -205,34 +205,34 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
} catch (CoreException ex) {
status = new TeamStatus(ex.getStatus().getSeverity(), TeamUIPlugin.ID, ex.getStatus().getCode(), ex.getMessage(), ex, file);
}
-
+
update(fileHistory.getFileRevisions(), Policy.subMonitorFor(monitor, 50));
-
+
if (status != Status.OK_STATUS ) {
this.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
this.setProperty(IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY, Boolean.TRUE);
}
-
+
if (Policy.DEBUG_HISTORY) {
String time = new SimpleDateFormat("m:ss.SSS").format(new Date(System.currentTimeMillis())); //$NON-NLS-1$
System.out.println(time + ": RefreshFileHistoryJob#run finished, status: " + status); //$NON-NLS-1$
}
-
+
return status;
} finally {
monitor.done();
}
}
}
-
+
private class HistoryResourceListener implements IResourceChangeListener {
@Override
public void resourceChanged(IResourceChangeEvent event) {
IResourceDelta root = event.getDelta();
-
+
if (file == null)
return;
-
+
IResourceDelta resourceDelta = root.findMember(file.getFullPath());
if (resourceDelta != null){
Display.getDefault().asyncExec(new Runnable() {
@@ -244,16 +244,16 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
}
}
}
-
+
public LocalHistoryPage(int compareMode) {
super();
this.compareMode = compareMode;
}
-
+
public LocalHistoryPage() {
super();
}
-
+
@Override
public boolean inputSet() {
currentFileRevision = null;
@@ -261,16 +261,16 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
this.file = tempFile;
if (tempFile == null)
return false;
-
+
//blank current input only after we're sure that we have a file
//to fetch history for
this.treeViewer.setInput(null);
-
+
localFileHistory = new LocalFileHistory(file, !getHistoryPageSite().isModal());
-
+
if (refreshFileHistoryJob == null)
refreshFileHistoryJob = new RefreshFileHistory();
-
+
//always refresh the history if the input gets set
refreshHistory(true);
return true;
@@ -285,7 +285,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
String time = new SimpleDateFormat("m:ss.SSS").format(new Date(System.currentTimeMillis())); //$NON-NLS-1$
System.out.println(time + ": LocalHistoryPage#refreshHistory, refetch = " + refetch); //$NON-NLS-1$
}
-
+
if (refreshFileHistoryJob.getState() != Job.NONE){
refreshFileHistoryJob.cancel();
}
@@ -299,7 +299,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
return part.getSite();
return null;
}
-
+
@Override
public void createControl(Composite parent) {
@@ -311,18 +311,18 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
GridData data = new GridData(GridData.FILL_BOTH);
data.grabExcessVerticalSpace = true;
localComposite.setLayoutData(data);
-
+
treeViewer = createTree(localComposite);
-
+
contributeActions();
-
+
IHistoryPageSite parentSite = getHistoryPageSite();
if (parentSite != null && parentSite instanceof DialogHistoryPageSite && treeViewer != null)
parentSite.setSelectionProvider(treeViewer);
-
+
resourceListener = new HistoryResourceListener();
ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceListener, IResourceChangeEvent.POST_CHANGE);
-
+
PlatformUI.getWorkbench().getHelpSystem().setHelp(localComposite, IHelpContextIds.LOCAL_HISTORY_PAGE);
}
@@ -342,7 +342,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
groupByDateMode.setToolTipText(TeamUIMessages.LocalHistoryPage_GroupRevisionsByDateTip);
groupByDateMode.setDisabledImageDescriptor(TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_DATES_CATEGORY));
groupByDateMode.setHoverImageDescriptor(TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_DATES_CATEGORY));
-
+
//Collapse All
collapseAll = new Action(TeamUIMessages.LocalHistoryPage_CollapseAllAction, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COLLAPSE_ALL)) {
@Override
@@ -353,7 +353,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
collapseAll.setToolTipText(TeamUIMessages.LocalHistoryPage_CollapseAllTip);
collapseAll.setDisabledImageDescriptor(TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COLLAPSE_ALL));
collapseAll.setHoverImageDescriptor(TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COLLAPSE_ALL));
-
+
IHistoryPageSite historyPageSite = getHistoryPageSite();
if (!historyPageSite.isModal()) {
//Compare Mode Action
@@ -370,7 +370,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
compareModeAction.setDisabledImageDescriptor(TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COMPARE_VIEW));
compareModeAction.setHoverImageDescriptor(TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COMPARE_VIEW));
compareModeAction.setChecked(compareMode == ON);
-
+
getContentsAction = getContextMenuAction(TeamUIMessages.LocalHistoryPage_GetContents, true /* needs progress */, new IWorkspaceRunnable() {
@Override
public void run(IProgressMonitor monitor) throws CoreException {
@@ -389,10 +389,10 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
}
});
}
-
+
//TODO: Doc help
//PlatformUI.getWorkbench().getHelpSystem().setHelp(getContentsAction, );
-
+
// Click Compare action
compareAction = createCompareAction();
compareAction.setEnabled(!treeViewer.getSelection().isEmpty());
@@ -403,7 +403,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
compareAction.selectionChanged((IStructuredSelection) treeViewer.getSelection());
}
});
-
+
// Only add the open action if compare mode is not always on
if (!((compareMode & (ALWAYS | ON)) == (ALWAYS | ON))) {
openAction = new OpenRevisionAction(TeamUIMessages.LocalHistoryPage_OpenAction, this);
@@ -414,7 +414,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
openAction.selectionChanged((IStructuredSelection) treeViewer.getSelection());
}
});
-
+
// Add 'Open With...' sub-menu
openWithMenu = new OpenWithMenu(this);
treeViewer.getTree().addSelectionListener(new SelectionAdapter(){
@@ -424,7 +424,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
}
});
}
-
+
new OpenAndLinkWithEditorHelper(treeViewer) {
@Override
protected void open(ISelection selection, boolean activate) {
@@ -460,7 +460,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
// XXX: Not yet implemented, see http://bugs.eclipse.org/324185
}
};
-
+
//Contribute actions to popup menu
MenuManager menuMgr = new MenuManager();
Menu menu = menuMgr.createContextMenu(treeViewer.getTree());
@@ -472,7 +472,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
});
menuMgr.setRemoveAllWhenShown(true);
treeViewer.getTree().setMenu(menu);
-
+
//Don't add the object contribution menu items if this page is hosted in a dialog
IWorkbenchPart part = historyPageSite.getPart();
if (part != null) {
@@ -504,7 +504,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
tbm.appendToGroup(fileNameQualifier+"collapse", compareModeAction); //$NON-NLS-1$
tbm.update(false);
}
-
+
}
protected CompareRevisionAction createCompareAction() {
@@ -514,7 +514,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
private String getFileNameQualifier() {
if (file != null)
return file.getFullPath().toString();
-
+
return ""; //$NON-NLS-1$
}
@@ -522,7 +522,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
// file actions go first (view file)
IHistoryPageSite parentSite = getHistoryPageSite();
manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
-
+
if (file != null && !parentSite.isModal()){
if (openAction != null)
manager.add(openAction);
@@ -551,7 +551,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
/**
* Creates the tree that displays the local file revisions
- *
+ *
* @param parent the parent composite to contain the group
* @return the group control
*/
@@ -612,7 +612,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceListener);
resourceListener = null;
}
-
+
//Cancel any incoming
if (refreshFileHistoryJob != null) {
if (refreshFileHistoryJob.getState() != Job.NONE) {
@@ -620,17 +620,17 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
}
}
}
-
+
public IFileRevision getCurrentFileRevision() {
if (currentFileRevision != null)
return currentFileRevision;
-
+
if (file != null)
currentFileRevision = new LocalFileRevision(file);
-
+
return currentFileRevision;
}
-
+
private Action getContextMenuAction(String title, final boolean needsProgressDialog, final IWorkspaceRunnable action) {
return new Action(title) {
@Override
@@ -641,10 +641,10 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
if (!(selection instanceof IStructuredSelection)) return;
IStructuredSelection ss = (IStructuredSelection)selection;
Object o = ss.getFirstElement();
-
+
if (o instanceof AbstractHistoryCategory)
return;
-
+
currentSelection = (IFileRevision)o;
if(needsProgressDialog) {
PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
@@ -671,7 +671,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
// Do nothing
}
}
-
+
@Override
public boolean isEnabled() {
ISelection selection = treeViewer.getSelection();
@@ -703,7 +703,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
}
return true;
}
-
+
public void setClickAction(boolean compare) {
compareMode = compare ? ON : OFF;
if (compareModeAction != null)
@@ -824,14 +824,14 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
return sortRevisions(revisions, monitor);
return null;
}
-
+
private Object[] mapExpandedElements(AbstractHistoryCategory[] categories, Object[] expandedElements) {
//store the names of the currently expanded categories in a map
HashMap elementMap = new HashMap();
for (int i=0; i<expandedElements.length; i++){
elementMap.put(((DateHistoryCategory)expandedElements[i]).getName(), null);
}
-
+
//Go through the new categories and keep track of the previously expanded ones
ArrayList expandable = new ArrayList();
for (int i = 0; i<categories.length; i++){
@@ -844,7 +844,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
}
private AbstractHistoryCategory[] sortRevisions(IFileRevision[] revisions, IProgressMonitor monitor) {
-
+
try {
monitor.beginTask(null, 100);
//Create the 4 categories
@@ -862,25 +862,25 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
tempCategories[2] = new DateHistoryCategory(TeamUIMessages.HistoryPage_ThisMonth, monthCal, yesterdayCal);
//Everything before after week is previous
tempCategories[3] = new DateHistoryCategory(TeamUIMessages.HistoryPage_Previous, null, monthCal);
-
+
ArrayList finalCategories = new ArrayList();
for (int i = 0; i<tempCategories.length; i++){
tempCategories[i].collectFileRevisions(revisions, false);
if (tempCategories[i].hasRevisions())
finalCategories.add(tempCategories[i]);
}
-
+
if (finalCategories.size() == 0){
//no revisions found for the current mode, so add a message category
finalCategories.add(getErrorMessage());
}
-
+
return (AbstractHistoryCategory[])finalCategories.toArray(new AbstractHistoryCategory[finalCategories.size()]);
} finally {
monitor.done();
}
}
-
+
private MessageHistoryCategory getErrorMessage(){
MessageHistoryCategory messageCategory = new MessageHistoryCategory(getNoChangesMessage());
return messageCategory;
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 4f934752c..9b121fa17 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
@@ -28,7 +28,7 @@ public class LocalHistoryPageSource extends HistoryPageSource {
}
return null;
}
-
+
@Override
public boolean canShowHistoryFor(Object object) {
return getFile(object) != null;
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 94832d5f3..c6d484e4d 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
@@ -32,54 +32,54 @@ import org.eclipse.ui.themes.ITheme;
import com.ibm.icu.text.DateFormat;
public class LocalHistoryTableProvider {
-
+
/* private */ static final int COL_DATE = 0;
-
+
/* private */ TreeViewer viewer;
-
+
private Image localRevImage = null;
private DateFormat dateFormat;
-
+
/**
* The Local history label provider.
*/
private class LocalHistoryLabelProvider extends LabelProvider implements ITableLabelProvider, IColorProvider, IFontProvider {
-
+
private Image dateImage = null;
private Font currentRevisionFont = null;
-
+
private IPropertyChangeListener themeListener = new IPropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent event) {
LocalHistoryTableProvider.this.viewer.refresh();
}
};
-
+
public LocalHistoryLabelProvider(){
PlatformUI.getWorkbench().getThemeManager().addPropertyChangeListener(themeListener);
}
-
+
@Override
public void dispose() {
if (dateImage != null){
dateImage.dispose();
dateImage = null;
}
-
+
if (localRevImage != null) {
localRevImage.dispose();
localRevImage = null;
}
-
+
if (themeListener != null){
PlatformUI.getWorkbench().getThemeManager().removePropertyChangeListener(themeListener);
}
-
+
if (currentRevisionFont != null) {
currentRevisionFont.dispose();
}
}
-
+
@Override
public Image getColumnImage(Object element, int columnIndex) {
if (columnIndex == COL_DATE) {
@@ -90,12 +90,12 @@ public class LocalHistoryTableProvider {
}
return dateImage;
}
-
+
if (getModificationDate(element) != -1) {
return getRevisionImage();
}
}
-
+
return null;
}
@@ -105,7 +105,7 @@ public class LocalHistoryTableProvider {
if (element instanceof AbstractHistoryCategory){
return ((AbstractHistoryCategory) element).getName();
}
-
+
long date = getModificationDate(element);
if (date != -1) {
Date dateFromLong = new Date(date);
@@ -125,7 +125,7 @@ public class LocalHistoryTableProvider {
ITheme current = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme();
return current.getColorRegistry().get("org.eclipse.team.cvs.ui.fontsandcolors.cvshistorypagecategories"); //$NON-NLS-1$
}
-
+
if (isDeletedEdition(element)) {
return Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW);
}
@@ -175,15 +175,15 @@ public class LocalHistoryTableProvider {
private class HistoryComparator extends ViewerComparator {
private boolean reversed = false;
private int columnNumber;
-
+
// column headings: "Revision" "Tags" "Date" "Author" "Comment"
- private int[][] SORT_ORDERS_BY_COLUMN = {
+ private int[][] SORT_ORDERS_BY_COLUMN = {
{COL_DATE}, /* date */
};
/**
* The constructor.
- * @param columnNumber
+ * @param columnNumber
*/
public HistoryComparator(int columnNumber) {
this.columnNumber = columnNumber;
@@ -197,7 +197,7 @@ public class LocalHistoryTableProvider {
public int compare(Viewer compareViewer, Object o1, Object o2) {
/*if (o1 instanceof AbstractCVSHistoryCategory || o2 instanceof AbstractCVSHistoryCategory)
return 0;*/
-
+
long date1 = getModificationDate(o1);
long date2 = getModificationDate(o2);
int result = 0;
@@ -226,7 +226,7 @@ public class LocalHistoryTableProvider {
return 0;
return date1 > date2 ? -1 : 1;
-
+
default :
return 0;
}
@@ -251,7 +251,7 @@ public class LocalHistoryTableProvider {
/**
* Sets the sorting order.
- * @param newReversed
+ * @param newReversed
*/
public void setReversed(boolean newReversed) {
reversed = newReversed;
@@ -283,11 +283,11 @@ public class LocalHistoryTableProvider {
col.addSelectionListener(headerListener);
layout.addColumnData(new ColumnWeightData(20, true));
}
-
+
/**
* Create a TreeViewer that can be used to display a list of IFile instances.
* This method provides the labels and sorter but does not provide a content provider
- *
+ *
* @param parent
* @return TableViewer
*/
@@ -295,7 +295,7 @@ public class LocalHistoryTableProvider {
Tree tree = new Tree(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION);
tree.setHeaderVisible(true);
tree.setLinesVisible(false);
-
+
GridData data = new GridData(GridData.FILL_BOTH);
tree.setLayoutData(data);
@@ -303,20 +303,20 @@ public class LocalHistoryTableProvider {
tree.setLayout(layout);
this.viewer = new TreeViewer(tree);
-
+
createColumns(tree, layout);
viewer.setLabelProvider(new LocalHistoryLabelProvider());
- // By default, reverse sort by revision.
+ // By default, reverse sort by revision.
// If local filter is on sort by date
HistoryComparator sorter = new HistoryComparator(COL_DATE);
sorter.setReversed(false);
viewer.setComparator(sorter);
-
+
return viewer;
}
-
+
protected long getModificationDate(Object element) {
IModificationDate md = (IModificationDate)Utils.getAdapter(element, IModificationDate.class);
if (md != null)
@@ -331,7 +331,7 @@ public class LocalHistoryTableProvider {
}
return -1;
}
-
+
protected boolean isCurrentEdition(Object element) {
if (element instanceof IFile) {
return true;
@@ -341,7 +341,7 @@ public class LocalHistoryTableProvider {
}
return false;
}
-
+
protected boolean isDeletedEdition(Object element) {
if (element instanceof IFile) {
IFile f = (IFile) element;
@@ -357,7 +357,7 @@ public class LocalHistoryTableProvider {
}
return localRevImage;
}
-
+
public synchronized DateFormat getDateFormat() {
if (dateFormat == null)
dateFormat = DateFormat.getInstance();
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 d9b00ce7d..a78bc0d07 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
@@ -14,7 +14,7 @@ import org.eclipse.team.core.history.IFileRevision;
public class MessageHistoryCategory extends AbstractHistoryCategory {
private String message;
-
+
public MessageHistoryCategory(String message){
this.message = message;
}
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 1564bd052..161a535b2 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
@@ -23,7 +23,7 @@ import org.eclipse.team.ui.history.HistoryPageCompareEditorInput;
import org.eclipse.team.ui.history.IHistoryPageSource;
public class ReplaceLocalHistory extends ShowLocalHistory {
-
+
@Override
public void run(IAction action) {
final IFile file = (IFile) getSelection().getFirstElement();
@@ -36,9 +36,9 @@ public class ReplaceLocalHistory extends ShowLocalHistory {
showCompareInDialog(getShell(), file);
}
};
- TeamUIPlugin.getStandardDisplay().asyncExec(r);
+ TeamUIPlugin.getStandardDisplay().asyncExec(r);
}
-
+
private void showCompareInDialog(Shell shell, Object object){
IHistoryPageSource pageSource = LocalHistoryPageSource.getInstance();
if (pageSource != null && pageSource.canShowHistoryFor(object)) {
@@ -71,7 +71,7 @@ public class ReplaceLocalHistory extends ShowLocalHistory {
CompareUI.openCompareDialog(input);
}
}
-
+
@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 e34681d3d..36d0fcaca 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
@@ -33,7 +33,7 @@ public class ShowLocalHistory extends ActionDelegate implements IObjectActionDel
private IStructuredSelection fSelection;
private IWorkbenchPart targetPart;
-
+
@Override
public void run(IAction action) {
IFileState states[]= getLocalHistory();
@@ -55,7 +55,7 @@ public class ShowLocalHistory extends ActionDelegate implements IObjectActionDel
}
}
};
- TeamUIPlugin.getStandardDisplay().asyncExec(r);
+ TeamUIPlugin.getStandardDisplay().asyncExec(r);
}
});
} catch (InvocationTargetException exception) {
@@ -63,7 +63,7 @@ public class ShowLocalHistory extends ActionDelegate implements IObjectActionDel
} catch (InterruptedException exception) {
}
}
-
+
@Override
public void selectionChanged(IAction action, ISelection sel) {
if (sel instanceof IStructuredSelection) {
@@ -74,7 +74,7 @@ public class ShowLocalHistory extends ActionDelegate implements IObjectActionDel
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
this.targetPart = targetPart;
}
-
+
protected Shell getShell() {
if (targetPart != null)
return targetPart.getSite().getShell();
@@ -88,17 +88,17 @@ public class ShowLocalHistory extends ActionDelegate implements IObjectActionDel
public IStructuredSelection getSelection() {
return fSelection;
}
-
+
protected IFileState[] getLocalHistory() {
final IFile file = (IFile) getSelection().getFirstElement();
IFileState states[];
try {
states= file.getHistory(null);
- } catch (CoreException ex) {
+ } catch (CoreException ex) {
MessageDialog.openError(getShell(), getPromptTitle(), ex.getMessage());
return null;
}
-
+
if (states == null || states.length <= 0) {
MessageDialog.openInformation(getShell(), getPromptTitle(), TeamUIMessages.ShowLocalHistory_0);
return states;
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 d9b79555b..f874c69d1 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
@@ -27,7 +27,7 @@ public abstract class AbstractCompareInput implements ICompareInput {
private ITypedElement right;
private int kind;
private final ListenerList listeners = new ListenerList(ListenerList.IDENTITY);
-
+
public AbstractCompareInput(int kind,
ITypedElement ancestor,
ITypedElement left,
@@ -49,7 +49,7 @@ public abstract class AbstractCompareInput implements ICompareInput {
getChangeNotifier().connect(this);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.DiffNode#removeCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener)
*/
@@ -61,7 +61,7 @@ public abstract class AbstractCompareInput implements ICompareInput {
getChangeNotifier().disconnect(this);
}
}
-
+
/**
* Fire a compare input change event.
* This method must be called from the UI thread.
@@ -84,7 +84,7 @@ public abstract class AbstractCompareInput implements ICompareInput {
}
}
}
-
+
private boolean containsListener(ICompareInputChangeListener listener) {
if (listeners.isEmpty())
return false;
@@ -120,11 +120,11 @@ public abstract class AbstractCompareInput implements ICompareInput {
public Image getImage() {
return getMainElement().getImage();
}
-
+
/**
* Return the main non-null element that identifies
* this input. By default, the left is returned if non-null.
- * If the left is null, the right is returned. If both the
+ * If the left is null, the right is returned. If both the
* left and right are null the ancestor is returned.
* @return the main non-null element that identifies
* this input
@@ -152,7 +152,7 @@ public abstract class AbstractCompareInput implements ICompareInput {
public void setKind(int kind) {
this.kind = kind;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.ICompareInput#getLeft()
*/
@@ -176,7 +176,7 @@ public abstract class AbstractCompareInput implements ICompareInput {
public ITypedElement getRight() {
return right;
}
-
+
/**
* Return the change notifier that will call {@link #fireChange()}
* when the state of the compare input changes.
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 9add175df..30ecadf5a 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
@@ -18,10 +18,10 @@ import org.eclipse.team.ui.synchronize.ModelOperation;
import org.eclipse.ui.IWorkbenchPart;
/**
- * A model operation that builds the scope of the operation's
+ * A model operation that builds the scope of the operation's
* manager. Clients who want to build the scope can do the following:
* <p>
- *
+ *
* @see ISynchronizationScopeManager
* @since 3.2
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonMenuManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonMenuManager.java
index b0e13fa3d..2e158ee68 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonMenuManager.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonMenuManager.java
@@ -22,7 +22,7 @@ import org.eclipse.jface.action.MenuManager;
public class CommonMenuManager extends MenuManager {
private Map handlers = new HashMap();
-
+
public CommonMenuManager(String id) {
super(id);
}
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 319c32f78..58abe7ad9 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
@@ -84,7 +84,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
empty = false;
listener.notEmpty(this);
}
-
+
}
@Override
protected void inputChanged(Object input, Object oldInput) {
@@ -111,7 +111,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
public boolean isEmpty() {
return empty;
}
-
+
@Override
protected void initDragAndDrop() {
getNavigatorContentService().getDnDService().bindDragAssistant(new ResourceDragAdapterAssistant());
@@ -120,7 +120,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
/**
* Gets the expanded elements that are visible to the user. An expanded
* element is only visible if the parent is expanded.
- *
+ *
* @return the visible expanded elements
* @since 2.0
*/
@@ -155,7 +155,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
public CommonSubActionBars(IActionBars parent) {
super(parent);
}
-
+
@Override
public void setGlobalActionHandler(String actionID, IAction handler) {
if (handler == null) {
@@ -173,7 +173,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
super.setGlobalActionHandler(actionID, handler);
}
}
-
+
@Override
public void clearGlobalActionHandlers() {
// When cleared, also remove the ids from the parent
@@ -189,7 +189,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
}
super.clearGlobalActionHandlers();
}
-
+
@Override
public void updateActionBars() {
// On update, push all or action handlers into our parent
@@ -205,19 +205,19 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
}
super.updateActionBars();
}
-
+
}
-
+
public static final String TEAM_NAVIGATOR_CONTENT = "org.eclipse.team.ui.navigatorViewer"; //$NON-NLS-1$
private static final String PROP_ACTION_SERVICE_ACTION_BARS = "org.eclipse.team.ui.actionServiceActionBars"; //$NON-NLS-1$
-
+
private Set extensions = new HashSet();
-
+
private NavigatorActionService actionService;
private IEmptyTreeListener emptyTreeListener;
-
+
/**
* Create a common viewer
* @param parent the parent composite of the common viewer
@@ -235,12 +235,12 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
public void scopeChanged(final ISynchronizationScope scope,
ResourceMapping[] newMappings, ResourceTraversal[] newTraversals) {
enableContentProviders(v, configuration);
- Utils.asyncExec(new Runnable() {
+ Utils.asyncExec(new Runnable() {
@Override
public void run() {
v.refresh();
}
-
+
}, v);
}
});
@@ -285,7 +285,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
}
v.getNavigatorContentService().bindExtensions((String[]) toBind.toArray(new String[toBind.size()]), true);
}
-
+
private static ISynchronizationScope getScope(ISynchronizePageConfiguration configuration) {
return (ISynchronizationScope)configuration.getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_SCOPE);
}
@@ -370,7 +370,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
return super.getFont(element);
}
}
-
+
@Override
public void setInitialInput() {
CommonViewer viewer = (CommonViewer)getViewer();
@@ -386,7 +386,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
createActionService((CommonViewer)viewer, getConfiguration());
super.initializeViewer(viewer);
}
-
+
private void createActionService(CommonViewer viewer, ISynchronizePageConfiguration configuration) {
ICommonViewerSite commonSite = createCommonViewerSite(viewer, configuration);
actionService = new NavigatorActionService(commonSite, viewer, viewer.getNavigatorContentService());
@@ -422,7 +422,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
}
return getConfiguration().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.navigator.internal.extensions.INavigatorContentServiceListener#onLoad(org.eclipse.ui.navigator.internal.extensions.NavigatorContentExtension)
*/
@@ -438,7 +438,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
private ModelSynchronizeParticipant getParticipant() {
return (ModelSynchronizeParticipant)getConfiguration().getParticipant();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#getContextMenuId(org.eclipse.jface.viewers.StructuredViewer)
*/
@@ -446,7 +446,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
protected String getContextMenuId(StructuredViewer viewer) {
return ((CommonViewer)viewer).getNavigatorContentService().getViewerDescriptor().getPopupMenuId();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#registerContextMenu(org.eclipse.jface.viewers.StructuredViewer, org.eclipse.jface.action.MenuManager)
*/
@@ -455,7 +455,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
actionService.prepareMenuForPlatformContributions(menuMgr,
viewer, false);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#fillContextMenu(org.eclipse.jface.viewers.StructuredViewer, org.eclipse.jface.action.IMenuManager)
*/
@@ -466,16 +466,16 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
CommonMenuManager cmm = (CommonMenuManager) manager;
cmm.clearHandlers();
}
-
+
// Add the actions from the service (which willal so add the groups)
ISelection selection = getViewer().getSelection();
actionService.setContext(new ActionContext(selection));
actionService.fillContextMenu(manager);
-
+
// Add any programmatic menu items
super.fillContextMenu(viewer, manager);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#dispose()
*/
@@ -486,7 +486,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
actionService.dispose();
super.dispose();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#updateActionBars(org.eclipse.jface.viewers.IStructuredSelection)
*/
@@ -504,7 +504,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
actionService.fillActionBars(subActionBars);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#createContextMenuManager(java.lang.String)
*/
@@ -512,7 +512,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
protected MenuManager createContextMenuManager(String targetID) {
return new CommonMenuManager(targetID);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#addContextMenuGroups(org.eclipse.jface.action.IMenuManager)
*/
@@ -558,7 +558,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
enableContentProviders((CommonViewer)getViewer(), getConfiguration());
}
}
-
+
@Override
protected boolean handleDoubleClick(StructuredViewer viewer, DoubleClickEvent event) {
if (isOpenable(event.getSelection())) {
@@ -574,7 +574,7 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
return false;
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 d174dc678..878c53cfa 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
@@ -25,7 +25,7 @@ import org.eclipse.team.internal.ui.Policy;
import org.eclipse.team.internal.ui.TeamUIMessages;
/**
- * An abstract class that
+ * An abstract class that
* listens to resource changes and synchronization context changes.
* <p>
* This class can be subclassed by clients.
@@ -51,32 +51,32 @@ public abstract class CompareInputChangeNotifier implements
public void decrement() {
if (connections > 0)
connections--;
-
+
}
public boolean isDisconnected() {
return connections == 0;
}
}
-
+
private static final int COMPARE_INPUT_CHANGE = 1;
-
+
private static class InputChangeEvent extends Event {
private final ICompareInput[] inputs;
public InputChangeEvent(ICompareInput[] inputs) {
super(COMPARE_INPUT_CHANGE);
this.inputs = inputs;
-
+
}
public ICompareInput[] getChangedInputs() {
return inputs;
}
}
-
+
private class InputChangeEventHandler extends BackgroundEventHandler {
private final Set changedInputs = new HashSet();
private final List pendingRunnables = new ArrayList();
-
+
protected InputChangeEventHandler() {
super(TeamUIMessages.CompareInputChangeNotifier_0, TeamUIMessages.CompareInputChangeNotifier_1);
}
@@ -130,7 +130,7 @@ public abstract class CompareInputChangeNotifier implements
break;
}
}
-
+
private void executeRunnableDuringDispatch(Event event) {
synchronized (pendingRunnables) {
pendingRunnables.add(event);
@@ -150,23 +150,23 @@ public abstract class CompareInputChangeNotifier implements
handleException(e);
}
}
-
+
protected synchronized void queueEvent(Event event) {
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);
}
}
-
+
/**
* Create a change notifier for the given synchronization context.
*/
@@ -185,7 +185,7 @@ public abstract class CompareInputChangeNotifier implements
ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE);
eventHandler = new InputChangeEventHandler();
}
-
+
/**
* Dispose of the change notifier. This method is invoked when the context
* to which the change notifier is associated is disposed.
@@ -198,8 +198,8 @@ public abstract class CompareInputChangeNotifier implements
}
/**
- * Connect the input to this change notifier. Once connected, the change notifier will issue
- * change events for the given input. When change notification is no longer desired, the
+ * Connect the input to this change notifier. Once connected, the change notifier will issue
+ * change events for the given input. When change notification is no longer desired, the
* input should be disconnected. The number of calls to {@link #connect(ICompareInput)} needs to
* be matched by the same number of calls to {@link #disconnect(ICompareInput)}.
* @param input the compare input
@@ -227,7 +227,7 @@ public abstract class CompareInputChangeNotifier implements
}
}
}
-
+
/**
* Return the array of inputs that have connections.
* @return the array of inputs that have connections
@@ -235,7 +235,7 @@ public abstract class CompareInputChangeNotifier implements
protected ICompareInput[] getConnectedInputs() {
return (ICompareInput[])inputs.keySet().toArray(new ICompareInput[inputs.size()]);
}
-
+
/**
* Send out notification that the given compare inputs have changed.
* @param inputs the changed inputs
@@ -244,7 +244,7 @@ public abstract class CompareInputChangeNotifier implements
InputChangeEvent event = new InputChangeEvent(inputs);
eventHandler.queueEvent(event);
}
-
+
/**
* Dispatch the changes to the given inputs.
* @param inputs the changed compare inputs
@@ -286,7 +286,7 @@ public abstract class CompareInputChangeNotifier implements
protected void prepareInput(ICompareInput input, IProgressMonitor monitor) {
// Default is to do nothing
}
-
+
/**
* Update the compare inputs and fire the change events.
* This method is called from the UI thread after the inputs have
@@ -300,7 +300,7 @@ public abstract class CompareInputChangeNotifier implements
fireChange(input);
}
}
-
+
/**
* Run the given runnable in the background.
* @param runnable the runnable
@@ -308,7 +308,7 @@ public abstract class CompareInputChangeNotifier implements
protected void runInBackground(IWorkspaceRunnable runnable) {
eventHandler.queueEvent(new BackgroundEventHandler.RunnableEvent(runnable, false));
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
*/
@@ -325,7 +325,7 @@ public abstract class CompareInputChangeNotifier implements
IResourceDelta delta = event.getDelta().findMember(resource.getFullPath());
if (delta != null) {
if ((delta.getKind() & (IResourceDelta.ADDED | IResourceDelta.REMOVED)) > 0
- || (delta.getKind() & (IResourceDelta.CHANGED)) > 0
+ || (delta.getKind() & (IResourceDelta.CHANGED)) > 0
&& (delta.getFlags() & (IResourceDelta.CONTENT | IResourceDelta.REPLACED)) > 0) {
changedInputs.add(input);
break;
@@ -337,7 +337,7 @@ public abstract class CompareInputChangeNotifier implements
if (!changedInputs.isEmpty())
handleInputChanges((ICompareInput[]) changedInputs.toArray(new ICompareInput[changedInputs.size()]), true);
}
-
+
/**
* Return the resources covered by the given compare input.
* This method is used by the {@link #resourceChanged(IResourceChangeEvent)}
@@ -368,7 +368,7 @@ public abstract class CompareInputChangeNotifier implements
if (realChanges.length > 0)
inputsChanged(realChanges);
}
-
+
/**
* Return whether the given compare input has changed and requires
* a compare input change event to be fired.
@@ -382,7 +382,7 @@ public abstract class CompareInputChangeNotifier implements
}
return false;
}
-
+
/**
* Update the compare input and fire the change event.
* This method is called from {@link #fireChanges(ICompareInput[])}
@@ -395,7 +395,7 @@ public abstract class CompareInputChangeNotifier implements
ci.update();
}
}
-
+
/**
* Return whether the background handler for this notifier belongs to the
* given job family.
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 84cc2b35b..3f0c3f5da 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
@@ -19,13 +19,13 @@ import org.eclipse.team.core.mapping.ResourceMappingMerger;
* don't provide a custom merger will get this one.
*/
public class DefaultResourceMappingMerger extends ResourceMappingMerger {
-
+
private final ModelProvider provider;
public DefaultResourceMappingMerger(ModelProvider provider) {
this.provider = provider;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.mapping.ResourceMappingMerger#getModelProvider()
*/
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 85e60499e..411613c33 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
@@ -49,7 +49,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
private IStatus[] errors;
private boolean showingError;
private JobChangeAdapter jobChangeListener;
-
+
public interface ITraversalFactory {
ResourceTraversal[] getTraversals(ISynchronizationScope scope);
}
@@ -93,7 +93,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
Job.getJobManager().removeJobChangeListener(jobChangeListener);
super.dispose();
}
-
+
@Override
protected int getChangesCount() {
return context.getDiffTree().size();
@@ -114,7 +114,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
numChanges = numConflicts + context.getDiffTree().countFor(IThreeWayDiff.INCOMING, IThreeWayDiff.DIRECTION_MASK);
break;
case ISynchronizePageConfiguration.BOTH_MODE:
- numChanges = numConflicts + context.getDiffTree().countFor(IThreeWayDiff.INCOMING, IThreeWayDiff.DIRECTION_MASK)
+ numChanges = numConflicts + context.getDiffTree().countFor(IThreeWayDiff.INCOMING, IThreeWayDiff.DIRECTION_MASK)
+ context.getDiffTree().countFor(IThreeWayDiff.OUTGOING, IThreeWayDiff.DIRECTION_MASK);
break;
default:
@@ -123,7 +123,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
}
return numChanges;
}
-
+
protected boolean hasChangesInMode(String id, ISynchronizationCompareAdapter adapter, int candidateMode) {
switch (candidateMode) {
case ISynchronizePageConfiguration.CONFLICTING_MODE:
@@ -213,7 +213,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
// Do nothing
}
-
+
@Override
public void propertyChange(PropertyChangeEvent event) {
if (event.getProperty().equals(ISynchronizePageConfiguration.P_MODE)
@@ -221,7 +221,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
calculateDescription();
}
}
-
+
@Override
protected Composite getEmptyChangesComposite(Composite parent) {
if (context.getDiffTree().isEmpty()) {
@@ -269,7 +269,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
}
return super.getEmptyChangesComposite(parent);
}
-
+
private boolean isAtLeastOneProviderDisabled() {
ModelProvider[] providers =findModelsWithChangesInMode(getConfiguration().getMode());
for (int i = 0; i < providers.length; i++) {
@@ -325,13 +325,13 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
message = NLS.bind(TeamUIMessages.DiffTreeChangesSection_10, message);
else
message = NLS.bind(TeamUIMessages.DiffTreeChangesSection_11, message);
-
+
createDescriptionLabel(composite, message);
-
+
Label warning = new Label(composite, SWT.NONE);
warning.setImage(TeamUIPlugin.getPlugin().getImage(ISharedImages.IMG_WARNING_OVR));
-
- Hyperlink link = getForms().createHyperlink(composite, TeamUIMessages.DiffTreeChangesSection_12, SWT.WRAP);
+
+ Hyperlink link = getForms().createHyperlink(composite, TeamUIMessages.DiffTreeChangesSection_12, SWT.WRAP);
link.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
@@ -354,7 +354,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
}
});
getForms().getHyperlinkGroup().add(link);
-
+
return composite;
}
@@ -379,14 +379,14 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
composite.setLayout(layout);
GridData data = new GridData(GridData.FILL_BOTH);
data.grabExcessVerticalSpace = true;
- composite.setLayoutData(data);
+ composite.setLayoutData(data);
- createDescriptionLabel(composite, NLS.bind(TeamUIMessages.DiffTreeChangesSection_3, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName()) }));
+ createDescriptionLabel(composite, NLS.bind(TeamUIMessages.DiffTreeChangesSection_3, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName()) }));
final boolean[] remember = new boolean[] { false };
final PreferenceStore store = (PreferenceStore) getConfiguration()
.getProperty(StartupPreferencePage.STARTUP_PREFERENCES);
- Hyperlink link = getForms().createHyperlink(composite, TeamUIMessages.DiffTreeChangesSection_4, SWT.WRAP);
+ Hyperlink link = getForms().createHyperlink(composite, TeamUIMessages.DiffTreeChangesSection_4, SWT.WRAP);
link.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
@@ -397,8 +397,8 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
}
});
getForms().getHyperlinkGroup().add(link);
-
- link = getForms().createHyperlink(composite, TeamUIMessages.DiffTreeChangesSection_5, SWT.WRAP);
+
+ link = getForms().createHyperlink(composite, TeamUIMessages.DiffTreeChangesSection_5, SWT.WRAP);
link.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
@@ -409,7 +409,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
}
});
getForms().getHyperlinkGroup().add(link);
-
+
if (store != null) {
final Button rememberButton = getForms().createButton(composite, TeamUIMessages.DiffTreeChangesSection_14, SWT.CHECK);
rememberButton.setToolTipText(TeamUIMessages.DiffTreeChangesSection_14);
@@ -430,7 +430,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
}
});
}
-
+
return composite;
}
@@ -473,16 +473,16 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
String message;
String modeToString = Utils.modeToString(getConfiguration().getMode());
message = NLS.bind(TeamUIMessages.DiffTreeChangesSection_0, new String[] {
- provider.getDescriptor().getLabel(),
+ provider.getDescriptor().getLabel(),
modeToString });
message = NLS.bind(TeamUIMessages.DiffTreeChangesSection_1, new String[] { modeToString, oldDesc.getLabel(), message });
-
+
createDescriptionLabel(composite, message);
-
+
Label warning = new Label(composite, SWT.NONE);
warning.setImage(TeamUIPlugin.getPlugin().getImage(ISharedImages.IMG_WARNING_OVR));
-
- Hyperlink link = getForms().createHyperlink(composite, NLS.bind(TeamUIMessages.DiffTreeChangesSection_2, new String[] { provider.getDescriptor().getLabel() }), SWT.WRAP);
+
+ 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) {
@@ -490,9 +490,9 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
}
});
getForms().getHyperlinkGroup().add(link);
-
+
new Label(composite, SWT.NONE);
- Hyperlink link2 = getForms().createHyperlink(composite, TeamUIMessages.DiffTreeChangesSection_13, SWT.WRAP);
+ Hyperlink link2 = getForms().createHyperlink(composite, TeamUIMessages.DiffTreeChangesSection_13, SWT.WRAP);
link2.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
@@ -500,7 +500,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
}
});
getForms().getHyperlinkGroup().add(link2);
-
+
return composite;
}
@@ -519,7 +519,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
}
});
}
-
+
@Override
protected void calculateDescription() {
if (errors != null && errors.length > 0) {
@@ -555,7 +555,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
public void notEmpty(TreeViewer viewer) {
calculateDescription();
}
-
+
private Composite getErrorComposite(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
composite.setBackground(getListBackgroundColor());
@@ -564,11 +564,11 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
composite.setLayout(layout);
GridData data = new GridData(GridData.FILL_BOTH);
data.grabExcessVerticalSpace = true;
- composite.setLayoutData(data);
+ composite.setLayoutData(data);
- createDescriptionLabel(composite, NLS.bind(TeamUIMessages.ChangesSection_10, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName()) }));
+ createDescriptionLabel(composite, NLS.bind(TeamUIMessages.ChangesSection_10, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName()) }));
- Hyperlink link = getForms().createHyperlink(composite, TeamUIMessages.ChangesSection_8, SWT.WRAP);
+ Hyperlink link = getForms().createHyperlink(composite, TeamUIMessages.ChangesSection_8, SWT.WRAP);
link.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
@@ -576,8 +576,8 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
}
});
getForms().getHyperlinkGroup().add(link);
-
- link = getForms().createHyperlink(composite, TeamUIMessages.ChangesSection_9, SWT.WRAP);
+
+ link = getForms().createHyperlink(composite, TeamUIMessages.ChangesSection_9, SWT.WRAP);
link.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
@@ -586,23 +586,23 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
SubscriberDiffTreeEventHandler handler = getHandler();
if (handler != null)
handler.initializeIfNeeded();
- else
+ else
getConfiguration().getParticipant().run(getConfiguration().getSite().getPart());
}
});
getForms().getHyperlinkGroup().add(link);
-
+
return composite;
}
/* private */ void showErrors() {
if (errors != null) {
IStatus[] status = errors;
- String title = TeamUIMessages.ChangesSection_11;
+ String title = TeamUIMessages.ChangesSection_11;
if (status.length == 1) {
ErrorDialog.openError(getShell(), title, status[0].getMessage(), status[0]);
} else {
- MultiStatus multi = new MultiStatus(TeamUIPlugin.ID, 0, status, TeamUIMessages.ChangesSection_12, null);
+ MultiStatus multi = new MultiStatus(TeamUIPlugin.ID, 0, status, TeamUIMessages.ChangesSection_12, null);
ErrorDialog.openError(getShell(), title, null, multi);
}
}
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 1e13c3e52..6e66ed306 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
@@ -27,7 +27,7 @@ public class DiffTreeStatusLineContributionGroup extends
super(shell, configuration);
getSynchronizationContext().getDiffTree().addDiffChangeListener(this);
}
-
+
@Override
public void dispose() {
getSynchronizationContext().getDiffTree().removeDiffChangeListener(this);
@@ -63,7 +63,7 @@ public class DiffTreeStatusLineContributionGroup extends
public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
updateCounts();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.diff.IDiffChangeListener#propertyChanged(int, org.eclipse.core.runtime.IPath[])
*/
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 f0ca7ed5a..8f5da0182 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
@@ -25,18 +25,18 @@ import org.eclipse.team.ui.synchronize.*;
import org.eclipse.ui.PlatformUI;
/**
- * An action that delegates to an appropriate handler when performing
+ * An action that delegates to an appropriate handler when performing
* a merge opereration.
- *
+ *
* @since 3.2
*/
public class MergeAction extends Action {
-
+
private final String handlerId;
private final CommonMenuManager manager;
private final ISynchronizePageConfiguration configuration;
private IHandler defaultHandler;
-
+
public MergeAction(String handlerId, CommonMenuManager manager, ISynchronizePageConfiguration configuration) {
Assert.isNotNull(handlerId);
Assert.isNotNull(manager);
@@ -45,7 +45,7 @@ public class MergeAction extends Action {
this.manager = manager;
this.configuration = configuration;
}
-
+
@Override
public void runWithEvent(Event event) {
IHandler handler = getHandler();
@@ -68,7 +68,7 @@ public class MergeAction extends Action {
} catch (CoreException e) {
throw new InvocationTargetException(e);
}
- }
+ }
});
} catch (InvocationTargetException e) {
Utils.handle(e);
@@ -116,7 +116,7 @@ public class MergeAction extends Action {
}
return handler;
}
-
+
private IHandler getDefaultHandler() {
return MergeActionHandler.getDefaultHandler(handlerId, configuration);
}
@@ -130,7 +130,7 @@ public class MergeAction extends Action {
if (defaultHandler != null)
defaultHandler.dispose();
}
-
+
public void update() {
setEnabled(calculateEnablement());
}
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 2f0294e5d..ae7a0e634 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
@@ -66,7 +66,7 @@ public class MergeAllActionHandler extends MergeActionHandler implements IDiffCh
synchronized (this) {
operation = null;
}
- setEnabled(event.getTree().countFor(IThreeWayDiff.INCOMING, IThreeWayDiff.DIRECTION_MASK) > 0
+ setEnabled(event.getTree().countFor(IThreeWayDiff.INCOMING, IThreeWayDiff.DIRECTION_MASK) > 0
|| event.getTree().countFor(IThreeWayDiff.CONFLICTING, IThreeWayDiff.DIRECTION_MASK) > 0);
}
@@ -77,7 +77,7 @@ public class MergeAllActionHandler extends MergeActionHandler implements IDiffCh
public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
// Nothing to do
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.MergeActionHandler#dispose()
*/
@@ -93,7 +93,7 @@ public class MergeAllActionHandler extends MergeActionHandler implements IDiffCh
return super.execute(event);
return null;
}
-
+
/**
* Prompt to save all dirty editors and return whether to proceed
* or not.
@@ -108,7 +108,7 @@ public class MergeAllActionHandler extends MergeActionHandler implements IDiffCh
}
return true;
}
-
+
private IResource[] getTargetResources() {
return getContext().getDiffTree().getAffectedResources();
}
@@ -129,28 +129,28 @@ public class MergeAllActionHandler extends MergeActionHandler implements IDiffCh
/**
* Return whether dirty editor should be saved before this action is run.
* Default is <code>true</code>.
- *
+ *
* @return whether dirty editor should be saved before this action is run
*/
protected boolean needsToSaveDirtyEditors() {
return true;
}
-
+
/**
* Returns whether the user should be prompted to save dirty editors. The
* default is <code>true</code>.
- *
+ *
* @return whether the user should be prompted to save dirty editors
*/
protected boolean confirmSaveOfDirtyEditor() {
return true;
}
-
+
protected String getJobName() {
String name = getConfiguration().getParticipant().getName();
return NLS.bind(TeamUIMessages.MergeAllActionHandler_0, Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, name));
}
-
+
protected boolean promptToUpdate() {
final IResourceDiffTree tree = getContext().getDiffTree();
if (tree.isEmpty()) {
@@ -164,10 +164,10 @@ public class MergeAllActionHandler extends MergeActionHandler implements IDiffCh
@Override
public void run() {
String sizeString = Long.toString(count);
- String message = tree.size() > 1 ? NLS.bind(TeamUIMessages.MergeAllActionHandler_1, new String[] { sizeString }) :
+ String message = tree.size() > 1 ? NLS.bind(TeamUIMessages.MergeAllActionHandler_1, new String[] { sizeString }) :
NLS.bind(TeamUIMessages.MergeAllActionHandler_2, new String[] { sizeString });
- result[0] = MessageDialog.openQuestion(getConfiguration().getSite().getShell(),
- NLS.bind(TeamUIMessages.MergeAllActionHandler_3, new String[] { sizeString }), message);
+ result[0] = MessageDialog.openQuestion(getConfiguration().getSite().getShell(),
+ NLS.bind(TeamUIMessages.MergeAllActionHandler_3, new String[] { sizeString }), message);
}
});
return result[0];
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 96971f099..8c61c4ed1 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
@@ -26,7 +26,7 @@ import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
import org.eclipse.team.ui.synchronize.ModelMergeOperation;
public final class MergeAllOperation extends SynchronizationOperation {
-
+
private final IMergeContext context;
private final String jobName;
@@ -35,7 +35,7 @@ public final class MergeAllOperation extends SynchronizationOperation {
this.jobName = jobName;
this.context = context;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -122,7 +122,7 @@ public final class MergeAllOperation extends SynchronizationOperation {
protected boolean canRunAsJob() {
return true;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.TeamOperation#getJobName()
*/
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 150f29a73..2de7cbe10 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
@@ -32,7 +32,7 @@ import org.eclipse.ui.PlatformUI;
public class MergeIncomingChangesAction extends ModelParticipantAction implements IHandlerListener {
IHandler handler;
-
+
public MergeIncomingChangesAction(ISynchronizePageConfiguration configuration) {
super(null, configuration);
// TODO: We're past the API freeze so we need to access the property by string
@@ -41,7 +41,7 @@ public class MergeIncomingChangesAction extends ModelParticipantAction implement
handler = new MergeAllActionHandler(configuration);
handler.addHandlerListener(this);
}
-
+
@Override
public void runWithEvent(Event event) {
if (handler == null || !handler.isEnabled())
@@ -61,7 +61,7 @@ public class MergeIncomingChangesAction extends ModelParticipantAction implement
handle(e);
}
}
-
+
private void handle(Throwable throwable) {
if (throwable instanceof ExecutionException) {
ExecutionException ee = (ExecutionException) throwable;
@@ -79,7 +79,7 @@ public class MergeIncomingChangesAction extends ModelParticipantAction implement
protected boolean isEnabledForSelection(IStructuredSelection selection) {
return handler.isEnabled();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.operations.ModelProviderAction#getDiffFilter()
*/
@@ -97,12 +97,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() {
+ PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException,
InterruptedException {
@@ -128,5 +128,5 @@ public class MergeIncomingChangesAction extends ModelParticipantAction implement
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 e7fd554ae..235924fb7 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
@@ -37,7 +37,7 @@ import org.eclipse.ui.*;
public class ModelCompareEditorInput extends SaveableCompareEditorInput implements IPropertyChangeListener {
private static final String IGNORE_WHITSPACE_PAGE_PROPERTY = "org.eclipse.compare." + CompareConfiguration.IGNORE_WHITESPACE; //$NON-NLS-1$
-
+
private final ModelSynchronizeParticipant participant;
private final ICompareInput input;
private final ICacheListener contextListener;
@@ -77,7 +77,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
super.contentsCreated();
participant.getContext().getCache().addCacheListener(contextListener);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#handleDispose()
*/
@@ -96,7 +96,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
});
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.LocalResourceCompareEditorInput#createSaveable()
*/
@@ -153,7 +153,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
}
return false;
}
-
+
/*
* (non-Javadoc)
* @see org.eclipse.ui.IEditorInput#getToolTipText()
@@ -180,7 +180,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
rdci.fireChange();
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#registerContextMenu(org.eclipse.jface.action.MenuManager)
*/
@@ -211,11 +211,11 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
}
}
-
+
};
Utils.initAction(markAsMergedAction, "action.markAsMerged."); //$NON-NLS-1$
markAsMergedAction.setEnabled(markAsMergedAction.isEnabled());
-
+
final ResourceMergeHandler mergeHandler = new ResourceMergeHandler(getSynchronizeConfiguration(), false);
mergeHandler.updateEnablement(selection);
Action mergeAction = new Action(TeamUIMessages.ModelCompareEditorInput_1) {
@@ -227,11 +227,11 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
}
}
-
+
};
Utils.initAction(mergeAction, "action.merge."); //$NON-NLS-1$
mergeAction.setEnabled(mergeAction.isEnabled());
-
+
final ResourceMergeHandler overwriteHandler = new ResourceMergeHandler(getSynchronizeConfiguration(), true);
overwriteHandler.updateEnablement(selection);
Action overwriteAction = new Action(TeamUIMessages.ModelCompareEditorInput_2) {
@@ -243,11 +243,11 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
}
}
-
+
};
Utils.initAction(overwriteAction, "action.overwrite."); //$NON-NLS-1$
overwriteAction.setEnabled(overwriteAction.isEnabled());
-
+
manager.insertAfter(IWorkbenchActionConstants.MB_ADDITIONS, new Separator("merge")); //$NON-NLS-1$
manager.insertAfter("merge", new Separator("overwrite")); //$NON-NLS-1$ //$NON-NLS-2$
manager.insertAfter("merge", markAsMergedAction); //$NON-NLS-1$
@@ -265,7 +265,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
synchronizeConfiguration.setProperty(IGNORE_WHITSPACE_PAGE_PROPERTY, event.getNewValue());
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#belongsTo(java.lang.Object)
*/
@@ -273,7 +273,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
public boolean belongsTo(Object family) {
return super.belongsTo(family) || family == participant;
}
-
+
@Override
public synchronized ICompareNavigator getNavigator() {
if (isSelectedInSynchronizeView()) {
@@ -294,7 +294,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
}
return false;
}
-
+
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@@ -308,7 +308,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
}
return false;
}
-
+
/* (non-Javadoc)
* @see java.lang.Object#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 b8ca30776..ec1e09e53 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
@@ -40,7 +40,7 @@ import org.eclipse.ui.navigator.*;
import org.eclipse.ui.views.navigator.ResourceComparator;
public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage implements INavigatorContentServiceListener {
-
+
private INavigatorContentService service;
private ISynchronizationScopeManager manager;
private ContainerCheckedTreeViewer fViewer;
@@ -48,14 +48,14 @@ public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage
public ModelElementSelectionPage(IResource[] roots) {
super("elementSelection"); //$NON-NLS-1$
- setDescription(TeamUIMessages.GlobalRefreshResourceSelectionPage_2);
+ setDescription(TeamUIMessages.GlobalRefreshResourceSelectionPage_2);
setTitle(TeamUIMessages.GlobalRefreshResourceSelectionPage_3);
List result = new ArrayList();
for (int i = 0; i < roots.length; i++) {
IResource resource = roots[i];
result.add(Utils.getResourceMapping(resource));
}
- manager = new SynchronizationScopeManager(TeamUIMessages.ModelElementSelectionPage_0, (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]),
+ manager = new SynchronizationScopeManager(TeamUIMessages.ModelElementSelectionPage_0, (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]),
ResourceMappingContext.LOCAL_CONTEXT, true);
}
@@ -110,7 +110,7 @@ public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage
fViewer.setComparator(new ResourceComparator(ResourceComparator.NAME));
return fViewer;
}
-
+
public ResourceMapping[] getSelectedMappings() {
if (isWorkingSetSelected()) {
List result = new ArrayList();
@@ -146,7 +146,7 @@ public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage
}
return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
}
-
+
@Override
public void dispose() {
service.dispose();
@@ -197,7 +197,7 @@ public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage
public void onLoad(INavigatorContentExtension anExtension) {
anExtension.getStateModel().setProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_SCOPE, manager.getScope());
}
-
+
@Override
public void setVisible(boolean visible) {
super.setVisible(visible);
@@ -214,13 +214,13 @@ public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage
break;
}
}
-
+
if (!foundEnabledModelProvider){
if (MessageDialog.openConfirm(getShell(), TeamUIMessages.ModelElementSelectionPage_AllModelsDisabledTitle, TeamUIMessages.ModelElementSelectionPage_AllModelsDisabledMessage)) {
ArrayList teamProviderDescriptors = new ArrayList();
for (int i = 0; i < providers.length; i++)
teamProviderDescriptors.add(TeamUI.getTeamContentProviderManager().getDescriptor(providers[i].getId()));
-
+
ITeamContentProviderDescriptor[] desc = (ITeamContentProviderDescriptor[]) teamProviderDescriptors.toArray(new ITeamContentProviderDescriptor[teamProviderDescriptors.size()]);
TeamUI.getTeamContentProviderManager().setEnabledDescriptors(desc);
}
@@ -246,7 +246,7 @@ public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage
throw new InvocationTargetException(e);
}
}
-
+
});
} catch (InvocationTargetException e) {
Utils.handleError(getShell(), e, null, null);
@@ -254,14 +254,14 @@ public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage
// ignore
}
}
-
+
private boolean isEnabled(ModelProvider provider) {
ITeamContentProviderDescriptor desc = TeamUI.getTeamContentProviderManager().getDescriptor(provider.getId());
return (desc != null && desc.isEnabled());
}
-
+
private void uncheckOtherModels(String modelProviderId) {
-
+
if (!isSelectedResourcesSelected()) {
ModelProvider[] providers = manager.getScope().getModelProviders();
ArrayList disabledProviders = new ArrayList();
@@ -276,8 +276,8 @@ public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage
fViewer.setChecked(disable, false);
}
}
-
-
+
+
}
}
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 846b10dc3..bde22f3ab 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
@@ -32,9 +32,9 @@ import org.eclipse.ui.*;
public class ModelEnablementPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
private Set previosulyEnabled = new HashSet();
-
+
public ModelEnablementPreferencePage() {
- setTitle(TeamUIMessages.ModelEnablementPreferencePage_0);
+ setTitle(TeamUIMessages.ModelEnablementPreferencePage_0);
setPreferenceStore(TeamUIPlugin.getPlugin().getPreferenceStore());
}
@@ -42,14 +42,14 @@ public class ModelEnablementPreferencePage extends PreferencePage implements IWo
@Override
protected Control createContents(Composite parent) {
-
+
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new GridLayout());
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
+
Label l = SWTUtils.createLabel(composite, TeamUIMessages.ModelEnablementPreferencePage_1);
l.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
+
tableViewer = CheckboxTableViewer.newCheckList(composite, SWT.BORDER);
tableViewer.getTable().setLayoutData(new GridData(GridData.FILL_BOTH));
tableViewer.setContentProvider(new IStructuredContentProvider() {
@@ -82,10 +82,10 @@ public class ModelEnablementPreferencePage extends PreferencePage implements IWo
}
private String getTextFor(ITeamContentProviderDescriptor teamContentDescriptor) {
String name = teamContentDescriptor.getName();
-
+
if (name != null && !name.equals("")) //$NON-NLS-1$
return name;
-
+
String modelProviderID = teamContentDescriptor.getModelProviderId();
IModelProviderDescriptor desc = ModelProvider.getModelProviderDescriptor(modelProviderID);
if (desc != null) {
@@ -137,10 +137,10 @@ public class ModelEnablementPreferencePage extends PreferencePage implements IWo
tableViewer.setInput(TeamUI.getTeamContentProviderManager());
updateChecks();
applyDialogFont(composite);
-
+
//F1
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.MODEL_PREFERENCE_PAGE);
-
+
return composite;
}
@@ -154,7 +154,7 @@ public class ModelEnablementPreferencePage extends PreferencePage implements IWo
}
tableViewer.setCheckedElements(previosulyEnabled.toArray());
}
-
+
@Override
public boolean performOk() {
Object[] checked = tableViewer.getCheckedElements();
@@ -186,7 +186,7 @@ public class ModelEnablementPreferencePage extends PreferencePage implements IWo
}
return false;
}
-
+
@Override
protected void performDefaults() {
tableViewer.setCheckedElements(TeamUI.getTeamContentProviderManager().getDescriptors());
@@ -198,7 +198,7 @@ public class ModelEnablementPreferencePage extends PreferencePage implements IWo
}
private String getLabel(IModelProviderDescriptor desc) {
- // Only do this for the resource model since we don;t want to
+ // Only do this for the resource model since we don;t want to
// load all model providers (see bug 133604)
if (desc.getId().equals(ModelProvider.RESOURCE_MODEL_PROVIDER_ID))
try {
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 3df56f465..3ecb78b1d 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
@@ -33,7 +33,7 @@ public class ModelSelectionDropDownAction extends Action implements ISynchroniza
private org.eclipse.jface.util.IPropertyChangeListener listener;
private MenuCreator menuCreator;
private Action showAllFlatAction;
-
+
private class MenuCreator implements IMenuCreator {
@Override
public void dispose() {
@@ -57,7 +57,7 @@ public class ModelSelectionDropDownAction extends Action implements ISynchroniza
addModelsToMenu(modelProviders);
menuManager.add(new Separator());
menuManager.add(showAllFlatAction);
-
+
menuManager.update(true);
} else {
fMenu = menuManager.getMenu();
@@ -88,7 +88,7 @@ public class ModelSelectionDropDownAction extends Action implements ISynchroniza
this.configuration.addPropertyChangeListener(listener);
TeamUI.getTeamContentProviderManager().addPropertyChangeListener(listener);
getSynchronizationContext().getScope().addScopeChangeListener(this);
- showAllAction = new Action(TeamUIMessages.ModelSelectionDropDownAction_0, IAction.AS_RADIO_BUTTON) {
+ showAllAction = new Action(TeamUIMessages.ModelSelectionDropDownAction_0, IAction.AS_RADIO_BUTTON) {
@Override
public void run() {
ModelSelectionDropDownAction.this.configuration.setProperty(
@@ -98,7 +98,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) {
+ showAllFlatAction = new Action(TeamUIMessages.ModelSelectionDropDownAction_2, IAction.AS_CHECK_BOX) {
@Override
public void run() {
boolean checked = showAllFlatAction.isChecked();
@@ -110,8 +110,8 @@ public class ModelSelectionDropDownAction extends Action implements ISynchroniza
showAllFlatAction.setImageDescriptor(TeamImages.getImageDescriptor(ITeamUIImages.IMG_FLAT));
//showAllAction.setActionDefinitionId("org.eclipse.team.ui.showAllModels"); //$NON-NLS-1$
menuCreator = new MenuCreator();
- setMenuCreator(menuCreator);
- update();
+ setMenuCreator(menuCreator);
+ update();
}
private ISynchronizationContext getSynchronizationContext() {
@@ -156,10 +156,10 @@ public class ModelSelectionDropDownAction extends Action implements ISynchroniza
id = ModelSynchronizeParticipant.ALL_MODEL_PROVIDERS_VISIBLE;
return id;
}
-
+
private ModelProvider getNextProvider() {
ModelProvider[] providers = getSynchronizationContext().getScope().getModelProviders();
- if (providers.length == 0)
+ if (providers.length == 0)
return null;
providers = ModelOperation.sortByExtension(providers);
String id = getActiveProviderId();
@@ -181,7 +181,7 @@ public class ModelSelectionDropDownAction extends Action implements ISynchroniza
public void update() {
ModelProvider next = getNextProvider();
if (next == null) return;
- String text = NLS.bind(TeamUIMessages.ModelSelectionDropDownAction_1, next.getDescriptor().getLabel());
+ String text = NLS.bind(TeamUIMessages.ModelSelectionDropDownAction_1, next.getDescriptor().getLabel());
setToolTipText(text);
setText(text);
if (menuManager != null) {
@@ -202,7 +202,7 @@ public class ModelSelectionDropDownAction extends Action implements ISynchroniza
}
// TODO: need to update the check mark
}
-
+
private boolean isFlatEnabled() {
String p = (String)configuration.getProperty(ITeamContentProviderManager.PROP_PAGE_LAYOUT);
return p != null && p.equals(ITeamContentProviderManager.FLAT_LAYOUT);
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 154c1eef4..8be0393bb 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
@@ -25,7 +25,7 @@ import org.eclipse.team.ui.synchronize.*;
/**
* A synchronize page for displaying a {@link ModelSynchronizeParticipant}.
- *
+ *
* @since 3.2
**/
public class ModelSynchronizePage extends AbstractSynchronizePage {
@@ -39,8 +39,8 @@ public class ModelSynchronizePage extends AbstractSynchronizePage {
public ModelSynchronizePage(ISynchronizePageConfiguration configuration) {
super(configuration);
this.participant = (ModelSynchronizeParticipant)configuration.getParticipant();
- configuration.setComparisonType(isThreeWay()
- ? ISynchronizePageConfiguration.THREE_WAY
+ configuration.setComparisonType(isThreeWay()
+ ? ISynchronizePageConfiguration.THREE_WAY
: ISynchronizePageConfiguration.TWO_WAY);
configuration.addActionContribution(new RefreshActionContribution());
}
@@ -84,7 +84,7 @@ public class ModelSynchronizePage extends AbstractSynchronizePage {
updateMode(getConfiguration().getMode());
return commonViewerAdvisor;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizePage#createChangesSection()
*/
@@ -92,7 +92,7 @@ public class ModelSynchronizePage extends AbstractSynchronizePage {
protected ChangesSection createChangesSection(Composite parent) {
return new DiffTreeChangesSection(parent, this, getConfiguration());
}
-
+
@Override
public void init(ISynchronizePageSite site) {
super.init(site);
@@ -108,7 +108,7 @@ public class ModelSynchronizePage extends AbstractSynchronizePage {
}
}
}
-
+
@Override
public boolean aboutToChangeProperty(ISynchronizePageConfiguration configuration, String key, Object newValue) {
if (key.equals(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER)) {
@@ -118,7 +118,7 @@ public class ModelSynchronizePage extends AbstractSynchronizePage {
String currentSetting = (String)configuration.getProperty(ModelSynchronizeParticipant.P_VISIBLE_MODEL_PROVIDER);
if (currentSetting != null && currentSetting.equals(newValue))
return false;
-
+
Object input = getViewerInput(configuration,(String) newValue);
if (input instanceof ModelProvider) {
ModelProvider provider = (ModelProvider) input;
@@ -146,7 +146,7 @@ public class ModelSynchronizePage extends AbstractSynchronizePage {
String currentSetting = (String)configuration.getProperty(ITeamContentProviderManager.PROP_PAGE_LAYOUT);
if (currentSetting != null && currentSetting.equals(newValue))
return false;
-
+
IDialogSettings pageSettings = configuration.getSite().getPageSettings();
if(pageSettings != null) {
pageSettings.put(ITeamContentProviderManager.PROP_PAGE_LAYOUT, (String) newValue);
@@ -168,7 +168,7 @@ public class ModelSynchronizePage extends AbstractSynchronizePage {
ModelProvider provider = getModelProvider(providerId);
if (provider != null) {
input = provider;
- }
+ }
} else {
input = (ISynchronizationContext)configuration.getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
}
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 c97e6a4af..00d415c08 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
@@ -80,7 +80,7 @@ public class RemoveFromViewAction extends ResourceModelParticipantAction {
tree.endInput(monitor);
}
}
-
+
private IResource[] getVisibleResources(IProgressMonitor monitor) throws CoreException {
ResourceTraversal[] traversals = getResourceTraversals(getStructuredSelection(), monitor);
IDiff[] diffs = getSynchronizationContext().getDiffTree().getDiffs(traversals);
@@ -93,7 +93,7 @@ public class RemoveFromViewAction extends ResourceModelParticipantAction {
}
return (IResource[]) result.toArray(new IResource[result.size()]);
}
-
+
private boolean confirmRemove() {
IPreferenceStore store = TeamUIPlugin.getPlugin().getPreferenceStore();
if (store.getBoolean(IPreferenceIds.SYNCVIEW_REMOVE_FROM_VIEW_NO_PROMPT)) {
@@ -101,9 +101,9 @@ public class RemoveFromViewAction extends ResourceModelParticipantAction {
} else {
MessageDialogWithToggle dialog = MessageDialogWithToggle.openOkCancelConfirm(
getConfiguration().getSite().getShell(),
- TeamUIMessages.RemoveFromView_warningTitle,
- TeamUIMessages.RemoveFromView_warningMessage,
- TeamUIMessages.RemoveFromView_warningDontShow,
+ TeamUIMessages.RemoveFromView_warningTitle,
+ TeamUIMessages.RemoveFromView_warningMessage,
+ TeamUIMessages.RemoveFromView_warningDontShow,
false,
null,
null);
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 5ff82b795..f253c21af 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
@@ -41,7 +41,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
static final String RESOURCE_CHANGE_NOTIFIER_PROPERTY = "org.eclipse.team.ui.ResourceChangeNotifier"; //$NON-NLS-1$
private ISynchronizationContext context;
-
+
private class CompareInputLabelProvider extends BaseLabelProvider implements ICompareInputLabelProvider {
@Override
@@ -66,9 +66,9 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
fetchAuthors(rdci);
}
}
- return NLS.bind(TeamUIMessages.SyncInfoCompareInput_baseLabelExists, new String[] { revision.getContentIdentifier() });
+ return NLS.bind(TeamUIMessages.SyncInfoCompareInput_baseLabelExists, new String[] { revision.getContentIdentifier() });
} else {
- return TeamUIMessages.SyncInfoCompareInput_baseLabel;
+ return TeamUIMessages.SyncInfoCompareInput_baseLabel;
}
}
}
@@ -98,9 +98,9 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
}
}
}
- return NLS.bind(TeamUIMessages.SyncInfoCompareInput_localLabelExists, new String[] { localContentId });
+ return NLS.bind(TeamUIMessages.SyncInfoCompareInput_localLabelExists, new String[] { localContentId });
} else {
- return TeamUIMessages.SyncInfoCompareInput_localLabel;
+ return TeamUIMessages.SyncInfoCompareInput_localLabel;
}
}
return null;
@@ -128,9 +128,9 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
fetchAuthors(rdci);
}
}
- return NLS.bind(TeamUIMessages.SyncInfoCompareInput_remoteLabelExists, new String[] { revision.getContentIdentifier() });
+ return NLS.bind(TeamUIMessages.SyncInfoCompareInput_remoteLabelExists, new String[] { revision.getContentIdentifier() });
} else {
- return TeamUIMessages.SyncInfoCompareInput_remoteLabel;
+ return TeamUIMessages.SyncInfoCompareInput_remoteLabel;
}
}
}
@@ -154,18 +154,18 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
}
return null;
}
-
+
public void fireChangeEvent(final Object element) {
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
fireLabelProviderChanged(new LabelProviderChangedEvent(CompareInputLabelProvider.this, element));
}
-
+
});
}
}
-
+
/**
* Return a compare input change notifier that will detect changes in the synchronization context and
* translate them into compare input change events by calling {@link ResourceDiffCompareInput#update()}.
@@ -184,7 +184,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
private final CompareInputLabelProvider labelProvider = new CompareInputLabelProvider();
private Object fetchingInput;
-
+
/**
* Create a notifier
* @param context a synchronization context
@@ -195,7 +195,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
// We can initialize in the constructor since the context will allow us to dispose
initialize();
}
-
+
@Override
public void initialize() {
context.getDiffTree().addDiffChangeListener(this);
@@ -207,7 +207,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
});
super.initialize();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.mapping.CompareInputChangeNotifier#dispose()
*/
@@ -245,11 +245,11 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
if (input != null)
changedInputs.add(input);
}
-
+
if (!changedInputs.isEmpty())
handleInputChanges((ICompareInput[]) changedInputs.toArray(new ICompareInput[changedInputs.size()]), false);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.diff.IDiffChangeListener#propertyChanged(org.eclipse.team.core.diff.IDiffTree, int, org.eclipse.core.runtime.IPath[])
*/
@@ -257,7 +257,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
// Property changes are not interesting w.r.t. state changes
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.mapping.CompareInputChangeNotifier#getResources(org.eclipse.compare.structuremergeviewer.ICompareInput)
*/
@@ -268,7 +268,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
return new IResource[0];
return new IResource[] { resource };
}
-
+
private IResource getResource(ICompareInput input) {
if (input instanceof IResourceProvider) {
IResourceProvider rp = (IResourceProvider) input;
@@ -276,7 +276,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
}
return Utils.getResource(input);
}
-
+
private ICompareInput findInput(IPath path) {
ICompareInput[] inputs = getConnectedInputs();
for (int i = 0; i < inputs.length; i++) {
@@ -300,7 +300,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
}
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.mapping.CompareInputChangeNotifier#prepareInput(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -348,7 +348,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
private void fireLabelProviderChange(Object input) {
labelProvider.fireChangeEvent(input);
}
-
+
/**
* Return the synchronization context to which this notifier is associated.
* @return the synchronization context to which this notifier is associated
@@ -356,7 +356,7 @@ public class ResourceCompareInputChangeNotifier extends CompareInputChangeNotifi
public final ISynchronizationContext getContext() {
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 e4d4ab2e8..eafb8b31f 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
@@ -35,7 +35,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
private IDiff node;
private final ISynchronizationContext context;
-
+
public static int getCompareKind(IDiff node) {
int compareKind = 0;
if (node != null) {
@@ -51,7 +51,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
break;
}
if (node instanceof IThreeWayDiff) {
- IThreeWayDiff twd = (IThreeWayDiff) node;
+ IThreeWayDiff twd = (IThreeWayDiff) node;
switch (twd.getDirection()) {
case IThreeWayDiff.OUTGOING :
compareKind |= Differencer.RIGHT;
@@ -68,7 +68,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
}
return compareKind;
}
-
+
private static FileRevisionTypedElement getRightContributor(IDiff node) {
// For a resource diff, use the after state
if (node instanceof IResourceDiff) {
@@ -84,7 +84,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
// There's no remote change so use the before state of the local
diff = (IResourceDiff)twd.getLocalChange();
return asTypedElement(diff.getBeforeState(), getLocalEncoding(node));
-
+
}
return null;
}
@@ -101,7 +101,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
if (diff == null)
diff = (IResourceDiff)twd.getRemoteChange();
return asTypedElement(diff.getBeforeState(), getLocalEncoding(node));
-
+
}
return null;
}
@@ -130,7 +130,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
ensureContentsCached(getAncestor(diff), getRightContributor(diff), monitor);
}
}
-
+
private static void ensureContentsCached(Object ancestor, Object right,
IProgressMonitor monitor) throws CoreException {
SubMonitor sm = SubMonitor.convert(monitor, 100);
@@ -147,7 +147,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
if (monitor != null)
monitor.done();
}
-
+
/**
* Create the compare input on the given diff.
* @param diff the diff
@@ -158,17 +158,17 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
this.node = diff;
this.context = context;
}
-
+
/**
* Fire a compare input change event.
- * This method is public so that the change can be fired
+ * 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();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.ISynchronizationCompareInput#prepareInput(org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -257,7 +257,7 @@ public class ResourceDiffCompareInput extends AbstractCompareInput implements IS
}
return false;
}
-
+
private boolean isEqual(ITypedElement e1, ITypedElement e2) {
if (e1 == null) {
return e2 == null;
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 0e7927afe..fc478812f 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
@@ -25,7 +25,7 @@ import org.eclipse.ui.part.ResourceTransfer;
/**
* Drag adapter assistant used for the Common Navigator based viewer for use by a
* {@link ModelSynchronizePage}.
- *
+ *
* @since 3.6
*/
public class ResourceDragAdapterAssistant extends CommonDragAdapterAssistant {
@@ -38,7 +38,7 @@ public class ResourceDragAdapterAssistant extends CommonDragAdapterAssistant {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.navigator.CommonDragAdapterAssistant#getSupportedTransferTypes()
*/
@Override
@@ -48,7 +48,7 @@ public class ResourceDragAdapterAssistant extends CommonDragAdapterAssistant {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.navigator.CommonDragAdapterAssistant#setDragData(org.eclipse.swt.dnd.DragSourceEvent,
* org.eclipse.jface.viewers.IStructuredSelection)
*/
@@ -66,7 +66,7 @@ public class ResourceDragAdapterAssistant extends CommonDragAdapterAssistant {
}
return true;
}
-
+
if (FileTransfer.getInstance().isSupportedType(anEvent.dataType)) {
// Get the path of each file and set as the drag data
final int length = resources.length;
@@ -88,7 +88,7 @@ public class ResourceDragAdapterAssistant extends CommonDragAdapterAssistant {
fileNames[i] = tempFileNames[i];
}
anEvent.data = fileNames;
-
+
if (Policy.DEBUG_DND)
System.out
.println("ResourceDragAdapterAssistant.dragSetData set FileTransfer"); //$NON-NLS-1$
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 e6e5cb985..dd2159589 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
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
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 3ceb2637e..2eb5ec0b2 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
@@ -36,7 +36,7 @@ public class ResourceMarkAsMergedHandler extends ResourceMergeActionHandler {
public ResourceMarkAsMergedHandler(ISynchronizePageConfiguration configuration) {
super(configuration);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.MergeActionHandler#getOperation()
*/
@@ -61,14 +61,14 @@ public class ResourceMarkAsMergedHandler extends ResourceMergeActionHandler {
throws CoreException {
markAsMerged(deltas, context, monitor);
}
-
+
}, rule, IResource.NONE, monitor);
-
+
} catch (CoreException e) {
throw new InvocationTargetException(e);
}
}
-
+
private ISchedulingRule getMergeRule(IMergeContext context,
IDiff[] deltas) {
ISchedulingRule result = null;
@@ -83,13 +83,13 @@ public class ResourceMarkAsMergedHandler extends ResourceMergeActionHandler {
}
return result;
}
-
+
private void markAsMerged(IDiff[] deltas,
final IMergeContext context, IProgressMonitor monitor)
throws CoreException {
context.markAsMerged(deltas, false, monitor);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.mapping.ResourceModelProviderOperation#getDiffFilter()
*/
@@ -120,8 +120,8 @@ public class ResourceMarkAsMergedHandler extends ResourceMergeActionHandler {
}
return operation;
}
-
-
+
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.MergeActionHandler#updateEnablement(org.eclipse.jface.viewers.IStructuredSelection)
*/
@@ -132,7 +132,7 @@ public class ResourceMarkAsMergedHandler extends ResourceMergeActionHandler {
}
super.updateEnablement(selection);
int mode = getConfiguration().getMode();
- if ((mode == ISynchronizePageConfiguration.OUTGOING_MODE
+ if ((mode == ISynchronizePageConfiguration.OUTGOING_MODE
&& getSynchronizationContext().getDiffTree().countFor(IThreeWayDiff.CONFLICTING, IThreeWayDiff.DIRECTION_MASK) == 0)
|| (getSynchronizationContext().getDiffTree().countFor(IThreeWayDiff.CONFLICTING, IThreeWayDiff.DIRECTION_MASK) == 0
&& getSynchronizationContext().getDiffTree().countFor(IThreeWayDiff.INCOMING, IThreeWayDiff.DIRECTION_MASK) == 0)) {
@@ -140,12 +140,12 @@ public class ResourceMarkAsMergedHandler extends ResourceMergeActionHandler {
return;
}
}
-
+
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
if (saveDirtyEditors())
return super.execute(event);
return null;
}
-
+
}
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 e6cfd5def..7f5e0f740 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
@@ -51,7 +51,7 @@ public abstract class ResourceMergeActionHandler extends MergeActionHandler impl
}
return true;
}
-
+
private IResource[] getTargetResources() {
IStructuredSelection selection = getStructuredSelection();
Object[] objects = selection.toArray();
@@ -94,32 +94,32 @@ public abstract class ResourceMergeActionHandler extends MergeActionHandler impl
/**
* Return whether dirty editor should be saved before this action is run.
* Default is <code>true</code>.
- *
+ *
* @return whether dirty editor should be saved before this action is run
*/
protected boolean needsToSaveDirtyEditors() {
return true;
}
-
+
/**
* Returns whether the user should be prompted to save dirty editors. The
* default is <code>true</code>.
- *
+ *
* @return whether the user should be prompted to save dirty editors
*/
protected boolean confirmSaveOfDirtyEditor() {
return true;
}
-
+
protected ISynchronizationContext getSynchronizationContext() {
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() {
@@ -128,9 +128,9 @@ public abstract class ResourceMergeActionHandler extends MergeActionHandler impl
updateEnablement(getStructuredSelection());
}
}, (StructuredViewer)getConfiguration().getPage().getViewer());
-
+
}
-
+
@Override
public void propertyChange(PropertyChangeEvent event) {
if (event.getProperty() == ISynchronizePageConfiguration.P_MODE) {
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 07458083d..d140ce363 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
@@ -29,7 +29,7 @@ import org.eclipse.team.ui.mapping.SynchronizationOperation;
import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
public class ResourceMergeHandler extends ResourceMergeActionHandler {
-
+
private final boolean overwrite;
private ResourceModelProviderOperation operation;
@@ -91,7 +91,7 @@ public class ResourceMergeHandler extends ResourceMergeActionHandler {
if (diffs.length == 1)
return TeamUIMessages.ResourceMergeHandler_0;
return NLS.bind(TeamUIMessages.ResourceMergeHandler_1, new Integer(diffs.length).toString());
-
+
}
if (diffs.length == 1)
return TeamUIMessages.ResourceMergeHandler_2;
@@ -101,7 +101,7 @@ public class ResourceMergeHandler extends ResourceMergeActionHandler {
}
return operation;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.MergeActionHandler#updateEnablement(org.eclipse.jface.viewers.IStructuredSelection)
*/
@@ -117,7 +117,7 @@ public class ResourceMergeHandler extends ResourceMergeActionHandler {
return;
}
}
-
+
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
if (saveDirtyEditors() && (!overwrite || promptToConfirm()))
@@ -136,7 +136,7 @@ public class ResourceMergeHandler extends ResourceMergeActionHandler {
public void run() {
confirmed[0] = promptToConfirm();
}
-
+
}, shell);
}
return confirmed[0];
@@ -155,5 +155,5 @@ public class ResourceMergeHandler extends ResourceMergeActionHandler {
}, (StructuredViewer)getConfiguration().getPage().getViewer());
}
-
+
}
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 4cbe97c1a..24ded278a 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
@@ -27,7 +27,7 @@ import org.eclipse.ui.navigator.*;
public class ResourceModelActionProvider extends SynchronizationActionProvider {
private RefactorActionGroup refactorActions;
-
+
public ResourceModelActionProvider() {
}
@@ -39,17 +39,17 @@ public class ResourceModelActionProvider extends SynchronizationActionProvider {
super.initialize();
// Register the merge, overwrite and mark-as-merged handlers
ResourceMergeHandler mergeHandler = new ResourceMergeHandler(
- (ISynchronizePageConfiguration)getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION),
+ (ISynchronizePageConfiguration)getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION),
false /* overwrite */);
registerHandler(MERGE_ACTION_ID, mergeHandler);
ResourceMergeHandler overwriteHandler = new ResourceMergeHandler(
- (ISynchronizePageConfiguration)getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION),
+ (ISynchronizePageConfiguration)getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION),
true /* overwrite */);
registerHandler(OVERWRITE_ACTION_ID, overwriteHandler);
ResourceMarkAsMergedHandler markAsMergedHandler = new ResourceMarkAsMergedHandler(
(ISynchronizePageConfiguration)getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION));
registerHandler(MARK_AS_MERGE_ACTION_ID, markAsMergedHandler);
-
+
ICommonViewerSite cvs = getActionSite().getViewSite();
ISynchronizePageConfiguration configuration = getSynchronizePageConfiguration();
if (cvs instanceof ICommonViewerWorkbenchSite && configuration != null) {
@@ -60,7 +60,7 @@ public class ResourceModelActionProvider extends SynchronizationActionProvider {
}
}
}
-
+
private INavigatorContentService getNavigatorContentService(ISynchronizePageConfiguration configuration) {
Viewer v = configuration.getPage().getViewer();
if (v instanceof CommonViewer) {
@@ -78,7 +78,7 @@ public class ResourceModelActionProvider extends SynchronizationActionProvider {
super.fillActionBars(actionBars);
if (refactorActions != null) refactorActions.fillActionBars(actionBars);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationActionProvider#fillContextMenu(org.eclipse.jface.action.IMenuManager)
*/
@@ -90,7 +90,7 @@ public class ResourceModelActionProvider extends SynchronizationActionProvider {
refactorActions.fillContextMenu(menu, editGroup.getId());
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.actions.ActionGroup#updateActionBars()
*/
@@ -99,7 +99,7 @@ public class ResourceModelActionProvider extends SynchronizationActionProvider {
super.updateActionBars();
if (refactorActions != null) refactorActions.updateActionBars();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#dispose()
*/
@@ -108,7 +108,7 @@ public class ResourceModelActionProvider extends SynchronizationActionProvider {
super.dispose();
if (refactorActions != null) refactorActions.dispose();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.actions.ActionGroup#setContext(org.eclipse.ui.actions.ActionContext)
*/
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 52c5c0275..e05e79912 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
@@ -31,7 +31,7 @@ import org.eclipse.ui.model.WorkbenchContentProvider;
import org.eclipse.ui.navigator.ICommonContentExtensionSite;
/**
- * This content provider displays the mappings as a flat list
+ * This content provider displays the mappings as a flat list
* of elements.
* <p>
* There are three use-cases we need to consider. The first is when there
@@ -89,7 +89,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
}
return false;
}
-
+
private boolean hasChildrenInScope(ISynchronizationScope scope, Object object, IResource resource) {
if (!resource.isAccessible())
return false;
@@ -101,7 +101,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
}
return false;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
*/
@@ -110,7 +110,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
super.init(site);
TeamUIPlugin.getPlugin().getPreferenceStore().addPropertyChangeListener(this);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#dispose()
*/
@@ -121,7 +121,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
super.dispose();
TeamUIPlugin.getPlugin().getPreferenceStore().removePropertyChangeListener(this);
}
-
+
@Override
public void propertyChange(PropertyChangeEvent event) {
if (event.getProperty().equals(IPreferenceIds.SYNCVIEW_DEFAULT_LAYOUT)) {
@@ -168,7 +168,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);
@@ -240,7 +240,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
}
return new ResourceTraversal[0];
}
-
+
private IResource getResource(Object element) {
if (element instanceof IResource) {
return (IResource) element;
@@ -255,7 +255,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
protected boolean hasChildrenInContext(ISynchronizationContext context, Object elementOrPath) {
return getTraversalCalculator().hasChildren(context, elementOrPath);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#propertyChanged(int, org.eclipse.core.runtime.IPath[])
*/
@@ -308,11 +308,11 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
}
return null;
}
-
+
protected StructuredViewer getStructuredViewer() {
return (StructuredViewer)getViewer();
}
-
+
@Override
public Object[] getChildren(Object parent) {
if (parent instanceof ISynchronizationContext) {
@@ -321,7 +321,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
}
return super.getChildren(parent);
}
-
+
@Override
public boolean hasChildren(Object element) {
if (element instanceof ISynchronizationContext) {
@@ -330,7 +330,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
}
return super.hasChildren(element);
}
-
+
@Override
public Object[] getElements(Object parent) {
if (parent instanceof ISynchronizationContext) {
@@ -339,7 +339,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
}
return super.getElements(parent);
}
-
+
@Override
public Object getParent(Object elementOrPath) {
Object element = internalGetElement(elementOrPath);
@@ -350,7 +350,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
}
return super.getParent(elementOrPath);
}
-
+
@Override
protected void refresh() {
Utils.syncExec(new Runnable() {
@@ -359,7 +359,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
TreeViewer treeViewer = ((TreeViewer)getViewer());
treeViewer.refresh();
}
-
+
}, getViewer().getControl());
}
@@ -368,11 +368,11 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
if (resources.length > 0)
((AbstractTreeViewer)getViewer()).update(resources, null);
}
-
+
protected ResourceModelTraversalCalculator getTraversalCalculator() {
return ResourceModelTraversalCalculator.getTraversalCalculator(getConfiguration());
}
-
+
@Override
protected boolean isVisible(IDiff diff) {
return super.isVisible(diff);
@@ -404,14 +404,14 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
}
return elementOrPath;
}
-
+
private TreePath internalGetPath(Object elementOrPath) {
if (elementOrPath instanceof TreePath) {
return (TreePath) elementOrPath;
}
return null;
}
-
+
@Override
public void diffsChanged(final IDiffChangeEvent event, IProgressMonitor monitor) {
Utils.syncExec(new Runnable() {
@@ -439,7 +439,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
}
} else if (existingResources.contains(resource)) {
removals.add(resource);
-
+
}
}
} else {
@@ -455,7 +455,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
}
} else if (existingProjects.contains(project)) {
removals.add(project);
-
+
}
}
}
@@ -542,7 +542,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
}
return result;
}
-
+
private Set getVisibleResources() {
TreeViewer viewer = (TreeViewer)getViewer();
Tree tree = viewer.getTree();
@@ -558,7 +558,7 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
}
return result;
}
-
+
private IResource[] getChangedResources(IDiffChangeEvent event, Set existingResources) {
Set result = new HashSet();
IDiff[] changes = event.getChanges();
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 86b321593..62ab9f12b 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
@@ -44,7 +44,7 @@ public class ResourceModelLabelProvider extends
return false;
}
};
-
+
private ILabelProvider provider;
private ResourceModelContentProvider contentProvider;
private ImageManager localImageManager;
@@ -58,7 +58,7 @@ public class ResourceModelLabelProvider extends
}
super.init(site);
}
-
+
@Override
public void dispose() {
ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
@@ -78,7 +78,7 @@ public class ResourceModelLabelProvider extends
provider = new WorkbenchLabelProvider();
return provider ;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.AbstractSynchronizationLabelProvider#getSyncDelta(java.lang.Object)
*/
@@ -89,7 +89,7 @@ public class ResourceModelLabelProvider extends
if (tree != null && resource != null) {
IDiff delta = tree.getDiff(resource.getFullPath());
return delta;
- }
+ }
return null;
}
@@ -100,7 +100,7 @@ public class ResourceModelLabelProvider extends
}
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvider#isIncludeOverlays()
*/
@@ -108,7 +108,7 @@ public class ResourceModelLabelProvider extends
protected boolean isIncludeOverlays() {
return true;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvider#isBusy(java.lang.Object)
*/
@@ -121,7 +121,7 @@ public class ResourceModelLabelProvider extends
}
return super.isBusy(elementOrPath);
}
-
+
private TreePath internalGetPath(Object elementOrPath) {
if (elementOrPath instanceof TreePath) {
return (TreePath) elementOrPath;
@@ -159,7 +159,7 @@ public class ResourceModelLabelProvider extends
public void resourceChanged(IResourceChangeEvent event) {
String[] markerTypes = new String[] {IMarker.PROBLEM};
final Set handledResources = new HashSet();
-
+
// Accumulate all distinct resources that have had problem marker
// changes
for (int idx = 0; idx < markerTypes.length; idx++) {
@@ -173,7 +173,7 @@ public class ResourceModelLabelProvider extends
}
}
}
-
+
if (!handledResources.isEmpty()) {
final IResource[] resources = (IResource[]) handledResources.toArray(new IResource[handledResources.size()]);
updateLabels(resources);
@@ -189,7 +189,7 @@ public class ResourceModelLabelProvider extends
}
}, contentProvider.getStructuredViewer());
}
-
+
@Override
protected String getDelegateText(Object elementOrPath) {
if (getConfiguration() != null) {
@@ -199,7 +199,7 @@ public class ResourceModelLabelProvider extends
}
return super.getDelegateText(internalGetElement(elementOrPath));
}
-
+
@Override
protected Image getDelegateImage(Object elementOrPath) {
if (getConfiguration() != null && getTraversalCalculator().isCompressedFolder(elementOrPath)) {
@@ -207,7 +207,7 @@ public class ResourceModelLabelProvider extends
}
return super.getDelegateImage(internalGetElement(elementOrPath));
}
-
+
private Object internalGetElement(Object elementOrPath) {
if (elementOrPath instanceof TreePath) {
TreePath tp = (TreePath) elementOrPath;
@@ -215,7 +215,7 @@ public class ResourceModelLabelProvider extends
}
return elementOrPath;
}
-
+
protected ResourceModelTraversalCalculator getTraversalCalculator() {
return ResourceModelTraversalCalculator.getTraversalCalculator(getConfiguration());
}
@@ -223,7 +223,7 @@ public class ResourceModelLabelProvider extends
private ISynchronizePageConfiguration getConfiguration() {
return (ISynchronizePageConfiguration)getExtensionSite().getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION);
}
-
+
@Override
public void updateLabel(ViewerLabel label, TreePath elementPath) {
label.setImage(getImage(elementPath));
@@ -232,7 +232,7 @@ public class ResourceModelLabelProvider extends
if (f != null)
label.setFont(f);
}
-
+
protected ImageManager getImageManager() {
ISynchronizationContext context = getContext();
if (context != null) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelParticipantAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelParticipantAction.java
index 01d5908f9..af3883c90 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelParticipantAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelParticipantAction.java
@@ -63,9 +63,9 @@ public abstract class ResourceModelParticipantAction extends ModelParticipantAct
monitor.done();
}
}
-
+
/**
- * Return a traversal that includes the resources that are visible
+ * Return a traversal that includes the resources that are visible
* in the sync view.
* @param element the selected element
* @return a set of traversals that cover the visible resources.
@@ -80,13 +80,13 @@ public abstract class ResourceModelParticipantAction extends ModelParticipantAct
protected ResourceMappingContext getResourceMappingContext() {
return new SynchronizationResourceMappingContext(getSynchronizationContext());
}
-
+
protected ResourceModelTraversalCalculator getTraversalCalculator() {
return ResourceModelTraversalCalculator.getTraversalCalculator(getConfiguration());
}
/**
- * Return a traversal that includes the resources that are visible
+ * Return a traversal that includes the resources that are visible
* in the sync view.
* @param element the selected element
* @return a set of traversals that cover the visible resources.
@@ -112,7 +112,7 @@ public abstract class ResourceModelParticipantAction extends ModelParticipantAct
}
return new ResourceTraversal[] { new ResourceTraversal((IResource[]) resources.toArray(new IResource[resources.size()]), IResource.DEPTH_ZERO, IResource.NONE) };
}
- }
+ }
if (getTraversalCalculator().isResourcePath(path)) {
IResource resource = (IResource) o;
return getTraversalCalculator().getTraversals(resource, path);
@@ -121,7 +121,7 @@ public abstract class ResourceModelParticipantAction extends ModelParticipantAct
}
return null;
}
-
+
private DiffChangeSet getChangeSet(TreePath path) {
Object o = path.getFirstSegment();
if (o instanceof DiffChangeSet) {
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 0d90935df..2b4c7f125 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
@@ -31,7 +31,7 @@ public class ResourceModelPersistenceAdapter extends SynchronizationCompareAdapt
private static final String WORKING_SET_NAME = "workingSetName"; //$NON-NLS-1$
private static final String MODEL_PROVIDERS = "modelProviders"; //$NON-NLS-1$
private static final String MODEL_PROVIDER_ID = "modelProviderId"; //$NON-NLS-1$
-
+
public ResourceModelPersistenceAdapter() {
}
@@ -70,7 +70,7 @@ public class ResourceModelPersistenceAdapter extends SynchronizationCompareAdapt
for (int i = 0; i < children.length; i++) {
IMemento child = children[i];
Integer typeInt = child.getInteger(RESOURCE_TYPE);
- if (typeInt == null)
+ if (typeInt == null)
continue;
int type = typeInt.intValue();
String pathString = child.getString(RESOURCE_PATH);
@@ -137,5 +137,5 @@ public class ResourceModelPersistenceAdapter extends SynchronizationCompareAdapt
}
return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
}
-
+
}
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 0c143acd5..369806cb2 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
@@ -62,7 +62,7 @@ public abstract class ResourceModelProviderOperation extends SynchronizationOper
}
return (IDiff[]) result.toArray(new IDiff[result.size()]);
}
-
+
private IDiff[] getFileDeltas(Object pathOrElement) {
List result = new ArrayList();
ResourceTraversal[] traversals = getTraversals(pathOrElement);
@@ -79,7 +79,7 @@ public abstract class ResourceModelProviderOperation extends SynchronizationOper
}
return (IDiff[]) result.toArray(new IDiff[result.size()]);
}
-
+
/**
* Return whether the given node is visible in the page based
* on the mode in the configuration.
@@ -105,13 +105,13 @@ public abstract class ResourceModelProviderOperation extends SynchronizationOper
} else {
element = pathOrElement;
}
-
+
// Check for resources and adjust the depth to match the provider depth
if (isResourcePath(pathOrElement)) {
IResource resource = (IResource) element;
return getTraversalCalculator().getTraversals(resource, (TreePath)pathOrElement);
}
-
+
// Finally, just get the traversals from the mapping.
ResourceMapping mapping = Utils.getResourceMapping(element);
if (mapping != null) {
@@ -130,7 +130,7 @@ public abstract class ResourceModelProviderOperation extends SynchronizationOper
}
return new ResourceTraversal[0];
}
-
+
private boolean isResourcePath(Object pathOrElement) {
if (pathOrElement instanceof TreePath) {
TreePath tp = (TreePath) pathOrElement;
@@ -144,7 +144,7 @@ public abstract class ResourceModelProviderOperation extends SynchronizationOper
* @return the filter used to match diffs to which this action applies
*/
protected abstract FastDiffFilter getDiffFilter();
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.ModelProviderOperation#shouldRun()
*/
@@ -159,7 +159,7 @@ public abstract class ResourceModelProviderOperation extends SynchronizationOper
}
return false;
}
-
+
protected IDiff[] getTargetDiffs() {
return getFileDeltas(getTreePathsOrElements());
}
@@ -179,11 +179,11 @@ public abstract class ResourceModelProviderOperation extends SynchronizationOper
protected boolean canRunAsJob() {
return true;
}
-
+
protected ResourceModelTraversalCalculator getTraversalCalculator() {
return ResourceModelTraversalCalculator.getTraversalCalculator(getConfiguration());
}
-
+
private Object internalGetElement(Object elementOrPath) {
if (elementOrPath instanceof TreePath) {
TreePath tp = (TreePath) elementOrPath;
@@ -191,7 +191,7 @@ public abstract class ResourceModelProviderOperation extends SynchronizationOper
}
return elementOrPath;
}
-
+
@Override
public boolean belongsTo(Object family) {
if (family == getContext()) {
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 3b9b77a3a..fe73ea226 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
@@ -150,7 +150,7 @@ public class ResourceModelScopeParticipant implements
for (int i = 0; i < children.length; i++) {
IResourceDelta delta = children[i];
IResource resource = delta.getResource();
- if (resource.getType() == IResource.PROJECT
+ if (resource.getType() == IResource.PROJECT
&& ((delta.getKind() & (IResourceDelta.ADDED | IResourceDelta.REMOVED)) != 0
|| (delta.getFlags() & IResourceDelta.OPEN) != 0)) {
if (isInContext(resource))
@@ -159,8 +159,8 @@ public class ResourceModelScopeParticipant implements
}
if (!result.isEmpty())
fireChange((ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]));
-
-
+
+
}
private boolean isInContext(IResource resource) {
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 eda6b8587..7e94ff8ca 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
@@ -24,12 +24,12 @@ public class ResourceModelSorter extends ResourceSorter {
public ResourceModelSorter() {
super(NAME);
}
-
+
@Override
protected int compareNames(IResource r1, IResource r2) {
if (getLayout().equals(IPreferenceIds.COMPRESSED_LAYOUT)
&& r1 instanceof IFolder
- && r2 instanceof IFolder) {
+ && r2 instanceof IFolder) {
return collator.compare(r1.getProjectRelativePath().toString(), r2.getProjectRelativePath().toString());
}
return super.compareNames(r1, r2);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelTraversalCalculator.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelTraversalCalculator.java
index 1e37fedb5..7d63ae911 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelTraversalCalculator.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelTraversalCalculator.java
@@ -50,7 +50,7 @@ public class ResourceModelTraversalCalculator {
}
if (resource.getType() == IResource.PROJECT)
return IResource.DEPTH_INFINITE;
- if (resource.getType() == IResource.FILE)
+ if (resource.getType() == IResource.FILE)
return IResource.DEPTH_ZERO;
if (path != null && hasNonResource(path))
return IResource.DEPTH_INFINITE;
@@ -61,11 +61,11 @@ public class ResourceModelTraversalCalculator {
}
return IResource.DEPTH_INFINITE;
}
-
+
public String getLayout() {
return TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCVIEW_DEFAULT_LAYOUT);
}
-
+
public Object[] filterChildren(IResourceDiffTree diffTree, IResource resource, Object parentOrPath, Object[] children) {
if (parentOrPath instanceof TreePath) {
TreePath tp = (TreePath) parentOrPath;
@@ -88,7 +88,7 @@ public class ResourceModelTraversalCalculator {
}
return getTreeChildren(diffTree, resource, children);
}
-
+
private boolean hasNonResource(TreePath parentPath) {
for (int i = 0; i < parentPath.getSegmentCount(); i++) {
Object o = parentPath.getSegment(i);
@@ -98,7 +98,7 @@ public class ResourceModelTraversalCalculator {
}
return false;
}
-
+
private Object[] getCompressedChildren(IResourceDiffTree diffTree, IProject project, Object[] children) {
Set result = new HashSet();
IDiff[] diffs = diffTree.getDiffs(project, IResource.DEPTH_INFINITE);
@@ -109,7 +109,7 @@ public class ResourceModelTraversalCalculator {
IContainer parent = resource.getParent();
if (parent.getType() == IResource.FOLDER)
result.add(parent);
- else
+ else
result.add(resource);
} else if (resource.getType() == IResource.FOLDER)
result.add(resource);
@@ -227,7 +227,7 @@ public class ResourceModelTraversalCalculator {
}
return true;
}
-
+
public String getLabel(Object elementOrPath) {
if (elementOrPath instanceof TreePath && hasNonResource((TreePath)elementOrPath)) {
return null;
@@ -241,12 +241,12 @@ public class ResourceModelTraversalCalculator {
if (!path.isEmpty())
return NLS.bind(TeamUIMessages.ResourceModelLabelProvider_0, resource.getName(), path.toString());
}
- if (getLayout().equals(IPreferenceIds.COMPRESSED_LAYOUT)
+ if (getLayout().equals(IPreferenceIds.COMPRESSED_LAYOUT)
&& resource.getType() == IResource.FOLDER
&& (parent == null || parent instanceof IProject)) {
return resource.getProjectRelativePath().toString();
}
- if (getLayout().equals(IPreferenceIds.FLAT_LAYOUT)
+ if (getLayout().equals(IPreferenceIds.FLAT_LAYOUT)
&& resource.getType() == IResource.FILE
&& (parent == null || parent instanceof IProject)) {
IPath parentPath = resource.getProjectRelativePath().removeLastSegments(1);
@@ -256,7 +256,7 @@ public class ResourceModelTraversalCalculator {
}
return null;
}
-
+
public boolean isCompressedFolder(Object elementOrPath) {
if (elementOrPath instanceof TreePath && hasNonResource((TreePath)elementOrPath)) {
return false;
@@ -267,20 +267,20 @@ public class ResourceModelTraversalCalculator {
IResource resource = (IResource) element;
// Only use the compressed folder icon if the parent is not known
// or the parent is a project
- return getLayout().equals(IPreferenceIds.COMPRESSED_LAYOUT)
+ return getLayout().equals(IPreferenceIds.COMPRESSED_LAYOUT)
&& resource.getType() == IResource.FOLDER
&& (parent == null || parent instanceof IProject);
}
return false;
}
-
+
private TreePath internalGetPath(Object elementOrPath) {
if (elementOrPath instanceof TreePath) {
return (TreePath) elementOrPath;
}
return null;
}
-
+
private Object internalGetElement(Object elementOrPath) {
if (elementOrPath instanceof TreePath) {
TreePath tp = (TreePath) elementOrPath;
@@ -288,14 +288,14 @@ public class ResourceModelTraversalCalculator {
}
return elementOrPath;
}
-
+
private Object internalGetElementParent(Object elementOrPath) {
if (elementOrPath instanceof TreePath) {
TreePath tp = (TreePath) elementOrPath;
if (tp.getSegmentCount() > 1) {
return tp.getSegment(tp.getSegmentCount() - 2);
}
-
+
}
return null;
}
@@ -324,7 +324,7 @@ public class ResourceModelTraversalCalculator {
}
return false;
}
-
+
public TreePath getParentPath(ISynchronizationContext context, ModelProvider provider, Object element) {
if (element instanceof IResource) {
IResource resource = (IResource) element;
@@ -358,13 +358,13 @@ public class ResourceModelTraversalCalculator {
}
return null;
}
-
+
private TreePath getProviderRootPath(ISynchronizationContext context, ModelProvider provider) {
if (context == null)
return TreePath.EMPTY.createChildPath(provider);
return TreePath.EMPTY;
}
-
+
private boolean isFlatPageLayout() {
if (configuration != null) {
String p = (String)configuration.getProperty(ITeamContentProviderManager.PROP_PAGE_LAYOUT);
@@ -378,7 +378,7 @@ public class ResourceModelTraversalCalculator {
instance = new ResourceModelTraversalCalculator();
return instance;
}
-
+
public synchronized static ResourceModelTraversalCalculator getTraversalCalculator(ISynchronizePageConfiguration configuration) {
if (configuration == null)
return ResourceModelTraversalCalculator.getDefault();
@@ -389,5 +389,5 @@ public class ResourceModelTraversalCalculator {
}
return tc;
}
-
+
}
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 c06694bc5..2a9162a08 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
@@ -18,7 +18,7 @@ import org.eclipse.team.internal.ui.Utils;
import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
public class RestoreRemovedItemsAction extends ResourceModelParticipantAction {
-
+
public RestoreRemovedItemsAction(ISynchronizePageConfiguration configuration) {
super(null, configuration);
Utils.initAction(this, "action.restoreRemovedFromView."); //$NON-NLS-1$
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 82ebaa661..49b1609bb 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
@@ -32,7 +32,7 @@ public class ShowModelProviderAction extends Action {
this.provider = provider;
setImageDescriptor(getImageDescriptor(provider));
}
-
+
private ImageDescriptor getImageDescriptor(ModelProvider provider) {
ITeamContentProviderManager manager = TeamUI.getTeamContentProviderManager();
ITeamContentProviderDescriptor desc = manager.getDescriptor(provider.getId());
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 2ca4a391d..c1f0cdb2c 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
@@ -27,11 +27,11 @@ import org.eclipse.team.internal.ui.TeamUIPlugin;
public class StorageStreamMerger implements IStorageMerger {
private IStreamMerger merger;
-
+
public StorageStreamMerger(IStreamMerger merger) {
this.merger = merger;
}
-
+
@Override
public IStatus merge(OutputStream output, String outputEncoding, IStorage ancestorStorage, IStorage targetStorage, IStorage otherStorage, IProgressMonitor monitor) throws CoreException {
InputStream ancestorStream = null;
@@ -41,10 +41,10 @@ public class StorageStreamMerger implements IStorageMerger {
ancestorStream = new BufferedInputStream(ancestorStorage.getContents());
remoteStream = new BufferedInputStream(otherStorage.getContents());
targetStream = new BufferedInputStream(targetStorage.getContents());
- IStatus status = merger.merge(output, outputEncoding,
- ancestorStream, getEncoding(ancestorStorage, outputEncoding),
- targetStream, getEncoding(targetStorage, outputEncoding),
- remoteStream, getEncoding(otherStorage, outputEncoding),
+ IStatus status = merger.merge(output, outputEncoding,
+ ancestorStream, getEncoding(ancestorStorage, outputEncoding),
+ targetStream, getEncoding(targetStorage, outputEncoding),
+ remoteStream, getEncoding(otherStorage, outputEncoding),
monitor);
if (status.isOK())
return status;
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 fc605f81e..bb2fe189f 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
@@ -26,7 +26,7 @@ public class StreamMergerDelegate implements IStreamMergerDelegate {
public static void start() {
TeamPlugin.getPlugin().setMergerDelegate(new StreamMergerDelegate());
}
-
+
@Override
public IStorageMerger findMerger(IStorage target) {
try {
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 363a58921..683681a18 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
@@ -28,7 +28,7 @@ import org.eclipse.team.ui.mapping.SynchronizationContentProvider;
* This is used by the {@link SynchronizationContentProvider} to get the traversals
* for resource mappings. Since it is used to provide content, it avoids long running
* operations if possible.
- *
+ *
* @since 3.2
*/
public final class SynchronizationResourceMappingContext extends
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 da06e845b..82dbec328 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
@@ -22,7 +22,7 @@ public class TeamViewerSorter extends TreePathViewerSorter {
private CommonViewerSorter sorter;
private ResourceComparator resourceComparator;
-
+
public TeamViewerSorter(CommonViewerSorter sorter) {
this.sorter = sorter;
this.resourceComparator = new ResourceComparator(ResourceComparator.NAME);
@@ -37,10 +37,10 @@ public class TeamViewerSorter extends TreePathViewerSorter {
if (resource != null && resource.getType() == IResource.PROJECT) {
return 1;
}
-
+
return super.category(element);
}
-
+
@Override
public int compare(Viewer viewer, TreePath parentPath, Object e1, Object e2) {
if (parentPath == null || parentPath.getSegmentCount() == 0) {
@@ -50,7 +50,7 @@ public class TeamViewerSorter extends TreePathViewerSorter {
if (cat1 != cat2)
return cat1 - cat2;
-
+
if (e1 instanceof ModelProvider && e2 instanceof ModelProvider) {
ModelProvider mp1 = (ModelProvider) e1;
ModelProvider mp2 = (ModelProvider) e2;
@@ -70,7 +70,7 @@ public class TeamViewerSorter extends TreePathViewerSorter {
}
return sorter.compare(viewer, parentPath, e1, e2);
}
-
+
private boolean isExtends(ModelProvider mp1, IModelProviderDescriptor desc) {
String[] extended = mp1.getDescriptor().getExtendedModels();
for (int i = 0; i < extended.length; i++) {
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 c97a42d80..f6b6ec5eb 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
@@ -28,7 +28,7 @@ import org.eclipse.team.ui.synchronize.TeamStateProvider;
* A decorated state provider that delegates to the provider for the repository
* provider type that is associated with the projects that an element maps to
* using the ResourceMapping API.
- *
+ *
*/
public class WorkspaceTeamStateProvider extends TeamStateProvider
implements ITeamStateChangeListener, IRepositoryProviderListener,
@@ -47,7 +47,7 @@ public class WorkspaceTeamStateProvider extends TeamStateProvider
handleProject(project);
}
}
-
+
public void dispose() {
RepositoryProviderManager.getInstance().removeListener(this);
ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
@@ -85,7 +85,7 @@ public class WorkspaceTeamStateProvider extends TeamStateProvider
return provider.getDecoratedStateMask(element);
return 0;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.ITeamStateProvider#getDecoratedProperties(java.lang.Object)
*/
@@ -97,7 +97,7 @@ public class WorkspaceTeamStateProvider extends TeamStateProvider
return new String[0];
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.DecoratedStateProvider#getState(java.lang.Object, int, org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -120,7 +120,7 @@ public class WorkspaceTeamStateProvider extends TeamStateProvider
return provider.getResourceMappingContext(element);
return ResourceMappingContext.LOCAL_CONTEXT;
}
-
+
private ITeamStateProvider getDecoratedStateProvider(Object element) {
RepositoryProviderType type = getProviderType(element);
if (type != null)
@@ -182,7 +182,7 @@ public class WorkspaceTeamStateProvider extends TeamStateProvider
}
}
}
-
+
private void listenerForStateChangesForId(String id) {
if (!providers.containsKey(id)) {
ITeamStateProvider provider = getDecoratedStateProviderForId(id);
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 fda56fc70..06aea99e8 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
@@ -25,20 +25,20 @@ import org.eclipse.team.internal.ui.*;
public class FileTypeTable implements ICellModifier, IStructuredContentProvider, ITableLabelProvider {
-
+
private final static int COMBO_INDEX_BINARY= 0;
private final static int COMBO_INDEX_TEXT= 1;
- private final static String [] MODES_TEXT= { TeamUIMessages.FileTypeTable_0, TeamUIMessages.FileTypeTable_1 }; //
-
+ private final static String [] MODES_TEXT= { TeamUIMessages.FileTypeTable_0, TeamUIMessages.FileTypeTable_1 }; //
+
private final static int COMBO_INDEX_SAVE= 0;
private final static int COMBO_INDEX_DONT_SAVE= 1;
- private static final String [] SAVE_TEXT= { TeamUIMessages.FileTypeTable_2, TeamUIMessages.FileTypeTable_3 }; //
+ private static final String [] SAVE_TEXT= { TeamUIMessages.FileTypeTable_2, TeamUIMessages.FileTypeTable_3 }; //
private static final class FileTypeComparator extends ViewerComparator {
-
+
public FileTypeComparator() {
}
-
+
private int getCategory(Object element) {
if (element instanceof Extension)
return 0;
@@ -51,7 +51,7 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
@Override
public int compare(Viewer viewer,Object e1,Object e2) {
final int compare= getCategory(e1) - getCategory(e2);
- if (compare != 0)
+ if (compare != 0)
return compare;
return super.compare(viewer, ((Item)e1).name, ((Item)e2).name);
}
@@ -62,9 +62,9 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
public boolean save;
public int mode;
public boolean contributed;
-
+
public Item(String name, boolean contributed) { this.name= name; this.contributed = contributed; save= true; mode= Team.BINARY; }
-
+
/* (non-Javadoc)
* @see java.lang.Comparable#compareTo(java.lang.Object)
*/
@@ -73,7 +73,7 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
return name.compareTo(((Item)o).name);
}
}
-
+
public static class Extension extends Item {
public Extension(String name, boolean contributed) { super(name, contributed); }
}
@@ -81,9 +81,9 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
public static class Name extends Item {
public Name(String name, boolean contributed) { super(name, contributed); }
}
-
+
private final static int COLUMN_PADDING = 5;
-
+
protected static final String ITEM = "item"; //$NON-NLS-1$
protected static final String PROPERTY_MODE= "mode"; //$NON-NLS-1$
protected static final String PROPERTY_SAVE= "save"; //$NON-NLS-1$
@@ -91,12 +91,12 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
private final TableViewer fTableViewer;
private final List fItems;
private final boolean fShowSaveColumn;
-
+
public FileTypeTable(Composite composite, List items, boolean showSaveColumn) {
-
+
fShowSaveColumn= showSaveColumn;
fItems= items;
-
+
/**
* Create a table.
@@ -105,16 +105,16 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
table.setLayoutData(SWTUtils.createHVFillGridData());
table.setLinesVisible(true);
table.setHeaderVisible(true);
-
+
final PixelConverter converter= SWTUtils.createDialogPixelConverter(composite);
-
+
/**
* The 'Extension' column
*/
final TableColumn fileColumn = new TableColumn(table, SWT.NONE, 0);
fileColumn.setWidth(converter.convertWidthInCharsToPixels(TeamUIMessages.FileTypeTable_4.length() + COLUMN_PADDING));
- fileColumn.setText(TeamUIMessages.FileTypeTable_4);
-
+ fileColumn.setText(TeamUIMessages.FileTypeTable_4);
+
/**
* The 'Mode' column
*/
@@ -129,7 +129,7 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
length = 15;
}
modeColumn.setWidth(converter.convertWidthInCharsToPixels(length + COLUMN_PADDING));
- modeColumn.setText(TeamUIMessages.FileTypeTable_5);
+ modeColumn.setText(TeamUIMessages.FileTypeTable_5);
/**
* The 'Save' column
@@ -137,9 +137,9 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
if (fShowSaveColumn) {
final TableColumn saveColumn = new TableColumn(table, SWT.NONE, 2);
saveColumn.setWidth(converter.convertWidthInCharsToPixels(TeamUIMessages.FileTypeTable_6.length() + COLUMN_PADDING));
- saveColumn.setText(TeamUIMessages.FileTypeTable_6);
+ saveColumn.setText(TeamUIMessages.FileTypeTable_6);
}
-
+
/**
* Create a viewer for the table.
*/
@@ -152,36 +152,36 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
* Add a cell editor in the Keyword Substitution Mode column
*/
new TableEditor(table);
-
+
final CellEditor modeEditor = new ComboBoxCellEditor(table, MODES_TEXT, SWT.READ_ONLY);
final CellEditor saveEditor= new ComboBoxCellEditor(table, SAVE_TEXT, SWT.READ_ONLY);
-
+
if (fShowSaveColumn) {
fTableViewer.setCellEditors(new CellEditor[] { null, modeEditor, saveEditor });
fTableViewer.setColumnProperties(new String [] { ITEM, PROPERTY_MODE, PROPERTY_SAVE });
- } else {
+ } else {
fTableViewer.setCellEditors(new CellEditor [] { null, modeEditor });
fTableViewer.setColumnProperties(new String [] { ITEM, PROPERTY_MODE });
}
-
+
fTableViewer.setCellModifier(this);
fTableViewer.setInput(fItems);
}
-
+
@Override
public Object getValue(Object element, String property) {
-
+
final Item item= (Item)element;
-
+
if (PROPERTY_MODE.equals(property)) {
if (item.mode == Team.BINARY)
return new Integer(COMBO_INDEX_BINARY);
- if (item.mode == Team.TEXT)
+ if (item.mode == Team.TEXT)
return new Integer(COMBO_INDEX_TEXT);
}
-
+
if (fShowSaveColumn && PROPERTY_SAVE.equals(property)) {
return new Integer(item.save ? COMBO_INDEX_SAVE : COMBO_INDEX_DONT_SAVE);
}
@@ -195,21 +195,21 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
@Override
public void modify(Object element, String property, Object value) {
-
+
final IStructuredSelection selection = (IStructuredSelection)fTableViewer.getSelection();
final Item item= (Item)selection.getFirstElement();
if (item == null)
return;
final int comboIndex = ((Integer)value).intValue();
-
+
if (PROPERTY_MODE.equals(property)) {
if (comboIndex == COMBO_INDEX_BINARY)
item.mode= Team.BINARY;
if (comboIndex == COMBO_INDEX_TEXT)
item.mode= Team.TEXT;
}
-
+
if (fShowSaveColumn && PROPERTY_SAVE.equals(property)) {
item.save= COMBO_INDEX_SAVE == comboIndex;
}
@@ -225,13 +225,13 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
public String getColumnText(Object element, int columnIndex) {
final Item item= (Item) element;
-
- if (columnIndex == 0) {
+
+ if (columnIndex == 0) {
String label = (item instanceof Extension ? "*." : "") + item.name; //$NON-NLS-1$ //$NON-NLS-2$
label = TextProcessor.process(label, ".*"); //$NON-NLS-1$
- return label;
+ return label;
}
-
+
if (columnIndex == 1) {
if (item.mode == Team.BINARY) {
return MODES_TEXT[COMBO_INDEX_BINARY];
@@ -239,11 +239,11 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
return MODES_TEXT[COMBO_INDEX_TEXT];
}
}
-
+
if (columnIndex == 2) {
if (fShowSaveColumn) return SAVE_TEXT[item.save ? COMBO_INDEX_SAVE : COMBO_INDEX_DONT_SAVE];
}
-
+
return null;
}
@@ -262,23 +262,23 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
public void removeListener(ILabelProviderListener listener) {}
@Override
- public Object[] getElements(Object inputElement) {
+ public Object[] getElements(Object inputElement) {
return ((Collection)inputElement).toArray();
}
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
-
+
public IStructuredSelection getSelection() {
return (IStructuredSelection)fTableViewer.getSelection();
}
-
+
public void setInput(List items) {
fItems.clear();
fItems.addAll(items);
fTableViewer.refresh();
}
-
+
public TableViewer getViewer() {
return fTableViewer;
}
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 43e49e5b0..7a327bf03 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
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.team.internal.ui.preferences;
-
+
import org.eclipse.jface.dialogs.*;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.preference.PreferencePage;
@@ -32,9 +32,9 @@ public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPr
private Button removeButton;
@Override
public void init(IWorkbench workbench) {
- setDescription(TeamUIMessages.IgnorePreferencePage_description);
+ setDescription(TeamUIMessages.IgnorePreferencePage_description);
}
-
+
/**
* Creates preference page controls on demand.
*
@@ -42,7 +42,7 @@ public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPr
*/
@Override
protected Control createContents(Composite ancestor) {
-
+
Composite parent = new Composite(ancestor, SWT.NULL);
GridLayout layout = new GridLayout();
layout.marginWidth = 0;
@@ -53,13 +53,13 @@ public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPr
data.verticalAlignment = GridData.FILL;
data.horizontalAlignment = GridData.FILL;
parent.setLayoutData(data);
-
+
Label l1 = new Label(parent, SWT.NULL);
- l1.setText(TeamUIMessages.IgnorePreferencePage_ignorePatterns);
+ l1.setText(TeamUIMessages.IgnorePreferencePage_ignorePatterns);
data = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
data.horizontalSpan = 2;
l1.setLayoutData(data);
-
+
ignoreTable = new Table(parent, SWT.CHECK | SWT.BORDER | SWT.MULTI);
GridData gd = new GridData(GridData.FILL_BOTH);
//gd.widthHint = convertWidthInCharsToPixels(30);
@@ -71,25 +71,25 @@ public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPr
handleSelection();
}
});
-
+
Composite buttons = new Composite(parent, SWT.NULL);
buttons.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
layout = new GridLayout();
layout.marginHeight = 0;
layout.marginWidth = 0;
buttons.setLayout(layout);
-
+
addButton = new Button(buttons, SWT.PUSH);
- addButton.setText(TeamUIMessages.IgnorePreferencePage_add);
+ addButton.setText(TeamUIMessages.IgnorePreferencePage_add);
addButton.addListener(SWT.Selection, new Listener() {
@Override
public void handleEvent(Event e) {
addIgnore();
}
});
-
+
removeButton = new Button(buttons, SWT.PUSH);
- removeButton.setText(TeamUIMessages.IgnorePreferencePage_remove);
+ removeButton.setText(TeamUIMessages.IgnorePreferencePage_remove);
removeButton.setEnabled(false);
removeButton.addListener(SWT.Selection, new Listener() {
@Override
@@ -101,10 +101,10 @@ public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPr
Dialog.applyDialogFont(ancestor);
setButtonLayoutData(addButton);
setButtonLayoutData(removeButton);
-
+
// set F1 help
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.IGNORE_PREFERENCE_PAGE);
-
+
return parent;
}
/**
@@ -126,7 +126,7 @@ public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPr
TeamUIPlugin.broadcastPropertyChange(new PropertyChangeEvent(this, TeamUI.GLOBAL_IGNORES_CHANGED, null, null));
return true;
}
-
+
@Override
protected void performDefaults() {
super.performDefaults();
@@ -134,7 +134,7 @@ public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPr
IIgnoreInfo[] ignore = Team.getDefaultIgnores();
fillTable(ignore);
}
-
+
/**
* @param ignore
*/
@@ -144,11 +144,11 @@ public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPr
TableItem item = new TableItem(ignoreTable, SWT.NONE);
item.setText(TextProcessor.process(info.getPattern(), ".*")); //$NON-NLS-1$
item.setChecked(info.getEnabled());
- }
+ }
}
private void addIgnore() {
-
+
InputDialog dialog = new InputDialog(getShell(), TeamUIMessages.IgnorePreferencePage_enterPatternShort, TeamUIMessages.IgnorePreferencePage_enterPatternLong, null, null) {
@Override
protected Control createDialogArea(Composite parent) {
@@ -174,7 +174,7 @@ public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPr
item.setText(TextProcessor.process(pattern, ".*")); //$NON-NLS-1$
item.setChecked(true);
}
-
+
private void removeIgnore() {
int[] selection = ignoreTable.getSelectionIndices();
ignoreTable.remove(selection);
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 d90c5310d..aacf5f62b 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
@@ -22,8 +22,8 @@ public class ResourceModelPreferencePage extends FieldEditorPreferencePage imple
public ResourceModelPreferencePage() {
super(GRID);
- setTitle(TeamUIMessages.SynchronizationCompareAdapter_0);
- setDescription(TeamUIMessages.ResourceModelPreferencePage_0);
+ setTitle(TeamUIMessages.SynchronizationCompareAdapter_0);
+ setDescription(TeamUIMessages.ResourceModelPreferencePage_0);
setPreferenceStore(TeamUIPlugin.getPlugin().getPreferenceStore());
}
@@ -36,19 +36,19 @@ public class ResourceModelPreferencePage extends FieldEditorPreferencePage imple
// set F1 help
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.RESOURCE_MODEL_PREFERENCE_PAGE);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
*/
@Override
protected void createFieldEditors() {
- defaultLayout = new RadioGroupFieldEditor(SYNCVIEW_DEFAULT_LAYOUT,
- TeamUIMessages.SyncViewerPreferencePage_0, 3,
+ defaultLayout = new RadioGroupFieldEditor(SYNCVIEW_DEFAULT_LAYOUT,
+ TeamUIMessages.SyncViewerPreferencePage_0, 3,
new String[][] {
- {TeamUIMessages.SyncViewerPreferencePage_1, FLAT_LAYOUT},
- {TeamUIMessages.SyncViewerPreferencePage_2, TREE_LAYOUT},
- {TeamUIMessages.SyncViewerPreferencePage_3, COMPRESSED_LAYOUT}
- },
+ {TeamUIMessages.SyncViewerPreferencePage_1, FLAT_LAYOUT},
+ {TeamUIMessages.SyncViewerPreferencePage_2, TREE_LAYOUT},
+ {TeamUIMessages.SyncViewerPreferencePage_3, COMPRESSED_LAYOUT}
+ },
getFieldEditorParent(), true /* use a group */);
addField(defaultLayout);
}
@@ -69,5 +69,5 @@ public class ResourceModelPreferencePage extends FieldEditorPreferencePage imple
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 69cdd6dae..bca7e738e 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
@@ -30,12 +30,12 @@ import com.ibm.icu.text.Collator;
* This preference page allows to configure various aspects of the Synchronize View.
*/
public class SyncViewerPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage, IPreferenceIds {
-
+
private BooleanFieldEditor showSyncInLabels = null;
private RadioGroupFieldEditor synchronizePerspectiveSwitch = null;
private RadioGroupFieldEditor defaultLayout = null;
private boolean includeDefaultLayout = true;
-
+
private static class PerspectiveDescriptorComparator implements Comparator {
/*
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
@@ -50,11 +50,11 @@ public class SyncViewerPreferencePage extends FieldEditorPreferencePage implemen
return 0;
}
}
-
+
public SyncViewerPreferencePage() {
super(GRID);
- setTitle(TeamUIMessages.SyncViewerPreferencePage_6);
- setDescription(TeamUIMessages.SyncViewerPreferencePage_7);
+ setTitle(TeamUIMessages.SyncViewerPreferencePage_6);
+ setDescription(TeamUIMessages.SyncViewerPreferencePage_7);
setPreferenceStore(TeamUIPlugin.getPlugin().getPreferenceStore());
}
@@ -67,84 +67,84 @@ public class SyncViewerPreferencePage extends FieldEditorPreferencePage implemen
// set F1 help
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.SYNC_PREFERENCE_PAGE);
}
-
+
/* (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());
+ showSyncInLabels = new BooleanFieldEditor(SYNCVIEW_VIEW_SYNCINFO_IN_LABEL, TeamUIMessages.SyncViewerPreferencePage_19, SWT.NONE, getFieldEditorParent());
addField(showSyncInLabels);
-
+
addField(new BooleanFieldEditor(
- SHOW_AUTHOR_IN_COMPARE_EDITOR,
- TeamUIMessages.SyncViewerPreferencePage_43,
- BooleanFieldEditor.DEFAULT,
+ SHOW_AUTHOR_IN_COMPARE_EDITOR,
+ TeamUIMessages.SyncViewerPreferencePage_43,
+ BooleanFieldEditor.DEFAULT,
getFieldEditorParent()));
-
+
addField(new BooleanFieldEditor(
- MAKE_FILE_WRITTABLE_IF_CONTEXT_MISSING,
- TeamUIMessages.SyncViewerPreferencePage_44,
- BooleanFieldEditor.DEFAULT,
+ MAKE_FILE_WRITTABLE_IF_CONTEXT_MISSING,
+ TeamUIMessages.SyncViewerPreferencePage_44,
+ BooleanFieldEditor.DEFAULT,
getFieldEditorParent()));
-
+
addField(new BooleanFieldEditor(
- REUSE_OPEN_COMPARE_EDITOR,
- TeamUIMessages.SyncViewerPreferencePage_45,
- BooleanFieldEditor.DEFAULT,
+ REUSE_OPEN_COMPARE_EDITOR,
+ TeamUIMessages.SyncViewerPreferencePage_45,
+ BooleanFieldEditor.DEFAULT,
getFieldEditorParent()));
-
+
addField(new BooleanFieldEditor(
- RUN_IMPORT_IN_BACKGROUND,
- TeamUIMessages.SyncViewerPreferencePage_46,
- BooleanFieldEditor.DEFAULT,
+ RUN_IMPORT_IN_BACKGROUND,
+ TeamUIMessages.SyncViewerPreferencePage_46,
+ BooleanFieldEditor.DEFAULT,
getFieldEditorParent()));
addField(new BooleanFieldEditor(
- APPLY_PATCH_IN_SYNCHRONIZE_VIEW,
- TeamUIMessages.SyncViewerPreferencePage_47,
- BooleanFieldEditor.DEFAULT,
+ APPLY_PATCH_IN_SYNCHRONIZE_VIEW,
+ TeamUIMessages.SyncViewerPreferencePage_47,
+ BooleanFieldEditor.DEFAULT,
getFieldEditorParent()));
if (isIncludeDefaultLayout()) {
- defaultLayout = new RadioGroupFieldEditor(SYNCVIEW_DEFAULT_LAYOUT,
- TeamUIMessages.SyncViewerPreferencePage_0, 3,
+ defaultLayout = new RadioGroupFieldEditor(SYNCVIEW_DEFAULT_LAYOUT,
+ TeamUIMessages.SyncViewerPreferencePage_0, 3,
new String[][] {
- {TeamUIMessages.SyncViewerPreferencePage_1, FLAT_LAYOUT},
- {TeamUIMessages.SyncViewerPreferencePage_2, TREE_LAYOUT},
- {TeamUIMessages.SyncViewerPreferencePage_3, COMPRESSED_LAYOUT}
- },
+ {TeamUIMessages.SyncViewerPreferencePage_1, FLAT_LAYOUT},
+ {TeamUIMessages.SyncViewerPreferencePage_2, TREE_LAYOUT},
+ {TeamUIMessages.SyncViewerPreferencePage_3, COMPRESSED_LAYOUT}
+ },
getFieldEditorParent(), true /* use a group */);
addField(defaultLayout);
}
- synchronizePerspectiveSwitch= new RadioGroupFieldEditor(SYNCHRONIZING_COMPLETE_PERSPECTIVE, TeamUIMessages.SyncViewerPreferencePage_13, 3,
+ synchronizePerspectiveSwitch= new RadioGroupFieldEditor(SYNCHRONIZING_COMPLETE_PERSPECTIVE, TeamUIMessages.SyncViewerPreferencePage_13, 3,
new String[][] {
- {TeamUIMessages.SyncViewerPreferencePage_14, MessageDialogWithToggle.ALWAYS},
- {TeamUIMessages.SyncViewerPreferencePage_42, MessageDialogWithToggle.NEVER},
- {TeamUIMessages.SyncViewerPreferencePage_16, MessageDialogWithToggle.PROMPT}
+ {TeamUIMessages.SyncViewerPreferencePage_14, MessageDialogWithToggle.ALWAYS},
+ {TeamUIMessages.SyncViewerPreferencePage_42, MessageDialogWithToggle.NEVER},
+ {TeamUIMessages.SyncViewerPreferencePage_16, MessageDialogWithToggle.PROMPT}
},
getFieldEditorParent(), true);
addField(synchronizePerspectiveSwitch);
-
- Group perspectiveGroup = createGroup(getFieldEditorParent(), TeamUIMessages.SyncViewerPreferencePage_15);
-
- createLabel(perspectiveGroup, TeamUIMessages.SynchronizationViewPreference_defaultPerspectiveDescription, 1);
-
+
+ Group perspectiveGroup = createGroup(getFieldEditorParent(), TeamUIMessages.SyncViewerPreferencePage_15);
+
+ createLabel(perspectiveGroup, TeamUIMessages.SynchronizationViewPreference_defaultPerspectiveDescription, 1);
+
handleDeletedPerspectives();
String[][] perspectiveNamesAndIds = getPerspectiveNamesAndIds();
ComboFieldEditor comboEditor= new ComboFieldEditor(
SYNCVIEW_DEFAULT_PERSPECTIVE,
- TeamUIMessages.SynchronizationViewPreference_defaultPerspectiveLabel,
+ TeamUIMessages.SynchronizationViewPreference_defaultPerspectiveLabel,
perspectiveNamesAndIds,
perspectiveGroup);
addField(comboEditor);
Dialog.applyDialogFont(getFieldEditorParent());
updateLayout(perspectiveGroup);
- getFieldEditorParent().layout(true);
+ getFieldEditorParent().layout(true);
}
-
+
private Label createLabel(Composite parent, String title, int spacer) {
GridData data;
Label l = new Label(parent, SWT.WRAP);
@@ -154,10 +154,10 @@ public class SyncViewerPreferencePage extends FieldEditorPreferencePage implemen
if(spacer != 0) {
data.verticalSpan = spacer;
}
- data.horizontalAlignment = GridData.FILL;
+ data.horizontalAlignment = GridData.FILL;
l.setLayoutData(data);
if(title != null) {
- l.setText(title);
+ l.setText(title);
}
return l;
}
@@ -168,11 +168,11 @@ public class SyncViewerPreferencePage extends FieldEditorPreferencePage implemen
GridData data = new GridData();
data.horizontalSpan = 2;
data.horizontalAlignment = GridData.FILL;
- display.setLayoutData(data);
+ display.setLayoutData(data);
display.setText(title);
return display;
}
-
+
private void updateLayout(Composite composite) {
GridLayout layout = new GridLayout();
layout.numColumns = 2;
@@ -189,18 +189,18 @@ public class SyncViewerPreferencePage extends FieldEditorPreferencePage implemen
@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();
+ //if(event.getSource() == bkgScheduledRefresh || event.getSource() == scheduledDelay) {
+ // updateEnablements();
// }
super.propertyChange(event);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.preference.IPreferencePage#performOk()
*/
@@ -209,13 +209,13 @@ public class SyncViewerPreferencePage extends FieldEditorPreferencePage implemen
TeamUIPlugin.getPlugin().savePluginPreferences();
return super.performOk();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#checkState()
*/
@Override
protected void initialize() {
- super.initialize();
+ super.initialize();
updateEnablements();
}
@@ -224,17 +224,17 @@ public class SyncViewerPreferencePage extends FieldEditorPreferencePage implemen
//scheduledDelay.setEnabled(enabled, refreshGroup);
//scheduledDelay.refreshValidState();
}
-
+
/**
* Return a 2-dimensional array of perspective names and ids.
*/
private String[][] getPerspectiveNamesAndIds() {
-
+
IPerspectiveRegistry registry= PlatformUI.getWorkbench().getPerspectiveRegistry();
IPerspectiveDescriptor[] perspectiveDescriptors= registry.getPerspectives();
-
+
Arrays.sort(perspectiveDescriptors, new PerspectiveDescriptorComparator());
-
+
String[][] table = new String[perspectiveDescriptors.length + 1][2];
table[0][0] = TeamUIMessages.SynchronizationViewPreference_defaultPerspectiveNone; //;
table[0][1] = SYNCVIEW_DEFAULT_PERSPECTIVE_NONE;
@@ -259,5 +259,5 @@ public class SyncViewerPreferencePage extends FieldEditorPreferencePage implemen
public void setIncludeDefaultLayout(boolean includeDefaultLayout) {
this.includeDefaultLayout = includeDefaultLayout;
- }
+ }
}
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 4c3867f81..9f05d0227 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
@@ -36,7 +36,7 @@ import org.eclipse.ui.*;
* remove entries from this table, and change their values from Text to Binary.
*/
public class TextPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
+
private static final class ExtensionValidator implements IInputValidator {
@Override
public String isValid(String newText) {
@@ -47,9 +47,9 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
}
newText = strip(newText);
if (newText.indexOf('*') >= 0)
- return TeamUIMessages.TextPreferencePage_2;
+ return TeamUIMessages.TextPreferencePage_2;
if (newText.indexOf('.') >= 0)
- return TeamUIMessages.TextPreferencePage_3;
+ return TeamUIMessages.TextPreferencePage_3;
return null;
}
@@ -65,7 +65,7 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
newText= newText.substring(1);
return newText;
}
-
+
public boolean isComplete(String text){
//Allowed formats of extension are:
// extension
@@ -77,21 +77,21 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
return true;
}
}
-
+
private static final class FilenameValidator implements IInputValidator {
@Override
public String isValid(String newText) {
if (newText.trim().length() == 0)
return ""; //$NON-NLS-1$
if (newText.indexOf('*') >= 0)
- return TeamUIMessages.TextPreferencePage_5;
+ return TeamUIMessages.TextPreferencePage_5;
return null;
}
}
-
+
// The input for the table viewer
private final List fItems;
-
+
// Widgets
private Button fRemoveButton;
private Button fChangeButton;
@@ -102,26 +102,26 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
fItems= new ArrayList();
initializeItems();
}
-
+
private void initializeItems() {
-
+
fItems.clear();
-
+
final IFileContentManager manager= Team.getFileContentManager();
final IStringMapping [] extensionInfoArray= manager.getExtensionMappings();
final IStringMapping [] nameInfoArray= manager.getNameMappings();
-
+
Set fPluginNames= makeSetOfStrings(manager.getDefaultNameMappings());
Set fPluginExtensions= makeSetOfStrings(manager.getDefaultExtensionMappings());
-
+
for (int i = 0; i < extensionInfoArray.length; i++) {
final IStringMapping info= extensionInfoArray[i];
final FileTypeTable.Extension extension= new FileTypeTable.Extension(info.getString(), fPluginExtensions.contains(info.getString()));
extension.mode= info.getType();
fItems.add(extension);
}
-
+
for (int i = 0; i < nameInfoArray.length; i++) {
final IStringMapping info= nameInfoArray[i];
final FileTypeTable.Name name= new FileTypeTable.Name(info.getString(), fPluginNames.contains(info.getString()));
@@ -130,7 +130,7 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
}
}
-
+
private static Set makeSetOfStrings(IStringMapping [] mappings) {
final Set set= new HashSet(mappings.length);
for (int i = 0; i < mappings.length; i++) {
@@ -138,7 +138,7 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
}
return set;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
*/
@@ -151,13 +151,13 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
*/
@Override
protected Control createContents(Composite parent) {
-
- initializeDialogUnits(parent);
-
+
+ initializeDialogUnits(parent);
+
final PixelConverter converter= SWTUtils.createDialogPixelConverter(parent);
-
+
final Composite composite= SWTUtils.createHVFillComposite(parent, SWTUtils.MARGINS_NONE, 2);
-
+
fTable= new FileTypeTable(composite, fItems, false);
fTable.getViewer().getControl().addListener(SWT.Selection, new Listener() {
@@ -181,20 +181,20 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
final Composite buttonsComposite = new Composite(composite, SWT.NONE);
buttonsComposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false));
buttonsComposite.setLayout(SWTUtils.createGridLayout(1, converter, SWTUtils.MARGINS_NONE));
-
+
final Button addExtensionButton = new Button(buttonsComposite, SWT.PUSH);
- addExtensionButton.setText(TeamUIMessages.TextPreferencePage_add);
+ addExtensionButton.setText(TeamUIMessages.TextPreferencePage_add);
final Button addNameButton = new Button(buttonsComposite, SWT.PUSH);
- addNameButton.setText(TeamUIMessages.TextPreferencePage_0);
+ addNameButton.setText(TeamUIMessages.TextPreferencePage_0);
fChangeButton = new Button(buttonsComposite, SWT.PUSH);
- fChangeButton.setText(TeamUIMessages.TextPreferencePage_change);
+ fChangeButton.setText(TeamUIMessages.TextPreferencePage_change);
fRemoveButton= new Button(buttonsComposite, SWT.PUSH);
- fRemoveButton.setText(TeamUIMessages.TextPreferencePage_remove);
-
- SWTUtils.createLabel(composite, TeamUIMessages.TextPreferencePage_1, 2);
-
+ fRemoveButton.setText(TeamUIMessages.TextPreferencePage_remove);
+
+ SWTUtils.createLabel(composite, TeamUIMessages.TextPreferencePage_1, 2);
+
/**
- * Calculate and set the button size
+ * Calculate and set the button size
*/
applyDialogFont(composite);
final int buttonWidth= SWTUtils.calculateControlSize(converter, new Button [] { addExtensionButton, addNameButton, fChangeButton, fRemoveButton });
@@ -202,7 +202,7 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
addNameButton.setLayoutData(SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.FILL, SWT.FILL, false, false));
fChangeButton.setLayoutData(SWTUtils.createGridData(buttonWidth, SWT.DEFAULT, SWT.FILL, SWT.FILL, false, false));
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) {
@@ -223,7 +223,7 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
changePattern();
}
});
-
+
fRemoveButton.setEnabled(false);
fRemoveButton.addListener(SWT.Selection, new Listener() {
@Override
@@ -231,15 +231,15 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
removePattern();
}
});
-
+
Dialog.applyDialogFont(parent);
-
+
// set F1 help
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.FILE_TYPE_PREFERENCE_PAGE);
-
+
return composite;
}
-
+
@Override
protected void performDefaults() {
super.performDefaults();
@@ -247,7 +247,7 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
if (fTable != null)
fTable.getViewer().refresh();
}
-
+
/**
* Do anything necessary because the OK button has been pressed.
*
@@ -257,13 +257,13 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
public boolean performOk() {
final ArrayList extensionsList= new ArrayList();
final ArrayList extensionsModesList= new ArrayList();
-
+
final ArrayList namesList= new ArrayList();
final ArrayList namesModesList= new ArrayList();
-
+
for (final Iterator iter = fItems.iterator(); iter.hasNext();) {
final FileTypeTable.Item item= (FileTypeTable.Item) iter.next();
-
+
if (item instanceof FileTypeTable.Extension) {
extensionsList.add(item.name);
extensionsModesList.add(new Integer(item.mode));
@@ -272,16 +272,16 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
namesModesList.add(new Integer(item.mode));
}
}
-
+
final String [] extensions= (String [])extensionsList.toArray(new String [extensionsList.size()]);
final String [] names= (String [])namesList.toArray(new String [namesList.size()]);
-
+
final int [] extensionsModes= integerListToIntArray(extensionsModesList);
final int [] namesModes= integerListToIntArray(namesModesList);
-
+
Team.getFileContentManager().setExtensionMappings(extensions, extensionsModes);
Team.getFileContentManager().setNameMappings(names, namesModes);
-
+
TeamUIPlugin.broadcastPropertyChange(new PropertyChangeEvent(this, TeamUI.GLOBAL_FILE_TYPES_CHANGED, null, null));
return true;
@@ -289,7 +289,7 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
private static int [] integerListToIntArray(List integers) {
final int [] array= new int [integers.size()];
- int index= 0;
+ int index= 0;
for (Iterator iter = integers.iterator(); iter.hasNext();)
array[index++]= ((Integer)iter.next()).intValue();
return array;
@@ -300,18 +300,18 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
*/
void addExtension() {
final ExtensionValidator validator = new ExtensionValidator();
- final InputDialog dialog = new InputDialog(getShell(), TeamUIMessages.TextPreferencePage_enterExtensionShort, TeamUIMessages.TextPreferencePage_enterExtensionLong, null, validator); //
- if (dialog.open() != Window.OK)
+ final InputDialog dialog = new InputDialog(getShell(), TeamUIMessages.TextPreferencePage_enterExtensionShort, TeamUIMessages.TextPreferencePage_enterExtensionLong, null, validator); //
+ if (dialog.open() != Window.OK)
return;
-
+
final String extension = validator.strip(dialog.getValue());
-
+
// Check if the item already exists
final Iterator it = fItems.iterator();
while (it.hasNext()) {
final FileTypeTable.Item item= (FileTypeTable.Item)it.next();
if (item instanceof FileTypeTable.Extension && item.name.equals(extension)) {
- MessageDialog.openWarning(getShell(), TeamUIMessages.TextPreferencePage_extensionExistsShort, TeamUIMessages.TextPreferencePage_extensionExistsLong); //
+ MessageDialog.openWarning(getShell(), TeamUIMessages.TextPreferencePage_extensionExistsShort, TeamUIMessages.TextPreferencePage_extensionExistsLong); //
return;
}
}
@@ -319,23 +319,23 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
fItems.add(item);
fTable.getViewer().refresh();
}
-
+
/**
* Add a new item to the table with the default type of Text.
*/
void addName() {
- final InputDialog dialog = new InputDialog(getShell(), TeamUIMessages.TextPreferencePage_6, TeamUIMessages.TextPreferencePage_7, null, new FilenameValidator()); //
- if (dialog.open() != Window.OK)
+ final InputDialog dialog = new InputDialog(getShell(), TeamUIMessages.TextPreferencePage_6, TeamUIMessages.TextPreferencePage_7, null, new FilenameValidator()); //
+ if (dialog.open() != Window.OK)
return;
-
+
final String name = dialog.getValue();
-
+
// Check if the item already exists
final Iterator it = fItems.iterator();
while (it.hasNext()) {
final FileTypeTable.Item item= (FileTypeTable.Item)it.next();
if (item instanceof FileTypeTable.Name && item.name.equals(name)) {
- MessageDialog.openWarning(getShell(), TeamUIMessages.TextPreferencePage_extensionExistsShort, TeamUIMessages.TextPreferencePage_extensionExistsLong); //
+ MessageDialog.openWarning(getShell(), TeamUIMessages.TextPreferencePage_extensionExistsShort, TeamUIMessages.TextPreferencePage_extensionExistsLong); //
return;
}
}
@@ -343,7 +343,7 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
fItems.add(item);
fTable.getViewer().refresh();
}
-
+
/**
* Remove the selected items from the table
*/
@@ -351,7 +351,7 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
final IStructuredSelection selection = fTable.getSelection();
if (selection == null)
return;
-
+
for (final Iterator it = selection.iterator(); it.hasNext(); ) {
final FileTypeTable.Item item= (FileTypeTable.Item)it.next();
if (item.contributed)
@@ -375,14 +375,14 @@ public class TextPreferencePage extends PreferencePage implements IWorkbenchPref
fTable.getViewer().refresh(item);
}
}
-
+
/**
* The table viewer selection has changed. Update the remove and change button enablement.
*/
void handleSelection() {
final boolean empty = fTable.getSelection().isEmpty();
FileTypeTable.Item selectedItem = (Item) fTable.getSelection().getFirstElement();
-
+
fRemoveButton.setEnabled(!empty && !selectedItem.contributed);
fChangeButton.setEnabled(!empty);
}
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 84dcfcc72..2a8541fa6 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
@@ -23,7 +23,7 @@ import org.osgi.framework.Bundle;
public abstract class RegistryReader {
protected static final String TAG_DESCRIPTION = "description"; //$NON-NLS-1$
protected static Hashtable extensionPoints = new Hashtable();
-
+
/**
* Creates an extension. If the extension plugin has not
* been loaded a busy cursor will be activated during the duration of
@@ -68,15 +68,15 @@ public abstract class RegistryReader {
IStatus.ERROR, NLS.bind(TeamUIMessages.RegistryReader_0, element.getNamespaceIdentifier(), element.getName()),e));
}
}
-
+
private static boolean isActivated(String bundleId) {
return isActivated(Platform.getBundle(bundleId));
}
-
+
private static boolean isActivated(Bundle bundle) {
return bundle != null && (bundle.getState() & (Bundle.ACTIVE | Bundle.STOPPING)) != 0;
}
-
+
/**
* The constructor.
*/
@@ -84,7 +84,7 @@ public abstract class RegistryReader {
}
/**
* This method extracts description as a sub-element of the given element.
- *
+ *
* @return description string if defined, or empty string if not.
*/
protected String getDescription(IConfigurationElement config) {
@@ -153,7 +153,7 @@ public abstract class RegistryReader {
* Implement this method to read element's attributes. If children should
* also be read, then implementor is responsible for calling <code>readElementChildren</code>.
* Implementor is also responsible for logging missing attributes.
- *
+ *
* @return true if element was recognized, false if not.
*/
protected abstract boolean readElement(IConfigurationElement element);
@@ -167,7 +167,7 @@ public abstract class RegistryReader {
/**
* Read each element one at a time by calling the subclass implementation
* of <code>readElement</code>.
- *
+ *
* Logs an error if the element was not recognized.
*/
protected void readElements(IConfigurationElement[] elements) {
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 d024c2a7f..c74a3f5c4 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
@@ -22,7 +22,7 @@ public class SynchronizeParticipantDescriptor implements ISynchronizeParticipant
public static final String ATT_CLASS = "class"; //$NON-NLS-1$
private static final String ATT_PERSISTENT = "persistent"; //$NON-NLS-1$
public static final String ATT_HELP_CONTEXT_ID = "helpContextId"; //$NON-NLS-1$
-
+
private String label;
private String className;
private String id;
@@ -30,7 +30,7 @@ public class SynchronizeParticipantDescriptor implements ISynchronizeParticipant
private ImageDescriptor imageDescriptor;
private String description;
private String helpContextId;
-
+
private IConfigurationElement configElement;
/**
@@ -52,19 +52,19 @@ public class SynchronizeParticipantDescriptor implements ISynchronizeParticipant
/**
* Returns this view's description. This is the value of its <code>"description"</code>
* attribute.
- *
+ *
* @return the description
*/
@Override
public String getDescription() {
return description;
}
-
+
@Override
public String getId() {
return id;
}
-
+
@Override
public ImageDescriptor getImageDescriptor() {
if (imageDescriptor != null)
@@ -80,7 +80,7 @@ public class SynchronizeParticipantDescriptor implements ISynchronizeParticipant
public String getName() {
return label;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeParticipantDescriptor#isPersistent()
*/
@@ -88,11 +88,11 @@ public class SynchronizeParticipantDescriptor implements ISynchronizeParticipant
public boolean isPersistent() {
return persistent;
}
-
+
public String getHelpContextId() {
return helpContextId;
}
-
+
/**
* Loads a view descriptor from the registry.
*/
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 1b9dc2e77..8b7602abe 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
@@ -22,7 +22,7 @@ public class SynchronizeParticipantRegistry extends RegistryReader {
public static final String PT_SYNCPARTICIPANTS = "synchronizeParticipants"; //$NON-NLS-1$
private static final String TAG_SYNCPARTICIPANT = "participant"; //$NON-NLS-1$
private Map participants = new HashMap();
-
+
public SynchronizeParticipantRegistry() {
super();
}
@@ -45,7 +45,7 @@ public class SynchronizeParticipantRegistry extends RegistryReader {
}
return false;
}
-
+
public SynchronizeParticipantDescriptor find(String id) {
return (SynchronizeParticipantDescriptor)participants.get(id);
}
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 dba7782b6..c5ab08636 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
@@ -19,54 +19,54 @@ import org.eclipse.team.internal.ui.TeamUIPlugin;
* Descriptor for accessing and creating synchronize wizards
*/
public class SynchronizeWizardDescription {
-
+
public static final String ATT_ID = "id"; //$NON-NLS-1$
public static final String ATT_NAME = "name"; //$NON-NLS-1$
public static final String ATT_ICON = "icon"; //$NON-NLS-1$
public static final String ATT_CLASS = "class"; //$NON-NLS-1$
public static final String ATT_DESCRIPTION = "description"; //$NON-NLS-1$
-
+
private String label;
private String className;
private String description;
private String id;
private ImageDescriptor imageDescriptor;
-
+
private IConfigurationElement configElement;
-
+
public SynchronizeWizardDescription(IConfigurationElement e, String descText) throws CoreException {
configElement = e;
loadFromExtension();
}
-
+
public IWizard createWizard() throws CoreException {
Object obj = RegistryReader.createExtension(configElement, ATT_CLASS);
return (IWizard) obj;
}
-
+
private void loadFromExtension() throws CoreException {
String identifier = configElement.getAttribute(ATT_ID);
label = configElement.getAttribute(ATT_NAME);
className = configElement.getAttribute(ATT_CLASS);
description = configElement.getAttribute(ATT_DESCRIPTION);
-
+
// Sanity check.
if ((label == null) || (className == null) || (identifier == null) || (description == null)) {
throw new CoreException(new Status(IStatus.ERROR, configElement.getNamespace(), 0, "Invalid extension (missing label or class name): " + identifier, //$NON-NLS-1$
null));
}
-
+
id = identifier;
}
-
+
public String getId() {
return id;
}
-
+
public String getDescription() {
return description;
}
-
+
public ImageDescriptor getImageDescriptor() {
if (imageDescriptor != null)
return imageDescriptor;
@@ -80,7 +80,7 @@ public class SynchronizeWizardDescription {
public String getName() {
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 a84635e21..e50defcbf 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
@@ -22,7 +22,7 @@ public class SynchronizeWizardRegistry extends RegistryReader {
public static final String PT_SYNCHRONIZE_WIZARDS = "synchronizeWizards"; //$NON-NLS-1$
private static final String TAG_SYNCHRONIZE_WIZARD = "wizard"; //$NON-NLS-1$
private Map wizards = new HashMap();
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.registry.RegistryReader#readElement(org.eclipse.core.runtime.IConfigurationElement)
*/
@@ -41,7 +41,7 @@ public class SynchronizeWizardRegistry extends RegistryReader {
}
return false;
}
-
+
public SynchronizeWizardDescription[] getSynchronizeWizards() {
return (SynchronizeWizardDescription[])wizards.values().toArray(new SynchronizeWizardDescription[wizards.size()]);
}
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 2a07dea5c..5c2234b1d 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
@@ -27,13 +27,13 @@ import org.osgi.service.prefs.Preferences;
public class TeamContentProviderDescriptor implements ITeamContentProviderDescriptor {
private static final String TAG_TEAM_CONTENT_PROVIDER = "teamContentProvider"; //$NON-NLS-1$
-
+
private static final String ATT_MODEL_PROVIDER_ID = "modelProviderId"; //$NON-NLS-1$
private static final String ATT_CONTENT_EXTENSION_ID = "contentExtensionId"; //$NON-NLS-1$
private static final String ATT_ICON = "icon"; //$NON-NLS-1$
private static final String ATT_PREFERENCE_PAGE = "preferencePage"; //$NON-NLS-1$
private static final String ATT_SUPPORTS_FLAT_LAYOUT = "supportsFlatLayout"; //$NON-NLS-1$
-
+
private static final String PREF_TEAM_CONTENT_DESCRIPTORS = "teamContentDescriptors"; //$NON-NLS-1$
private static final String PREF_ENABLED = "enabled"; //$NON-NLS-1$
@@ -91,7 +91,7 @@ public class TeamContentProviderDescriptor implements ITeamContentProviderDescri
new String[] { ATT_CONTENT_EXTENSION_ID,
TAG_TEAM_CONTENT_PROVIDER, id == null ? "" : id })); //$NON-NLS-1$
}
-
+
protected void fail(String reason) throws CoreException {
throw new CoreException(new Status(IStatus.ERROR, TeamUIPlugin.ID, 0, reason, null));
}
@@ -125,7 +125,7 @@ public class TeamContentProviderDescriptor implements ITeamContentProviderDescri
imageDescriptor = TeamUIPlugin.getImageDescriptorFromExtension(configElement.getDeclaringExtension(), iconName);
return imageDescriptor;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.registry.ITeamContentProviderDescriptor#createPreferencePage()
*/
@@ -154,7 +154,7 @@ public class TeamContentProviderDescriptor implements ITeamContentProviderDescri
flushPreferences();
}
}
-
+
public Preferences getParentPreferences() {
return TeamUIPlugin.getPlugin().getInstancePreferences().node(PREF_TEAM_CONTENT_DESCRIPTORS);
}
@@ -167,11 +167,11 @@ public class TeamContentProviderDescriptor implements ITeamContentProviderDescri
}
return internalGetPreferences();
}
-
+
private Preferences internalGetPreferences() {
return getParentPreferences().node(getPreferenceName());
}
-
+
private boolean hasPreferences() {
try {
return getParentPreferences().nodeExists(getPreferenceName());
@@ -180,7 +180,7 @@ public class TeamContentProviderDescriptor implements ITeamContentProviderDescri
return false;
}
}
-
+
/**
* Return a unique name that identifies this location but
* does not contain any slashes (/). Also, do not use ':'.
@@ -197,7 +197,7 @@ public class TeamContentProviderDescriptor implements ITeamContentProviderDescri
prefs.putBoolean(PREF_ENABLED, true);
flushPreferences();
}
-
+
private void flushPreferences() {
try {
internalGetPreferences().flush();
@@ -216,7 +216,7 @@ public class TeamContentProviderDescriptor implements ITeamContentProviderDescri
public String getName() {
if (contentProviderName != null)
return contentProviderName;
-
+
return null;
}
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 e96631b7f..c81bb3e7e 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
@@ -24,21 +24,21 @@ import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
* Manages the team content provider extension point
*/
public class TeamContentProviderManager implements ITeamContentProviderManager {
-
+
public static final String PT_TEAM_CONTENT_PROVIDERS = "teamContentProviders"; //$NON-NLS-1$
private static ITeamContentProviderManager instance;
-
+
Map descriptors;
-
+
private ListenerList listeners = new ListenerList(ListenerList.IDENTITY);
-
+
public static ITeamContentProviderManager getInstance() {
if (instance == null)
instance = new TeamContentProviderManager();
return instance;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.registry.ITeamContentProviderManager#getDescriptors()
*/
@@ -47,7 +47,7 @@ public class TeamContentProviderManager implements ITeamContentProviderManager {
lazyInitialize();
return (ITeamContentProviderDescriptor[]) descriptors.values().toArray(new ITeamContentProviderDescriptor[descriptors.size()]);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.ITeamContentProviderManager#getContentProviderIds(org.eclipse.team.core.mapping.ISynchronizationScope)
*/
@@ -62,7 +62,7 @@ public class TeamContentProviderManager implements ITeamContentProviderManager {
}
return (String[]) result.toArray(new String[result.size()]);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.registry.ITeamContentProviderManager#getDescriptor(java.lang.String)
*/
@@ -71,7 +71,7 @@ public class TeamContentProviderManager implements ITeamContentProviderManager {
lazyInitialize();
return (ITeamContentProviderDescriptor)descriptors.get(modelProviderId);
}
-
+
protected void lazyInitialize() {
if (descriptors != null)
return;
@@ -99,7 +99,7 @@ public class TeamContentProviderManager implements ITeamContentProviderManager {
public void removePropertyChangeListener(IPropertyChangeListener listener) {
listeners.remove(listener);
}
-
+
private void firePropertyChange(final PropertyChangeEvent event) {
Object[] allListeners = listeners.getListeners();
for (int i = 0; i < allListeners.length; i++) {
@@ -116,11 +116,11 @@ public class TeamContentProviderManager implements ITeamContentProviderManager {
});
}
}
-
+
public void enablementChanged(ITeamContentProviderDescriptor[] oldEnabled, ITeamContentProviderDescriptor[] newEnabled) {
firePropertyChange(new PropertyChangeEvent(this, PROP_ENABLED_MODEL_PROVIDERS, oldEnabled, newEnabled));
}
-
+
@Override
public void setEnabledDescriptors(ITeamContentProviderDescriptor[] descriptors) {
List previouslyEnabled = new ArrayList();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorDescription.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorDescription.java
index 2f52ef52d..500431664 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorDescription.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorDescription.java
@@ -24,11 +24,11 @@ public class TeamDecoratorDescription {
private static final String ATT_DECORATED_DIRECTION_ID = "decoratedDirection"; //$NON-NLS-1$
private static final String OUTGOING_FLAG = "OUTGOING"; //$NON-NLS-1$
private static final String INCOMING_FLAG = "INCOMING"; //$NON-NLS-1$
-
+
private String repositoryId;
private String decoratorId;
private int decoratedDirection;
-
+
public TeamDecoratorDescription(IExtension extension) throws CoreException {
readExtension(extension);
}
@@ -68,7 +68,7 @@ public class TeamDecoratorDescription {
if (repositoryId == null)
fail(NLS.bind(TeamUIMessages.TeamContentProviderDescriptor_1, new String[] { ATT_DECORATOR_ID, TAG_TEAM_DECORATOR, id == null ? "" : id})); //$NON-NLS-1$
}
-
+
protected void fail(String reason) throws CoreException {
throw new CoreException(new Status(IStatus.ERROR, TeamUIPlugin.ID, 0, reason, null));
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorManager.java
index 2f5bb224e..fe2bb863f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorManager.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorManager.java
@@ -18,29 +18,29 @@ import org.eclipse.team.internal.ui.TeamUIPlugin;
import org.eclipse.team.ui.mapping.ITeamContentProviderDescriptor;
public class TeamDecoratorManager {
-
+
public static final String PT_TEAM_DECORATORS = "teamDecorators"; //$NON-NLS-1$
private static TeamDecoratorManager instance;
-
+
Map descriptors;
-
+
public static TeamDecoratorManager getInstance() {
if (instance == null)
instance = new TeamDecoratorManager();
return instance;
}
-
+
public ITeamContentProviderDescriptor[] getDescriptors() {
lazyInitialize();
return (ITeamContentProviderDescriptor[]) descriptors.values().toArray(new ITeamContentProviderDescriptor[descriptors.size()]);
}
-
+
public TeamDecoratorDescription getDecoratorDescription(String providerId) {
lazyInitialize();
return (TeamDecoratorDescription)descriptors.get(providerId);
}
-
+
protected void lazyInitialize() {
if (descriptors != null)
return;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java
index 7f00a30d9..9b54146cb 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java
@@ -35,41 +35,41 @@ import org.eclipse.team.ui.synchronize.*;
* is based on the synchronization information contained in the provided {@link SyncInfoSet}.
*/
public abstract class AbstractSynchronizeModelProvider implements ISynchronizeModelProvider, ISyncInfoSetChangeListener, TreeListener {
-
+
/**
* Property constant for the expansion state for the elements displayed by the page. The
* expansion state is a List of resource paths.
*/
public static final String P_VIEWER_EXPANSION_STATE = TeamUIPlugin.ID + ".P_VIEWER_EXPANSION_STATE"; //$NON-NLS-1$
-
+
/**
* Property constant for the selection state for the elements displayed by the page. The
* selection state is a List of resource paths.
*/
public static final String P_VIEWER_SELECTION_STATE = TeamUIPlugin.ID + ".P_VIEWER_SELECTION_STATE"; //$NON-NLS-1$
-
+
/**
* Property constant for the checked state for the elements displayed by the page. The
* checked state is a List of resource paths.
*/
public static final String P_VIEWER_CHECKED_STATE = TeamUIPlugin.ID + ".P_VIEWER_CHECKED_STATE"; //$NON-NLS-1$
-
+
private ISynchronizeModelElement root;
-
+
private ISynchronizePageConfiguration configuration;
-
+
private SyncInfoSet set;
-
+
private SynchronizeModelUpdateHandler updateHandler;
-
+
private boolean disposed = false;
private SynchronizePageActionGroup actionGroup;
private ListenerList listeners;
-
+
private static final boolean DEBUG = false;
-
+
/**
* Constructor for creating a sub-provider
* @param parentProvider the parent provider
@@ -94,7 +94,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
set.addSyncSetChangedListener(this);
}
}
-
+
private Tree getTree() {
return ((Tree)((AbstractTreeViewer)getViewer()).getControl());
}
@@ -120,7 +120,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
configuration.addActionContribution(actionGroup);
}
}
-
+
/**
* Return the action group for this provider or <code>null</code>
* if there are no actions associated with this provider. The action
@@ -150,11 +150,11 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
protected SynchronizePageActionGroup createActionGroup() {
return null;
}
-
+
/**
* Return the set that contains the elements this provider is using as
* a basis for creating a presentation model. This cannot be null.
- *
+ *
* @return the set that contains the elements this provider is
* using as a basis for creating a presentation model.
*/
@@ -162,27 +162,27 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
public SyncInfoSet getSyncInfoSet() {
return set;
}
-
+
/**
* Returns the input created by this provider or <code>null</code> if
* {@link #prepareInput(IProgressMonitor)} hasn't been called on this object yet.
- *
+ *
* @return the input created by this provider.
*/
@Override
public ISynchronizeModelElement getModelRoot() {
return root;
}
-
+
/**
* Return the page configuration for this provider.
- *
+ *
* @return the page configuration for this provider.
*/
public ISynchronizePageConfiguration getConfiguration() {
return configuration;
}
-
+
/**
* Return the <code>AbstractTreeViewer</code> associated with this
* provider or <code>null</code> if the viewer is not of the proper type.
@@ -213,7 +213,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
}
return getModelRoot();
}
-
+
/**
* Calculate the problem marker that should be shown on the given
* element. The returned property can be either
@@ -278,13 +278,13 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
property = ISynchronizeModelElement.PROPAGATED_WARNING_MARKER_PROPERTY;
// Keep going because there may be errors on other resources
}
-
+
}
}
}
return property;
}
-
+
/**
* Return the logical model depth used for marker propagation
* @param resource the resource
@@ -293,7 +293,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
protected int getLogicalModelDepth(IResource resource) {
return IResource.DEPTH_INFINITE;
}
-
+
/**
* Update the label of the given diff node. The label for nodes queued
* using this method will not be updated until <code>firePendingLabelUpdates</code>
@@ -303,7 +303,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
protected void queueForLabelUpdate(ISynchronizeModelElement diffNode) {
updateHandler.queueForLabelUpdate(diffNode);
}
-
+
/**
* Throw away any old state associated with this provider and
* rebuild the model from scratch.
@@ -313,19 +313,19 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
if(isRootProvider() && hasViewerState()) {
saveViewerState();
}
-
+
// Clear existing model, but keep the root node
clearModelObjects(getModelRoot());
-
+
// Rebuild the model
buildModelObjects(getModelRoot());
-
+
// Notify listeners that model has changed
ISynchronizeModelElement root = getModelRoot();
if(root instanceof SynchronizeModelElement) {
((SynchronizeModelElement)root).fireChanges();
}
-
+
if (Utils.canUpdateViewer(getViewer())) {
// If we can update the viewer, that means that the view was updated
// when the model was rebuilt.
@@ -343,7 +343,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
}
}
}
-
+
private void refreshModelRoot() {
StructuredViewer viewer = getViewer();
if (viewer != null && !viewer.getControl().isDisposed()) {
@@ -366,14 +366,14 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
}
}
}
-
+
/**
* For each node create children based on the contents of
* @param node
* @return the diff elements
*/
protected abstract IDiffElement[] buildModelObjects(ISynchronizeModelElement node);
-
+
/**
* Returns whether the viewer has state to be saved.
* @return whether the viewer has state to be saved
@@ -401,7 +401,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
}
return (IResource[]) expanded.toArray(new IResource[expanded.size()]);
}
-
+
/*
* Return all the resources that are selected in the page.
* This method should only be called in the UI thread
@@ -411,7 +411,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
StructuredViewer viewer = getViewer();
return getResources(((IStructuredSelection) viewer.getSelection()).toArray());
}
-
+
/*
* Return all the resources that are checked in the page.
* This method should only be called in the UI thread
@@ -422,10 +422,10 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
if (viewer instanceof CheckboxTreeViewer){
return getResources(((CheckboxTreeViewer)viewer).getCheckedElements());
}
-
+
return new IResource[0];
}
-
+
/*
* Expand the resources if they appear in the page.
* This method should only be called in the UI thread
@@ -452,7 +452,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
if (!expandedElements.isEmpty())
((AbstractTreeViewer) viewer).setExpandedElements(expandedElements.toArray());
}
-
+
protected IResource[] getResources(Object[] objects) {
Set result = new HashSet();
if (objects.length > 0) {
@@ -466,11 +466,11 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
}
return (IResource[]) result.toArray(new IResource[result.size()]);
}
-
+
private void clearResourceCache(String configProperty) {
getConfiguration().setProperty(configProperty, null);
}
-
+
private void cacheResources(IResource[] resources, String configProperty) {
if (resources.length > 0) {
ISynchronizePageConfiguration config = getConfiguration();
@@ -490,7 +490,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
clearResourceCache(configProperty);
}
}
-
+
private IResource[] getCachedResources(String configProperty) {
List paths = (List)getConfiguration().getProperty(configProperty);
if (paths == null)
@@ -506,7 +506,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
}
return (IResource[]) resources.toArray(new IResource[resources.size()]);
}
-
+
/**
* Save the viewer state (expansion and selection)
*/
@@ -515,7 +515,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
final StructuredViewer viewer = getViewer();
if (viewer != null && !viewer.getControl().isDisposed() && viewer instanceof AbstractTreeViewer) {
//check to see if we should store the checked states of the tree
-
+
final boolean storeChecks = ((SynchronizePageConfiguration)configuration).getViewerStyle() == SynchronizePageConfiguration.CHECKBOX;
final IResource[][] expandedResources = new IResource[1][0];
final IResource[][] selectedResources = new IResource[1][0];
@@ -531,7 +531,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
}
}
});
-
+
// Save expansion and selection
cacheResources(expandedResources[0], P_VIEWER_EXPANSION_STATE);
cacheResources(selectedResources[0], P_VIEWER_SELECTION_STATE);
@@ -587,12 +587,12 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
StructuredViewer viewer = getViewer();
if (!(viewer instanceof CheckboxTreeViewer))
return;
-
+
for (int j = 0; j < resourcesToCheck.length; j++) {
IResource resource = resourcesToCheck[j];
if (resource.getType() != IResource.FILE)
continue;
-
+
ISynchronizeModelElement[] elements = getModelObjects(resource);
// Only expand when there is one element per resource
if (elements.length == 1) {
@@ -605,7 +605,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
if (!checkedElements.isEmpty())
((CheckboxTreeViewer) viewer).setCheckedElements(checkedElements.toArray());
}
-
+
/*
* Convert a path to a resource by first looking in the resource
* tree and, if that fails, by using the path format to create
@@ -637,7 +637,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
public void treeCollapsed(TreeEvent e) {
clearResourceCache(P_VIEWER_EXPANSION_STATE);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.swt.events.TreeListener#treeExpanded(org.eclipse.swt.events.TreeEvent)
*/
@@ -645,7 +645,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
public void treeExpanded(TreeEvent e) {
clearResourceCache(P_VIEWER_EXPANSION_STATE);
}
-
+
/**
* Return all the model objects in this provider that represent the given resource
* @param resource the resource
@@ -660,7 +660,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
public void saveState() {
saveViewerState();
}
-
+
/**
* Method invoked when a sync element is added or removed or its state changes.
* This method can be invoked from the UI thread or a background thread.
@@ -677,7 +677,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
updateHandler.updateParentLabels(element);
}
}
-
+
/**
* Return whether the given model element represents a conflict.
* @param element the element being tested
@@ -686,7 +686,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
protected boolean isConflicting(ISynchronizeModelElement element) {
return (element.getKind() & SyncInfo.DIRECTION_MASK) == SyncInfo.CONFLICTING;
}
-
+
/**
* Dispose of the provider
*/
@@ -710,7 +710,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
}
this.disposed = true;
}
-
+
private boolean isRootProvider() {
return updateHandler.getProvider() == this;
}
@@ -732,7 +732,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
* @return one or more lowest level parents that could contain the resource
*/
public abstract ISynchronizeModelElement[] getClosestExistingParents(IResource resource);
-
+
/**
* Handle the changes made to the viewer's <code>SyncInfoSet</code>.
* This method delegates the changes to the three methods <code>handleResourceChanges(ISyncInfoSetChangeEvent)</code>,
@@ -770,7 +770,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
* @param event
*/
protected abstract void handleResourceRemovals(ISyncInfoTreeChangeEvent event);
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener#syncInfoChanged(org.eclipse.team.core.synchronize.ISyncInfoSetChangeEvent, org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -787,7 +787,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
}, true /* preserve expansion */);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener#syncInfoSetErrors(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.team.core.ITeamStatus[], org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -796,7 +796,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
// Not handled
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener#syncInfoSetReset(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -804,7 +804,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
public void syncInfoSetReset(SyncInfoSet set, IProgressMonitor monitor) {
reset();
}
-
+
protected void addToViewer(ISynchronizeModelElement node) {
if (DEBUG) {
System.out.println("Adding model element " + node.getName()); //$NON-NLS-1$
@@ -825,7 +825,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
}
updateHandler.nodeAdded(node, this);
}
-
+
/*
* Propagate the marker property to the parent if it is not already there.
* Only propagate warnings if the parent isn't an error already.
@@ -872,7 +872,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
updateHandler.nodeRemoved(element, this);
}
}
-
+
/**
* Clear the model objects from the diff tree, cleaning up any cached state
* (such as resource to model object map). This method recurses deeply on
@@ -898,7 +898,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
if (parent != null) parent.remove(node);
}
}
-
+
/**
* Method that subclasses can override when clearing model objects.
* @param node the node to be cleared recursively
@@ -948,7 +948,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
SyncInfo info = getSyncInfoSet().getSyncInfo(resource);
return (info != null && info.getKind() != SyncInfo.IN_SYNC);
}
-
+
/**
* Return the provider that created and manages the given
* model element. The default is to return the receiver.
@@ -968,7 +968,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
protected void doAdd(ISynchronizeModelElement parent, ISynchronizeModelElement element) {
updateHandler.doAdd(parent, element);
}
-
+
/**
* Remove the element from the viewer
* @param elements the elements to be removed
@@ -988,7 +988,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
}
}
}
-
+
/**
* This is a callback from the model update handler that gets invoked
* when a node is added to the viewer. It is only invoked for the
@@ -999,7 +999,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
protected void nodeAdded(ISynchronizeModelElement node, AbstractSynchronizeModelProvider provider) {
// Default is to do nothing
}
-
+
/**
* This is a callback from the model update handler that gets invoked
* when a node is removed from the viewer. It is only invoked for the
@@ -1011,7 +1011,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
protected void nodeRemoved(ISynchronizeModelElement node, AbstractSynchronizeModelProvider provider) {
// Default is to do nothing
}
-
+
/**
* This is a callback from the model update handler that gets invoked
* when a node is cleared from the model. It is only invoked for the
@@ -1022,7 +1022,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
public void modelObjectCleared(ISynchronizeModelElement node) {
// Default is to do nothing
}
-
+
@Override
public void addPropertyChangeListener(IPropertyChangeListener listener) {
synchronized (this) {
@@ -1044,7 +1044,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
}
}
}
-
+
protected void firePropertyChange(String key, Object oldValue, Object newValue) {
Object[] allListeners;
synchronized(this) {
@@ -1065,7 +1065,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
});
}
}
-
+
/**
* Wait until the provider is done processing any events and
* the page content are up-to-date.
@@ -1085,7 +1085,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
}
monitor.worked(1);
}
-
+
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@@ -1103,7 +1103,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
}
return name + ": " + name2; //$NON-NLS-1$
}
-
+
/**
* Execute a runnable which performs an update of the model being displayed
* by this provider. The runnable should be executed in a thread-safe manner
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizePage.java
index bb84dcdd9..c940dd2e0 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizePage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizePage.java
@@ -33,18 +33,18 @@ import org.eclipse.ui.part.*;
* provide a link to a non-empty mode.
*/
public abstract class AbstractSynchronizePage extends Page implements ISynchronizePage, IAdaptable {
-
+
private ISynchronizePageConfiguration configuration;
private ISynchronizePageSite site;
-
- // Parent composite of this view. It is remembered so that we can dispose of its children when
+
+ // Parent composite of this view. It is remembered so that we can dispose of its children when
// the viewer type is switched.
private Composite composite;
private ChangesSection changesSection;
private Viewer changesViewer;
-
+
private AbstractViewerAdvisor viewerAdvisor;
-
+
/*
* Contribute actions for changing modes to the page.
*/
@@ -75,7 +75,7 @@ public abstract class AbstractSynchronizePage extends Page implements ISynchroni
group = layoutGroup;
}
MenuManager modesItem = new MenuManager(Utils.getString("action.modes.label", Policy.getActionBundle())); //$NON-NLS-1$
- viewMenu.appendToGroup(group.getId(), modesItem);
+ viewMenu.appendToGroup(group.getId(), modesItem);
modes.fillMenu(modesItem);
}
}
@@ -83,7 +83,7 @@ public abstract class AbstractSynchronizePage extends Page implements ISynchroni
return ISynchronizePageConfiguration.THREE_WAY.equals(configuration.getComparisonType());
}
}
-
+
/**
* Create a new instance of the page
* @param configuration a synchronize page configuration
@@ -93,13 +93,13 @@ public abstract class AbstractSynchronizePage extends Page implements ISynchroni
configuration.setPage(this);
configuration.addActionContribution(new ModeFilterActions());
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.part.IPage#createControl(org.eclipse.swt.widgets.Composite)
*/
@Override
public void createControl(Composite parent) {
- composite = new Composite(parent, SWT.NONE);
+ composite = new Composite(parent, SWT.NONE);
//sc.setContent(composite);
GridLayout gridLayout= new GridLayout();
gridLayout.makeColumnsEqualWidth= false;
@@ -110,7 +110,7 @@ public abstract class AbstractSynchronizePage extends Page implements ISynchroni
GridData data = new GridData(GridData.FILL_BOTH);
data.grabExcessVerticalSpace = true;
composite.setLayoutData(data);
-
+
// Create the changes section which, in turn, creates the changes viewer and its configuration
this.changesSection = createChangesSection(composite);
createChangesViewer(changesSection.getContainer());
@@ -122,11 +122,11 @@ public abstract class AbstractSynchronizePage extends Page implements ISynchroni
* @return the changes section that will contain the changes viewer
*/
protected abstract ChangesSection createChangesSection(Composite parent);
-
+
/**
* Return the viewer that will display the changes associated
* with the page.
- *
+ *
* @param parent the parent of the viewer
*/
private void createChangesViewer(Composite parent) {
@@ -136,20 +136,20 @@ public abstract class AbstractSynchronizePage extends Page implements ISynchroni
}
protected abstract AbstractViewerAdvisor createViewerAdvisor(Composite parent);
-
+
public AbstractViewerAdvisor getViewerAdvisor() {
return viewerAdvisor;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.part.IPage#setActionBars(org.eclipse.ui.IActionBars)
*/
@Override
public void setActionBars(IActionBars actionBars) {
// Delegate menu creation to the advisor
- viewerAdvisor.setActionBars(actionBars);
+ viewerAdvisor.setActionBars(actionBars);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.part.IPage#getControl()
*/
@@ -157,7 +157,7 @@ public abstract class AbstractSynchronizePage extends Page implements ISynchroni
public Control getControl() {
return composite;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.part.IPage#setFocus()
*/
@@ -165,7 +165,7 @@ public abstract class AbstractSynchronizePage extends Page implements ISynchroni
public void setFocus() {
changesSection.setFocus();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizePage#init(org.eclipse.team.ui.synchronize.ISynchronizePageSite)
*/
@@ -181,13 +181,13 @@ public abstract class AbstractSynchronizePage extends Page implements ISynchroni
}
} catch (NumberFormatException e) {
// The mode settings does not exist.
- // Leave the mode as is (assuming the
+ // Leave the mode as is (assuming the
// participant initialized it to an
// appropriate value
}
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.part.Page#dispose()
*/
@@ -197,7 +197,7 @@ public abstract class AbstractSynchronizePage extends Page implements ISynchroni
composite.dispose();
super.dispose();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizePage#getViewer()
*/
@@ -205,7 +205,7 @@ public abstract class AbstractSynchronizePage extends Page implements ISynchroni
public Viewer getViewer() {
return changesViewer;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizePage#aboutToChangeProperty(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration, java.lang.String, java.lang.Object)
*/
@@ -231,7 +231,7 @@ public abstract class AbstractSynchronizePage extends Page implements ISynchroni
/*
* This method enables "Show In" support for this view
- *
+ *
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
@Override
@@ -241,7 +241,7 @@ public abstract class AbstractSynchronizePage extends Page implements ISynchroni
if (key == IShowInSource.class) {
return new IShowInSource() {
@Override
- public ShowInContext getShowInContext() {
+ public ShowInContext getShowInContext() {
StructuredViewer v = (StructuredViewer)changesViewer;
if (v == null) return null;
ISelection s = v.getSelection();
@@ -264,7 +264,7 @@ public abstract class AbstractSynchronizePage extends Page implements ISynchroni
}
return null;
}
-
+
/**
* Return the page site that was assigned to this page.
* @return the page site that was assigned to this page
@@ -272,7 +272,7 @@ public abstract class AbstractSynchronizePage extends Page implements ISynchroni
public ISynchronizePageSite getSynchronizePageSite() {
return site;
}
-
+
/**
* Return the synchronize page configuration that was used to create
* this page.
@@ -293,12 +293,12 @@ public abstract class AbstractSynchronizePage extends Page implements ISynchroni
}
/**
- * Callback from the changes section that indicates that the
- * user has chosen to reset the view contents after an error
+ * Callback from the changes section that indicates that the
+ * user has chosen to reset the view contents after an error
* has occurred
*/
public abstract void reset();
-
+
/**
* Change the mode to the given mode. This method is invoked
* when the mode in the configuration is changed by a client.
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractTreeViewerAdvisor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractTreeViewerAdvisor.java
index c0e4c0cff..c1b6220f9 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractTreeViewerAdvisor.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractTreeViewerAdvisor.java
@@ -28,19 +28,19 @@ public abstract class AbstractTreeViewerAdvisor extends StructuredViewerAdvisor
private ICompareNavigator nav;
private INavigatable navigatable;
-
+
/**
* Interface used to implement navigation for tree viewers. This interface is used by
- * {@link TreeViewerAdvisor#navigate(TreeViewer, boolean, boolean, boolean) to open}
+ * {@link TreeViewerAdvisor#navigate(TreeViewer, boolean, boolean, boolean) to open}
* selections and navigate.
*/
public interface ITreeViewerAccessor {
public void createChildren(TreeItem item);
public void openSelection();
}
-
+
private class TreeCompareNavigator extends CompareNavigator {
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareNavigator#getNavigatables()
*/
@@ -49,7 +49,7 @@ public abstract class AbstractTreeViewerAdvisor extends StructuredViewerAdvisor
INavigatable navigatable = getNavigatable();
return new INavigatable[] { navigatable };
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareNavigator#selectChange(boolean)
*/
@@ -72,7 +72,7 @@ public abstract class AbstractTreeViewerAdvisor extends StructuredViewerAdvisor
}
return noNextChange;
}
-
+
private boolean hasCompareInput(Object selectedObject) {
SyncInfo syncInfo = getSyncInfo(selectedObject);
if(syncInfo != null) {
@@ -113,7 +113,7 @@ public abstract class AbstractTreeViewerAdvisor extends StructuredViewerAdvisor
Object selectedObject = AbstractTreeViewerAdvisor.this.getFirstElement((IStructuredSelection)getViewer().getSelection());
IEditorPart editor = OpenInCompareAction.findOpenCompareEditor((IWorkbenchPartSite)ws, selectedObject, getConfiguration().getParticipant());
if(editor != null) {
- // if an existing editor is open on the current selection, use it
+ // if an existing editor is open on the current selection, use it
CompareEditorInput input = (CompareEditorInput)editor.getEditorInput();
ICompareNavigator navigator = input.getNavigator();
if (navigator instanceof TreeCompareNavigator) {
@@ -123,15 +123,15 @@ public abstract class AbstractTreeViewerAdvisor extends StructuredViewerAdvisor
}
if (navigator instanceof CompareNavigator) {
return (CompareNavigator) navigator;
-
+
}
}
}
return null;
}
-
+
}
-
+
private static boolean hasNextPrev(TreeViewer viewer, TreeItem item, boolean next) {
if (item == null || !(viewer instanceof ITreeViewerAccessor))
return false;
@@ -175,7 +175,7 @@ public abstract class AbstractTreeViewerAdvisor extends StructuredViewerAdvisor
}
return false;
}
-
+
private static TreeItem findNextPrev(TreeViewer viewer, TreeItem item, boolean next) {
if (item == null || !(viewer instanceof ITreeViewerAccessor))
return null;
@@ -267,12 +267,12 @@ public abstract class AbstractTreeViewerAdvisor extends StructuredViewerAdvisor
* Selects the next (or previous) node of the current selection.
* If there is no current selection the first (last) node in the tree is selected.
* Wraps around at end or beginning.
- * Clients may not override.
- * @param viewer
+ * Clients may not override.
+ * @param viewer
*
* @param next if <code>true</code> the next node is selected, otherwise the previous node
- * @param fireOpen
- * @param expandOnly
+ * @param fireOpen
+ * @param expandOnly
* @return <code>true</code> if at end (or beginning)
*/
public static boolean navigate(TreeViewer viewer, boolean next, boolean fireOpen, boolean expandOnly) {
@@ -284,7 +284,7 @@ public abstract class AbstractTreeViewerAdvisor extends StructuredViewerAdvisor
setSelection(viewer, item, fireOpen, expandOnly);
return item == null;
}
-
+
private static TreeItem getNextItem(TreeViewer viewer, boolean next) {
TreeItem item = getCurrentItem(viewer);
if (item != null) {
@@ -315,7 +315,7 @@ public abstract class AbstractTreeViewerAdvisor extends StructuredViewerAdvisor
}
return item;
}
-
+
private static boolean hasChange(TreeViewer viewer, boolean next) {
TreeItem item = getCurrentItem(viewer);
if (item != null) {
@@ -335,7 +335,7 @@ public abstract class AbstractTreeViewerAdvisor extends StructuredViewerAdvisor
/**
* Allow navigation in tree viewers.
- *
+ *
* @param next if <code>true</code> then navigate forwards, otherwise navigate
* backwards.
* @return <code>true</code> if the end is reached, and <code>false</code> otherwise.
@@ -343,7 +343,7 @@ public abstract class AbstractTreeViewerAdvisor extends StructuredViewerAdvisor
public boolean navigate(boolean next) {
return navigate((TreeViewer)getViewer(), next, false, false);
}
-
+
protected boolean hasChange(boolean next) {
return hasChange((TreeViewer)getViewer(), next);
}
@@ -381,7 +381,7 @@ public abstract class AbstractTreeViewerAdvisor extends StructuredViewerAdvisor
}
return navigate((TreeViewer)getViewer(), flag == INavigatable.NEXT_CHANGE, true, false);
}
-
+
@Override
public boolean openSelectedChange() {
Viewer v = getViewer();
@@ -400,7 +400,7 @@ public abstract class AbstractTreeViewerAdvisor extends StructuredViewerAdvisor
public Object getInput() {
return getViewer().getInput();
}
-
+
};
}
return navigatable;
@@ -408,7 +408,7 @@ public abstract class AbstractTreeViewerAdvisor extends StructuredViewerAdvisor
/**
* Handles a double-click event from the viewer. Expands or collapses a folder when double-clicked.
- *
+ *
* @param viewer the viewer
* @param event the double-click event
*/
@@ -438,7 +438,7 @@ public abstract class AbstractTreeViewerAdvisor extends StructuredViewerAdvisor
Object element = selection.getFirstElement();
return element;
}
-
+
private Object getFirstElement(IStructuredSelection selection) {
Object element = getFirstElementOrPath(selection);
if (element instanceof TreePath) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractViewerAdvisor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractViewerAdvisor.java
index 43b3a33db..9d8571c92 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractViewerAdvisor.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractViewerAdvisor.java
@@ -22,7 +22,7 @@ public abstract class AbstractViewerAdvisor {
private ISynchronizePageConfiguration configuration;
private StructuredViewer viewer;
-
+
public AbstractViewerAdvisor(ISynchronizePageConfiguration configuration) {
this.configuration = configuration;
configuration.setProperty(SynchronizePageConfiguration.P_ADVISOR, this);
@@ -35,7 +35,7 @@ public abstract class AbstractViewerAdvisor {
/**
* Install a viewer to be configured with this advisor. An advisor can only be installed with
* one viewer at a time. When this method completes the viewer is considered initialized and
- * can be shown to the user.
+ * can be shown to the user.
* @param viewer the viewer being installed
*/
protected void initializeViewer(final StructuredViewer viewer) {
@@ -43,11 +43,11 @@ public abstract class AbstractViewerAdvisor {
Assert.isTrue(validateViewer(viewer));
this.viewer = viewer;
}
-
+
/**
* Subclasses can validate that the viewer being initialized with this advisor
* is of the correct type.
- *
+ *
* @param viewer the viewer to validate
* @return <code>true</code> if the viewer is valid, <code>false</code> otherwise.
*/
@@ -57,7 +57,7 @@ public abstract class AbstractViewerAdvisor {
/**
* Returns the viewer configured by this advisor.
- *
+ *
* @return the viewer configured by this advisor.
*/
public StructuredViewer getViewer() {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActionDelegateWrapper.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActionDelegateWrapper.java
index 07285702c..9e385fa69 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActionDelegateWrapper.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActionDelegateWrapper.java
@@ -23,7 +23,7 @@ import org.eclipse.ui.*;
* in toolbars, etc.
*/
public class ActionDelegateWrapper extends Action implements ISelectionChangedListener {
-
+
private IActionDelegate delegate;
public ActionDelegateWrapper(IActionDelegate delegate, ISynchronizePageConfiguration configuration) {
@@ -33,18 +33,18 @@ public class ActionDelegateWrapper extends Action implements ISelectionChangedLi
if (delegate instanceof IObjectActionDelegate) {
((IObjectActionDelegate)delegate).setActivePart(this, part);
}
- if (part instanceof IViewPart
+ if (part instanceof IViewPart
&& delegate instanceof IViewActionDelegate) {
((IViewActionDelegate)delegate).init((IViewPart)part);
}
- if (part instanceof IEditorPart
+ if (part instanceof IEditorPart
&& delegate instanceof IEditorActionDelegate) {
((IEditorActionDelegate)delegate).setActiveEditor(this, (IEditorPart)part);
}
}
initialize(configuration);
}
-
+
public ActionDelegateWrapper(IActionDelegate delegate, ISynchronizePageConfiguration configuration, String id) {
this(delegate, configuration);
setId(id);
@@ -66,7 +66,7 @@ public class ActionDelegateWrapper extends Action implements ISelectionChangedLi
}
});
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
*/
@@ -74,7 +74,7 @@ public class ActionDelegateWrapper extends Action implements ISelectionChangedLi
public void selectionChanged(SelectionChangedEvent event) {
getDelegate().selectionChanged(this, event.getSelection());
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.action.IAction#run()
*/
@@ -82,7 +82,7 @@ public class ActionDelegateWrapper extends Action implements ISelectionChangedLi
public void run() {
getDelegate().run(this);
}
-
+
/**
* Return the delegate associated with this action.
* @return the delegate associated with this action
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActiveChangeSetCollector.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActiveChangeSetCollector.java
index 0833f0fb3..39d6c6131 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActiveChangeSetCollector.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActiveChangeSetCollector.java
@@ -37,12 +37,12 @@ import org.eclipse.team.ui.synchronize.*;
public class ActiveChangeSetCollector implements IDiffChangeListener {
private final ISynchronizePageConfiguration configuration;
-
+
/*
* Map active change sets to infos displayed by the participant
*/
private final Map activeSets = new HashMap();
-
+
/*
* Set which contains those changes that are not part of an active set
*/
@@ -66,7 +66,7 @@ public class ActiveChangeSetCollector implements IDiffChangeListener {
}
}, true, true);
}
-
+
@Override
public void defaultSetChanged(final ChangeSet previousDefault, final ChangeSet set) {
provider.performUpdate(new IWorkspaceRunnable() {
@@ -77,7 +77,7 @@ public class ActiveChangeSetCollector implements IDiffChangeListener {
}
}, true, true);
}
-
+
@Override
public void setRemoved(final ChangeSet set) {
provider.performUpdate(new IWorkspaceRunnable() {
@@ -114,7 +114,7 @@ public class ActiveChangeSetCollector implements IDiffChangeListener {
if (info != null && info.getKind() != SyncInfo.IN_SYNC) {
outOfSync.add(info);
}
- }
+ }
}
if (!outOfSync.isEmpty()) {
provider.performUpdate(new IWorkspaceRunnable() {
@@ -131,7 +131,7 @@ public class ActiveChangeSetCollector implements IDiffChangeListener {
* Listener that wants to receive change events from this collector
*/
private IChangeSetChangeListener listener;
-
+
public ActiveChangeSetCollector(ISynchronizePageConfiguration configuration, ChangeSetModelProvider provider) {
this.configuration = configuration;
this.provider = provider;
@@ -141,15 +141,15 @@ public class ActiveChangeSetCollector implements IDiffChangeListener {
public ISynchronizePageConfiguration getConfiguration() {
return configuration;
}
-
+
public ActiveChangeSetManager getActiveChangeSetManager() {
ISynchronizeParticipant participant = getConfiguration().getParticipant();
- if (participant instanceof IChangeSetProvider) {
+ if (participant instanceof IChangeSetProvider) {
return ((IChangeSetProvider)participant).getChangeSetCapability().getActiveChangeSetManager();
}
return null;
}
-
+
/**
* Re-populate the change sets from the seed set.
* If <code>null</code> is passed, the state
@@ -162,10 +162,10 @@ public class ActiveChangeSetCollector implements IDiffChangeListener {
* will invoke this method from a particular thread (which may
* or may not be the UI thread). Updates done to the collector
* from within this thread will be thread-safe and update the view
- * properly. Updates done from other threads should use the
+ * properly. Updates done from other threads should use the
* <code>performUpdate</code> method to ensure the view is
* updated properly.
- * @param seedSet
+ * @param seedSet
*/
public void reset(SyncInfoSet seedSet) {
// First, clean up
@@ -176,7 +176,7 @@ public class ActiveChangeSetCollector implements IDiffChangeListener {
remove(set);
}
activeSets.clear();
-
+
// Now re-populate
if (seedSet != null) {
if (getConfiguration().getComparisonType() == ISynchronizePageConfiguration.THREE_WAY) {
@@ -203,7 +203,7 @@ public class ActiveChangeSetCollector implements IDiffChangeListener {
}
}
}
-
+
/**
* Handle a sync info set change event from the provider's
* seed set.
@@ -214,7 +214,7 @@ public class ActiveChangeSetCollector implements IDiffChangeListener {
* will invoke this method from a particular thread (which may
* or may not be the UI thread). Updates done to the collector
* from within this thread will be thread-safe and update the view
- * properly. Updates done from other threads should use the
+ * properly. Updates done from other threads should use the
* <code>performUpdate</code> method to ensure the view is
* updated properly.
*/
@@ -236,7 +236,7 @@ public class ActiveChangeSetCollector implements IDiffChangeListener {
add((SyncInfo[]) additions.toArray(new SyncInfo[additions.size()]));
}
}
-
+
/**
* Remove the given resources from all sets of this collector.
* @param resources the resources to be removed
@@ -248,7 +248,7 @@ public class ActiveChangeSetCollector implements IDiffChangeListener {
}
rootSet.removeAll(resources);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SyncInfoSetChangeSetCollector#add(org.eclipse.team.core.synchronize.SyncInfo[])
*/
@@ -269,7 +269,7 @@ public class ActiveChangeSetCollector implements IDiffChangeListener {
} else {
targetSet.add(info);
}
- }
+ }
}
}
}
@@ -300,11 +300,11 @@ public class ActiveChangeSetCollector implements IDiffChangeListener {
TeamUIPlugin.log(e);
}
}
- return (info.getComparator().isThreeWay()
+ return (info.getComparator().isThreeWay()
&& ((info.getKind() & SyncInfo.DIRECTION_MASK) == SyncInfo.OUTGOING ||
(info.getKind() & SyncInfo.DIRECTION_MASK) == SyncInfo.CONFLICTING));
}
-
+
public SyncInfoTree getRootSet() {
return rootSet;
}
@@ -321,7 +321,7 @@ public class ActiveChangeSetCollector implements IDiffChangeListener {
listener.setAdded(set);
}
}
-
+
private SyncInfoTree createSyncInfoSet(ChangeSet set) {
SyncInfoTree sis = getSyncInfoSet(set);
// Register the listener last since the add will
@@ -380,11 +380,11 @@ public class ActiveChangeSetCollector implements IDiffChangeListener {
private boolean select(IDiff diff) {
return getSeedSet().getSyncInfo(ResourceDiffTree.getResourceFor(diff)) != null;
}
-
+
/* private */ SyncInfo getSyncInfo(IPath path) {
return getSyncInfo(getSeedSet(), path);
}
-
+
/* private */ IResource[] getResources(SyncInfoSet set, IPath[] paths) {
List result = new ArrayList();
for (int i = 0; i < paths.length; i++) {
@@ -435,11 +435,11 @@ public class ActiveChangeSetCollector implements IDiffChangeListener {
}
return null;
}
-
+
private boolean select(SyncInfo info) {
return getSeedSet().getSyncInfo(info.getLocal()) != null;
}
-
+
private SyncInfoSet getSeedSet() {
return provider.getSyncInfoSet();
}
@@ -447,7 +447,7 @@ public class ActiveChangeSetCollector implements IDiffChangeListener {
public void dispose() {
getActiveChangeSetManager().removeListener(activeChangeSetListener);
}
-
+
/**
* Set the change set listener for this collector. There is
* only one for this type of collector.
@@ -461,7 +461,7 @@ public class ActiveChangeSetCollector implements IDiffChangeListener {
getActiveChangeSetManager().addListener(activeChangeSetListener);
}
}
-
+
@Override
public void diffsChanged(final IDiffChangeEvent event, IProgressMonitor monitor) {
provider.performUpdate(new IWorkspaceRunnable() {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetCapability.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetCapability.java
index 898f08988..d0cb7027a 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetCapability.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetCapability.java
@@ -28,7 +28,7 @@ public abstract class ChangeSetCapability {
* Return whether the associated participant supports
* the display of checked-in change sets. The default is
* unsupported (<code>false</code>). If subclasses support
- * checked-in change sets, they must override the
+ * checked-in change sets, they must override the
* <code>createCheckedInChangeSetCollector</code>
* method to return an appropriate values.
* @return whether the associated participant supports
@@ -37,12 +37,12 @@ public abstract class ChangeSetCapability {
public boolean supportsCheckedInChangeSets() {
return false;
}
-
+
/**
* Return whether the associated participant supports
* the use of active change sets. The default is unsupported
* (<code>false</code>). If a subclass overrides this method in
- * order to support active change sets, they must also override the methods
+ * order to support active change sets, they must also override the methods
* <code>getActiveChangeSetManager</code>,
* <code>createChangeSet</code> and <code>editChangeSet</code>.
* @return whether the associated participant supports
@@ -51,11 +51,11 @@ public abstract class ChangeSetCapability {
public boolean supportsActiveChangeSets() {
return false;
}
-
+
/**
* Return the change set collector that manages the active change
* set for the participant associated with this capability. A <code>null</code>
- * is returned if active change sets are not supported. The default is to
+ * is returned if active change sets are not supported. The default is to
* return <code>null</code>. This method must be
* overridden by subclasses that support active change sets.
* @return the change set collector that manages the active change
@@ -65,11 +65,11 @@ public abstract class ChangeSetCapability {
public ActiveChangeSetManager getActiveChangeSetManager() {
return null;
}
-
+
/**
* Create a change set from the given manager that contains the given sync info.
* This method is invoked from the UI thread. A <code>null</code>
- * is returned if active change sets are not supported. The default is to
+ * is returned if active change sets are not supported. The default is to
* return <code>null</code>. This method must be
* overridden by subclasses that support active change sets.
* @param configuration the configuration of the page displaying the change sets
@@ -79,7 +79,7 @@ public abstract class ChangeSetCapability {
public ActiveChangeSet createChangeSet(ISynchronizePageConfiguration configuration, IDiff[] diffs) {
return null;
}
-
+
/**
* Edit the title and comment of the given change set. This method must be
* overridden by subclasses that support active change sets.
@@ -90,7 +90,7 @@ public abstract class ChangeSetCapability {
public void editChangeSet(ISynchronizePageConfiguration configuration, ActiveChangeSet set) {
// Default is to do nothing
}
-
+
/**
* Return a collector that can be used to group a set of checked-in changes
* into a set of checked-in change sets. This method must be
@@ -101,7 +101,7 @@ public abstract class ChangeSetCapability {
public SyncInfoSetChangeSetCollector createSyncInfoSetChangeSetCollector(ISynchronizePageConfiguration configuration) {
return null;
}
-
+
/**
* Return an action group for contributing context menu items
* to the synchronize page while change sets are enabled.
@@ -115,30 +115,30 @@ public abstract class ChangeSetCapability {
public SynchronizePageActionGroup getActionGroup() {
return null;
}
-
+
/**
- * Returns whether checked-in change sets should be enabled for the given state
- * in the configuration. The default is to enable for three-way incoming mode and
+ * Returns whether checked-in change sets should be enabled for the given state
+ * in the configuration. The default is to enable for three-way incoming mode and
* two-way.
* @param configuration the configuration for a synchronize page
- * @return whether checked-in change sets should be enabled for the given state
+ * @return whether checked-in change sets should be enabled for the given state
* in the configuration
*/
public boolean enableCheckedInChangeSetsFor(ISynchronizePageConfiguration configuration) {
- return supportsCheckedInChangeSets() &&
+ return supportsCheckedInChangeSets() &&
(configuration.getMode() == ISynchronizePageConfiguration.INCOMING_MODE ||
configuration.getComparisonType() == ISynchronizePageConfiguration.TWO_WAY);
}
-
+
/**
- * Returns whether active change sets should be enabled for the given state
+ * Returns whether active change sets should be enabled for the given state
* in the configuration. The default is to enable for three-way outgoing mode.
* @param configuration the configuration for a synchronize page
- * @return whether active change sets should be enabled for the given state
+ * @return whether active change sets should be enabled for the given state
* in the configuration
*/
public boolean enableActiveChangeSetsFor(ISynchronizePageConfiguration configuration) {
- return supportsActiveChangeSets() &&
+ return supportsActiveChangeSets() &&
configuration.getMode() == ISynchronizePageConfiguration.OUTGOING_MODE;
}
@@ -151,5 +151,5 @@ public abstract class ChangeSetCapability {
public boolean enableChangeSetsByDefault() {
return false;
}
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetDiffNode.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetDiffNode.java
index fbe6ada15..0ff3a9446 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetDiffNode.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetDiffNode.java
@@ -40,7 +40,7 @@ public class ChangeSetDiffNode extends SynchronizeModelElement {
public ChangeSet getSet() {
return set;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
*/
@@ -56,7 +56,7 @@ public class ChangeSetDiffNode extends SynchronizeModelElement {
public String getName() {
return set.getName();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SyncInfoModelElement#toString()
*/
@@ -64,7 +64,7 @@ public class ChangeSetDiffNode extends SynchronizeModelElement {
public String toString() {
return getName();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelElement#hashCode()
*/
@@ -72,7 +72,7 @@ public class ChangeSetDiffNode extends SynchronizeModelElement {
public int hashCode() {
return set.hashCode();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelElement#equals(java.lang.Object)
*/
@@ -83,7 +83,7 @@ public class ChangeSetDiffNode extends SynchronizeModelElement {
}
return super.equals(object);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelElement#getAdapter(java.lang.Class)
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetLabelDecorator.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetLabelDecorator.java
index 75437e1f6..45e867808 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetLabelDecorator.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetLabelDecorator.java
@@ -31,18 +31,18 @@ public class ChangeSetLabelDecorator extends LabelProvider implements ILabelDeco
public ChangeSetLabelDecorator(ISynchronizePageConfiguration configuration) {
ISynchronizeParticipant participant = configuration.getParticipant();
- if (participant instanceof IChangeSetProvider) {
+ if (participant instanceof IChangeSetProvider) {
this.collector = ((IChangeSetProvider)participant).getChangeSetCapability().getActiveChangeSetManager();
}
}
-
+
@Override
public String decorateText(String input, Object element) {
String text = input;
if (element instanceof ChangeSetDiffNode) {
ChangeSet set = ((ChangeSetDiffNode)element).getSet();
if (set instanceof ActiveChangeSet && isDefaultActiveSet((ActiveChangeSet)set)) {
- text = NLS.bind(TeamUIMessages.CommitSetDiffNode_0, new String[] { text });
+ text = NLS.bind(TeamUIMessages.CommitSetDiffNode_0, new String[] { text });
}
}
return text;
@@ -65,7 +65,7 @@ public class ChangeSetLabelDecorator extends LabelProvider implements ILabelDeco
FontData[] data = defaultFont.getFontData();
for (int i = 0; i < data.length; i++) {
data[i].setStyle(SWT.BOLD);
- }
+ }
boldFont = new Font(TeamUIPlugin.getStandardDisplay(), data);
}
return boldFont;
@@ -85,5 +85,5 @@ public class ChangeSetLabelDecorator extends LabelProvider implements ILabelDeco
public Image decorateImage(Image image, Object element) {
return image;
}
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelManager.java
index 52dc38d2e..a6f0c9f3f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelManager.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelManager.java
@@ -24,17 +24,17 @@ import org.eclipse.team.ui.synchronize.SynchronizePageActionGroup;
* Manager for hierarchical models
*/
public class ChangeSetModelManager extends HierarchicalModelManager implements IPropertyChangeListener {
-
+
private static final String P_COMMIT_SET_ENABLED = TeamUIPlugin.ID + ".P_COMMIT_SET_ENABLED"; //$NON-NLS-1$
-
+
public static final String CHANGE_SET_GROUP = "ChangeSet"; //$NON-NLS-1$
-
+
boolean enabled = false;
-
+
private class ToggleCommitSetAction extends Action {
public ToggleCommitSetAction() {
- super(TeamUIMessages.ChangeLogModelManager_0, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_CHANGE_SET));
- setToolTipText(TeamUIMessages.ChangeLogModelManager_0);
+ super(TeamUIMessages.ChangeLogModelManager_0, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_CHANGE_SET));
+ setToolTipText(TeamUIMessages.ChangeLogModelManager_0);
update();
}
@Override
@@ -46,24 +46,24 @@ public class ChangeSetModelManager extends HierarchicalModelManager implements I
setChecked(enabled);
}
}
-
+
private ToggleCommitSetAction toggleCommitSetAction;
-
+
private class CommitSetActionContribution extends SynchronizePageActionGroup {
@Override
public void initialize(ISynchronizePageConfiguration configuration) {
super.initialize(configuration);
-
+
toggleCommitSetAction = new ToggleCommitSetAction();
appendToGroup(
- ISynchronizePageConfiguration.P_TOOLBAR_MENU,
+ ISynchronizePageConfiguration.P_TOOLBAR_MENU,
CHANGE_SET_GROUP,
toggleCommitSetAction);
updateEnablement();
}
}
-
+
public ChangeSetModelManager(ISynchronizePageConfiguration configuration) {
super(configuration);
configuration.addPropertyChangeListener(this);
@@ -84,7 +84,7 @@ public class ChangeSetModelManager extends HierarchicalModelManager implements I
});
}
- private ChangeSetCapability getChangeSetCapability(ISynchronizePageConfiguration configuration) {
+ private ChangeSetCapability getChangeSetCapability(ISynchronizePageConfiguration configuration) {
ISynchronizeParticipant participant = configuration.getParticipant();
if (participant instanceof IChangeSetProvider) {
IChangeSetProvider provider = (IChangeSetProvider) participant;
@@ -92,7 +92,7 @@ public class ChangeSetModelManager extends HierarchicalModelManager implements I
}
return null;
}
-
+
private void updateEnablement() {
if (toggleCommitSetAction != null) {
ISynchronizePageConfiguration configuration = getConfiguration();
@@ -101,7 +101,7 @@ public class ChangeSetModelManager extends HierarchicalModelManager implements I
|| changeSetCapability.enableCheckedInChangeSetsFor(configuration));
toggleCommitSetAction.setEnabled(enabled);
}
-
+
}
/* (non-Javadoc)
@@ -112,7 +112,7 @@ public class ChangeSetModelManager extends HierarchicalModelManager implements I
getConfiguration().removePropertyChangeListener(this);
super.dispose();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelManager#createModelProvider(java.lang.String)
*/
@@ -124,7 +124,7 @@ public class ChangeSetModelManager extends HierarchicalModelManager implements I
return super.createModelProvider(id);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelManager#getSelectedProviderId()
*/
@@ -144,7 +144,7 @@ public class ChangeSetModelManager extends HierarchicalModelManager implements I
@Override
public void propertyChange(PropertyChangeEvent event) {
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelManager#saveProviderSettings(java.lang.String)
*/
@@ -156,7 +156,7 @@ public class ChangeSetModelManager extends HierarchicalModelManager implements I
pageSettings.put(P_COMMIT_SET_ENABLED, enabled);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelManager#initialize(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
*/
@@ -172,7 +172,7 @@ public class ChangeSetModelManager extends HierarchicalModelManager implements I
}
super.initialize(configuration);
}
-
+
/*
* This method is public so it can be invoked from test cases
*/
@@ -182,7 +182,7 @@ public class ChangeSetModelManager extends HierarchicalModelManager implements I
setInput(getSelectedProviderId(), null);
}
}
-
+
/* (non-Javadoc)
* This method is public so it can be invoked from test cases
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelProvider.java
index 28b2b5407..98e1181a5 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelProvider.java
@@ -32,18 +32,18 @@ import org.eclipse.team.ui.synchronize.*;
public class ChangeSetModelProvider extends CompositeModelProvider {
private ViewerSorter viewerSorter;
-
+
// The id of the sub-provider
private final String subProvierId;
-
+
private Map rootToProvider = new HashMap(); // Maps ISynchronizeModelElement -> AbstractSynchronizeModelProvider
-
+
private ViewerSorter embeddedSorter;
-
+
private SyncInfoSetChangeSetCollector checkedInCollector;
-
+
private IChangeSetChangeListener changeSetListener = new IChangeSetChangeListener() {
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.subscribers.IChangeSetChangeListener#setAdded(org.eclipse.team.core.subscribers.ChangeSet)
*/
@@ -94,9 +94,9 @@ public class ChangeSetModelProvider extends CompositeModelProvider {
// There is no global action to be taken for such changes
}
};
-
+
private ActiveChangeSetCollector activeCollector;
-
+
/* *****************************************************************************
* Descriptor for this model provider
*/
@@ -105,18 +105,18 @@ public class ChangeSetModelProvider extends CompositeModelProvider {
@Override
public String getId() {
return ID;
- }
+ }
@Override
public String getName() {
- return TeamUIMessages.ChangeLogModelProvider_5;
- }
+ return TeamUIMessages.ChangeLogModelProvider_5;
+ }
@Override
public ImageDescriptor getImageDescriptor() {
return TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_CHANGE_SET);
}
};
private static final ChangeSetModelProviderDescriptor descriptor = new ChangeSetModelProviderDescriptor();
-
+
protected ChangeSetModelProvider(ISynchronizePageConfiguration configuration, SyncInfoSet set, String subProvierId) {
super(configuration, set);
this.subProvierId = subProvierId;
@@ -171,7 +171,7 @@ public class ChangeSetModelProvider extends CompositeModelProvider {
}
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.CompositeModelProvider#handleAddition(org.eclipse.team.core.synchronize.SyncInfo)
*/
@@ -187,9 +187,9 @@ public class ChangeSetModelProvider extends CompositeModelProvider {
protected IDiffElement[] buildModelObjects(ISynchronizeModelElement node) {
// This method is invoked on a reset after the provider state has been cleared.
// Resetting the collector will rebuild the model
-
+
if (node == getModelRoot()) {
-
+
// First, disable the collectors
if (checkedInCollector != null) {
checkedInCollector.reset(null);
@@ -199,7 +199,7 @@ public class ChangeSetModelProvider extends CompositeModelProvider {
activeCollector.setChangeSetChangeListener(null);
activeCollector.reset(null);
}
-
+
// Then, re-enable the proper collection method
boolean handled = false;
if (checkedInCollector != null && getChangeSetCapability().enableCheckedInChangeSetsFor(getConfiguration())) {
@@ -257,7 +257,7 @@ public class ChangeSetModelProvider extends CompositeModelProvider {
protected SynchronizePageActionGroup createActionGroup() {
return new ChangeSetActionGroup(this);
}
-
+
private ISynchronizeModelProvider createProviderRootedAt(ISynchronizeModelElement parent, SyncInfoTree set) {
ISynchronizeModelProvider provider = createModelProvider(parent, getSubproviderId(), set);
addProvider(provider);
@@ -268,7 +268,7 @@ public class ChangeSetModelProvider extends CompositeModelProvider {
private ISynchronizeModelProvider getProviderRootedAt(ISynchronizeModelElement parent) {
return (ISynchronizeModelProvider)rootToProvider.get(parent);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.CompositeModelProvider#removeProvider(org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider)
*/
@@ -277,7 +277,7 @@ public class ChangeSetModelProvider extends CompositeModelProvider {
rootToProvider.remove(provider.getModelRoot());
super.removeProvider(provider);
}
-
+
/**
* Return the id of the sub-provider used by the commit set provider.
* @return the id of the sub-provider used by the commit set provider
@@ -293,7 +293,7 @@ public class ChangeSetModelProvider extends CompositeModelProvider {
public ViewerSorter getEmbeddedSorter() {
return embeddedSorter;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.CompositeModelProvider#clearModelObjects(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
*/
@@ -311,8 +311,8 @@ public class ChangeSetModelProvider extends CompositeModelProvider {
/*
* Create the root subprovider which is used to display resources
* that are not in a commit set. This provider is created even if
- * it is empty so we can have access to the appropriate sorter
- * and action group
+ * it is empty so we can have access to the appropriate sorter
+ * and action group
*/
private void createRootProvider() {
// Recreate the sub-provider at the root and use it's viewer sorter and action group
@@ -342,7 +342,7 @@ public class ChangeSetModelProvider extends CompositeModelProvider {
}
}
}
-
+
/*
* Find the root element for the given change set.
* A linear search is used.
@@ -369,7 +369,7 @@ public class ChangeSetModelProvider extends CompositeModelProvider {
}
return null;
}
-
+
@Override
public void dispose() {
if (checkedInCollector != null) {
@@ -382,8 +382,8 @@ public class ChangeSetModelProvider extends CompositeModelProvider {
}
super.dispose();
}
-
-
+
+
@Override
public void waitUntilDone(IProgressMonitor monitor) {
super.waitUntilDone(monitor);
@@ -393,7 +393,7 @@ public class ChangeSetModelProvider extends CompositeModelProvider {
super.waitUntilDone(monitor);
}
}
-
+
void removeModelElementForSet(final ChangeSet set) {
ISynchronizeModelElement node = getModelElement(set);
if (node != null) {
@@ -415,7 +415,7 @@ public class ChangeSetModelProvider extends CompositeModelProvider {
provider.prepareInput(null);
}
}
-
+
private ISynchronizeModelProvider createProvider(ChangeSet set, SyncInfoTree tree) {
ChangeSetDiffNode node = new ChangeSetDiffNode(getModelRoot(), set);
addToViewer(node);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelSorter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelSorter.java
index 5ebbaba68..0c372799e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelSorter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangeSetModelSorter.java
@@ -18,25 +18,25 @@ import org.eclipse.team.internal.core.subscribers.*;
import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
/**
- * Sorter for the change log model provider.
- *
+ * Sorter for the change log model provider.
+ *
* @since 3.0
*/
public class ChangeSetModelSorter extends ViewerSorter {
-
+
private int commentCriteria;
private ChangeSetModelProvider provider;
-
+
// Comment sorting options
public final static int DATE = 1;
public final static int COMMENT = 2;
public final static int USER = 3;
-
+
public ChangeSetModelSorter(ChangeSetModelProvider provider, int commentCriteria) {
this.provider = provider;
this.commentCriteria = commentCriteria;
}
-
+
protected int classComparison(Object element) {
if (element instanceof ChangeSetDiffNode) {
ChangeSet set = ((ChangeSetDiffNode)element).getSet();
@@ -47,15 +47,15 @@ public class ChangeSetModelSorter extends ViewerSorter {
}
return 2;
}
-
+
protected int compareClass(Object element1, Object element2) {
return classComparison(element1) - classComparison(element2);
}
-
+
protected int compareNames(String s1, String s2) {
return getComparator().compare(s1, s2);
}
-
+
private int compareDates(Date d1, Date d2) {
if (d1 == null)
d1 = new Date(0);
@@ -63,14 +63,14 @@ public class ChangeSetModelSorter extends ViewerSorter {
d2 = new Date(0);
return d1.compareTo(d2);
}
-
+
/* (non-Javadoc)
* Method declared on ViewerSorter.
*/
@Override
public int compare(Viewer viewer, Object o1, Object o2) {
//have to deal with non-resources in navigator
- //if one or both objects are not resources, returned a comparison
+ //if one or both objects are not resources, returned a comparison
//based on class.
if (o1 instanceof ChangeSetDiffNode && o2 instanceof ChangeSetDiffNode) {
ChangeSet s1 = ((ChangeSetDiffNode) o1).getSet();
@@ -113,7 +113,7 @@ public class ChangeSetModelSorter extends ViewerSorter {
return 1;
else if (o2 instanceof ISynchronizeModelElement)
return -1;
-
+
return 0;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangesSection.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangesSection.java
index 7547035fd..205d268e0 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangesSection.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangesSection.java
@@ -26,7 +26,7 @@ import org.eclipse.ui.part.PageBook;
/**
* Section shown in a participant page to show the changes for this participant. This
* includes a diff viewer for browsing the changes.
- *
+ *
* @since 3.2
*/
public class ChangesSection extends Composite {
@@ -34,14 +34,14 @@ public class ChangesSection extends Composite {
private AbstractSynchronizePage page;
private ISynchronizePageConfiguration configuration;
private FormToolkit forms;
-
+
/**
* Page book either shows the diff tree viewer if there are changes or
* shows a message to the user if there are no changes that would be
* shown in the tree.
*/
private PageBook changesSectionContainer;
-
+
/**
* Diff tree viewer that shows synchronization changes. This is created
* by the participant.
@@ -50,7 +50,7 @@ public class ChangesSection extends Composite {
/**
* Create a changes section on the following page.
- *
+ *
* @param parent the parent control
* @param page the page showing this section
* @param configuration the configuration for the synchronize page
@@ -59,7 +59,7 @@ public class ChangesSection extends Composite {
super(parent, SWT.NONE);
this.page = page;
this.configuration = configuration;
-
+
GridLayout layout = new GridLayout();
layout.marginHeight = 0;
layout.marginWidth = 0;
@@ -67,23 +67,23 @@ public class ChangesSection extends Composite {
GridData data = new GridData(GridData.FILL_BOTH);
data.grabExcessVerticalSpace = true;
setLayoutData(data);
-
+
forms = new FormToolkit(parent.getDisplay());
forms.setBackground(getListBackgroundColor());
HyperlinkGroup group = forms.getHyperlinkGroup();
group.setBackground(getListBackgroundColor());
-
+
changesSectionContainer = new PageBook(this, SWT.NONE);
data = new GridData(GridData.FILL_BOTH);
data.grabExcessHorizontalSpace = true;
data.grabExcessVerticalSpace = true;
changesSectionContainer.setLayoutData(data);
}
-
+
protected Color getListBackgroundColor() {
return getShell().getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
}
-
+
public PageBook getContainer() {
return changesSectionContainer;
}
@@ -99,7 +99,7 @@ public class ChangesSection extends Composite {
protected AbstractSynchronizePage getPage() {
return page;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.swt.widgets.Widget#dispose()
*/
@@ -108,7 +108,7 @@ public class ChangesSection extends Composite {
super.dispose();
forms.dispose();
}
-
+
public void setViewer(Viewer viewer) {
this.changesViewer = viewer;
initializeChangesViewer();
@@ -129,7 +129,7 @@ public class ChangesSection extends Composite {
public Viewer getChangesViewer() {
return changesViewer;
}
-
+
protected boolean isThreeWay() {
return ISynchronizePageConfiguration.THREE_WAY.equals(getConfiguration().getComparisonType());
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompositeModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompositeModelProvider.java
index 2c9a14a00..0d8adfc09 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompositeModelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompositeModelProvider.java
@@ -22,18 +22,18 @@ import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
* providers. A composite provider is one that breaks up the displayed
* {@link SyncInfoSet} into subsets that may be displayed using one
* or more synchronize model providers.
- *
+ *
*/
public abstract class CompositeModelProvider extends AbstractSynchronizeModelProvider {
-
+
private final List providers = new ArrayList();
private final Map resourceToElements = new HashMap(); // Map IResource to List of ISynchronizeModelElement
private final Map elementToProvider = new HashMap(); // Map ISynchronizeModelElement -> AbstractSynchronizeModelProvider
-
+
protected CompositeModelProvider(ISynchronizePageConfiguration configuration, SyncInfoSet set) {
super(configuration, set);
}
-
+
/**
* Add the provider to the list of providers.
* @param provider the provider to be added
@@ -41,7 +41,7 @@ public abstract class CompositeModelProvider extends AbstractSynchronizeModelPro
protected void addProvider(ISynchronizeModelProvider provider) {
providers.add(provider);
}
-
+
/**
* Remove the provider from the list of providers.
* @param provider the provider to be removed
@@ -50,7 +50,7 @@ public abstract class CompositeModelProvider extends AbstractSynchronizeModelPro
providers.remove(provider);
provider.dispose();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#getProvider(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
*/
@@ -58,7 +58,7 @@ public abstract class CompositeModelProvider extends AbstractSynchronizeModelPro
protected ISynchronizeModelProvider getProvider(ISynchronizeModelElement element) {
return (ISynchronizeModelProvider)elementToProvider.get(element);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#getClosestExistingParents(org.eclipse.core.resources.IResource)
*/
@@ -92,7 +92,7 @@ public abstract class CompositeModelProvider extends AbstractSynchronizeModelPro
protected ISynchronizeModelProvider[] getProviders() {
return (ISynchronizeModelProvider[]) providers.toArray(new ISynchronizeModelProvider[providers.size()]);
}
-
+
/**
* Return the providers that are displaying the given resource.
* @param resource the resource
@@ -118,7 +118,7 @@ public abstract class CompositeModelProvider extends AbstractSynchronizeModelPro
protected final void handleResourceAdditions(ISyncInfoTreeChangeEvent event) {
handleAdditions(event.getAddedResources());
}
-
+
/**
* Handle the resource additions by adding them to any existing
* sub-providers or by creating addition sub-providers as needed.
@@ -148,7 +148,7 @@ public abstract class CompositeModelProvider extends AbstractSynchronizeModelPro
handleChange(info);
}
}
-
+
/**
* The state of the sync info for a resource has changed. Propagate the
* change to any sub-providers that contain the resource.
@@ -182,10 +182,10 @@ public abstract class CompositeModelProvider extends AbstractSynchronizeModelPro
removeFromProvider(resource, provider);
}
}
-
+
/**
* Remove the resource from the sync set of the given provider
- * unless the provider is this composite. Subclasses can
+ * unless the provider is this composite. Subclasses can
* override if they show resources directly.
* @param resource the resource to be removed
* @param provider the provider from which to remove the resource
@@ -214,7 +214,7 @@ public abstract class CompositeModelProvider extends AbstractSynchronizeModelPro
elementToProvider.put(node, provider);
super.nodeAdded(node, provider);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#modelObjectCleared(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
*/
@@ -233,7 +233,7 @@ public abstract class CompositeModelProvider extends AbstractSynchronizeModelPro
}
elementToProvider.remove(node);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#clearModelObjects(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
*/
@@ -244,7 +244,7 @@ public abstract class CompositeModelProvider extends AbstractSynchronizeModelPro
clearProviders();
}
}
-
+
private void clearProviders() {
for (Iterator iter = providers.iterator(); iter.hasNext();) {
ISynchronizeModelProvider provider = (ISynchronizeModelProvider) iter.next();
@@ -270,7 +270,7 @@ public abstract class CompositeModelProvider extends AbstractSynchronizeModelPro
return new HierarchicalModelProvider(this, parent, getConfiguration(), syncInfoTree);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#dispose()
*/
@@ -279,7 +279,7 @@ public abstract class CompositeModelProvider extends AbstractSynchronizeModelPro
clearProviders();
super.dispose();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#hasViewerState()
*/
@@ -287,7 +287,7 @@ public abstract class CompositeModelProvider extends AbstractSynchronizeModelPro
protected boolean hasViewerState() {
return resourceToElements != null && !resourceToElements.isEmpty();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#getModelObjects(org.eclipse.core.resources.IResource)
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompressedFoldersModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompressedFoldersModelProvider.java
index d15689e02..93f8347dd 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompressedFoldersModelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompressedFoldersModelProvider.java
@@ -34,7 +34,7 @@ public class CompressedFoldersModelProvider extends HierarchicalModelProvider {
public UnchangedCompressedDiffNode(IDiffContainer parent, IResource resource) {
super(parent, resource);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.DiffNode#getName()
*/
@@ -43,7 +43,7 @@ public class CompressedFoldersModelProvider extends HierarchicalModelProvider {
IResource resource = getResource();
return resource.getProjectRelativePath().toString();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SyncInfoModelElement#getImageDescriptor(java.lang.Object)
*/
@@ -52,7 +52,7 @@ public class CompressedFoldersModelProvider extends HierarchicalModelProvider {
return TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COMPRESSED_FOLDER);
}
}
-
+
/**
* A compressed folder appears under a project and contains out-of-sync resources
*/
@@ -70,7 +70,7 @@ public class CompressedFoldersModelProvider extends HierarchicalModelProvider {
IResource resource = getResource();
return resource.getProjectRelativePath().toString();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SyncInfoModelElement#getImageDescriptor(java.lang.Object)
*/
@@ -79,35 +79,35 @@ public class CompressedFoldersModelProvider extends HierarchicalModelProvider {
return TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COMPRESSED_FOLDER);
}
}
-
+
public static class CompressedFolderModelProviderDescriptor implements ISynchronizeModelProviderDescriptor {
public static final String ID = TeamUIPlugin.ID + ".modelprovider_compressedfolders"; //$NON-NLS-1$
@Override
public String getId() {
return ID;
- }
+ }
@Override
public String getName() {
- return TeamUIMessages.CompressedFoldersModelProvider_0;
- }
+ return TeamUIMessages.CompressedFoldersModelProvider_0;
+ }
@Override
public ImageDescriptor getImageDescriptor() {
return TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_COMPRESSED_FOLDER);
}
}
private static final CompressedFolderModelProviderDescriptor compressedDescriptor = new CompressedFolderModelProviderDescriptor();
-
+
public CompressedFoldersModelProvider(ISynchronizePageConfiguration configuration, SyncInfoSet set) {
super(configuration, set);
}
-
+
public CompressedFoldersModelProvider(
AbstractSynchronizeModelProvider parentProvider,
ISynchronizeModelElement modelRoot,
ISynchronizePageConfiguration configuration, SyncInfoSet set) {
super(parentProvider, modelRoot, configuration, set);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.HierarchicalModelProvider#getDescriptor()
*/
@@ -115,7 +115,7 @@ public class CompressedFoldersModelProvider extends HierarchicalModelProvider {
public ISynchronizeModelProviderDescriptor getDescriptor() {
return compressedDescriptor;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SyncInfoDiffNodeRoot#getSorter()
*/
@@ -134,7 +134,7 @@ public class CompressedFoldersModelProvider extends HierarchicalModelProvider {
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.viewers.HierarchicalModelProvider#createModelObjects(org.eclipse.compare.structuremergeviewer.DiffNode)
- */
+ */
@Override
protected IDiffElement[] createModelObjects(ISynchronizeModelElement container) {
IResource resource = null;
@@ -153,7 +153,7 @@ public class CompressedFoldersModelProvider extends HierarchicalModelProvider {
}
return super.createModelObjects(container);
}
-
+
private IDiffElement[] getFolderChildren(ISynchronizeModelElement parent, IResource resource) {
// Folders will only contain out-of-sync children
IResource[] children = getSyncInfoTree().members(resource);
@@ -168,7 +168,7 @@ public class CompressedFoldersModelProvider extends HierarchicalModelProvider {
}
private IDiffElement[] getProjectChildren(ISynchronizeModelElement parent, IProject project) {
- // The out-of-sync elements could possibly include the project so the code
+ // The out-of-sync elements could possibly include the project so the code
// below is written to ignore the project
SyncInfo[] outOfSync = getSyncInfoTree().getSyncInfos(project, IResource.DEPTH_INFINITE);
Set result = new HashSet();
@@ -190,14 +190,14 @@ public class CompressedFoldersModelProvider extends HierarchicalModelProvider {
IResource resource = (IResource) iter.next();
result.add(createModelObject(parent, resource));
}
-
+
return (IDiffElement[])result.toArray(new IDiffElement[result.size()]);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.views.HierarchicalModelProvider#createChildNode(org.eclipse.compare.structuremergeviewer.DiffNode, org.eclipse.core.resources.IResource)
*/
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.viewers.HierarchicalModelProvider#createModelObject(org.eclipse.compare.structuremergeviewer.DiffNode, org.eclipse.core.resources.IResource)
*/
@@ -216,7 +216,7 @@ public class CompressedFoldersModelProvider extends HierarchicalModelProvider {
}
return super.createModelObject(parent, resource);
}
-
+
/**
* Update the viewer for the sync set additions in the provided event.
* This method is invoked by <code>handleChanges(ISyncInfoSetChangeEvent)</code>.
@@ -231,7 +231,7 @@ public class CompressedFoldersModelProvider extends HierarchicalModelProvider {
addResource(info);
}
}
-
+
@Override
protected void addResource(SyncInfo info) {
IResource local = info.getLocal();
@@ -273,7 +273,7 @@ public class CompressedFoldersModelProvider extends HierarchicalModelProvider {
@Override
protected void handleResourceRemovals(ISyncInfoTreeChangeEvent event) {
IResource[] roots = event.getRemovedSubtreeRoots();
-
+
// First, deal with any projects that have been removed
List removedProjects = new ArrayList();
for (int i = 0; i < roots.length; i++) {
@@ -321,10 +321,10 @@ public class CompressedFoldersModelProvider extends HierarchicalModelProvider {
return IResource.DEPTH_ONE;
}
}
-
+
private boolean isCompressedParentEmpty(IResource resource) {
IContainer parent = resource.getParent();
- if (parent == null
+ if (parent == null
|| parent.getType() == IResource.ROOT
|| parent.getType() == IResource.PROJECT) {
return false;
@@ -344,7 +344,7 @@ public class CompressedFoldersModelProvider extends HierarchicalModelProvider {
// The parent does not contain any files
return false;
}
-
+
private SyncInfo[] getSyncInfosForFileMembers(IContainer parent) {
// Check if the sync set has any file children of the parent
List result = new ArrayList();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureRefreshScheduleDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureRefreshScheduleDialog.java
index 857d7aef3..79e5b31fa 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureRefreshScheduleDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureRefreshScheduleDialog.java
@@ -28,7 +28,7 @@ public class ConfigureRefreshScheduleDialog extends DetailsDialog {
private SubscriberRefreshSchedule schedule;
public ConfigureRefreshScheduleDialog(Shell parentShell, SubscriberRefreshSchedule schedule) {
- super(parentShell, NLS.bind(TeamUIMessages.ConfigureRefreshScheduleDialog_0, new String[] { Utils.getTypeName(schedule.getParticipant()) }));
+ super(parentShell, NLS.bind(TeamUIMessages.ConfigureRefreshScheduleDialog_0, new String[] { Utils.getTypeName(schedule.getParticipant()) }));
this.schedule = schedule;
}
@@ -47,7 +47,7 @@ public class ConfigureRefreshScheduleDialog extends DetailsDialog {
scheduleComposite = new ConfigureSynchronizeScheduleComposite(parent, schedule, validator);
Dialog.applyDialogFont(parent);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.Dialog#okPressed()
*/
@@ -56,7 +56,7 @@ public class ConfigureRefreshScheduleDialog extends DetailsDialog {
scheduleComposite.saveValues();
super.okPressed();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeDetailsButton()
*/
@@ -79,7 +79,7 @@ public class ConfigureRefreshScheduleDialog extends DetailsDialog {
@Override
protected void updateEnablements() {
}
-
+
@Override
protected String getHelpContextId() {
return IHelpContextIds.CONFIGURE_REFRESH_SCHEDULE_DIALOG;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureSynchronizeScheduleComposite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureSynchronizeScheduleComposite.java
index 8697205b0..9b9f383ac 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureSynchronizeScheduleComposite.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureSynchronizeScheduleComposite.java
@@ -34,7 +34,7 @@ import com.ibm.icu.util.Calendar;
/**
* A composite that allows editing a subscriber refresh schedule. A validator can be used to allow
* containers to show page completion.
- *
+ *
* @since 3.0
*/
public class ConfigureSynchronizeScheduleComposite extends Composite {
@@ -47,7 +47,7 @@ public class ConfigureSynchronizeScheduleComposite extends Composite {
private DateTime startTime;
private Button repeatEvery;
private Label synchronizeAt;
-
+
public ConfigureSynchronizeScheduleComposite(Composite parent, SubscriberRefreshSchedule schedule, IPageValidator validator) {
super(parent, SWT.NONE);
this.schedule = schedule;
@@ -58,24 +58,24 @@ public class ConfigureSynchronizeScheduleComposite extends Composite {
private void initializeValues() {
boolean enableBackground = schedule.isEnabled();
boolean hours = false;
-
+
enableBackgroundRefresh.setSelection(enableBackground);
-
+
long seconds = schedule.getRefreshInterval();
if(seconds <= 60) {
seconds = 60;
}
long minutes = seconds / 60;
-
+
if(minutes >= 60) {
minutes = minutes / 60;
hours = true;
- }
+ }
hoursOrMinutes.select(hours ? 0 : 1);
timeInterval.setText(Long.toString(minutes));
repeatEvery.setSelection(!schedule.getRunOnce());
-
+
Date start = schedule.getRefreshStartTime();
Calendar cal = Calendar.getInstance();
if (start != null) {
@@ -105,13 +105,13 @@ public class ConfigureSynchronizeScheduleComposite extends Composite {
setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
Composite area = this;
- createWrappingLabel(area, NLS.bind(TeamUIMessages.ConfigureRefreshScheduleDialog_1, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, schedule.getParticipant().getName()) }), 0, 3);
+ createWrappingLabel(area, NLS.bind(TeamUIMessages.ConfigureRefreshScheduleDialog_1, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, schedule.getParticipant().getName()) }), 0, 3);
enableBackgroundRefresh = new Button(area, SWT.CHECK);
GridData gridData = new GridData();
gridData.horizontalSpan = 3;
enableBackgroundRefresh.setLayoutData(gridData);
- enableBackgroundRefresh.setText(TeamUIMessages.ConfigureRefreshScheduleDialog_3);
+ enableBackgroundRefresh.setText(TeamUIMessages.ConfigureRefreshScheduleDialog_3);
enableBackgroundRefresh.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -128,7 +128,7 @@ public class ConfigureSynchronizeScheduleComposite extends Composite {
gridData = new GridData();
gridData.horizontalSpan = 2;
startTime.setLayoutData(gridData);
-
+
repeatEvery = createIndentedButton(area, TeamUIMessages.ConfigureRefreshScheduleDialog_4, 20);
repeatEvery.addSelectionListener(new SelectionListener() {
@Override
@@ -166,32 +166,32 @@ public class ConfigureSynchronizeScheduleComposite extends Composite {
});
hoursOrMinutes = new Combo(area, SWT.READ_ONLY);
- hoursOrMinutes.setItems(new String[] { TeamUIMessages.ConfigureRefreshScheduleDialog_5, TeamUIMessages.ConfigureRefreshScheduleDialog_6 }); //
+ hoursOrMinutes.setItems(new String[] { TeamUIMessages.ConfigureRefreshScheduleDialog_5, TeamUIMessages.ConfigureRefreshScheduleDialog_6 }); //
hoursOrMinutes.setLayoutData(new GridData());
-
+
final Label label = new Label(area, SWT.WRAP);
gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 3;
label.setLayoutData(gridData);
- label.setText(NLS.bind(TeamUIMessages.ConfigureRefreshScheduleDialog_2, new String[] { SubscriberRefreshSchedule.refreshEventAsString(schedule.getLastRefreshEvent()) }));
+ label.setText(NLS.bind(TeamUIMessages.ConfigureRefreshScheduleDialog_2, new String[] { SubscriberRefreshSchedule.refreshEventAsString(schedule.getLastRefreshEvent()) }));
initializeValues();
updateEnablements();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.Dialog#okPressed()
*/
public void saveValues() {
if (enableBackgroundRefresh.getSelection()) {
-
+
// start time
Calendar cal = Calendar.getInstance();
cal.set(Calendar.HOUR_OF_DAY, startTime.getHours());
cal.set(Calendar.MINUTE, startTime.getMinutes());
cal.set(Calendar.SECOND, startTime.getSeconds());
schedule.setRefreshStartTime(cal.getTime());
-
+
// repeat interval
if (repeatEvery.getSelection()) {
int hours = hoursOrMinutes.getSelectionIndex();
@@ -209,18 +209,18 @@ public class ConfigureSynchronizeScheduleComposite extends Composite {
} else {
schedule.setRunOnce(true);
}
- }
-
+ }
+
if(schedule.isEnabled() != enableBackgroundRefresh.getSelection()) {
schedule.setEnabled(enableBackgroundRefresh.getSelection(), true /* allow to start */);
}
-
+
// update schedule
ISynchronizeParticipant participant = schedule.getParticipant();
if (!participant.isPinned() && schedule.isEnabled()) {
- participant.setPinned(MessageDialog.openQuestion(getShell(),
- NLS.bind(TeamUIMessages.ConfigureSynchronizeScheduleComposite_0, new String[] { Utils.getTypeName(participant) }),
- NLS.bind(TeamUIMessages.ConfigureSynchronizeScheduleComposite_1, new String[] { Utils.getTypeName(participant) })));
+ participant.setPinned(MessageDialog.openQuestion(getShell(),
+ NLS.bind(TeamUIMessages.ConfigureSynchronizeScheduleComposite_0, new String[] { Utils.getTypeName(participant) }),
+ NLS.bind(TeamUIMessages.ConfigureSynchronizeScheduleComposite_1, new String[] { Utils.getTypeName(participant) })));
}
schedule.getRefreshable().setRefreshSchedule(schedule);
}
@@ -236,14 +236,14 @@ public class ConfigureSynchronizeScheduleComposite extends Composite {
try {
long number = Long.parseLong(timeInterval.getText());
if(number <= 0) {
- validator.setComplete(TeamUIMessages.ConfigureRefreshScheduleDialog_7);
+ validator.setComplete(TeamUIMessages.ConfigureRefreshScheduleDialog_7);
} else {
validator.setComplete(null);
}
} catch (NumberFormatException e) {
- validator.setComplete(TeamUIMessages.ConfigureRefreshScheduleDialog_7);
- }
- }
+ validator.setComplete(TeamUIMessages.ConfigureRefreshScheduleDialog_7);
+ }
+ }
}
synchronizeAt.setEnabled(enableBackgroundRefresh.getSelection());
startTime.setEnabled(enableBackgroundRefresh.getSelection());
@@ -251,7 +251,7 @@ public class ConfigureSynchronizeScheduleComposite extends Composite {
timeInterval.setEnabled(enableBackgroundRefresh.getSelection() && repeatEvery.getSelection());
hoursOrMinutes.setEnabled(enableBackgroundRefresh.getSelection() && repeatEvery.getSelection());
}
-
+
private Label createWrappingLabel(Composite parent, String text, int indent, int horizontalSpan) {
Label label = new Label(parent, SWT.LEFT | SWT.WRAP);
label.setText(text);
@@ -264,7 +264,7 @@ public class ConfigureSynchronizeScheduleComposite extends Composite {
label.setLayoutData(data);
return label;
}
-
+
private static Label createIndentedLabel(Composite parent, String text, int indent) {
Label label = new Label(parent, SWT.LEFT);
label.setText(text);
@@ -275,7 +275,7 @@ public class ConfigureSynchronizeScheduleComposite extends Composite {
label.setLayoutData(data);
return label;
}
-
+
private static Button createIndentedButton(Composite parent, String text, int indent) {
Button label = new Button(parent, SWT.CHECK);
label.setText(text);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DecoratingColorLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DecoratingColorLabelProvider.java
index c19014b5e..8b2194a20 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DecoratingColorLabelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DecoratingColorLabelProvider.java
@@ -20,7 +20,7 @@ import org.eclipse.swt.graphics.Font;
/**
* Decorating label provider that supports multiple decorators that are font and color decorators.
- *
+ *
* @since 3.0
*/
public class DecoratingColorLabelProvider extends DecoratingLabelProvider implements IColorProvider, IFontProvider {
@@ -54,7 +54,7 @@ public class DecoratingColorLabelProvider extends DecoratingLabelProvider implem
}
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DialogSynchronizePageSite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DialogSynchronizePageSite.java
index da70574fd..7d1eacec4 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DialogSynchronizePageSite.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DialogSynchronizePageSite.java
@@ -35,7 +35,7 @@ public class DialogSynchronizePageSite implements ISynchronizePageSite {
// Keybindings enabled in the dialog, these should be removed
// when the dialog is closed.
private List actionHandlers = new ArrayList(2);
-
+
/**
* Create a site for use in a dialog
* @param shell the shell
@@ -114,7 +114,7 @@ public class DialogSynchronizePageSite implements ISynchronizePageSite {
public boolean isModal() {
return isModal;
}
-
+
/**
* Create the action-bars for this site.
* @param toolbar the toolbar for the action bar
@@ -161,7 +161,7 @@ public class DialogSynchronizePageSite implements ISynchronizePageSite {
};
}
}
-
+
/**
* Cleanup when the dialog is closed
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DiffNodeWorkbenchAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DiffNodeWorkbenchAdapter.java
index b610724a0..8c64f47b9 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DiffNodeWorkbenchAdapter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DiffNodeWorkbenchAdapter.java
@@ -55,7 +55,7 @@ public class DiffNodeWorkbenchAdapter implements IWorkbenchAdapter {
DiffNode node = getDiffNode(o);
return node != null ? node.getParent() : null;
}
-
+
/*
* Return a diff node if the input object is a diff node or null otherwise.
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter.java
index f4773fd70..8930995cd 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/EditableSharedDocumentAdapter.java
@@ -32,7 +32,7 @@ import org.eclipse.ui.texteditor.IElementStateListener;
*/
public class EditableSharedDocumentAdapter extends
SharedDocumentAdapter implements IElementStateListener {
-
+
private int connectionCount;
private final ISharedDocumentAdapterListener listener;
private IEditorInput bufferedKey;
@@ -42,37 +42,37 @@ public class EditableSharedDocumentAdapter extends
* and supports call backs to the element when the adapter state changes.
*/
public interface ISharedDocumentAdapterListener {
-
+
/**
* Method that is invoked when the adapter connects to the
* document provider. This method is only invoked when the
* adapter first connects to the document.
*/
void handleDocumentConnected();
-
+
/**
* Method that is invoked when the adapter disconnects from the
* document provider. This method is only invoked when the
* adapter no longer has any connection to the document provider.
*/
void handleDocumentDisconnected();
-
+
/**
* Method invoked when changes in the document are flushed to the adapter.
*/
void handleDocumentFlushed();
-
+
/**
* Method invoked when the file behind the shared document is deleted.
*/
void handleDocumentDeleted();
-
+
/**
* Method invoked when the document dirty state changes from dirty to clean.
*/
void handleDocumentSaved();
}
-
+
/**
* Create the shared document adapter for the given element.
* @param listener access to element internals
@@ -81,7 +81,7 @@ public class EditableSharedDocumentAdapter extends
super();
this.listener = listener;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.SharedDocumentAdapter#connect(org.eclipse.ui.texteditor.IDocumentProvider, org.eclipse.ui.IEditorInput)
*/
@@ -121,7 +121,7 @@ public class EditableSharedDocumentAdapter extends
public boolean isConnected() {
return connectionCount > 0;
}
-
+
/**
* Save the shared document of the element of this adapter.
* @param input the document key of the element.
@@ -156,7 +156,7 @@ public class EditableSharedDocumentAdapter extends
bufferedKey = null;
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.SharedDocumentAdapter#flushDocument(org.eclipse.ui.texteditor.IDocumentProvider, org.eclipse.ui.IEditorInput, org.eclipse.jface.text.IDocument, boolean, org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -218,7 +218,7 @@ public class EditableSharedDocumentAdapter extends
/**
* Return whether the adapter has buffered contents. The adapter
- * buffers contents by connecting to the document through the document
+ * buffers contents by connecting to the document through the document
* provider. This means that the adapter must be disconnected either by saving
* or discarding the buffer.
* @return whether the adapter has buffered contents
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/FlatModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/FlatModelProvider.java
index 93e85c683..5d8dc6099 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/FlatModelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/FlatModelProvider.java
@@ -36,22 +36,22 @@ public class FlatModelProvider extends SynchronizeModelProvider {
@Override
public String getId() {
return ID;
- }
+ }
@Override
public String getName() {
- return TeamUIMessages.FlatModelProvider_0;
- }
+ return TeamUIMessages.FlatModelProvider_0;
+ }
@Override
public ImageDescriptor getImageDescriptor() {
return TeamImages.getImageDescriptor(ITeamUIImages.IMG_FLAT);
}
}
private static final FlatModelProviderDescriptor flatDescriptor = new FlatModelProviderDescriptor();
-
+
private static final String P_LAST_RESOURCESORT = TeamUIPlugin.ID + ".P_LAST_RESOURCE_SORT"; //$NON-NLS-1$
private int sortCriteria = FlatSorter.PATH;
-
+
/* *****************************************************************************
* Model element for the resources in this layout. They are displayed with filename and path
* onto the same line.
@@ -66,39 +66,39 @@ public class FlatModelProvider extends SynchronizeModelProvider {
return resource.getName() + " - " + resource.getFullPath().toString(); //$NON-NLS-1$
}
}
-
+
/**
* Sorter that sorts flat path elements using the criteria specified
* when the sorter is created
*/
public class FlatSorter extends ViewerSorter {
-
+
private int resourceCriteria;
-
+
// Resource sorting options
public final static int NAME = 1;
public final static int PATH = 2;
public final static int PARENT_NAME = 3;
-
+
public FlatSorter(int resourceCriteria) {
this.resourceCriteria = resourceCriteria;
}
-
+
protected int classComparison(Object element) {
if (element instanceof FullPathSyncInfoElement) {
return 0;
}
return 1;
}
-
+
protected int compareClass(Object element1, Object element2) {
return classComparison(element1) - classComparison(element2);
}
-
+
protected int compareNames(String s1, String s2) {
return collator.compare(s1, s2);
}
-
+
/* (non-Javadoc)
* Method declared on ViewerSorter.
*/
@@ -108,7 +108,7 @@ public class FlatModelProvider extends SynchronizeModelProvider {
if (o1 instanceof FullPathSyncInfoElement && o2 instanceof FullPathSyncInfoElement) {
IResource r1 = ((FullPathSyncInfoElement)o1).getResource();
IResource r2 = ((FullPathSyncInfoElement)o2).getResource();
- if(resourceCriteria == NAME)
+ if(resourceCriteria == NAME)
return compareNames(r1.getName(), r2.getName());
else if(resourceCriteria == PATH)
return compareNames(r1.getFullPath().toString(), r2.getFullPath().toString());
@@ -119,7 +119,7 @@ public class FlatModelProvider extends SynchronizeModelProvider {
return 1;
else if (o2 instanceof ISynchronizeModelElement)
return -1;
-
+
return 0;
}
@@ -127,7 +127,7 @@ public class FlatModelProvider extends SynchronizeModelProvider {
return resourceCriteria;
}
}
-
+
/* *****************************************************************************
* Action that allows changing the model providers sort order.
*/
@@ -136,7 +136,7 @@ public class FlatModelProvider extends SynchronizeModelProvider {
protected ToggleSortOrderAction(String name, int criteria) {
super(name, IAction.AS_RADIO_BUTTON);
this.criteria = criteria;
- update();
+ update();
}
@Override
@@ -152,16 +152,16 @@ public class FlatModelProvider extends SynchronizeModelProvider {
FlatModelProvider.this.firePropertyChange(P_VIEWER_SORTER, null, null);
}
}
-
+
public void update() {
- setChecked(sortCriteria == criteria);
+ setChecked(sortCriteria == criteria);
}
-
+
protected String getSettingsKey() {
return P_LAST_RESOURCESORT;
}
}
-
+
/* *****************************************************************************
* Action group for this layout. It is added and removed for this layout only.
*/
@@ -170,19 +170,19 @@ public class FlatModelProvider extends SynchronizeModelProvider {
@Override
public void initialize(ISynchronizePageConfiguration configuration) {
super.initialize(configuration);
- sortByResource = new MenuManager(TeamUIMessages.FlatModelProvider_6);
-
+ sortByResource = new MenuManager(TeamUIMessages.FlatModelProvider_6);
+
appendToGroup(
- ISynchronizePageConfiguration.P_CONTEXT_MENU,
- ISynchronizePageConfiguration.SORT_GROUP,
+ ISynchronizePageConfiguration.P_CONTEXT_MENU,
+ ISynchronizePageConfiguration.SORT_GROUP,
sortByResource);
-
+
// Ensure that the sort criteria of the provider is properly initialized
FlatModelProvider.this.initialize(configuration);
-
- sortByResource.add( new ToggleSortOrderAction(TeamUIMessages.FlatModelProvider_8, FlatSorter.PATH));
- sortByResource.add(new ToggleSortOrderAction(TeamUIMessages.FlatModelProvider_7, FlatSorter.NAME));
- sortByResource.add(new ToggleSortOrderAction(TeamUIMessages.FlatModelProvider_9, FlatSorter.PARENT_NAME));
+
+ sortByResource.add( new ToggleSortOrderAction(TeamUIMessages.FlatModelProvider_8, FlatSorter.PATH));
+ sortByResource.add(new ToggleSortOrderAction(TeamUIMessages.FlatModelProvider_7, FlatSorter.NAME));
+ sortByResource.add(new ToggleSortOrderAction(TeamUIMessages.FlatModelProvider_9, FlatSorter.PARENT_NAME));
}
/* (non-Javadoc)
@@ -195,7 +195,7 @@ public class FlatModelProvider extends SynchronizeModelProvider {
super.dispose();
}
}
-
+
public FlatModelProvider(ISynchronizePageConfiguration configuration, SyncInfoSet set) {
super(configuration, set);
initialize(configuration);
@@ -205,7 +205,7 @@ public class FlatModelProvider extends SynchronizeModelProvider {
super(parentProvider, modelRoot, configuration, set);
initialize(configuration);
}
-
+
private void initialize(ISynchronizePageConfiguration configuration) {
try {
IDialogSettings pageSettings = getConfiguration().getSite().getPageSettings();
@@ -225,7 +225,7 @@ public class FlatModelProvider extends SynchronizeModelProvider {
break;
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#createActionGroup()
*/
@@ -264,7 +264,7 @@ public class FlatModelProvider extends SynchronizeModelProvider {
protected void handleResourceAdditions(ISyncInfoTreeChangeEvent event) {
addResources(event.getAddedResources());
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#handleResourceRemovals(org.eclipse.team.core.synchronize.ISyncInfoTreeChangeEvent)
*/
@@ -293,7 +293,7 @@ public class FlatModelProvider extends SynchronizeModelProvider {
}
createModelObject(getModelRoot(), info);
}
-
+
@Override
protected ISynchronizeModelElement createModelObject(ISynchronizeModelElement parent, SyncInfo info) {
SynchronizeModelElement newNode = new FullPathSyncInfoElement(parent, info);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ForwardingChangesSection.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ForwardingChangesSection.java
index e86a52839..caa514e5e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ForwardingChangesSection.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ForwardingChangesSection.java
@@ -33,7 +33,7 @@ public abstract class ForwardingChangesSection extends ChangesSection {
* tree viewer.
*/
private Composite messageArea;
-
+
public ForwardingChangesSection(Composite parent, AbstractSynchronizePage page, ISynchronizePageConfiguration configuration) {
super(parent, page, configuration);
}
@@ -45,7 +45,7 @@ public abstract class ForwardingChangesSection extends ChangesSection {
protected void initializeChangesViewer() {
calculateDescription();
}
-
+
protected void calculateDescription() {
if (getContainer().isDisposed())
return;
@@ -66,7 +66,7 @@ public abstract class ForwardingChangesSection extends ChangesSection {
});
}
}
-
+
protected void updatePage(Composite message) {
if (getContainer().isDisposed()) return;
if(messageArea != null) {
@@ -83,7 +83,7 @@ public abstract class ForwardingChangesSection extends ChangesSection {
getContainer().showPage(messageArea);
}
}
-
+
protected Composite getEmptyChangesComposite(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
composite.setBackground(getListBackgroundColor());
@@ -93,15 +93,15 @@ public abstract class ForwardingChangesSection extends ChangesSection {
GridData data = new GridData(GridData.FILL_BOTH);
data.grabExcessVerticalSpace = true;
composite.setLayoutData(data);
-
+
if(! isThreeWay()) {
- createDescriptionLabel(composite,NLS.bind(TeamUIMessages.ChangesSection_noChanges, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName()) }));
+ createDescriptionLabel(composite,NLS.bind(TeamUIMessages.ChangesSection_noChanges, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName()) }));
return composite;
}
-
+
int allChanges = getChangesCount();
long visibleChanges = getVisibleChangesCount();
-
+
if(visibleChanges == 0 && allChanges != 0) {
final int candidateMode = getCandidateMode();
int currentMode = getConfiguration().getMode();
@@ -115,11 +115,11 @@ public abstract class ForwardingChangesSection extends ChangesSection {
message = NLS.bind(TeamUIMessages.ChangesSection_filterHidesSingular, new String[] { Long.toString(numChanges), Utils.modeToString(candidateMode) });
}
message = NLS.bind(TeamUIMessages.ChangesSection_filterHides, new String[] { Utils.modeToString(getConfiguration().getMode()), message });
-
+
Label warning = new Label(composite, SWT.NONE);
warning.setImage(TeamUIPlugin.getPlugin().getImage(ISharedImages.IMG_WARNING_OVR));
-
- Hyperlink link = getForms().createHyperlink(composite, NLS.bind(TeamUIMessages.ChangesSection_filterChange, new String[] { Utils.modeToString(candidateMode) }), SWT.WRAP);
+
+ Hyperlink link = getForms().createHyperlink(composite, NLS.bind(TeamUIMessages.ChangesSection_filterChange, new String[] { Utils.modeToString(candidateMode) }), SWT.WRAP);
link.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
@@ -133,10 +133,10 @@ public abstract class ForwardingChangesSection extends ChangesSection {
}
}
// There is no other mode that can be shown so just indicate that there are no changes
- createDescriptionLabel(composite,NLS.bind(TeamUIMessages.ChangesSection_noChanges, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName()) })); //
+ createDescriptionLabel(composite,NLS.bind(TeamUIMessages.ChangesSection_noChanges, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName()) })); //
return composite;
}
-
+
protected Label createDescriptionLabel(Composite parent, String text) {
Label description = new Label(parent, SWT.WRAP);
GridData data = new GridData(GridData.FILL_HORIZONTAL);
@@ -147,12 +147,12 @@ public abstract class ForwardingChangesSection extends ChangesSection {
description.setBackground(getListBackgroundColor());
return description;
}
-
+
protected abstract int getChangesCount();
protected abstract long getChangesInMode(int candidateMode);
protected abstract long getVisibleChangesCount();
-
+
protected abstract int getCandidateMode();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java
index ed2cdb60d..a6171f5c2 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshElementSelectionPage.java
@@ -31,30 +31,30 @@ import org.eclipse.ui.dialogs.IWorkingSetSelectionDialog;
public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
private boolean scopeCheckingElement = false;
-
+
// Set of scope hint to determine the initial selection
private Button participantScope;
private Button selectedResourcesScope;
private Button workingSetScope;
-
+
// The checked tree viewer
private ContainerCheckedTreeViewer fViewer;
-
+
// Working set label and holder
private Text workingSetLabel;
private IWorkingSet[] workingSets;
private IDialogSettings settings;
-
+
// dialog settings
- /**
+ /**
* Settings constant for section name (value <code>SynchronizeResourceSelectionDialog</code>).
*/
private static final String STORE_SECTION = "SynchronizeResourceSelectionDialog"; //$NON-NLS-1$
- /**
+ /**
* Settings constant for working sets (value <code>SynchronizeResourceSelectionDialog.STORE_WORKING_SET</code>).
*/
private static final String STORE_WORKING_SETS = "SynchronizeResourceSelectionDialog.STORE_WORKING_SETS"; //$NON-NLS-1$
-
+
protected GlobalRefreshElementSelectionPage(String pageName) {
super(pageName);
IDialogSettings s = TeamUIPlugin.getPlugin().getDialogSettings();
@@ -79,9 +79,9 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
setControl(top);
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.SYNC_RESOURCE_SELECTION_PAGE);
-
+
Label l = new Label(top, SWT.NULL);
- l.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_5);
+ l.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_5);
// The viewer
fViewer = createViewer(top);
@@ -97,7 +97,7 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
selectGroup.setLayoutData(data);
Button selectAll = new Button(selectGroup, SWT.NULL);
- selectAll.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_12);
+ selectAll.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_12);
selectAll.addSelectionListener(new SelectionAdapter() {
@Override
@@ -114,7 +114,7 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
setButtonLayoutData(selectAll);
Button deSelectAll = new Button(selectGroup, SWT.NULL);
- deSelectAll.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_13);
+ deSelectAll.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_13);
deSelectAll.addSelectionListener(new SelectionAdapter() {
@Override
@@ -127,7 +127,7 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
// Scopes
Group scopeGroup = new Group(top, SWT.NULL);
- scopeGroup.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_6);
+ scopeGroup.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_6);
layout = new GridLayout();
layout.numColumns = 3;
layout.makeColumnsEqualWidth = false;
@@ -137,7 +137,7 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
scopeGroup.setLayoutData(data);
participantScope = new Button(scopeGroup, SWT.RADIO);
- participantScope.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_7);
+ participantScope.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_7);
participantScope.addSelectionListener(new SelectionAdapter() {
@Override
@@ -147,7 +147,7 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
});
selectedResourcesScope = new Button(scopeGroup, SWT.RADIO);
- selectedResourcesScope.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_8);
+ selectedResourcesScope.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_8);
selectedResourcesScope.addSelectionListener(new SelectionAdapter() {
@Override
@@ -160,7 +160,7 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
selectedResourcesScope.setLayoutData(data);
workingSetScope = new Button(scopeGroup, SWT.RADIO);
- workingSetScope.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_10);
+ workingSetScope.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_10);
workingSetScope.addSelectionListener(new SelectionAdapter() {
@Override
@@ -177,7 +177,7 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
workingSetLabel.setLayoutData(data);
Button selectWorkingSetButton = new Button(scopeGroup, SWT.NULL);
- selectWorkingSetButton.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_11);
+ selectWorkingSetButton.setText(TeamUIMessages.GlobalRefreshResourceSelectionPage_11);
selectWorkingSetButton.addSelectionListener(new SelectionAdapter() {
@Override
@@ -194,12 +194,12 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
}
protected abstract ContainerCheckedTreeViewer createViewer(Composite top);
-
+
/**
* Allow the finish button to be pressed if there are checked resources.
*
*/
- protected void updateOKStatus() {
+ protected void updateOKStatus() {
if(fViewer != null) {
if(! scopeCheckingElement) {
if(! selectedResourcesScope.getSelection()) {
@@ -214,7 +214,7 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
setPageComplete(false);
}
}
-
+
/**
* Returns <code>true</code> if any of the root resources are grayed.
*/
@@ -228,10 +228,10 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
}
return false;
}
-
+
/**
* Return the list of top-most resources that have been checked.
- *
+ *
* @return the list of top-most resources that have been checked or an
* empty list if nothing is selected.
*/
@@ -244,7 +244,7 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
}
return checked.toArray(new Object[checked.size()]);
}
-
+
protected void initializeScopingHint() {
String working_sets = settings.get(STORE_WORKING_SETS);
if (working_sets == null || working_sets.equals("")) { //$NON-NLS-1$
@@ -266,14 +266,14 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
if(! ws.isEmpty()) {
this.workingSets = (IWorkingSet[]) ws.toArray(new IWorkingSet[ws.size()]);
updateWorkingSetScope();
- updateWorkingSetLabel();
+ updateWorkingSetLabel();
participantScope.setSelection(false);
selectedResourcesScope.setSelection(false);
workingSetScope.setSelection(true);
}
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.IDialogPage#dispose()
*/
@@ -286,7 +286,7 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
settings.put(STORE_WORKING_SETS, (String)null);
}
}
-
+
private void updateParticipantScope() {
if(isWorkspaceSelected()) {
scopeCheckingElement = true;
@@ -297,11 +297,11 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
}
protected abstract void checkAll();
-
+
private void updateSelectedResourcesScope() {
setPageComplete(getRootElement().length > 0);
}
-
+
private void selectWorkingSetAction() {
IWorkingSetManager manager = PlatformUI.getWorkbench().getWorkingSetManager();
IWorkingSetSelectionDialog dialog = manager.createWorkingSetSelectionDialog(getShell(), true);
@@ -315,12 +315,12 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
}
updateWorkingSetScope();
updateWorkingSetLabel();
-
+
participantScope.setSelection(false);
selectedResourcesScope.setSelection(false);
workingSetScope.setSelection(true);
}
-
+
private void updateWorkingSetScope() {
if(workingSets != null) {
scopeCheckingElement = true;
@@ -336,7 +336,7 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
}
protected abstract boolean checkWorkingSetElements();
-
+
private void collectCheckedItems(TreeItem item, List checked) {
if(item.getChecked() && !item.getGrayed()) {
checked.add(item.getData());
@@ -348,10 +348,10 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
}
}
}
-
+
private void updateWorkingSetLabel() {
if (workingSets == null || workingSets.length == 0) {
- workingSetLabel.setText(TeamUIMessages.StatisticsPanel_noWorkingSet);
+ workingSetLabel.setText(TeamUIMessages.StatisticsPanel_noWorkingSet);
} else {
workingSetLabel.setText(makeWorkingSetLabel());
}
@@ -367,11 +367,11 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
}
return buffer.toString();
}
-
+
protected boolean isWorkspaceSelected() {
return participantScope.getSelection();
}
-
+
protected void setWorkspaceSelected(boolean selected) {
workingSetScope.setSelection(!selected);
selectedResourcesScope.setSelection(!selected);
@@ -389,7 +389,7 @@ public abstract class GlobalRefreshElementSelectionPage extends WizardPage {
public ContainerCheckedTreeViewer getViewer() {
return fViewer;
}
-
+
protected boolean isSelectedResourcesSelected() {
return selectedResourcesScope.getSelection();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshResourceSelectionPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshResourceSelectionPage.java
index 628480c83..7e4dac06a 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshResourceSelectionPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshResourceSelectionPage.java
@@ -30,17 +30,17 @@ import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.ui.views.navigator.ResourceComparator;
/**
- * Page that allows the user to select a set of resources that are managed by a subscriber
+ * Page that allows the user to select a set of resources that are managed by a subscriber
* participant. Callers can provide a scope hint to determine the initial selection for the
* resource list. By default, the resources in the current selection are checked, otherwise
* all resources are checked.
- *
+ *
* @since 3.0
*/
public class GlobalRefreshResourceSelectionPage extends GlobalRefreshElementSelectionPage {
-
+
private List resources;
-
+
/**
* Content provider that accepts a <code>SubscriberParticipant</code> as input and
* returns the participants root resources.
@@ -54,7 +54,7 @@ public class GlobalRefreshResourceSelectionPage extends GlobalRefreshElementSele
return super.getChildren(element);
}
}
-
+
/**
* Label decorator that will display the full path for participant roots that are folders. This
* is useful for participants that have non-project roots.
@@ -70,26 +70,26 @@ public class GlobalRefreshResourceSelectionPage extends GlobalRefreshElementSele
}
}
return workbenchProvider.getText(element);
- }
+ }
@Override
public Image getImage(Object element) {
return workbenchProvider.getImage(element);
}
}
-
+
/**
* Create a new page for the given participant. The scope hint will determine the initial selection.
- *
+ *
* @param resources the resources to synchronize
*/
public GlobalRefreshResourceSelectionPage(IResource[] resources) {
- super(TeamUIMessages.GlobalRefreshResourceSelectionPage_1);
+ super(TeamUIMessages.GlobalRefreshResourceSelectionPage_1);
// Caching the roots so that the decorator doesn't have to recompute all the time.
this.resources = Arrays.asList(resources);
- setDescription(TeamUIMessages.GlobalRefreshResourceSelectionPage_2);
- setTitle(TeamUIMessages.GlobalRefreshResourceSelectionPage_3);
+ setDescription(TeamUIMessages.GlobalRefreshResourceSelectionPage_2);
+ setTitle(TeamUIMessages.GlobalRefreshResourceSelectionPage_3);
}
-
+
@Override
protected ContainerCheckedTreeViewer createViewer(Composite top) {
GridData data;
@@ -111,12 +111,12 @@ public class GlobalRefreshResourceSelectionPage extends GlobalRefreshElementSele
fViewer.setInput(resources);
return fViewer;
}
-
+
@Override
protected void checkAll() {
getViewer().setCheckedElements(resources.toArray());
}
-
+
@Override
protected boolean checkWorkingSetElements() {
List allWorkingSetResources = new ArrayList();
@@ -134,11 +134,11 @@ public class GlobalRefreshResourceSelectionPage extends GlobalRefreshElementSele
IResource[] resources = new IResource[objects.length];
for (int i = 0; i < resources.length; i++) {
resources[i] = (IResource)objects[i];
-
+
}
return resources;
}
-
+
public ISynchronizeScope getSynchronizeScope() {
if (isWorkingSetSelected()) {
return new WorkingSetScope(getWorkingSets());
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelManager.java
index fe57c7af0..9fbcfa578 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelManager.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelManager.java
@@ -16,11 +16,11 @@ import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
* Manager for hierarchical models
*/
public class HierarchicalModelManager extends SynchronizeModelManager {
-
+
public HierarchicalModelManager(ISynchronizePageConfiguration configuration) {
super(configuration);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelManager#getSupportedModelProviders()
*/
@@ -31,7 +31,7 @@ public class HierarchicalModelManager extends SynchronizeModelManager {
new HierarchicalModelProvider.HierarchicalModelProviderDescriptor(),
new CompressedFoldersModelProvider.CompressedFolderModelProviderDescriptor() };
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelManager#createModelProvider(java.lang.String)
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelProvider.java
index 43d5d27e3..920df5f6a 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelProvider.java
@@ -37,35 +37,35 @@ import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
* changes and the model shown to the user. This happens in the ui thread.
* </ol>
* NOT ON DEMAND - model is created then maintained!
- *
+ *
* @since 3.0
*/
public class HierarchicalModelProvider extends SynchronizeModelProvider {
-
+
public static class HierarchicalModelProviderDescriptor implements ISynchronizeModelProviderDescriptor {
public static final String ID = TeamUIPlugin.ID + ".modelprovider_hierarchical"; //$NON-NLS-1$
@Override
public String getId() {
return ID;
- }
+ }
@Override
public String getName() {
- return TeamUIMessages.HierarchicalModelProvider_0;
- }
+ return TeamUIMessages.HierarchicalModelProvider_0;
+ }
@Override
public ImageDescriptor getImageDescriptor() {
return TeamImages.getImageDescriptor(ITeamUIImages.IMG_HIERARCHICAL);
}
}
private static final HierarchicalModelProviderDescriptor hierarchicalDescriptor = new HierarchicalModelProviderDescriptor();
-
+
/**
* Create an input based on the provide sync set. The input is not
* initialized until <code>prepareInput</code> is called.
- *
+ *
* @param configuration
* the synchronize page configuration
- *
+ *
* @param set
* the sync set used as the basis for the model created by this
* input.
@@ -80,7 +80,7 @@ public class HierarchicalModelProvider extends SynchronizeModelProvider {
ISynchronizePageConfiguration configuration, SyncInfoSet set) {
super(parentProvider, modelRoot, configuration, set);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.ISynchronizeModelProvider#getDescriptor()
*/
@@ -88,7 +88,7 @@ public class HierarchicalModelProvider extends SynchronizeModelProvider {
public ISynchronizeModelProviderDescriptor getDescriptor() {
return hierarchicalDescriptor;
}
-
+
@Override
public ViewerSorter getViewerSorter() {
return new SynchronizeModelElementSorter();
@@ -119,7 +119,7 @@ public class HierarchicalModelProvider extends SynchronizeModelProvider {
for (int i = 0; i < children.length; i++) {
nodes[i] = createModelObject(container, children[i]);
}
- return nodes;
+ return nodes;
}
return new IDiffElement[0];
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IChangeSetProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IChangeSetProvider.java
index 629ecf739..f465855ad 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IChangeSetProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IChangeSetProvider.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -12,7 +12,7 @@ package org.eclipse.team.internal.ui.synchronize;
/**
* Interface that can appear of a synchronize participant if that participant supports
- * change sets. This was not made API in 3.1 because it was felt that the API was not
+ * change sets. This was not made API in 3.1 because it was felt that the API was not
* ready at that point.
*/
public interface IChangeSetProvider {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshEvent.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshEvent.java
index cefbfa441..b4b7e27ed 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshEvent.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshEvent.java
@@ -26,39 +26,39 @@ import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
* @see IRefreshSubscriberListener
* @since 3.0
*/
-public interface IRefreshEvent {
+public interface IRefreshEvent {
/**
* Status code indicating that the refresh has changes to the selected
* resources that were refreshed.
*/
public static final int STATUS_CHANGES = 1;
-
+
/**
* Status code indicating that the refresh has changes to the selected
* resources that were refreshed.
*/
public static final int STATUS_NEW_CHANGES = 2;
-
+
/**
* Status code indicating that the refresh didn't find changes on the selected
* resources that were refreshed.
*/
public static final int STATUS_NO_CHANGES = 0;
-
+
/**
* Constant which identifies this event as generated by a scheduled refresh.
* @see #getRefreshType()
*/
- public static final int SCHEDULED_REFRESH = 1;
-
+ public static final int SCHEDULED_REFRESH = 1;
+
/**
* Constant which identifies the event as a refresh initiated by a user.
- * @see #getRefreshType()
+ * @see #getRefreshType()
*/
public static final int USER_REFRESH = 2;
-
+
/**
- * Returns the type of this event. The returned value will be one of <code>SCHEDULED_REFRESH</code>,
+ * Returns the type of this event. The returned value will be one of <code>SCHEDULED_REFRESH</code>,
* <code>USER_REFRESH</code>.
*
* @return the type of this event
@@ -66,49 +66,49 @@ public interface IRefreshEvent {
* @see #USER_REFRESH
*/
public int getRefreshType();
-
+
/**
* The participant that was refreshed.
- *
+ *
* @return the participant that was refreshed.
*/
public ISynchronizeParticipant getParticipant();
-
+
/**
* Return a description of the changes found.
- *
+ *
* @return a description of the changes found
*/
public IChangeDescription getChangeDescription();
-
+
/**
- * The time, in milliseconds, at which the refresh was started.
- *
+ * The time, in milliseconds, at which the refresh was started.
+ *
* @return the time, in milliseconds, at which the refresh was started.
*/
public long getStartTime();
-
+
/**
- * The time, in milliseconds, at which the refresh was completed.
- *
+ * The time, in milliseconds, at which the refresh was completed.
+ *
* @return the time, in milliseconds, at which the refresh was completed.
*/
public long getStopTime();
-
+
/**
* Returns the status of the refresh operation. This can be used to determine if the
* refresh completed successfully, with an error, or was canceled.
- *
+ *
* @return the status of the refresh operation.
*/
public IStatus getStatus();
/**
* Set whether this event is being presented in a progress view link
- * @param isLink
+ * @param isLink
*/
public void setIsLink(boolean isLink);
-
+
/**
* Return whether this event is being displayed in a link.
* @return whether this event is being displayed in a link
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshSubscriberListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshSubscriberListener.java
index 833a32624..69e2488b5 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshSubscriberListener.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshSubscriberListener.java
@@ -13,27 +13,27 @@ package org.eclipse.team.internal.ui.synchronize;
import org.eclipse.ui.actions.ActionFactory;
/**
- * Callback interface for clients interested in being notified about the lifecycle of
+ * Callback interface for clients interested in being notified about the lifecycle of
* a subscriber refresh operation.
* <p>
* Clients may implement this interface.
* </p>
- * @see IRefreshEvent
+ * @see IRefreshEvent
* @since 3.0
*/
public interface IRefreshSubscriberListener {
/**
* Notification that a refresh is about to start. The event contains the resources
* that will be refreshed.
- *
+ *
* @param event an event describing the state of the refresh.
*/
- public void refreshStarted(IRefreshEvent event);
-
+ public void refreshStarted(IRefreshEvent event);
+
/**
* Notification that a refresh has completed. The event contains the changes
* found during the refresh as well as the status of the refresh.
- *
+ *
* @param event the event describing the result of the refresh.
*/
public ActionFactory.IWorkbenchAction refreshDone(IRefreshEvent event);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshable.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshable.java
index e777946e0..9c27c0c11 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshable.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshable.java
@@ -13,13 +13,13 @@ package org.eclipse.team.internal.ui.synchronize;
import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
public interface IRefreshable {
-
+
public SubscriberRefreshSchedule getRefreshSchedule();
-
+
public void setRefreshSchedule(SubscriberRefreshSchedule schedule);
-
+
public ISynchronizeParticipant getParticipant();
-
+
public RefreshParticipantJob createJob(String refreshInterval);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProvider.java
index f86ee0da5..ce859a825 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProvider.java
@@ -25,7 +25,7 @@ import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
* times without warning.
*/
public interface ISynchronizeModelProvider {
-
+
/**
* Property constant used to indicate that the viewer sorter has changed.
* Property change notifications for the viewer sorter change do not include
@@ -33,7 +33,7 @@ public interface ISynchronizeModelProvider {
* from the provider.
*/
public static final String P_VIEWER_SORTER = TeamUIPlugin.ID + ".P_VIEWER_SORTER"; //$NON-NLS-1$
-
+
/**
* Returns the sync set this model provider is showing.
* @return the sync set this model provider is showing.
@@ -45,7 +45,7 @@ public interface ISynchronizeModelProvider {
* @return the description for this model provider.
*/
public ISynchronizeModelProviderDescriptor getDescriptor();
-
+
/**
* Return the <code>AbstractTreeViewer</code> associated with this content
* provider or <code>null</code> if the viewer is not of the proper type.
@@ -66,7 +66,7 @@ public interface ISynchronizeModelProvider {
public abstract void dispose();
/**
- * Returns the input created by this controller or <code>null</code> if
+ * Returns the input created by this controller or <code>null</code> if
* {@link #prepareInput(IProgressMonitor)} hasn't been called on this object yet.
* @return the model element
*/
@@ -83,13 +83,13 @@ public interface ISynchronizeModelProvider {
* is safe to access the viewer.
*/
public abstract void saveState();
-
+
/**
* Register a property change listener with this provider.
* @param listener the property change listener
*/
public abstract void addPropertyChangeListener(IPropertyChangeListener listener);
-
+
/**
* Remove a property change listener from this provider.
* @param listener the property change listener
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProviderDescriptor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProviderDescriptor.java
index 51441ce85..4fade964c 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProviderDescriptor.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProviderDescriptor.java
@@ -24,7 +24,7 @@ public interface ISynchronizeModelProviderDescriptor {
* @return the unique identifier for this model provider.
*/
public String getId();
-
+
/**
* Returns the image that represents this model provider. This image
* will be shown to the user.
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ImageManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ImageManager.java
index 17dce141f..f90c63bb3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ImageManager.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ImageManager.java
@@ -23,14 +23,14 @@ import org.eclipse.team.internal.ui.TeamUIPlugin;
import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
public class ImageManager {
-
+
private static final String PROP_IMAGE_MANAGER = TeamUIPlugin.ID + ".imageManager"; //$NON-NLS-1$
-
+
private LocalResourceManager imageManager;
// Contains direction images
private CompareConfiguration compareConfig = new CompareConfiguration();
private boolean disposed = false;
-
+
public synchronized static ImageManager getImageManager(ISynchronizationContext context, ISynchronizePageConfiguration configuration) {
ImageManager manager = (ImageManager)context.getCache().get(PROP_IMAGE_MANAGER);
if (manager == null || manager.disposed) {
@@ -66,7 +66,7 @@ public class ImageManager {
return null;
return configuration.getPage().getViewer();
}
-
+
public Image getImage(ImageDescriptor descriptor) {
if (descriptor == null || disposed)
return null;
@@ -74,7 +74,7 @@ public class ImageManager {
Image image = manager.createImage(descriptor);
return image;
}
-
+
private synchronized ResourceManager getResourceManager() {
if (imageManager == null) {
imageManager = new LocalResourceManager(JFaceResources.getResources());
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java
index 04993d9f5..ce48c8639 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceSaveableComparison.java
@@ -32,8 +32,8 @@ import org.eclipse.ui.texteditor.IDocumentProvider;
/**
* A saveable that wraps a compare input in which the left side is a {@link LocalResourceTypedElement}
- * and saves changes made to the file in compare when the viewers are flushed.
- *
+ * and saves changes made to the file in compare when the viewers are flushed.
+ *
* @see LocalResourceTypedElement
* @since 3.3
*/
@@ -45,7 +45,7 @@ public abstract class LocalResourceSaveableComparison extends SaveableComparison
private IContentChangeListener contentChangeListener;
private ITypedElement fileElement;
private IDocument document;
-
+
/**
* Create the resource-based saveable comparison.
* @param input the compare input to be save
@@ -54,7 +54,7 @@ public abstract class LocalResourceSaveableComparison extends SaveableComparison
public LocalResourceSaveableComparison(ICompareInput input, CompareEditorInput editorInput) {
this(input, editorInput, input.getLeft());
}
-
+
/**
* Create the resource-based saveable comparison.
* @param input the compare input to be save
@@ -67,7 +67,7 @@ public abstract class LocalResourceSaveableComparison extends SaveableComparison
this.fileElement = fileElement;
initializeContentChangeListeners();
}
-
+
protected void initializeHashing() {
Object document= getAdapter(IDocument.class);
if (document != null) {
@@ -97,7 +97,7 @@ public abstract class LocalResourceSaveableComparison extends SaveableComparison
((IContentChangeNotifier) te).addContentChangeListener(contentChangeListener);
}
}
-
+
/**
* Dispose of the saveable.
*/
@@ -118,7 +118,7 @@ public abstract class LocalResourceSaveableComparison extends SaveableComparison
private ITypedElement getFileElement() {
return fileElement;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SaveableCompareModel#performSave(org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -163,7 +163,7 @@ public abstract class LocalResourceSaveableComparison extends SaveableComparison
}
/**
- * Fire an input change for the compare input after it has been
+ * Fire an input change for the compare input after it has been
* saved.
*/
protected abstract void fireInputChange();
@@ -176,21 +176,21 @@ public abstract class LocalResourceSaveableComparison extends SaveableComparison
if(hasSaveConflict()) {
if (Utils.RUNNING_TESTS)
return !Utils.TESTING_FLUSH_ON_COMPARE_INPUT_CHANGE;
- final MessageDialog dialog =
- new MessageDialog(TeamUIPlugin.getStandardDisplay().getActiveShell(),
- TeamUIMessages.SyncInfoCompareInput_0,
- null,
- TeamUIMessages.SyncInfoCompareInput_1,
+ final MessageDialog dialog =
+ new MessageDialog(TeamUIPlugin.getStandardDisplay().getActiveShell(),
+ TeamUIMessages.SyncInfoCompareInput_0,
+ null,
+ TeamUIMessages.SyncInfoCompareInput_1,
MessageDialog.QUESTION,
new String[] {
- TeamUIMessages.SyncInfoCompareInput_2,
- IDialogConstants.CANCEL_LABEL},
+ TeamUIMessages.SyncInfoCompareInput_2,
+ IDialogConstants.CANCEL_LABEL},
0);
-
+
int retval = dialog.open();
switch(retval) {
// save
- case 0:
+ case 0:
return false;
// cancel
case 1:
@@ -221,7 +221,7 @@ public abstract class LocalResourceSaveableComparison extends SaveableComparison
}
return editorInput.isSaveNeeded();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.SaveableCompareModel#setDirty(boolean)
*/
@@ -318,9 +318,9 @@ public abstract class LocalResourceSaveableComparison extends SaveableComparison
} else {
setDirty(changed);
}
- }
+ }
}
-
+
/*
* @see org.eclipse.ui.Saveable#hashCode()
*/
@@ -339,26 +339,26 @@ public abstract class LocalResourceSaveableComparison extends SaveableComparison
public boolean equals(Object obj) {
if (this == obj)
return true;
-
+
if (!(obj instanceof Saveable))
return false;
-
+
if (document != null) {
Object otherDocument= ((Saveable)obj).getAdapter(IDocument.class);
-
+
if (document == null && otherDocument == null)
return false;
-
+
return document != null && document.equals(otherDocument);
}
-
+
if (obj instanceof LocalResourceSaveableComparison) {
LocalResourceSaveableComparison rscm = (LocalResourceSaveableComparison) obj;
return rscm.input.equals(input);
}
return false;
}
-
+
@Override
public Object getAdapter(Class adapter) {
if (adapter == IDocument.class) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java
index 737c8c0e6..f16ca37ac 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java
@@ -40,7 +40,7 @@ import org.eclipse.ui.IEditorInput;
* <p>
* This class may be instantiated.
* </p>
- *
+ *
* @since 3.3
* @noextend This class is not intended to be subclassed by clients.
*/
@@ -74,11 +74,11 @@ public class LocalResourceTypedElement extends ResourceNode implements IAdaptabl
/**
* Commits buffered contents to the underlying resource. Note that if the
- * element has a shared document, the commit will not succeed since the
+ * element has a shared document, the commit will not succeed since the
* contents will be buffered in the shared document and will not be pushed
* to this element using {@link #setContent(byte[])}. Clients should check
* whether the element {@link #isConnected()} and, if it is, they should call
- * {@link #saveDocument(boolean, IProgressMonitor)} to save the buffered contents to
+ * {@link #saveDocument(boolean, IProgressMonitor)} to save the buffered contents to
* the underlying resource.
* @param monitor a progress monitor
* @throws CoreException
@@ -363,7 +363,7 @@ public class LocalResourceTypedElement extends ResourceNode implements IAdaptabl
/**
* Returns the author of the workspace file revision if any.
- *
+ *
* @return the author or <code>null</code> if the author has not been fetched or is not
* available
* @since 3.7
@@ -375,7 +375,7 @@ public class LocalResourceTypedElement extends ResourceNode implements IAdaptabl
/**
* Fetches the author from the repository.
- *
+ *
* @param monitor the progress monitor
* @throws CoreException if fetching the revision properties fails
* @since 3.7
@@ -401,7 +401,7 @@ public class LocalResourceTypedElement extends ResourceNode implements IAdaptabl
/**
* Sets the author.
- *
+ *
* @param author the author
* @since 3.7
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/MultiLabelDecorator.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/MultiLabelDecorator.java
index 07d4566b8..62fb5d03f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/MultiLabelDecorator.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/MultiLabelDecorator.java
@@ -19,7 +19,7 @@ class MultiLabelDecorator extends LabelProvider implements ILabelDecorator, IFon
public MultiLabelDecorator(ILabelDecorator[] decorators) {
this.decorators = decorators;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ILabelDecorator#decorateImage(org.eclipse.swt.graphics.Image, java.lang.Object)
*/
@@ -34,7 +34,7 @@ class MultiLabelDecorator extends LabelProvider implements ILabelDecorator, IFon
}
return image;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ILabelDecorator#decorateText(java.lang.String, java.lang.Object)
*/
@@ -49,7 +49,7 @@ class MultiLabelDecorator extends LabelProvider implements ILabelDecorator, IFon
}
return text;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java
index 80d501ef9..41fc8859e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java
@@ -31,31 +31,31 @@ public class NavigationActionGroup extends SynchronizePageActionGroup {
private Action collapseAll;
private NavigateAction gotoNext;
private NavigateAction gotoPrevious;
-
+
@Override
public void initialize(ISynchronizePageConfiguration configuration) {
super.initialize(configuration);
final Viewer viewer = configuration.getPage().getViewer();
if (viewer instanceof AbstractTreeViewer) {
-
+
expandAllAction = new ExpandAllAction((AbstractTreeViewer) viewer);
Utils.initAction(expandAllAction, "action.expandAll."); //$NON-NLS-1$
-
+
collapseAll = new Action() {
@Override
public void run() {
if (viewer.getControl().isDisposed() || !(viewer instanceof AbstractTreeViewer))
return;
- viewer.getControl().setRedraw(false);
+ viewer.getControl().setRedraw(false);
((AbstractTreeViewer)viewer).collapseToLevel(viewer.getInput(), AbstractTreeViewer.ALL_LEVELS);
viewer.getControl().setRedraw(true);
}
};
Utils.initAction(collapseAll, "action.collapseAll."); //$NON-NLS-1$
-
+
ICompareNavigator nav = (ICompareNavigator)configuration.getProperty(SynchronizePageConfiguration.P_NAVIGATOR);
if (nav != null) {
- gotoNext = new NavigateAction(configuration, true /*next*/);
+ gotoNext = new NavigateAction(configuration, true /*next*/);
gotoPrevious = new NavigateAction(configuration, false /*previous*/);
}
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshChangeListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshChangeListener.java
index fd32b5d51..2b9f93edc 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshChangeListener.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshChangeListener.java
@@ -46,7 +46,7 @@ public class RefreshChangeListener implements ISubscriberChangeListener, IChange
for (Iterator it = changes.iterator(); it.hasNext();) {
ISubscriberChangeEvent delta = (ISubscriberChangeEvent) it.next();
SyncInfo info = set.getSyncInfo(delta.getResource());
- if (info != null && interestingChange(info)) {
+ if (info != null && interestingChange(info)) {
changedSyncInfos.add(info);
}
}
@@ -62,7 +62,7 @@ public class RefreshChangeListener implements ISubscriberChangeListener, IChange
return SyncInfo.getChange(kind) != SyncInfo.IN_SYNC;
}
}
-
+
private boolean isThreeWay() {
return collector.getSubscriber().getResourceComparator().isThreeWay();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshEvent.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshEvent.java
index 5d4c8edc9..28d7ff961 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshEvent.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshEvent.java
@@ -19,7 +19,7 @@ import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
* A refresh event generated to notify clients of the refresh lifecycle.
*/
public class RefreshEvent implements IRefreshEvent {
- int type;
+ int type;
SyncInfo[] changes;
long startTime = 0;
long stopTime = 0;
@@ -27,18 +27,18 @@ public class RefreshEvent implements IRefreshEvent {
private final ISynchronizeParticipant participant;
private final IChangeDescription description;
private boolean isLink;
-
+
public RefreshEvent(int type, ISynchronizeParticipant participant, IChangeDescription description) {
this.type = type;
this.participant = participant;
this.description = description;
}
-
+
@Override
public int getRefreshType() {
return type;
}
-
+
@Override
public long getStartTime() {
return startTime;
@@ -61,7 +61,7 @@ public class RefreshEvent implements IRefreshEvent {
public IStatus getStatus() {
return status;
}
-
+
public void setStatus(IStatus status) {
this.status = status;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshModelParticipantJob.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshModelParticipantJob.java
index 3191b0fe9..68405e46a 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshModelParticipantJob.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshModelParticipantJob.java
@@ -32,7 +32,7 @@ public class RefreshModelParticipantJob extends RefreshParticipantJob {
public class ChangeDescription implements IChangeDescription, IDiffChangeListener {
Map changes = new HashMap();
-
+
@Override
public int getChangeCount() {
return changes.size();
@@ -51,13 +51,13 @@ public class RefreshModelParticipantJob extends RefreshParticipantJob {
changes.put(node.getPath(), node);
}
}
-
+
@Override
public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
// Do nothing
}
}
-
+
public RefreshModelParticipantJob(ISynchronizeParticipant participant, String jobName, String taskName, ResourceMapping[] mappings, IRefreshSubscriberListener listener) {
super(participant, jobName, taskName, listener);
this.mappings = mappings;
@@ -92,13 +92,13 @@ public class RefreshModelParticipantJob extends RefreshParticipantJob {
IResourceDiffTree diffTree = ((ModelSynchronizeParticipant)getParticipant()).getContext().getDiffTree();
return (int) diffTree.countFor(IThreeWayDiff.INCOMING, IThreeWayDiff.DIRECTION_MASK);
}
-
+
@Override
protected int getOutgoingChangeCount() {
IResourceDiffTree diffTree = ((ModelSynchronizeParticipant)getParticipant()).getContext().getDiffTree();
return (int) diffTree.countFor(IThreeWayDiff.OUTGOING, IThreeWayDiff.DIRECTION_MASK);
}
-
+
@Override
protected void handleProgressGroupSet(IProgressMonitor group, int ticks) {
this.group = group;
@@ -109,7 +109,7 @@ public class RefreshModelParticipantJob extends RefreshParticipantJob {
protected IChangeDescription createChangeDescription() {
return new ChangeDescription();
}
-
+
@Override
public boolean belongsTo(Object family) {
if (family instanceof RefreshModelParticipantJob) {
@@ -120,7 +120,7 @@ public class RefreshModelParticipantJob extends RefreshParticipantJob {
return true;
return super.belongsTo(family);
}
-
+
@Override
public IStatus run(IProgressMonitor monitor) {
if (group != null)
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java
index b1626c87f..f877089cf 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java
@@ -43,24 +43,24 @@ import org.eclipse.ui.progress.UIJob;
* @since 3.0
*/
public abstract class RefreshParticipantJob extends Job {
-
+
/**
* Uniquely identifies this type of job. This is used for cancellation.
*/
private final static Object FAMILY_ID = new Object();
-
+
/**
- * If true this job will be restarted when it completes
+ * If true this job will be restarted when it completes
*/
private boolean reschedule = false;
-
+
/**
* If true a rescheduled refresh job should be restarted when canceled
*/
- private boolean restartOnCancel = true;
-
+ private boolean restartOnCancel = true;
+
/**
- * The schedule delay used when rescheduling a completed job
+ * The schedule delay used when rescheduling a completed job
*/
private static long scheduleDelay;
@@ -68,33 +68,33 @@ public abstract class RefreshParticipantJob extends Job {
* The participant that is being refreshed.
*/
private ISynchronizeParticipant participant;
-
+
/**
* The task name for this refresh. This is usually more descriptive than the
* job name.
*/
private String taskName;
-
+
/**
* Refresh started/completed listener for every refresh
*/
private static List listeners = new ArrayList(1);
private static final int STARTED = 1;
private static final int DONE = 2;
-
+
/*
* Lock used to sequence refresh jobs
*/
- private static final ILock lock = Job.getJobManager().newLock();
-
+ private static final ILock lock = Job.getJobManager().newLock();
+
/*
* Constant used for postponement
*/
private static final IStatus POSTPONED = new Status(IStatus.CANCEL, TeamUIPlugin.ID, 0, "Scheduled refresh postponed due to conflicting operation", null); //$NON-NLS-1$
-
+
/*
* Action wrapper which allows the goto action
- * to be set later. It also handles errors
+ * to be set later. It also handles errors
* that have occurred during the refresh
*/
private final class GotoActionWrapper extends WorkbenchAction {
@@ -103,7 +103,7 @@ public abstract class RefreshParticipantJob extends Job {
@Override
public void run() {
if (status != null && !status.isOK()) {
- ErrorDialog.openError(Utils.getShell(null), null, TeamUIMessages.RefreshSubscriberJob_3, status);
+ ErrorDialog.openError(Utils.getShell(null), null, TeamUIMessages.RefreshSubscriberJob_3, status);
} else if(gotoAction != null) {
gotoAction.run();
}
@@ -181,9 +181,9 @@ public abstract class RefreshParticipantJob extends Job {
*/
protected abstract void notify(IRefreshSubscriberListener listener);
}
-
+
/**
- * Monitor wrapper that will indicate that the job is canceled
+ * Monitor wrapper that will indicate that the job is canceled
* if the job is blocking another.
*/
private class NonblockingProgressMonitor extends ProgressMonitorWrapper {
@@ -218,15 +218,15 @@ public abstract class RefreshParticipantJob extends Job {
return wasBlocking;
}
}
-
+
public static interface IChangeDescription {
int getChangeCount();
}
-
+
/**
* Create a job to refresh the specified resources with the subscriber.
- *
- * @param participant the subscriber participant
+ *
+ * @param participant the subscriber participant
* @param jobName
* @param taskName
* @param listener
@@ -238,14 +238,14 @@ public abstract class RefreshParticipantJob extends Job {
this.taskName = taskName;
setPriority(Job.DECORATE);
setRefreshInterval(3600 /* 1 hour */);
-
+
// Handle restarting of job if it is configured as a scheduled refresh job.
addJobChangeListener(new JobChangeAdapter() {
@Override
public void done(IJobChangeEvent event) {
if(shouldReschedule()) {
IStatus result = event.getResult();
- if(result.getSeverity() == IStatus.CANCEL && ! restartOnCancel) {
+ if(result.getSeverity() == IStatus.CANCEL && ! restartOnCancel) {
return;
}
long delay = scheduleDelay;
@@ -257,26 +257,26 @@ public abstract class RefreshParticipantJob extends Job {
restartOnCancel = true;
}
}
- });
+ });
if(listener != null)
initialize(listener);
}
@Override
- public boolean belongsTo(Object family) {
+ public boolean belongsTo(Object family) {
if (family instanceof SubscriberParticipant) {
return family == participant;
} else {
return (family == getFamily() || family == ISynchronizeManager.FAMILY_SYNCHRONIZE_OPERATION);
}
}
-
+
public static Object getFamily() {
return FAMILY_ID;
}
-
+
/**
- * This is run by the job scheduler. A list of subscribers will be refreshed, errors will not stop the job
+ * This is run by the job scheduler. A list of subscribers will be refreshed, errors will not stop the job
* and it will continue to refresh the other subscribers.
*/
@Override
@@ -286,7 +286,7 @@ public abstract class RefreshParticipantJob extends Job {
if (shouldReschedule() &&
(isJobInFamilyRunning(ResourcesPlugin.FAMILY_AUTO_BUILD)
|| isJobInFamilyRunning(ResourcesPlugin.FAMILY_MANUAL_BUILD))) {
- return POSTPONED;
+ return POSTPONED;
}
// Only allow one refresh job at a time
// NOTE: It would be cleaner if this was done by a scheduling
@@ -303,7 +303,7 @@ public abstract class RefreshParticipantJob extends Job {
}
Policy.checkCanceled(monitor);
}
-
+
IChangeDescription changeDescription = createChangeDescription();
RefreshEvent event = new RefreshEvent(reschedule ? IRefreshEvent.SCHEDULED_REFRESH : IRefreshEvent.USER_REFRESH, participant, changeDescription);
IStatus status = null;
@@ -315,9 +315,9 @@ public abstract class RefreshParticipantJob extends Job {
}
// Pre-Notify
notifyListeners(STARTED, event);
- // Perform the refresh
+ // Perform the refresh
monitor.setTaskName(getName());
- wrappedMonitor = new NonblockingProgressMonitor(monitor, this);
+ wrappedMonitor = new NonblockingProgressMonitor(monitor, this);
doRefresh(changeDescription, wrappedMonitor);
// Prepare the results
setProperty(IProgressConstants.KEEPONE_PROPERTY, Boolean.valueOf(! isJobModal()));
@@ -352,7 +352,7 @@ public abstract class RefreshParticipantJob extends Job {
} finally {
event.setStopTime(System.currentTimeMillis());
}
-
+
// Post-Notify
if (status == null) {
status = calculateStatus(event);
@@ -373,7 +373,7 @@ public abstract class RefreshParticipantJob extends Job {
}
protected abstract void doRefresh(IChangeDescription changeListener, IProgressMonitor monitor) throws CoreException;
-
+
/**
* Return the total number of changes covered by the resources
* of this job.
@@ -384,7 +384,7 @@ public abstract class RefreshParticipantJob extends Job {
protected abstract int getIncomingChangeCount();
protected abstract int getOutgoingChangeCount();
-
+
private boolean isJobInFamilyRunning(Object family) {
Job[] jobs = Job.getJobManager().find(family);
if (jobs != null && jobs.length > 0) {
@@ -409,41 +409,41 @@ public abstract class RefreshParticipantJob extends Job {
int incomingChanges = getIncomingChangeCount();
String numIncomingChanges = incomingChanges==0 ? "" //$NON-NLS-1$
: NLS.bind(TeamUIMessages.RefreshCompleteDialog_incomingChanges, Integer.toString(incomingChanges));
-
+
int outgoingChanges = getOutgoingChangeCount();
String numOutgoingChanges = outgoingChanges==0 ? "" //$NON-NLS-1$
: NLS.bind(TeamUIMessages.RefreshCompleteDialog_outgoingChanges, Integer.toString(outgoingChanges));
-
+
String sep = incomingChanges>0 && outgoingChanges>0 ? "; " : ""; //$NON-NLS-1$ //$NON-NLS-2$
-
+
if (changeCount > 0) {
// New changes found
code = IRefreshEvent.STATUS_NEW_CHANGES;
String numNewChanges = Integer.toString(changeCount);
if (changeCount == 1) {
- text.append(NLS.bind(TeamUIMessages.RefreshCompleteDialog_newChangesSingular, (new Object[]{getName(), numNewChanges, numIncomingChanges, sep, numOutgoingChanges})));
+ text.append(NLS.bind(TeamUIMessages.RefreshCompleteDialog_newChangesSingular, (new Object[]{getName(), numNewChanges, numIncomingChanges, sep, numOutgoingChanges})));
} else {
- text.append(NLS.bind(TeamUIMessages.RefreshCompleteDialog_newChangesPlural, (new Object[]{getName(), numNewChanges, numIncomingChanges, sep, numOutgoingChanges})));
+ text.append(NLS.bind(TeamUIMessages.RefreshCompleteDialog_newChangesPlural, (new Object[]{getName(), numNewChanges, numIncomingChanges, sep, numOutgoingChanges})));
}
} else {
// Refreshed resources contain changes
if (numChanges == 1) {
- text.append(NLS.bind(TeamUIMessages.RefreshCompleteDialog_changesSingular, (new Object[]{getName(), new Integer(numChanges), numIncomingChanges, sep, numOutgoingChanges})));
+ text.append(NLS.bind(TeamUIMessages.RefreshCompleteDialog_changesSingular, (new Object[]{getName(), new Integer(numChanges), numIncomingChanges, sep, numOutgoingChanges})));
} else {
- text.append(NLS.bind(TeamUIMessages.RefreshCompleteDialog_changesPlural, (new Object[]{getName(), new Integer(numChanges), numIncomingChanges, sep, numOutgoingChanges})));
+ text.append(NLS.bind(TeamUIMessages.RefreshCompleteDialog_changesPlural, (new Object[]{getName(), new Integer(numChanges), numIncomingChanges, sep, numOutgoingChanges})));
}
}
} else {
// No changes found
code = IRefreshEvent.STATUS_NO_CHANGES;
- text.append(NLS.bind(TeamUIMessages.RefreshCompleteDialog_6, new String[] { getName() }));
+ text.append(NLS.bind(TeamUIMessages.RefreshCompleteDialog_6, new String[] { getName() }));
}
return new Status(IStatus.OK, TeamUIPlugin.ID, code, text.toString(), null);
}
-
+
private void initialize(final IRefreshSubscriberListener listener) {
final GotoActionWrapper actionWrapper = new GotoActionWrapper();
-
+
IProgressMonitor group = Job.getJobManager().createProgressGroup();
group.beginTask(taskName, 100);
setProgressGroup(group, 80);
@@ -490,27 +490,27 @@ public abstract class RefreshParticipantJob extends Job {
return null;
}
};
-
+
if (listener != null) {
RefreshParticipantJob.addRefreshListener(autoListener);
- }
+ }
}
/**
* The progress group of this job has been set. Any subclasses should
- * assign this group to any additional jobs they use to collect
+ * assign this group to any additional jobs they use to collect
* changes from the refresh.
* @param group a progress group
* @param ticks the ticks for the change collection job
*/
protected abstract void handleProgressGroupSet(IProgressMonitor group, int ticks);
-
+
protected abstract IChangeDescription createChangeDescription();
-
+
public long getScheduleDelay() {
return scheduleDelay;
}
-
+
protected void start() {
if(getState() == Job.NONE) {
if(shouldReschedule()) {
@@ -518,7 +518,7 @@ public abstract class RefreshParticipantJob extends Job {
}
}
}
-
+
/**
* Specify the interval in seconds at which this job is scheduled.
* @param seconds delay specified in seconds
@@ -534,19 +534,19 @@ public abstract class RefreshParticipantJob extends Job {
start();
}
}
-
+
public void setRestartOnCancel(boolean restartOnCancel) {
this.restartOnCancel = restartOnCancel;
}
-
+
public void setReschedule(boolean reschedule) {
this.reschedule = reschedule;
}
-
+
public boolean shouldReschedule() {
return reschedule;
}
-
+
public static void addRefreshListener(IRefreshSubscriberListener listener) {
synchronized(listeners) {
if(! listeners.contains(listener)) {
@@ -554,13 +554,13 @@ public abstract class RefreshParticipantJob extends Job {
}
}
}
-
+
public static void removeRefreshListener(IRefreshSubscriberListener listener) {
synchronized(listeners) {
listeners.remove(listener);
}
}
-
+
protected void notifyListeners(final int state, final IRefreshEvent event) {
// Get a snapshot of the listeners so the list doesn't change while we're firing
IRefreshSubscriberListener[] listenerArray;
@@ -588,7 +588,7 @@ public abstract class RefreshParticipantJob extends Job {
notification.run(listener);
}
}
-
+
private boolean isJobModal() {
Boolean isModal = (Boolean)getProperty(IProgressConstants.PROPERTY_IN_DIALOG);
if(isModal == null) return false;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberParticipantJob.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberParticipantJob.java
index a75e329d6..52c535dd7 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberParticipantJob.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberParticipantJob.java
@@ -35,11 +35,11 @@ public class RefreshSubscriberParticipantJob extends RefreshParticipantJob {
protected Subscriber getSubscriber() {
return ((SubscriberParticipant)getParticipant()).getSubscriber();
}
-
+
private SubscriberSyncInfoCollector getCollector() {
return ((SubscriberParticipant)getParticipant()).getSubscriberSyncInfoCollector();
}
-
+
@Override
protected int getChangeCount() {
int numChanges = 0;
@@ -56,17 +56,17 @@ public class RefreshSubscriberParticipantJob extends RefreshParticipantJob {
}
return numChanges;
}
-
+
@Override
protected int getIncomingChangeCount() {
return getChangesInMode(SyncInfo.INCOMING);
}
-
+
@Override
protected int getOutgoingChangeCount() {
return getChangesInMode(SyncInfo.OUTGOING);
}
-
+
private int getChangesInMode(int kind) {
int numChanges = 0;
SubscriberSyncInfoCollector collector = getCollector();
@@ -86,19 +86,19 @@ public class RefreshSubscriberParticipantJob extends RefreshParticipantJob {
}
return numChanges;
}
-
+
@Override
protected RefreshParticipantJob.IChangeDescription createChangeDescription() {
return new RefreshChangeListener(resources, getCollector());
}
-
+
@Override
protected void handleProgressGroupSet(IProgressMonitor group, int ticks) {
getCollector().setProgressGroup(group, ticks);
}
-
+
/**
- * If a collector is available then run the refresh and the background event processing
+ * If a collector is available then run the refresh and the background event processing
* within the same progress group.
*/
@Override
@@ -106,15 +106,15 @@ public class RefreshSubscriberParticipantJob extends RefreshParticipantJob {
// Ensure that any progress shown as a result of this refresh occurs hidden in a progress group.
return getSubscriber() != null && getCollector().getSyncInfoSet() != null;
}
-
+
@Override
- public boolean belongsTo(Object family) {
+ public boolean belongsTo(Object family) {
if(family instanceof RefreshSubscriberParticipantJob) {
return ((RefreshSubscriberParticipantJob)family).getSubscriber() == getSubscriber();
}
return super.belongsTo(family);
}
-
+
@Override
protected void doRefresh(IChangeDescription changeListener, IProgressMonitor monitor) throws TeamException {
Subscriber subscriber = getSubscriber();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicy.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicy.java
index f9286fa8d..8cb7366a7 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicy.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicy.java
@@ -71,9 +71,9 @@ public class RefreshUserNotificationPolicy implements IRefreshSubscriberListener
@Override
public void run() {
boolean prompt = (event.getStatus().getCode() == IRefreshEvent.STATUS_NO_CHANGES);
-
+
prompt = handleRefreshDone(event, prompt);
-
+
// Prompt user if preferences are set for this type of refresh.
if (prompt) {
notifyIfNeededModal(event);
@@ -87,32 +87,32 @@ public class RefreshUserNotificationPolicy implements IRefreshSubscriberListener
}
}
}
-
+
@Override
public String getToolTipText() {
boolean prompt = (event.getStatus().getCode() == IRefreshEvent.STATUS_NO_CHANGES);
if(prompt) {
- return TeamUIMessages.RefreshSubscriberJob_2a;
+ return TeamUIMessages.RefreshSubscriberJob_2a;
} else {
- return NLS.bind(TeamUIMessages.RefreshSubscriberJob_2b, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, participant.getName()) });
+ return NLS.bind(TeamUIMessages.RefreshSubscriberJob_2b, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, participant.getName()) });
}
}
};
}
-
+
private void notifyIfNeededModal(final IRefreshEvent event) {
TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
@Override
public void run() {
String title = (event.getRefreshType() == IRefreshEvent.SCHEDULED_REFRESH ?
- NLS.bind(TeamUIMessages.RefreshCompleteDialog_4a, new String[] { Utils.getTypeName(participant) }) :
- NLS.bind(TeamUIMessages.RefreshCompleteDialog_4, new String[] { Utils.getTypeName(participant) })
+ NLS.bind(TeamUIMessages.RefreshCompleteDialog_4a, new String[] { Utils.getTypeName(participant) }) :
+ NLS.bind(TeamUIMessages.RefreshCompleteDialog_4, new String[] { Utils.getTypeName(participant) })
);
MessageDialog.openInformation(Utils.getShell(null), title, event.getStatus().getMessage());
}
});
}
-
+
protected boolean handleRefreshDone(final IRefreshEvent event, boolean prompt) {
if (participant instanceof SubscriberParticipant) {
SubscriberParticipant sp = (SubscriberParticipant) participant;
@@ -123,7 +123,7 @@ public class RefreshUserNotificationPolicy implements IRefreshSubscriberListener
selectedResources.add(infos[i].getLocal());
}
IResource[] resources = (IResource[]) selectedResources.toArray(new IResource[selectedResources.size()]);
-
+
// If it's a file, simply show the compare editor
if (resources.length == 1 && resources[0].getType() == IResource.FILE) {
IResource file = resources[0];
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java
index 462e9ef18..15da35a95 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java
@@ -45,15 +45,15 @@ public class RefreshUserNotificationPolicyInModalDialog implements IRefreshSubsc
return null;
// If the event is for a cancelled operation, there's nothing to do
int severity = event.getStatus().getSeverity();
- if(severity == IStatus.CANCEL || severity == IStatus.ERROR)
+ if(severity == IStatus.CANCEL || severity == IStatus.ERROR)
return null;
-
+
return new WorkbenchAction() {
@Override
- public void run() {
+ public void run() {
// If there are no changes
if (event.getStatus().getCode() == IRefreshEvent.STATUS_NO_CHANGES) {
- MessageDialog.openInformation(shell, TeamUIMessages.OpenComparedDialog_noChangeTitle, TeamUIMessages.OpenComparedDialog_noChangesMessage); //
+ MessageDialog.openInformation(shell, TeamUIMessages.OpenComparedDialog_noChangeTitle, TeamUIMessages.OpenComparedDialog_noChangesMessage); //
return;
}
compareAndOpenDialog(event, participant);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java
index f7e94afff..ba6e6ebb8 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java
@@ -46,7 +46,7 @@ public class RemoteResourceTypedElement extends StorageTypedElement {
public String getName() {
return remote.getName();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.StorageTypedElement#getType()
*/
@@ -55,7 +55,7 @@ public class RemoteResourceTypedElement extends StorageTypedElement {
if (remote.isContainer()) {
return ITypedElement.FOLDER_TYPE;
}
- return super.getType();
+ return super.getType();
}
/* (non-Javadoc)
@@ -63,9 +63,9 @@ public class RemoteResourceTypedElement extends StorageTypedElement {
*/
@Override
protected IStorage fetchContents(IProgressMonitor monitor) throws TeamException {
- return remote.getStorage(monitor);
+ return remote.getStorage(monitor);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.ISharedDocumentAdapter#getDocumentKey(java.lang.Object)
*/
@@ -76,5 +76,5 @@ public class RemoteResourceTypedElement extends StorageTypedElement {
}
return null;
}
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SaveablesCompareEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SaveablesCompareEditorInput.java
index 04e623ba4..c4fd5b8e3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SaveablesCompareEditorInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SaveablesCompareEditorInput.java
@@ -92,7 +92,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
* returned from this method is used as the left contributor of the compare
* input for a {@link SaveableCompareEditorInput}, then the file will be
* properly saved when the compare editor input or viewers are saved.
- *
+ *
* @param file
* the file
* @return a typed element that represents a local file.
@@ -113,7 +113,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.compare.CompareEditorInput#contentsCreated()
*/
@Override
@@ -172,7 +172,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.compare.CompareEditorInput#handleDispose()
*/
@Override
@@ -204,7 +204,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
((IDisposable) getCompareResult()).dispose();
}
}
-
+
private String[] getLabels() {
IResource leftResource = getResource(fLeftElement);
IResource rightResource = getResource(fRightElement);
@@ -225,7 +225,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
}
return new String[] { fLeftElement.getName(), fRightElement.getName() };
}
-
+
@Override
public String getToolTipText() {
String[] labels = getLabels();
@@ -251,7 +251,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
/**
* Return the compare input of this editor input.
- *
+ *
* @return the compare input of this editor input
*/
protected final ICompareInput getCompareInput() {
@@ -307,7 +307,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.ISaveablesSource#getActiveSaveables()
*/
@Override
@@ -319,7 +319,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.ISaveablesSource#getSaveables()
*/
@Override
@@ -329,7 +329,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.compare.CompareEditorInput#findContentViewer(org.eclipse.
* jface.viewers.Viewer,
@@ -377,7 +377,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
* current editor input {@link CompareEditorInput#isSaveNeeded()} is called.
* <p>
* This method is preferred to {@link CompareEditorInput#isSaveNeeded()}.
- *
+ *
* @param the
* the saveable to check
* @return <code>true</code> if there are changes that need to be saved
@@ -422,7 +422,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
/**
* Close the editor if it is not dirty. If it is still dirty, let the
* content merge viewer handle the compare input change.
- *
+ *
* @param checkForUnsavedChanges
* whether to check for unsaved changes
* @return <code>true</code> if the editor was closed (note that the close
@@ -458,7 +458,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
* this class delegates the creation of the compare input to the
* {@link #prepareCompareInput(IProgressMonitor)} method which subclasses
* must implement.
- *
+ *
* @see org.eclipse.compare.CompareEditorInput#prepareInput(org.eclipse.core.runtime.IProgressMonitor)
*/
@Override
@@ -474,7 +474,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
/**
* Method called from {@link #prepareInput(IProgressMonitor)} to obtain the input. Its purpose
* is to ensure that the input is an instance of {@link ICompareInput}.
- *
+ *
* @param monitor a progress monitor
* @return the compare input
* @throws InvocationTargetException
@@ -612,7 +612,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.compare.CompareEditorInput#addCompareInputChangeListener(
* org.eclipse.compare.structuremergeviewer.ICompareInput,
@@ -630,7 +630,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.compare.CompareEditorInput#removeCompareInputChangeListener
* (org.eclipse.compare.structuremergeviewer.ICompareInput,
@@ -669,7 +669,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.compare.CompareEditorInput#getTitleImage()
*/
@Override
@@ -685,7 +685,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.IEditorInput#getImageDescriptor()
*/
@Override
@@ -695,7 +695,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.compare.CompareEditorInput#canRunAsJob()
*/
@Override
@@ -813,9 +813,9 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
if (!(obj instanceof Saveable))
return false;
-
+
Object document = getAdapter(IDocument.class);
-
+
if (document != null) {
Object otherDocument = ((Saveable) obj)
.getAdapter(IDocument.class);
@@ -854,7 +854,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
submenu2.add(new OpenWithMenu(ws.getPage(), resource) {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.actions.OpenWithMenu#openEditor(org.eclipse.ui.
* IEditorDescriptor, boolean)
*/
@@ -872,7 +872,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
OpenFileAction openFileAction= new OpenFileAction(ws.getPage()) {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.actions.OpenSystemEditorAction#run()
*/
@Override
@@ -893,7 +893,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
/**
* Selects and reveals the given offset and length in the given editor part.
- *
+ *
* @param editor the editor part
* @param offset the offset
* @param length the length
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ScopableSubscriberParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ScopableSubscriberParticipant.java
index c38d9009b..4eabb99e7 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ScopableSubscriberParticipant.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ScopableSubscriberParticipant.java
@@ -19,19 +19,19 @@ import org.eclipse.team.ui.synchronize.*;
* Subscriber participant that supports filtering using scopes.
*/
public abstract class ScopableSubscriberParticipant extends SubscriberParticipant {
-
+
/**
* No arg constructor used to create workspace scope and for
* creation of persisted participant after startup
*/
public ScopableSubscriberParticipant() {
}
-
+
public ScopableSubscriberParticipant(ISynchronizeScope scope) {
super(scope);
}
-
-
+
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant#setSubscriber(org.eclipse.team.core.subscribers.Subscriber)
*/
@@ -48,7 +48,7 @@ public abstract class ScopableSubscriberParticipant extends SubscriberParticipan
setSecondaryId(Long.toString(System.currentTimeMillis()));
}
}
-
+
/**
* Return the descriptor for this participant
* @return the descriptor for this participant
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StartupPreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StartupPreferencePage.java
index 73ca47487..ee2f91d39 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StartupPreferencePage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StartupPreferencePage.java
@@ -23,14 +23,14 @@ public class StartupPreferencePage extends FieldEditorPreferencePage implements
public static final String STARTUP_ACTION_NONE = "none"; //$NON-NLS-1$
public static final String STARTUP_ACTION_POPULATE = "populate"; //$NON-NLS-1$
public static final String STARTUP_ACTION_SYNCHRONIZE = "synchronize"; //$NON-NLS-1$
-
+
// Property used to make preferences available in the page configuration
public static final String STARTUP_PREFERENCES = "org.eclipse.team.ui.startupPreferences"; //$NON-NLS-1$
-
+
public StartupPreferencePage(IPreferenceStore store) {
super(GRID);
- setTitle(TeamUIMessages.StartupPreferencePage_0);
- setDescription(TeamUIMessages.StartupPreferencePage_1);
+ setTitle(TeamUIMessages.StartupPreferencePage_0);
+ setDescription(TeamUIMessages.StartupPreferencePage_1);
setPreferenceStore(store);
}
@@ -38,7 +38,7 @@ public class StartupPreferencePage extends FieldEditorPreferencePage implements
public void init(IWorkbench workbench) {
// Nothing to do
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
@@ -51,13 +51,13 @@ public class StartupPreferencePage extends FieldEditorPreferencePage implements
@Override
protected void createFieldEditors() {
- addField(new RadioGroupFieldEditor(PROP_STARTUP_ACTION,
- TeamUIMessages.StartupPreferencePage_2, 1,
+ addField(new RadioGroupFieldEditor(PROP_STARTUP_ACTION,
+ TeamUIMessages.StartupPreferencePage_2, 1,
new String[][] {
- {TeamUIMessages.StartupPreferencePage_3, STARTUP_ACTION_POPULATE},
+ {TeamUIMessages.StartupPreferencePage_3, STARTUP_ACTION_POPULATE},
{TeamUIMessages.StartupPreferencePage_4, STARTUP_ACTION_SYNCHRONIZE},
{TeamUIMessages.StartupPreferencePage_5, STARTUP_ACTION_NONE}
- },
+ },
getFieldEditorParent(), true /* use a group */));
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java
index 0d8508ed5..c3cc15e00 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java
@@ -27,11 +27,11 @@ import org.eclipse.ui.actions.ActionGroup;
/**
* A <code>StructuredViewerAdvisor</code> controls various UI
- * aspects of viewers that show {@link SyncInfoSet} like the context menu, toolbar,
- * content provider, label provider, navigation, and model provider. The
+ * aspects of viewers that show {@link SyncInfoSet} like the context menu, toolbar,
+ * content provider, label provider, navigation, and model provider. The
* advisor allows decoupling viewer behavior from the viewers presentation. This
* allows viewers that aren't in the same class hierarchy to re-use basic
- * behavior.
+ * behavior.
* <p>
* This advisor allows viewer contributions made in a plug-in manifest to
* be scoped to a particular unique id. As a result the context menu for the
@@ -42,26 +42,26 @@ import org.eclipse.ui.actions.ActionGroup;
* <li>Create a viewer contribution with a <code>targetID</code> that groups
* sets of actions that are related. A common practice for synchronize view
* configurations is to use the participant id as the targetID.
- *
+ *
* <pre>
* &lt;viewerContribution
* id=&quot;org.eclipse.team.ccvs.ui.CVSCompareSubscriberContributions&quot;
* targetID=&quot;org.eclipse.team.cvs.ui.compare-participant&quot;&gt;
* ...
* </pre>
- *
+ *
* <li>Create a configuration instance with a <code>menuID</code> that
* matches the targetID in the viewer contribution.
* </ul>
* </p><p>
* Clients may subclass to add behavior for concrete structured viewers.
* </p>
- *
+ *
* @see TreeViewerAdvisor
* @since 3.0
*/
public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
-
+
// Property change listener which responds to:
// - working set selection by the user
// - decorator format change selected by the user
@@ -83,17 +83,17 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
* Create an advisor that will allow viewer contributions with the given <code>targetID</code>. This
* advisor will provide a presentation model based on the given sync info set. The model is disposed
* when the viewer is disposed.
- *
+ *
* @param configuration
*/
public StructuredViewerAdvisor(ISynchronizePageConfiguration configuration) {
super(configuration);
}
-
+
/**
* Install a viewer to be configured with this advisor. An advisor can only be installed with
* one viewer at a time. When this method completes the viewer is considered initialized and
- * can be shown to the user.
+ * can be shown to the user.
* @param viewer the viewer being installed
*/
@Override
@@ -102,7 +102,7 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
initializeListeners(viewer);
hookContextMenu(viewer);
}
-
+
/**
* Must be called when an advisor is no longer needed.
*/
@@ -114,7 +114,7 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
statusLine.dispose();
TeamUIPlugin.getPlugin().getPreferenceStore().removePropertyChangeListener(propertyListener);
}
-
+
/**
* Method invoked from <code>initializeViewer(Composite, StructuredViewer)</code>
* in order to initialize any listeners for the viewer.
@@ -170,7 +170,7 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
});
TeamUIPlugin.getPlugin().getPreferenceStore().addPropertyChangeListener(propertyListener);
}
-
+
/**
* Handles a double-click event. If <code>false</code> is returned,
* subclasses may handle the double click.
@@ -189,7 +189,7 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
}
return false;
}
-
+
private void handleOpen() {
Object o = getConfiguration().getProperty(SynchronizePageConfiguration.P_OPEN_ACTION);
if (o instanceof IAction) {
@@ -197,7 +197,7 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
action.run();
}
}
-
+
/**
* Method invoked from the synchronize page when the action
* bars are set. The advisor uses the configuration to determine
@@ -209,7 +209,7 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
public final void setActionBars(IActionBars actionBars) {
if(actionBars != null) {
IToolBarManager manager = actionBars.getToolBarManager();
-
+
// Populate the toolbar menu with the configured groups
Object o = getConfiguration().getProperty(ISynchronizePageConfiguration.P_TOOLBAR_MENU);
if (!(o instanceof String[])) {
@@ -239,18 +239,18 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
menu.add(new Separator(getGroupId(group)));
}
}
-
+
fillActionBars(actionBars);
- }
+ }
}
-
+
/**
* Initialize the status line
* @param actionBars the action bars
*/
protected void initializeStatusLine(IActionBars actionBars) {
statusLine = new DiffTreeStatusLineContributionGroup(
- getConfiguration().getSite().getShell(),
+ getConfiguration().getSite().getShell(),
getConfiguration());
IStatusLineManager statusLineMgr = actionBars.getStatusLineManager();
if (statusLineMgr != null && statusLine != null) {
@@ -262,14 +262,14 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
* Method invoked from <code>initializeViewer(StructuredViewer)</code>
* in order to configure the viewer to call <code>fillContextMenu(StructuredViewer, IMenuManager)</code>
* when a context menu is being displayed in viewer.
- *
+ *
* @param viewer the viewer being initialized
* @see fillContextMenu(StructuredViewer, IMenuManager)
*/
private void hookContextMenu(final StructuredViewer viewer) {
String targetID = getContextMenuId(viewer);
- final MenuManager menuMgr = createContextMenuManager(targetID);
-
+ final MenuManager menuMgr = createContextMenuManager(targetID);
+
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
@Override
@@ -279,11 +279,11 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
});
Menu menu = menuMgr.createContextMenu(viewer.getControl());
menu.addMenuListener(new MenuListener() {
-
+
@Override
public void menuHidden(MenuEvent e) {
}
-
+
// Hack to allow action contributions to update their
// state before the menu is shown. This is required when
// the state of the selection changes and the contributions
@@ -351,13 +351,13 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
}
return targetID;
}
-
+
/**
* Callback that is invoked when a context menu is about to be shown in the
* viewer. Subclasses must implement to contribute menus. Also, menus can
- * contributed by creating a viewer contribution with a <code>targetID</code>
+ * contributed by creating a viewer contribution with a <code>targetID</code>
* that groups sets of actions that are related.
- *
+ *
* @param viewer the viewer in which the context menu is being shown.
* @param manager the menu manager to which actions can be added.
*/
@@ -384,7 +384,7 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
manager.add(new Separator(group));
}
}
-
+
/**
* Invoked once when the action bars are set.
* @param actionBars the action bars
@@ -397,7 +397,7 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
getActionGroup().modelChanged((ISynchronizeModelElement) input);
}
}
-
+
/**
* Invoked each time the selection in the view changes in order
* to update the action bars.
@@ -410,11 +410,11 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
group.updateActionBars();
}
}
-
+
protected SynchronizePageActionGroup getActionGroup() {
return (SynchronizePageActionGroup)getConfiguration();
}
-
+
private String getGroupId(String group) {
return ((SynchronizePageConfiguration)getConfiguration()).getGroupId(group);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantPage.java
index 67aa93c95..549dd61b3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantPage.java
@@ -21,20 +21,20 @@ import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
import org.eclipse.team.ui.synchronize.SubscriberParticipant;
/**
- * A synchronize view page that works with participants that are subclasses of
+ * A synchronize view page that works with participants that are subclasses of
* {@link SubscriberParticipant}. It shows changes in the tree or table view
* and supports navigation, opening, and filtering changes.
* <p>
- * Clients can subclass to extend the label decoration or add action bar
+ * Clients can subclass to extend the label decoration or add action bar
* contributions. For more extensive modifications, clients should create
* their own custom page.
- * </p>
+ * </p>
* @since 3.0
*/
public final class SubscriberParticipantPage extends AbstractSynchronizePage {
-
+
private SubscriberParticipant participant;
-
+
private final static int[] INCOMING_MODE_FILTER = new int[] {SyncInfo.CONFLICTING, SyncInfo.INCOMING};
private final static int[] OUTGOING_MODE_FILTER = new int[] {SyncInfo.CONFLICTING, SyncInfo.OUTGOING};
private final static int[] BOTH_MODE_FILTER = new int[] {SyncInfo.CONFLICTING, SyncInfo.INCOMING, SyncInfo.OUTGOING};
@@ -44,10 +44,10 @@ public final class SubscriberParticipantPage extends AbstractSynchronizePage {
* Filters out-of-sync resources by working set and mode
*/
private WorkingSetFilteredSyncInfoCollector collector;
-
+
/**
* Constructs a new SynchronizeView.
- *
+ *
* @param configuration
* a synchronize page configuration
* @param subscriberCollector
@@ -56,14 +56,14 @@ public final class SubscriberParticipantPage extends AbstractSynchronizePage {
public SubscriberParticipantPage(ISynchronizePageConfiguration configuration, SubscriberSyncInfoCollector subscriberCollector) {
super(configuration);
this.participant = (SubscriberParticipant)configuration.getParticipant();
- configuration.setComparisonType(isThreeWay()
- ? ISynchronizePageConfiguration.THREE_WAY
+ configuration.setComparisonType(isThreeWay()
+ ? ISynchronizePageConfiguration.THREE_WAY
: ISynchronizePageConfiguration.TWO_WAY);
configuration.addActionContribution(new DefaultSynchronizePageActions());
configuration.addActionContribution(new SubscriberActionContribution());
initializeCollector(configuration, subscriberCollector);
}
-
+
/**
* @return Returns the participant.
*/
@@ -75,7 +75,7 @@ public final class SubscriberParticipantPage extends AbstractSynchronizePage {
protected AbstractViewerAdvisor createViewerAdvisor(Composite parent) {
return new TreeViewerAdvisor(parent, getConfiguration());
}
-
+
/*
* This method is invoked from <code>setMode</code> when the mode has changed.
* It sets the filter on the collector to show the <code>SyncInfo</code>
@@ -86,8 +86,8 @@ public final class SubscriberParticipantPage extends AbstractSynchronizePage {
*/
@Override
protected void updateMode(int mode) {
- if(collector != null && isThreeWay()) {
-
+ if(collector != null && isThreeWay()) {
+
int[] modeFilter = BOTH_MODE_FILTER;
switch(mode) {
case ISynchronizePageConfiguration.INCOMING_MODE:
@@ -107,7 +107,7 @@ public final class SubscriberParticipantPage extends AbstractSynchronizePage {
}));
}
}
-
+
private void initializeCollector(ISynchronizePageConfiguration configuration, SubscriberSyncInfoCollector subscriberCollector) {
SubscriberParticipant participant = getParticipant();
collector = new WorkingSetFilteredSyncInfoCollector(subscriberCollector, participant.getSubscriber().roots());
@@ -116,7 +116,7 @@ public final class SubscriberParticipantPage extends AbstractSynchronizePage {
configuration.setProperty(ISynchronizePageConfiguration.P_SYNC_INFO_SET, collector.getSyncInfoTree());
configuration.setProperty(SynchronizePageConfiguration.P_WORKING_SET_SYNC_INFO_SET, collector.getWorkingSetSyncInfoSet());
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SyncInfoSetSynchronizePage#isThreeWay()
*/
@@ -131,7 +131,7 @@ public final class SubscriberParticipantPage extends AbstractSynchronizePage {
public void reset() {
getParticipant().reset();
}
-
+
/*
* Provide internal access to the collector
* @return Returns the collector.
@@ -139,13 +139,13 @@ public final class SubscriberParticipantPage extends AbstractSynchronizePage {
public WorkingSetFilteredSyncInfoCollector getCollector() {
return collector;
}
-
+
@Override
public void dispose() {
super.dispose();
collector.dispose();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizePage#createChangesSection(org.eclipse.swt.widgets.Composite)
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java
index d02715b24..805a33fb5 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java
@@ -26,42 +26,42 @@ import com.ibm.icu.util.Calendar;
/**
* Schedule to refresh a subscriber at a specified interval. The schedule can be disabled or enabled
* and will create the refresh job.
- *
+ *
* @since 3.0
*/
public class SubscriberRefreshSchedule {
private long refreshInterval = 3600; // 1 hour default
private Date refreshStart;
private boolean runOnce = false;
-
+
private boolean enabled = false;
-
+
private RefreshParticipantJob job;
-
+
private IRefreshable refreshable;
-
+
private IRefreshEvent lastRefreshEvent;
-
+
/**
* Key for settings in memento
*/
private static final String CTX_REFRESHSCHEDULE_INTERVAL = TeamUIPlugin.ID + ".CTX_REFRESHSCHEDULE_INTERVAL"; //$NON-NLS-1$
-
+
/**
* Key for schedule in memento
*/
private static final String CTX_REFRESHSCHEDULE_ENABLED = TeamUIPlugin.ID + ".CTX_REFRESHSCHEDULE_ENABLED"; //$NON-NLS-1$
-
+
/**
* Key for start date in memento
*/
private static final String CTX_REFRESHSCHEDULE_START = TeamUIPlugin.ID + ".CTX_REFRESHSCHEDULE_START"; //$NON-NLS-1$
-
+
/**
* Key for run once in memento
*/
private static final String CTX_REFRESHSCHEDULE_RUNONCE = TeamUIPlugin.ID + ".CTX_REFRESHSCHEDULE_RUNONCE"; //$NON-NLS-1$
-
+
private IRefreshSubscriberListener refreshSubscriberListener = new IRefreshSubscriberListener() {
@Override
public void refreshStarted(IRefreshEvent event) {
@@ -81,12 +81,12 @@ public class SubscriberRefreshSchedule {
return (IRefreshable)Utils.getAdapter(participant, IRefreshable.class);
}
};
-
-
+
+
public SubscriberRefreshSchedule(IRefreshable refreshable) {
this.refreshable = refreshable;
RefreshParticipantJob.addRefreshListener(refreshSubscriberListener);
-
+
// Calendar cal = Calendar.getInstance();
// cal.clear();
// refreshStart = cal.getTime();
@@ -106,7 +106,7 @@ public class SubscriberRefreshSchedule {
public void setEnabled(boolean enabled, boolean allowedToStart) {
boolean wasEnabled = isEnabled();
this.enabled = enabled;
- if(enabled && ! wasEnabled) {
+ if(enabled && ! wasEnabled) {
if(allowedToStart) {
startJob();
}
@@ -114,7 +114,7 @@ public class SubscriberRefreshSchedule {
stopJob();
}
}
-
+
/**
* @return Returns the refreshInterval in seconds.
*/
@@ -125,7 +125,7 @@ public class SubscriberRefreshSchedule {
public ISynchronizeParticipant getParticipant() {
return refreshable.getParticipant();
}
-
+
/**
* @param refreshInterval The refreshInterval to set.
*/
@@ -139,7 +139,7 @@ public class SubscriberRefreshSchedule {
}
}
}
-
+
public void startJob() {
if(job == null) {
job = refreshable.createJob(getRefreshIntervalAsString());
@@ -169,7 +169,7 @@ public class SubscriberRefreshSchedule {
}
return start.getTimeInMillis() - now.getTimeInMillis();
}
-
+
protected void stopJob() {
if(job != null) {
job.setRestartOnCancel(false /* don't restart the job */);
@@ -183,7 +183,7 @@ public class SubscriberRefreshSchedule {
stopJob();
RefreshParticipantJob.removeRefreshListener(refreshSubscriberListener);
}
-
+
public void saveState(IMemento memento) {
memento.putString(CTX_REFRESHSCHEDULE_ENABLED, Boolean.toString(enabled));
memento.putInteger(CTX_REFRESHSCHEDULE_INTERVAL, (int)refreshInterval);
@@ -213,31 +213,31 @@ public class SubscriberRefreshSchedule {
public static String refreshEventAsString(IRefreshEvent event) {
if(event == null) {
- return TeamUIMessages.SyncViewPreferencePage_lastRefreshRunNever;
+ return TeamUIMessages.SyncViewPreferencePage_lastRefreshRunNever;
}
long stopMills = event.getStopTime();
StringBuffer text = new StringBuffer();
if(stopMills <= 0) {
- text.append(TeamUIMessages.SyncViewPreferencePage_lastRefreshRunNever);
+ text.append(TeamUIMessages.SyncViewPreferencePage_lastRefreshRunNever);
} else {
Date lastTimeRun = new Date(stopMills);
text.append(DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT).format(lastTimeRun));
}
int changeCount = event.getChangeDescription().getChangeCount();
if (changeCount == 0) {
- text.append(TeamUIMessages.RefreshSchedule_7);
+ text.append(TeamUIMessages.RefreshSchedule_7);
} else if (changeCount == 1) {
- text.append(NLS.bind(TeamUIMessages.RefreshSchedule_changesSingular, new String[] { Integer.toString(changeCount) }));
+ text.append(NLS.bind(TeamUIMessages.RefreshSchedule_changesSingular, new String[] { Integer.toString(changeCount) }));
} else {
- text.append(NLS.bind(TeamUIMessages.RefreshSchedule_changesPlural, new String[] { Integer.toString(changeCount) }));
+ text.append(NLS.bind(TeamUIMessages.RefreshSchedule_changesPlural, new String[] { Integer.toString(changeCount) }));
}
return text.toString();
- }
-
+ }
+
public IRefreshEvent getLastRefreshEvent() {
return lastRefreshEvent;
}
-
+
private String getRefreshIntervalAsString() {
if (runOnce)
return TeamUIMessages.RefreshSchedule_16;
@@ -246,18 +246,18 @@ public class SubscriberRefreshSchedule {
if(seconds <= 60) {
seconds = 60;
}
- long minutes = seconds / 60;
+ long minutes = seconds / 60;
if(minutes >= 60) {
minutes = minutes / 60;
hours = true;
- }
+ }
String unit;
if(minutes >= 1) {
- unit = (hours ? TeamUIMessages.RefreshSchedule_9 : TeamUIMessages.RefreshSchedule_10);
+ unit = (hours ? TeamUIMessages.RefreshSchedule_9 : TeamUIMessages.RefreshSchedule_10);
} else {
- unit = (hours ? TeamUIMessages.RefreshSchedule_11 : TeamUIMessages.RefreshSchedule_12);
+ unit = (hours ? TeamUIMessages.RefreshSchedule_11 : TeamUIMessages.RefreshSchedule_12);
}
- return NLS.bind(TeamUIMessages.RefreshSchedule_13, new String[] { Long.toString(minutes), unit });
+ return NLS.bind(TeamUIMessages.RefreshSchedule_13, new String[] { Long.toString(minutes), unit });
}
public IRefreshable getRefreshable() {
@@ -271,7 +271,7 @@ public class SubscriberRefreshSchedule {
public Date getRefreshStartTime() {
return refreshStart;
}
-
+
public void setRefreshStartTime(Date refreshStart) {
if(refreshStart==null || refreshStart != getRefreshStartTime()) {
stopJob();
@@ -281,7 +281,7 @@ public class SubscriberRefreshSchedule {
}
}
}
-
+
/**
* @return Return <code>false</code> if the job should be run again when
* finished, or <code>true</code> otherwise.
@@ -289,7 +289,7 @@ public class SubscriberRefreshSchedule {
public boolean getRunOnce() {
return runOnce;
}
-
+
public void setRunOnce(boolean runOnce) {
if (runOnce != getRunOnce()) {
stopJob();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoModelElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoModelElement.java
index 8a69bfae3..2bb763807 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoModelElement.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoModelElement.java
@@ -35,46 +35,46 @@ import org.eclipse.team.internal.ui.TeamUIPlugin;
* @see Differencer
*/
public class SyncInfoModelElement extends SynchronizeModelElement {
-
+
private ITypedElement ancestor;
private SyncInfo info;
-
+
/**
* Construct a <code>SyncInfoModelElement</code> for the given resource.
- *
- * @param parent
- * @param info
+ *
+ * @param parent
+ * @param info
*/
public SyncInfoModelElement(IDiffContainer parent, SyncInfo info) {
super(parent);
-
+
Assert.isNotNull(info);
this.info = info;
// update state
- setKind(info.getKind());
+ setKind(info.getKind());
// local
setLeft(createLocalTypeElement(info));
// remote
- setRight(createRemoteTypeElement(info));
+ setRight(createRemoteTypeElement(info));
// base
setAncestor(createBaseTypeElement(info));
-
+
fireChange();
}
/**
* Update this element with a changed sync info. The remote and base handles have to be updated
* with the new handles in the sync info.
- *
+ *
* @param info the new sync info
*/
public void update(SyncInfo info) {
this.info = info;
// update state
- setKind(info.getKind());
-
+ setKind(info.getKind());
+
// Remote
- RemoteResourceTypedElement rightEl = (RemoteResourceTypedElement)getRight();
+ RemoteResourceTypedElement rightEl = (RemoteResourceTypedElement)getRight();
IResourceVariant remote = info.getRemote();
if(rightEl == null && remote != null) {
setRight(createRemoteTypeElement(info));
@@ -86,7 +86,7 @@ public class SyncInfoModelElement extends SynchronizeModelElement {
}
}
// Base
- RemoteResourceTypedElement ancestorEl = (RemoteResourceTypedElement)getAncestor();
+ RemoteResourceTypedElement ancestorEl = (RemoteResourceTypedElement)getAncestor();
IResourceVariant base = info.getBase();
if(ancestorEl == null && base != null) {
setAncestor(createBaseTypeElement(info));
@@ -97,7 +97,7 @@ public class SyncInfoModelElement extends SynchronizeModelElement {
setAncestor(createBaseTypeElement(info));
}
}
-
+
fireChange();
}
@@ -113,7 +113,7 @@ public class SyncInfoModelElement extends SynchronizeModelElement {
return SyncInfo.IN_SYNC;
}
}
-
+
/**
* We have to track the base because <code>DiffNode</code> doesn't provide a
* setter. See:
@@ -123,7 +123,7 @@ public class SyncInfoModelElement extends SynchronizeModelElement {
public void setAncestor(ITypedElement ancestor) {
this.ancestor = ancestor;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.DiffNode#getAncestor()
*/
@@ -131,7 +131,7 @@ public class SyncInfoModelElement extends SynchronizeModelElement {
public ITypedElement getAncestor() {
return this.ancestor;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.DiffNode#getName()
*/
@@ -144,7 +144,7 @@ public class SyncInfoModelElement extends SynchronizeModelElement {
return super.getName();
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
@@ -155,7 +155,7 @@ public class SyncInfoModelElement extends SynchronizeModelElement {
}
return super.getAdapter(adapter);
}
-
+
/**
* Helper method that returns the resource associated with this node. A node is not
* required to have an associated local resource.
@@ -166,7 +166,7 @@ public class SyncInfoModelElement extends SynchronizeModelElement {
public IResource getResource() {
return info.getLocal();
}
-
+
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@@ -174,7 +174,7 @@ public class SyncInfoModelElement extends SynchronizeModelElement {
public String toString() {
return getResource().getFullPath().toString();
}
-
+
/**
* Cache the contents for the base and remote.
* @param monitor
@@ -197,7 +197,7 @@ public class SyncInfoModelElement extends SynchronizeModelElement {
monitor.done();
}
}
-
+
public SyncInfo getSyncInfo() {
return info;
}
@@ -212,7 +212,7 @@ public class SyncInfoModelElement extends SynchronizeModelElement {
}
return null;
}
-
+
/**
* Create an ITypedElement for the given remote resource. The contents for the remote resource
* will be retrieved from the given IStorage which is a local cache used to buffer the remote contents
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangeSetCollector.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangeSetCollector.java
index a8c1b6ced..6acc27815 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangeSetCollector.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangeSetCollector.java
@@ -30,14 +30,14 @@ import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
* <p>
* This class does not register as a change listener with the seed set. It
* is up to clients to invoke either the <code>reset</code> or <code>handleChange</code>
- * methods in response to seed set changes.
+ * methods in response to seed set changes.
* @since 3.1
*/
public abstract class SyncInfoSetChangeSetCollector extends ChangeSetManager {
-
+
private final ISynchronizePageConfiguration configuration;
private ChangeSetModelProvider provider;
-
+
/*
* Listener that will remove sets when they become empty.
* The sets in this collector are only modified from either the
@@ -45,7 +45,7 @@ public abstract class SyncInfoSetChangeSetCollector extends ChangeSetManager {
* done by this listener will update the view properly.
*/
ISyncInfoSetChangeListener changeSetListener = new ISyncInfoSetChangeListener() {
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener#syncInfoSetReset(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -69,7 +69,7 @@ public abstract class SyncInfoSetChangeSetCollector extends ChangeSetManager {
public void syncInfoSetErrors(SyncInfoSet set, ITeamStatus[] errors, IProgressMonitor monitor) {
// TODO Auto-generated method stub
}
-
+
/*
* The collector removes change sets once they are empty
*/
@@ -95,11 +95,11 @@ public abstract class SyncInfoSetChangeSetCollector extends ChangeSetManager {
/**
* Add the given resource sync info nodes to the appropriate
* change sets, adding them if necessary.
- * This method is invoked by the <code>handleChanges</code>
- * and <code>reset</code> methods
+ * This method is invoked by the <code>handleChanges</code>
+ * and <code>reset</code> methods
* when the model provider changes state. Updates done to the collector
* from within this thread will be thread-safe and update the view
- * properly. Updates done from other threads should perform adds
+ * properly. Updates done from other threads should perform adds
* within a runnable passed to the
* <code>performUpdate</code> method to ensure the view is
* updated properly.
@@ -115,8 +115,8 @@ public abstract class SyncInfoSetChangeSetCollector extends ChangeSetManager {
* when the model provider changes state. It should not
* be invoked by other clients. The model provider
* will invoke this method from a particular thread (which may
- * or may not be the UI thread).
- * Updates done from other threads should perform removes
+ * or may not be the UI thread).
+ * Updates done from other threads should perform removes
* within a runnable passed to the
* <code>performUpdate</code> method to ensure the view is
* updated properly.
@@ -138,7 +138,7 @@ public abstract class SyncInfoSetChangeSetCollector extends ChangeSetManager {
protected ISyncInfoSetChangeListener getChangeSetChangeListener() {
return changeSetListener;
}
-
+
/**
* Re-populate the change sets from the seed set.
* If <code>null</code> is passed, clear any state
@@ -150,12 +150,12 @@ public abstract class SyncInfoSetChangeSetCollector extends ChangeSetManager {
* will invoke this method from a particular thread (which may
* or may not be the UI thread). Updates done to the collector
* from within this thread will be thread-safe and update the view
- * properly. Updates done from other threads should use the
+ * properly. Updates done from other threads should use the
* <code>performUpdate</code> method to ensure the view is
* updated properly.
* <p>
* Subclasses may override this method.
- * @param seedSet
+ * @param seedSet
*/
public void reset(SyncInfoSet seedSet) {
// First, remove all the sets
@@ -176,7 +176,7 @@ public abstract class SyncInfoSetChangeSetCollector extends ChangeSetManager {
* will invoke this method from a particular thread (which may
* or may not be the UI thread). Updates done to the collector
* from within this thread will be thread-safe and update the view
- * properly. Updates done from other threads should use the
+ * properly. Updates done from other threads should use the
* <code>performUpdate</code> method to ensure the view is
* updated properly.
* <p>
@@ -201,24 +201,24 @@ public abstract class SyncInfoSetChangeSetCollector extends ChangeSetManager {
add((SyncInfo[]) additions.toArray(new SyncInfo[additions.size()]));
}
}
-
+
/**
- * Return the configuration for the page that is displaying the model created
+ * Return the configuration for the page that is displaying the model created
* using this collector.
- * @return the configuration for the page that is displaying the model created
+ * @return the configuration for the page that is displaying the model created
* using this collector
*/
public final ISynchronizePageConfiguration getConfiguration() {
return configuration;
}
-
+
/**
* Execute the given runnable which updates the sync sets contained
- * in this collector. This method should be used by subclasses when they
+ * in this collector. This method should be used by subclasses when they
* are populating or modifying sets from another thread. In other words,
* if the sets of this collector are updated directly in the <code>add</code>
* method then this method is not required. However, if sets are created
- * or modified by another thread, that thread must use this method to ensure
+ * or modified by another thread, that thread must use this method to ensure
* the updates occur in the proper thread in order to ensure thread safety.
* <p>
* The update may be run in a different thread then the caller.
@@ -232,7 +232,7 @@ public abstract class SyncInfoSetChangeSetCollector extends ChangeSetManager {
protected final void performUpdate(IWorkspaceRunnable runnable, boolean preserveExpansion, IProgressMonitor monitor) {
provider.performUpdate(runnable, preserveExpansion, false /* run in the handler thread and refresh at the end */);
}
-
+
/* (non-javadoc)
* Sets the provider for this collector. This method is for internal use only.
*/
@@ -249,19 +249,19 @@ public abstract class SyncInfoSetChangeSetCollector extends ChangeSetManager {
public void waitUntilDone(IProgressMonitor monitor) {
// Do nothing, by default
}
-
+
@Override
protected void handleSetAdded(ChangeSet set) {
((CheckedInChangeSet)set).getSyncInfoSet().addSyncSetChangedListener(getChangeSetChangeListener());
super.handleSetAdded(set);
}
-
+
@Override
protected void handleSetRemoved(ChangeSet set) {
((CheckedInChangeSet)set).getSyncInfoSet().removeSyncSetChangedListener(getChangeSetChangeListener());
super.handleSetRemoved(set);
}
-
+
/**
* Return the Change Set whose sync info set is the
* one given.
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangesSection.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangesSection.java
index 6e0d4cc8b..b33f22554 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangesSection.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangesSection.java
@@ -29,11 +29,11 @@ import org.eclipse.ui.forms.widgets.Hyperlink;
/**
* Section shown in a participant page to show the changes for this participant. This
* includes a diff viewer for browsing the changes.
- *
+ *
* @since 3.0
*/
public class SyncInfoSetChangesSection extends ForwardingChangesSection {
-
+
/**
* Boolean that indicates whether the error page is being shown.
* This is used to avoid redrawing the error page when new events come in
@@ -50,7 +50,7 @@ public class SyncInfoSetChangesSection extends ForwardingChangesSection {
calculateDescription();
}
};
-
+
/**
* Listener registered with the subscriber sync info set which contains
* all out-of-sync resources for the subscriber.
@@ -69,10 +69,10 @@ public class SyncInfoSetChangesSection extends ForwardingChangesSection {
// Handled by output set listener
}
};
-
+
/**
* Listener registered with the output sync info set which contains
- * only the visible sync info.
+ * only the visible sync info.
*/
private ISyncInfoSetChangeListener outputSetListener = new ISyncInfoSetChangeListener() {
@Override
@@ -89,10 +89,10 @@ public class SyncInfoSetChangesSection extends ForwardingChangesSection {
calculateDescription();
}
};
-
+
/**
* Create a changes section on the following page.
- *
+ *
* @param parent the parent control
* @param page the page showing this section
* @param configuration the configuration for the synchronize page
@@ -100,7 +100,7 @@ public class SyncInfoSetChangesSection extends ForwardingChangesSection {
public SyncInfoSetChangesSection(Composite parent, AbstractSynchronizePage page, ISynchronizePageConfiguration configuration) {
super(parent, page, configuration);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.ChangesSection#initializeChangesViewer()
*/
@@ -111,7 +111,7 @@ public class SyncInfoSetChangesSection extends ForwardingChangesSection {
getParticipantSyncInfoSet().addSyncSetChangedListener(subscriberListener);
getVisibleSyncInfoSet().addSyncSetChangedListener(outputSetListener);
}
-
+
@Override
protected void calculateDescription() {
SyncInfoTree syncInfoTree = getVisibleSyncInfoSet();
@@ -127,7 +127,7 @@ public class SyncInfoSetChangesSection extends ForwardingChangesSection {
}
return;
}
-
+
showingError = false;
super.calculateDescription();
}
@@ -144,7 +144,7 @@ public class SyncInfoSetChangesSection extends ForwardingChangesSection {
numChanges = participantSet.countFor(SyncInfo.INCOMING, SyncInfo.DIRECTION_MASK);
break;
case ISynchronizePageConfiguration.BOTH_MODE:
- numChanges = participantSet.countFor(SyncInfo.INCOMING, SyncInfo.DIRECTION_MASK)
+ numChanges = participantSet.countFor(SyncInfo.INCOMING, SyncInfo.DIRECTION_MASK)
+ participantSet.countFor(SyncInfo.OUTGOING, SyncInfo.DIRECTION_MASK);
break;
default:
@@ -153,7 +153,7 @@ public class SyncInfoSetChangesSection extends ForwardingChangesSection {
}
return numChanges;
}
-
+
/*
* Return the candidate mode based on the presence of unfiltered changes
* and the modes supported by the page.
@@ -182,7 +182,7 @@ public class SyncInfoSetChangesSection extends ForwardingChangesSection {
}
return configuration.getMode();
}
-
+
@Override
public void dispose() {
super.dispose();
@@ -190,7 +190,7 @@ public class SyncInfoSetChangesSection extends ForwardingChangesSection {
getParticipantSyncInfoSet().removeSyncSetChangedListener(subscriberListener);
getVisibleSyncInfoSet().removeSyncSetChangedListener(outputSetListener);
}
-
+
private Composite getErrorComposite(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
composite.setBackground(getListBackgroundColor());
@@ -199,10 +199,10 @@ public class SyncInfoSetChangesSection extends ForwardingChangesSection {
composite.setLayout(layout);
GridData data = new GridData(GridData.FILL_BOTH);
data.grabExcessVerticalSpace = true;
- composite.setLayoutData(data);
+ composite.setLayoutData(data);
Hyperlink link = new Hyperlink(composite, SWT.WRAP);
- link.setText(TeamUIMessages.ChangesSection_8);
+ link.setText(TeamUIMessages.ChangesSection_8);
link.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
@@ -211,9 +211,9 @@ public class SyncInfoSetChangesSection extends ForwardingChangesSection {
});
link.setBackground(getListBackgroundColor());
link.setUnderlined(true);
-
+
link = new Hyperlink(composite, SWT.WRAP);
- link.setText(TeamUIMessages.ChangesSection_9);
+ link.setText(TeamUIMessages.ChangesSection_9);
link.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
@@ -222,40 +222,40 @@ public class SyncInfoSetChangesSection extends ForwardingChangesSection {
});
link.setBackground(getListBackgroundColor());
link.setUnderlined(true);
-
- createDescriptionLabel(composite, NLS.bind(TeamUIMessages.ChangesSection_10, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName()) }));
+
+ createDescriptionLabel(composite, NLS.bind(TeamUIMessages.ChangesSection_10, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName()) }));
return composite;
}
-
+
/* private */ void showErrors() {
ITeamStatus[] status = getVisibleSyncInfoSet().getErrors();
- String title = TeamUIMessages.ChangesSection_11;
+ String title = TeamUIMessages.ChangesSection_11;
if (status.length == 1) {
ErrorDialog.openError(getShell(), title, status[0].getMessage(), status[0]);
} else {
- MultiStatus multi = new MultiStatus(TeamUIPlugin.ID, 0, status, TeamUIMessages.ChangesSection_12, null);
+ MultiStatus multi = new MultiStatus(TeamUIPlugin.ID, 0, status, TeamUIMessages.ChangesSection_12, null);
ErrorDialog.openError(getShell(), title, null, multi);
}
}
-
+
@Override
protected int getChangesCount() {
return getParticipantSyncInfoSet().size();
}
-
+
@Override
protected long getVisibleChangesCount() {
return getVisibleSyncInfoSet().size();
}
-
+
/*
* Return the sync info set that contains the visible resources
*/
private SyncInfoTree getVisibleSyncInfoSet() {
return (SyncInfoTree)getConfiguration().getProperty(ISynchronizePageConfiguration.P_SYNC_INFO_SET);
}
-
+
/*
* Return the sync info set for the participant that contains all the resources
* including those that may not be visible due to filters (e.g. mode)
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
index bb17d635b..82abace0c 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
@@ -32,7 +32,7 @@ import org.eclipse.ui.*;
* A participant is defined in a plugin manifest and can have several properties:
* - static: means that they always exist and don't have to be added to the manager
* - dynamic: will be added to the manager at some later time
- *
+ *
* Part (title, id, icon, composite) - described in plugin.xml (IPartInstance)
* Can have multiple parts of the same type at runtime -> (IPart)
* - must acquire a part (IPartInstance.createPart())
@@ -40,16 +40,16 @@ import org.eclipse.ui.*;
* Some parts can added dynamically to the registry and events are fired to listeners. Listeners can create the newly added part via
* the #createPart() method.
* Parts can be persisted/restored with some state
- *
- *
- *
+ *
+ *
+ *
* Lifecycle:
* startup -> registry read and stored in a participant instance
- * createParticipant(id) ->
- * releaseParticipant(IParticipantDescriptor) ->
+ * createParticipant(id) ->
+ * releaseParticipant(IParticipantDescriptor) ->
* getParticipantRegistry -> return IParticipantDescriptors that describe the participants
* shutdown -> persist all settings
- *
+ *
* @see ISynchronizeView
* @see ISynchronizeParticipant
* @since 3.0
@@ -59,17 +59,17 @@ public class SynchronizeManager implements ISynchronizeManager {
* Synchronize participants listeners
*/
private ListenerList fListeners = null;
-
+
/**
* Contains the participant descriptions
*/
private SynchronizeParticipantRegistry participantRegistry = new SynchronizeParticipantRegistry();
-
+
/**
* Contains the synchronize wizard descriptions
*/
private SynchronizeWizardRegistry wizardRegistry = new SynchronizeWizardRegistry();
-
+
/**
* Contains a table of the state saved between sessions for a participant. The set is keyed
* as such {String key -> ISynchronizeParticipantReference}.
@@ -100,7 +100,7 @@ public class SynchronizeManager implements ISynchronizeManager {
@Override
public void handleException(Throwable exception) {
- TeamUIPlugin.log(IStatus.ERROR, TeamUIMessages.SynchronizeManager_7, exception);
+ TeamUIPlugin.log(IStatus.ERROR, TeamUIMessages.SynchronizeManager_7, exception);
}
@Override
@@ -147,7 +147,7 @@ public class SynchronizeManager implements ISynchronizeManager {
private String secondaryId;
private String displayName;
private boolean dead;
-
+
public ParticipantInstance(SynchronizeParticipantDescriptor descriptor, String secondaryId, String displayName, IMemento savedState) {
this.participants = new HashMap();
this.secondaryId = secondaryId;
@@ -155,7 +155,7 @@ public class SynchronizeManager implements ISynchronizeManager {
this.descriptor = descriptor;
this.displayName = displayName;
}
-
+
public void save(IMemento memento) {
if (dead) return;
String key = Utils.getKey(descriptor.getId(), getSecondaryId());
@@ -166,7 +166,7 @@ public class SynchronizeManager implements ISynchronizeManager {
memento.putMemento(savedState);
}
}
-
+
@Override
public boolean equals(Object other) {
if(other == this) return true;
@@ -175,7 +175,7 @@ public class SynchronizeManager implements ISynchronizeManager {
String otherSecondaryId = otherRef.getSecondaryId();
return otherRef.getId().equals(getId()) && Utils.equalObject(getSecondaryId(), otherSecondaryId);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeParticipantReference#getId()
*/
@@ -190,9 +190,9 @@ public class SynchronizeManager implements ISynchronizeManager {
@Override
public String getSecondaryId() {
return secondaryId;
- }
-
-
+ }
+
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeParticipantReference#getDisplayName()
*/
@@ -205,7 +205,7 @@ public class SynchronizeManager implements ISynchronizeManager {
}
return displayName != null ? displayName : descriptor.getName();
}
-
+
public boolean isInstantiated() {
String key = Utils.getKey(descriptor.getId(), getSecondaryId());
return (ISynchronizeParticipant) participants.get(key) != null;
@@ -229,7 +229,7 @@ public class SynchronizeManager implements ISynchronizeManager {
} catch (TeamException e) {
TeamUIPlugin.log(e);
participantReferences.remove(key);
- throw new TeamException(TeamUIMessages.SynchronizeManager_8, e);
+ throw new TeamException(TeamUIMessages.SynchronizeManager_8, e);
}
}
@@ -237,7 +237,7 @@ public class SynchronizeManager implements ISynchronizeManager {
String key = Utils.getKey(descriptor.getId(), getSecondaryId());
participants.put(key, participant);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeParticipantReference#getDescriptor()
*/
@@ -245,7 +245,7 @@ public class SynchronizeManager implements ISynchronizeManager {
public ISynchronizeParticipantDescriptor getDescriptor() {
return descriptor;
}
-
+
private ISynchronizeParticipant instantiate() throws TeamException {
try {
ISynchronizeParticipant participant = (ISynchronizeParticipant) TeamUIPlugin.createExtension(descriptor.getConfigurationElement(), SynchronizeParticipantDescriptor.ATT_CLASS);
@@ -253,12 +253,12 @@ public class SynchronizeManager implements ISynchronizeManager {
participant.init(getSecondaryId(), savedState);
savedState = null;
return participant;
- } catch (PartInitException e) {
- throw new TeamException(NLS.bind(TeamUIMessages.SynchronizeManager_11, new String[] { descriptor.getName() }), e);
+ } catch (PartInitException e) {
+ throw new TeamException(NLS.bind(TeamUIMessages.SynchronizeManager_11, new String[] { descriptor.getName() }), e);
} catch (CoreException e) {
throw TeamException.asTeamException(e);
} catch(Exception e) {
- throw new TeamException(NLS.bind(TeamUIMessages.SynchronizeManager_11, new String[] { descriptor.getName() }), e);
+ throw new TeamException(NLS.bind(TeamUIMessages.SynchronizeManager_11, new String[] { descriptor.getName() }), e);
}
}
@@ -284,7 +284,7 @@ public class SynchronizeManager implements ISynchronizeManager {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.team.ui.sync.ISynchronizeManager#addSynchronizeParticipantListener(org.eclipse.team.ui.sync.ISynchronizeParticipantListener)
*/
@Override
@@ -297,7 +297,7 @@ public class SynchronizeManager implements ISynchronizeManager {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.team.ui.sync.ISynchronizeManager#removeSynchronizeParticipantListener(org.eclipse.team.ui.sync.ISynchronizeParticipantListener)
*/
@Override
@@ -306,14 +306,14 @@ public class SynchronizeManager implements ISynchronizeManager {
fListeners.remove(listener);
}
}
-
+
/**
* Creates a new participant reference with of the provided type. If the secondayId is specified it
* is used as the qualifier for multiple instances of the same type.
* <p>
* The returned participant reference is a light weight handle describing the participant. The plug-in
- * defining the participant is not loaded. To instantiate a participant a client must call
- * {@link ISynchronizeParticipantReference#createParticipant()} and must call
+ * defining the participant is not loaded. To instantiate a participant a client must call
+ * {@link ISynchronizeParticipantReference#createParticipant()} and must call
* {@link ISynchronizeParticipantReference#releaseParticipant()} when finished with the participant.
* </p>
* @param type the type of the participant
@@ -324,7 +324,7 @@ public class SynchronizeManager implements ISynchronizeManager {
SynchronizeParticipantDescriptor desc = participantRegistry.find(type);
// ensure that the view id is valid
if (desc == null)
- throw new PartInitException(NLS.bind(TeamUIMessages.SynchronizeManager_19, new String[] { type }));
+ throw new PartInitException(NLS.bind(TeamUIMessages.SynchronizeManager_19, new String[] { type }));
// ensure that multiple instances are allowed if a secondary id is given
if (secondaryId != null) {
// if (!desc.isMultipleInstances()) {
@@ -338,10 +338,10 @@ public class SynchronizeManager implements ISynchronizeManager {
}
return ref;
}
-
+
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.team.ui.sync.ISynchronizeManager#addSynchronizeParticipants(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
*/
@Override
@@ -369,7 +369,7 @@ public class SynchronizeManager implements ISynchronizeManager {
fireUpdate((ISynchronizeParticipant[]) added.toArray(new ISynchronizeParticipant[added.size()]), ADDED);
}
}
-
+
private void removeMatchingParticipant(String id) {
ISynchronizeParticipantReference[] refs = get(id);
if (refs.length > 0) {
@@ -403,7 +403,7 @@ public class SynchronizeManager implements ISynchronizeManager {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.team.ui.sync.ISynchronizeManager#removeSynchronizeParticipants(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
*/
@Override
@@ -434,7 +434,7 @@ public class SynchronizeManager implements ISynchronizeManager {
String key = Utils.getKey(id, secondaryId);
return (ISynchronizeParticipantReference) participantReferences.get(key);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeManager#get(java.lang.String)
*/
@@ -450,10 +450,10 @@ public class SynchronizeManager implements ISynchronizeManager {
}
return (ISynchronizeParticipantReference[]) refsForId.toArray(new ISynchronizeParticipantReference[refsForId.size()]);
}
-
+
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.team.ui.sync.ISynchronizeManager#getSynchronizeParticipants()
*/
@Override
@@ -476,7 +476,7 @@ public class SynchronizeManager implements ISynchronizeManager {
String pId = TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE);
activePage = workbench.showPerspective(pId, window);
} catch (WorkbenchException e) {
- Utils.handleError(window.getShell(), e, TeamUIMessages.SynchronizeView_14, e.getMessage());
+ Utils.handleError(window.getShell(), e, TeamUIMessages.SynchronizeView_14, e.getMessage());
}
}
try {
@@ -491,15 +491,15 @@ public class SynchronizeManager implements ISynchronizeManager {
return (ISynchronizeView) part;
} catch (ClassCastException e) {
// Strange that we cannot cast the part (see bug 53671)
- TeamUIPlugin.log(IStatus.ERROR, NLS.bind(TeamUIMessages.SynchronizeManager_18, new String[] { part.getClass().getName() }), e);
+ TeamUIPlugin.log(IStatus.ERROR, NLS.bind(TeamUIMessages.SynchronizeManager_18, new String[] { part.getClass().getName() }), e);
return null;
}
} catch (PartInitException pe) {
- Utils.handleError(window.getShell(), pe, TeamUIMessages.SynchronizeView_16, pe.getMessage());
+ Utils.handleError(window.getShell(), pe, TeamUIMessages.SynchronizeView_16, pe.getMessage());
return null;
}
}
-
+
/**
* Decides what action to take when switching perspectives and showing the synchronize view. Basically there are a
* set of user preferences that control how perspective switching.
@@ -507,13 +507,13 @@ public class SynchronizeManager implements ISynchronizeManager {
private boolean promptForPerspectiveSwitch() {
// Decide if a prompt is even required
IPreferenceStore store = TeamUIPlugin.getPlugin().getPreferenceStore();
- String option = store.getString(IPreferenceIds.SYNCHRONIZING_COMPLETE_PERSPECTIVE);
+ String option = store.getString(IPreferenceIds.SYNCHRONIZING_COMPLETE_PERSPECTIVE);
if(option.equals(MessageDialogWithToggle.ALWAYS)) {
return true;
} else if(option.equals(MessageDialogWithToggle.NEVER)) {
return false;
}
-
+
// Otherwise determine if a prompt is required
IPerspectiveRegistry registry= PlatformUI.getWorkbench().getPerspectiveRegistry();
String defaultSyncPerspectiveId = store.getString(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE);
@@ -526,9 +526,9 @@ public class SynchronizeManager implements ISynchronizeManager {
return false;
}
}
-
+
if(perspectiveDescriptor != null) {
-
+
String message;;
String desc = perspectiveDescriptor.getDescription();
if (desc == null) {
@@ -537,13 +537,13 @@ public class SynchronizeManager implements ISynchronizeManager {
message = NLS.bind(TeamUIMessages.SynchronizeManager_32, new String[] { perspectiveDescriptor.getLabel(), desc });
}
MessageDialogWithToggle m = MessageDialogWithToggle.openYesNoQuestion(Utils.getShell(null),
- TeamUIMessages.SynchronizeManager_27,
- message,
- TeamUIMessages.SynchronizeManager_31,
+ TeamUIMessages.SynchronizeManager_27,
+ message,
+ TeamUIMessages.SynchronizeManager_31,
false /* toggle state */,
store,
IPreferenceIds.SYNCHRONIZING_COMPLETE_PERSPECTIVE);
-
+
int result = m.getReturnCode();
switch (result) {
// yes, ok
@@ -568,12 +568,12 @@ public class SynchronizeManager implements ISynchronizeManager {
participantRegistry.readRegistry(Platform.getExtensionRegistry(), TeamUIPlugin.ID, SynchronizeParticipantRegistry.PT_SYNCPARTICIPANTS);
// Initialize the wizard registry
wizardRegistry.readRegistry(Platform.getExtensionRegistry(), TeamUIPlugin.ID, SynchronizeWizardRegistry.PT_SYNCHRONIZE_WIZARDS);
-
+
// Instantiate and register any dynamic participants saved from a
// previous session.
restoreSavedParticipants();
} catch (CoreException e) {
- TeamUIPlugin.log(new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, TeamUIMessages.SynchronizeManager_8, e));
+ TeamUIPlugin.log(new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, TeamUIMessages.SynchronizeManager_8, e));
}
}
@@ -620,7 +620,7 @@ public class SynchronizeManager implements ISynchronizeManager {
String key = Utils.getKey(id, secondayId);
participantReferences.put(key, new ParticipantInstance(desc, secondayId, displayName, memento2.getChild(CTX_PARTICIPANT_DATA)));
} else {
- TeamUIPlugin.log(new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, NLS.bind(TeamUIMessages.SynchronizeManager_9, new String[] { id }), null));
+ TeamUIPlugin.log(new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, NLS.bind(TeamUIMessages.SynchronizeManager_9, new String[] { id }), null));
}
}
}
@@ -636,10 +636,10 @@ public class SynchronizeManager implements ISynchronizeManager {
for (Iterator it = participantReferences.values().iterator(); it.hasNext(); ) {
ParticipantInstance ref = (ParticipantInstance) it.next();
// Participants can opt out of being saved between sessions
- if(! ref.getDescriptor().isPersistent()) continue;
- // Create the state placeholder for a participant
+ if(! ref.getDescriptor().isPersistent()) continue;
+ // Create the state placeholder for a participant
IMemento participantNode = xmlMemento.createChild(CTX_PARTICIPANT);
- participantNode.putString(CTX_ID, ref.getId());
+ participantNode.putString(CTX_ID, ref.getId());
String secondaryId = ref.getSecondaryId();
if(secondaryId != null) {
participantNode.putString(CTX_SECONDARY_ID,secondaryId);
@@ -656,18 +656,18 @@ public class SynchronizeManager implements ISynchronizeManager {
writer.close();
}
} catch (IOException e) {
- TeamUIPlugin.log(new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, TeamUIMessages.SynchronizeManager_10, e));
+ TeamUIPlugin.log(new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, TeamUIMessages.SynchronizeManager_10, e));
}
}
private File getStateFile() {
IPath pluginStateLocation = TeamUIPlugin.getPlugin().getStateLocation();
- return pluginStateLocation.append(FILENAME).toFile();
+ return pluginStateLocation.append(FILENAME).toFile();
}
-
+
/**
* Fires notification.
- *
+ *
* @param participants
* participants added/removed
* @param type
@@ -686,7 +686,7 @@ public class SynchronizeManager implements ISynchronizeManager {
public ISynchronizeParticipantDescriptor getParticipantDescriptor(String id) {
return participantRegistry.find(id);
}
-
+
public SynchronizeWizardDescription[] getWizardDescriptors() {
return wizardRegistry.getSynchronizeWizards();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElement.java
index 0447f492e..5019dbb5c 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElement.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElement.java
@@ -21,8 +21,8 @@ import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
import org.eclipse.ui.model.IWorkbenchAdapter;
/**
- * A model element that can be shown in viewers.
- *
+ * A model element that can be shown in viewers.
+ *
* @since 3.0
*/
public abstract class SynchronizeModelElement extends DiffNode implements IAdaptable, ISynchronizeModelElement {
@@ -38,11 +38,11 @@ public abstract class SynchronizeModelElement extends DiffNode implements IAdapt
// Instance variable containing the flags for this node
private int flags;
private ListenerList listeners;
-
+
// Parent is required to ensure that busy (and other) state is cleared.
// This is needed as DiffContainer#remove() will null the parent
private SynchronizeModelElement parent;
-
+
public SynchronizeModelElement(IDiffContainer parent) {
super(parent, SyncInfo.IN_SYNC);
internalSetParent(parent);
@@ -63,7 +63,7 @@ public abstract class SynchronizeModelElement extends DiffNode implements IAdapt
}
listeners.add(listener);
}
-
+
@Override
public synchronized void removePropertyChangeListener(IPropertyChangeListener listener) {
if (listeners != null) {
@@ -73,7 +73,7 @@ public abstract class SynchronizeModelElement extends DiffNode implements IAdapt
}
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.IDiffElement#setParent(org.eclipse.compare.structuremergeviewer.IDiffContainer)
*/
@@ -82,7 +82,7 @@ public abstract class SynchronizeModelElement extends DiffNode implements IAdapt
super.setParent(parent);
internalSetParent(parent);
}
-
+
/**
* Return whether this node has the given property set.
* @param propertyName the flag to test
@@ -92,7 +92,7 @@ public abstract class SynchronizeModelElement extends DiffNode implements IAdapt
public boolean getProperty(String propertyName) {
return (getFlags() & getFlag(propertyName)) > 0;
}
-
+
/**
* Add the flag to the flags for this node
* @param propertyName the flag to add
@@ -113,7 +113,7 @@ public abstract class SynchronizeModelElement extends DiffNode implements IAdapt
}
}
}
-
+
@Override
public void setPropertyToRoot(String propertyName, boolean value) {
if (value) {
@@ -122,11 +122,11 @@ public abstract class SynchronizeModelElement extends DiffNode implements IAdapt
removeToRoot(propertyName);
}
}
-
+
public void fireChanges() {
fireChange();
}
-
+
@Override
public ImageDescriptor getImageDescriptor(Object object) {
IResource resource = getResource();
@@ -136,7 +136,7 @@ public abstract class SynchronizeModelElement extends DiffNode implements IAdapt
}
return null;
}
-
+
@Override
public abstract IResource getResource();
@@ -173,7 +173,7 @@ public abstract class SynchronizeModelElement extends DiffNode implements IAdapt
}
}
}
-
+
private int getFlag(String propertyName) {
if (propertyName == BUSY_PROPERTY) {
return BUSY_FLAG;
@@ -186,11 +186,11 @@ public abstract class SynchronizeModelElement extends DiffNode implements IAdapt
}
return 0;
}
-
+
private int getFlags() {
return flags;
}
-
+
private boolean hasChildWithFlag(String flag) {
IDiffElement[] childen = getChildren();
for (int i = 0; i < childen.length; i++) {
@@ -201,7 +201,7 @@ public abstract class SynchronizeModelElement extends DiffNode implements IAdapt
}
return false;
}
-
+
private void removeToRoot(String flag) {
boolean hasProperty = getProperty(flag);
if(hasProperty) {
@@ -216,13 +216,13 @@ public abstract class SynchronizeModelElement extends DiffNode implements IAdapt
}
}
}
-
+
private void internalSetParent(IDiffContainer parent) {
if (parent != null && parent instanceof SynchronizeModelElement) {
this.parent = (SynchronizeModelElement)parent;
}
}
-
+
/**
* Synchronize model elements are not copied so use identity as the
* equality check.
@@ -233,14 +233,14 @@ public abstract class SynchronizeModelElement extends DiffNode implements IAdapt
public boolean equals(Object object) {
return this==object;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.DiffNode#hashCode()
*/
@Override
public int hashCode() {
// Use the name to get the hashCode to ensure that we can find equal elements.
- // (The inherited hashCode uses the path which can change when items are removed)
+ // (The inherited hashCode uses the path which can change when items are removed)
return getName().hashCode();
}
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementLabelProvider.java
index dcfa0cea2..e595105bd 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementLabelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementLabelProvider.java
@@ -27,23 +27,23 @@ import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
import org.eclipse.ui.model.WorkbenchLabelProvider;
/**
- * A label provider that decorates viewers showing
+ * A label provider that decorates viewers showing
* {@link ISynchronizeModelElement}.
- *
+ *
* @since 3.0
*/
public class SynchronizeModelElementLabelProvider extends LabelProvider implements IColorProvider, IFontProvider {
// Cache for folder images that have been overlayed with conflict icon
private Map fgImageCache;
-
+
// Contains direction images
CompareConfiguration compareConfig = new CompareConfiguration();
-
+
// Used as the base label provider for retreiving image and text from
// the workbench adapter.
private WorkbenchLabelProvider workbenchLabelProvider = new WorkbenchLabelProvider();
-
+
// Font used to display busy elements
private Font busyFont;
@@ -67,7 +67,7 @@ public class SynchronizeModelElementLabelProvider extends LabelProvider implemen
public Color getBackground(Object element) {
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
*/
@@ -81,7 +81,7 @@ public class SynchronizeModelElementLabelProvider extends LabelProvider implemen
FontData[] data = defaultFont.getFontData();
for (int i = 0; i < data.length; i++) {
data[i].setStyle(SWT.ITALIC);
- }
+ }
busyFont = new Font(TeamUIPlugin.getStandardDisplay(), data);
}
return busyFont;
@@ -102,11 +102,11 @@ public class SynchronizeModelElementLabelProvider extends LabelProvider implemen
ISynchronizeModelElement syncNode = (ISynchronizeModelElement) element;
int kind = syncNode.getKind();
Image decoratedImage;
- decoratedImage = getCompareImage(base, kind);
+ decoratedImage = getCompareImage(base, kind);
// The reason we still overlay the compare image is to
// ensure that the image width for all images shown in the viewer
// are consistent.
- return propagateConflicts(decoratedImage, syncNode);
+ return propagateConflicts(decoratedImage, syncNode);
}
}
return base;
@@ -126,7 +126,7 @@ public class SynchronizeModelElementLabelProvider extends LabelProvider implemen
int kind = ((DiffNode) element).getKind();
if (kind != SyncInfo.IN_SYNC) {
String syncKindString = SyncInfo.kindToString(kind);
- return NLS.bind(TeamUIMessages.TeamSubscriberSyncPage_labelWithSyncKind, new String[] { base, syncKindString }); //
+ return NLS.bind(TeamUIMessages.TeamSubscriberSyncPage_labelWithSyncKind, new String[] { base, syncKindString }); //
}
}
}
@@ -149,7 +149,7 @@ public class SynchronizeModelElementLabelProvider extends LabelProvider implemen
ImageDescriptor[] overlayImages = new ImageDescriptor[4];
boolean hasOverlay = false;
-
+
// Decorate with the busy indicator
if (element.getProperty(ISynchronizeModelElement.BUSY_PROPERTY)) {
overlayImages[IDecoration.TOP_LEFT] = TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_HOURGLASS_OVR);
@@ -186,7 +186,7 @@ public class SynchronizeModelElementLabelProvider extends LabelProvider implemen
}
return base;
}
-
+
/**
* Return whether this diff node has descendant conflicts in the view in
* which it appears.
@@ -195,7 +195,7 @@ public class SynchronizeModelElementLabelProvider extends LabelProvider implemen
private boolean hasDecendantConflicts(ISynchronizeModelElement node) {
return node.getProperty(ISynchronizeModelElement.PROPAGATED_CONFLICT_PROPERTY);
}
-
+
/**
* Return whether this diff node has descendant conflicts in the view in which it appears.
* @return whether the node has descendant conflicts
@@ -203,7 +203,7 @@ public class SynchronizeModelElementLabelProvider extends LabelProvider implemen
private boolean hasErrorMarker(ISynchronizeModelElement node) {
return node.getProperty(ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY);
}
-
+
/**
* Return whether this diff node has descendant conflicts in the view in which it appears.
* @return whether the node has descendant conflicts
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementSorter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementSorter.java
index 8fa2548d6..92790458d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementSorter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementSorter.java
@@ -20,7 +20,7 @@ import org.eclipse.ui.views.navigator.ResourceSorter;
* It is not thread safe so it should not be reused between views.
*/
public class SynchronizeModelElementSorter extends ResourceSorter {
-
+
public SynchronizeModelElementSorter() {
super(ResourceSorter.NAME);
}
@@ -34,7 +34,7 @@ public class SynchronizeModelElementSorter extends ResourceSorter {
IResource resource2 = getResource(o2);
Object objectToCompare1 = resource1==null ? o1 : resource1;
Object objectToCompare2 = resource2==null ? o2 : resource2;
-
+
return super.compare(viewer, objectToCompare1, objectToCompare2);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelManager.java
index 98a1f03ed..b2c01358c 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelManager.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelManager.java
@@ -56,7 +56,7 @@ public abstract class SynchronizeModelManager extends SynchronizePageActionGroup
setInput(descriptor.getId(), null);
}
}
-
+
public void update() {
setChecked(getSelectedProviderId().equals(descriptor.getId()));
}
@@ -98,7 +98,7 @@ public abstract class SynchronizeModelManager extends SynchronizePageActionGroup
* @return the model provider
*/
protected abstract ISynchronizeModelProvider createModelProvider(String id);
-
+
/**
* Return the provider that is currently active.
* @return the provider that is currently active
@@ -120,7 +120,7 @@ public abstract class SynchronizeModelManager extends SynchronizePageActionGroup
}
/**
- * Return the id of the selected provider. By default, this is the
+ * Return the id of the selected provider. By default, this is the
* id of the active provider. However, subclasses that use a composite
* may return an id that differs from that of the active provider
* and return an id of a sub-provider instead.
@@ -146,7 +146,7 @@ public abstract class SynchronizeModelManager extends SynchronizePageActionGroup
modelProvider.saveState();
modelProvider.dispose();
}
- modelProvider = createModelProvider(id);
+ modelProvider = createModelProvider(id);
saveProviderSettings(id);
modelProvider.prepareInput(monitor);
setInput();
@@ -170,7 +170,7 @@ public abstract class SynchronizeModelManager extends SynchronizePageActionGroup
if(advisor != null)
advisor.setInput(modelProvider);
}
-
+
/**
* Return the model root of the currently active model provider.
* This method will wait until the model is done updating.
@@ -234,7 +234,7 @@ public abstract class SynchronizeModelManager extends SynchronizePageActionGroup
String defaultProviderId = getDefaultProviderId(); /* use providers prefered */
IDialogSettings pageSettings = configuration.getSite().getPageSettings();
if(pageSettings != null && pageSettings.get(P_LAST_PROVIDER) != null) {
- defaultProviderId = pageSettings.get(P_LAST_PROVIDER);
+ defaultProviderId = pageSettings.get(P_LAST_PROVIDER);
}
setInput(defaultProviderId, null);
} else {
@@ -253,7 +253,7 @@ public abstract class SynchronizeModelManager extends SynchronizePageActionGroup
IContributionItem group = findGroup(menu, ISynchronizePageConfiguration.LAYOUT_GROUP);
if(menu != null && group != null) {
MenuManager layout = new MenuManager(Utils.getString("action.layout.label", Policy.getActionBundle())); //$NON-NLS-1$
- menu.appendToGroup(group.getId(), layout);
+ menu.appendToGroup(group.getId(), layout);
appendToMenu(null, layout);
} else if(toolbar != null) {
group = findGroup(toolbar, ISynchronizePageConfiguration.LAYOUT_GROUP);
@@ -262,7 +262,7 @@ public abstract class SynchronizeModelManager extends SynchronizePageActionGroup
}
}
}
-
+
private void appendToMenu(String groupId, IContributionManager menu) {
for (Iterator iter = toggleModelProviderActions.iterator(); iter.hasNext();) {
if (groupId == null) {
@@ -272,7 +272,7 @@ public abstract class SynchronizeModelManager extends SynchronizePageActionGroup
}
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.IActionContribution#dispose()
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java
index 38b5d8650..3932b8ee3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java
@@ -25,7 +25,7 @@ import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
/**
- * This class is reponsible for creating and maintaining a presentation model of
+ * This class is reponsible for creating and maintaining a presentation model of
* {@link SynchronizeModelElement} elements that can be shown in a viewer. The model
* is based on the synchronization information contained in the provided {@link SyncInfoSet}.
* <p>
@@ -33,17 +33,17 @@ import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
* sync change listener (changes, additions, removals, reset)
* batching busy updates
* </p>
- *
+ *
* @see HierarchicalModelProvider
* @see CompressedFoldersModelProvider
* @since 3.0
*/
public abstract class SynchronizeModelProvider extends AbstractSynchronizeModelProvider implements ISyncInfoSetChangeListener {
-
+
protected final Map resourceMap = Collections.synchronizedMap(new HashMap());
protected static final boolean DEBUG = false;
-
+
public SynchronizeModelProvider(ISynchronizePageConfiguration configuration, SyncInfoSet set) {
super(configuration, set);
}
@@ -52,12 +52,12 @@ public abstract class SynchronizeModelProvider extends AbstractSynchronizeModelP
super(parentProvider, modelRoot, configuration, set);
associateRoot(modelRoot);
}
-
+
private void associateRoot(ISynchronizeModelElement modelRoot) {
// associate the root resource with the provider's root element
resourceMap.put(ResourcesPlugin.getWorkspace().getRoot(), modelRoot);
}
-
+
/**
* Dispose of the builder
*/
@@ -69,8 +69,8 @@ public abstract class SynchronizeModelProvider extends AbstractSynchronizeModelP
/**
* Returns the sorter for this model provider.
- *
- * @return the sorter for this model provider.
+ *
+ * @return the sorter for this model provider.
*/
@Override
public abstract ViewerSorter getViewerSorter();
@@ -85,7 +85,7 @@ public abstract class SynchronizeModelProvider extends AbstractSynchronizeModelP
protected ISynchronizeModelElement getModelObject(IResource resource) {
return (ISynchronizeModelElement) resourceMap.get(resource);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#getModelObjects(org.eclipse.core.resources.IResource)
*/
@@ -97,7 +97,7 @@ public abstract class SynchronizeModelProvider extends AbstractSynchronizeModelP
}
return new ISynchronizeModelElement[] { element };
}
-
+
protected void associateDiffNode(ISynchronizeModelElement node) {
IResource resource = node.getResource();
if(resource != null) {
@@ -108,7 +108,7 @@ public abstract class SynchronizeModelProvider extends AbstractSynchronizeModelP
protected void unassociateDiffNode(IResource resource) {
resourceMap.remove(resource);
}
-
+
/**
* Helper method to remove a resource from the viewer. If the resource
* is not mapped to a model element, this is a no-op.
@@ -120,7 +120,7 @@ public abstract class SynchronizeModelProvider extends AbstractSynchronizeModelP
removeFromViewer(new ISynchronizeModelElement[] { element });
}
}
-
+
/**
* Helper method to remove a set of resources from the viewer. If a resource
* is not mapped to a model element, it is ignored.
@@ -139,7 +139,7 @@ public abstract class SynchronizeModelProvider extends AbstractSynchronizeModelP
removeFromViewer((ISynchronizeModelElement[]) elements.toArray(new ISynchronizeModelElement[elements.size()]));
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#clearModelObjects(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
*/
@@ -159,7 +159,7 @@ public abstract class SynchronizeModelProvider extends AbstractSynchronizeModelP
}
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#addToViewer(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
*/
@@ -191,7 +191,7 @@ public abstract class SynchronizeModelProvider extends AbstractSynchronizeModelP
}
return new ISynchronizeModelElement[] { element };
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#handleChanges(org.eclipse.team.core.synchronize.ISyncInfoTreeChangeEvent)
*/
@@ -199,7 +199,7 @@ public abstract class SynchronizeModelProvider extends AbstractSynchronizeModelP
protected final void handleChanges(ISyncInfoTreeChangeEvent event, IProgressMonitor monitor) {
super.handleChanges(event, monitor);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.AbstractSynchronizeModelProvider#handleResourceChanges(org.eclipse.team.core.synchronize.ISyncInfoTreeChangeEvent)
*/
@@ -214,7 +214,7 @@ public abstract class SynchronizeModelProvider extends AbstractSynchronizeModelP
if (diffNode != null) {
handleChange(diffNode, info);
}
- }
+ }
}
/**
@@ -235,7 +235,7 @@ public abstract class SynchronizeModelProvider extends AbstractSynchronizeModelP
addResource(info);
ISynchronizeModelElement node = getModelObject(info.getLocal());
buildModelObjects(node);
-
+
}
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelUpdateHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelUpdateHandler.java
index 9b5332938..783a91a59 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelUpdateHandler.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelUpdateHandler.java
@@ -42,23 +42,23 @@ import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
*/
public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implements IResourceChangeListener, ISyncInfoSetChangeListener {
private static final IWorkspaceRoot ROOT = ResourcesPlugin.getWorkspace().getRoot();
-
+
// Event that indicates that the markers for a set of elements has changed
private static final int MARKERS_CHANGED = 1;
private static final int BUSY_STATE_CHANGED = 2;
private static final int RESET = 3;
private static final int SYNC_INFO_SET_CHANGED = 4;
-
+
private AbstractSynchronizeModelProvider provider;
-
+
private Set pendingLabelUpdates = Collections.synchronizedSet(new HashSet());
-
+
// Flag to indicate the need for an early dispath in order to show
// busy for elements involved in an operation
private boolean dispatchEarly = false;
-
+
private static final int EARLY_DISPATCH_INCREMENT = 100;
-
+
/**
* Custom event for posting marker changes
*/
@@ -72,12 +72,12 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
return elements;
}
}
-
+
/**
* Custom event for posting busy state changes
*/
class BusyStateChangeEvent extends Event {
-
+
private final ISynchronizeModelElement element;
private final boolean isBusy;
public BusyStateChangeEvent(ISynchronizeModelElement element, boolean isBusy) {
@@ -92,7 +92,7 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
return isBusy;
}
}
-
+
/**
* Custom event for posting sync info set changes
*/
@@ -106,7 +106,7 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
return event;
}
}
-
+
private IPropertyChangeListener listener = new IPropertyChangeListener() {
@Override
public void propertyChange(final PropertyChangeEvent event) {
@@ -119,22 +119,22 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
};
private boolean performingBackgroundUpdate;
-
+
/*
* Map used to keep track of additions so they can be added in batch at the end of the update
*/
private Map additionsMap;
-
+
/**
* Create the marker update handler.
*/
public SynchronizeModelUpdateHandler(AbstractSynchronizeModelProvider provider) {
- super(TeamUIMessages.SynchronizeModelProvider_0, TeamUIMessages.SynchronizeModelUpdateHandler_0); //
+ super(TeamUIMessages.SynchronizeModelProvider_0, TeamUIMessages.SynchronizeModelUpdateHandler_0); //
this.provider = provider;
ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
provider.getSyncInfoSet().addSyncSetChangedListener(this);
}
-
+
/**
* Return the marker types that are of interest to this handler.
* @return the marker types that are of interest to this handler
@@ -142,7 +142,7 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
protected String[] getMarkerTypes() {
return new String[] {IMarker.PROBLEM};
}
-
+
/**
* Return the <code>AbstractTreeViewer</code> associated with this
* provider or <code>null</code> if the viewer is not of the proper type.
@@ -151,7 +151,7 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
public StructuredViewer getViewer() {
return provider.getViewer();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
*/
@@ -160,7 +160,7 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
String[] markerTypes = getMarkerTypes();
Set handledResources = new HashSet();
Set changes = new HashSet();
-
+
// Accumulate all distinct resources that have had problem marker
// changes
for (int idx = 0; idx < markerTypes.length; idx++) {
@@ -180,16 +180,16 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
}
}
}
-
+
if (!changes.isEmpty()) {
updateMarkersFor((ISynchronizeModelElement[]) changes.toArray(new ISynchronizeModelElement[changes.size()]));
}
}
-
+
private void updateMarkersFor(ISynchronizeModelElement[] elements) {
queueEvent(new MarkerChangeEvent(elements), false /* not on front of queue */);
}
-
+
protected void updateBusyState(ISynchronizeModelElement element, boolean isBusy) {
queueEvent(new BusyStateChangeEvent(element, isBusy), false /* not on front of queue */);
}
@@ -266,7 +266,7 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
return true;
}
}
-
+
/**
* Forces the viewer to update the labels for queued elemens
* whose label has changed during this round of changes. This method
@@ -281,17 +281,17 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
pendingLabelUpdates.clear();
}
}
-
+
/*
* Forces the viewer to update the labels for the given elements
*/
private void updateLabels(Object[] elements) {
StructuredViewer tree = getViewer();
- if (Utils.canUpdateViewer(tree)) {
+ if (Utils.canUpdateViewer(tree)) {
tree.update(elements, null);
}
}
-
+
/**
* Queue all the parent elements for a label update.
* @param element the element whose label and parent labels need to be updated
@@ -303,7 +303,7 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
queueForLabelUpdate(element);
}
}
-
+
/**
* Update the label of the given diff node. Diff nodes
* are accumulated and updated in a single call.
@@ -312,7 +312,7 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
protected void queueForLabelUpdate(ISynchronizeModelElement diffNode) {
pendingLabelUpdates.add(diffNode);
}
-
+
/**
* Calculate and propagate problem markers in the element model
* @param element the ssynchronize element
@@ -331,7 +331,7 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
}
}
}
-
+
// none -> error
// error -> none
// none -> warning
@@ -341,13 +341,13 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
private boolean hadProblemProperty(ISynchronizeModelElement element, String property) {
boolean hadError = element.getProperty(ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY);
boolean hadWarning = element.getProperty(ISynchronizeModelElement.PROPAGATED_WARNING_MARKER_PROPERTY);
-
+
// Force recalculation of parents of phantom resources
IResource resource = element.getResource();
if(resource != null && resource.isPhantom()) {
return true;
}
-
+
if(hadError) {
if(! (property == ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY)) {
element.setPropertyToRoot(ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY, false);
@@ -358,7 +358,7 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
// error -> none
// recalculate parents
return true;
- }
+ }
return false;
} else if(hadWarning) {
if(! (property == ISynchronizeModelElement.PROPAGATED_WARNING_MARKER_PROPERTY)) {
@@ -370,8 +370,8 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
}
// warning -> none
return true;
- }
- return false;
+ }
+ return false;
} else {
if(property == ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY) {
// none -> error
@@ -381,7 +381,7 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
// none -> warning
element.setPropertyToRoot(property, true);
return true;
- }
+ }
return false;
}
}
@@ -392,13 +392,13 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
private void reset() {
queueEvent(new ResourceEvent(ROOT, RESET, IResource.DEPTH_INFINITE), false);
}
-
+
public void dispose() {
shutdown();
ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
provider.getSyncInfoSet().removeSyncSetChangedListener(this);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.core.BackgroundEventHandler#getShortDispatchDelay()
*/
@@ -414,7 +414,7 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
/**
* This method is invoked whenever a node is added to the viewer
* by the provider or a sub-provider. The handler adds an update
- * listener to the node and notifies the root provider that
+ * listener to the node and notifies the root provider that
* a node was added.
* @param element the added element
* @param provider the provider that added the element
@@ -430,8 +430,8 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
/**
* This method is invoked whenever a node is removed the viewer
* by the provider or a sub-provider. The handler removes any
- * listener and notifies the root provider that
- * a node was removed. The node removed may have children for which
+ * listener and notifies the root provider that
+ * a node was removed. The node removed may have children for which
* a nodeRemoved callback was not invoked (see modelObjectCleared).
* @param element the removed element
* @param provider the provider that added the element
@@ -457,7 +457,7 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
System.out.println("Node cleared: " + getDebugDisplayLabel(node)); //$NON-NLS-1$
}
}
-
+
private String getDebugDisplayLabel(ISynchronizeModelElement node) {
if (node == null) {
return "ROOT"; //$NON-NLS-1$
@@ -471,7 +471,7 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
private String getDebugDisplayLabel(AbstractSynchronizeModelProvider provider2) {
return provider2.toString();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener#syncInfoSetReset(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -516,9 +516,9 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
public void syncInfoSetErrors(SyncInfoSet set, ITeamStatus[] errors, IProgressMonitor monitor) {
// When errors occur we currently don't process them. It may be possible to decorate
// elements in the model with errors, but currently we prefer to let ignore and except
- // another listener to display them.
+ // another listener to display them.
}
-
+
public ISynchronizeModelProvider getProvider() {
return provider;
}
@@ -526,14 +526,14 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
public void connect(IProgressMonitor monitor) {
getProvider().getSyncInfoSet().connect(this, monitor);
}
-
+
public void runViewUpdate(final Runnable runnable, final boolean preserveExpansion) {
if (Utils.canUpdateViewer(getViewer()) || isPerformingBackgroundUpdate()) {
internalRunViewUpdate(runnable, preserveExpansion);
} else {
if (Thread.currentThread() != getEventHandlerJob().getThread()) {
// Run view update should only be called from the UI thread or
- // the update handler thread.
+ // the update handler thread.
// We will log the problem for now and make it an assert later
TeamUIPlugin.log(IStatus.WARNING, "View update invoked from invalid thread", new TeamException("View update invoked from invalid thread")); //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -555,7 +555,7 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
}
}
}
-
+
/*
* Return whether the event handler is performing a background view update.
* In other words, a client has invoked <code>performUpdate</code>.
@@ -674,7 +674,7 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
performingBackgroundUpdate = false;
}
updateView();
-
+
}
private void recordExpandedResources() {
final StructuredViewer viewer = getViewer();
@@ -705,7 +705,7 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
}
};
}
-
+
/*
* Execute the RunnableEvent
*/
@@ -722,7 +722,7 @@ public class SynchronizeModelUpdateHandler extends BackgroundEventHandler implem
handleException(e);
}
}
-
+
/**
* Add the element to the viewer.
* @param parent the parent of the element which is already added to the viewer
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizePageConfiguration.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizePageConfiguration.java
index 77209661c..0cc1ce5a9 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizePageConfiguration.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizePageConfiguration.java
@@ -30,31 +30,31 @@ import org.eclipse.ui.IActionBars;
import org.eclipse.ui.actions.ActionContext;
/**
- * Concrete implementation of the ISynchronizePageConfiguration. It
+ * Concrete implementation of the ISynchronizePageConfiguration. It
* extends SynchronizePageActionGroup in order to delegate action group
* operations.
- *
+ *
* @since 3.0
*/
public class SynchronizePageConfiguration extends SynchronizePageActionGroup implements ISynchronizePageConfiguration {
/**
- * Property constant for the page's viewer input which is
+ * Property constant for the page's viewer input which is
* an instance of <code>ISynchronizeModelElement</code>.
* This property can be queried by clients but should not be
* set.
*/
public static final String P_MODEL = TeamUIPlugin.ID + ".P_MODEL"; //$NON-NLS-1$
-
+
/**
- * Property constant for the page's viewer advisor which is
+ * Property constant for the page's viewer advisor which is
* an instance of <code>StructuredViewerAdvisor</code>.
* The page's viewer can be obtained from the advisor.
* This property can be queried by clients but should not be
* set.
*/
public static final String P_ADVISOR = TeamUIPlugin.ID + ".P_ADVISOR"; //$NON-NLS-1$
-
+
/**
* Property constant for the page's navigator
* an instance of <code>INavigable</code>.
@@ -62,16 +62,16 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
* the advisors navigator will be used.
*/
public static final String P_NAVIGATOR = TeamUIPlugin.ID + ".P_NAVIGATOR"; //$NON-NLS-1$
-
+
/**
* Property constant for the compare editor inputs navigator
* an instance of <code>INavigable</code>.
* This property can be queried by clients and can be set.
*/
public static final String P_INPUT_NAVIGATOR = TeamUIPlugin.ID + ".P_INPUT_NAVIGATOR"; //$NON-NLS-1$
-
+
/**
- * Property constant for the page's model manager which is
+ * Property constant for the page's model manager which is
* an instance of <code>SynchronizeModelManager</code>.
* This property can be queried by clients but should not be
* set.
@@ -105,12 +105,12 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
public static final String P_VIEWER_STYLE = TeamUIPlugin.ID + ".P_VIEWER_STYLE"; //$NON-NLS-1$
public static final int CHECKBOX = TreeViewerAdvisor.CHECKBOX;
-
+
// State flags
private static final int UNINITIALIZED = 0;
private static final int INITIALIZED = 1;
private static final int DISPOSED = 2;
-
+
private ISynchronizeParticipant participant;
private ISynchronizePageSite site;
private ListenerList propertyChangeListeners = new ListenerList(ListenerList.IDENTITY);
@@ -119,7 +119,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
private int actionState = UNINITIALIZED;
private ISynchronizePage page;
private IRunnableContext context;
-
+
/**
* Create a configuration for creating a page from the given participant.
* @param participant the participant whose page is being configured
@@ -131,7 +131,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
setProperty(P_VIEW_MENU, DEFAULT_VIEW_MENU);
setProperty(P_COMPARISON_TYPE, THREE_WAY);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#getParticipant()
*/
@@ -139,7 +139,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
public ISynchronizeParticipant getParticipant() {
return participant;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#getSite()
*/
@@ -147,16 +147,16 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
public ISynchronizePageSite getSite() {
return site;
}
-
+
/**
- * Set the site that is associated with the page that was
+ * Set the site that is associated with the page that was
* configured using this configuration.
* @param site a synchronize page site
*/
public void setSite(ISynchronizePageSite site) {
this.site = site;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
*/
@@ -166,7 +166,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
propertyChangeListeners.add(listener);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
*/
@@ -176,7 +176,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
propertyChangeListeners.remove(listener);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#setProperty(java.lang.String, java.lang.Object)
*/
@@ -197,7 +197,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
public Object getProperty(String key) {
return properties.get(key);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#addActionContribution(org.eclipse.team.ui.synchronize.IActionContribution)
*/
@@ -223,7 +223,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
contribution.dispose();
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#removeActionContribution(org.eclipse.team.ui.synchronize.IActionContribution)
*/
@@ -233,7 +233,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
actionContributions.remove(contribution);
}
}
-
+
private void firePropertyChange(String key, Object oldValue, Object newValue) {
Object[] listeners;
synchronized(propertyChangeListeners) {
@@ -254,7 +254,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
});
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.IActionContribution#initialize(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
*/
@@ -285,7 +285,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
});
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.actions.ActionGroup#setContext(org.eclipse.ui.actions.ActionContext)
*/
@@ -310,7 +310,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
});
}
}
-
+
/**
* Callback invoked from the advisor each time the context menu is
* about to be shown.
@@ -364,7 +364,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
});
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.actions.ActionGroup#updateActionBars()
*/
@@ -388,7 +388,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
});
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#modelChanged(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
*/
@@ -412,7 +412,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
});
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.IActionContribution#dispose()
*/
@@ -438,7 +438,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
});
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#setMenu(java.lang.String, java.lang.String[])
*/
@@ -446,7 +446,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
public void setMenuGroups(String menuPropertyId, String[] groups) {
setProperty(menuPropertyId, groups);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#appendMenu(java.lang.String, java.lang.String)
*/
@@ -477,7 +477,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
}
return false;
}
-
+
protected String[] getDefault(String menuPropertyId) {
if (menuPropertyId.equals(P_CONTEXT_MENU)) {
return DEFAULT_CONTEXT_MENU;
@@ -489,7 +489,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
return new String[0];
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#addLabelDecorator(org.eclipse.jface.viewers.ILabelDecorator)
*/
@@ -524,7 +524,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
}
return id + "." + group; //$NON-NLS-1$
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.subscribers.ISubscriberPageConfiguration#getMode()
*/
@@ -558,7 +558,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
}
return 0;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.subscribers.ISubscriberPageConfiguration#setSupportedModes(int)
*/
@@ -566,7 +566,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
public void setSupportedModes(int modes) {
setProperty(P_SUPPORTED_MODES, new Integer(modes));
}
-
+
/**
* @return Returns the page.
*/
@@ -651,7 +651,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
return viewerId;
return CommonViewerAdvisor.TEAM_NAVIGATOR_CONTENT;
}
-
+
/**
* Return whether the given node is visible in the page based
* on the mode in the configuration.
@@ -659,18 +659,18 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
* @return whether the given node is visible in the page
*/
public boolean isVisible(IDiff node) {
- if (getComparisonType() == ISynchronizePageConfiguration.THREE_WAY
+ if (getComparisonType() == ISynchronizePageConfiguration.THREE_WAY
&& node instanceof IThreeWayDiff) {
IThreeWayDiff twd = (IThreeWayDiff) node;
return includeDirection(twd.getDirection());
}
return getComparisonType() == ISynchronizePageConfiguration.TWO_WAY && node instanceof IResourceDiff;
}
-
+
/**
* Return whether elements with the given direction should be included in
* the contents.
- *
+ *
* @param direction
* the synchronization direction
* @return whether elements with the given synchronization kind should be
@@ -692,7 +692,7 @@ public class SynchronizePageConfiguration extends SynchronizePageActionGroup imp
}
return true;
}
-
+
public ILabelDecorator getLabelDecorator() {
ILabelDecorator[] decorators = (ILabelDecorator[])getProperty(ISynchronizePageConfiguration.P_LABEL_DECORATORS);
if (decorators == null) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java
index a7c402b09..cf3137fc7 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java
@@ -43,25 +43,25 @@ import org.eclipse.ui.part.*;
import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
/**
- * Implements a Synchronize View that contains multiple synchronize participants.
+ * Implements a Synchronize View that contains multiple synchronize participants.
*/
public class SynchronizeView extends PageBookView implements ISynchronizeView, ISynchronizeParticipantListener, IPropertyChangeListener, ISaveablesSource, ISaveablePart, IShowInTarget {
-
+
/**
* Suggested maximum length of participant names when shown in certain menus and dialog.
*/
public final static int MAX_NAME_LENGTH = 100;
-
+
/**
* The participant being displayed, or <code>null</code> if none
*/
private ISynchronizeParticipant activeParticipantRef = null;
-
+
/**
* Map of participants to dummy participant parts (used to close pages)
*/
private Map fParticipantToPart;
-
+
/**
* Map of parts to participants
*/
@@ -71,22 +71,22 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
* Drop down action to switch between participants
*/
private SynchronizePageDropDownAction fPageDropDown;
-
+
/**
* Action to remove the selected participant
*/
private PinParticipantAction fPinAction;
-
+
/**
* Action to remove the currently shown participant
*/
private RemoveSynchronizeParticipantAction fRemoveCurrentAction;
-
+
/**
* Action to remove all non-pinned participants
*/
private RemoveSynchronizeParticipantAction fRemoveAllAction;
-
+
private ToggleLinkingAction fToggleLinkingAction;
/**
@@ -164,7 +164,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
}
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.IPartListener#partClosed(org.eclipse.ui.IWorkbenchPart)
*/
@@ -180,7 +180,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
public ISynchronizeParticipant getParticipant() {
return activeParticipantRef;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.part.PageBookView#showPageRec(org.eclipse.ui.part.PageBookView.PageRec)
*/
@@ -189,7 +189,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
super.showPageRec(pageRec);
activeParticipantRef = (ISynchronizeParticipant)fPartToParticipant.get(pageRec.part);
updateActionEnablements();
- updateTitle();
+ updateTitle();
}
/*
@@ -207,11 +207,11 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
description = part.getParticipant().getName();
// TODO: Get the description from the configuration
// TODO: listen to the configuration for description changes
- setContentDescription(Utils.shortenText(MAX_NAME_LENGTH, description));
+ setContentDescription(Utils.shortenText(MAX_NAME_LENGTH, description));
setStatusLineMessage(description, configuration.getMode());
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.part.PageBookView#doDestroyPage(org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.part.PageBookView.PageRec)
*/
@@ -228,7 +228,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
private void clearCrossReferenceCache(IWorkbenchPart part, ISynchronizeParticipant participant) {
participant.removePropertyChangeListener(this);
if (part == null)
- return;
+ return;
ISynchronizePageConfiguration configuration = ((SynchronizeViewWorkbenchPart)part).getConfiguration();
if (configuration != null)
configuration.removePropertyChangeListener(this);
@@ -242,7 +242,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
@Override
protected PageRec doCreatePage(IWorkbenchPart dummyPart) {
SynchronizeViewWorkbenchPart part = (SynchronizeViewWorkbenchPart)dummyPart;
- ISynchronizeParticipant participant = part.getParticipant();
+ ISynchronizeParticipant participant = part.getParticipant();
participant.addPropertyChangeListener(this);
ISynchronizePageConfiguration configuration = participant.createPageConfiguration();
part.setConfiguration(configuration);
@@ -297,7 +297,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
// Remember the last active participant
if(activeParticipantRef != null) {
rememberCurrentParticipant();
- }
+ }
fParticipantToPart = null;
fPartToParticipant = null;
// Remove 'Link with Editor' listener when closing the view
@@ -305,7 +305,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
}
/**
- *
+ *
*/
private void rememberCurrentParticipant() {
IDialogSettings section = getDialogSettings();
@@ -400,7 +400,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
fPartToParticipant = new HashMap();
updateTitle();
}
-
+
/**
* Create the default actions for the view. These will be shown regardless of the
* participant being displayed.
@@ -431,13 +431,13 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
}
if (fPastePatchAction != null) {
// The action is always enabled
- fPastePatchAction.setEnabled(true);
+ fPastePatchAction.setEnabled(true);
}
}
/**
* Add the actions to the toolbar
- *
+ *
* @param bars the action bars
*/
protected void configureToolBar(IActionBars bars) {
@@ -469,7 +469,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
PlatformUI.getWorkbench().getHelpSystem().setHelp(getPageBook().getParent(), participant.getHelpContextId());
}
}
-
+
private void createOpenAndLinkWithEditorHelper(StructuredViewer viewer) {
if (fOpenAndLinkWithEditorHelper != null)
fOpenAndLinkWithEditorHelper.dispose();
@@ -507,7 +507,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
protected IWorkbenchPart getBootstrapPart() {
return null;
}
-
+
/**
* Registers the given runnable with the display
* associated with this view's control, if any.
@@ -518,7 +518,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
getPageBook().getDisplay().asyncExec(runnable);
}
}
-
+
/**
* Creates this view's underlying viewer and actions.
* Hooks a pop-up menu to the underlying viewer's control,
@@ -544,15 +544,15 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
updateForExistingParticipants();
getViewSite().getActionBars().updateActionBars();
updateTitle();
-
+
IWorkbenchSiteProgressService progress = (IWorkbenchSiteProgressService)getSite().getAdapter(IWorkbenchSiteProgressService.class);
if(progress != null) {
progress.showBusyForFamily(ISynchronizeManager.FAMILY_SYNCHRONIZE_OPERATION);
}
-
+
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IHelpContextIds.SYNC_VIEW);
}
-
+
/**
* Initialize for existing participants
*/
@@ -568,7 +568,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
errorOccurred = true;
continue;
}
-
+
}
if (errorOccurred) {
participants = Arrays.asList(getParticipants());
@@ -588,14 +588,14 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
}
display(participantToSelect.getParticipant());
}
-
+
// add as a listener to update when new participants are added
manager.addSynchronizeParticipantListener(this);
} catch (TeamException e) {
Utils.handle(e);
}
}
-
+
private ISynchronizeParticipantReference[] getParticipants() {
ISynchronizeManager manager = TeamUI.getSynchronizeManager();
// create pages
@@ -609,11 +609,11 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
}
return (ISynchronizeParticipantReference[]) participants.toArray(new ISynchronizeParticipantReference[participants.size()]);
}
-
+
private boolean isAvailable() {
return getPageBook() != null && !getPageBook().isDisposed();
}
-
+
/*
* Method used by test cases to access the page for a participant
*/
@@ -628,29 +628,29 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
return null;
}
}
-
+
protected boolean select(ISynchronizeParticipantReference ref) {
return true;
}
-
+
/*
* Return the dialog settings for the view
*/
private IDialogSettings getDialogSettings() {
IDialogSettings workbenchSettings = TeamUIPlugin.getPlugin().getDialogSettings();
- IDialogSettings syncViewSettings = workbenchSettings.getSection(KEY_SETTINGS_SECTION);
+ IDialogSettings syncViewSettings = workbenchSettings.getSection(KEY_SETTINGS_SECTION);
if (syncViewSettings == null) {
syncViewSettings = workbenchSettings.addNewSection(KEY_SETTINGS_SECTION);
}
return syncViewSettings;
}
-
+
private String getSettingsKey(ISynchronizeParticipant participant) {
String id = participant.getId();
String secondaryId = participant.getSecondaryId();
return secondaryId == null ? id : id + '.' + secondaryId;
}
-
+
private IDialogSettings getDialogSettings(ISynchronizeParticipant participant) {
String key = getSettingsKey(participant);
IDialogSettings viewsSettings = getDialogSettings();
@@ -660,7 +660,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
}
return settings;
}
-
+
private void removeDialogSettings(ISynchronizeParticipant participant) {
String key = getSettingsKey(participant);
IDialogSettings settings = getDialogSettings();
@@ -670,7 +670,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
getDialogSettings().addSection(new DialogSettings(key));
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.ISaveablesSource#getSaveables()
*/
@@ -766,7 +766,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
public boolean isSaveOnCloseNeeded() {
return true;
}
-
+
private void setStatusLineMessage(String description, int mode) {
String syncMode = null;
ResourceBundle bundle = Policy.getActionBundle();
@@ -782,9 +782,9 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
break;
case ISynchronizePageConfiguration.CONFLICTING_MODE:
syncMode = Utils.getString("action.directionFilterConflicts.tooltip", bundle); //$NON-NLS-1$
- break;
+ break;
}
-
+
IViewSite viewSite = getViewSite();
if (viewSite != null && syncMode != null) {
viewSite.getActionBars().getStatusLineManager().setMessage(
@@ -829,7 +829,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
}
private static IElementComparer COMPARER = new IElementComparer() {
-
+
private Object getContributedResourceOrResourceVariant(Object o) {
IResource[] resources = Utils.getContributedResources(new Object[] {o});
if (resources.length > 0)
@@ -840,7 +840,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
}
return null;
}
-
+
@Override
public int hashCode(Object element) {
Object r = getContributedResourceOrResourceVariant(element);
@@ -878,7 +878,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
page.removePartListener(fLinkWithEditorListener);
}
fOpenAndLinkWithEditorHelper.setLinkWithEditor(enabled);
-
+
}
private void restoreLinkingEnabled() {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewWorkbenchPart.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewWorkbenchPart.java
index 00cf7e190..710d4e8a4 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewWorkbenchPart.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewWorkbenchPart.java
@@ -26,7 +26,7 @@ public class SynchronizeViewWorkbenchPart implements IWorkbenchPart {
private ISynchronizeParticipant participant;
private IWorkbenchPartSite site;
private ISynchronizePageConfiguration configuration;
-
+
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@@ -130,7 +130,7 @@ public class SynchronizeViewWorkbenchPart implements IWorkbenchPart {
/**
* Returns the participant associated with this part.
- *
+ *
* @return participant associated with this part
*/
public ISynchronizeParticipant getParticipant() {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSynchronizingPerspective.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSynchronizingPerspective.java
index ce2ca9201..f9a1efbf0 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSynchronizingPerspective.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSynchronizingPerspective.java
@@ -28,7 +28,7 @@ public class TeamSynchronizingPerspective implements IPerspectiveFactory {
}
/**
- * Defines the initial actions for a page.
+ * Defines the initial actions for a page.
* @param layout the page layout
*/
public void defineActions(IPageLayout layout) {
@@ -44,16 +44,16 @@ public class TeamSynchronizingPerspective implements IPerspectiveFactory {
layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
-
+
// Add "action sets"
layout.addActionSet("org.eclipse.team.ui.actionSet"); //$NON-NLS-1$
-
+
// Add "perspective short cuts"
layout.addPerspectiveShortcut("org.eclipse.ui.resourcePerspective"); //$NON-NLS-1$
}
/**
- * Defines the initial layout for a page.
+ * Defines the initial layout for a page.
* @param layout the page layout
*/
public void defineLayout(IPageLayout layout) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.java
index 57b274117..1b69bbe20 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.java
@@ -36,7 +36,7 @@ import org.eclipse.ui.part.ResourceTransfer;
/**
* A <code>TreeViewerAdvisor</code> that works with TreeViewers. Two default
* tree viewers are provided that support navigation: <code>NavigableTreeViewer</code>
- * and <code>NavigableCheckboxTreeViewer</code>.
+ * and <code>NavigableCheckboxTreeViewer</code>.
* <p>
* Note that this advisor can be used with any tree viewer. By default it provides an
* expand all action, double click behavior on containers, and navigation support for
@@ -49,17 +49,17 @@ import org.eclipse.ui.part.ResourceTransfer;
* @since 3.0
*/
public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
-
+
// Special actions that could not be contributed using an ActionGroup
private StatusLineContributionGroup statusLine;
-
+
/**
* Style bit that indicates that a checkbox viewer is desired.
*/
public static final int CHECKBOX = 1;
-
+
private SynchronizeModelManager modelManager;
-
+
/**
* A navigable checkbox tree viewer that will work with the <code>navigate</code> method of
* this advisor.
@@ -71,7 +71,7 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
}
@Override
- public void createChildren(TreeItem item) {
+ public void createChildren(TreeItem item) {
super.createChildren(item);
}
@@ -80,7 +80,7 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
fireOpen(new OpenEvent(this, getSelection()));
}
}
-
+
/**
* A navigable tree viewer that will work with the <code>navigate</code> method of
* this advisor.
@@ -92,7 +92,7 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
}
@Override
- public void createChildren(TreeItem item) {
+ public void createChildren(TreeItem item) {
super.createChildren(item);
}
@@ -101,7 +101,7 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
fireOpen(new OpenEvent(this, getSelection()));
}
}
-
+
public static StructuredViewer createViewer(Composite parent, ISynchronizePageConfiguration configuration) {
int style = ((SynchronizePageConfiguration)configuration).getViewerStyle();
if ((style & CHECKBOX) > 0) {
@@ -119,13 +119,13 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
* Create an advisor that will allow viewer contributions with the given <code>targetID</code>. This
* advisor will provide a presentation model based on the given sync info set. Note that it's important
* to call {@link #dispose()} when finished with an advisor.
- *
+ *
* @param parent
* @param configuration
*/
public TreeViewerAdvisor(Composite parent, ISynchronizePageConfiguration configuration) {
super(configuration);
-
+
// Allow the configuration to provide it's own model manager but if one isn't initialized, then
// simply use the default provided by the advisor.
modelManager = (SynchronizeModelManager)configuration.getProperty(SynchronizePageConfiguration.P_MODEL_MANAGER);
@@ -135,13 +135,13 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
}
Assert.isNotNull(modelManager, "model manager must be set"); //$NON-NLS-1$
modelManager.setViewerAdvisor(this);
-
+
StructuredViewer viewer = TreeViewerAdvisor.createViewer(parent, configuration);
GridData data = new GridData(GridData.FILL_BOTH);
viewer.getControl().setLayoutData(data);
- initializeViewer(viewer);
+ initializeViewer(viewer);
}
-
+
@Override
public void setInitialInput() {
// The input will be set later
@@ -164,7 +164,7 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
}
return new HierarchicalModelManager(configuration);
}
-
+
/*
* For use by test cases only
* @return Returns the modelManager.
@@ -172,7 +172,7 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
public SynchronizeModelManager getModelManager() {
return modelManager;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.viewers.StructuredViewerAdvisor#initializeViewer(org.eclipse.jface.viewers.StructuredViewer)
*/
@@ -180,7 +180,7 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
public boolean validateViewer(StructuredViewer viewer) {
return viewer instanceof AbstractTreeViewer;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.viewers.StructuredViewerAdvisor#initializeListeners(org.eclipse.jface.viewers.StructuredViewer)
*/
@@ -194,7 +194,7 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
}
});
}
-
+
/* private */ void updateStatusLine(IStructuredSelection selection) {
IWorkbenchSite ws = getConfiguration().getSite().getWorkbenchSite();
if (ws != null && ws instanceof IViewSite) {
@@ -202,7 +202,7 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
((IViewSite)ws).getActionBars().getStatusLineManager().setMessage(msg);
}
}
-
+
private String getStatusLineMessage(IStructuredSelection selection) {
if (selection.size() == 1) {
Object first = selection.getFirstElement();
@@ -217,15 +217,15 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
}
}
if (selection.size() > 1) {
- return selection.size() + TeamUIMessages.SynchronizeView_13;
+ return selection.size() + TeamUIMessages.SynchronizeView_13;
}
return ""; //$NON-NLS-1$
}
-
+
/**
* Called to set the input to a viewer. The input to a viewer is always the model created
* by the model provider.
- *
+ *
* @param modelProvider
*/
public final void setInput(final ISynchronizeModelProvider modelProvider) {
@@ -266,17 +266,17 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
});
}
}
-
+
/**
* Install a viewer to be configured with this advisor. An advisor can only be installed with
* one viewer at a time. When this method completes the viewer is considered initialized and
- * can be shown to the user.
+ * can be shown to the user.
* @param viewer the viewer being installed
*/
@Override
public final void initializeViewer(final StructuredViewer viewer) {
super.initializeViewer(viewer);
-
+
final DragSourceListener listener = new DragSourceListener() {
@Override
@@ -288,7 +288,7 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
@Override
public void dragSetData(DragSourceEvent event) {
-
+
if (ResourceTransfer.getInstance().isSupportedType(event.dataType)) {
final IStructuredSelection selection= (IStructuredSelection)viewer.getSelection();
final Object [] array= selection.toArray();
@@ -299,23 +299,23 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
@Override
public void dragFinished(DragSourceEvent event) {}
};
-
+
final int ops = DND.DROP_COPY | DND.DROP_LINK;
viewer.addDragSupport(ops, new Transfer[] { ResourceTransfer.getInstance() }, listener);
-
+
viewer.setLabelProvider(getLabelProvider());
viewer.setContentProvider(getContentProvider());
}
-
+
/**
* Returns the content provider for the viewer.
- *
+ *
* @return the content provider for the viewer.
*/
protected IStructuredContentProvider getContentProvider() {
return new BaseWorkbenchContentProvider();
}
-
+
/**
* Get the label provider that will be assigned to the viewer initialized
* by this configuration. Subclass may override but should either wrap the
@@ -333,7 +333,7 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
}
return new DecoratingColorLabelProvider(provider, decorators);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#dispose()
*/
@@ -344,14 +344,14 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
}
super.dispose();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#initializeStatusLine(org.eclipse.ui.IActionBars)
*/
@Override
protected void initializeStatusLine(IActionBars actionBars) {
statusLine = new SyncInfoSetStatusLineContributionGroup(
- getConfiguration().getSite().getShell(),
+ getConfiguration().getSite().getShell(),
getConfiguration());
IStatusLineManager statusLineMgr = actionBars.getStatusLineManager();
if (statusLineMgr != null && statusLine != null) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/UnchangedResourceModelElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/UnchangedResourceModelElement.java
index 870b87dff..d4b0cc9f0 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/UnchangedResourceModelElement.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/UnchangedResourceModelElement.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -26,7 +26,7 @@ public class UnchangedResourceModelElement extends SynchronizeModelElement {
Assert.isNotNull(resource);
this.resource = resource;
}
-
+
/**
* @return Returns the resource.
*/
@@ -34,7 +34,7 @@ public class UnchangedResourceModelElement extends SynchronizeModelElement {
public IResource getResource() {
return resource;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.structuremergeviewer.DiffNode#getName()
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchAction.java
index d05cb34f8..b27937541 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchAction.java
@@ -15,11 +15,11 @@ import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
/**
* Class used as <i>goto</i> actions for synchronize jobs.
- *
+ *
* @since 3.0
*/
public class WorkbenchAction extends Action implements IWorkbenchAction {
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction#dispose()
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java
index 0829d0512..1a2172a51 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java
@@ -38,7 +38,7 @@ public class WorkbenchPartSynchronizePageSite implements ISynchronizePageSite {
public IWorkbenchPart getPart() {
return part;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getShell()
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ChangeSetActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ChangeSetActionGroup.java
index c3c51cc00..f13cae7c1 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ChangeSetActionGroup.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ChangeSetActionGroup.java
@@ -37,7 +37,7 @@ import org.eclipse.ui.actions.BaseSelectionListenerAction;
/**
* This action group contributes actions that support the management
* of Change sets to a synchronize page.
- *
+ *
* @since 3.1
*/
public class ChangeSetActionGroup extends SynchronizePageActionGroup {
@@ -46,19 +46,19 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
* Menu group that can be added to the context menu
*/
public final static String CHANGE_SET_GROUP = "change_set_group"; //$NON-NLS-1$
-
+
// Constants for persisting sorting options
private static final String P_LAST_COMMENTSORT = TeamUIPlugin.ID + ".P_LAST_COMMENT_SORT"; //$NON-NLS-1$
-
+
public static final FastSyncInfoFilter OUTGOING_RESOURCE_FILTER = new SyncInfoDirectionFilter(
new int[] { SyncInfo.OUTGOING, SyncInfo.CONFLICTING });
-
+
private class CreateChangeSetAction extends SynchronizeModelAction {
-
+
public CreateChangeSetAction(ISynchronizePageConfiguration configuration) {
- super(TeamUIMessages.ChangeLogModelProvider_0, configuration);
+ super(TeamUIMessages.ChangeLogModelProvider_0, configuration);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#needsToSaveDirtyEditors()
*/
@@ -66,7 +66,7 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
protected boolean needsToSaveDirtyEditors() {
return false;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#getSyncInfoFilter()
*/
@@ -74,7 +74,7 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
protected FastSyncInfoFilter getSyncInfoFilter() {
return OUTGOING_RESOURCE_FILTER;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#getSubscriberOperation(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration, org.eclipse.compare.structuremergeviewer.IDiffElement[])
*/
@@ -102,7 +102,7 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
public ChangeSetAction(String title, ISynchronizePageConfiguration configuration) {
super(title);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.actions.BaseSelectionListenerAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
*/
@@ -118,20 +118,20 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
if (first instanceof IAdaptable) {
Object adapter = ((IAdaptable)first).getAdapter(ChangeSet.class);
if (adapter instanceof ActiveChangeSet) {
- return (ActiveChangeSet)adapter;
+ return (ActiveChangeSet)adapter;
}
}
}
return null;
}
}
-
+
private class EditChangeSetAction extends ChangeSetAction {
public EditChangeSetAction(ISynchronizePageConfiguration configuration) {
- super(TeamUIMessages.ChangeLogModelProvider_6, configuration);
+ super(TeamUIMessages.ChangeLogModelProvider_6, configuration);
}
-
+
@Override
public void run() {
ActiveChangeSet set = getSelectedSet();
@@ -139,23 +139,23 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
editChangeSet(set);
}
}
-
+
private class RemoveChangeSetAction extends ChangeSetAction {
public RemoveChangeSetAction(ISynchronizePageConfiguration configuration) {
super(TeamUIMessages.ChangeLogModelProvider_7, configuration);
}
-
+
@Override
public void run() {
ActiveChangeSet set = getSelectedSet();
if (set == null) return;
- if (MessageDialog.openConfirm(getConfiguration().getSite().getShell(), TeamUIMessages.ChangeSetActionGroup_0, NLS.bind(TeamUIMessages.ChangeSetActionGroup_1, new String[] { LegacyActionTools.escapeMnemonics(set.getTitle()) }))) { //
+ if (MessageDialog.openConfirm(getConfiguration().getSite().getShell(), TeamUIMessages.ChangeSetActionGroup_0, NLS.bind(TeamUIMessages.ChangeSetActionGroup_1, new String[] { LegacyActionTools.escapeMnemonics(set.getTitle()) }))) { //
getActiveChangeSetManager().remove(set);
}
}
}
-
+
private class MakeDefaultChangeSetAction extends ChangeSetAction {
public MakeDefaultChangeSetAction(
@@ -188,15 +188,15 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
}
private class AddToChangeSetAction extends SynchronizeModelAction {
-
+
private final ActiveChangeSet set;
-
+
public AddToChangeSetAction(ISynchronizePageConfiguration configuration, ActiveChangeSet set, ISelection selection) {
- super(set == null ? TeamUIMessages.ChangeSetActionGroup_2 : LegacyActionTools.escapeMnemonics(set.getTitle()), configuration);
+ super(set == null ? TeamUIMessages.ChangeSetActionGroup_2 : LegacyActionTools.escapeMnemonics(set.getTitle()), configuration);
this.set = set;
selectionChanged(selection);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#getSyncInfoFilter()
*/
@@ -204,12 +204,12 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
protected FastSyncInfoFilter getSyncInfoFilter() {
return OUTGOING_RESOURCE_FILTER;
}
-
+
@Override
protected boolean needsToSaveDirtyEditors() {
return false;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#getSubscriberOperation(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration, org.eclipse.compare.structuremergeviewer.IDiffElement[])
*/
@@ -234,7 +234,7 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
};
}
}
-
+
/* *****************************************************************************
* Action that allows changing the model providers sort order.
*/
@@ -243,7 +243,7 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
protected ToggleSortOrderAction(String name, int criteria) {
super(name, IAction.AS_RADIO_BUTTON);
this.criteria = criteria;
- update();
+ update();
}
@Override
@@ -259,11 +259,11 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
provider.setViewerSorter(getViewerSorter());
}
}
-
+
public void update() {
setChecked(criteria == sortCriteria);
}
-
+
protected String getSettingsKey() {
return P_LAST_COMMENTSORT;
}
@@ -273,7 +273,7 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
* The model provider for this action group
*/
private ChangeSetModelProvider provider;
-
+
/*
* The actions created by this group
*/
@@ -283,14 +283,14 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
private EditChangeSetAction editChangeSet;
private RemoveChangeSetAction removeChangeSet;
private MakeDefaultChangeSetAction makeDefault;
-
+
private SynchronizePageActionGroup subActions;
-
+
/*
* The currently chosen sort criteria
*/
private int sortCriteria = ChangeSetModelSorter.DATE;
-
+
public static int getSortCriteria(ISynchronizePageConfiguration configuration) {
int sortCriteria = ChangeSetModelSorter.DATE;
try {
@@ -312,25 +312,25 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
}
return sortCriteria;
}
-
+
public ChangeSetActionGroup(ChangeSetModelProvider provider) {
this.provider = provider;
}
-
+
@Override
public void initialize(ISynchronizePageConfiguration configuration) {
super.initialize(configuration);
-
+
if (getChangeSetCapability().supportsCheckedInChangeSets()) {
sortCriteria = getSortCriteria(configuration);
- sortByComment = new MenuManager(TeamUIMessages.ChangeLogModelProvider_0a);
- sortByComment.add(new ToggleSortOrderAction(TeamUIMessages.ChangeLogModelProvider_1a, ChangeSetModelSorter.COMMENT));
- sortByComment.add(new ToggleSortOrderAction(TeamUIMessages.ChangeLogModelProvider_2a, ChangeSetModelSorter.DATE));
- sortByComment.add(new ToggleSortOrderAction(TeamUIMessages.ChangeLogModelProvider_3a, ChangeSetModelSorter.USER));
+ sortByComment = new MenuManager(TeamUIMessages.ChangeLogModelProvider_0a);
+ sortByComment.add(new ToggleSortOrderAction(TeamUIMessages.ChangeLogModelProvider_1a, ChangeSetModelSorter.COMMENT));
+ sortByComment.add(new ToggleSortOrderAction(TeamUIMessages.ChangeLogModelProvider_2a, ChangeSetModelSorter.DATE));
+ sortByComment.add(new ToggleSortOrderAction(TeamUIMessages.ChangeLogModelProvider_3a, ChangeSetModelSorter.USER));
}
-
+
if (getChangeSetCapability().supportsActiveChangeSets()) {
- addToChangeSet = new MenuManager(TeamUIMessages.ChangeLogModelProvider_12);
+ addToChangeSet = new MenuManager(TeamUIMessages.ChangeLogModelProvider_12);
addToChangeSet.setRemoveAllWhenShown(true);
addToChangeSet.addMenuListener(new IMenuListener() {
@Override
@@ -345,13 +345,13 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
makeDefault = new MakeDefaultChangeSetAction(configuration);
removeChangeSet = new RemoveChangeSetAction(configuration);
}
-
+
subActions = getChangeSetCapability().getActionGroup();
if (subActions != null) {
subActions.initialize(configuration);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager)
*/
@@ -362,27 +362,27 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
}
if (getChangeSetCapability().enableActiveChangeSetsFor(getConfiguration())) {
appendToGroup(
- menu,
- CHANGE_SET_GROUP,
+ menu,
+ CHANGE_SET_GROUP,
addToChangeSet);
appendToGroup(
- menu,
- CHANGE_SET_GROUP,
+ menu,
+ CHANGE_SET_GROUP,
editChangeSet);
appendToGroup(
- menu,
- CHANGE_SET_GROUP,
+ menu,
+ CHANGE_SET_GROUP,
removeChangeSet);
appendToGroup(
- menu,
- CHANGE_SET_GROUP,
+ menu,
+ CHANGE_SET_GROUP,
makeDefault);
}
if (subActions != null) {
subActions.fillContextMenu(menu);
}
}
-
+
protected void addChangeSets(IMenuManager manager) {
ChangeSet[] sets = getActiveChangeSetManager().getSets();
Arrays.sort(sets, new Comparator() {
@@ -432,8 +432,8 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
}
super.dispose();
}
-
-
+
+
@Override
public void updateActionBars() {
if (editChangeSet != null)
@@ -444,7 +444,7 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
makeDefault.selectionChanged((IStructuredSelection)getContext().getSelection());
super.updateActionBars();
}
-
+
private void syncExec(final Runnable runnable) {
final Control ctrl = getConfiguration().getPage().getViewer().getControl();
if (ctrl != null && !ctrl.isDisposed()) {
@@ -458,7 +458,7 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
});
}
}
-
+
/**
* Return a viewer sorter that utilizes the sort criteria
* selected by the user.
@@ -467,11 +467,11 @@ public class ChangeSetActionGroup extends SynchronizePageActionGroup {
public ViewerSorter getViewerSorter() {
return new ChangeSetModelSorter(provider, sortCriteria);
}
-
+
private ActiveChangeSet createChangeSet(IDiff[] diffs) {
return getChangeSetCapability().createChangeSet(getConfiguration(), diffs);
}
-
+
private void editChangeSet(ActiveChangeSet set) {
getChangeSetCapability().editChangeSet(getConfiguration(), set);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/CopyToClipboardAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/CopyToClipboardAction.java
index 0ef23ce8f..2b7b71ac3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/CopyToClipboardAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/CopyToClipboardAction.java
@@ -34,15 +34,15 @@ import org.eclipse.ui.part.ResourceTransfer;
* Based on org.eclipse.ui.views.navigator.CopyAction with the additional support for
* copying any non-resource object in the selection and putting the toString() as
* a text transfer.
- *
+ *
* @since 3.1
*/
class CopyToClipboardAction extends SelectionListenerAction {
-
+
private static final String EOL = System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-
+
private final static String ID= TeamUIPlugin.PLUGIN_ID + ".synchronize.action.copy"; //$NON-NLS-1$
-
+
private final Shell fShell;
private final Clipboard fClipboard;
@@ -50,19 +50,19 @@ class CopyToClipboardAction extends SelectionListenerAction {
protected CopyToClipboardAction(Shell shell, INavigatorContentService navigatorContentService) {
super(TeamUIMessages.CopyToClipboardAction_1);
- this.navigatorContentService = navigatorContentService;
+ this.navigatorContentService = navigatorContentService;
Assert.isNotNull(shell);
fShell= shell;
fClipboard= new Clipboard(shell.getDisplay());
- setToolTipText(TeamUIMessages.CopyToClipboardAction_2);
+ setToolTipText(TeamUIMessages.CopyToClipboardAction_2);
setId(ID);
}
-
+
@Override
public void run() {
copyResources(getSelectedResources(), getTextualClipboardContents());
}
-
+
/*
* Return a text representation of all selected elements.
* Use the name from the tree node so what is copied
@@ -158,7 +158,7 @@ class CopyToClipboardAction extends SelectionListenerAction {
/**
* Set the clipboard contents. Prompt to retry if clipboard is busy.
- *
+ *
* @param resources the resources to copy to the clipboard
* @param fileNames file names of the resources to copy to the clipboard
* @param names string representation of all names
@@ -182,16 +182,16 @@ class CopyToClipboardAction extends SelectionListenerAction {
}
if (!data.isEmpty())
fClipboard.setContents(
- data.toArray(),
+ data.toArray(),
(Transfer[]) dataTypes.toArray(new Transfer[dataTypes.size()]));
} catch (SWTError e) {
if (e.code != DND.ERROR_CANNOT_SET_CLIPBOARD)
throw e;
- if (MessageDialog.openQuestion(fShell, TeamUIMessages.CopyToClipboardAction_3, TeamUIMessages.CopyToClipboardAction_4))
+ if (MessageDialog.openQuestion(fShell, TeamUIMessages.CopyToClipboardAction_3, TeamUIMessages.CopyToClipboardAction_4))
setClipboard(resources, fileNames, names);
}
}
-
+
@Override
protected boolean updateSelection(IStructuredSelection selection) {
if (!super.updateSelection(selection))
@@ -228,12 +228,12 @@ class CopyToClipboardAction extends SelectionListenerAction {
}
return false;
}
-
+
@Override
protected List getSelectedNonResources() {
return Arrays.asList(Utils.getNonResources(getStructuredSelection().toArray()));
}
-
+
@Override
protected List getSelectedResources() {
// Calling our own selection utility because the elements in the
@@ -241,7 +241,7 @@ class CopyToClipboardAction extends SelectionListenerAction {
// contribution/ on them.
return Arrays.asList(Utils.getResources(getStructuredSelection().toArray()));
}
-
+
public void dispose() {
fClipboard.dispose();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DefaultSynchronizePageActions.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DefaultSynchronizePageActions.java
index 83a177f0c..78a6d56fa 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DefaultSynchronizePageActions.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DefaultSynchronizePageActions.java
@@ -26,12 +26,12 @@ import org.eclipse.ui.actions.ActionContext;
* General synchronize page actions
*/
public class DefaultSynchronizePageActions extends SynchronizePageActionGroup {
-
+
// Actions
private OpenWithActionGroup openWithActions;
private RefactorActionGroup refactorActions;
private SyncViewerShowPreferencesAction showPreferences;
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.IActionContribution#initialize(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
*/
@@ -54,7 +54,7 @@ public class DefaultSynchronizePageActions extends SynchronizePageActionGroup {
// TODO: Add open menu action which opens in compare editor input
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
*/
@@ -67,7 +67,7 @@ public class DefaultSynchronizePageActions extends SynchronizePageActionGroup {
appendToGroup(menu, ISynchronizePageConfiguration.PREFERENCES_GROUP, showPreferences);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.actions.ActionGroup#updateActionBars()
*/
@@ -76,24 +76,24 @@ public class DefaultSynchronizePageActions extends SynchronizePageActionGroup {
if (openWithActions != null) openWithActions.updateActionBars();
if (refactorActions != null) refactorActions.updateActionBars();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.IActionContribution#fillContextMenu(org.eclipse.jface.action.IMenuManager)
*/
@Override
public void fillContextMenu(IMenuManager manager) {
-
+
final IContributionItem fileGroup = findGroup(manager, ISynchronizePageConfiguration.FILE_GROUP);
if (openWithActions != null && fileGroup != null) {
openWithActions.fillContextMenu(manager, fileGroup.getId());
}
-
+
final IContributionItem editGroup = findGroup(manager, ISynchronizePageConfiguration.EDIT_GROUP);
if (refactorActions != null && editGroup != null) {
refactorActions.fillContextMenu(manager, editGroup.getId());
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#dispose()
*/
@@ -103,7 +103,7 @@ public class DefaultSynchronizePageActions extends SynchronizePageActionGroup {
if (refactorActions != null) refactorActions.dispose();
if (openWithActions != null) openWithActions.dispose();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.actions.ActionGroup#setContext(org.eclipse.ui.actions.ActionContext)
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DirectionFilterActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DirectionFilterActionGroup.java
index 3e5869c52..579635943 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DirectionFilterActionGroup.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DirectionFilterActionGroup.java
@@ -26,27 +26,27 @@ import org.eclipse.ui.actions.ActionGroup;
* This action group provides radio buttons for each possible direction of synchronization information. The
* modes created by this action group can be configured. The actions directly set the mode of an
* {@link ISynchronizePageConfiguration}.
- * @since 3.0
+ * @since 3.0
*/
public class DirectionFilterActionGroup extends ActionGroup implements IPropertyChangeListener {
-
- // The list of created actions
+
+ // The list of created actions
private List actions = new ArrayList(3);
-
+
// The modes
- private DirectionFilterAction incomingMode;
+ private DirectionFilterAction incomingMode;
private DirectionFilterAction outgoingMode;
private DirectionFilterAction bothMode;
private DirectionFilterAction conflictsMode;
-
+
private ISynchronizePageConfiguration configuration;
-
+
/**
- * An action filter for a specific mode.
+ * An action filter for a specific mode.
*/
class DirectionFilterAction extends Action {
private int modeId;
-
+
public DirectionFilterAction(String prefix,String commandId, int modeId) {
super("", AS_RADIO_BUTTON); //$NON-NLS-1$
this.modeId = modeId;
@@ -62,21 +62,21 @@ public class DirectionFilterActionGroup extends ActionGroup implements IProperty
return modeId;
}
}
-
+
/**
* Creates a direction filter group with the given supported modes. The
* possible values for modes are defined by the {@link ISynchronizePageConfiguration}
* interface.
- *
+ *
* @param configuration the page configuration
*/
- public DirectionFilterActionGroup(ISynchronizePageConfiguration configuration) {
+ public DirectionFilterActionGroup(ISynchronizePageConfiguration configuration) {
this.configuration = configuration;
createActions();
configuration.addPropertyChangeListener(this);
checkMode(configuration.getMode());
}
-
+
/**
* Sets up the sync modes and the actions for switching between them.
*/
@@ -95,26 +95,26 @@ public class DirectionFilterActionGroup extends ActionGroup implements IProperty
actions.add(incomingMode);
incomingMode.setChecked(currentMode == ISynchronizePageConfiguration.INCOMING_MODE);
}
-
+
if((supportedModes & ISynchronizePageConfiguration.OUTGOING_MODE) != 0) {
outgoingMode = new DirectionFilterAction("action.directionFilterOutgoing.", "org.eclipse.team.ui.syncview.outgoingFilter", ISynchronizePageConfiguration.OUTGOING_MODE); //$NON-NLS-1$ //$NON-NLS-2$
actions.add(outgoingMode);
outgoingMode.setChecked(currentMode == ISynchronizePageConfiguration.OUTGOING_MODE);
}
-
+
if((supportedModes & ISynchronizePageConfiguration.BOTH_MODE) != 0) {
bothMode = new DirectionFilterAction("action.directionFilterBoth.", "org.eclipse.team.ui.syncview.bothFilter", ISynchronizePageConfiguration.BOTH_MODE); //$NON-NLS-1$ //$NON-NLS-2$
actions.add(bothMode);
bothMode.setChecked(currentMode == ISynchronizePageConfiguration.BOTH_MODE);
}
-
+
if((supportedModes & ISynchronizePageConfiguration.CONFLICTING_MODE) != 0) {
conflictsMode = new DirectionFilterAction("action.directionFilterConflicts.", "org.eclipse.team.ui.syncview.conflictsFilter", ISynchronizePageConfiguration.CONFLICTING_MODE); //$NON-NLS-1$ //$NON-NLS-2$
actions.add(conflictsMode);
conflictsMode.setChecked(currentMode == ISynchronizePageConfiguration.CONFLICTING_MODE);
}
}
-
+
/**
* @param supportedModes
* @return the support mode
@@ -150,21 +150,21 @@ public class DirectionFilterActionGroup extends ActionGroup implements IProperty
}
}
}
-
+
public void fillToolBar(String groupId, IToolBarManager toolBar) {
for (Iterator it = actions.iterator(); it.hasNext();) {
DirectionFilterAction action = (DirectionFilterAction) it.next();
toolBar.appendToGroup(groupId, action);
}
}
-
+
public void fillMenu(IContributionManager manager) {
for (Iterator it = actions.iterator(); it.hasNext();) {
DirectionFilterAction action = (DirectionFilterAction) it.next();
manager.add(action);
}
}
-
+
private void checkMode(int mode) {
for (Iterator it = actions.iterator(); it.hasNext();) {
DirectionFilterAction action = (DirectionFilterAction)it.next();
@@ -175,7 +175,7 @@ public class DirectionFilterActionGroup extends ActionGroup implements IProperty
}
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
*/
@@ -186,7 +186,7 @@ public class DirectionFilterActionGroup extends ActionGroup implements IProperty
checkMode(mode.intValue());
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.actions.ActionGroup#dispose()
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java
index 3d8e66697..5d586ee18 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java
@@ -17,9 +17,9 @@ import org.eclipse.jface.viewers.*;
public class ExpandAllAction extends Action implements ISelectionChangedListener {
-
+
private final AbstractTreeViewer viewer;
-
+
public ExpandAllAction(AbstractTreeViewer viewer) {
this.viewer = viewer;
viewer.addSelectionChangedListener(this);
@@ -28,7 +28,7 @@ public class ExpandAllAction extends Action implements ISelectionChangedListener
public void run() {
expandAllFromSelection();
}
-
+
protected void expandAllFromSelection() {
AbstractTreeViewer tree = viewer;
if (tree == null) return;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshAction.java
index f95fc2151..c622865d3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshAction.java
@@ -30,8 +30,8 @@ import org.eclipse.ui.handlers.IHandlerActivation;
import org.eclipse.ui.handlers.IHandlerService;
/**
- * A global refresh action that allows the user to select the participant to refresh
- * or the default action is to refresh the last selected participant. Participants are
+ * A global refresh action that allows the user to select the participant to refresh
+ * or the default action is to refresh the last selected participant. Participants are
* only listed if they support
* <p>
* This action is normally associated with the Team action set and is enabled by default
@@ -42,7 +42,7 @@ import org.eclipse.ui.handlers.IHandlerService;
public class GlobalRefreshAction extends Action implements IMenuCreator, IWorkbenchWindowPulldownDelegate, ISynchronizeParticipantListener {
public final static String NO_DEFAULT_PARTICPANT = "none"; //$NON-NLS-1$
-
+
private MenuManager menuManager;
private Action synchronizeAction;
private IWorkbenchWindow window;
@@ -80,10 +80,10 @@ public class GlobalRefreshAction extends Action implements IMenuCreator, IWorkbe
if(menuManager != null) {
menuManager.dispose();
}
-
+
// participant listener
TeamUI.getSynchronizeManager().removeSynchronizeParticipantListener(this);
-
+
// handlers
if (window != null) {
IHandlerService hs = (IHandlerService)window.getService(IHandlerService.class);
@@ -139,7 +139,7 @@ public class GlobalRefreshAction extends Action implements IMenuCreator, IWorkbe
public void init(IWorkbenchWindow window) {
this.window = window;
- synchronizeAction = new Action(TeamUIMessages.GlobalRefreshAction_4) {
+ synchronizeAction = new Action(TeamUIMessages.GlobalRefreshAction_4) {
@Override
public void run() {
IWizard wizard = new GlobalSynchronizeWizard();
@@ -149,7 +149,7 @@ public class GlobalRefreshAction extends Action implements IMenuCreator, IWorkbe
};
synchronizeAction.setImageDescriptor(TeamImages.getImageDescriptor(ITeamUIImages.IMG_SYNC_VIEW));
synchronizeAction.setActionDefinitionId("org.eclipse.team.ui.synchronizeAll"); //$NON-NLS-1$
-
+
IHandlerService hs = (IHandlerService)window.getService(IHandlerService.class);
if (hs != null) {
// hook up actions to the commands
@@ -162,7 +162,7 @@ public class GlobalRefreshAction extends Action implements IMenuCreator, IWorkbe
}
};
syncAll = hs.activateHandler("org.eclipse.team.ui.synchronizeAll", handler); //$NON-NLS-1$
-
+
handler = new AbstractHandler() {
@Override
public Object execute(ExecutionEvent event)
@@ -188,7 +188,7 @@ public class GlobalRefreshAction extends Action implements IMenuCreator, IWorkbe
synchronizeAction.run();
}
}
-
+
/*
* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
@@ -199,7 +199,7 @@ public class GlobalRefreshAction extends Action implements IMenuCreator, IWorkbe
actionProxy = action;
updateTooltipText();
}
-
+
private void run(ISynchronizeParticipantReference participant) {
ISynchronizeParticipant p;
try {
@@ -210,8 +210,8 @@ public class GlobalRefreshAction extends Action implements IMenuCreator, IWorkbe
Utils.handle(e);
}
}
-
-
+
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.sync.ISynchronizeParticipantListener#participantsAdded(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
*/
@@ -247,7 +247,7 @@ public class GlobalRefreshAction extends Action implements IMenuCreator, IWorkbe
}
});
}
-
+
/*
* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
@@ -257,7 +257,7 @@ public class GlobalRefreshAction extends Action implements IMenuCreator, IWorkbe
public void selectionChanged(IAction action, ISelection selection) {
actionProxy = action;
}
-
+
protected void updateTooltipText() {
if (actionProxy != null) {
String id = TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT);
@@ -265,11 +265,11 @@ public class GlobalRefreshAction extends Action implements IMenuCreator, IWorkbe
if (!id.equals(NO_DEFAULT_PARTICPANT)) {
ISynchronizeParticipantReference ref = TeamUI.getSynchronizeManager().get(id, secondaryId);
if (ref != null) {
- actionProxy.setToolTipText(NLS.bind(TeamUIMessages.GlobalRefreshAction_5, new String[] { ref.getDisplayName() }));
+ actionProxy.setToolTipText(NLS.bind(TeamUIMessages.GlobalRefreshAction_5, new String[] { ref.getDisplayName() }));
return;
}
}
- actionProxy.setToolTipText(TeamUIMessages.GlobalRefreshAction_4);
+ actionProxy.setToolTipText(TeamUIMessages.GlobalRefreshAction_4);
}
}
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/NavigateAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/NavigateAction.java
index 568a5b40d..0e1221d38 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/NavigateAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/NavigateAction.java
@@ -28,7 +28,7 @@ import org.eclipse.ui.actions.ActionFactory;
public class NavigateAction extends Action {
private final boolean next;
private ISynchronizePageConfiguration configuration;
-
+
public NavigateAction(ISynchronizePageConfiguration configuration, boolean next) {
this.configuration = configuration;
this.next = next;
@@ -45,7 +45,7 @@ public class NavigateAction extends Action {
bars.setGlobalActionHandler(ActionFactory.PREVIOUS.getId(), this);
}
}
-
+
/**
* Two types of navigation is supported: navigation that is specific to coordinating between a view
* and a compare editor and navigation simply using the configured navigator.
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenFileInSystemEditorAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenFileInSystemEditorAction.java
index d2e34ffed..db1272bd6 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenFileInSystemEditorAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenFileInSystemEditorAction.java
@@ -35,12 +35,12 @@ public class OpenFileInSystemEditorAction extends OpenFileAction {
IResource[] resources = Utils.getResources(selection.toArray());
return Arrays.asList(resources);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.actions.SelectionListenerAction#getSelectedNonResources()
*/
@Override
- protected List getSelectedNonResources() {
+ protected List getSelectedNonResources() {
return Collections.EMPTY_LIST;
}
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java
index 5ab2e6fbc..963d42fc1 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -36,14 +36,14 @@ import org.eclipse.ui.*;
/**
* Action to open a compare editor from a SyncInfo object.
- *
+ *
* @see SyncInfoCompareInput
* @since 3.0
*/
public class OpenInCompareAction extends Action {
-
+
private final ISynchronizePageConfiguration configuration;
-
+
public OpenInCompareAction(ISynchronizePageConfiguration configuration) {
this.configuration = configuration;
Utils.initAction(this, "action.openInCompareEditor."); //$NON-NLS-1$
@@ -55,7 +55,7 @@ public class OpenInCompareAction extends Action {
if(selection instanceof IStructuredSelection) {
if (!isOkToRun(selection))
return;
-
+
boolean reuseEditorIfPossible = ((IStructuredSelection) selection).size()==1;
for (Iterator iterator = ((IStructuredSelection) selection).iterator(); iterator.hasNext();) {
Object obj = iterator.next();
@@ -71,7 +71,7 @@ public class OpenInCompareAction extends Action {
}
}
}
-
+
private boolean isOkToRun(ISelection selection) {
// do not open Compare Editor unless all elements have input
Object[] elements = ((IStructuredSelection) selection).toArray();
@@ -88,7 +88,7 @@ public class OpenInCompareAction extends Action {
}
} else {
// all files
- IResource resources[] = Utils.getResources(elements);
+ IResource resources[] = Utils.getResources(elements);
for (int i = 0; i < resources.length; i++) {
if (resources[i].getType() != IResource.FILE) {
// Only supported if all the items are files.
@@ -99,7 +99,7 @@ public class OpenInCompareAction extends Action {
return true;
}
- public static IEditorInput openCompareEditor(ISynchronizePageConfiguration configuration, Object object, boolean keepFocus, boolean reuseEditorIfPossible) {
+ public static IEditorInput openCompareEditor(ISynchronizePageConfiguration configuration, Object object, boolean keepFocus, boolean reuseEditorIfPossible) {
Assert.isNotNull(object);
Assert.isNotNull(configuration);
ISynchronizeParticipant participant = configuration.getParticipant();
@@ -155,31 +155,31 @@ public class OpenInCompareAction extends Action {
return true;
}
- public static CompareEditorInput openCompareEditorOnSyncInfo(ISynchronizePageConfiguration configuration, SyncInfo info, boolean keepFocus, boolean reuseEditorIfPossible) {
+ public static CompareEditorInput openCompareEditorOnSyncInfo(ISynchronizePageConfiguration configuration, SyncInfo info, boolean keepFocus, boolean reuseEditorIfPossible) {
Assert.isNotNull(info);
- Assert.isNotNull(configuration);
+ Assert.isNotNull(configuration);
if(info.getLocal().getType() != IResource.FILE) return null;
SyncInfoCompareInput input = new SyncInfoCompareInput(configuration, info);
return openCompareEditor(getWorkbenchPage(configuration.getSite()), input, keepFocus, configuration.getSite(), reuseEditorIfPossible);
}
-
+
public static CompareEditorInput openCompareEditor(ISynchronizeParticipant participant, SyncInfo info, ISynchronizePageSite site) {
Assert.isNotNull(info);
- Assert.isNotNull(participant);
+ Assert.isNotNull(participant);
if(info.getLocal().getType() != IResource.FILE) return null;
SyncInfoCompareInput input = new SyncInfoCompareInput(participant, info);
return openCompareEditor(getWorkbenchPage(site), input, false, site, false);
}
private static CompareEditorInput openCompareEditor(
- IWorkbenchPage page,
- CompareEditorInput input,
+ IWorkbenchPage page,
+ CompareEditorInput input,
boolean keepFocus,
- ISynchronizePageSite site,
+ ISynchronizePageSite site,
boolean reuseEditorIfPossible) {
if (page == null)
return null;
-
+
openCompareEditor(input, page, reuseEditorIfPossible);
if(site != null && keepFocus) {
site.setFocus();
@@ -203,9 +203,9 @@ public class OpenInCompareAction extends Action {
// try to reuse editors, if possible
openCompareEditor(input, page, true);
}
-
+
public static void openCompareEditor(CompareEditorInput input, IWorkbenchPage page, boolean reuseEditorIfPossible) {
- if (page == null || input == null)
+ if (page == null || input == null)
return;
IEditorPart editor = Utils.findReusableCompareEditor(input, page,
new Class[] { SyncInfoCompareInput.class,
@@ -227,16 +227,16 @@ public class OpenInCompareAction extends Action {
}
/**
- * Returns an editor handle if a SyncInfoCompareInput compare editor is opened on
+ * Returns an editor handle if a SyncInfoCompareInput compare editor is opened on
* the given IResource.
- *
+ *
* @param site the view site in which to search for editors
* @param resource the resource to use to find the compare editor
* @return an editor handle if found and <code>null</code> otherwise
*/
public static IEditorPart findOpenCompareEditor(IWorkbenchPartSite site, IResource resource) {
IWorkbenchPage page = site.getPage();
- IEditorReference[] editorRefs = page.getEditorReferences();
+ IEditorReference[] editorRefs = page.getEditorReferences();
for (int i = 0; i < editorRefs.length; i++) {
final IEditorPart part = editorRefs[i].getEditor(false /* don't restore editor */);
if(part != null) {
@@ -253,11 +253,11 @@ public class OpenInCompareAction extends Action {
}
/**
- * Returns an editor handle if a compare editor is opened on
+ * Returns an editor handle if a compare editor is opened on
* the given object.
* @param site the view site in which to search for editors
* @param object the object to use to find the compare editor
- * @param participant
+ * @param participant
* @return an editor handle if found and <code>null</code> otherwise
*/
public static IEditorPart findOpenCompareEditor(IWorkbenchPartSite site, Object object, ISynchronizeParticipant participant) {
@@ -267,7 +267,7 @@ public class OpenInCompareAction extends Action {
return findOpenCompareEditor(site, info.getLocal());
}
IWorkbenchPage page = site.getPage();
- IEditorReference[] editorRefs = page.getEditorReferences();
+ IEditorReference[] editorRefs = page.getEditorReferences();
for (int i = 0; i < editorRefs.length; i++) {
final IEditorPart part = editorRefs[i].getEditor(false /* don't restore editor */);
if(part != null) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenWithActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenWithActionGroup.java
index a8e653aba..874139108 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenWithActionGroup.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenWithActionGroup.java
@@ -25,7 +25,7 @@ import org.eclipse.ui.keys.IBindingService;
/**
* This is the action group for the open actions. It contains open
- * actions for
+ * actions for
*/
public class OpenWithActionGroup extends ActionGroup {
@@ -71,7 +71,7 @@ public class OpenWithActionGroup extends ActionGroup {
/**
* Adds the OpenWith submenu to the context menu.
- *
+ *
* @param menu the context menu
* @param selection the current selection
*/
@@ -81,7 +81,7 @@ public class OpenWithActionGroup extends ActionGroup {
if (selection == null || selection.size() < 1)
return;
Object[] elements = selection.toArray();
- IResource resources[] = Utils.getResources(elements);
+ IResource resources[] = Utils.getResources(elements);
if (resources.length == 0) {
if (openInCompareAction != null) {
// We can still show the compare editor open if the element has
@@ -119,7 +119,7 @@ public class OpenWithActionGroup extends ActionGroup {
break;
}
}
-
+
if (allFiles) {
if (openInCompareAction != null) {
menu.appendToGroup(groupId, openInCompareAction);
@@ -133,7 +133,7 @@ public class OpenWithActionGroup extends ActionGroup {
}
}
- if (allFiles) {
+ if (allFiles) {
if (openFileAction != null) {
openFileAction.selectionChanged(selection);
menu.appendToGroup(groupId, openFileAction);
@@ -144,7 +144,7 @@ public class OpenWithActionGroup extends ActionGroup {
IWorkbenchSite ws = getSite().getWorkbenchSite();
if (ws != null) {
MenuManager openWithSubmenu =
- new MenuManager(TeamUIMessages.OpenWithActionGroup_0);
+ new MenuManager(TeamUIMessages.OpenWithActionGroup_0);
openWithSubmenu.add(new OpenWithMenu(ws.getPage(), resources[0]));
menu.appendToGroup(groupId, openWithSubmenu);
}
@@ -165,7 +165,7 @@ public class OpenWithActionGroup extends ActionGroup {
/**
* {@link SaveablesCompareEditorInput#getShowInMenuLabel}
- *
+ *
* @return label for "Show In" menu
*/
private static String getShowInMenuLabel() {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PasteAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PasteAction.java
index 668843932..e844fc356 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PasteAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PasteAction.java
@@ -33,12 +33,12 @@ public class PasteAction extends SelectionListenerAction {
public PasteAction(IWorkbenchPart part) {
super(TeamUIMessages.PasteAction_1);
-
+
final ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
setActionDefinitionId(IWorkbenchCommandConstants.EDIT_PASTE);
setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED));
-
+
fShell = part.getSite().getShell();
Assert.isNotNull(fShell);
fClipboard = new Clipboard(fShell.getDisplay());
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PinParticipantAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PinParticipantAction.java
index 446b98298..28aca8498 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PinParticipantAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PinParticipantAction.java
@@ -44,7 +44,7 @@ public class PinParticipantAction extends Action implements IPropertyChangeListe
}
updateState();
}
-
+
private void updateState() {
setChecked(participant != null && participant.isPinned());
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefactorActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefactorActionGroup.java
index 55e915b30..6f90c071f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefactorActionGroup.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefactorActionGroup.java
@@ -27,19 +27,19 @@ import org.eclipse.ui.actions.*;
import org.eclipse.ui.navigator.INavigatorContentService;
/**
- * This action group is modeled after the class of the same name in
+ * This action group is modeled after the class of the same name in
* the org.eclipse.ui.workbench plugin. We couldn't reuse that class
* because of a hard dependency on the navigator.
*/
public class RefactorActionGroup extends ActionGroup {
-
+
private CopyToClipboardAction copyAction;
private MoveResourceAction moveAction;
private RenameResourceAction renameAction;
private ISynchronizePageSite site;
private DeleteResourceAction deleteAction;
private final INavigatorContentService navigatorContentService;
-
+
public RefactorActionGroup(ISynchronizePageSite site) {
this(site, null);
}
@@ -136,20 +136,20 @@ public class RefactorActionGroup extends ActionGroup {
renameAction
.setActionDefinitionId(IWorkbenchCommandConstants.FILE_RENAME);
}
-
+
private IStructuredSelection getSelection() {
final ISelection selection= getContext().getSelection();
- if (!(selection instanceof IStructuredSelection))
+ if (!(selection instanceof IStructuredSelection))
return new StructuredSelection();
return new StructuredSelection(Utils.getResources(((IStructuredSelection)selection).toArray()));
}
-
+
private IStructuredSelection getObjectSelection() {
final ISelection selection= getContext().getSelection();
- if (!(selection instanceof IStructuredSelection))
+ if (!(selection instanceof IStructuredSelection))
return new StructuredSelection();
return (IStructuredSelection)selection;
@@ -178,7 +178,7 @@ public class RefactorActionGroup extends ActionGroup {
}
return true;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.actions.ActionGroup#dispose()
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefreshActionContribution.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefreshActionContribution.java
index ada54606e..9e242b3ca 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefreshActionContribution.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefreshActionContribution.java
@@ -48,10 +48,10 @@ public class RefreshActionContribution extends SynchronizePageActionGroup {
Utils.initAction(refreshSelectionAction, "action.refreshWithRemote."); //$NON-NLS-1$
refreshSelectionAction.setActionDefinitionId("org.eclipse.team.ui.synchronizeLast"); //$NON-NLS-1$
refreshSelectionAction.setId("org.eclipse.team.ui.synchronizeLast"); //$NON-NLS-1$
-
+
Object o = participant.getAdapter(IRefreshable.class);
if (o instanceof IRefreshable) {
- final IRefreshable refreshable = (IRefreshable) o;
+ final IRefreshable refreshable = (IRefreshable) o;
configureSchedule = new Action() {
@Override
public void run() {
@@ -100,6 +100,6 @@ public class RefreshActionContribution extends SynchronizePageActionGroup {
} else {
appendToGroup(menu, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP, configureSchedule);
}
- }
+ }
}
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java
index a69ca7aeb..882b292f0 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java
@@ -29,7 +29,7 @@ import org.eclipse.team.ui.synchronize.*;
* Remove the selected elements from the page
*/
public class RemoveFromViewAction extends SynchronizeModelAction {
-
+
public RemoveFromViewAction(ISynchronizePageConfiguration configuration) {
super(null, configuration);
Utils.initAction(this, "action.removeFromView."); //$NON-NLS-1$
@@ -87,7 +87,7 @@ public class RemoveFromViewAction extends SynchronizeModelAction {
protected boolean needsToSaveDirtyEditors() {
return false;
}
-
+
private boolean confirmRemove() {
IPreferenceStore store = TeamUIPlugin.getPlugin().getPreferenceStore();
if (store.getBoolean(IPreferenceIds.SYNCVIEW_REMOVE_FROM_VIEW_NO_PROMPT)) {
@@ -95,9 +95,9 @@ public class RemoveFromViewAction extends SynchronizeModelAction {
} else {
MessageDialogWithToggle dialog = MessageDialogWithToggle.openOkCancelConfirm(
getConfiguration().getSite().getShell(),
- TeamUIMessages.RemoveFromView_warningTitle,
- TeamUIMessages.RemoveFromView_warningMessage,
- TeamUIMessages.RemoveFromView_warningDontShow,
+ TeamUIMessages.RemoveFromView_warningTitle,
+ TeamUIMessages.RemoveFromView_warningMessage,
+ TeamUIMessages.RemoveFromView_warningDontShow,
false,
null,
null);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java
index 64ce63531..921411bae 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java
@@ -34,7 +34,7 @@ import org.eclipse.ui.model.WorkbenchPartLabelProvider;
/**
* Action to remove the given participant from the synchronize manager.
- * @since 3.0
+ * @since 3.0
*/
public class RemoveSynchronizeParticipantAction extends Action {
@@ -84,9 +84,9 @@ public class RemoveSynchronizeParticipantAction extends Action {
keepGoing[0] = promptToSave(dirtyModels);
} else {
keepGoing[0] = MessageDialog.openQuestion(
- view.getSite().getShell(),
- TeamUIMessages.RemoveSynchronizeParticipantAction_0,
- TeamUIMessages.RemoveSynchronizeParticipantAction_1);
+ view.getSite().getShell(),
+ TeamUIMessages.RemoveSynchronizeParticipantAction_0,
+ TeamUIMessages.RemoveSynchronizeParticipantAction_1);
}
}
@@ -136,13 +136,13 @@ public class RemoveSynchronizeParticipantAction extends Action {
private boolean promptToSave(List dirtyModels) {
if (dirtyModels.size() == 1) {
Saveable model = (Saveable) dirtyModels.get(0);
- String message = NLS.bind(TeamUIMessages.RemoveSynchronizeParticipantAction_2, model.getName());
+ String message = NLS.bind(TeamUIMessages.RemoveSynchronizeParticipantAction_2, model.getName());
// Show a dialog.
String[] buttons = new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL };
MessageDialog d = new MessageDialog(
view.getSite().getShell(), TeamUIMessages.RemoveSynchronizeParticipantAction_3,
null, message, MessageDialog.QUESTION, buttons, 0);
-
+
int choice = d.open();
// Branch on the user choice.
@@ -176,7 +176,7 @@ public class RemoveSynchronizeParticipantAction extends Action {
// If the editor list is empty return.
if (dirtyModels.isEmpty())
return true;
-
+
// Create save block.
final List finalModels = dirtyModels;
IRunnableWithProgress progressOp = new IRunnableWithProgress() {
@@ -209,7 +209,7 @@ public class RemoveSynchronizeParticipantAction extends Action {
// TODO: How do we handle a cancel during save?
return true;
}
-
+
private List getDirtyModels(ISynchronizeParticipant[] participants) {
List result = new ArrayList();
for (int i = 0; i < participants.length; i++) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RestoreRemovedItemsAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RestoreRemovedItemsAction.java
index 55921618f..c07e8c69a 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RestoreRemovedItemsAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RestoreRemovedItemsAction.java
@@ -25,7 +25,7 @@ public class RestoreRemovedItemsAction extends SynchronizeModelAction {
super(null, configuration);
Utils.initAction(this, "action.restoreRemovedFromView."); //$NON-NLS-1$
}
-
+
@Override
protected SynchronizeModelOperation getSubscriberOperation(
ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
@@ -51,12 +51,12 @@ public class RestoreRemovedItemsAction extends SynchronizeModelAction {
}
};
}
-
+
@Override
public boolean isEnabled(){
return true;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#needsToSaveDirtyEditors()
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ShowSynchronizeParticipantAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ShowSynchronizeParticipantAction.java
index 5c51fcde5..6fe37c0e4 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ShowSynchronizeParticipantAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ShowSynchronizeParticipantAction.java
@@ -25,10 +25,10 @@ import org.eclipse.team.internal.ui.synchronize.SynchronizeView;
import org.eclipse.team.ui.synchronize.*;
public class ShowSynchronizeParticipantAction extends Action implements IPropertyChangeListener {
-
+
private ISynchronizeParticipantReference fPage;
private ISynchronizeView fView;
-
+
@Override
public void run() {
try {
@@ -39,11 +39,11 @@ public class ShowSynchronizeParticipantAction extends Action implements IPropert
Utils.handle(e);
}
}
-
+
/**
* Constructs an action to display the given synchronize participant in the
* synchronize view.
- *
+ *
* @param view the synchronize view in which the given page is contained
* @param ref the participant to show
*/
@@ -52,14 +52,14 @@ public class ShowSynchronizeParticipantAction extends Action implements IPropert
fPage = ref;
fView = view;
setImageDescriptor( new ParticipantOverlay( ref));
-
+
try {
fPage.getParticipant().addPropertyChangeListener( this);
} catch( TeamException e) {
Utils.handle(e);
}
}
-
+
@Override
public void propertyChange( PropertyChangeEvent event) {
String property = event.getProperty();
@@ -69,7 +69,7 @@ public class ShowSynchronizeParticipantAction extends Action implements IPropert
}
}
-
+
private static final class ParticipantOverlay extends CompositeImageDescriptor {
private ImageData pinnedData = TeamUIPlugin.getImageDescriptor("ovr/pinned_ovr.gif").getImageData(); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java
index 11af76d02..64625c300 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java
@@ -21,32 +21,32 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
public class StatusLineCLabelContribution extends ContributionItem {
-
- public final static int DEFAULT_CHAR_WIDTH = 40;
-
+
+ public final static int DEFAULT_CHAR_WIDTH = 40;
+
private int charWidth;
private CLabel label;
private Image image;
private String text = ""; //$NON-NLS-1$
private int widthHint = -1;
private int heightHint = -1;
-
+
private Listener listener;
private int eventType;
private String tooltip;
-
+
public StatusLineCLabelContribution(String id, int charWidth) {
super(id);
this.charWidth = charWidth;
setVisible(false); // no text to start with
}
-
+
@Override
- public void fill(Composite parent) {
+ public void fill(Composite parent) {
Label sep = new Label(parent, SWT.SEPARATOR);
label = new CLabel(parent, SWT.SHADOW_NONE);
StatusLineLayoutData statusLineLayoutData = new StatusLineLayoutData();
-
+
if (widthHint < 0) {
GC gc = new GC(parent);
gc.setFont(parent.getFont());
@@ -55,7 +55,7 @@ public class StatusLineCLabelContribution extends ContributionItem {
heightHint = fm.getHeight();
gc.dispose();
}
-
+
statusLineLayoutData.widthHint = widthHint;
label.setLayoutData(statusLineLayoutData);
label.setText(text);
@@ -66,31 +66,31 @@ public class StatusLineCLabelContribution extends ContributionItem {
if(tooltip != null) {
label.setToolTipText(tooltip);
}
-
+
statusLineLayoutData = new StatusLineLayoutData();
statusLineLayoutData.heightHint = heightHint;
sep.setLayoutData(statusLineLayoutData);
}
-
+
public void addListener(int eventType, Listener listener) {
this.eventType = eventType;
this.listener = listener;
}
-
+
public void setText(String text) {
if (text == null)
throw new NullPointerException();
-
+
this.text = text;
-
+
if (label != null && !label.isDisposed())
label.setText(this.text);
-
+
if (this.text.length() == 0) {
if (isVisible()) {
setVisible(false);
IContributionManager contributionManager = getParent();
-
+
if (contributionManager != null)
contributionManager.update(true);
}
@@ -98,37 +98,37 @@ public class StatusLineCLabelContribution extends ContributionItem {
if (!isVisible()) {
setVisible(true);
IContributionManager contributionManager = getParent();
-
+
if (contributionManager != null)
contributionManager.update(true);
}
}
}
-
+
public void setTooltip(String tooltip) {
if (tooltip == null)
throw new NullPointerException();
-
+
this.tooltip = tooltip;
-
+
if (label != null && !label.isDisposed()) {
- label.setToolTipText(this.tooltip);
+ label.setToolTipText(this.tooltip);
}
}
-
+
public void setImage(Image image) {
if (image == null)
throw new NullPointerException();
-
+
this.image = image;
-
+
if (label != null && !label.isDisposed())
label.setImage(this.image);
-
+
if (!isVisible()) {
setVisible(true);
IContributionManager contributionManager = getParent();
-
+
if (contributionManager != null)
contributionManager.update(true);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java
index c5afc13fd..8d8127d67 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java
@@ -33,11 +33,11 @@ public abstract class StatusLineContributionGroup extends ActionGroup {
private StatusLineCLabelContribution outgoing;
private StatusLineCLabelContribution conflicting;
private StatusLineCLabelContribution totalChanges;
-
+
private Image incomingImage = TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_DLG_SYNC_INCOMING).createImage();
private Image outgoingImage = TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_DLG_SYNC_OUTGOING).createImage();
private Image conflictingImage = TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_DLG_SYNC_CONFLICTING).createImage();
-
+
private ISynchronizePageConfiguration configuration;
public StatusLineContributionGroup(final Shell shell, ISynchronizePageConfiguration configuration) {
@@ -64,7 +64,7 @@ public abstract class StatusLineContributionGroup extends ActionGroup {
configuration.setMode(mode);
}
});
- item.setText(label);
+ item.setText(label);
item.setImage(image);
return item;
}
@@ -84,24 +84,24 @@ public abstract class StatusLineContributionGroup extends ActionGroup {
// count changes only if the given mode is supported
final int workspaceConflicting = ((supportedModes & ISynchronizePageConfiguration.CONFLICTING_MODE) != 0) ? countFor(SyncInfo.CONFLICTING) : 0;
final int workspaceOutgoing = ((supportedModes & ISynchronizePageConfiguration.OUTGOING_MODE) != 0) ? countFor(SyncInfo.OUTGOING) : 0;
- final int workspaceIncoming = ((supportedModes & ISynchronizePageConfiguration.INCOMING_MODE) != 0) ? countFor(SyncInfo.INCOMING) : 0;
+ final int workspaceIncoming = ((supportedModes & ISynchronizePageConfiguration.INCOMING_MODE) != 0) ? countFor(SyncInfo.INCOMING) : 0;
TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
@Override
public void run() {
if (isThreeWay()) {
- conflicting.setText(new Integer(workspaceConflicting).toString());
- incoming.setText(new Integer(workspaceIncoming).toString());
- outgoing.setText(new Integer(workspaceOutgoing).toString());
+ conflicting.setText(new Integer(workspaceConflicting).toString());
+ incoming.setText(new Integer(workspaceIncoming).toString());
+ outgoing.setText(new Integer(workspaceOutgoing).toString());
conflicting.setTooltip(NLS.bind(TeamUIMessages.StatisticsPanel_numbersTooltip, new String[] { TeamUIMessages.StatisticsPanel_conflicting }));
outgoing.setTooltip(NLS.bind(TeamUIMessages.StatisticsPanel_numbersTooltip, new String[] { TeamUIMessages.StatisticsPanel_outgoing }));
- incoming.setTooltip(NLS.bind(TeamUIMessages.StatisticsPanel_numbersTooltip, new String[] { TeamUIMessages.StatisticsPanel_incoming }));
+ incoming.setTooltip(NLS.bind(TeamUIMessages.StatisticsPanel_numbersTooltip, new String[] { TeamUIMessages.StatisticsPanel_incoming }));
} else {
if (total == 1) {
- totalChanges.setText(NLS.bind(TeamUIMessages.StatisticsPanel_numberTotalSingular, new String[] { Integer.toString(total) }));
+ totalChanges.setText(NLS.bind(TeamUIMessages.StatisticsPanel_numberTotalSingular, new String[] { Integer.toString(total) }));
} else {
- totalChanges.setText(NLS.bind(TeamUIMessages.StatisticsPanel_numberTotalPlural, new String[] { Integer.toString(total) }));
+ totalChanges.setText(NLS.bind(TeamUIMessages.StatisticsPanel_numberTotalPlural, new String[] { Integer.toString(total) }));
}
}
}
@@ -111,10 +111,10 @@ public abstract class StatusLineContributionGroup extends ActionGroup {
protected abstract int getChangeCount();
protected abstract int countFor(int state);
-
+
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
*/
@Override
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SubscriberActionContribution.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SubscriberActionContribution.java
index 585708f00..3446882e9 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SubscriberActionContribution.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SubscriberActionContribution.java
@@ -23,7 +23,7 @@ import org.eclipse.ui.IActionBars;
* Provides the actions to be associated with a synchronize page
*/
public final class SubscriberActionContribution extends SynchronizePageActionGroup {
-
+
// the changes viewer are contributed via the viewer and not the page.
private Action configureSchedule;
private Action refreshSelectionAction;
@@ -50,13 +50,13 @@ public final class SubscriberActionContribution extends SynchronizePageActionGro
// Refresh all participant resources
resources = participant.getResources();
}
- participant.refresh(resources, null, null, site.getWorkbenchSite()); //
+ participant.refresh(resources, null, null, site.getWorkbenchSite()); //
}
};
Utils.initAction(refreshSelectionAction, "action.refreshWithRemote."); //$NON-NLS-1$
refreshSelectionAction.setActionDefinitionId("org.eclipse.team.ui.synchronizeLast"); //$NON-NLS-1$
refreshSelectionAction.setId("org.eclipse.team.ui.synchronizeLast"); //$NON-NLS-1$
-
+
configureSchedule = new Action() {
@Override
public void run() {
@@ -68,7 +68,7 @@ public final class SubscriberActionContribution extends SynchronizePageActionGro
};
Utils.initAction(configureSchedule, "action.configureSchedulel."); //$NON-NLS-1$
}
-
+
removeFromViewAction = new RemoveFromViewAction(configuration);
restoreRemovedItemsAction = new RestoreRemovedItemsAction(configuration);
appendToGroup(ISynchronizePageConfiguration.P_VIEW_MENU, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP, restoreRemovedItemsAction);
@@ -105,6 +105,6 @@ public final class SubscriberActionContribution extends SynchronizePageActionGro
} else {
appendToGroup(menu, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP, configureSchedule);
}
- }
+ }
}
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncInfoSetStatusLineContributionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncInfoSetStatusLineContributionGroup.java
index 349db2f7d..3b127af33 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncInfoSetStatusLineContributionGroup.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncInfoSetStatusLineContributionGroup.java
@@ -26,7 +26,7 @@ public class SyncInfoSetStatusLineContributionGroup extends
SyncInfoSet set = getSyncInfoSet();
set.addSyncSetChangedListener(this);
}
-
+
@Override
public void dispose() {
getSyncInfoSet().removeSyncSetChangedListener(this);
@@ -34,14 +34,14 @@ public class SyncInfoSetStatusLineContributionGroup extends
}
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.team.internal.ui.sync.sets.ISyncSetChangedListener#syncSetChanged(org.eclipse.team.internal.ui.sync.sets.SyncSetChangedEvent)
*/
@Override
public void syncInfoChanged(ISyncInfoSetChangeEvent event, IProgressMonitor monitor) {
updateCounts();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.subscribers.ISyncInfoSetChangeListener#syncInfoSetReset(org.eclipse.team.core.subscribers.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -57,7 +57,7 @@ public class SyncInfoSetStatusLineContributionGroup extends
public void syncInfoSetErrors(SyncInfoSet set, ITeamStatus[] errors, IProgressMonitor monitor) {
// Nothing to do for errors
}
-
+
private SyncInfoSet getSyncInfoSet() {
return (SyncInfoSet)getConfiguration().getProperty(SynchronizePageConfiguration.P_WORKING_SET_SYNC_INFO_SET);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncViewerShowPreferencesAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncViewerShowPreferencesAction.java
index 362ded5e5..578648e3f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncViewerShowPreferencesAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncViewerShowPreferencesAction.java
@@ -18,7 +18,7 @@ import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
public class SyncViewerShowPreferencesAction extends Action {
private final ISynchronizePageConfiguration configuration;
-
+
public SyncViewerShowPreferencesAction(ISynchronizePageConfiguration configuration) {
this.configuration = configuration;
Utils.initAction(this, "action.syncViewPreferences."); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizeAndRefreshAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizeAndRefreshAction.java
index d4c57ff9f..804e214fb 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizeAndRefreshAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizeAndRefreshAction.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -20,7 +20,7 @@ import org.eclipse.ui.actions.RefreshAction;
/**
* Action which synchronizes the current synchronization participant and locally refreshes the
* selected resources.
- *
+ *
* @since 3.7
*/
public class SynchronizeAndRefreshAction extends Action {
@@ -50,7 +50,7 @@ public class SynchronizeAndRefreshAction extends Action {
final ISelectionProvider selectionProvider= fView.getSite().getSelectionProvider();
if (selectionProvider == null)
return;
-
+
ISelection selection= selectionProvider.getSelection();
if (!(selection instanceof IStructuredSelection))
return;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java
index ac8a0d833..5c37ecf34 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -32,8 +32,8 @@ public class SynchronizePageDropDownAction extends Action implements IMenuCreato
public SynchronizePageDropDownAction(ISynchronizeView view) {
fView= view;
Utils.initAction(this, "action.refreshSubscriber."); //$NON-NLS-1$
-
- synchronizeAction = new Action(TeamUIMessages.GlobalRefreshAction_4) {
+
+ synchronizeAction = new Action(TeamUIMessages.GlobalRefreshAction_4) {
@Override
public void run() {
IWizard wizard = new GlobalSynchronizeWizard();
@@ -43,9 +43,9 @@ public class SynchronizePageDropDownAction extends Action implements IMenuCreato
};
synchronizeAction.setImageDescriptor(TeamImages.getImageDescriptor(ITeamUIImages.IMG_SYNC_VIEW));
synchronizeAction.setActionDefinitionId("org.eclipse.team.ui.synchronizeAll"); //$NON-NLS-1$
- setMenuCreator(this);
+ setMenuCreator(this);
TeamUI.getSynchronizeManager().addSynchronizeParticipantListener(this);
- update();
+ update();
fView.getSite().getKeyBindingService().registerAction(synchronizeAction);
setActionDefinitionId("org.eclipse.team.ui.synchronizeLast"); //$NON-NLS-1$
fView.getSite().getKeyBindingService().registerAction(this);
@@ -60,7 +60,7 @@ public class SynchronizePageDropDownAction extends Action implements IMenuCreato
menuManager.dispose();
menuManager = null;
}
- TeamUI.getSynchronizeManager().removeSynchronizeParticipantListener(this);
+ TeamUI.getSynchronizeManager().removeSynchronizeParticipantListener(this);
}
/* (non-Javadoc)
@@ -96,7 +96,7 @@ public class SynchronizePageDropDownAction extends Action implements IMenuCreato
ISynchronizeParticipant current = fView.getParticipant();
for (int i = 0; i < refs.length; i++) {
ISynchronizeParticipantReference page = refs[i];
- Action action = new ShowSynchronizeParticipantAction(fView, page);
+ Action action = new ShowSynchronizeParticipantAction(fView, page);
try {
boolean isCurrent = page.getParticipant().equals(current);
action.setChecked(isCurrent);
@@ -156,17 +156,17 @@ public class SynchronizePageDropDownAction extends Action implements IMenuCreato
}
});
}
-
+
public void update() {
ISynchronizeParticipant current = fView.getParticipant();
ISynchronizeParticipantReference[] refs = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
String text = null;
if(current != null && refs.length > 0) {
- text = NLS.bind(TeamUIMessages.GlobalRefreshAction_5, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, current.getName()) });
+ text = NLS.bind(TeamUIMessages.GlobalRefreshAction_5, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, current.getName()) });
setToolTipText(text);
setText(text);
} else {
- text = TeamUIMessages.GlobalRefreshAction_4;
+ text = TeamUIMessages.GlobalRefreshAction_4;
setToolTipText(text);
setText(text);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchModelCompareEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchModelCompareEditorInput.java
index 0152a40cb..0914fc0b9 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchModelCompareEditorInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchModelCompareEditorInput.java
@@ -49,7 +49,7 @@ public class ApplyPatchModelCompareEditorInput extends ModelCompareEditorInput {
TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
}
}
-
+
};
Utils.initAction(markAsMergedAction, "action.markAsMerged."); //$NON-NLS-1$
markAsMergedAction.setEnabled(markAsMergedAction.isEnabled());
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchModelSynchronizeParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchModelSynchronizeParticipant.java
index 8dabe3a7f..814995bb4 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchModelSynchronizeParticipant.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchModelSynchronizeParticipant.java
@@ -141,7 +141,7 @@ public class ApplyPatchModelSynchronizeParticipant extends
}
return null;
}
-
+
@Override
public Object getAdapter(Class adapter) {
if (adapter == IRefreshable.class) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchOperation.java
index 118ccf37c..7b6330d9f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchOperation.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchOperation.java
@@ -44,42 +44,42 @@ import org.eclipse.ui.ide.IDE;
* <p>
* FIXME: This class will be removed with the fix for https://bugs.eclipse.org/309803
* </p>
- *
+ *
* @since 3.3
*
*/
public class ApplyPatchOperation implements Runnable {
private IWorkbenchPart part;
-
+
/**
* Used for the Preview Patch page.
*/
private CompareConfiguration configuration;
-
+
/**
* The patch to use as an input into the Apply Patch wizard
*/
private IStorage patch;
-
+
/**
* Specific <code>IResource</code> target to patch.
*/
private IResource target;
-
+
/**
* An optional image for the patch wizard
*/
private ImageDescriptor patchWizardImage;
-
-
+
+
/**
* An optional title for the patchWizard
*/
private String patchWizardTitle;
private boolean saveAllEditors = true;
-
+
/**
* Return whether the given storage contains a patch.
* @param storage the storage
@@ -89,7 +89,7 @@ public class ApplyPatchOperation implements Runnable {
public static boolean isPatch(IStorage storage) throws CoreException {
return internalParsePatch(storage).length > 0;
}
-
+
/**
* Parse the given patch and return the set of file patches that it contains.
* @param storage the storage that contains the patch
@@ -99,19 +99,19 @@ public class ApplyPatchOperation implements Runnable {
public static IFilePatch[] parsePatch(IStorage storage) throws CoreException {
return internalParsePatch(storage);
}
-
+
/**
* Creates a new ApplyPatchOperation with the supplied compare configuration, patch and target.
* The behaviour of the Apply Patch wizard is controlled by the number of parameters supplied:
* <ul>
* <li>If a patch is supplied, the initial input page is skipped. If a patch is not supplied the wizard
* will open on the input page.</li>
- * <li>If the patch is a workspace patch, the target selection page is skipped and the preview page is
+ * <li>If the patch is a workspace patch, the target selection page is skipped and the preview page is
* displayed.</li>
* <li>If the patch is not a workspace patch and the target is specified, the target page is still
* shown with the target selected.</li>
- * </ul>
- *
+ * </ul>
+ *
* @param part an IWorkbenchPart or <code>null</code>
* @param patch an IStorage containing a patch in unified diff format or <code>null</code>
* @param target an IResource which the patch is to be applied to or <code>null</code>
@@ -124,7 +124,7 @@ public class ApplyPatchOperation implements Runnable {
this.target = target;
this.configuration = configuration;
}
-
+
/**
* Create an operation for the given part and resource. This method is a convenience
* method that calls {@link #ApplyPatchOperation(IWorkbenchPart, IStorage, IResource, CompareConfiguration)}
@@ -172,7 +172,7 @@ public class ApplyPatchOperation implements Runnable {
return TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(
IPreferenceIds.APPLY_PATCH_IN_SYNCHRONIZE_VIEW);
}
-
+
/**
* Return the parent shell to be used when the wizard is opened.
* By default, the site of the part is used to get the shell.
@@ -184,7 +184,7 @@ public class ApplyPatchOperation implements Runnable {
return CompareUIPlugin.getShell();
return part.getSite().getShell();
}
-
+
/**
* This method will save all dirty editors. It will prompt the user if the Compare preference to save
* dirty editors before viewing a patch is <code>false</code>. Clients can use this or provide their own
@@ -193,7 +193,7 @@ public class ApplyPatchOperation implements Runnable {
protected void saveAllEditors(){
saveAllEditors = IDE.saveAllEditors(new IResource[]{ResourcesPlugin.getWorkspace().getRoot()}, !ComparePreferencePage.getSaveAllEditors());
}
-
+
/**
* Sets the title of the patch wizard. Needs to be set before {@link #openWizard()} is called.
* @param title a string to display in the title bar
@@ -201,7 +201,7 @@ public class ApplyPatchOperation implements Runnable {
public void setPatchWizardTitle(String title){
this.patchWizardTitle = title;
}
-
+
/**
* Sets the image descriptor to use in the patch wizard. Needs to be set before {@link #openWizard()} is called.
* @param descriptor an image descriptor
@@ -209,7 +209,7 @@ public class ApplyPatchOperation implements Runnable {
public void setPatchWizardImageDescriptor(ImageDescriptor descriptor){
this.patchWizardImage = descriptor;
}
-
+
/* (non-Javadoc)
* @see java.lang.Runnable#run()
*/
@@ -217,7 +217,7 @@ public class ApplyPatchOperation implements Runnable {
public void run() {
openWizard();
}
-
+
private static IFilePatch[] internalParsePatch(IStorage storage)
throws CoreException {
BufferedReader reader = Utilities.createReader(storage);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSubscriber.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSubscriber.java
index d444013ac..341ec0781 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSubscriber.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSubscriber.java
@@ -42,7 +42,7 @@ public class ApplyPatchSubscriber extends Subscriber {
if (!getPatcher().isEnabled(PatchModelProvider.getPatchObject(getLocal(), patcher)))
return IN_SYNC;
- // same story here, one merged hunk is enough to consider the file as merged
+ // same story here, one merged hunk is enough to consider the file as merged
if (getRemote() != null) {
FilePatch2 filePatch2 = ((PatchedFileVariant)getRemote()).getDiff();
IHunk[] hunks = filePatch2.getHunks();
@@ -63,8 +63,8 @@ public class ApplyPatchSubscriber extends Subscriber {
}
}
int kind = super.calculateKind();
- // mark diffs with problems as conflicts
- if (getRemote() != null
+ // mark diffs with problems as conflicts
+ if (getRemote() != null
&& getPatcher().getDiffResult(((PatchedFileVariant)getRemote()).getDiff()).containsProblems())
kind |= CONFLICTING;
return kind;
@@ -126,7 +126,7 @@ public class ApplyPatchSubscriber extends Subscriber {
// file has no IResource members
return new IResource[0];
IContainer container = (IContainer) resource;
-
+
// workspace container members
List existingChildren = new ArrayList();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchModelProvider.java
index b6976fa80..32ccfbaec 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchModelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchModelProvider.java
@@ -52,7 +52,7 @@ public class PatchModelProvider extends ModelProvider {
}
return null;
}
-
+
/**
* Returns the resource associated with the corresponding model element.
*
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchWorkbenchLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchWorkbenchLabelProvider.java
index b9c13e3d3..e43e4e11f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchWorkbenchLabelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchWorkbenchLabelProvider.java
@@ -52,7 +52,7 @@ public class PatchWorkbenchLabelProvider extends WorkbenchLabelProvider
public String getDescription(Object anElement) {
if (anElement instanceof DiffNode) {
return ((DiffNode) anElement).getName();
- }
+ }
return null;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchWorkspace.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchWorkspace.java
index e62a063dd..82675cfae 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchWorkspace.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchWorkspace.java
@@ -70,7 +70,7 @@ public class PatchWorkspace extends DiffNode implements IAdaptable {
}
// see org.eclipse.compare.internal.patch.PatchCompareEditorInput.processDiffs(FilePatch2[])
- private IDiffElement[] processDiffs(FilePatch2[] diffs) {
+ private IDiffElement[] processDiffs(FilePatch2[] diffs) {
List result = new ArrayList();
for (int i = 0; i < diffs.length; i++) {
result.addAll(processDiff(diffs[i], this));
@@ -107,7 +107,7 @@ public class PatchWorkspace extends DiffNode implements IAdaptable {
}
return result;
}
-
+
private static ITypedElement getLeftElement(final FileDiffResult result) {
return new LocalResourceTypedElement(((WorkspaceFileDiffResult)result).getTargetFile()) {
@Override
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardElement.java
index 1e41aba0c..28f52e69a 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardElement.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardElement.java
@@ -32,7 +32,7 @@ public class ConfigurationWizardElement extends WorkbenchAdapter implements IAda
private String name;
private ImageDescriptor imageDescriptor;
private IConfigurationElement configurationElement;
-
+
/**
* Creates a new instance of this class
*
@@ -46,18 +46,18 @@ public class ConfigurationWizardElement extends WorkbenchAdapter implements IAda
* element. That is, create the instance of the class the isv supplied in
* the extension point.
* @return the instance of the configuration wizard of type {@link IConfigurationWizard}
- *
+ *
* @throws CoreException if an error occurs creating the extension
*/
public Object createExecutableExtension() throws CoreException {
return TeamUIPlugin.createExtension(configurationElement, ConfigureProjectWizard.ATT_CLASS);
}
-
+
/**
* Creates the instance of the wizard and initializes with the given input.
* @param projects the projects being shared by this wizard
* @return the wizard instance of type {@link IConfigurationWizard}
- * @throws CoreException if an error occurs creating the extension
+ * @throws CoreException if an error occurs creating the extension
*/
public IWizard createExecutableExtension(IProject[] projects) throws CoreException {
IWorkbench workbench = PlatformUI.getWorkbench();
@@ -82,7 +82,7 @@ public class ConfigurationWizardElement extends WorkbenchAdapter implements IAda
}
return wizard;
}
-
+
/*
* Method declared on IAdaptable.
*/
@@ -95,7 +95,7 @@ public class ConfigurationWizardElement extends WorkbenchAdapter implements IAda
}
/**
* Returns the configuration element
- *
+ *
* @return the configuration element
*/
public IConfigurationElement getConfigurationElement() {
@@ -103,7 +103,7 @@ public class ConfigurationWizardElement extends WorkbenchAdapter implements IAda
}
/**
* Returns the image for the given element
- *
+ *
* @param element the element to get the image for
* @return the image for the given element
*/
@@ -113,7 +113,7 @@ public class ConfigurationWizardElement extends WorkbenchAdapter implements IAda
}
/**
* Returns the label for the given element
- *
+ *
* @param element the element to get the label for
* @return the label for the given element
*/
@@ -131,7 +131,7 @@ public class ConfigurationWizardElement extends WorkbenchAdapter implements IAda
}
/**
* Returns the image for this element.
- *
+ *
* @return the image for this element
*/
public ImageDescriptor getImageDescriptor() {
@@ -139,7 +139,7 @@ public class ConfigurationWizardElement extends WorkbenchAdapter implements IAda
}
/**
* Set the configuration element
- *
+ *
* @param newConfigurationElement the new configuration element
*/
public void setConfigurationElement(IConfigurationElement newConfigurationElement) {
@@ -155,7 +155,7 @@ public class ConfigurationWizardElement extends WorkbenchAdapter implements IAda
}
/**
* Sets the id parameter of this element
- *
+ *
* @param value the new ID
*/
public void setID(String value) {
@@ -163,13 +163,13 @@ public class ConfigurationWizardElement extends WorkbenchAdapter implements IAda
}
/**
* Sets the image for this element.
- *
+ *
* @param value the new image
*/
public void setImageDescriptor(ImageDescriptor value) {
imageDescriptor = value;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.IPluginContribution#getLocalId()
*/
@@ -177,7 +177,7 @@ public class ConfigurationWizardElement extends WorkbenchAdapter implements IAda
public String getLocalId() {
return configurationElement.getAttribute(ConfigureProjectWizard.ATT_ID);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.IPluginContribution#getPluginId()
*/
@@ -185,7 +185,7 @@ public class ConfigurationWizardElement extends WorkbenchAdapter implements IAda
public String getPluginId() {
return configurationElement.getNamespaceIdentifier();
}
-
+
/**
* Return whether the wizard created for this element has pages.
* Unfortunately, the only way to find this out is to create the wizard.
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureMultipleProjectsWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureMultipleProjectsWizard.java
index 65f519442..2996f39cc 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureMultipleProjectsWizard.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureMultipleProjectsWizard.java
@@ -32,13 +32,13 @@ public class ConfigureMultipleProjectsWizard extends Wizard {
this.element = element;
}
-
+
@Override
public void addPages() {
projectSelectionPage = new ProjectSelectionPage(projects, element);
addPage(projectSelectionPage);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#performFinish()
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java
index 045e6b93f..c525cab08 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java
@@ -27,7 +27,7 @@ import org.eclipse.ui.model.AdaptableList;
public class ConfigureProjectWizard extends Wizard {
protected IProject[] projects;
protected ConfigureProjectWizardMainPage mainPage;
-
+
protected final static String PT_CONFIGURATION ="configurationWizards"; //$NON-NLS-1$
protected final static String TAG_WIZARD = "wizard"; //$NON-NLS-1$
protected final static String TAG_DESCRIPTION = "description"; //$NON-NLS-1$
@@ -35,13 +35,13 @@ public class ConfigureProjectWizard extends Wizard {
protected final static String ATT_CLASS = "class"; //$NON-NLS-1$
protected final static String ATT_ICON = "icon"; //$NON-NLS-1$
protected final static String ATT_ID = "id"; //$NON-NLS-1$
-
+
private ConfigureProjectWizard(IProject[] projects) {
this.projects = projects;
setNeedsProgressMonitor(true);
- setWindowTitle(TeamUIMessages.ConfigureProjectWizard_title);
+ setWindowTitle(TeamUIMessages.ConfigureProjectWizard_title);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#addPages()
*/
@@ -69,7 +69,7 @@ public class ConfigureProjectWizard extends Wizard {
}
return super.canFinish();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#performFinish()
*/
@@ -77,38 +77,38 @@ public class ConfigureProjectWizard extends Wizard {
public boolean performFinish() {
// If we are on the first page and the selected wizard has no pages then
// allow it to finish.
-
+
// save dialog settings
mainPage.performFinish();
-
+
if (getContainer().getCurrentPage() == mainPage) {
IWizard noPageWizard = mainPage.getSelectedWizard();
if (noPageWizard != null) {
- if (noPageWizard.canFinish())
+ if (noPageWizard.canFinish())
{
return noPageWizard.performFinish();
}
}
- }
+ }
// If the wizard has pages and there are several
// wizards registered then the registered wizard
- // will call it's own performFinish().
+ // will call it's own performFinish().
return true;
}
-
+
private static class ResizeWizardDialog extends WizardDialog {
public ResizeWizardDialog(Shell parentShell, IWizard newWizard) {
super(parentShell, newWizard);
setShellStyle(getShellStyle() | SWT.RESIZE);
- }
+ }
}
-
+
public static void shareProjects(Shell shell, IProject[] projects) {
IWizard wizard = null;
// If we only have one wizard registered, we'll just use that wizard
// unless it doesn't have any pages
AdaptableList disabledWizards = new AdaptableList();
- AdaptableList wizards = getAvailableWizards(disabledWizards);
+ AdaptableList wizards = getAvailableWizards(disabledWizards);
if (wizards.size() == 1 && disabledWizards.size() == 0) {
ConfigurationWizardElement element = (ConfigurationWizardElement)wizards.getChildren()[0];
if (element.wizardHasPages(projects)) {
@@ -126,10 +126,10 @@ public class ConfigureProjectWizard extends Wizard {
}
openWizard(shell, wizard);
}
-
+
/**
* Returns the configuration wizards that are available for invocation.
- *
+ *
* @return the available wizards
*/
private static AdaptableList getAvailableWizards(AdaptableList disabledWizards) {
@@ -155,7 +155,7 @@ public class ConfigureProjectWizard extends Wizard {
}
return result;
}
-
+
private static boolean filterItem(IConfigurationElement element) {
String extensionId = element.getAttribute(ATT_ID);
String extensionPluginId = element.getNamespaceIdentifier();
@@ -163,14 +163,14 @@ public class ConfigureProjectWizard extends Wizard {
IIdentifier id = activityMgr.getIdentifier(extensionPluginId + "/" + extensionId); //$NON-NLS-1$
return (!id.isEnabled());
}
-
+
/**
* Returns a new ConfigurationWizardElement configured according to the parameters
- * contained in the passed Registry.
+ * contained in the passed Registry.
*
- * May answer null if there was not enough information in the Extension to create
+ * May answer null if there was not enough information in the Extension to create
* an adequate wizard
- *
+ *
* @param element the element for which to create a wizard element
* @return the wizard element for the given element
*/
@@ -206,8 +206,8 @@ public class ConfigureProjectWizard extends Wizard {
}
element.setDescription(description);
-
- // apply CLASS and ICON properties
+
+ // apply CLASS and ICON properties
element.setConfigurationElement(config);
String iconName = config.getAttribute(ATT_ICON);
if (iconName != null) {
@@ -219,7 +219,7 @@ public class ConfigureProjectWizard extends Wizard {
// Missing attribute
return false;
}
- return true;
+ return true;
}
public static void openWizard(Shell shell, IWizard wizard) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java
index 64666006a..64cf733b8 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java
@@ -49,16 +49,16 @@ public class ConfigureProjectWizardMainPage extends WizardPage {
private AdaptableList disabledWizards;
private IProject[] projects;
private String description;
-
+
private IWizard selectedWizard;
-
+
private IDialogSettings settings;
private final static String SELECTED_WIZARD_ID = "selectedWizardId"; //$NON-NLS-1$
private String selectedWizardId;
-
+
/**
* Create a new ConfigureProjectWizardMainPage
- *
+ *
* @param pageName the name of the page
* @param title the title of the page
* @param titleImage the image for the page title
@@ -66,12 +66,12 @@ public class ConfigureProjectWizardMainPage extends WizardPage {
* @param disabledWizards the list of wizards that are disabled via capabilities
*/
public ConfigureProjectWizardMainPage(String pageName, String title, ImageDescriptor titleImage, AdaptableList wizards, AdaptableList disabledWizards) {
- this(pageName,title,titleImage,wizards,disabledWizards, TeamUIMessages.ConfigureProjectWizardMainPage_selectRepository);
+ this(pageName,title,titleImage,wizards,disabledWizards, TeamUIMessages.ConfigureProjectWizardMainPage_selectRepository);
}
-
+
/**
* Create a new ConfigureProjectWizardMainPage
- *
+ *
* @param pageName the name of the page
* @param title the title of the page
* @param titleImage the image for the page title
@@ -85,7 +85,7 @@ public class ConfigureProjectWizardMainPage extends WizardPage {
this.disabledWizards = disabledWizards;
this.description = description;
}
-
+
public IWizard getSelectedWizard() {
return selectedWizard;
}
@@ -93,7 +93,7 @@ public class ConfigureProjectWizardMainPage extends WizardPage {
* @see WizardPage#canFlipToNextPage
*/
@Override
- public boolean canFlipToNextPage() {
+ public boolean canFlipToNextPage() {
return selectedWizard != null && selectedWizard.getPageCount() > 0;
}
/*
@@ -104,18 +104,18 @@ public class ConfigureProjectWizardMainPage extends WizardPage {
Composite composite = new Composite(parent, SWT.NULL);
composite.setLayout(new GridLayout());
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
+
setControl(composite);
// set F1 help
PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.SHARE_PROJECT_PAGE);
-
+
Label label = new Label(composite, SWT.LEFT);
label.setText(description);
GridData data = new GridData();
data.horizontalAlignment = GridData.FILL;
label.setLayoutData(data);
-
+
table = new Table(composite, SWT.SINGLE | SWT.BORDER);
data = new GridData(GridData.FILL_BOTH);
data.heightHint = table.getItemHeight() * 7;
@@ -145,11 +145,11 @@ public class ConfigureProjectWizardMainPage extends WizardPage {
try {
selectedWizard = (IWizard)selectedElement.createExecutableExtension(getUnsharedProjects());
selectedWizardId = selectedElement.getID();
- } catch (CoreException e) {
+ } catch (CoreException e) {
return;
}
selectedWizard.addPages();
-
+
// Ask the container to update button enablement
setPageComplete(true);
}
@@ -171,10 +171,10 @@ public class ConfigureProjectWizardMainPage extends WizardPage {
return super.compare(viewer, e1, e2);
}
});
-
+
if(disabledWizards.size() > 0) {
showAllToggle = new Button(composite, SWT.CHECK);
- showAllToggle.setText(TeamUIMessages.ConfigureProjectWizard_showAll);
+ showAllToggle.setText(TeamUIMessages.ConfigureProjectWizard_showAll);
showAllToggle.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -186,7 +186,7 @@ public class ConfigureProjectWizardMainPage extends WizardPage {
}
});
}
-
+
if(wizards.size() == 0 && showAllToggle != null) {
showAllToggle.setSelection(true);
ArrayList all = new ArrayList(Arrays.asList(wizards.getChildren()));
@@ -198,22 +198,22 @@ public class ConfigureProjectWizardMainPage extends WizardPage {
initializeWizardSelection();
Dialog.applyDialogFont(parent);
}
-
+
/* package */ IProject[] getUnsharedProjects() {
java.util.List unshared = new ArrayList();
for (int i = 0; i < projects.length; i++) {
IProject project = projects[i];
- if (!RepositoryProvider.isShared(project))
+ if (!RepositoryProvider.isShared(project))
unshared.add(project);
}
return (IProject[]) unshared.toArray(new IProject[unshared.size()]);
}
/**
- * The <code>WizardSelectionPage</code> implementation of
- * this <code>IWizardPage</code> method returns the first page
+ * The <code>WizardSelectionPage</code> implementation of
+ * this <code>IWizardPage</code> method returns the first page
* of the currently selected wizard if there is one.
- *
+ *
* @see WizardPage#getNextPage
*/
@Override
@@ -222,17 +222,17 @@ public class ConfigureProjectWizardMainPage extends WizardPage {
if(! WorkbenchActivityHelper.allowUseOf(getTriggerPoint(), ((IStructuredSelection)viewer.getSelection()).getFirstElement())) return null;
return selectedWizard.getStartingPage();
}
-
+
private ITriggerPoint getTriggerPoint() {
return PlatformUI.getWorkbench()
.getActivitySupport().getTriggerPointManager()
.getTriggerPoint(TeamUIPlugin.TRIGGER_POINT_ID);
}
-
+
public void setProjects(IProject[] projects) {
this.projects = projects;
}
-
+
@Override
public void setVisible(boolean visible) {
super.setVisible(visible);
@@ -240,10 +240,10 @@ public class ConfigureProjectWizardMainPage extends WizardPage {
table.setFocus();
}
}
-
+
private void initializeWizardSelection() {
String selectedWizardId = null;
-
+
IDialogSettings dialogSettings = TeamUIPlugin.getPlugin().getDialogSettings();
this.settings = dialogSettings.getSection("ConfigureProjectWizard"); //$NON-NLS-1$
if (this.settings == null) {
@@ -251,13 +251,13 @@ public class ConfigureProjectWizardMainPage extends WizardPage {
}
if (settings != null)
selectedWizardId = settings.get(SELECTED_WIZARD_ID);
-
+
if (selectedWizardId==null)
return;
-
+
// TODO: any checks here?
Object[] children = ((AdaptableList) viewer.getInput()).getChildren();
-
+
for (int i = 0; i < children.length; i++) {
try {
ConfigurationWizardElement element = (ConfigurationWizardElement)children[i];
@@ -270,7 +270,7 @@ public class ConfigureProjectWizardMainPage extends WizardPage {
}
}
}
-
+
/*package*/ void performFinish() {
settings.put(SELECTED_WIZARD_ID, selectedWizardId);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java
index 58ca33d3f..ee093b97f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java
@@ -37,13 +37,13 @@ public class ExportProjectSetLocationPage extends TeamWizardPage {
protected IFile workspaceFile;
protected String file = ""; //$NON-NLS-1$
Button browseButton;
-
+
private boolean saveToFileSystem;
private Button fileRadio;
private Button workspaceRadio;
-
+
protected Text workspaceText;
-
+
public ExportProjectSetLocationPage(String pageName, String title, ImageDescriptor titleImage) {
super(pageName, title, titleImage);
setDescription(TeamUIMessages.ExportProjectSetMainPage_description);
@@ -53,7 +53,7 @@ public class ExportProjectSetLocationPage extends TeamWizardPage {
public void createControl(Composite parent) {
Composite composite = createComposite(parent, 1);
initializeDialogUnits(composite);
-
+
Group locationGroup = new Group(composite, SWT.None);
GridLayout layout = new GridLayout();
locationGroup.setLayout(layout);
@@ -64,14 +64,14 @@ public class ExportProjectSetLocationPage extends TeamWizardPage {
createExportToFile(locationGroup);
createExportToWorkspace(locationGroup);
-
+
saveToFileSystem = true;
-
+
setControl(composite);
updateEnablement();
Dialog.applyDialogFont(parent);
}
-
+
private void createExportToFile(Composite composite) {
fileRadio = new Button(composite, SWT.RADIO);
fileRadio.setText(TeamUIMessages.ExportProjectSetMainPage_FileButton);
@@ -184,7 +184,7 @@ public class ExportProjectSetLocationPage extends TeamWizardPage {
}
});
}
-
+
private void updateEnablement() {
boolean complete;
//update radio buttons
@@ -208,18 +208,18 @@ public class ExportProjectSetLocationPage extends TeamWizardPage {
}
}
}
-
+
if (!isSaveToFileSystem() && workspaceFile != null) {
complete = true;
}
-
+
if (complete) {
setErrorMessage(null);
setDescription(TeamUIMessages.ExportProjectSetMainPage_description);
}
setPageComplete(complete);
}
-
+
@Override
public void setVisible(boolean visible) {
super.setVisible(visible);
@@ -236,7 +236,7 @@ public class ExportProjectSetLocationPage extends TeamWizardPage {
if (workspaceFile != null)
workspaceFile.refreshLocal(IResource.DEPTH_ONE, monitor);
}
-
+
public String getFileName() {
return file;
}
@@ -246,14 +246,14 @@ public class ExportProjectSetLocationPage extends TeamWizardPage {
this.file = file;
}
}
-
+
class WorkspaceDialog extends TitleAreaDialog {
protected TreeViewer wsTreeViewer;
protected Text wsFilenameText;
protected IContainer wsContainer;
protected Image dlgTitleImage;
-
+
private Button okButton;
public WorkspaceDialog(Shell shell) {
@@ -309,7 +309,7 @@ public class ExportProjectSetLocationPage extends TeamWizardPage {
return parent;
}
-
+
@Override
protected void createButtonsForButtonBar(Composite parent) {
super.createButtonsForButtonBar(parent);
@@ -403,14 +403,14 @@ public class ExportProjectSetLocationPage extends TeamWizardPage {
setErrorMessage(TeamUIMessages.ExportProjectSetMainPage_WorkspaceDialogErrorFilenameSegments);
} else {
okButton.setEnabled(true);
- setErrorMessage(null);
+ setErrorMessage(null);
}
}
});
}
}
-
+
class LocationPageContentProvider extends BaseWorkbenchContentProvider {
//Never show closed projects
boolean showClosedProjects = false;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java
index 6f2f1bdd3..897a18968 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java
@@ -41,17 +41,17 @@ import org.eclipse.ui.part.PageBook;
import org.eclipse.ui.views.navigator.ResourceComparator;
public class ExportProjectSetMainPage extends TeamWizardPage {
-
+
PageBook book;
ProjectPage projectPage;
WorkingSetPage workingSetPage;
-
+
IExportProjectSetPage selectedPage;
-
+
Button exportWorkingSets;
-
+
ArrayList passedInSelectedProjects = new ArrayList();
-
+
class ProjectContentProvider implements ITreePathContentProvider{
@Override
@@ -87,7 +87,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
Object obj = path.getLastSegment();
if (obj instanceof IWorkingSet)
return true;
-
+
return false;
}
@@ -107,10 +107,10 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
IWorkingSetManager manager = (IWorkingSetManager) inputElement;
IWorkingSet[] allSets = manager.getAllWorkingSets();
ArrayList resourceSets = new ArrayList();
- for (int i = 0; i < allSets.length; i++)
+ for (int i = 0; i < allSets.length; i++)
if (isWorkingSetSupported(allSets[i]))
resourceSets.add(allSets[i]);
-
+
return resourceSets.toArray(new IWorkingSet[resourceSets.size()]);
} else if (inputElement instanceof IAdaptable){
IProject[] tempProjects = getProjectsForObject(inputElement);
@@ -128,25 +128,25 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
if (projects != null)
tempList.addAll(Arrays.asList(projects));
}
-
+
return (IProject[]) tempList.toArray(new IProject[tempList.size()]);
}
-
+
return null;
}
@Override
public void dispose() {
-
+
}
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-
+
}
-
+
};
-
+
private class ExportProjectSetLabelProvider extends WorkbenchLabelProvider {
@Override
@@ -159,7 +159,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
return super.getForeground(element);
}
}
-
+
private IProject[] getProjectsForObject(Object object) {
ResourceMapping resourceMapping = Utils.getResourceMapping(object);
if (resourceMapping != null) {
@@ -171,7 +171,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
}
return null;
}
-
+
private IProject[] getProjectsForAdaptables(IAdaptable[] adaptable) {
Set projectSet = new HashSet();
for (int i = 0; i < adaptable.length; i++) {
@@ -184,7 +184,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
return null;
}
-
+
private static boolean isWorkingSetSupported(IWorkingSet workingSet) {
if (!workingSet.isEmpty() && !workingSet.isAggregateWorkingSet()) {
IAdaptable[] elements = workingSet.getElements();
@@ -197,11 +197,11 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
}
return false;
}
-
+
private boolean isProjectExportable(IProject project) {
return RepositoryProvider.getProvider(project) != null;
- }
-
+ }
+
public ExportProjectSetMainPage(String pageName, String title, ImageDescriptor titleImage) {
super(pageName, title, titleImage);
setDescription(TeamUIMessages.ExportProjectSetMainPage_Initial_description);
@@ -213,20 +213,20 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
@Override
public void createControl(Composite parent) {
Composite c = SWTUtils.createHVFillComposite(parent, 0);
-
+
//Add the export working set section
exportWorkingSets(c);
-
+
book = new PageBook(c, SWT.NONE);
book.setLayoutData(SWTUtils.createHVFillGridData());
// set F1 help
PlatformUI.getWorkbench().getHelpSystem().setHelp(book, IHelpContextIds.EXPORT_PROJECT_SET_PAGE);
-
+
workingSetPage = new WorkingSetPage();
workingSetPage.createControl(book);
-
+
projectPage = new ProjectPage();
-
+
// filter out unexportable projects
List passedInExportableProjects = new ArrayList();
for (Iterator iterator = passedInSelectedProjects.iterator(); iterator.hasNext();) {
@@ -237,21 +237,21 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
// pass in selected, exportable projects
projectPage.getSelectedProjects().addAll(passedInExportableProjects);
projectPage.getReferenceCountProjects().addAll(passedInExportableProjects);
-
+
projectPage.createControl(book);
setControl(c);
book.showPage(projectPage.getControl());
-
+
selectedPage = projectPage;
-
+
Dialog.applyDialogFont(parent);
}
private void exportWorkingSets(Composite composite) {
exportWorkingSets = new Button(composite, SWT.CHECK | SWT.LEFT);
exportWorkingSets.setText(TeamUIMessages.ExportProjectSetMainPage_ExportWorkingSets);
-
+
exportWorkingSets.setSelection(false);
exportWorkingSets.addSelectionListener(new SelectionAdapter() {
@Override
@@ -269,15 +269,15 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
}
});
}
-
+
public IWorkingSet[] getSelectedWorkingSets(){
return (IWorkingSet[]) selectedPage.getWorkingSet().toArray(new IWorkingSet[selectedPage.getWorkingSet().size()]);
}
-
+
public IProject[] getSelectedProjects() {
return (IProject[]) selectedPage.getSelectedProjects().toArray(new IProject[selectedPage.getSelectedProjects().size()]);
}
-
+
public IProject[] getReferenceCountProjects() {
return (IProject[]) selectedPage.getReferenceCountProjects().toArray(new IProject[selectedPage.getReferenceCountProjects().size()]);
}
@@ -285,7 +285,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
public void setSelectedProjects(IProject[] selectedProjects) {
passedInSelectedProjects.addAll(Arrays.asList(selectedProjects));
}
-
+
private interface IExportProjectSetPage {
HashSet getSelectedProjects();
@@ -293,23 +293,23 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
ArrayList getWorkingSet();
}
-
+
private class ProjectPage extends Page implements IExportProjectSetPage {
private Composite projectComposite;
private CheckboxTableViewer tableViewer;
private Table table;
-
+
HashSet selectedProjects = new HashSet();
ArrayList referenceCountProjects = new ArrayList();
ArrayList selectedWorkingSet = new ArrayList();
@Override
public void createControl(Composite parent) {
-
- projectComposite = SWTUtils.createHVFillComposite(parent, 1);
+
+ projectComposite = SWTUtils.createHVFillComposite(parent, 1);
initializeDialogUnits(projectComposite);
-
+
//Adds the project table
addProjectSection(projectComposite);
initializeProjects();
@@ -326,9 +326,9 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
public void setFocus() {
projectComposite.setFocus();
}
-
+
private void addProjectSection(Composite composite) {
-
+
createLabel(composite, TeamUIMessages.ExportProjectSetMainPage_Select_the_projects_to_include_in_the_project_set__2);
table = new Table(composite, SWT.CHECK | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
@@ -417,19 +417,19 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
}
});
}
-
+
private void initializeProjects() {
tableViewer.setInput(ResourcesPlugin.getWorkspace().getRoot());
-
+
// Check any necessary projects
if (selectedProjects != null) {
tableViewer.setCheckedElements(selectedProjects.toArray(new IProject[selectedProjects.size()]));
}
}
-
+
private void updateEnablement() {
boolean complete = selectedProjects.size() > 0;
-
+
if (complete) {
setErrorMessage(null);
setDescription(TeamUIMessages.ExportProjectSetMainPage_description);
@@ -461,31 +461,31 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
private Composite projectComposite;
private Table wsTable;
private CheckboxTableViewer wsTableViewer;
-
+
private Table table;
private TableViewer tableViewer;
-
+
HashSet selectedProjects = new HashSet();
ArrayList referenceCountProjects = new ArrayList();
ArrayList selectedWorkingSet = new ArrayList();
-
+
/**
* Indicates whether the page has been displayed. If this is the first
* time don't show an error until the user made the first modification.
*/
private boolean pageShown = false;
-
+
@Override
public void createControl(Composite parent) {
-
- projectComposite = SWTUtils.createHVFillComposite(parent, 1);
+
+ projectComposite = SWTUtils.createHVFillComposite(parent, 1);
initializeDialogUnits(projectComposite);
Label label = createLabel (projectComposite, TeamUIMessages.ExportProjectSetMainPage_SelectButton);
GridData grid = (GridData) label.getLayoutData();
label.setData(grid);
-
+
SashForm form = new SashForm(projectComposite, SWT.HORIZONTAL);
form.setLayout(new FillLayout());
GridData data = new GridData(GridData.FILL_BOTH);
@@ -501,7 +501,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
addButtons(projectComposite);
setPageComplete(false);
}
-
+
private void addProjectSection(Composite composite) {
table = new Table(composite, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
tableViewer = new TableViewer(table);
@@ -513,7 +513,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
tableViewer.setLabelProvider(new ExportProjectSetLabelProvider());
tableViewer.setComparator(new ResourceComparator(ResourceComparator.NAME));
}
-
+
private void addWorkingSetSection(Composite projectComposite) {
wsTable = new Table(projectComposite, SWT.CHECK | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
@@ -548,7 +548,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
}
private void addButtons(Composite projectComposite){
-
+
Composite buttonComposite = new Composite(projectComposite, SWT.NONE);
GridLayout layout = new GridLayout();
layout.numColumns = 3;
@@ -556,7 +556,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
buttonComposite.setLayout(layout);
GridData data = new GridData(SWT.FILL, SWT.FILL, false, false);
buttonComposite.setLayoutData(data);
-
+
Button selectAll = new Button(buttonComposite, SWT.PUSH);
data = new GridData();
data.verticalAlignment = GridData.FILL;
@@ -569,7 +569,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
@Override
public void handleEvent(Event event) {
wsTableViewer.setAllChecked(true);
-
+
selectedProjects.removeAll(selectedProjects);
selectedWorkingSet.removeAll(selectedWorkingSet);
Object[] checked = wsTableViewer.getCheckedElements();
@@ -605,7 +605,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
updateEnablement();
}
});
-
+
Button newWorkingSet = new Button(buttonComposite, SWT.PUSH);
data = new GridData();
data.verticalAlignment = GridData.FILL;
@@ -626,9 +626,9 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
propListener = new IPropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent event) {
-
+
}};
-
+
workingSetManager.addPropertyChangeListener(propListener);
wsWizard.open();
//recalculate working sets
@@ -645,7 +645,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
addProjects(elements);
}
}
-
+
wsTableViewer.setInput(workingSetManager);
tableViewer.setInput(selectedProjects);
} finally {
@@ -656,7 +656,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
}
});
}
-
+
@Override
public Control getControl() {
return projectComposite;
@@ -670,13 +670,13 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
public void refresh(){
wsTableViewer.setInput(TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager());
}
-
+
private void updateEnablement() {
boolean complete = selectedProjects.size() > 0
&& selectedWorkingSet.size() > 0;
boolean allExportable = complete;
- // check if there is at least one exportable project selected
+ // check if there is at least one exportable project selected
if (complete || !pageShown) {
complete = false;
for (Iterator iterator = selectedProjects.iterator(); iterator
@@ -688,7 +688,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
allExportable = false;
}
}
-
+
if (!complete && !pageShown) {
setErrorMessage(null);
setMessage(TeamUIMessages.ExportProjectSetMainPage_Initial_description);
@@ -706,7 +706,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
} else {
setErrorMessage(TeamUIMessages.ExportProjectSetMainPage_A_working_set_must_be_selected);
}
-
+
setPageComplete(complete);
pageShown = true;
}
@@ -735,14 +735,14 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
private void workingSetRemoved(IWorkingSet workingSet) {
IAdaptable[] elements = workingSet.getElements();
selectedWorkingSet.remove(workingSet);
-
+
Set tempSet = new HashSet();
for (int i = 0; i < elements.length; i++) {
IProject[] projects = getProjectsForObject(elements[i]);
if (projects != null)
tempSet.addAll(Arrays.asList(projects));
}
-
+
if (!tempSet.isEmpty()) {
selectedProjects.removeAll(tempSet);
for (Iterator iterator = tempSet.iterator(); iterator.hasNext();) {
@@ -752,7 +752,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
selectedProjects.addAll(referenceCountProjects);
}
}
-
+
private void addProjects(IAdaptable[] elements) {
Set tempSet = new HashSet();
for (int j = 0; j < elements.length; j++) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java
index ac4d35d9a..15f61a3d7 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java
@@ -34,13 +34,13 @@ import org.eclipse.ui.views.navigator.ResourceComparator;
/**
* Page that allows the user to select a set of resources that are managed
* by a synchronize participant.
- *
+ *
* Remembers last participant
- *
+ *
* @since 3.0
*/
public class GlobalRefreshWizardSelectionPage extends WizardPage implements IDoubleClickListener, ISelectionChangedListener {
-
+
private final static String DEFAULT_SELECTION= TeamUIPlugin.ID + "GlobalRefreshWizardSelectionPage.default_selection"; //$NON-NLS-1$
private TableViewer fViewer;
@@ -57,7 +57,7 @@ public class GlobalRefreshWizardSelectionPage extends WizardPage implements IDou
return super.getChildren(element);
}
}
-
+
class MyLabelProvider extends LabelProvider {
@Override
public String getText(Object element) {
@@ -66,8 +66,8 @@ public class GlobalRefreshWizardSelectionPage extends WizardPage implements IDou
return descriptor.getName();
}
return null;
- }
-
+ }
+
@Override
public Image getImage(Object element) {
if(element instanceof SynchronizeWizardDescription) {
@@ -83,11 +83,11 @@ public class GlobalRefreshWizardSelectionPage extends WizardPage implements IDou
return null;
}
}
-
+
public GlobalRefreshWizardSelectionPage() {
- super(TeamUIMessages.GlobalRefreshParticipantSelectionPage_0);
- setDescription(TeamUIMessages.GlobalRefreshParticipantSelectionPage_1);
- setTitle(TeamUIMessages.GlobalRefreshParticipantSelectionPage_2);
+ super(TeamUIMessages.GlobalRefreshParticipantSelectionPage_0);
+ setDescription(TeamUIMessages.GlobalRefreshParticipantSelectionPage_1);
+ setTitle(TeamUIMessages.GlobalRefreshParticipantSelectionPage_2);
}
/* (non-Javadoc)
@@ -102,14 +102,14 @@ public class GlobalRefreshWizardSelectionPage extends WizardPage implements IDou
}
}
}
-
+
/**
* Save the page settings into the dialog settings
*/
public void savePageSettings() {
- if (fViewer.getControl().isDisposed())
+ if (fViewer.getControl().isDisposed())
return;
-
+
final IStructuredSelection selection= (IStructuredSelection)fViewer.getSelection();
final Object selected= selection.getFirstElement();
if (!(selected instanceof SynchronizeWizardDescription))
@@ -126,9 +126,9 @@ public class GlobalRefreshWizardSelectionPage extends WizardPage implements IDou
top.setLayout(new GridLayout());
setControl(top);
PlatformUI.getWorkbench().getHelpSystem().setHelp(top, IHelpContextIds.REFRESH_WIZARD_SELECTION_PAGE);
-
+
Label l = new Label(top, SWT.NULL);
- l.setText(TeamUIMessages.GlobalRefreshParticipantSelectionPage_3);
+ l.setText(TeamUIMessages.GlobalRefreshParticipantSelectionPage_3);
fViewer = new TableViewer(top, SWT.BORDER);
GridData data = new GridData(GridData.FILL_BOTH);
fViewer.getControl().setLayoutData(data);
@@ -138,28 +138,28 @@ public class GlobalRefreshWizardSelectionPage extends WizardPage implements IDou
fViewer.setComparator(new ResourceComparator(ResourceComparator.NAME));
fViewer.setInput(TeamUI.getSynchronizeManager());
fViewer.addSelectionChangedListener(this);
-
+
Object toSelect= getDefaultSelection();
if (toSelect == null) {
toSelect= fViewer.getElementAt(0);
}
if (toSelect != null) {
- fViewer.setSelection(new StructuredSelection(toSelect), true);
+ fViewer.setSelection(new StructuredSelection(toSelect), true);
}
fViewer.getTable().setFocus();
Dialog.applyDialogFont(parent2);
}
-
+
private SynchronizeWizardDescription getDefaultSelection() {
-
+
if (!(TeamUI.getSynchronizeManager() instanceof SynchronizeManager))
return null;
final String defaultSelection= getDialogSettings().get(DEFAULT_SELECTION);
- if (defaultSelection == null)
+ if (defaultSelection == null)
return null;
-
- final SynchronizeManager syncManager= (SynchronizeManager)TeamUI.getSynchronizeManager();
+
+ final SynchronizeManager syncManager= (SynchronizeManager)TeamUI.getSynchronizeManager();
final SynchronizeWizardDescription [] wizards= syncManager.getWizardDescriptors();
for (int i = 0; i < wizards.length; i++) {
if (defaultSelection.equals(wizards[i].getId())) {
@@ -177,7 +177,7 @@ public class GlobalRefreshWizardSelectionPage extends WizardPage implements IDou
event.getViewer().getSelection()));
getContainer().showPage(getNextPage());
}
-
+
@Override
public void selectionChanged(SelectionChangedEvent event) {
// Initialize the wizard so we can tell whether to enable the
@@ -197,7 +197,7 @@ public class GlobalRefreshWizardSelectionPage extends WizardPage implements IDou
SynchronizeWizardDescription selectedDescriptor = (SynchronizeWizardDescription)ss.getFirstElement();
try {
wizard = selectedDescriptor.createWizard();
- wizard.addPages();
+ wizard.addPages();
// Ask the container to update button enablement
setPageComplete(true);
setDescription(selectedDescriptor.getDescription());
@@ -206,11 +206,11 @@ public class GlobalRefreshWizardSelectionPage extends WizardPage implements IDou
setPageComplete(false);
}
}
-
+
public IWizard getSelectedWizard() {
return this.wizard;
}
-
+
@Override
public IWizardPage getNextPage() {
if (wizard == null) return null;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalSynchronizeWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalSynchronizeWizard.java
index b84a17f4a..2ed735b35 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalSynchronizeWizard.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalSynchronizeWizard.java
@@ -22,11 +22,11 @@ import org.eclipse.ui.IWorkbench;
/**
* The wizard for synchronizing a synchronize participant.
- *
+ *
* @since 3.0
*/
public class GlobalSynchronizeWizard extends Wizard {
-
+
private final static String DIALOG_SETTINGS_SECTION= "SynchronizeWizard"; //$NON-NLS-1$
protected IWorkbench workbench;
@@ -34,11 +34,11 @@ public class GlobalSynchronizeWizard extends Wizard {
protected ISynchronizeParticipantReference participant;
public GlobalSynchronizeWizard() {
- setWindowTitle(TeamUIMessages.GlobalSynchronizeWizard_11);
+ setWindowTitle(TeamUIMessages.GlobalSynchronizeWizard_11);
setDefaultPageImageDescriptor(TeamImages.getImageDescriptor(ITeamUIImages.IMG_WIZBAN_SHARE));
setForcePreviousAndNextButtons(true);
setNeedsProgressMonitor(false);
-
+
final IDialogSettings pluginSettings= TeamUIPlugin.getPlugin().getDialogSettings();
IDialogSettings wizardSettings= pluginSettings.getSection(DIALOG_SETTINGS_SECTION);
if (wizardSettings == null) {
@@ -47,7 +47,7 @@ public class GlobalSynchronizeWizard extends Wizard {
}
setDialogSettings(wizardSettings);
}
-
+
/*
* @see Wizard#addPages
*/
@@ -55,8 +55,8 @@ public class GlobalSynchronizeWizard extends Wizard {
public void addPages() {
mainPage = new GlobalRefreshWizardSelectionPage();
addPage(mainPage);
- }
-
+ }
+
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.IWizard#canFinish()
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java
index 360aaf9e1..464163ac1 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java
@@ -38,7 +38,7 @@ public class ImportProjectSetMainPage extends TeamWizardPage {
Combo fileCombo;
String file = ""; //$NON-NLS-1$
Button browseButton;
-
+
String urlString = ""; //$NON-NLS-1$
Combo urlCombo;
@@ -54,8 +54,8 @@ public class ImportProjectSetMainPage extends TeamWizardPage {
private boolean runInBackground = isRunInBackgroundPreferenceOn();
// a wizard shouldn't be in an error state until the state has been modified by the user
private int messageType = NONE;
- private WorkingSetGroup workingSetGroup;
-
+ private WorkingSetGroup workingSetGroup;
+
private PsfFilenameStore psfFilenameStore = PsfFilenameStore.getInstance();
private PsfUrlStore psfUrlStore = PsfUrlStore.getInstance();
@@ -94,7 +94,7 @@ public class ImportProjectSetMainPage extends TeamWizardPage {
// set F1 help
PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.IMPORT_PROJECT_SET_PAGE);
-
+
Composite inner = new Composite(composite, SWT.NULL);
inner.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
GridLayout layout = new GridLayout();
@@ -102,7 +102,7 @@ public class ImportProjectSetMainPage extends TeamWizardPage {
layout.marginHeight = 0;
layout.marginWidth = 0;
inner.setLayout(layout);
-
+
fileInputButton = new Button(inner, SWT.RADIO);
fileInputButton
.setText(TeamUIMessages.ImportProjectSetMainPage_Project_Set_File);
@@ -121,13 +121,13 @@ public class ImportProjectSetMainPage extends TeamWizardPage {
fileCombo.addListener(SWT.Modify, new Listener() {
@Override
public void handleEvent(Event event) {
- file = fileCombo.getText();
+ file = fileCombo.getText();
updateFileEnablement();
}
});
browseButton = new Button(inner, SWT.PUSH);
- browseButton.setText(TeamUIMessages.ImportProjectSetMainPage_Browse_3);
+ browseButton.setText(TeamUIMessages.ImportProjectSetMainPage_Browse_3);
urlInputButton = new Button(inner, SWT.RADIO);
urlInputButton
@@ -183,9 +183,9 @@ public class ImportProjectSetMainPage extends TeamWizardPage {
});
addWorkingSetSection(composite);
-
+
Button runInBackgroundCheckbox = SWTUtils.createCheckBox(composite, TeamUIMessages.ImportProjectSetMainPage_runInBackground, 3);
-
+
runInBackgroundCheckbox.setSelection(isRunInBackgroundPreferenceOn());
runInBackgroundCheckbox.addSelectionListener(new SelectionAdapter() {
@Override
@@ -193,7 +193,7 @@ public class ImportProjectSetMainPage extends TeamWizardPage {
runInBackground = !runInBackground;
}
});
-
+
setControl(composite);
setDefaultInputType();
Dialog.applyDialogFont(parent);
@@ -229,7 +229,7 @@ public class ImportProjectSetMainPage extends TeamWizardPage {
new String[] { "org.eclipse.ui.resourceWorkingSetPage", //$NON-NLS-1$
"org.eclipse.jdt.ui.JavaWorkingSetPage" /* JavaWorkingSetUpdater.ID */}); //$NON-NLS-1$
}
-
+
private void updateUrlEnablement() {
boolean complete = false;
setMessage(null);
@@ -265,7 +265,7 @@ public class ImportProjectSetMainPage extends TeamWizardPage {
boolean complete = false;
setMessage(null);
setErrorMessage(null);
-
+
if (file.length() == 0) {
setMessage(TeamUIMessages.ImportProjectSetMainPage_specifyFile, messageType);
setPageComplete(false);
@@ -275,12 +275,12 @@ public class ImportProjectSetMainPage extends TeamWizardPage {
File f = new File(file);
if (!f.exists()) {
messageType = ERROR;
- setMessage(TeamUIMessages.ImportProjectSetMainPage_The_specified_file_does_not_exist_4, messageType);
+ setMessage(TeamUIMessages.ImportProjectSetMainPage_The_specified_file_does_not_exist_4, messageType);
setPageComplete(false);
return;
} else if (f.isDirectory()) {
messageType = ERROR;
- setMessage(TeamUIMessages.ImportProjectSetMainPage_You_have_specified_a_folder_5, messageType);
+ setMessage(TeamUIMessages.ImportProjectSetMainPage_You_have_specified_a_folder_5, messageType);
setPageComplete(false);
return;
} else if (!ProjectSetImporter.isValidProjectSetFile(file)) {
@@ -291,12 +291,12 @@ public class ImportProjectSetMainPage extends TeamWizardPage {
}
complete = true;
}
-
+
if (complete) {
setErrorMessage(null);
setDescription(TeamUIMessages.ImportProjectSetMainPage_description);
}
-
+
setPageComplete(complete);
}
@@ -315,22 +315,22 @@ public class ImportProjectSetMainPage extends TeamWizardPage {
fileCombo.setFocus();
}
}
-
+
/**
* Return the working sets selected on the page or an empty array if none
* were selected.
- *
+ *
* @return the selected working sets or an empty array
*/
public IWorkingSet[] getWorkingSets() {
return workingSetGroup.getSelectedWorkingSets();
}
-
+
private static boolean isRunInBackgroundPreferenceOn() {
return TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(
IPreferenceIds.RUN_IMPORT_IN_BACKGROUND);
}
-
+
public boolean isRunInBackgroundOn() {
return runInBackground;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java
index 08a053a3c..14e28cb90 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java
@@ -22,16 +22,16 @@ import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.IWorkingSetManager;
public class ImportProjectSetOperation extends TeamOperation {
-
+
private String psfFileContents;
private String urlString;
private String psfFile;
private IWorkingSet[] workingSets;
-
-
+
+
/**
* Operation for importing a Team Project Set stored in a String
- *
+ *
* @param context
* a runnable context,
* <code>null</null> for running in background
@@ -55,7 +55,7 @@ public class ImportProjectSetOperation extends TeamOperation {
/**
* Operation for importing a Team Project Set file
- *
+ *
* @param context
* a runnable context
* @param psfFile
@@ -72,13 +72,13 @@ public class ImportProjectSetOperation extends TeamOperation {
this.psfFile = psfFile;
this.workingSets = workingSets;
}
-
+
private void runForStringContent(IProgressMonitor monitor) throws InvocationTargetException{
IProject[] newProjects = ProjectSetImporter.importProjectSetFromString(
psfFileContents, urlString, getShell(), monitor);
createWorkingSet(workingSets, newProjects);
}
-
+
private void runForFile(IProgressMonitor monitor) throws InvocationTargetException{
PsfFilenameStore.getInstance().remember(psfFile);
IProject[] newProjects = ProjectSetImporter.importProjectSet(psfFile,
@@ -88,7 +88,7 @@ public class ImportProjectSetOperation extends TeamOperation {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
*/
@Override
@@ -103,7 +103,7 @@ public class ImportProjectSetOperation extends TeamOperation {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.team.ui.TeamOperation#canRunAsJob()
*/
@Override
@@ -113,14 +113,14 @@ public class ImportProjectSetOperation extends TeamOperation {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.team.ui.TeamOperation#getJobName()
*/
@Override
protected String getJobName() {
return TeamUIMessages.ImportProjectSetMainPage_jobName;
}
-
+
private void createWorkingSet(IWorkingSet[] workingSets, IProject[] projects) {
IWorkingSetManager manager = TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager();
String workingSetName;
@@ -138,7 +138,7 @@ public class ImportProjectSetOperation extends TeamOperation {
System.arraycopy(tempElements, 0, finalElementList, 0, tempElements.length);
System.arraycopy(adaptedProjects, 0,finalElementList, tempElements.length, adaptedProjects.length);
oldSet.setElements(finalElementList);
- }
+ }
}
}
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSelectionPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSelectionPage.java
index 22de48cfb..15634212d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSelectionPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSelectionPage.java
@@ -44,7 +44,7 @@ public class ProjectSelectionPage extends WizardPage {
protected ProjectSelectionPage(IProject[] projects, ConfigurationWizardElement element) {
super("projectSelectionPage", //$NON-NLS-1$
- NLS.bind(TeamUIMessages.ProjectSelectionPage_1, element.getLabel(null)),
+ NLS.bind(TeamUIMessages.ProjectSelectionPage_1, element.getLabel(null)),
TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_WIZBAN_SHARE));
setDescription(NLS.bind(TeamUIMessages.ProjectSelectionPage_0, element.getLabel(null)));
this.projects = projects;
@@ -112,7 +112,7 @@ public class ProjectSelectionPage extends WizardPage {
}
}
}
-
+
private void updateProjectList(IProject project) {
if (RepositoryProvider.isShared(project)) {
projectList.remove(project);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.java
index 3109a7734..ed5f0cfe4 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.java
@@ -34,22 +34,22 @@ public class ProjectSetExportWizard extends Wizard implements IExportWizard {
ExportProjectSetMainPage mainPage;
ExportProjectSetLocationPage locationPage;
IStructuredSelection selection;
-
+
public ProjectSetExportWizard() {
setNeedsProgressMonitor(true);
- setWindowTitle(TeamUIMessages.ProjectSetExportWizard_Project_Set_1);
+ setWindowTitle(TeamUIMessages.ProjectSetExportWizard_Project_Set_1);
}
-
+
@Override
public void addPages() {
- mainPage = new ExportProjectSetMainPage("projectSetMainPage", TeamUIMessages.ProjectSetExportWizard_Export_a_Project_Set_3, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_PROJECTSET_EXPORT_BANNER)); //$NON-NLS-1$
+ mainPage = new ExportProjectSetMainPage("projectSetMainPage", TeamUIMessages.ProjectSetExportWizard_Export_a_Project_Set_3, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_PROJECTSET_EXPORT_BANNER)); //$NON-NLS-1$
IProject[] projects = (IProject[])selection.toList().toArray(new IProject[0]);
addPage(mainPage);
mainPage.setSelectedProjects(projects);
locationPage = new ExportProjectSetLocationPage("projectSetLocationPage", TeamUIMessages.ProjectSetExportWizard_Export_a_Project_Set_3, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_PROJECTSET_EXPORT_BANNER)); //$NON-NLS-1$
addPage(locationPage);
}
-
+
@Override
public boolean performFinish() {
final boolean[] result = new boolean[] {false};
@@ -66,20 +66,20 @@ public class ProjectSetExportWizard extends Wizard implements IExportWizard {
File file = new File(filename);
File parentFile = file.getParentFile();
if (parentFile != null && !parentFile.exists()) {
- boolean r = MessageDialog.openQuestion(getShell(), TeamUIMessages.ProjectSetExportWizard_Question_4, TeamUIMessages.ProjectSetExportWizard_Target_directory_does_not_exist__Would_you_like_to_create_it__5); //
+ boolean r = MessageDialog.openQuestion(getShell(), TeamUIMessages.ProjectSetExportWizard_Question_4, TeamUIMessages.ProjectSetExportWizard_Target_directory_does_not_exist__Would_you_like_to_create_it__5); //
if (!r) {
result[0] = false;
return;
}
r = parentFile.mkdirs();
if (!r) {
- MessageDialog.openError(getShell(), TeamUIMessages.ProjectSetExportWizard_Export_Problems_6, TeamUIMessages.ProjectSetExportWizard_An_error_occurred_creating_the_target_directory_7); //
+ MessageDialog.openError(getShell(), TeamUIMessages.ProjectSetExportWizard_Export_Problems_6, TeamUIMessages.ProjectSetExportWizard_An_error_occurred_creating_the_target_directory_7); //
result[0] = false;
return;
}
}
if (file.exists() && file.isFile()) {
- boolean r = MessageDialog.openQuestion(getShell(), TeamUIMessages.ProjectSetExportWizard_Question_8, TeamUIMessages.ProjectSetExportWizard_Target_already_exists__Would_you_like_to_overwrite_it__9); //
+ boolean r = MessageDialog.openQuestion(getShell(), TeamUIMessages.ProjectSetExportWizard_Question_8, TeamUIMessages.ProjectSetExportWizard_Target_already_exists__Would_you_like_to_overwrite_it__9); //
if (!r) {
result[0] = false;
return;
@@ -111,17 +111,17 @@ public class ProjectSetExportWizard extends Wizard implements IExportWizard {
list.add(project);
}
}
-
-
+
+
UIProjectSetSerializationContext context = new UIProjectSetSerializationContext(getShell(), filename);
-
+
BufferedWriter writer = null;
try {
// if file was written to the workspace, perform the validateEdit
if (!locationPage.isSaveToFileSystem())
locationPage.validateEditWorkspaceFile(getShell());
writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF-8")); //$NON-NLS-1$
-
+
//
XMLMemento xmlMemento = getXMLMementoRoot();
Iterator it = map.keySet().iterator();
@@ -149,7 +149,7 @@ public class ProjectSetExportWizard extends Wizard implements IExportWizard {
workingSets[i].saveState(memento);
}
}
- xmlMemento.save(writer);
+ xmlMemento.save(writer);
result[0] = true;
} catch (IOException e) {
throw new InvocationTargetException(e);
@@ -164,7 +164,7 @@ public class ProjectSetExportWizard extends Wizard implements IExportWizard {
}
}
}
-
+
// if file was written to the workspace, refresh it
if (!locationPage.isSaveToFileSystem())
try {
@@ -172,7 +172,7 @@ public class ProjectSetExportWizard extends Wizard implements IExportWizard {
} catch (CoreException e) {
//throw away
}
-
+
// notify provider types of the project set write
for (Iterator iter = map.keySet().iterator();iter.hasNext();) {
String id = (String) iter.next();
@@ -184,7 +184,7 @@ public class ProjectSetExportWizard extends Wizard implements IExportWizard {
}
}
}
-
+
monitor.done();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java
index e2ed08300..da78464ea 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java
@@ -29,12 +29,12 @@ public class ProjectSetImportWizard extends Wizard implements IImportWizard {
public ProjectSetImportWizard() {
setNeedsProgressMonitor(true);
- setWindowTitle(TeamUIMessages.ProjectSetImportWizard_Project_Set_1);
+ setWindowTitle(TeamUIMessages.ProjectSetImportWizard_Project_Set_1);
}
-
+
@Override
public void addPages() {
- mainPage = new ImportProjectSetMainPage("projectSetMainPage", TeamUIMessages.ProjectSetImportWizard_Import_a_Project_Set_3, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_PROJECTSET_IMPORT_BANNER)); //$NON-NLS-1$
+ mainPage = new ImportProjectSetMainPage("projectSetMainPage", TeamUIMessages.ProjectSetImportWizard_Import_a_Project_Set_3, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_PROJECTSET_IMPORT_BANNER)); //$NON-NLS-1$
addPage(mainPage);
}
@@ -73,14 +73,14 @@ public class ProjectSetImportWizard extends Wizard implements IImportWizard {
throw (Error)target;
}
if (target instanceof SAXException) {
- ErrorDialog.openError(getShell(), null, null, new Status(IStatus.ERROR, TeamUIPlugin.ID, 0, NLS.bind(TeamUIMessages.ProjectSetImportWizard_2, new String[] { target.getMessage() }), target));
+ ErrorDialog.openError(getShell(), null, null, new Status(IStatus.ERROR, TeamUIPlugin.ID, 0, NLS.bind(TeamUIMessages.ProjectSetImportWizard_2, new String[] { target.getMessage() }), target));
return false;
}
- ErrorDialog.openError(getShell(), null, null, new Status(IStatus.ERROR, TeamUIPlugin.ID, 0, NLS.bind(TeamUIMessages.ProjectSetImportWizard_3, new String[] { target.getMessage() }), target));
+ ErrorDialog.openError(getShell(), null, null, new Status(IStatus.ERROR, TeamUIPlugin.ID, 0, NLS.bind(TeamUIMessages.ProjectSetImportWizard_3, new String[] { target.getMessage() }), target));
}
return result[0];
}
-
+
@Override
public void init(IWorkbench workbench, IStructuredSelection selection) {
// The code that finds "selection" is broken (it is always empty), so we
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfFilenameStore.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfFilenameStore.java
index d2dfd62bc..8ef8c68a4 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfFilenameStore.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfFilenameStore.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -28,7 +28,7 @@ public class PsfFilenameStore extends PsfStore {
private static String _selectedFilename = null;
private static PsfFilenameStore instance;
-
+
public static PsfFilenameStore getInstance(){
if(instance==null){
instance = new PsfFilenameStore();
@@ -99,5 +99,5 @@ public class PsfFilenameStore extends PsfStore {
return FILENAMES;
}
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfStore.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfStore.java
index 9c7d2ee69..023178cc1 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfStore.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfStore.java
@@ -22,14 +22,14 @@ public abstract class PsfStore {
private static final int HISTORY_LENGTH = 10;
private static final String STORE_SECTION = "ImportPSFDialog"; //$NON-NLS-1$
-
+
private static IDialogSettings _section;
-
+
protected abstract String getPreviousTag();
protected abstract String getListTag();
-
+
public abstract String getSuggestedDefault();
-
+
protected String getPrevious() {
IDialogSettings section = getSettingsSection();
String retval = section.get(getPreviousTag());
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfUrlStore.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfUrlStore.java
index 115230fa9..8758ac88d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfUrlStore.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PsfUrlStore.java
@@ -12,7 +12,7 @@ package org.eclipse.team.internal.ui.wizards;
/**
* Stores URL history for importing project sets window.
- *
+ *
*/
public class PsfUrlStore extends PsfStore {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/TeamWizardPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/TeamWizardPage.java
index a1c1e0350..bbdd03a16 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/TeamWizardPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/TeamWizardPage.java
@@ -40,12 +40,12 @@ public abstract class TeamWizardPage extends WizardPage {
*/
protected Composite createComposite(Composite parent, int numColumns) {
Composite composite = new Composite(parent, SWT.NULL);
-
+
// GridLayout
GridLayout layout = new GridLayout();
layout.numColumns = numColumns;
composite.setLayout(layout);
-
+
// GridData
GridData data = new GridData();
data.verticalAlignment = GridData.FILL;
@@ -101,7 +101,7 @@ public abstract class TeamWizardPage extends WizardPage {
/**
* Create a drop-down combo box specific for this application
- *
+ *
* @param parent the parent of the new combo box
* @return the new combo box
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java
index ccc119fb3..c220b5ed8 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java
@@ -35,9 +35,9 @@ public class WorkingSetsDialog extends TitleAreaDialog {
protected Image dlgTitleImage;
private String selectedWorkingSet;
-
+
public static final String resourceWorkingSetId = "org.eclipse.ui.resourceWorkingSetPage"; //$NON-NLS-1$
-
+
public WorkingSetsDialog(Shell shell) {
super(shell);
setShellStyle(getShellStyle() | SWT.RESIZE);
@@ -129,10 +129,10 @@ public class WorkingSetsDialog extends TitleAreaDialog {
}
});
}
-
+
class WorkingSetLabelProvider extends LabelProvider {
private Map icons;
-
+
public WorkingSetLabelProvider() {
icons = new Hashtable();
}
@@ -165,7 +165,7 @@ public class WorkingSetsDialog extends TitleAreaDialog {
}
return icon;
}
-
+
@Override
public String getText(Object object) {
Assert.isTrue(object instanceof IWorkingSet);
@@ -173,7 +173,7 @@ public class WorkingSetsDialog extends TitleAreaDialog {
return workingSet.getLabel();
}
}
-
+
public String getSelectedWorkingSet(){
return selectedWorkingSet;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java
index d435c3a8c..9a341b40e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java
@@ -18,7 +18,7 @@ import org.eclipse.ui.IWorkbench;
/**
* IConfigurationWizard defines the interface that users of the extension
* point <code>org.eclipse.team.ui.configurationWizards</code> must implement.
- *
+ *
* @since 2.0
*/
public interface IConfigurationWizard extends IWizard {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizardExtension.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizardExtension.java
index 4a64c5de5..f4cc70d7a 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizardExtension.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizardExtension.java
@@ -16,13 +16,13 @@ import org.eclipse.ui.IWorkbench;
/**
* Extends {@link IConfigurationWizard} to support the sharing of multiple projects.
- * The Share Project wizard uses the "adaptable" mechanism (see {@link IAdapterManager} to obtain an
+ * The Share Project wizard uses the "adaptable" mechanism (see {@link IAdapterManager} to obtain an
* <code>IConfigurationWizardExtension</code> for an <code>IConfigurationWizard</code>
* class so clients may choose to have their <code>IConfigurationWizard</code> class implement this
* interface as well or may choose to use the adaptable mechanism to provide the extension.
* <p>
* Clients may implement this interface.
- *
+ *
* @see IConfigurationWizard
* @since 3.4
*/
@@ -36,7 +36,7 @@ public interface IConfigurationWizardExtension {
* before other methods are called.
* </p>
*
- * @param workbench the current workbench
+ * @param workbench the current workbench
* @param projects the selected projects
*/
void init(IWorkbench workbench, IProject[] projects);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISaveableWorkbenchPart.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISaveableWorkbenchPart.java
index 9d9e5d235..41410d48c 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISaveableWorkbenchPart.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISaveableWorkbenchPart.java
@@ -17,8 +17,8 @@ import org.eclipse.ui.IWorkbenchPart;
/**
* A saveable workbench part is a visual component that can be shown within
- * different contexts (e.g a dialog, workbench page).
- *
+ * different contexts (e.g a dialog, workbench page).
+ *
* @see SaveablePartDialog
* @since 3.0
* @deprecated Clients should use a subclass of {@link CompareEditorInput}
@@ -26,7 +26,7 @@ import org.eclipse.ui.IWorkbenchPart;
*/
@Deprecated
public interface ISaveableWorkbenchPart extends ISaveablePart, IWorkbenchPart {
-
+
/**
* The property id for <code>isDirty</code>.
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IScmUrlImportWizardPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IScmUrlImportWizardPage.java
index 17a460aaf..c388c8735 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IScmUrlImportWizardPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IScmUrlImportWizardPage.java
@@ -16,12 +16,12 @@ import org.eclipse.team.core.ScmUrlImportDescription;
/**
* IScmUrlImportWizardPage defines the interface that users of the extension
* point <code>org.eclipse.team.ui.scmUrlImportPages</code> must implement.
- *
+ *
* <strong>EXPERIMENTAL</strong>. This class has been added as part of a work in
* progress. There is no guarantee that this API will work or that it will
* remain the same. Please do not use this API without consulting with the Team
* team.
- *
+ *
* @since 3.6
*/
public interface IScmUrlImportWizardPage extends IWizardPage {
@@ -34,7 +34,7 @@ public interface IScmUrlImportWizardPage extends IWizardPage {
* Called when the import wizard is closed by selecting the finish button.
* Implementers may store the page result (new/changed bundle import
* descriptions in getSelection) here.
- *
+ *
* @return if the operation was successful. The wizard will only close when
* <code>true</code> is returned.
*/
@@ -44,7 +44,7 @@ public interface IScmUrlImportWizardPage extends IWizardPage {
* Return the import descriptions for the page. The descriptions may differ from those initially
* set using {@link #setSelection(ScmUrlImportDescription[])} if the user modified the import
* configuration.
- *
+ *
* @return the SCM URLs descriptions for the page or <code>null</code> if no selection has been
* set
*/
@@ -54,7 +54,7 @@ public interface IScmUrlImportWizardPage extends IWizardPage {
* Sets the import descriptions to be edited on the page. The passed
* descriptions can be edited and should be returned in
* {@link #getSelection()}.
- *
+ *
* @param descriptions
* the SCM URLs descriptions edited on the page.
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java
index 5b1d742cc..ed0ad523a 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java
@@ -13,9 +13,9 @@ package org.eclipse.team.ui;
/**
* Images that are available for providers to re-use. They include
* common overlays and wizard images. A provider can use their own
- * custom images, these shared images are only available for
+ * custom images, these shared images are only available for
* convenience.
- *
+ *
* @see TeamImages
* @since 2.0
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageCompareEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageCompareEditorInput.java
index fa13643b2..0b9ed7274 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageCompareEditorInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageCompareEditorInput.java
@@ -32,7 +32,7 @@ import org.eclipse.ui.progress.IProgressService;
* of feeding compare viewers.
* <p>
* This class is not intended to be subclassed by clients outside of the Team framework.
- *
+ *
* @since 3.3
*/
public abstract class PageCompareEditorInput extends CompareEditorInput implements IContentChangeListener {
@@ -47,7 +47,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen
protected PageCompareEditorInput(CompareConfiguration configuration) {
super(configuration);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#createStructureInputPane(org.eclipse.swt.widgets.Composite)
*/
@@ -93,7 +93,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen
StructuredSelection newSelection = convertSelection(selection, true);
super.doubleClick(new DoubleClickEvent((Viewer)event.getSource(), newSelection));
}
-
+
@Override
public void setInput(Object input) {
super.setInput(input);
@@ -111,16 +111,16 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen
hookupListeners();
return pagePane;
}
-
+
/**
- * Create the page for this part and return the top level control
+ * Create the page for this part and return the top level control
* for the page.
* @param parent the parent composite
* @param toolBarManager the toolbar manager for the page
* @return the top-level control for the page
*/
protected abstract IPage createPage(CompareViewerPane parent, IToolBarManager toolBarManager);
-
+
/**
* Return the selection provider for the page. This method is
* called after the page is created in order to register a
@@ -128,7 +128,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen
* @return the selection provider for the page
*/
protected abstract ISelectionProvider getSelectionProvider();
-
+
/**
* Set the title of the page's page to the given text. The title
* will appear in the header of the pane containing the page.
@@ -137,7 +137,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen
protected void setPageDescription(String title) {
pagePane.setText(title);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#handleDispose()
*/
@@ -147,7 +147,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen
cleanupListeners();
unhookContentChangeListener();
}
-
+
private void hookupListeners() {
ISelectionProvider selectionProvider = getSelectionProvider();
if (selectionProvider != null)
@@ -158,7 +158,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen
sv.addDoubleClickListener(pagePane);
}
}
-
+
private void cleanupListeners() {
ISelectionProvider selectionProvider = getSelectionProvider();
if (selectionProvider != null)
@@ -169,7 +169,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen
sv.removeDoubleClickListener(pagePane);
}
}
-
+
private void hookContentChangeListener(ICompareInput node) {
if (hookedInput == node)
return;
@@ -184,7 +184,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen
((IContentChangeNotifier)right).addContentChangeListener(this);
}
}
-
+
private void unhookContentChangeListener() {
if (hookedInput != null) {
ITypedElement left = hookedInput.getLeft();
@@ -219,7 +219,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen
}
return null;
}
-
+
/**
* Convenience method that calls {@link #prepareInput(ICompareInput, CompareConfiguration, IProgressMonitor)}
* with a progress monitor.
@@ -250,7 +250,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen
// Ignore
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.IContentChangeListener#contentChanged(org.eclipse.compare.IContentChangeNotifier)
*/
@@ -258,7 +258,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen
public void contentChanged(IContentChangeNotifier source) {
setDirty(true);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#canRunInBackground()
*/
@@ -266,7 +266,7 @@ public abstract class PageCompareEditorInput extends CompareEditorInput implemen
public boolean canRunAsJob() {
return true;
}
-
+
/**
* Prepare the compare input for display in a content viewer. This method is
* called from {@link #prepareCompareInput(ICompareInput)} and may be called
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageSaveablePart.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageSaveablePart.java
index ad532771b..ad5e43975 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageSaveablePart.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/PageSaveablePart.java
@@ -44,7 +44,7 @@ import org.eclipse.ui.progress.IProgressService;
* Abstract class for hosting a page based structure input view for the purposes
* of feeding compare viewers.
* <p>
- *
+ *
* @since 3.2
* @noextend This class is not intended to be subclassed by clients outside of the Team framework.
* @deprecated Clients should use a subclass of {@link CompareEditorInput}
@@ -52,24 +52,24 @@ import org.eclipse.ui.progress.IProgressService;
*/
@Deprecated
public abstract class PageSaveablePart extends SaveablePartAdapter implements IContentChangeListener{
-
+
private CompareConfiguration cc;
Shell shell;
-
+
// Tracking of dirty state
private boolean fDirty= false;
private ArrayList fDirtyViewers= new ArrayList();
private IPropertyChangeListener fDirtyStateListener;
-
+
// SWT controls
private CompareViewerSwitchingPane fContentPane;
private CompareViewerPane fEditionPane;
private CompareViewerSwitchingPane fStructuredComparePane;
private Control control;
-
+
// Configuration options
private boolean showContentPanes = true;
-
+
/**
* Create a saveable part.
* @param shell the shell for the part
@@ -78,7 +78,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
protected PageSaveablePart(Shell shell, CompareConfiguration compareConfiguration){
this.shell = shell;
this.cc = compareConfiguration;
-
+
fDirtyStateListener= new IPropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent e) {
@@ -89,7 +89,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
if (newValue instanceof Boolean)
changed= ((Boolean)newValue).booleanValue();
setDirty(e.getSource(), changed);
- }
+ }
}
};
}
@@ -116,9 +116,9 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
data.grabExcessHorizontalSpace = true;
composite.setLayout(layout);
composite.setLayoutData(data);
-
+
shell = parent.getShell();
-
+
Splitter vsplitter = new Splitter(composite, SWT.VERTICAL);
vsplitter.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL));
// we need two panes: the left for the elements, the right one for the structured diff
@@ -138,7 +138,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
feedInput2(e.getSelection());
}
});
- fEditionPane.setText(TeamUIMessages.ParticipantPageSaveablePart_0);
+ fEditionPane.setText(TeamUIMessages.ParticipantPageSaveablePart_0);
fContentPane = new CompareViewerSwitchingPane(vsplitter, SWT.BORDER | SWT.FLAT) {
@Override
protected Viewer getViewer(Viewer oldViewer, Object input) {
@@ -159,14 +159,14 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
}
);
hookContentChangeListener((ICompareInput)input);
- }
+ }
return newViewer;
}
};
vsplitter.setWeights(new int[]{30, 70});
-
+
control = composite;
-
+
ToolBarManager toolBarManager = CompareViewerPane.getToolBarManager(fEditionPane);
Control c = createPage(fEditionPane, toolBarManager);
fEditionPane.setContent(c);
@@ -174,7 +174,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
if(! showContentPanes) {
hsplitter.setMaximizedControl(fEditionPane);
}
-
+
getSelectionProvider().addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
@@ -185,7 +185,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
}
});
}
-
+
/**
* Return the selection provider for the page. This method is
* called after the page is created in order to register a
@@ -195,14 +195,14 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
protected abstract ISelectionProvider getSelectionProvider();
/**
- * Create the page for this part and return the top level control
+ * Create the page for this part and return the top level control
* for the page.
* @param parent the parent composite
* @param toolBarManager the toolbar manager for the page
* @return the top-level control for the page
*/
protected abstract Control createPage(Composite parent, ToolBarManager toolBarManager);
-
+
/**
* Set the title of the page's page to the given text. The title
* will appear in the header of the pane containing the page.
@@ -211,7 +211,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
protected void setPageDescription(String title) {
fEditionPane.setText(title);
}
-
+
/**
* Set the saveable part's dirty state to the given state.
* @param dirty the dirty state
@@ -228,15 +228,15 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
fDirtyViewers.clear();
}
}
-
+
private void setDirty(Object source, boolean dirty) {
Assert.isNotNull(source);
if (dirty)
fDirtyViewers.add(source);
else
fDirtyViewers.remove(source);
- }
-
+ }
+
/**
* Feeds input from the page into the content and structured viewers.
* @param input the input
@@ -248,7 +248,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
if (fStructuredComparePane != null && !fStructuredComparePane.isDisposed())
fStructuredComparePane.setInput(input);
}
-
+
/*
* Feeds selection from structure viewer to content viewer.
*/
@@ -258,7 +258,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
if (input != null)
fContentPane.setInput(input);
}
-
+
/**
* Convenience method that calls {@link #prepareInput(ICompareInput, CompareConfiguration, IProgressMonitor)}
* with a progress monitor.
@@ -289,7 +289,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
// Ignore
}
}
-
+
/**
* Prepare the compare input for display in a content viewer. This method is
* called from {@link #prepareCompareInput(ICompareInput)} and may be called
@@ -312,7 +312,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
((IContentChangeNotifier)right).addContentChangeListener(this);
}
}
-
+
/**
* Return the parent shell of this part.
* @return the parent shell of this part
@@ -320,7 +320,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
protected Shell getShell() {
return shell;
}
-
+
/**
* This method is internal to the framework and should not be called by clients
* outside of the framework.
@@ -334,7 +334,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
}
));
}
-
+
/*
* Find a viewer that can provide a structure view for the given compare input.
* Return <code>null</code> if a suitable viewer could not be found.
@@ -347,7 +347,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
private Viewer findStructureViewer(Composite parent, Viewer oldViewer, ICompareInput input) {
return CompareUI.findStructureViewer(oldViewer, input, parent, cc);
}
-
+
/*
* Find a viewer that can provide a content compare view for the given compare input.
* Return <code>null</code> if a suitable viewer could not be found.
@@ -360,7 +360,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
private Viewer findContentViewer(Composite parent, Viewer oldViewer, ICompareInput input) {
return CompareUI.findContentViewer(oldViewer, input, parent, cc);
}
-
+
/**
* Return a compare input that represents the selection.
* This input is used to feed the structure and content
@@ -386,7 +386,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
/**
* Set whether the file contents panes should be shown. If they are not,
* only the page will be shown.
- *
+ *
* @param showContentPanes whether to show contents pane
*/
public void setShowContentPanes(boolean showContentPanes) {
@@ -395,7 +395,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
/**
* Returns the primary control for this part.
- *
+ *
* @return the primary control for this part.
*/
public Control getControl() {
@@ -414,7 +414,7 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
* This method flushes the content in any viewers. Subclasses should
* override if they need to perform additional processing when a save is
* performed.
- *
+ *
* @param monitor
* a progress monitor
*/
@@ -422,10 +422,10 @@ public abstract class PageSaveablePart extends SaveablePartAdapter implements IC
public void doSave(IProgressMonitor monitor) {
flushViewers(monitor);
}
-
+
private void flushViewers(IProgressMonitor monitor) {
Iterator iter = fDirtyViewers.iterator();
-
+
for (int i=0; i<fDirtyViewers.size(); i++){
Object element = iter.next();
IFlushable flushable = (IFlushable)Utils.getAdapter(element, IFlushable.class);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartAdapter.java
index b97b4546a..70c57437e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartAdapter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartAdapter.java
@@ -16,7 +16,7 @@ import org.eclipse.ui.*;
/**
* This adapter provides default implementations for methods on {@link ISaveableWorkbenchPart} and
- * {@link IWorkbenchPart}.
+ * {@link IWorkbenchPart}.
* <p>
* Classes that want to implement a saveable part can simply implement the methods that
* they need while accepting the provided defaults for most of the methods.
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartDialog.java
index 73adaed7c..80c5990a1 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartDialog.java
@@ -26,7 +26,7 @@ import org.eclipse.ui.PlatformUI;
/**
* A dialog that displays a {@link org.eclipse.team.ui.ISaveableWorkbenchPart} and
* ensures that changes made to the input are saved when the dialog is closed.
- *
+ *
* @see ISaveableWorkbenchPart
* @see SaveablePartAdapter
* @since 3.0
@@ -35,7 +35,7 @@ import org.eclipse.ui.PlatformUI;
*/
@Deprecated
public class SaveablePartDialog extends TrayDialog {
-
+
private ISaveableWorkbenchPart input;
private String fContextId;
private boolean hasSettings = true;
@@ -43,8 +43,8 @@ public class SaveablePartDialog extends TrayDialog {
/**
* Creates a dialog with the given title and input. The input is not created until the dialog
* is opened.
- *
- * @param shell the parent shell or <code>null</code> to create a top level shell.
+ *
+ * @param shell the parent shell or <code>null</code> to create a top level shell.
* @param input the part to show in the dialog.
*/
public SaveablePartDialog(Shell shell, ISaveableWorkbenchPart input) {
@@ -52,7 +52,7 @@ public class SaveablePartDialog extends TrayDialog {
setShellStyle(getShellStyle() | SWT.RESIZE | SWT.MAX);
this.input = input;
}
-
+
/* (non-Javadoc)
* Method declared on Dialog.
*/
@@ -60,7 +60,7 @@ public class SaveablePartDialog extends TrayDialog {
protected void createButtonsForButtonBar(Composite parent) {
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
}
-
+
/* (non-Javadoc)
* Method declared on Dialog.
*/
@@ -74,7 +74,7 @@ public class SaveablePartDialog extends TrayDialog {
Dialog.applyDialogFont(parent2);
return parent;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.internal.ResizableDialog#close()
*/
@@ -83,23 +83,23 @@ public class SaveablePartDialog extends TrayDialog {
saveChanges();
return super.close();
}
-
+
/**
* Save any changes to the compare editor.
*/
private void saveChanges() {
MessageDialog dialog = new MessageDialog(
- getShell(), TeamUIMessages.ParticipantCompareDialog_2, null,
- TeamUIMessages.ParticipantCompareDialog_3, MessageDialog.QUESTION, new String[]{IDialogConstants.YES_LABEL,
+ getShell(), TeamUIMessages.ParticipantCompareDialog_2, null,
+ TeamUIMessages.ParticipantCompareDialog_3, MessageDialog.QUESTION, new String[]{IDialogConstants.YES_LABEL,
IDialogConstants.NO_LABEL}, 0); // YES is the default
-
+
if (input.isDirty() && dialog.open() == IDialogConstants.OK_ID) {
BusyIndicator.showWhile(null, new Runnable() {
@Override
public void run() {
input.doSave(new NullProgressMonitor());
}
- });
+ });
}
}
@@ -111,7 +111,7 @@ public class SaveablePartDialog extends TrayDialog {
protected ISaveableWorkbenchPart getInput() {
return input;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsSettings()
*/
@@ -126,7 +126,7 @@ public class SaveablePartDialog extends TrayDialog {
}
return dialogSettings;
}
-
+
/**
* Set the help content id of this dialog.
* @param contextId the help context id
@@ -134,7 +134,7 @@ public class SaveablePartDialog extends TrayDialog {
public void setHelpContextId(String contextId) {
fContextId= contextId;
}
-
+
/*
* @see org.eclipse.jface.window.Window#configureShell(Shell)
*/
@@ -144,7 +144,7 @@ public class SaveablePartDialog extends TrayDialog {
if (fContextId != null)
PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, fContextId);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.Dialog#getInitialSize()
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java
index b9301cfec..bc8ca3eda 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java
@@ -18,9 +18,9 @@ import org.eclipse.team.internal.ui.TeamUIPlugin;
* TeamImages provides convenience methods for accessing shared images
* provided by the <i>org.eclipse.team.ui</i> plug-in.
* <p>
- * This class provides <code>ImageDescriptor</code>s for each named image in
- * {@link ISharedImages}. All <code>Image</code> objects created from the
- * provided descriptors are managed the caller and must be disposed appropriately.
+ * This class provides <code>ImageDescriptor</code>s for each named image in
+ * {@link ISharedImages}. All <code>Image</code> objects created from the
+ * provided descriptors are managed the caller and must be disposed appropriately.
* </p>
* <p>
* This class is not intended to be subclassed or instantiated by clients
@@ -30,16 +30,16 @@ public class TeamImages {
/**
* Returns the image descriptor for the given image ID.
* Returns <code>null</code> if there is no such image.
- *
+ *
* @param id the identifier for the image to retrieve
* @return the image descriptor associated with the given ID
*/
public static ImageDescriptor getImageDescriptor(String id) {
return TeamUIPlugin.getImageDescriptor(id);
- }
+ }
/**
* Convenience method to get an image descriptor for an extension.
- *
+ *
* @param extension the extension declaring the image
* @param subdirectoryAndFilename the path to the image
* @return the image descriptor for the extension
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamOperation.java
index 3f9227b3a..91d86b17b 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamOperation.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamOperation.java
@@ -32,13 +32,13 @@ import org.eclipse.ui.progress.IProgressConstants;
* An operation that can be configured to run in the foreground using
* the {@link org.eclipse.ui.progress.IProgressService} or the background
* as a {@link org.eclipse.core.runtime.jobs.Job}. The execution context is determined
- * by what is returned by the {@link #canRunAsJob()} hint which may be overridden by subclasses.
- * Subclass must override the <code>run(IProgressMonitor)</code> method to perform
+ * by what is returned by the {@link #canRunAsJob()} hint which may be overridden by subclasses.
+ * Subclass must override the <code>run(IProgressMonitor)</code> method to perform
* the behavior of the operation in the desired execution context.
* <p>
- * If this operation is run as a job, it is registered with the job as a
+ * If this operation is run as a job, it is registered with the job as a
* {@link org.eclipse.core.runtime.jobs.IJobChangeListener} and is scheduled with
- * the part of this operation if it is not <code>null</code>.
+ * the part of this operation if it is not <code>null</code>.
* Subclasses can override the methods of this interface to receive job change notifications.
* </p>
* @see org.eclipse.ui.progress.IProgressService
@@ -48,10 +48,10 @@ import org.eclipse.ui.progress.IProgressConstants;
* @since 3.0
*/
public abstract class TeamOperation extends JobChangeAdapter implements IRunnableWithProgress {
-
+
private IWorkbenchPart part;
private IRunnableContext context;
-
+
/*
* Job context that configures how the team operation will
* interact with the progress service
@@ -65,14 +65,14 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl
super(operation.getJobName(), operation, operation.getSite());
this.operation = operation;
}
-
+
@Override
protected void configureJob(Job job) {
super.configureJob(job);
if (operation.isKeepOneProgressServiceEntry())
- job.setProperty(IProgressConstants.KEEPONE_PROPERTY, Boolean.TRUE);
+ job.setProperty(IProgressConstants.KEEPONE_PROPERTY, Boolean.TRUE);
else if(operation.getKeepOperation())
- job.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
+ job.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
gotoAction = operation.getGotoAction();
if(gotoAction != null)
job.setProperty(IProgressConstants.ACTION_PROPERTY, gotoAction);
@@ -95,7 +95,7 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl
}
return operation.belongsTo(family);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.actions.JobRunnableContext#getCompletionStatus()
*/
@@ -106,7 +106,7 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl
}
return super.getCompletionStatus();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.actions.JobRunnableContext#isUser()
*/
@@ -115,7 +115,7 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl
return operation.isUserInitiated();
}
}
-
+
/**
* Create an team operation associated with the given part.
* @param part the part the operation is associated with or <code>null</code> if the
@@ -132,9 +132,9 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl
protected TeamOperation(IRunnableContext context) {
this(null, context);
}
-
+
/**
- * Create an team operation associated with the given part
+ * Create an team operation associated with the given part
* that will run in the given context.
* @param part the part the operation is associated with or <code>null</code>
* @param context a runnable context
@@ -146,13 +146,13 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl
/**
* Return the part that is associated with this operation.
- *
+ *
* @return Returns the part or <code>null</code>
*/
public IWorkbenchPart getPart() {
return part;
}
-
+
/**
* Run the operation in a context that is determined by the {@link #canRunAsJob()}
* hint. If this operation can run as a job then it will be run in a background thread.
@@ -169,7 +169,7 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl
* the operation is run in the operation's context. Subclasses may
* override in order to perform pre-checks to determine if the operation
* should run. This may include prompting the user for information, etc.
- *
+ *
* @return whether the operation should be run.
*/
protected boolean shouldRun() {
@@ -179,7 +179,7 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl
/**
* Returns the scheduling rule that is to be obtained before this
* operation is executed by its context or <code>null</code> if
- * no scheduling rule is to be obtained. If the operation is run
+ * no scheduling rule is to be obtained. If the operation is run
* as a job, the scheduling rule is used as the scheduling rule of the
* job. Otherwise, it is obtained before execution of the operation
* occurs.
@@ -188,90 +188,90 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl
* rule is obtained. Subclasses can override in order to obtain a
* scheduling rule or can obtain scheduling rules within their operation
* if finer grained scheduling is desired.
- *
+ *
* @return the scheduling rule to be obtained by this operation
* or <code>null</code>.
*/
protected ISchedulingRule getSchedulingRule() {
return null;
}
-
+
/**
* Return whether the auto-build should be postponed until after
* the operation is complete. The default is to postpone the auto-build.
* subclasses can override.
- *
+ *
* @return whether to postpone the auto-build while the operation is executing.
*/
protected boolean isPostponeAutobuild() {
return true;
}
-
+
/**
* If this operation can safely be run in the background, then subclasses can
* override this method and return <code>true</code>. This will make their
- * action run in a {@link org.eclipse.core.runtime.jobs.Job}.
- * Subclass that override this method should
+ * action run in a {@link org.eclipse.core.runtime.jobs.Job}.
+ * Subclass that override this method should
* also override the <code>getJobName()</code> method.
- *
+ *
* @return <code>true</code> if this action can be run in the background and
* <code>false</code> otherwise.
*/
protected boolean canRunAsJob() {
return false;
}
-
+
/**
* Return the job name to be used if the action can run as a job. (i.e.
* if <code>canRunAsJob()</code> returns <code>true</code>).
- *
+ *
* @return the string to be used as the job name
*/
protected String getJobName() {
return ""; //$NON-NLS-1$
}
-
+
/**
* This method is called to allow subclasses to configure an action that could be run to show
* the results of the action to the user. Default is to return null.
- *
+ *
* @return an action that could be run to see the results of this operation
*/
protected IAction getGotoAction() {
return null;
}
-
+
/**
* This method is called to allow subclasses to configure an icon to show when running this
* operation.
- *
+ *
* @return an URL to an icon
*/
protected URL getOperationIcon() {
return null;
}
-
+
/**
* This method is called to allow subclasses to have the results of the
* operation remain available to the user in the progress service even after
* the job is done. This method is only relevant if the operation is run as
* a job (i.e., <code>canRunAsJob</code> returns <code>true</code>).
- *
+ *
* @return <code>true</code> to keep the operation and <code>false</code>
* otherwise.
*/
protected boolean getKeepOperation() {
return false;
}
-
+
/**
* This method is similar to <code>getKeepOperation</code> but will
- * only keep one entry of a particular type available.
+ * only keep one entry of a particular type available.
* This method is only relevant if the operation is run as
* a job (i.e., <code>canRunAsJob</code> returns <code>true</code>).
- * Subclasses that override this method should also override
+ * Subclasses that override this method should also override
* <code>isSameFamilyAs</code> in order to match operations of the same type.
- *
+ *
* @return <code>true</code> to keep the operation and <code>false</code>
* otherwise.
* @since 3.1
@@ -279,7 +279,7 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl
public boolean isKeepOneProgressServiceEntry() {
return false;
}
-
+
/**
* Return whether this Team operation belongs to the same family
* as the given operation for the purpose of showing only one
@@ -293,7 +293,7 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl
protected boolean isSameFamilyAs(TeamOperation operation) {
return false;
}
-
+
/**
* Return whether the job that is running this operation should be considered
* a member member of the given family. Subclasses can override this method in
@@ -301,7 +301,7 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl
* By default, <code>false</code> is always returned. Subclasses that override the
* <code>isKeepOneProgressServiceEntry</code> method do not need to override
* this method, but instead should override <code>isSameFamilyAs</code>.
- *
+ *
* @param family the family being tested.
* @return whether the job that is running this operation should be considered
* a member member of the given family.
@@ -310,9 +310,9 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl
public boolean belongsTo(Object family) {
return false;
}
-
+
/**
- * Indicates whether the operation was user initiated. The
+ * Indicates whether the operation was user initiated. The
* progress for user initiated jobs may be presented differently
* than non-user initiated operations if they are run as jobs.
* @return whether the operation is user initiated
@@ -321,10 +321,10 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl
public boolean isUserInitiated() {
return true;
}
-
+
/**
* Return a shell that can be used by the operation to display dialogs, etc.
- *
+ *
* @return a shell
*/
protected Shell getShell() {
@@ -341,12 +341,12 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl
}
return shell[0];
}
-
+
/*
* Uses the {@link #canRunAsJob()} hint to return a {@link ITeamRunnableContext}
* that is used to execute the <code>run(SyncInfoSet, IProgressMonitor)</code>
- * method of this action.
- *
+ * method of this action.
+ *
* @param syncSet the sync info set containing the selected elements for which this
* action is enabled.
* @return the runnable context in which to run this action.
@@ -367,7 +367,7 @@ public abstract class TeamOperation extends JobChangeAdapter implements IRunnabl
return context;
}
}
-
+
private IWorkbenchSite getSite() {
IWorkbenchSite site = null;
if(part != null) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java
index cfc4635c3..fa1561e98 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java
@@ -30,21 +30,21 @@ import org.eclipse.ui.*;
* This class is not intended to be subclassed or instantiated by clients
*/
public class TeamUI {
-
+
/**
- * Property constant indicating the global ignores list has changed.
+ * Property constant indicating the global ignores list has changed.
*/
public static final String GLOBAL_IGNORES_CHANGED = TeamUIPlugin.ID + "global_ignores_changed"; //$NON-NLS-1$
-
+
/**
* Property constant indicating the global file types list has changed.
* @since 3.1
*/
public static final String GLOBAL_FILE_TYPES_CHANGED = TeamUIPlugin.ID + "global_file_types_changed"; //$NON-NLS-1$
-
+
/**
* Return the synchronize manager.
- *
+ *
* @return the synchronize manager
* @since 3.0
*/
@@ -54,7 +54,7 @@ public class TeamUI {
/**
* Register for changes made to Team properties.
- *
+ *
* @param listener the listener to add
*/
public static void addPropertyChangeListener(IPropertyChangeListener listener) {
@@ -63,17 +63,17 @@ public class TeamUI {
/**
* Remove the listener from Team property change listener list.
- *
+ *
* @param listener the listener to remove
*/
public static void removePropertyChangeListener(IPropertyChangeListener listener) {
TeamUIPlugin.removePropertyChangeListener(listener);
}
-
+
/**
* Shows the history view and returns a handle to it. Note that in the case of many
* history views, the main history view is the one returned here.
- *
+ *
* @return an IHistoryView which is the main history view if it is found or null if it can't be found
* @since 3.2
*/
@@ -86,7 +86,7 @@ public class TeamUI {
return null;
}
-
+
/**
* Shows a history view containing the given input and returns a handle to the view
* or <code>null</code> if no history was available for the given input. If an appropriate
@@ -94,9 +94,9 @@ public class TeamUI {
* be activated. Otherwise a new view will be opened.
* @param page the workbench page containing the history view
* @param input the input whose history is to be displayed
- * @param pageSource the history page source from which to obtain the page or <code>null</code>
+ * @param pageSource the history page source from which to obtain the page or <code>null</code>
* if the page source should be determined using the Adapter manager.
- *
+ *
* @return an IHistoryView which is the main history view if it is found or null if it can't be found
* @since 3.3
*/
@@ -128,30 +128,30 @@ public class TeamUI {
((GenericHistoryView)view).showHistoryPageFor(input, true, false, pageSource);
return view;
}
-
+
/**
* Return the team content provider manager which gives access to the team
* content providers registered with the
* <code>org.eclipse.team.ui.teamContentProviders</code> extension point.
- *
+ *
* @return the team content provider manager
* @since 3.2
*/
public static ITeamContentProviderManager getTeamContentProviderManager() {
return TeamContentProviderManager.getInstance();
}
-
+
/**
* Return a set of wizard pages for the given importer ID. If no wizard page
* is registered for the importer then a page will not be created. If an
* extension exits, a page will be created, but it's up to the caller to
* initialize the page with a set of corresponding descriptions.
- *
+ *
* <strong>EXPERIMENTAL</strong>. This class has been added as part of a
* work in progress. There is no guarantee that this API will work or that
* it will remain the same. Please do not use this API without consulting
* with the Team team.
- *
+ *
* @param importerId
* the importer ID
* @return wizard pages
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/ElementLocalHistoryPageSource.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/ElementLocalHistoryPageSource.java
index 9556d01a8..fb1cdbc64 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/ElementLocalHistoryPageSource.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/ElementLocalHistoryPageSource.java
@@ -23,7 +23,7 @@ import org.eclipse.ui.part.Page;
public abstract class ElementLocalHistoryPageSource extends HistoryPageSource {
/**
- * Return the previous edition from the local history of the given element located in the given
+ * Return the previous edition from the local history of the given element located in the given
* file. A <code>null</code> is returned if a previous edition could not be found.
* @param file the file containing the element
* @param element the element
@@ -33,7 +33,7 @@ public abstract class ElementLocalHistoryPageSource extends HistoryPageSource {
public static ITypedElement getPreviousEdition(IFile file, Object element) throws TeamException {
return EditionHistoryPage.getPreviousState(file, element);
}
-
+
/**
* Create an instance of the page source.
*/
@@ -48,7 +48,7 @@ public abstract class ElementLocalHistoryPageSource extends HistoryPageSource {
public final boolean canShowHistoryFor(Object object) {
return getFile(object) != null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.history.IHistoryPageSource#createPage(java.lang.Object)
*/
@@ -56,7 +56,7 @@ public abstract class ElementLocalHistoryPageSource extends HistoryPageSource {
public final Page createPage(Object object) {
return new EditionHistoryPage(getFile(object), object);
}
-
+
/**
* Return the file that contains the given element of <code>null</code>
* if this page source can not show history for the given element.
@@ -68,7 +68,7 @@ public abstract class ElementLocalHistoryPageSource extends HistoryPageSource {
/**
* Return the file that contains the given element of <code>null</code> if this page source can
* not show history for the given element.
- *
+ *
* @param element the element
* @return the file that contains the given element of <code>null</code>
* @noreference This method is not intended to be referenced by clients.
@@ -76,5 +76,5 @@ public abstract class ElementLocalHistoryPageSource extends HistoryPageSource {
final public IFile internalGetFile(Object element) {
return getFile(element);
}
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPage.java
index a86ff636d..8b6abc62e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPage.java
@@ -23,12 +23,12 @@ import org.eclipse.ui.part.Page;
* @since 3.2
*/
public abstract class HistoryPage extends Page implements IHistoryPage, IAdaptable {
-
+
private IHistoryPageSite site;
private Object input;
private IHistoryView historyView;
private PropertyChangeHandler fChangeHandler;
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.history.IHistoryPage#setSite(org.eclipse.team.ui.history.IHistoryPageSite)
*/
@@ -36,7 +36,7 @@ public abstract class HistoryPage extends Page implements IHistoryPage, IAdaptab
public void setSite(IHistoryPageSite site) {
this.site = site;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.history.IHistoryPage#getHistoryPageSite()
*/
@@ -45,7 +45,7 @@ public abstract class HistoryPage extends Page implements IHistoryPage, IAdaptab
return site;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.history.IHistoryPage#getInput()
*/
@@ -53,7 +53,7 @@ public abstract class HistoryPage extends Page implements IHistoryPage, IAdaptab
public Object getInput() {
return input;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.history.IHistoryPage#setInput(java.lang.Object, boolean)
*/
@@ -66,16 +66,16 @@ public abstract class HistoryPage extends Page implements IHistoryPage, IAdaptab
/**
* Called by HistoryPage after {@link #setInput(Object)}. Clients can
* gain access to the input by using {@link #getInput()}.
- *
+ *
* @return <code>true</code> if the page was able to display the contents, <code>false</code> otherwise
*/
public abstract boolean inputSet();
-
-
+
+
public void setHistoryView(IHistoryView historyView) {
this.historyView = historyView;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.history.IHistoryPage#getHistoryView()
*/
@@ -83,10 +83,10 @@ public abstract class HistoryPage extends Page implements IHistoryPage, IAdaptab
public IHistoryView getHistoryView() {
if (historyView != null)
return historyView;
-
+
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.history.IHistoryPage#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
*/
@@ -97,7 +97,7 @@ public abstract class HistoryPage extends Page implements IHistoryPage, IAdaptab
}
fChangeHandler.addPropertyChangeListener(listener);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.history.IHistoryPage#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
*/
@@ -107,10 +107,10 @@ public abstract class HistoryPage extends Page implements IHistoryPage, IAdaptab
fChangeHandler.removePropertyChangeListener(listener);
}
}
-
+
/**
* Notify all listeners that the given property has changed.
- *
+ *
* @param source the object on which a property has changed
* @param property identifier of the property that has changed
* @param oldValue the old value of the property, or <code>null</code>
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageCompareEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageCompareEditorInput.java
index e2dbaf1a1..140b61997 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageCompareEditorInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageCompareEditorInput.java
@@ -32,7 +32,7 @@ import org.eclipse.ui.part.Page;
/**
* Displays a history page combined with the compare/merge infrastructure. This only works properly if the
* history page adapts to an {@link IHistoryCompareAdapter}.
- *
+ *
* @since 3.3
*/
public class HistoryPageCompareEditorInput extends PageCompareEditorInput {
@@ -48,7 +48,7 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput {
}
};
private boolean isReplace;
-
+
/**
* Create a history page compare editor input for the given page and object.
* @param configuration the compare configuration
@@ -60,7 +60,7 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput {
this.pageSource = pageSource;
this.object = object;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#prepareInput(org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -69,7 +69,7 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput {
throws InvocationTargetException, InterruptedException {
return object;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#handleDispose()
*/
@@ -81,7 +81,7 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput {
historyPage.dispose();
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.PageCompareEditorInput#createPage(org.eclipse.compare.CompareViewerPane, org.eclipse.jface.action.IToolBarManager)
*/
@@ -102,7 +102,7 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput {
historyPage.addPropertyChangeListener(changeListener);
return (IPage)historyPage;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.PageCompareEditorInput#asCompareInput(org.eclipse.jface.viewers.ISelection)
*/
@@ -177,7 +177,7 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput {
}
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#isEditionSelectionDialog()
*/
@@ -205,7 +205,7 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput {
public void setReplace(boolean isReplace) {
this.isReplace = isReplace;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#getOKButtonLabel()
*/
@@ -215,7 +215,7 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput {
return TeamUIMessages.HistoryPageCompareEditorInput_0;
return super.getOKButtonLabel();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#okPressed()
*/
@@ -232,11 +232,11 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput {
}
return true;
}
-
+
/**
* A replace has been requested. This method will be
* invoked if {@link #isReplaceDialog()} is <code>true</code>
- * and the user has clicked the "Replace" button.
+ * and the user has clicked the "Replace" button.
* By default, this method does nothing.
* Subclasses may override.
* @param selectedObject the selected object
@@ -245,5 +245,5 @@ public class HistoryPageCompareEditorInput extends PageCompareEditorInput {
protected void performReplace(Object selectedObject) throws CoreException {
// By default, do nothing
}
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSaveablePart.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSaveablePart.java
index 7d7357213..682457d91 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSaveablePart.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSaveablePart.java
@@ -30,7 +30,7 @@ import org.eclipse.ui.part.Page;
/**
* Displays a history page combined with the compare/merge infrastructure. This only works properly if the
* history page adapts to an {@link IHistoryCompareAdapter}.
- *
+ *
* @deprecated use {@link HistoryPageCompareEditorInput}
* @since 3.2
*/
@@ -41,7 +41,7 @@ public class HistoryPageSaveablePart extends PageSaveablePart {
private DialogHistoryPageSite site;
private final Object object;
private final IHistoryPageSource pageSource;
-
+
/**
* Show the history for the object in a dialog. The history will only be
* shown if an {@link IHistoryPageSource} can be found for the object.
@@ -72,7 +72,7 @@ public class HistoryPageSaveablePart extends PageSaveablePart {
IResource resource = Utils.getResource(object);
return (resource != null && resource.getType() == IResource.FILE);
}
-
+
/**
* Create a history page part for the given page and object.
* @param shell the parent shell
@@ -107,7 +107,7 @@ public class HistoryPageSaveablePart extends PageSaveablePart {
@Override
public void contentChanged(IContentChangeNotifier source) {
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.PageSaveablePart#createPage(org.eclipse.swt.widgets.Composite, org.eclipse.jface.action.ToolBarManager)
*/
@@ -125,7 +125,7 @@ public class HistoryPageSaveablePart extends PageSaveablePart {
setPageDescription(description);
return ((Page) historyPage).getControl();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.PageSaveablePart#getPageSelectionProvider()
*/
@@ -133,7 +133,7 @@ public class HistoryPageSaveablePart extends PageSaveablePart {
protected final ISelectionProvider getSelectionProvider() {
return site.getSelectionProvider();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.PageSaveablePart#getCompareInput(org.eclipse.jface.viewers.ISelection)
*/
@@ -154,7 +154,7 @@ public class HistoryPageSaveablePart extends PageSaveablePart {
}
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.PageSaveablePart#prepareInput(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -165,7 +165,7 @@ public class HistoryPageSaveablePart extends PageSaveablePart {
compareAdapter.prepareInput(input, configuration, monitor);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.SaveablePartAdapter#dispose()
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSource.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSource.java
index 7a447f34a..d75ad2de0 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSource.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/HistoryPageSource.java
@@ -49,5 +49,5 @@ public abstract class HistoryPageSource implements IHistoryPageSource {
IHistoryPageSource pageSource = (IHistoryPageSource)Utils.getAdapter(object, IHistoryPageSource.class);
return pageSource;
}
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryCompareAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryCompareAdapter.java
index 1b0d37a88..6808aebd6 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryCompareAdapter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryCompareAdapter.java
@@ -17,20 +17,20 @@ import org.eclipse.core.runtime.IProgressMonitor;
/**
* An adaptation for a history page for displaying comparisons
* triggered by history page selections.
- *
+ *
* @since 3.2
* @see HistoryPageSaveablePart
* @see IHistoryPage
*/
public interface IHistoryCompareAdapter {
-
+
/**
* Returns an ICompareInput for the passed in object.
* @param object the object
* @return returns an ICompareInput
*/
public ICompareInput getCompareInput(Object object);
-
+
/**
* Prepare the compare input for display. Clients can perform
* any long running preparations and assign labels to the
@@ -40,5 +40,5 @@ public interface IHistoryCompareAdapter {
* @param monitor a progress monitor
*/
public void prepareInput(ICompareInput input, CompareConfiguration configuration, IProgressMonitor monitor);
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPage.java
index c0edb6716..23e08c589 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPage.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -24,39 +24,39 @@ import org.eclipse.ui.SubActionBars;
* <p>Interface for pages that appear in the team history view.</p>
* <p><em>This interface is not intended to be implemented by clients.
* Clients can instead subclass {@link HistoryPage}.</em></p>
- *
+ *
* <h3>Lifecycle</h3>
* <p>
* Once an Object requests to have its history shown in the History View (through an action or DND), the History View
* will first try to see if any of the open History Views (there can be multiple Views if some of them are pinned) currently
* show the requested Object's history. It does this by calling {@link HistoryPage#getInput()} on each IHistoryPage (which is supposed
- * to extend {@link HistoryPage} and comparing the input with the passed in Object. If a History View is found that already contains the Object,
+ * to extend {@link HistoryPage} and comparing the input with the passed in Object. If a History View is found that already contains the Object,
* it is brought to the front and its history is refreshed (by calling {@link #refresh()}).
* If no History View already contains the requested Object an <code>IHistoryPage</code> might need to be created if the current <code>IHistoryPage</code>
- * being shown in the History View doesn't know how to display the Object or if there are no <code>IHistoryPage</code>s being shown in the History View.
+ * being shown in the History View doesn't know how to display the Object or if there are no <code>IHistoryPage</code>s being shown in the History View.
* </p>
* <p>
- * The History View uses an {@link IHistoryPageSource#createPage(Object)} to create the <code>IHistoryPage</code>. If the History View can
+ * The History View uses an {@link IHistoryPageSource#createPage(Object)} to create the <code>IHistoryPage</code>. If the History View can
* determine what the Repository Provider is for the dropped Object (i.e. the Object is an instance of {@link IResource}), then it will try
* to get the {@link IFileHistoryProvider} for the Repository Provider by calling {@link RepositoryProvider#getFileHistoryProvider()}. If no
* <code>IFileHistoryProvider</code> is returned, the History View will try to adapt the Repository Provider to a <code>IFileHistoryProvider</code>.
- * If the Object whose history is being requested is not an {@link IResource}, it will not be possible to retrieve the Repository Provider from it.
+ * If the Object whose history is being requested is not an {@link IResource}, it will not be possible to retrieve the Repository Provider from it.
* In these instances the History View will try to adapt the Object to an {@link IHistoryPageSource}.
* </p>
* <p>
* Once the <code>IHistoryPage</code> is created, {@link IHistoryPage#setInput(Object)} is called; this is handled by {@link HistoryPage} which clients
* should subclass for their own <code>IHistoryPage</code> implementations. <code>HistoryPage</code> will in turn call {@link HistoryPage#inputSet()} -
- * which clients can use for setting up their <code>IHistoryPage</code>. The old page in the History View (along with its {@link SubActionBars} is disposed -
- * {@link HistoryPage#dispose()} gets called; interested clients can supply a <code>dispose()</code> method in their subclass. Finally, the new page is shown
+ * which clients can use for setting up their <code>IHistoryPage</code>. The old page in the History View (along with its {@link SubActionBars} is disposed -
+ * {@link HistoryPage#dispose()} gets called; interested clients can supply a <code>dispose()</code> method in their subclass. Finally, the new page is shown
* and its SubActionBars are activated.
* </p>
- *
- *
+ *
+ *
* @see TeamUI#getHistoryView()
* @since 3.2
*/
public interface IHistoryPage {
-
+
/**
* Property name constant (value <code>"org.eclipse.team.ui.name"</code>)
* for the page's name.
@@ -70,11 +70,11 @@ public interface IHistoryPage {
* @since 3.3
*/
public static final String P_DESCRIPTION = TeamUIPlugin.ID + ".description"; //$NON-NLS-1$
-
+
/**
* Fetches and populates the history page for the given Object. Clients
* should provide an implementation for their individual pages.
- *
+ *
* @param object the object for which history is being requested for
* @return true if the page was able to display the history for the object, false otherwise
* @since 3.2
@@ -82,17 +82,17 @@ public interface IHistoryPage {
public boolean setInput(Object object);
/**
- * Returns the object whose history is currently being displayed in the history page.
- * @return object the object being displayed in the history page or <code>null</code>
+ * Returns the object whose history is currently being displayed in the history page.
+ * @return object the object being displayed in the history page or <code>null</code>
* if no input has been set;
* @since 3.2
*/
public Object getInput();
-
+
/**
* Returns true if this history page can show a history for the given object, false if it cannot
* @param object the object that is to have history shown
- * @return boolean
+ * @return boolean
* @since 3.2
*/
public boolean isValidInput(Object object);
@@ -105,14 +105,14 @@ public interface IHistoryPage {
/**
* Returns the name of the object whose history the page is showing
- * @return String containing the name of the object
+ * @return String containing the name of the object
* @since 3.2
*/
public String getName();
-
+
/**
* Returns a one line description of the object whose history is
- * being displayed. For example, for files, this may be the
+ * being displayed. For example, for files, this may be the
* workspace path of the file. The description may be displayed to
* the user as tooltip text or by some other means.
* @return a one line description of the object whose history is
@@ -123,38 +123,38 @@ public interface IHistoryPage {
/**
* Set the site for the page - this needs to be replaced with a proper
- * {@link IHistoryPageSite} in order to allow history pages to be displayed in
+ * {@link IHistoryPageSite} in order to allow history pages to be displayed in
* both views and dialogs.
* @param site the history page site
* @since 3.2
*/
public void setSite(IHistoryPageSite site);
-
+
/**
* Returns the {@link IHistoryPageSite} set for this page.
* @return the history page site for this page
* @since 3.2
*/
public IHistoryPageSite getHistoryPageSite();
-
+
/**
- * Called to allow IHistoryPage a chance to dispose of any widgets created
+ * Called to allow IHistoryPage a chance to dispose of any widgets created
* for its page implementation
* @since 3.2
*/
public void dispose();
-
+
/**
- * Returns the {@link IHistoryView} instance that contains this history page or <em>null</em> if
+ * Returns the {@link IHistoryView} instance that contains this history page or <em>null</em> if
* the history view instance cannot be determined.
- * @return IHistoryView the history view that contains this history page or <em>null</em> if
+ * @return IHistoryView the history view that contains this history page or <em>null</em> if
* the history view instance cannot be determined.
* @since 3.3
*/
public IHistoryView getHistoryView();
-
+
/**
- * Adds a listener for changes to properties of this page.
+ * Adds a listener for changes to properties of this page.
* Has no effect if an identical listener is already
* registered.
* <p>
@@ -172,11 +172,11 @@ public interface IHistoryPage {
* @since 3.3
*/
public void addPropertyChangeListener(IPropertyChangeListener listener);
-
+
/**
* Removes the given property listener from this page.
* Has no effect if an identical listener is not already registered.
- *
+ *
* @param listener a property listener
* @since 3.3
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSite.java
index da573050c..ea56e0265 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSite.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSite.java
@@ -20,7 +20,7 @@ import org.eclipse.ui.part.IPageSite;
* A site which provides access to the context in which this page
* is being displayed. Instances of this interface serve a similar purpose
* to <code>IWorkbenchSite</code> instances but is provided as a separate
- * objects to allow clients to access the different site types
+ * objects to allow clients to access the different site types
* (view, editor, dialog) using a common interface. This interface also provides
* access to the part for the site because this is required by some UI
* components. Clients should not need to access the part.
@@ -30,29 +30,29 @@ import org.eclipse.ui.part.IPageSite;
* <code>instanceof</code> checks can be done with the part.
* <p>
* This interface is not intended to be implemented by clients.
- *
+ *
* @since 3.2
*/
public interface IHistoryPageSite {
-
+
/**
* Return the workbench page site for the page or <code>null</code> if a
* workbench page site is not available (e.g. if the page is being shown in
* a dialog).
- *
+ *
* @return the workbench page site for the page or <code>null</code>
*/
IPageSite getWorkbenchPageSite();
-
+
/**
* Return the workbench part for the page or <code>null</code> if a
* workbench part is not available (e.g. if the page is being shown in a
* dialog).
- *
+ *
* @return the workbench part for the page or <code>null</code>
*/
IWorkbenchPart getPart();
-
+
/**
* Returns the shell for this site.
* @return the shell for this site
@@ -76,7 +76,7 @@ public interface IHistoryPageSite {
* Give the page focus.
*/
void setFocus();
-
+
/**
* Returns the toolbar manager for this site or <code>null</code>
* it there is no toolbar. For sites which have a corresponding
@@ -86,11 +86,11 @@ public interface IHistoryPageSite {
* @return toolbar manager
*/
IToolBarManager getToolBarManager();
-
+
/**
* Returns whether this site is modal.
* @return true if the site is modal, false otherwise
*/
boolean isModal();
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSource.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSource.java
index fc6dd464b..0b1339f00 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSource.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryPageSource.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -17,28 +17,28 @@ import org.eclipse.ui.part.Page;
/**
* Interface to an object which is capable of supplying a history page for display
* by the history view or other views, dialogs or editors that wish to display
- * the history of an object.
- *
+ * the history of an object.
+ *
* This interface is not intended to be implemented by clients.
* Clients can instead subclass {@link HistoryPageSource}.
- *
+ *
* @see IFileHistoryProvider
* @since 3.2
*/
public interface IHistoryPageSource {
-
+
/**
* Returns true if this history page source can show a history for the given object, false if it cannot
* @param object the object that is to have history shown
- * @return boolean
+ * @return boolean
*/
public boolean canShowHistoryFor(Object object);
-
+
/**
* Called by the history view to create the page for this IFileHistoryProvider. The
* page must implement {@link IHistoryPage}.
* @param object the object whose history is to be shown
- *
+ *
* @see IHistoryPage
* @return a Page that implements IHistoryPage (should return either an IPage, IPageBookViewPage or an IHistoryPage
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryView.java
index f4d66ca84..a0427a2a1 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryView.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/IHistoryView.java
@@ -15,22 +15,22 @@ import org.eclipse.team.core.history.IFileHistory;
/**
* This interface provides a way for clients to request the History View
* to display the history for a given object.
- *
+ *
* <p>
* This interface is not intended to be implemented by clients.
- *
+ *
* @since 3.2
* @see IFileHistory
* @see IHistoryPage
*/
public interface IHistoryView {
-
+
/**
* The id for this view.
* @since 3.3
*/
public static final String VIEW_ID = "org.eclipse.team.ui.GenericHistoryView"; //$NON-NLS-1$
-
+
/**
* Returns the history page that is currently being displayed by the
* history view.
@@ -38,25 +38,25 @@ public interface IHistoryView {
* @return the history page
*/
public IHistoryPage getHistoryPage();
-
+
/**
- * Shows the history for the passed in object. This method is equivalent to
+ * Shows the history for the passed in object. This method is equivalent to
* {@link #showHistoryFor(Object, boolean)} with <code>force</code>
* set to <code>false</code>.
- *
+ *
* @param object the input whose history is to be displayed
* @return returns the history page that the passed in object is being shown
* in or null if no appropriate page can be found.
*/
public IHistoryPage showHistoryFor(Object object);
-
+
/**
* Shows the history for the given object. If force is <code>false</code>,
* the history may be displayed in another instance of {@link IHistoryView}.
* For example, if the target view is pinned, the history will be shown in another
* view instance. If force is <code>true</code>, the history will be shown in this view
* instance regardless of the view state.
- *
+ *
* @param object the input whose history is to be displayed
* @param force whether this view should show the input even if it is pinned
* @return returns the history page that the passed in object is being shown
@@ -64,5 +64,5 @@ public interface IHistoryView {
* @since 3.3
*/
public IHistoryPage showHistoryFor(Object object, boolean force);
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/RevisionAnnotationController.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/RevisionAnnotationController.java
index b31305344..a2b742225 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/RevisionAnnotationController.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/history/RevisionAnnotationController.java
@@ -38,7 +38,7 @@ import org.eclipse.ui.texteditor.ITextEditor;
* revision ruler and a history list such as one shown in the history view. In
* other words, the selection in the history list will be reflected in the
* revision rule and vice versa.
- *
+ *
* @see Revision
* @see RevisionInformation
* @since 3.3
@@ -54,10 +54,10 @@ public abstract class RevisionAnnotationController {
Revision selected= null;
if (selection instanceof IStructuredSelection)
selected= (Revision) ((IStructuredSelection) selection).getFirstElement();
-
+
if (selected == null)
return;
-
+
revisionSelected(selected);
}
};
@@ -75,12 +75,12 @@ public abstract class RevisionAnnotationController {
}
}
};
-
+
/**
* Open a text editor that supports the use of a revision ruler on the given
* file. If an appropriate editor is already open, it is returned. Otherwise
* a new editor is opened.
- *
+ *
* @param page
* the page in which the editor is to be opened
* @param file
@@ -99,39 +99,39 @@ public abstract class RevisionAnnotationController {
return te;
}
}
-
- // No existing editor references found, try to open a new editor for the file
+
+ // No existing editor references found, try to open a new editor for the file
try {
IEditorDescriptor descrptr = IDE.getEditorDescriptor(file);
// Try to open the associated editor only if its an internal editor
- // Also, if a non-text editor is already open, there is no need to try and open
+ // Also, if a non-text editor is already open, there is no need to try and open
// an editor since the open will find the non-text editor
if (descrptr.isInternal() && openEditors.length == 0){
IEditorPart part = page.openEditor(input, IDE.getEditorDescriptor(file).getId(), true, IWorkbenchPage.MATCH_INPUT);
AbstractDecoratedTextEditor te = findTextEditorPart(page, part, input);
if (te != null)
return te;
-
+
//editor opened is not a text editor - close it
page.closeEditor(part, false);
}
- //open file in default text editor
+ //open file in default text editor
IEditorPart part = page.openEditor(input, EditorsUI.DEFAULT_TEXT_EDITOR_ID, true, IWorkbenchPage.MATCH_INPUT | IWorkbenchPage.MATCH_ID);
AbstractDecoratedTextEditor te = findTextEditorPart(page, part, input);
if (te != null)
return te;
-
+
} catch (PartInitException e) {
}
-
+
return null;
}
-
+
/**
* Open a text editor that supports the use of a revision ruler on the given
* file. If an appropriate editor is already open, it is returned. Otherwise
* a new editor is opened.
- *
+ *
* @param page
* the page in which the editor is to be opened
* @param fileRevision
@@ -149,7 +149,7 @@ public abstract class RevisionAnnotationController {
return (AbstractDecoratedTextEditor) editor;
return null;
}
-
+
private static ITextEditor getEditor(String id, Object fileRevision, IStorage storage) throws PartInitException {
final IWorkbench workbench= PlatformUI.getWorkbench();
@@ -167,7 +167,7 @@ public abstract class RevisionAnnotationController {
return (ITextEditor)part;
} else {
// There is something really wrong so just bail
- throw new PartInitException(TeamUIMessages.RevisionAnnotationController_0);
+ throw new PartInitException(TeamUIMessages.RevisionAnnotationController_0);
}
}
}
@@ -177,7 +177,7 @@ public abstract class RevisionAnnotationController {
IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
IEditorDescriptor descriptor = registry.getDefaultEditor(storage.getName());
if (descriptor == null || !descriptor.isInternal()) {
- id = EditorsUI.DEFAULT_TEXT_EDITOR_ID;
+ id = EditorsUI.DEFAULT_TEXT_EDITOR_ID;
} else {
try {
if (Utils.isTextEditor(descriptor)) {
@@ -193,7 +193,7 @@ public abstract class RevisionAnnotationController {
}
-
+
private static AbstractDecoratedTextEditor findOpenTextEditorForFile(IWorkbenchPage page, IFile file) {
if (file == null)
return null;
@@ -201,7 +201,7 @@ public abstract class RevisionAnnotationController {
IEditorPart[] editors = findOpenEditorsForFile(page, input);
return findTextEditor(page, editors, input);
}
-
+
private static AbstractDecoratedTextEditor findTextEditor(IWorkbenchPage page, IEditorPart[] editors, IEditorInput input) {
for (int i = 0; i < editors.length; i++) {
IEditorPart editor = editors[i];
@@ -229,7 +229,7 @@ public abstract class RevisionAnnotationController {
}
return null;
}
-
+
private static IEditorPart[] findOpenEditorsForFile(IWorkbenchPage page, FileEditorInput input) {
final IEditorReference[] references= page.findEditors(input, null, IWorkbenchPage.MATCH_INPUT);
final List editors = new ArrayList();
@@ -238,10 +238,10 @@ public abstract class RevisionAnnotationController {
IEditorPart editor= reference.getEditor(false);
editors.add(editor);
}
-
+
return (IEditorPart[]) editors.toArray(new IEditorPart[editors.size()]);
}
-
+
private static AbstractDecoratedTextEditor findOpenTextEditorFor(IWorkbenchPage page, Object object) {
if (object == null)
return null;
@@ -264,10 +264,10 @@ public abstract class RevisionAnnotationController {
// ignore
}
}
-
+
return null;
}
-
+
private static IRevisionRulerColumnExtension findEditorRevisonRulerColumn(IWorkbenchPage page, Object object) {
ITextEditor editor= findOpenTextEditorFor(page, object);
if (editor == null)
@@ -279,21 +279,21 @@ public abstract class RevisionAnnotationController {
return null;
return (IRevisionRulerColumnExtension) column;
}
-
+
return null;
}
-
+
private RevisionAnnotationController(IRevisionRulerColumnExtension revisionRuler, ISelectionProvider historyList) {
fHistoryListSelectionProvider = historyList;
if (revisionRuler == null) {
fRulerSelectionProvider = null;
return;
}
-
+
fRulerSelectionProvider= revisionRuler.getRevisionSelectionProvider();
fRulerSelectionProvider.addSelectionChangedListener(rulerListener);
fHistoryListSelectionProvider.addSelectionChangedListener(historyListListener);
-
+
((IRevisionRulerColumn)revisionRuler).getControl().addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
@@ -301,7 +301,7 @@ public abstract class RevisionAnnotationController {
}
});
}
-
+
/**
* Create a controller that links an editor on a local file to a history list.
* @param page the workbench page
@@ -311,7 +311,7 @@ public abstract class RevisionAnnotationController {
public RevisionAnnotationController(IWorkbenchPage page, IFile file, ISelectionProvider historyList) {
this(findEditorRevisonRulerColumn(page, file), historyList);
}
-
+
/**
* Create a controller that links an editor input on a remote file to a history list.
* @param page the workbench page
@@ -324,7 +324,7 @@ public abstract class RevisionAnnotationController {
}
/**
- * Dispose of the controller.
+ * Dispose of the controller.
*/
public void dispose() {
if (fRulerSelectionProvider != null) {
@@ -339,14 +339,14 @@ public abstract class RevisionAnnotationController {
/**
* Callback from the ruler when a particular revision has been selected by the user.
- * By default, this method will set the selection of the history list selection
+ * By default, this method will set the selection of the history list selection
* provider that was passed in the constructor using the history entry returned
* by {@link #getHistoryEntry(Revision)}. Subclasses may override.
* @param selected the selected revision
*/
protected void revisionSelected(Revision selected) {
Object entry= getHistoryEntry(selected);
-
+
if (entry != null) {
IStructuredSelection selection = new StructuredSelection(entry);
if (fHistoryListSelectionProvider instanceof Viewer) {
@@ -357,7 +357,7 @@ public abstract class RevisionAnnotationController {
}
}
}
-
+
/**
* Return the history list entry corresponding to the provided revision.
* THis method is called by the {@link #revisionSelected(Revision)} method in
@@ -378,14 +378,14 @@ public abstract class RevisionAnnotationController {
fRulerSelectionProvider.setSelection(new StructuredSelection(id));
}
}
-
+
/**
* Return the revision id associated with the given history list entry.
* This method is used to determine which revision in the revision ruler should
* be highlighted when the history list selection provider fires a selection changed event.
* By default, this method tries to adapt the entry to either {@link IFileRevision} or
* {@link IResourceVariant} in order to obtain the content identifier. Subclasses may override.
- *
+ *
* @param historyEntry the history list entry
* @return the id of the entry
*/
@@ -399,5 +399,5 @@ public abstract class RevisionAnnotationController {
return variant.getContentIdentifier();
return null;
}
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareAdapter.java
index 920119973..ceeb92e56 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareAdapter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareAdapter.java
@@ -24,11 +24,11 @@ import org.eclipse.ui.IMemento;
* <p>
* Clients should not implement this interface but should subclass {@link SynchronizationCompareAdapter}
* instead.
- *
+ *
* @since 3.2
*/
public interface ISynchronizationCompareAdapter {
-
+
/**
* Return whether their is a compare input associated with the given object.
* In other words, return <code>true</code> if {@link #asCompareInput(ISynchronizationContext, Object) }
@@ -38,7 +38,7 @@ public interface ISynchronizationCompareAdapter {
* @return whether their is a compare input associated with the given object
*/
boolean hasCompareInput(ISynchronizationContext context, Object object);
-
+
/**
* Return a compare input for the given model object. Creation of the input
* should be fast. Synchronization information calculations that are longer
@@ -52,14 +52,14 @@ public interface ISynchronizationCompareAdapter {
* if they wish to tailor the compare editor used to show the compare input
* of provide an {@link SaveableComparison} in order to have more control
* over the save lifecycle during a merge.
- *
+ *
* @param context the synchronization context
* @param o the model object
* @return a compare input or <code>null</code> if the model object is
* in-sync or otherwise cannot be compared.
*/
ICompareInput asCompareInput(ISynchronizationContext context, Object o);
-
+
/**
* Get the name associated with the model object of the given mapping.
* This name should be suitable for display to the user.
@@ -67,7 +67,7 @@ public interface ISynchronizationCompareAdapter {
* @return the name of the mapping's model object
*/
public String getName(ResourceMapping mapping);
-
+
/**
* Get the path associated with the model object
* of the given mapping.
@@ -76,7 +76,7 @@ public interface ISynchronizationCompareAdapter {
* @return the path of the model object of the mapping
*/
public String getPathString(ResourceMapping mapping);
-
+
/**
* Return an image descriptor that can be displayed as an icon for the
* model object of the given resource mapping.
@@ -86,16 +86,16 @@ public interface ISynchronizationCompareAdapter {
* @since 3.3
*/
public ImageDescriptor getImageDescriptor(ResourceMapping mapping);
-
+
/**
- * Save the given resource mappings from this adapters
+ * Save the given resource mappings from this adapters
* model provider into the given memento in a form
* that can be restored at a future time.
* @param mappings the resource mappings to save
* @param memento the memento where the mappings should be saved
*/
public void save(ResourceMapping[] mappings, IMemento memento);
-
+
/**
* Restore the previously saved resource mappings.
* @param memento a memento
@@ -107,9 +107,9 @@ public interface ISynchronizationCompareAdapter {
* Return the synchronization state of the resource mapping with respect to
* the given team state provider. This method is invoked from instances of
* {@link ITeamStateProvider} when the synchronization state description for
- * an element is requested. This method can return -1 to indicate that the state
+ * an element is requested. This method can return -1 to indicate that the state
* calculation should be performed using the resources that the element maps to.
- *
+ *
* @param provider
* the team state provider
* @param mapping
@@ -121,9 +121,9 @@ public interface ISynchronizationCompareAdapter {
* @return the synchronization state of the element or -1 if the calculation
* of the state should be done using the resources of the mapping.
* @throws CoreException
- *
+ *
* @since 3.3
*/
public int getSynchronizationState(ITeamStateProvider provider, ResourceMapping mapping, int stateMask, IProgressMonitor monitor) throws CoreException;
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareInput.java
index 02a425840..c3673fccf 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ISynchronizationCompareInput.java
@@ -17,18 +17,18 @@ import org.eclipse.core.runtime.IProgressMonitor;
/**
* This interface defines extensions to the {@link ICompareInput}
- * interface that are used for compare inputs that are returned from the
+ * interface that are used for compare inputs that are returned from the
* {@link ISynchronizationCompareAdapter#asCompareInput(org.eclipse.team.core.mapping.ISynchronizationContext, Object)}
* method.
* <p>
* Clients may implement this interface.
- *
+ *
* @see ISynchronizationCompareAdapter#asCompareInput(org.eclipse.team.core.mapping.ISynchronizationContext, Object)
- *
+ *
* @since 3.2
*/
public interface ISynchronizationCompareInput extends ICompareInput {
-
+
/**
* Return the saveable for this compare input or
* <code>null</code> if the input is saved directly to disk when the
@@ -36,16 +36,16 @@ public interface ISynchronizationCompareInput extends ICompareInput {
* @return the saveable for this compare input
*/
SaveableComparison getSaveable();
-
+
/**
- * Prepare the compare input associated with a model element for display using
- * the compare configuration.
+ * Prepare the compare input associated with a model element for display using
+ * the compare configuration.
* @param configuration the compare configuration for the editor that will display the input
* @param monitor a progress monitor
- * @throws CoreException
+ * @throws CoreException
*/
void prepareInput(CompareConfiguration configuration, IProgressMonitor monitor) throws CoreException;
-
+
/**
* Return a human readable path for the compare input that can be
* used in a tooltip or other displays that can show more detailed information.
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderDescriptor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderDescriptor.java
index 2870f7726..bf12aa8e1 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderDescriptor.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderDescriptor.java
@@ -15,10 +15,10 @@ import org.eclipse.jface.preference.IPreferencePage;
import org.eclipse.jface.resource.ImageDescriptor;
/**
- * A description of a single extension registered with the
+ * A description of a single extension registered with the
* <code>org.eclipse.team.ui.teamContentProviders</code>
* extension point.
- *
+ *
* * <p>
* This interface is not intended to be implemented by clients.
* @since 3.2
@@ -41,9 +41,9 @@ public interface ITeamContentProviderDescriptor {
public String getModelProviderId();
/**
- * Return an image descriptor that can be displayed with this content
- * extension.
- * @return an image descriptor that can be displayed with this content
+ * Return an image descriptor that can be displayed with this content
+ * extension.
+ * @return an image descriptor that can be displayed with this content
* extension
*/
public ImageDescriptor getImageDescriptor();
@@ -56,7 +56,7 @@ public interface ITeamContentProviderDescriptor {
* @throws CoreException
*/
public IPreferencePage createPreferencePage() throws CoreException;
-
+
/**
* Return whether this content provider is enabled. If it is not
* enabled, it should not be included in any viewers.
@@ -69,7 +69,7 @@ public interface ITeamContentProviderDescriptor {
* @return a string containing the name or null if no name has been specified
*/
public String getName();
-
+
/**
* Return whether the FLAT layout is supported by this content provider.
* @return whether the FLAT layout is supported by this content provider
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderManager.java
index 135825675..1a0ebea6c 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderManager.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamContentProviderManager.java
@@ -26,7 +26,7 @@ import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
* the <code>org.eclipse.ui.navigator.navigatorContent</code> extension point.
* <p>
* This interface is not intended to be implemented by clients.
- *
+ *
* @see TeamUI#getTeamContentProviderManager()
* @see ModelProvider
* @since 3.2
@@ -48,7 +48,7 @@ public interface ITeamContentProviderManager {
* shown in an {@link ISynchronizePage}.
*/
public static final String P_SYNCHRONIZATION_CONTEXT = TeamUIPlugin.ID + ".synchronizationContext"; //$NON-NLS-1$
-
+
/**
* Property constant used to store and retrieve the resource mapping scope
* from the {@link org.eclipse.ui.navigator.IExtensionStateModel} used by
@@ -66,29 +66,29 @@ public interface ITeamContentProviderManager {
* @since 3.3
*/
public static final String PROP_PAGE_LAYOUT = TeamUIPlugin.ID + ".pageLayout"; //$NON-NLS-1$
-
+
/**
- * Value for the PROP_PAGE_LAYOUT that indicates that the models should display
+ * Value for the PROP_PAGE_LAYOUT that indicates that the models should display
* their elements in tree form.
* @since 3.3
*/
public static final String TREE_LAYOUT = TeamUIPlugin.ID + ".treeLayout"; //$NON-NLS-1$
-
+
/**
- * Value for the PROP_PAGE_LAYOUT that indicates that the models should display
+ * Value for the PROP_PAGE_LAYOUT that indicates that the models should display
* their elements as a flat list. Only models that indicate in their <code>teamContentProviders</code>
* that they support the flat layout will be enabled when the PROP_PAGE_LAYOUT is set
* to FLAT_LAYOUT.
* @since 3.3
*/
public static final String FLAT_LAYOUT = TeamUIPlugin.ID + ".flatLayout"; //$NON-NLS-1$
-
+
/**
* Property constant used during property change notification to indicate
* that one one or more model providers have either been enabled or disabled.
*/
public static final String PROP_ENABLED_MODEL_PROVIDERS = TeamUIPlugin.ID + ".ENABLED_MODEL_PROVIDERS"; //$NON-NLS-1$
-
+
/**
* Return descriptors for all the registered content extensions.
* @return descriptors for all the registered content extensions
@@ -105,13 +105,13 @@ public interface ITeamContentProviderManager {
*/
public ITeamContentProviderDescriptor getDescriptor(
String modelProviderId);
-
+
/**
* Add a property change listener to the manager.
* @param listener the listener
*/
public void addPropertyChangeListener(IPropertyChangeListener listener);
-
+
/**
* Remove a property change listener from the manager.
* @param listener the listener
@@ -121,17 +121,17 @@ public interface ITeamContentProviderManager {
/**
* Convenience method that returns the list of all enabled content extension ids for
* models that have mappings in the given scope.
- *
+ *
* @param scope
* the scope
* @return the list of all content extension ids for models that have
* mappings in the given scope
*/
public String[] getContentProviderIds(ISynchronizationScope scope);
-
+
/**
* Enable the given content descriptors, disabling all others.
- * This method will fire a {@link ITeamContentProviderManager#PROP_ENABLED_MODEL_PROVIDERS}
+ * This method will fire a {@link ITeamContentProviderManager#PROP_ENABLED_MODEL_PROVIDERS}
* property change event to any registered listeners.
* @param descriptors the descriptors to be enabled.
* @see ITeamContentProviderDescriptor#isEnabled()
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeEvent.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeEvent.java
index 7c1c2f5a5..021f3cdd2 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeEvent.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeEvent.java
@@ -14,25 +14,25 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.team.ui.synchronize.TeamStateChangeEvent;
/**
- * A description of the team state changes that have occurred. This event
+ * A description of the team state changes that have occurred. This event
* indicates the resources for which the team state may have changed.
* However, it may be the case that the state did not actually change. Clients
* that wish to determine if the state ha changed must cache the previous state
* and re-obtain the state when they receive this event. Also, the event may
- * not include team state changes that resulted from local changes. Clients should listen
+ * not include team state changes that resulted from local changes. Clients should listen
* for resource changes as well.
* <p>
* This interface is not intended to be implemented by clients. Clients should
* instead use {@link TeamStateChangeEvent}.
- *
+ *
* @see ITeamStateChangeListener
* @see ITeamStateProvider
* @see TeamStateChangeEvent
- *
+ *
* @since 3.2
*/
public interface ITeamStateChangeEvent {
-
+
/**
* Return the set of resources that were previously undecorated
* but are now decorated.
@@ -40,7 +40,7 @@ public interface ITeamStateChangeEvent {
* but are now decorated.
*/
public IResource[] getAddedRoots();
-
+
/**
* Return the set of resources that were previously decorated
* but are now undecorated.
@@ -48,23 +48,23 @@ public interface ITeamStateChangeEvent {
* but are now undecorated.
*/
public IResource[] getRemovedRoots();
-
+
/**
* Return the set of resources whose decorated state has changed.
* @return the set of resources whose decorated state has changed.
*/
public IResource[] getChangedResources();
-
+
/**
* Return whether the resource has any state changes. This returns
* <code>true</code> if the resource is included in the set
* of changes returned by {@link #getChangedResources()} or
* if it is a descendant of a root that is present in a set
* returned by {@link #getAddedRoots()} or {@link #getRemovedRoots()}.
- *
+ *
* @param resource the resource
* @return whether the resource has any state changes
*/
public boolean hasChange(IResource resource);
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeListener.java
index f6a4fc011..ad5748a0c 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeListener.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateChangeListener.java
@@ -19,7 +19,7 @@ import org.eclipse.team.ui.synchronize.TeamStateProvider;
* A listener registered with an {@link TeamStateProvider} in order to
* receive change events when the team state of any
* resources change. It is the responsibility of clients to determine if
- * a label update is required based on the changed resources.
+ * a label update is required based on the changed resources.
* <p>
* Change events may not be issued if a local change has resulted in a
* synchronization state change. It is up to clients to check whether
@@ -27,12 +27,12 @@ import org.eclipse.team.ui.synchronize.TeamStateProvider;
* by using the resource delta mechanism.
* <p>
* Clients may implement this interface
- *
+ *
* @see IWorkspace#addResourceChangeListener(org.eclipse.core.resources.IResourceChangeListener)
* @since 3.2
*/
public interface ITeamStateChangeListener extends EventListener {
-
+
/**
* Notification that the team state of resources
* has changed.
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateDescription.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateDescription.java
index 8fdff21c4..4aca565c1 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateDescription.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateDescription.java
@@ -22,7 +22,7 @@ import org.eclipse.team.ui.synchronize.TeamStateProvider;
* <p>
* This interface is not intended to be implemented by clients. Clients that wish
* to create a description should use {@link TeamStateDescription}.
- *
+ *
* @see TeamStateProvider
* @since 3.2
*/
@@ -33,7 +33,7 @@ public interface ITeamStateDescription {
* state description was generated. Only the portion of the synchronization
* state covered by <code>stateMask</code> used when obtaining this
* description is returned.
- *
+ *
* @return the synchronization state of the given element
* @see IDiff
* @see IThreeWayDiff
@@ -45,7 +45,7 @@ public interface ITeamStateDescription {
* Return the portion of the state flags that represent the kind associated
* with the element for which this description was generated. See
* {@link IDiff#getKind()} for a description of what this value represents.
- *
+ *
* @return the kind associated with the element for which this description
* was generated
*/
@@ -56,7 +56,7 @@ public interface ITeamStateDescription {
* associated with the element for which this description was generated. See
* {@link IThreeWayDiff#getDirection()} for a description of what this value
* represents.
- *
+ *
* @return the direction associated with the element for which this
* description was generated
*/
@@ -65,7 +65,7 @@ public interface ITeamStateDescription {
/**
* Return the properties names for all decorated properties associated with
* the element for which this description was generated.
- *
+ *
* @return the properties names for all decorated properties
*/
public abstract String[] getPropertyNames();
@@ -77,9 +77,9 @@ public interface ITeamStateDescription {
* @return the value associated with the given property or <code>null</code>
*/
public abstract Object getProperty(String property);
-
+
/**
- * Return whether this state description is equal the to given object.
+ * Return whether this state description is equal the to given object.
* Clients should use this method to test whether two state
* descriptions are equal.
* @param object the object
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateProvider.java
index 6da3d836c..76bf1628f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/ITeamStateProvider.java
@@ -29,14 +29,14 @@ import org.eclipse.team.ui.synchronize.SubscriberTeamStateProvider;
* This interface is not intended to be implemented by clients. Clients should
* instead subclass {@link TeamStateProvider} or
* {@link SubscriberTeamStateProvider}.
- *
+ *
* @see IAdapterManager
* @see RepositoryProviderType
* @see RepositoryProviderType#getSubscriber()
* @see TeamStateProvider
* @see SubscriberTeamStateProvider
* @see SynchronizationStateTester
- *
+ *
* @since 3.2
*/
public interface ITeamStateProvider {
@@ -47,12 +47,12 @@ public interface ITeamStateProvider {
* passing he mask returned from {@link #getDecoratedStateMask(Object)};
*/
public static final int USE_DECORATED_STATE_MASK = -1;
-
+
/**
* Return whether decoration is enabled for the given model element. If
* decoration is not enabled, the model does not need to fire label change
* events when the team state of the element changes.
- *
+ *
* @param element
* the model element
* @return whether decoration is enabled for the given model element
@@ -61,7 +61,7 @@ public interface ITeamStateProvider {
/**
* Return whether the given element has any decorated state.
- *
+ *
* @param element
* the element being decorated
* @return whether the given element has any decorated state
@@ -75,7 +75,7 @@ public interface ITeamStateProvider {
* decorated state from
* {@link #getStateDescription(Object, int, String[], IProgressMonitor)} in
* order to determine if the decorated state has changed.
- *
+ *
* <p>
* The state mask can consist of the following standard flags:
* <ul>
@@ -89,7 +89,7 @@ public interface ITeamStateProvider {
* <p>
* The mask can also consist of flag bits that are unique to the repository
* provider associated with the resources that the element maps to.
- *
+ *
* @param element
* the model element to be decorated
* @return the mask that indicates what state the appropriate team decorator
@@ -103,7 +103,7 @@ public interface ITeamStateProvider {
* Return the set of property identifiers that represent the set of
* properties that the team decorator would decorate for the given model
* element.
- *
+ *
* @param element
* the model element to be decorated
* @return the set of decorated properties
@@ -120,7 +120,7 @@ public interface ITeamStateProvider {
* should be <code>null</code> or the value returned from
* {@link #getDecoratedProperties(Object)} if the client wishes to obtain
* the current decorated state.
- *
+ *
* @param element
* the model element
* @param stateMask
@@ -143,10 +143,10 @@ public interface ITeamStateProvider {
* of the resources associated with the provider. If a
* {@link RemoteResourceMappingContext} is returned, then the client may
* access the remote state.
- *
+ *
* @param element
* the element for which remote contents are desired
- *
+ *
* @return a resource mapping context that gives access to the remote state
* of the resources associated with the provider
*/
@@ -155,7 +155,7 @@ public interface ITeamStateProvider {
/**
* Add a decorated state change listener to the provider.
* Adding the same listener more than once has no effect.
- *
+ *
* @param listener
* the listener
*/
@@ -165,7 +165,7 @@ public interface ITeamStateProvider {
/**
* Remove the decorated state change listener to the provider.
* Removing a listener that is not registered has no effect.
- *
+ *
* @param listener
* the listener
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/MergeActionHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/MergeActionHandler.java
index e31159538..39cc095ba 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/MergeActionHandler.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/MergeActionHandler.java
@@ -23,11 +23,11 @@ import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
/**
* An abstract superclass that enables models to create handlers
* for the basic merge operations (merge, overwrite and mark-as-merged).
- * This class makes use of a {@link SynchronizationOperation} to determine its
+ * This class makes use of a {@link SynchronizationOperation} to determine its
* enablement state and execute the handler. Enablement is determined
* using {@link SynchronizationOperation#shouldRun()} and the handler will
* invoke {@link SynchronizationOperation#run()} when executed.
- *
+ *
* @since 3.2
* @see SynchronizationActionProvider
*/
@@ -42,10 +42,10 @@ public abstract class MergeActionHandler extends AbstractHandler {
updatedEnablement(event);
}
};
-
+
/**
* Return an instance of the default handler for the given merge action id.
- * Note that this handler must be disposed by the caller when it is no longer
+ * Note that this handler must be disposed by the caller when it is no longer
* needed.
* @param mergeActionId the merge action id
* @param configuration the synchronization page configuration
@@ -78,9 +78,9 @@ public abstract class MergeActionHandler extends AbstractHandler {
selectionProvider.addSelectionChangedListener(listener);
updateEnablement((IStructuredSelection)selectionProvider.getSelection());
}
-
+
/**
- * Deregister this handler from selection change events.
+ * Deregister this handler from selection change events.
*/
@Override
public void dispose() {
@@ -122,7 +122,7 @@ public abstract class MergeActionHandler extends AbstractHandler {
protected final IStructuredSelection getStructuredSelection() {
return selection;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.commands.AbstractHandler#isEnabled()
*/
@@ -130,7 +130,7 @@ public abstract class MergeActionHandler extends AbstractHandler {
public boolean isEnabled() {
return enabled;
}
-
+
/**
* Set the enablement of this handler.
* @param isEnabled whether the handler is enabled
@@ -141,7 +141,7 @@ public abstract class MergeActionHandler extends AbstractHandler {
fireHandlerChanged(new HandlerEvent(this, true, false));
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
@@ -169,7 +169,7 @@ public abstract class MergeActionHandler extends AbstractHandler {
* @return a synchronization operation
*/
protected abstract SynchronizationOperation getOperation();
-
+
/**
* Return the saveable that is the target of this handler.
* By default, the saveable of this handlers operation is returned.
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SaveableComparison.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SaveableComparison.java
index 40d4162b4..f40cb4c76 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SaveableComparison.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SaveableComparison.java
@@ -20,7 +20,7 @@ import org.eclipse.ui.*;
* container in order to determine when a save is required.
* <p>
* Clients may subclass this class.
- *
+ *
* @since 3.2
*/
public abstract class SaveableComparison extends Saveable {
@@ -29,7 +29,7 @@ public abstract class SaveableComparison extends Saveable {
* The property id for <code>isDirty</code>.
*/
public static final int PROP_DIRTY = IWorkbenchPartConstants.PROP_DIRTY;
-
+
private boolean dirty;
private ListenerList listeners = new ListenerList(ListenerList.IDENTITY);
@@ -115,7 +115,7 @@ public abstract class SaveableComparison extends Saveable {
});
}
}
-
+
/**
* Method invoked from {@link #doSave(IProgressMonitor)} to write
* out the buffer. By default, this method invokes <code>doSave</code>
@@ -124,9 +124,9 @@ public abstract class SaveableComparison extends Saveable {
* @throws CoreException if errors occur
*/
protected abstract void performSave(IProgressMonitor monitor) throws CoreException;
-
+
/**
- * Method invoked from {@link #doRevert(IProgressMonitor)} to discard the
+ * Method invoked from {@link #doRevert(IProgressMonitor)} to discard the
* changes in the buffer.
* @param monitor a progress monitor
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationActionProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationActionProvider.java
index 496bdf993..2c6555d46 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationActionProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationActionProvider.java
@@ -39,24 +39,24 @@ import org.eclipse.ui.navigator.*;
* in the {@link #fillActionBars(IActionBars)} method.
* <p>
* This class may be subclasses by clients.
- *
+ *
* @see MergeActionHandler
* @since 3.2
*/
public class SynchronizationActionProvider extends CommonActionProvider {
-
+
/**
* Action id constant for the merge action.
* @see #registerHandler(String, IHandler)
*/
public static final String MERGE_ACTION_ID = "org.eclipse.team.ui.mergeAction"; //$NON-NLS-1$
-
+
/**
* Action id constant for the merge action.
* @see #registerHandler(String, IHandler)
*/
public static final String OVERWRITE_ACTION_ID = "org.eclipse.team.ui.overwriteAction"; //$NON-NLS-1$
-
+
/**
* Action id constant for the mark-as-merge action.
* @see #registerHandler(String, IHandler)
@@ -92,7 +92,7 @@ public class SynchronizationActionProvider extends CommonActionProvider {
* still call this method, in which case they only need to handle providing
* open for non-files. Otherwise, if they do not call this method, they must
* provide all non-compare related open items.
- *
+ *
*/
protected void initializeOpenActions() {
ICommonViewerSite cvs = getActionSite().getViewSite();
@@ -105,7 +105,7 @@ public class SynchronizationActionProvider extends CommonActionProvider {
}
}
}
-
+
/**
* Return the configuration from the synchronize page that contains
* the common viewer.
@@ -125,7 +125,7 @@ public class SynchronizationActionProvider extends CommonActionProvider {
protected final IExtensionStateModel getExtensionStateModel() {
return getActionSite().getExtensionStateModel();
}
-
+
/**
* Return the synchronization context to which the actions of this provider
* apply.
@@ -135,10 +135,10 @@ public class SynchronizationActionProvider extends CommonActionProvider {
protected final ISynchronizationContext getSynchronizationContext() {
return (ISynchronizationContext)getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
}
-
+
/**
* Register the handler as the handler for the given action id when
- * a merge action is performed on elements that match this groups
+ * a merge action is performed on elements that match this groups
* enablement.
* @param actionId the id of the merge action
* @param handler the handler for elements of the model that provided this group
@@ -146,7 +146,7 @@ public class SynchronizationActionProvider extends CommonActionProvider {
protected void registerHandler(String actionId, IHandler handler) {
handlers.put(actionId, handler);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.actions.ActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager)
*/
@@ -165,7 +165,7 @@ public class SynchronizationActionProvider extends CommonActionProvider {
openWithActions.fillContextMenu(menu, fileGroup.getId());
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
*/
@@ -174,19 +174,19 @@ public class SynchronizationActionProvider extends CommonActionProvider {
super.fillActionBars(actionBars);
if (openWithActions != null) openWithActions.fillActionBars(actionBars);
}
-
+
@Override
public void updateActionBars() {
super.updateActionBars();
if (openWithActions != null) openWithActions.updateActionBars();
}
-
+
@Override
public void setContext(ActionContext context) {
super.setContext(context);
if (openWithActions != null) openWithActions.setContext(context);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.actions.ActionGroup#dispose()
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationCompareAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationCompareAdapter.java
index 48f44b7a6..790ff2a6e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationCompareAdapter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationCompareAdapter.java
@@ -31,7 +31,7 @@ import org.eclipse.ui.model.IWorkbenchAdapter;
* An abstract implementation of {@link ISynchronizationCompareAdapter}.
* <p>
* Clients may subclass this class.
- *
+ *
* @since 3.2
*/
public abstract class SynchronizationCompareAdapter implements ISynchronizationCompareAdapter {
@@ -88,7 +88,7 @@ public abstract class SynchronizationCompareAdapter implements ISynchronizationC
}
return ""; //$NON-NLS-1$
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.IResourceMappingPersistenceAdapter#getFullPath(org.eclipse.core.resources.mapping.ResourceMapping)
*/
@@ -117,7 +117,7 @@ public abstract class SynchronizationCompareAdapter implements ISynchronizationC
}
return getName(mapping);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter#getImageDescriptor(org.eclipse.core.resources.mapping.ResourceMapping)
*/
@@ -150,13 +150,13 @@ public abstract class SynchronizationCompareAdapter implements ISynchronizationC
}
return null;
}
-
+
/**
* Return the synchronization state of the resource mapping with respect to
* the given team state provider. This method is invoked from instances of
* {@link ITeamStateProvider} when the synchronization state description for
* an element is requested.
- *
+ *
* @param provider
* the team state provider
* @param mapping
@@ -168,12 +168,12 @@ public abstract class SynchronizationCompareAdapter implements ISynchronizationC
* @return the synchronization state of the element or -1 if the calculation
* of the state should be done using the resources of the mapping.
* @throws CoreException
- *
+ *
* @since 3.3
*/
@Override
public int getSynchronizationState(ITeamStateProvider provider, ResourceMapping mapping, int stateMask, IProgressMonitor monitor) throws CoreException {
return -1;
}
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationContentProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationContentProvider.java
index 73b840070..521c9bd01 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationContentProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationContentProvider.java
@@ -33,7 +33,7 @@ import org.eclipse.ui.navigator.*;
/**
* Abstract team aware content provider that delegates to another content provider.
- *
+ *
* @since 3.2
*/
public abstract class SynchronizationContentProvider implements ICommonContentProvider, IDiffChangeListener, IPropertyChangeListener {
@@ -41,7 +41,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
private Viewer viewer;
private boolean empty;
private ICommonContentExtensionSite site;
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
*/
@@ -57,7 +57,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
public Object[] getElements(Object parent) {
return internalGetChildren(parent, true);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
*/
@@ -81,7 +81,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
public boolean hasChildren(Object element) {
return internalHasChildren(element);
}
-
+
private Object[] internalGetChildren(Object parent, boolean isElement) {
Object element = internalGetElement(parent);
if (element instanceof ISynchronizationScope) {
@@ -139,9 +139,9 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
/**
* Return whether the content provider has been initialized and is ready to
* provide content in the given context. By default, <code>true</code> is returned. Subclasses
- * that need to perform extra processing to prepare should override this method and
+ * that need to perform extra processing to prepare should override this method and
* also override {@link #requestInitialization(ISynchronizationContext)}.
- *
+ *
* @param context the context
* @return whether the content provider has been initialized and is ready to
* provide content in he given context.
@@ -149,14 +149,14 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
protected boolean isInitialized(ISynchronizationContext context) {
return true;
}
-
+
/**
* Subclasses that need to perform extra processing to prepare their model
* to be displayed by this content provider should override this method and
* launch a background task to prepare what is required to display their
* model for the given context. An appropriate viewer refresh on the model
* provider should be issued when the model is prepared.
- *
+ *
* @param context
* the context
*/
@@ -210,7 +210,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
/**
* Return whether the given element has children in the given scope.
* By default, true is returned if the given element contains any elements
- * in the scope or if any of the elements in the scope contain the given
+ * in the scope or if any of the elements in the scope contain the given
* element and the delegate provider returns children for the element.
* The {@link ResourceMapping#contains(ResourceMapping)} is used to test
* for containment.
@@ -240,7 +240,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
* Return whether the given element has children in the given
* context. The children may or may not exist locally.
* By default, this method returns true if the traversals for
- * the element contain any diffs. This could result in false
+ * the element contain any diffs. This could result in false
* positives. Subclasses can override to provide a more
* efficient or precise answer.
* @param element a model element.
@@ -293,7 +293,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
configuration.addPropertyChangeListener(this);
ITreeContentProvider provider = getDelegateContentProvider();
if (provider instanceof ICommonContentProvider) {
- ((ICommonContentProvider) provider).init(site);
+ ((ICommonContentProvider) provider).init(site);
}
ISynchronizationContext context = getContext();
if (context != null)
@@ -310,7 +310,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
refresh();
}
}
-
+
/**
* Return whether elements with the given direction should be included in
* the contents. The direction is one of {@link IThreeWayDiff#INCOMING},
@@ -321,7 +321,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
* {@link #getChildren(Object) } is called. It accessing the
* <code>ISynchronizePageConfiguration.P_MODE</code> property on the state
* model provided by the view to determine what kinds should be included.
- *
+ *
* @param direction
* the synchronization direction
* @return whether elements with the given synchronization kind should be
@@ -333,7 +333,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
return ((SynchronizePageConfiguration)configuration).includeDirection(direction);
return true;
}
-
+
/**
* Return the synchronization context associated with the view to which
* this content provider applies. A <code>null</code> is returned if
@@ -365,7 +365,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
ITeamContentProviderManager.P_SYNCHRONIZATION_SCOPE);
return null;
}
-
+
/**
* Return the synchronization page configuration associated with the view to which
* this content provider applies. A <code>null</code> is returned if
@@ -381,7 +381,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
ITeamContentProviderManager.P_SYNCHRONIZATION_PAGE_CONFIGURATION);
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento)
*/
@@ -389,7 +389,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
public void restoreState(IMemento aMemento) {
ITreeContentProvider provider = getDelegateContentProvider();
if (provider instanceof ICommonContentProvider) {
- ((ICommonContentProvider) provider).restoreState(aMemento);
+ ((ICommonContentProvider) provider).restoreState(aMemento);
}
}
@@ -400,10 +400,10 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
public void saveState(IMemento aMemento) {
ITreeContentProvider provider = getDelegateContentProvider();
if (provider instanceof ICommonContentProvider) {
- ((ICommonContentProvider) provider).saveState(aMemento);
+ ((ICommonContentProvider) provider).saveState(aMemento);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.delta.ISyncDeltaChangeListener#syncDeltaTreeChanged(org.eclipse.team.core.delta.ISyncDeltaChangeEvent, org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -411,7 +411,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
refresh();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.core.diff.IDiffChangeListener#propertyChanged(int, org.eclipse.core.runtime.IPath[])
*/
@@ -434,7 +434,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
else
treeViewer.refresh(getModelProvider());
}
-
+
}, getViewer().getControl());
}
@@ -444,7 +444,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
* @return the model content provider
*/
protected abstract ITreeContentProvider getDelegateContentProvider();
-
+
/**
* Return the model provider for this content provider.
* @return the model provider for this content provider
@@ -457,13 +457,13 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
throw new IllegalStateException();
}
}
-
+
/**
* Return the id of model provider for this content provider.
* @return the model provider for this content provider
*/
protected abstract String getModelProviderId();
-
+
/**
* Return the object that acts as the model root. It is used when getting the children
* for a model provider.
@@ -478,7 +478,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
protected final Viewer getViewer() {
return viewer;
}
-
+
/**
* Return the subset of the given children that are in the
* given scope or are parents of elements that are in scope.
@@ -498,7 +498,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
}
return result.toArray(new Object[result.size()]);
}
-
+
/**
* Return the subset of children that are of interest from the given context.
* By default, this method returns those children whose traversals contain
@@ -563,7 +563,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
* calling {@link #getTraversals(ISynchronizationContext, Object)} to get
* the traversals, then obtaining the diffs from the context's diff tree and
* then calling {@link #isVisible(IDiff)} for each diff.
- *
+ *
* @param context
* the synchronization context
* @param object
@@ -592,14 +592,14 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
}
return false;
}
-
+
/**
* Return whether the given diff should be visible based on the
* configuration of the synchronization page showing this content. An
* {@link IThreeWayDiff} is visible if the direction of the change matches
* the mode of the synchronization page. An {@link ITwoWayDiff} is visible
* if it has a kind that represents a change.
- *
+ *
* @param diff
* the diff
* @return whether the diff should be visible
@@ -613,17 +613,17 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
}
/**
- * Return the traversals for the given object in the given context. This
+ * Return the traversals for the given object in the given context. This
* method must not be long running. If a long running calculation is required
* to calculate the traversals, an empty traversal should be returned and the
- * content provider should initiate a background task to calculate the
+ * content provider should initiate a background task to calculate the
* required traversals and update the view according when the task completes.
* @param context the synchronization context
* @param object the object
* @return the traversals for the given object in the given context
*/
protected abstract ResourceTraversal[] getTraversals(ISynchronizationContext context, Object object);
-
+
/**
* Handle the given exception that occurred while calculating the
* children for an element.
@@ -674,7 +674,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
public ICommonContentExtensionSite getExtensionSite() {
return site;
}
-
+
private Object internalGetElement(Object elementOrPath) {
if (elementOrPath instanceof TreePath) {
TreePath tp = (TreePath) elementOrPath;
@@ -682,7 +682,7 @@ public abstract class SynchronizationContentProvider implements ICommonContentPr
}
return elementOrPath;
}
-
+
/**
* Return whether the page has been set to use a flat layout.
* @return whether the page has been set to use a flat layout
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationLabelProvider.java
index b74cfcbf9..a44032627 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationLabelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationLabelProvider.java
@@ -25,7 +25,7 @@ import org.eclipse.ui.navigator.*;
/**
* A label provider wrapper that adds synchronization image and/or text decorations
* to the image and label obtained from the delegate provider.
- *
+ *
* @since 3.2
*/
public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLabelProvider implements ICommonLabelProvider, IFontProvider {
@@ -34,12 +34,12 @@ public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLa
private ISynchronizationContext context;
private ITreeContentProvider contentProvider;
private ICommonContentExtensionSite site;
-
+
private void init(ISynchronizationScope input, ISynchronizationContext context) {
this.scope = input;
this.context = context;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.navigator.ICommonLabelProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
*/
@@ -47,7 +47,7 @@ public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLa
public void init(ICommonContentExtensionSite site) {
this.site = site;
contentProvider = site.getExtension().getContentProvider();
- init((ISynchronizationScope)site.getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_SCOPE),
+ init((ISynchronizationScope)site.getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_SCOPE),
(ISynchronizationContext)site.getExtensionStateModel().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT));
}
@@ -70,7 +70,7 @@ public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLa
public ISynchronizationScope getScope() {
return scope;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento)
*/
@@ -92,7 +92,7 @@ public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLa
((ICommonLabelProvider) provider).saveState(aMemento);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.navigator.IDescriptionProvider#getDescription(java.lang.Object)
*/
@@ -112,7 +112,7 @@ public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLa
protected boolean isDecorationEnabled() {
return getContext() != null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.mapping.SynchronizationStateLabelProvider#getImage(java.lang.Object)
*/
@@ -124,7 +124,7 @@ public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLa
}
return image;
}
-
+
/**
* Return the root object for the model. By default, it is the
* workspace root. Subclasses may override. This object is used to
@@ -134,7 +134,7 @@ public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLa
protected Object getModelRoot() {
return ResourcesPlugin.getWorkspace().getRoot();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvider#getText(java.lang.Object)
*/
@@ -160,7 +160,7 @@ public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLa
public ICommonContentExtensionSite getExtensionSite() {
return site;
}
-
+
private Object internalGetElement(Object element) {
if (element instanceof TreePath) {
TreePath tp = (TreePath) element;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationOperation.java
index 86fbdee6d..3aade8bd1 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationOperation.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationOperation.java
@@ -30,10 +30,10 @@ import org.eclipse.ui.IWorkbenchPart;
* associated with a synchronization or merge context.
* <p>
* This class may be subclasses by clients.
- *
+ *
* @see ISynchronizationContext
* @see IMergeContext
- *
+ *
* @since 3.2
*/
public abstract class SynchronizationOperation extends TeamOperation {
@@ -53,7 +53,7 @@ public abstract class SynchronizationOperation extends TeamOperation {
}
return null;
}
-
+
/**
* Create a synchronize operation that operations on the given elements
* @param configuration the configuration for the page the operation is associated with
@@ -82,7 +82,7 @@ public abstract class SynchronizationOperation extends TeamOperation {
protected ISynchronizationContext getContext() {
return (ISynchronizationContext)getConfiguration().getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
}
-
+
/**
* Return the model elements that are the target of this operation.
* @return the model elements that are the target of this operation
@@ -90,7 +90,7 @@ public abstract class SynchronizationOperation extends TeamOperation {
public Object[] getElements() {
return elements;
}
-
+
/**
* Make <code>shouldRun</code> public so the result
* can be used to provide handler enablement
@@ -99,11 +99,11 @@ public abstract class SynchronizationOperation extends TeamOperation {
public boolean shouldRun() {
return super.shouldRun();
}
-
+
/**
* Return the saveable that this operation will write its results
* to or <code>null</code> if the operation does not buffer
- * its results. By default, <code>null</code> is returned but
+ * its results. By default, <code>null</code> is returned but
* subclasses may override.
* @return the saveable that this operation will write its results
* to or <code>null</code>
@@ -111,7 +111,7 @@ public abstract class SynchronizationOperation extends TeamOperation {
public SaveableComparison getSaveable() {
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationStateTester.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationStateTester.java
index 972f4978d..c723f3735 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationStateTester.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationStateTester.java
@@ -23,8 +23,8 @@ import org.eclipse.ui.IDecoratorManager;
/**
* A state change tester is used by logical models to communicate the
- * synchronization state of their logical model elements to
- * the lightweight label decorator of a team provider.
+ * synchronization state of their logical model elements to
+ * the lightweight label decorator of a team provider.
* <p>
* There are two different types of elements being decorated: those
* that have a one-to-one mapping to a resource and those that do not.
@@ -40,7 +40,7 @@ import org.eclipse.ui.IDecoratorManager;
* required and to communicate the dirty state of their logical model
* elements to the team decorator.
* <p>
- * Model providers need to re-evaluate the state of a
+ * Model providers need to re-evaluate the state of a
* model element whenever a change in the resources occurs by listening
* to both resource deltas and change events from the team state provider
* ({@link #getTeamStateProvider()}.
@@ -48,7 +48,7 @@ import org.eclipse.ui.IDecoratorManager;
* Decoration enablement changes and decoration configuration changes
* are handled by the {@link IDecoratorManager#update(String)} API.
* A call to this method will result in label changes to all elements.
- * The {@link #isDecorationEnabled(Object)} API on this class can
+ * The {@link #isDecorationEnabled(Object)} API on this class can
* be used to determine if an element will receive team decorations.
* If decoration is disabled. team state changes on the element can
* be ignored.
@@ -60,7 +60,7 @@ import org.eclipse.ui.IDecoratorManager;
* @see Subscriber#addListener(org.eclipse.team.core.subscribers.ISubscriberChangeListener)
*/
public class SynchronizationStateTester {
-
+
/**
* Constant that is used as the property key on an
* {@link IDecorationContext}. Model based views can assign their state
@@ -70,14 +70,14 @@ public class SynchronizationStateTester {
* decorated.
*/
public static final String PROP_TESTER = "org.eclipse.team.ui.syncStateTester"; //$NON-NLS-1$
-
+
/**
* Create a synchronization state tester.
*/
public SynchronizationStateTester() {
super();
}
-
+
/**
* Return whether state decoration is enabled for the context
* to which this tester is associated. If <code>true</code>
@@ -87,14 +87,14 @@ public class SynchronizationStateTester {
* is returned, a team decorator will not decorate the elements with any
* synchronization related decorations. Subclasses will want to disable
* state decoration if state decoration is being provided another way
- * (e.g. by a {@link SynchronizationLabelProvider}). By default,
+ * (e.g. by a {@link SynchronizationLabelProvider}). By default,
* <code>true</code>is returned. Subclasses may override.
* @return whether state decoration is enabled
*/
public boolean isStateDecorationEnabled() {
return true;
}
-
+
/**
* Return whether decoration is enabled for the given model element in the
* context to which this tester is associated. By default, the value
@@ -106,7 +106,7 @@ public class SynchronizationStateTester {
* decorations should be applied to the model element. Otherwise, the
* {@link #getState(Object, int, IProgressMonitor)} should be consulted in
* order to determine what state to decorate.
- *
+ *
* @param element
* the model element
* @return whether decoration is enabled for the given model element
@@ -142,7 +142,7 @@ public class SynchronizationStateTester {
* use the remote file contents available from the provider to determine the proper
* state for the element.
* </ol>
- *
+ *
* @param element the model element
* @param stateMask the mask that identifies which state flags are desired if
* present
@@ -156,21 +156,21 @@ public class SynchronizationStateTester {
return desc.getStateFlags();
return IDiff.NO_CHANGE;
}
-
+
/**
- * Return a team state provider that delegates to the appropriate team
+ * Return a team state provider that delegates to the appropriate team
* provider.
- * @return a team state provider that delegates to the appropriate team
+ * @return a team state provider that delegates to the appropriate team
* provider
*/
public final ITeamStateProvider getTeamStateProvider() {
return TeamUIPlugin.getPlugin().getDecoratedStateProvider();
}
-
+
/**
* A callback to the tester made from the team decorator to notify the
* tester that the given element has been decorated with the given state.
- * The purpose of the callback is to allow the owner of the tester to
+ * The purpose of the callback is to allow the owner of the tester to
* cache the decorated state in order to detect whether a future state
* change requires a label update for the element.
* @param element the element that was decorated
@@ -179,6 +179,6 @@ public class SynchronizationStateTester {
public void elementDecorated(Object element, ITeamStateDescription description) {
// do nothing by default
}
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeLabelProvider.java
index 0b428935d..344a0edf4 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeLabelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeLabelProvider.java
@@ -35,13 +35,13 @@ import org.eclipse.team.ui.mapping.*;
/**
* A label provider wrapper that adds synchronization image and/or text decorations
* to the image and label obtained from the delegate provider.
- *
+ *
* @since 3.2
*/
public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider {
-
+
private ImageManager localImageManager;
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
*/
@@ -50,7 +50,7 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider
Image base = getDelegateImage(element);
if (isDecorationEnabled() && base != null) {
Image decorateImage = decorateImage(base, element);
- base = decorateImage;
+ base = decorateImage;
}
if (isIncludeOverlays() && base != null) {
base = addOverlays(base, element);
@@ -75,7 +75,7 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider
Image decoratedImage;
if (element instanceof ICompareInput) {
ICompareInput ci = (ICompareInput) element;
- decoratedImage = getCompareImage(base, ci.getKind());
+ decoratedImage = getCompareImage(base, ci.getKind());
} else {
IDiff node = getDiff(element);
decoratedImage = getCompareImage(base, node);
@@ -106,7 +106,7 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider
ITeamContentProviderDescriptor desc = manager.getDescriptor(provider.getId());
return desc.getImageDescriptor();
}
-
+
private Object internalGetElement(Object element) {
if (element instanceof TreePath) {
TreePath tp = (TreePath) element;
@@ -116,13 +116,13 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider
}
private Image getCompareImage(Image base, IDiff node) {
- int compareKind = getCompareKind(node);
+ int compareKind = getCompareKind(node);
return getCompareImage(base, compareKind);
}
/**
* Returns an image showing the specified change kind applied to a given base image.
- *
+ *
* @nooverride This method is not intended to be re-implemented or extended by clients.
* @noreference This method is not intended to be referenced by clients.
*/
@@ -133,7 +133,7 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider
private int getCompareKind(IDiff node) {
return ResourceDiffCompareInput.getCompareKind(node);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
*/
@@ -163,7 +163,7 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider
}
return base;
}
-
+
/**
* Decorate the text with the appropriate diff decorations.
* By default, this method uses the diff associated with
@@ -176,13 +176,13 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider
*/
protected String decorateText(String base, Object element) {
IDiff node = getDiff(element);
- if (node != null && node.getKind() != IDiff.NO_CHANGE) {
+ if (node != null && node.getKind() != IDiff.NO_CHANGE) {
String syncKindString = node.toDiffString();
- return NLS.bind(TeamUIMessages.AbstractSynchronizationLabelProvider_0, new String[] { base, syncKindString });
+ return NLS.bind(TeamUIMessages.AbstractSynchronizationLabelProvider_0, new String[] { base, syncKindString });
}
return base;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
*/
@@ -215,7 +215,7 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider
public void removeListener(ILabelProviderListener listener) {
getDelegateLabelProvider().removeListener(listener);
}
-
+
/**
* Returns whether the synchronization state should be included in the
* text of the label. By default, the Team preference is used to determine
@@ -226,22 +226,22 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider
protected boolean isSyncInfoInTextEnabled() {
return isDecorationEnabled() && TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.SYNCVIEW_VIEW_SYNCINFO_IN_LABEL);
}
-
+
/**
- * Return the label provider that will return the text and image
+ * Return the label provider that will return the text and image
* appropriate for the given model element. Subclasses are responsible for
* disposing of the label provider.
- * @return the label provider that will return the text and image
+ * @return the label provider that will return the text and image
* appropriate for the given model element
*/
protected abstract ILabelProvider getDelegateLabelProvider();
-
+
/**
* Return whether the label provider should decorate with the synchronization state.
* @return whether the label provider should decorate with the synchronization state
*/
protected abstract boolean isDecorationEnabled();
-
+
/**
* Return the sync kind of the given element. This is used
* to determine how to decorate the image and label of the
@@ -253,14 +253,14 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider
protected IDiff getDiff(Object element) {
return null;
}
-
+
private Image addOverlays(Image base, Object element) {
if (!isIncludeOverlays())
return base;
-
+
ImageDescriptor[] overlayImages = new ImageDescriptor[4];
boolean hasOverlay = false;
-
+
// Decorate with the busy indicator
if (isBusy(element)) {
overlayImages[IDecoration.TOP_LEFT] = TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_HOURGLASS_OVR);
@@ -288,13 +288,13 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider
}
return base;
}
-
+
/**
* Indicate whether the overlays provided by this class should be applied.
* By default, <code>false</code> is returned. Subclasses may override
* and control individual overlays by overriding the appropriate
* query methods. Overlays provided by this class include problem marker
- * severity ({@link #getMarkerSeverity(Object)}), propagated conflicts
+ * severity ({@link #getMarkerSeverity(Object)}), propagated conflicts
* ({@link #hasDecendantConflicts(Object)} and busy state ({@link #isBusy(Object)}).
* @return whether the overlays provided by this class should be applied
*/
@@ -308,10 +308,10 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider
* there are no markers. By Default, the element is adapted to resource
* mapping in order to look for markers.
* <p>
- * Although this class handles providing the overlays, it does not react
- * to marker changes. Subclasses must issue label updates when the markers on
+ * Although this class handles providing the overlays, it does not react
+ * to marker changes. Subclasses must issue label updates when the markers on
* a logical model element change.
- *
+ *
* @param element
* the element
* @return the marker severity
@@ -342,7 +342,7 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider
/**
* Return whether the given element has descendant conflicts.
- * By default, <code>false</code> is returned. Subclasses
+ * By default, <code>false</code> is returned. Subclasses
* may override.
* @param element the element
* @return whether the given element has descendant conflicts
@@ -376,7 +376,7 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider
/**
* Method that provides a custom font for elements that are
* busy. Although this label provider does not implement
- * {@link IFontProvider}, subclasses that wish to get
+ * {@link IFontProvider}, subclasses that wish to get
* busy indication using a font can do so.
* @param element the element
* @return the font to indicate that the element is busy
@@ -387,7 +387,7 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider
}
return null;
}
-
+
private ImageManager getImageManager() {
ISynchronizationContext context = getContext();
if (context != null) {
@@ -414,5 +414,5 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider
}
return null;
}
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java
index b2cd29166..630fbb8ca 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java
@@ -37,23 +37,23 @@ import org.eclipse.ui.PartInitException;
* @since 3.0
*/
public abstract class AbstractSynchronizeParticipant extends PlatformObject implements ISynchronizeParticipant {
-
+
/**
* Property key used in the property change event fired when the pinned
* state of a participant changes.
*/
public static final String P_PINNED = "org.eclipse.team.pinned"; //$NON-NLS-1$
-
+
/**
* Property key used in the property change event fired when the
* participants refresh schedule changes.
* @since 3.2
*/
public static final String P_SCHEDULED = "org.eclipse.team.schedule"; //$NON-NLS-1$
-
+
// key for persisting the pinned state of a participant
private final static String CTX_PINNED = "root"; //$NON-NLS-1$
-
+
// property listeners
private PropertyChangeHandler fChangeHandler;
@@ -67,7 +67,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
/**
* Default constructor is a no-op. Subclasses that are persistable must support a no-arg constructor
- * and
+ * and
*/
public AbstractSynchronizeParticipant() {
}
@@ -96,7 +96,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
public String getId() {
return fId;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#getSecondaryId()
*/
@@ -109,7 +109,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
* Returns the help context id of this participant or value of
* <code>IHelpContextIds.SYNC_VIEW</code> when no specific id has been
* provided.
- *
+ *
* @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#getHelpContextId()
* @see org.eclipse.team.internal.ui.IHelpContextIds#SYNC_VIEW
* @since 3.5
@@ -139,16 +139,16 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
public final boolean isPinned() {
return pinned;
}
-
+
/**
* Called when the pinned state is changed. Allows subclasses to react to pin state changes.
- *
+ *
* @param pinned whether the participant is pinned.
*/
protected void pinned(boolean pinned) {
// Subclasses can re-act to changes in the pinned state
}
-
+
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@@ -159,7 +159,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
ISynchronizeParticipant other = (ISynchronizeParticipant)obj;
return getId().equals(other.getId()) && Utils.equalObject(getSecondaryId(), other.getSecondaryId());
}
-
+
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@@ -167,11 +167,11 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
public int hashCode() {
return Utils.getKey(getId(), getSecondaryId()).hashCode();
}
-
+
/**
* Return whether this participant can be refreshed. Participants that can
* be refreshed may have a Synchronize menu item contributed to their context menu
- * and can also be refreshed from the Synchronize drop-down toolbar item.
+ * and can also be refreshed from the Synchronize drop-down toolbar item.
* When refreshed from the toolbar item, the {@link ISynchronizeParticipant#run(org.eclipse.ui.IWorkbenchPart)}
* method is called.
* @return whether this participant can be refreshed
@@ -179,7 +179,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
public boolean doesSupportSynchronize() {
return true;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
*/
@@ -203,7 +203,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
/**
* Notify all listeners that the given property has changed.
- *
+ *
* @param source the object on which a property has changed
* @param property identifier of the property that has changed
* @param oldValue the old value of the property, or <code>null</code>
@@ -226,7 +226,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
// Id
fId = config.getAttribute("id"); //$NON-NLS-1$
-
+
// Title.
fName = config.getAttribute("name"); //$NON-NLS-1$
if (fName == null) {
@@ -248,14 +248,14 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
if(descriptor instanceof SynchronizeParticipantDescriptor) {
setInitializationData(((SynchronizeParticipantDescriptor)descriptor).getConfigurationElement(), null, null);
} else {
- throw new TeamException(TeamUIMessages.AbstractSynchronizeParticipant_4);
+ throw new TeamException(TeamUIMessages.AbstractSynchronizeParticipant_4);
}
}
/**
* Sets the name of this participant to the specified value and notifies
* property listeners of the change.
- *
+ *
* @param name the new name
*/
protected void setName(String name) {
@@ -263,11 +263,11 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
fName = name;
firePropertyChange(this, IBasicPropertyConstants.P_TEXT, old, name);
}
-
+
/**
* Sets the image descriptor for this participant to the specified value and
* notifies property listeners of the change.
- *
+ *
* @param imageDescriptor the new image descriptor
*/
protected void setImageDescriptor(ImageDescriptor imageDescriptor) {
@@ -275,16 +275,16 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
fImageDescriptor = imageDescriptor;
firePropertyChange(this, IBasicPropertyConstants.P_IMAGE, old, imageDescriptor);
}
-
+
/**
* Sets the secondary id for this participant.
- *
+ *
* @param secondaryId the secondary id for this participant.
*/
protected void setSecondaryId(String secondaryId) {
- this.fSecondaryId = secondaryId;
+ this.fSecondaryId = secondaryId;
}
-
+
/**
* Classes that are persisted must override this method and perform
* the following initialization.
@@ -329,16 +329,16 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
}
/**
- * This method is invoked after a page configuration is created but before it is returned by the
+ * This method is invoked after a page configuration is created but before it is returned by the
* <code>createPageConfiguration</code> method. Subclasses can implement this method to
* tailor the configuration in ways appropriate to the participant.
- *
+ *
* @param configuration the newly create page configuration
*/
protected abstract void initializeConfiguration(ISynchronizePageConfiguration configuration);
-
+
/**
- * Default implementation will update the labels in the given configuration using
+ * Default implementation will update the labels in the given configuration using
* information from the provided element if it adapts to <code>SyncInfo</code>.
* It will also cache the contents for the remote and base if the element is
* sync info based.
@@ -348,7 +348,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
* @param monitor a progress monitor that can be used if contacting a server to prepare the element and configuration
* @throws TeamException if an error occurred that should prevent the display of the compare editor containing
* the element
- *
+ *
* @since 3.1
* @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#prepareCompareInput(org.eclipse.team.ui.synchronize.ISynchronizeModelElement, org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -362,7 +362,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
(node).cacheContents(monitor);
}
}
-
+
/*
* Get the sync info node from the element using the adaptable mechanism.
* A <code>null</code> is returned if the element doesn't have a sync info
@@ -375,7 +375,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
}
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#getPreferencePages()
*/
@@ -383,7 +383,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
public PreferencePage[] getPreferencePages() {
return new PreferencePage[] { new SyncViewerPreferencePage() };
}
-
+
/**
* Return whether this participant supports the contribution of actions to
* the context menu by contributing a <code>viewerContribution</code>
@@ -392,9 +392,9 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
* the <code>id</code> of the participant is used as the <code>targetId</code>. Here is
* an extension that could be added to the plugin manifest to contribute an action to
* the context menu for a participant
- *
+ *
* <pre>
- * &lt;extension point="org.eclipse.ui.popupMenus"&gt;
+ * &lt;extension point="org.eclipse.ui.popupMenus"&gt;
* &lt;viewerContribution
* id="org.eclipse.team.cvs.ui.viewContributionId"
* targetID="org.eclipse.team.cvs.ui.cvsworkspace-participant"&gt;
@@ -409,8 +409,8 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
* &lt;/viewerContribution&gt;
* &lt;/extension&gt;
* </pre>
- *
- *
+ *
+ *
* @return whether this participant supports the contribution of actions to
* the context menu using the <code>org.eclipse.ui.popupMenus</code> extension point
* @since 3.1
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeScope.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeScope.java
index f010689b7..bcef23350 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeScope.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeScope.java
@@ -24,26 +24,26 @@ import org.eclipse.ui.IMemento;
/**
* Abstract superclass of resource scopes for <code>SubscriberParticipant</code>
* instances.
- *
+ *
* @see SubscriberParticipant
* @since 3.0
* @noextend This class is not intended to be subclassed by clients.
*/
public abstract class AbstractSynchronizeScope implements ISynchronizeScope {
-
+
/*
* Key for scope in memento
*/
private static final String CTX_SUBSCRIBER_SCOPE_TYPE = TeamUIPlugin.ID + ".SCOPE_TYPE"; //$NON-NLS-1$
-
+
/*
* Scope change listeners
*/
private ListenerList listeners = new ListenerList(ListenerList.IDENTITY);
-
+
/**
* Save the scope to the given memento
- *
+ *
* @param scope a scope
* @param settings a memento
*/
@@ -51,10 +51,10 @@ public abstract class AbstractSynchronizeScope implements ISynchronizeScope {
settings.putString(CTX_SUBSCRIBER_SCOPE_TYPE, getType(scope));
((AbstractSynchronizeScope)scope).saveState(settings);
}
-
+
/**
* Restore a scope from the given memento
- *
+ *
* @param settings a memento
* @return the scope restored from the given memento
*/
@@ -71,29 +71,29 @@ public abstract class AbstractSynchronizeScope implements ISynchronizeScope {
}
return new WorkspaceScope();
}
-
+
private static String getType(ISynchronizeScope scope) {
String name = scope.getClass().getName();
int lastDot = name.lastIndexOf("."); //$NON-NLS-1$
if (lastDot == -1) {
return name;
}
- return name.substring(lastDot + 1);
+ return name.substring(lastDot + 1);
}
-
+
/**
* Constructor a scope from scratch
*/
protected AbstractSynchronizeScope() {
}
-
+
/**
* Constructor a scope from a previously saved state
*/
protected AbstractSynchronizeScope(IMemento memento) {
init(memento);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
*/
@@ -103,7 +103,7 @@ public abstract class AbstractSynchronizeScope implements ISynchronizeScope {
listeners.add(listener);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
*/
@@ -113,7 +113,7 @@ public abstract class AbstractSynchronizeScope implements ISynchronizeScope {
listeners.remove(listeners);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeScope#dispose()
*/
@@ -121,10 +121,10 @@ public abstract class AbstractSynchronizeScope implements ISynchronizeScope {
public void dispose() {
// Do nothing by default
}
-
+
/**
* Fires the given property change event to all registered listeners.
- *
+ *
* @param event the property change event to be fired
*/
protected void firePropertyChangedEvent(final PropertyChangeEvent event) {
@@ -143,32 +143,32 @@ public abstract class AbstractSynchronizeScope implements ISynchronizeScope {
}
}
/**
- * Fires a change event for property <code>ISynchronizeScope.ROOTS</code>
+ * Fires a change event for property <code>ISynchronizeScope.ROOTS</code>
* containing the new roots. The old roots are not provided in the event.
*/
protected void fireRootsChanges() {
firePropertyChangedEvent(new PropertyChangeEvent(this, ROOTS, new IResource[0], getRoots()));
}
-
+
/**
* Persist the state of this scope. Clients must persist enough additional
* state to know what type (i.e. subclass) of scope to be recreated.
- *
+ *
* @param memento the memento into which the scope is to be saved
*/
public void saveState(IMemento memento) {
// Do nothing by default
}
-
+
/**
* Method invoked from the constructor which populates the fields of this scope
- *
+ *
* @param memento the memento into which the scope was previously saved
*/
protected void init(IMemento memento) {
// Do nothing by default
}
-
+
/**
* Return whether the given resource is within this scope.
* By default, a resource is considered in the scope if
@@ -188,7 +188,7 @@ public abstract class AbstractSynchronizeScope implements ISynchronizeScope {
}
return false;
}
-
+
/**
* Return the resource mappings that define this scope.
* By default, the mappings are just be deep traversals
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java
index f608c3e04..787eb5c4b 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java
@@ -11,46 +11,46 @@
package org.eclipse.team.ui.synchronize;
/**
- * Manages synchronization view participants. Clients can programmatically add
+ * Manages synchronization view participants. Clients can programmatically add
* or remove participant instances from this manager. Managed participants are available to
- * clients whereas un-managed participants can still exist but won't be available
+ * clients whereas un-managed participants can still exist but won't be available
* generally available to clients until explicitly added to the manager.
* <p>
* Participants added to the manager will benefit from the manager's lifecycle
* support. The participants will automatically have their <code>init</code> method and <code>dispose</code>
- * called when the manager starts and is shutdown and if persistable will
+ * called when the manager starts and is shutdown and if persistable will
* be allowed to save their state on shutdown.
* </p><p>
* Clients are not intended to implement this interface.
* </p>
* @see ISynchronizeParticipant
* @see org.eclipse.team.ui.TeamUI#getSynchronizeManager()
- * @since 3.0
+ * @since 3.0
*/
-public interface ISynchronizeManager {
-
+public interface ISynchronizeManager {
+
/**
* Constant identifying the job family identifier for a background job that affects the
* synchronization state of resources. All clients
* that schedule background jobs that affect synchronization state should include this job
* family in their implementation of <code>belongsTo</code>.
- *
+ *
* @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
*/
public static final Object FAMILY_SYNCHRONIZE_OPERATION = new Object();
-
+
/**
* Registers the given listener for participant notifications. Has
* no effect if an identical listener is already registered.
- *
+ *
* @param listener listener to register
*/
public void addSynchronizeParticipantListener(ISynchronizeParticipantListener listener);
-
+
/**
* Removes the given listener for participant notifications. Has
* no effect if an identical listener is not already registered.
- *
+ *
* @param listener listener to remove
*/
public void removeSynchronizeParticipantListener(ISynchronizeParticipantListener listener);
@@ -59,61 +59,61 @@ public interface ISynchronizeManager {
* Adds the given participants to the synchronize manager. Has no effect for
* equivalent participants are already registered. The participants will be added
* to any existing synchronize views.
- *
+ *
* @param participants participants to add
*/
public void addSynchronizeParticipants(ISynchronizeParticipant[] participants);
-
+
/**
* Removes the given participants from the synchronize manager. If the participants are
* being displayed in any synchronize views, their associated pages will be closed.
- *
+ *
* @param participants participants to remove
*/
public void removeSynchronizeParticipants(ISynchronizeParticipant[] participants);
-
+
/**
* Returns a collection of synchronize participant references registered with the synchronize manager.
- *
+ *
* @return a collection of synchronize participants registered with the synchronize manager.
*/
public ISynchronizeParticipantReference[] getSynchronizeParticipants();
-
+
/**
* Returns the registered synchronize participants with the given type id. It is
* possible to have multiple instances of the same participant type.
- *
+ *
* @param id the type identifier for the participant
- * @return the registered synchronize participants with the given id, or
+ * @return the registered synchronize participants with the given id, or
* an empty list if there are none with that id registered.
*/
public ISynchronizeParticipantReference[] get(String id);
-
+
/**
* Returns the registered synchronize participants with the given type id and instance id.
- *
+ *
* @param id the type identifier for the participant
* @param secondaryId the instance identifier for this participant type or <code>null</code>
* if this participant doesn't support multiple instances.
- * @return the registered synchronize participants with the given id, or
+ * @return the registered synchronize participants with the given id, or
* <code>null</code> if none with that id is not registered.
*/
public ISynchronizeParticipantReference get(String id, String secondaryId);
-
+
/**
* Opens the synchronize view in the perspective defined by the user in the team synchronize
* preferences.
- *
+ *
* @return the opened synchronize view or <code>null</code> if it can't be opened.
*/
public ISynchronizeView showSynchronizeViewInActivePage();
/**
- * Returns the participant descriptor for the given participant type id or
+ * Returns the participant descriptor for the given participant type id or
* <code>null</code> if a descriptor is not found for that id.
* @param id the participant id
- *
- * @return the participant descriptor for the given participant id or
+ *
+ * @return the participant descriptor for the given participant id or
* <code>null</code> if a descriptor is not found for that id.
*/
public ISynchronizeParticipantDescriptor getParticipantDescriptor(String id);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelChangeListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelChangeListener.java
index 2ba7916ed..8c79725ed 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelChangeListener.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelChangeListener.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelElement.java
index f7b31ed4c..42f4003ac 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelElement.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelElement.java
@@ -33,26 +33,26 @@ public interface ISynchronizeModelElement extends IDiffContainer, ITypedElement,
* Property constant indicating that the element is currently being worked on by an operation.
*/
public static final String BUSY_PROPERTY = TeamUIPlugin.ID + ".busy"; //$NON-NLS-1$
-
+
/**
* Property constant indicating that the element has children that are conflicting.
*/
public static final String PROPAGATED_CONFLICT_PROPERTY = TeamUIPlugin.ID + ".conflict"; //$NON-NLS-1$
-
+
/**
* Property constant identifying that this element or one of its children has an error marker.
*/
public static final String PROPAGATED_ERROR_MARKER_PROPERTY = TeamUIPlugin.ID + ".error"; //$NON-NLS-1$
-
+
/**
* Property constant indicating that this element or one of its children has a warning marker.
*/
public static final String PROPAGATED_WARNING_MARKER_PROPERTY = TeamUIPlugin.ID + ".warning"; //$NON-NLS-1$
/**
- * Adds a listener for changes to properties of this synchronize element. Has no effect if an identical
+ * Adds a listener for changes to properties of this synchronize element. Has no effect if an identical
* listener is already registered.
- *
+ *
* @param listener the listener to register
*/
public abstract void addPropertyChangeListener(IPropertyChangeListener listener);
@@ -60,30 +60,30 @@ public interface ISynchronizeModelElement extends IDiffContainer, ITypedElement,
/**
* Removes the given property change listener from this model element. Has no effect if
* the listener is not registered.
- *
+ *
* @param listener the listener to remove
*/
public abstract void removePropertyChangeListener(IPropertyChangeListener listener);
/**
* Assigns the given property to this element and all it's parents.
- *
+ *
* @param propertyName the property name to set
* @param value the value of the property
*/
public void setPropertyToRoot(String propertyName, boolean value);
-
+
/**
* Assigns the given property to this element.
- *
+ *
* @param propertyName the property name
* @param value the value of the property.
*/
public void setProperty(String propertyName, boolean value);
-
+
/**
* Return whether this element has the given property assigned.
- *
+ *
* @param propertyName the property to test for
* @return <code>true</code> if the property is set and <code>false</code>
* otherwise.
@@ -92,7 +92,7 @@ public interface ISynchronizeModelElement extends IDiffContainer, ITypedElement,
/**
* The image descriptor describing the given element.
- *
+ *
* @param element the model element for which to return an image.
* @return the image descriptor for the given element.
*/
@@ -101,7 +101,7 @@ public interface ISynchronizeModelElement extends IDiffContainer, ITypedElement,
/**
* Returns the resource this element is showing synchronization information for or <code>null</code>
* if the element does not have an associated local resource.
- *
+ *
* @return the resource this element is showing synchronization information for or <code>null</code>
* if the element does not have an associated local resource.
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePage.java
index 4560510e6..8aee51531 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePage.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -22,21 +22,21 @@ import org.eclipse.ui.PartInitException;
* @since 3.0
*/
public interface ISynchronizePage {
-
+
/**
* Initialize this page with workbench part that contains the page.
* This method will be called after the <code>Page#init(IPageSite)</code>
* but before <code>Page#createControl(Composite)</code>
- *
+ *
* @param site the workbench part for the view containing the page
* @throws PartInitException
*/
public void init(ISynchronizePageSite site) throws PartInitException;
-
+
/**
* Returns the viewer associated with this page or <code>null</code> if the page
* doesn't have a viewer.
- *
+ *
* @return the viewer associated with this page or <code>null</code> if the page
* doesn't have a viewer.
*/
@@ -46,7 +46,7 @@ public interface ISynchronizePage {
* Callback that is invoked from the synchronize configuration whenever a
* property's value is about to be changed. The page can react to the change
* before change events are fired or veto the change.
- *
+ *
* @param configuration the synchronize page configuration
* @param key the property key
* @param newValue
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java
index 0dce3f69e..00e88336a 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java
@@ -18,9 +18,9 @@ import org.eclipse.team.internal.ui.TeamUIPlugin;
import org.eclipse.ui.IWorkbenchActionConstants;
/**
- * Configures the model, actions and label decorations of an
+ * Configures the model, actions and label decorations of an
* {@link ISynchronizePage}. Clients can:
- * <ul>
+ * <ul>
* <li>set properties to affect the page contents and react to property changes
* <li>add and configure the actions available to the user (context menu,
* toolbar and view menu)
@@ -29,29 +29,29 @@ import org.eclipse.ui.IWorkbenchActionConstants;
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ISynchronizePageConfiguration {
-
+
/**
- * Property constant for the <code>SyncInfoSet</code> that is being
- * displayed by the page. Some pages may not be displaying the
+ * Property constant for the <code>SyncInfoSet</code> that is being
+ * displayed by the page. Some pages may not be displaying the
* contents of a <code>SyncInfoSet</code> in which case the value
* associated with this property will be <code>null</code>.
*/
public static final String P_SYNC_INFO_SET = TeamUIPlugin.ID + ".P_SYNC_INFO_SET"; //$NON-NLS-1$
-
+
/**
- * Property constant for the list of label decorators
- * (instance of <code>ILabelDecorator[]</code>) that will be
+ * Property constant for the list of label decorators
+ * (instance of <code>ILabelDecorator[]</code>) that will be
* applied to the text and image from the label provider.
*/
public static final String P_LABEL_DECORATORS = TeamUIPlugin.ID + ".P_LABEL_DECORATORS"; //$NON-NLS-1$
/**
- * Property constant that defines the groups in the toolbar
+ * Property constant that defines the groups in the toolbar
* menu of the page. The value for this
* property should be a string array. If this property is
* set to <code>null</code>, the <code>DEFAULT_TOOLBAR_MENU</code>
* is used. Also, the groups mentioned in the <code>DEFAULT_TOOLBAR_MENU</code>
- * can be removed but will always appear in the same order if
+ * can be removed but will always appear in the same order if
* included.
*/
public static final String P_TOOLBAR_MENU = TeamUIPlugin.ID + ".P_TOOLBAR_MENU"; //$NON-NLS-1$
@@ -62,27 +62,27 @@ public interface ISynchronizePageConfiguration {
* property should be a string array.
*/
public static final String P_CONTEXT_MENU = TeamUIPlugin.ID + ".P_CONTEXT_MENU"; //$NON-NLS-1$
-
+
/**
- * Property constant that defines the groups in the drop-down view
+ * Property constant that defines the groups in the drop-down view
* menu of the page. The value for this
* property should be a string array. If this property is
* set to <code>null</code>, the <code>DEFAULT_VIEW_MENU</code>
* is used. Also, the groups mentioned in the <code>DEFAULT_VIEW_MENU</code>
- * can be removed but will always appear in the same order if
+ * can be removed but will always appear in the same order if
* included.
*/
public static final String P_VIEW_MENU = TeamUIPlugin.ID + ".P_VIEW_MENU"; //$NON-NLS-1$
/**
* The configuration property that defines the filter id that
- * determines which object contribution actions appear in the
+ * determines which object contribution actions appear in the
* context menu for the page. This defaults to the id of the
* participant but can be set to another id or <code>null</code>
* @since 3.1
*/
public static final String P_OBJECT_CONTRIBUTION_ID = TeamUIPlugin.ID + ".P_OBJECT_CONTRIBUTION_ID"; //$NON-NLS-1$
-
+
/**
* Property constant for the type of comparison used to create
* the <code>SyncInfo</code> in the P_SYNC_INFO_SET property.
@@ -90,14 +90,14 @@ public interface ISynchronizePageConfiguration {
* modes selection applies.
*/
public static final String P_COMPARISON_TYPE = TeamUIPlugin.ID + ".P_COMPARISON_TYPE"; //$NON-NLS-1$
-
+
/**
* Property constant for the mode used to filter the visible
* elements of the model. The value can be one of the mode integer
* constants.
*/
public static final String P_MODE = TeamUIPlugin.ID + ".P_SYNCVIEWPAGE_MODE"; //$NON-NLS-1$
-
+
/**
* Property constant which indicates which modes are to be available to the user.
* The value is to be an integer that combines one or more of the
@@ -106,26 +106,26 @@ public interface ISynchronizePageConfiguration {
* mode filtering is not supported.
*/
public static final String P_SUPPORTED_MODES = TeamUIPlugin.ID + ".P_SUPPORTED_MODES"; //$NON-NLS-1$
-
+
/**
* Property constant for the id of the viewer to be used for this page.
* The viewer id corresponds to the viewer definition in the Common
* Navigator framework.
- *
+ *
* @since 3.2
*/
public static final String P_VIEWER_ID = TeamUIPlugin.ID + ".P_VIEWER_ID"; //$NON-NLS-1$
-
+
/**
* Property constant for the description (String) of the page that appears
* as the description of the view when the page is active.
- *
+ *
* @since 3.2
*/
public static final String P_PAGE_DESCRIPTION = TeamUIPlugin.ID + ".P_PAGE_DESCRIPTION"; //$NON-NLS-1$
-
+
/**
- * The id of the synchronize group the determines where the synchronize
+ * The id of the synchronize group the determines where the synchronize
* actions appear.
*/
public static final String SYNCHRONIZE_GROUP = "synchronize"; //$NON-NLS-1$
@@ -135,7 +135,7 @@ public interface ISynchronizePageConfiguration {
* actions appear
*/
public static final String NAVIGATE_GROUP = "navigate"; //$NON-NLS-1$
-
+
/**
* The id of the sort group that determines where sort
* actions or submenus appear.
@@ -166,7 +166,7 @@ public interface ISynchronizePageConfiguration {
* actions appear in the view drop-down.
*/
public static final String PREFERENCES_GROUP = "preferences"; //$NON-NLS-1$
-
+
/**
* The id of the group that determines where workbench object contributions
* should appear. This group will only be used if there is an
@@ -174,7 +174,7 @@ public interface ISynchronizePageConfiguration {
* @since 3.1
*/
public static final String OBJECT_CONTRIBUTIONS_GROUP = IWorkbenchActionConstants.MB_ADDITIONS;
-
+
/**
* The id of the layout group that determines whether the layout selection
* actions appear in the view drop-down or toolbar.
@@ -193,19 +193,19 @@ public interface ISynchronizePageConfiguration {
* These groups will always appear in this order in the toolbar.
* Clients can disable one or more of these groups by setting
* the <code>P_TOOLBAR_MENU</code> property to an array that
- * contains a subset of these. Clients can also add groups
- * by adding new unique group ids to the array. Added groups
+ * contains a subset of these. Clients can also add groups
+ * by adding new unique group ids to the array. Added groups
* will appear in the order specified but after the default groups.
*/
public static final String[] DEFAULT_TOOLBAR_MENU = new String[] { SYNCHRONIZE_GROUP, NAVIGATE_GROUP, MODE_GROUP, LAYOUT_GROUP };
-
+
/**
* These are the default groups used for the drop-down view menu of a page.
* These groups will always appear in this order in the view menu.
* Clients can disable one or more of these groups by setting
* the <code>P_VIEW_MENU</code> property to an array that
- * contains a subset of these. Clients can also add groups
- * by adding new unique group ids to the array. Added groups
+ * contains a subset of these. Clients can also add groups
+ * by adding new unique group ids to the array. Added groups
* will appear in the order specified but after the default groups.
*/
public static final String[] DEFAULT_VIEW_MENU = new String[] { LAYOUT_GROUP, MODE_GROUP, SYNCHRONIZE_GROUP, PREFERENCES_GROUP };
@@ -215,7 +215,7 @@ public interface ISynchronizePageConfiguration {
*/
public final static String TWO_WAY = "two-way"; //$NON-NLS-1$
public final static String THREE_WAY = "three-way"; //$NON-NLS-1$
-
+
/**
* Modes are direction filters for the view
*/
@@ -230,21 +230,21 @@ public interface ISynchronizePageConfiguration {
* @return the participant
*/
public abstract ISynchronizeParticipant getParticipant();
-
+
/**
* Return the site which provides access to certain workbench
* services.
* @return the page site
*/
public abstract ISynchronizePageSite getSite();
-
+
/**
* Return the page created from and associated with this
* configuration.
* @return Returns the page for this configuration
*/
public ISynchronizePage getPage();
-
+
/**
* Set the page for this configuration. This method should only
* be called once by the {@link ISynchronizeParticipant} that created
@@ -255,7 +255,7 @@ public interface ISynchronizePageConfiguration {
/**
* Add a property change listener to the configuration.
- * Registered listeners will receive notification when
+ * Registered listeners will receive notification when
* any property changes.
* @param listener a property change listener
*/
@@ -302,13 +302,13 @@ public interface ISynchronizePageConfiguration {
* @param group a synchronize page action group
*/
public abstract void removeActionContribution(SynchronizePageActionGroup group);
-
+
/**
* Add a label decorator to the page configuration.
* @param decorator a label decorator
*/
public void addLabelDecorator(ILabelDecorator decorator);
-
+
/**
* Set the groups that are to be added to the menu identified
* by the menu property id.
@@ -317,7 +317,7 @@ public interface ISynchronizePageConfiguration {
* @param groups a array of groups Ids
*/
public void setMenuGroups(String menuPropertyId, String[] groups);
-
+
/**
* Adds a menu group of the given id to the end of the menu groups list
* for the given menu property id.
@@ -337,7 +337,7 @@ public interface ISynchronizePageConfiguration {
* otherwise
*/
public abstract boolean hasMenuGroup(String menuPropertyId, String groupId);
-
+
/**
* Return the value of the P_MODE property of this configuration.
* @return the mode property value
@@ -352,13 +352,13 @@ public interface ISynchronizePageConfiguration {
* @param mode the mode value
*/
void setMode(int mode);
-
+
/**
* Return the value of the P_SUPPORTED_MODES property of this configuration.
* @return the supported modes property value
*/
int getSupportedModes();
-
+
/**
* Set the P_SUPPORTED_MODES property of this configuration to the
* given combination of one or more mode flags (<code>INCOMING_MODE</code>,
@@ -375,7 +375,7 @@ public interface ISynchronizePageConfiguration {
* or <code>null</code> if the property is not set
*/
public abstract SyncInfoSet getSyncInfoSet();
-
+
/**
* Return the comparison type used by the page's <code>SyncInfo</code>
* modes.
@@ -383,7 +383,7 @@ public interface ISynchronizePageConfiguration {
* or a custom type).
*/
String getComparisonType();
-
+
/**
* Set the comparison type used by the page's <code>SyncInfo</code>
* modes. The default type is <code>THREE_WAY</code>.
@@ -391,14 +391,14 @@ public interface ISynchronizePageConfiguration {
* or a custom type).
*/
void setComparisonType(String type);
-
+
/**
* Sets the runnable context that can be used by the page's
* actions to display progress.
* @param context a runnable context (or null)
*/
void setRunnableContext(IRunnableContext context);
-
+
/**
* Return the runnable context. If <code>null</code> is returned,
* actions can use their own method of progress feedback either
@@ -408,9 +408,9 @@ public interface ISynchronizePageConfiguration {
IRunnableContext getRunnableContext();
/**
- * Return the id of the viewer to which this configuration is
+ * Return the id of the viewer to which this configuration is
* associated.
- * @return the id of the viewer to which this configuration is
+ * @return the id of the viewer to which this configuration is
* associated
* @since 3.2
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageSite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageSite.java
index d6e979f71..e97ab958f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageSite.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageSite.java
@@ -22,7 +22,7 @@ import org.eclipse.ui.IWorkbenchSite;
* A site which provides access to the context in which this page
* is being displayed. Instances of this interface serve a similar purpose
* to <code>IWorkbenchSite</code> instances but is provided as a separate
- * objects to allow clients to access the different site types
+ * objects to allow clients to access the different site types
* (view, editor, dialog) using a common interface. This interface also provides
* access to the part for the site because this is required by some UI
* components. Clients should not need to access the part.
@@ -32,7 +32,7 @@ import org.eclipse.ui.IWorkbenchSite;
* <code>instanceof</code> checks can be done with the part.
* <p>
* Clients are not intended to implement this interface
- *
+ *
* @since 3.0
*/
public interface ISynchronizePageSite {
@@ -40,19 +40,19 @@ public interface ISynchronizePageSite {
/**
* Return the workbench site for the page
* or <code>null</code> if a workbench site is not available (e.g. if
- * the page is being shown in a dialog).
+ * the page is being shown in a dialog).
* @return the workbench site for the page or <code>null</code>
*/
IWorkbenchSite getWorkbenchSite();
-
+
/**
* Return the workbench part for the page
* or <code>null</code> if a workbench part is not available (e.g. if
- * the page is being shown in a dialog).
+ * the page is being shown in a dialog).
* @return the workbench part for the page or <code>null</code>
*/
IWorkbenchPart getPart();
-
+
/**
* Returns the shell for this site.
* @return the shell for this site
@@ -84,7 +84,7 @@ public interface ISynchronizePageSite {
* Give the page focus.
*/
void setFocus();
-
+
/**
* Return a settings node that can be used by the
* page to save state. A <code>null</code> value
@@ -93,7 +93,7 @@ public interface ISynchronizePageSite {
* @return a settings node or <code>null</code>
*/
IDialogSettings getPageSettings();
-
+
/**
* Returns the action bars for this synchronize page site.
*
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java
index 1607a6abb..abb388de7 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java
@@ -21,38 +21,38 @@ import org.eclipse.ui.part.IPageBookViewPage;
/**
* A synchronize participant is a visual component that can be displayed within any
- * control (e.g. view, editor, dialog). Typically a participant is used to show changes between
+ * control (e.g. view, editor, dialog). Typically a participant is used to show changes between
* local resources and variant states of those resources and allows the user to perform actions
- * to manipulate the changes.
+ * to manipulate the changes.
* <p>
* This class does not mandate how the synchronization state is displayed, but instead provides
* the accessors that clients would use to create a visual instance of the this participant.
* </p><p>
- * A participant can display multiple instances of its synchronization state to the user via the creation
+ * A participant can display multiple instances of its synchronization state to the user via the creation
* of a page {@link #createPage(ISynchronizePageConfiguration)} and
* clients can decide where to display the page. For example, the synchronize view is an example
* of a client that displays a participant in a view. However, you can imagine that a client may
- * also want to display this state in a wizard or dialog instead.
+ * also want to display this state in a wizard or dialog instead.
* </p><p>
- * When a participant is registered with the {@link ISynchronizeManager} it will automatically display
+ * When a participant is registered with the {@link ISynchronizeManager} it will automatically display
* in the <i>Synchronize View</i> and if the participant extension point
* enabled <code>synchronizeWizards</code> it will also appear in the global synchronize action
- * toolbar.
+ * toolbar.
* <p>
* A participant is added to the workbench as follows:
* <ul>
- * <li>A <code>synchronizeParticipant</code> extension is contributed to
- * the team registry. This extension defines the participant id, name, icon, type, and
+ * <li>A <code>synchronizeParticipant</code> extension is contributed to
+ * the team registry. This extension defines the participant id, name, icon, type, and
* participant class.
* <li>A user via a wizard provided by the <code>synchronizeWizards</code> extension point
* or client code, creates a participant instance and registers it with the
* synchronize manager. It then appears in the synchronize view.
- * <li>A synchronization can be persistent and thus re-initialized at startup.
+ * <li>A synchronization can be persistent and thus re-initialized at startup.
* <li>A pinned participant will only be removed from the synchronize manager if it is un-pinned.
* </ul></p>
* <p>
* Once a participant is added to the synchronize manager its lifecycle will be managed. On shutdown if
- * the participant is persistable, the participant will be asked to persist state via
+ * the participant is persistable, the participant will be asked to persist state via
* the <code>saveState()</code> method. At startup the <code>init()</code> method is called
* with a handle to the state that was saved. The dispose method is called when the participant is
* removed from the manager and at shutdown.
@@ -65,13 +65,13 @@ import org.eclipse.ui.part.IPageBookViewPage;
* subclass {@link AbstractSynchronizeParticipant}.
*/
public interface ISynchronizeParticipant extends IExecutableExtension, IAdaptable {
-
+
/**
- * A property constant that can be used to indicate that the content of this participant
+ * A property constant that can be used to indicate that the content of this participant
* has changed. This is a general event that can be used to indicate to the user that there
* is a change in state for the participant. In general, the values associated with the event do not have
* any meaning.
- *
+ *
* @see #addPropertyChangeListener(IPropertyChangeListener)
*/
public static final String P_CONTENT = "org.eclipse.team.ui.content"; //$NON-NLS-1$
@@ -80,120 +80,120 @@ public interface ISynchronizeParticipant extends IExecutableExtension, IAdaptabl
* Returns the unique id that identified the <i>type</i> of this
* synchronize participant. The synchronize manager supports registering
* several instances of the same participant type.
- *
+ *
* @return the unique id that identified the <i>type</i> of this
* synchronize participant.
*/
public String getId();
-
+
/**
* Returns the instance id that identified the unique instance of this
* participant. The synchronize manager supports registering
* several instances of the same participant type and this id is used
* to differentiate between them.
- *
+ *
* @return the instance id that identified the unique instance of this
* participant or <code>null</code> if this participant doesn't support
* multiple instances.
- */
+ */
public String getSecondaryId();
-
+
/**
* Returns the name of this synchronize participant. This name is displayed to the user.
- *
+ *
* @return the name of this synchronize participant
*/
public String getName();
-
+
/**
* Returns an image descriptor for this synchronize participant, or <code>null</code>
* if none.
- *
+ *
* @return an image descriptor for this synchronize participant, or <code>null</code>
* if none
*/
public ImageDescriptor getImageDescriptor();
-
+
/**
* Returns if this participant is pinned. Pinned participants will only be removed from the
- * synchronize manager until they are un-pinned.
- *
+ * synchronize manager until they are un-pinned.
+ *
* @return <code>true</code> if this participant is pinned and <code>false</code>
* otherwise.
*/
public boolean isPinned();
-
+
/**
* Sets whether this participant is pinned.
- *
- * @param pinned sets if the participant is pinned.
+ *
+ * @param pinned sets if the participant is pinned.
*/
public void setPinned(boolean pinned);
-
+
/**
* Creates the configuration for the participant page. The configuration controls the
* options for displaying the participant. The configuration used to initialize the page
* when {@link #createPage(ISynchronizePageConfiguration)} is called and as such
* can be used to pre-configure visual properties of the displayed page.
- *
+ *
* @return the configuration for the participant page.
*/
public ISynchronizePageConfiguration createPageConfiguration();
-
+
/**
* Creates and returns a new page for this synchronize participant. The
* page is displayed using the parameters from the configuration. For example,
* the configuration defines the context in which the page is shown, via the
- * {@link ISynchronizePageSite}.
- *
+ * {@link ISynchronizePageSite}.
+ *
* @param configuration used to initialize the page
* @return a page book view page representation of this synchronize
* participant
*/
public IPageBookViewPage createPage(ISynchronizePageConfiguration configuration);
-
+
/**
* Runs the participants action. Typically this would be some action to refresh the synchronization
* state of the participant. This action is run from the global synchronize drop-down.
- *
+ *
* @param part the part in which the action is run or <code>null</code> if the action
* is not being run in a workbench part.
*/
public void run(IWorkbenchPart part);
-
+
/**
- * Initializes this participant with the given participant state.
- * A memento is passed to the participant which contains a snapshot
+ * Initializes this participant with the given participant state.
+ * A memento is passed to the participant which contains a snapshot
* of the participants state from a previous session.
* <p>
* This method is automatically called by the team plugin shortly after
* participant construction. It marks the start of the views
* lifecycle. Clients must not call this method.
- * </p>
+ * </p>
* @param secondaryId the secondayId of this participant instance or <code>null</code>
* if this participant doesn't support multiple instances.
- * @param memento the participant state or <code>null</code> if there
+ * @param memento the participant state or <code>null</code> if there
* is no previous saved state
- * @exception PartInitException if this participant was not initialized
+ * @exception PartInitException if this participant was not initialized
* successfully
*/
public void init(String secondaryId, IMemento memento) throws PartInitException;
-
+
/**
- * Disposes of this synchronize participant and is called to free the
+ * Disposes of this synchronize participant and is called to free the
* resources associated with a participant. When a participant is added
* to the {@link ISynchronizeManager} this method is called when the
* manager is shutdown or the participant is removed from the manager.
* </p><p>
- * Within this method a participant may release any resources, fonts, images, etc.
+ * Within this method a participant may release any resources, fonts, images, etc.
* held by this part. It is also very important to remove all listeners.
* </p><p>
- * Clients should not call this method (the synchronize manager calls this
+ * Clients should not call this method (the synchronize manager calls this
* method at appropriate times).
* </p>
*/
public void dispose();
-
+
/**
* Saves the participants object state within the memento. This state
* will be available when the participant is restored via <code>init</code>.
@@ -204,7 +204,7 @@ public interface ISynchronizeParticipant extends IExecutableExtension, IAdaptabl
* @param memento a memento to receive the object state
*/
public void saveState(IMemento memento);
-
+
/**
* Adds a listener for changes to properties of this synchronize
* participant. Has no effect if an identical listener is already
@@ -223,15 +223,15 @@ public interface ISynchronizeParticipant extends IExecutableExtension, IAdaptabl
* @param listener a property change listener
*/
public void addPropertyChangeListener(IPropertyChangeListener listener);
-
+
/**
* Removes the given property listener from this synchronize participant.
* Has no effect if an identical listener is not already registered.
- *
+ *
* @param listener a property listener
*/
public void removePropertyChangeListener(IPropertyChangeListener listener);
-
+
/**
* Prepare the given element and compare configuration for use with a compare editor
* input.
@@ -241,13 +241,13 @@ public interface ISynchronizeParticipant extends IExecutableExtension, IAdaptabl
* @param monitor a progress monitor that can be used if contacting a server to prepare the element and configuration
* @throws TeamException if an error occurred that should prevent the display of the compare editor containing
* the element
- *
+ *
* @since 3.1
*/
public void prepareCompareInput(
- ISynchronizeModelElement element,
- CompareConfiguration configuration,
- IProgressMonitor monitor)
+ ISynchronizeModelElement element,
+ CompareConfiguration configuration,
+ IProgressMonitor monitor)
throws TeamException;
/**
@@ -256,10 +256,10 @@ public interface ISynchronizeParticipant extends IExecutableExtension, IAdaptabl
* @since 3.1
*/
public PreferencePage[] getPreferencePages();
-
+
/**
* Returns the help context id of this participant.
- *
+ *
* @return the help context id of this participant
* @since 3.5
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java
index 5e8ae0c31..c7a4084e6 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java
@@ -13,9 +13,9 @@ package org.eclipse.team.ui.synchronize;
import org.eclipse.jface.resource.ImageDescriptor;
/**
- * A participant descriptor contains the content of the
- * <code>synchronizeParticipants</code> extension section for
- * for a registered participant type in the declaring plug-in's
+ * A participant descriptor contains the content of the
+ * <code>synchronizeParticipants</code> extension section for
+ * for a registered participant type in the declaring plug-in's
* manifest (<code>plugin.xml</code>) file.
* <p>
* Clients are not intended to implement this interface.
@@ -26,35 +26,35 @@ import org.eclipse.jface.resource.ImageDescriptor;
public interface ISynchronizeParticipantDescriptor {
/**
* Returns the name of this participant. This can be shown to the user.
- *
+ *
* @return the name of this participant. This can be shown to the user.
*/
public String getName();
-
+
/**
* Returns a string describing this participant type.
- *
+ *
* @return a string describing this participant type.
*/
public String getDescription();
-
+
/**
* Returns the unique id that identifies this participant type.
- *
+ *
* @return the unique id that identifies this participant type.
*/
public String getId();
/**
* Returns the image descriptor for this participant type.
- *
+ *
* @return the image descriptor for this participant type.
*/
public ImageDescriptor getImageDescriptor();
-
+
/**
* Returns if this participant can be persisted between sessions.
- *
+ *
* @return <code>true</code> if this participant can be persisted between sessions
* and false otherwise.
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantListener.java
index 8b903670e..513e04245 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantListener.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantListener.java
@@ -11,7 +11,7 @@
package org.eclipse.team.ui.synchronize;
/**
- * A synchronize participant listener is notified when participants are added or
+ * A synchronize participant listener is notified when participants are added or
* removed from the synchronize manager.
* <p>
* Clients may implement this interface.
@@ -19,19 +19,19 @@ package org.eclipse.team.ui.synchronize;
* @see ISynchronizeManager
* @since 3.0
*/
-public interface ISynchronizeParticipantListener {
+public interface ISynchronizeParticipantListener {
/**
* Notification the given participants have been added to the synchronize
* manager.
- *
+ *
* @param participants added participants
*/
public void participantsAdded(ISynchronizeParticipant[] participants);
-
+
/**
* Notification the given participants have been removed from the
* synchronize manager.
- *
+ *
* @param participants removed participants
*/
public void participantsRemoved(ISynchronizeParticipant[] participants);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantReference.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantReference.java
index 15a78e831..5ffb63e88 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantReference.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantReference.java
@@ -13,9 +13,9 @@ package org.eclipse.team.ui.synchronize;
import org.eclipse.team.core.TeamException;
/**
- * A reference is a light weight handle used by the {@link ISynchronizeManager}
+ * A reference is a light weight handle used by the {@link ISynchronizeManager}
* to manage registered participants. It is used to reference information
- * about a particular participant instance without requiring the participant
+ * about a particular participant instance without requiring the participant
* to be instantiated. Calling the {@link #getParticipant()} method will
* cause the participant to be instantiated.
* <p>
@@ -27,44 +27,44 @@ import org.eclipse.team.core.TeamException;
public interface ISynchronizeParticipantReference {
/**
* Returns the id of the participant type referenced by this handle.
- *
+ *
* @return the id of the participant type references by this handle.
*/
public String getId();
-
+
/**
* Returns the secondary id (e.g. instance id) of the participant type referenced
* by this handle or <code>null</code> if the participant doesn't support
* multiple instances.
- *
+ *
* @return the secondary id of the participant type referenced
* by this handle or <code>null</code> if the participant doesn't support
* multiple instances.
*/
public String getSecondaryId();
-
+
/**
* Returns the fully qualified name of this participant reference. This includes the
* secondaryId if available. This can be displayed in the user interface to allow
* the user to distinguish between multiple instances of a participant.
- *
+ *
* @return the fully qualified name of this participant reference
*/
public String getDisplayName();
-
+
/**
* Returns the participant referenced by this handle. This may trigger loading of the
* participant and and a result may be long running. The method may return <code>null</code>
* if the participant cannot be de-referenced.
- *
+ *
* @return the participant referenced by this handle.
* @throws TeamException if an error occurs
*/
public ISynchronizeParticipant getParticipant() throws TeamException;
-
+
/**
* Returns the descriptor for this participant type.
- *
+ *
* @return the descriptor for this participant type.
*/
public ISynchronizeParticipantDescriptor getDescriptor();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java
index d932ef47a..8950ad7b5 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java
@@ -17,56 +17,56 @@ import org.eclipse.jface.util.IPropertyChangeListener;
* A synchronize scope defines the set of resources involved in a
* synchronization. Instance of this interface are used to scope the resources
* of a created {@link SubscriberParticipant}.
- *
+ *
* @see SubscriberParticipant
* @since 3.0
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ISynchronizeScope {
-
+
/**
* Property used to indicate when the roots of the scope have changed.
*/
public static final String ROOTS = "prop_roots"; //$NON-NLS-1$
-
+
/**
* Property used to indicate when the name of the scope has changed.
* @since 3.1
*/
public static final String NAME = "prop_name"; //$NON-NLS-1$
-
+
/**
* Return the name of the scope
- *
+ *
* @return the name of the scope
*/
public String getName();
-
+
/**
* Return the root resources that define this scope. A return value
* of <code>null</code> indicates that the participant should use
* its default set of resources.
- *
+ *
* @return the root resources or <code>null</code>
*/
public IResource[] getRoots();
-
+
/**
* Add a property change listener that will get invoked when a
* property of the receiver changes.
- *
+ *
* @param listener
*/
public void addPropertyChangeListener(IPropertyChangeListener listener);
-
+
/**
* Remove a property change listener. Removing an unregistered listener
* has no effect.
- *
+ *
* @param listener
*/
public void removePropertyChangeListener(IPropertyChangeListener listener);
-
+
/**
* Dispose of the scope when it is no longer needed.
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeView.java
index a467a784c..131df1b83 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeView.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeView.java
@@ -16,9 +16,9 @@ import org.eclipse.ui.IViewPart;
* A view that displays synchronization participants that are registered with the
* synchronize manager. This is essentially a generic container that allows
* multiple {@link ISynchronizeParticipant} implementations to share the same
- * view. The only behavior provided by the view is a mechanism for switching
+ * view. The only behavior provided by the view is a mechanism for switching
* between participants.
- * <p>
+ * <p>
* Clients can not add viewActions to this view because they will be global
* to all participants. Instead, add participant specific actions as described
* in {@link org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration}.
@@ -26,33 +26,33 @@ import org.eclipse.ui.IViewPart;
* @see ISynchronizeManager#showSynchronizeViewInActivePage()
* @since 3.0
* @noimplement Clients are not intended to implement this interface.
- *
+ *
*/
public interface ISynchronizeView extends IViewPart {
/**
* The id for this view
*/
public static final String VIEW_ID = "org.eclipse.team.sync.views.SynchronizeView"; //$NON-NLS-1$
-
+
/**
* This id is no longer used.
* @deprecated not used, please use {@link #VIEW_ID} instead.
*/
@Deprecated
public static final String COMPARE_VIEW_ID = "org.eclipse.team.sync.views.CompareView"; //$NON-NLS-1$
-
+
/**
* Displays the given synchronize participant in the Synchronize View. This
* has no effect if this participant is already being displayed.
- *
+ *
* @param participant participant to be displayed, cannot be <code>null</code>
*/
public void display(ISynchronizeParticipant participant);
-
+
/**
* Returns the participant currently being displayed in the Synchronize View
* or <code>null</code> if none.
- *
+ *
* @return the participant currently being displayed in the Synchronize View
* or <code>null</code> if none
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelMergeOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelMergeOperation.java
index 3cdf492a9..3ed2c7b8e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelMergeOperation.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelMergeOperation.java
@@ -32,7 +32,7 @@ import org.eclipse.ui.IWorkbenchPart;
* A model operation that executes a merge according to the merge lifecycle
* associated with an {@link IMergeContext} and {@link IResourceMappingMerger}
* instances obtained from the model providers involved.
- *
+ *
* @since 3.2
*/
public abstract class ModelMergeOperation extends ModelOperation {
@@ -42,7 +42,7 @@ public abstract class ModelMergeOperation extends ModelOperation {
* the scope of the context. The {@link IResourceMappingMerger} for each
* model provider will be consulted and any non-OK status will be
* accumulated and returned,
- *
+ *
* @param context
* the merge context being validated
* @param monitor
@@ -70,7 +70,7 @@ public abstract class ModelMergeOperation extends ModelOperation {
monitor.done();
}
}
-
+
/*
* Validate the merge by obtaining the {@link IResourceMappingMerger} for the
* given provider.
@@ -85,13 +85,13 @@ public abstract class ModelMergeOperation extends ModelOperation {
return Status.OK_STATUS;
return merger.validateMerge(context, monitor);
}
-
+
/*
* Return the auto-merger associated with the given model provider using the
* adaptable mechanism. If the model provider does not have a merger
* associated with it, a default merger that performs the merge at the file
* level is returned.
- *
+ *
* @param provider
* the model provider of the elements to be merged (must not be
* <code>null</code>)
@@ -101,7 +101,7 @@ public abstract class ModelMergeOperation extends ModelOperation {
Assert.isNotNull(provider);
return (IResourceMappingMerger)Utils.getAdapter(provider, IResourceMappingMerger.class);
}
-
+
/**
* Create a model merge operation.
* @param part the workbench part from which the operation was requested or <code>null</code>
@@ -110,12 +110,12 @@ public abstract class ModelMergeOperation extends ModelOperation {
protected ModelMergeOperation(IWorkbenchPart part, ISynchronizationScopeManager manager) {
super(part, manager);
}
-
+
/**
* Perform a merge. First {@link #initializeContext(IProgressMonitor)} is
* called to determine the set of resource changes. Then the
* {@link #executeMerge(IProgressMonitor)} method is invoked.
- *
+ *
* @param monitor a progress monitor
*/
@Override
@@ -140,7 +140,7 @@ public abstract class ModelMergeOperation extends ModelOperation {
* there are no validation problems, {@link #performMerge(IProgressMonitor)}
* will then be called to perform the merge. If there are problems encountered
* or if a preview was requested, {@link #handlePreviewRequest()} is called.
- *
+ *
* @param monitor a progress monitor
*/
protected void executeMerge(IProgressMonitor monitor) throws CoreException {
@@ -162,7 +162,7 @@ public abstract class ModelMergeOperation extends ModelOperation {
}
monitor.done();
}
-
+
/**
* A preview of the merge has been requested. By default, this method does
* nothing. Subclasses that wish to support previewing must override this
@@ -255,7 +255,7 @@ public abstract class ModelMergeOperation extends ModelOperation {
};
});
}
-
+
/**
* Attempt a headless merge of the elements in the context of this
* operation. The merge is performed by obtaining the
@@ -265,7 +265,7 @@ public abstract class ModelMergeOperation extends ModelOperation {
* method. The method will stop on the first conflict encountered.
* This method will throw a runtime exception
* if the operation does not have a merge context.
- *
+ *
* @param monitor
* a progress monitor
* @return a status that indicates whether the merge succeeded.
@@ -275,7 +275,7 @@ public abstract class ModelMergeOperation extends ModelOperation {
protected IStatus performMerge(IProgressMonitor monitor) throws CoreException {
ISynchronizationContext sc = getContext();
if (sc instanceof IMergeContext) {
- IMergeContext context = (IMergeContext) sc;
+ IMergeContext context = (IMergeContext) sc;
final ModelProvider[] providers = sortByExtension(context.getScope().getModelProviders());
final IStatus[] result = new IStatus[] { Status.OK_STATUS };
context.run(new IWorkspaceRunnable() {
@@ -308,7 +308,7 @@ public abstract class ModelMergeOperation extends ModelOperation {
}
return noMergeContextAvailable();
}
-
+
/**
* Attempt to merge all the mappings that come from the given provider.
* Return a status which indicates whether the merge succeeded or if
@@ -345,11 +345,11 @@ public abstract class ModelMergeOperation extends ModelOperation {
}
return noMergeContextAvailable();
}
-
+
private IStatus noMergeContextAvailable() {
throw new IllegalStateException(TeamUIMessages.ModelMergeOperation_2);
}
-
+
/**
* Return whether the context of this operation has changes that are
* of interest to the operation. Subclasses may override.
@@ -359,7 +359,7 @@ public abstract class ModelMergeOperation extends ModelOperation {
protected boolean hasChangesOfInterest() {
return !getContext().getDiffTree().isEmpty() && hasIncomingChanges(getContext().getDiffTree());
}
-
+
private boolean hasIncomingChanges(IDiffTree tree) {
return tree.hasMatchingDiffs(ResourcesPlugin.getWorkspace().getRoot().getFullPath(), new FastDiffFilter() {
@Override
@@ -378,7 +378,7 @@ public abstract class ModelMergeOperation extends ModelOperation {
}
});
}
-
+
private IMergeContext getMergeContext() {
return (IMergeContext)getContext();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelOperation.java
index 20d3be9b4..7e782047f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelOperation.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelOperation.java
@@ -36,14 +36,14 @@ import org.eclipse.ui.IWorkbenchPart;
* must be included in the operation to ensure model consistency. The scope
* generation phase will prompt the user if additional resources have been added
* to the scope.
- *
+ *
* @since 3.2
*/
public abstract class ModelOperation extends TeamOperation {
-
+
private boolean previewRequested;
private ISynchronizationScopeManager manager;
-
+
/**
* Return the list of provides sorted by their extends relationship.
* Extended model providers will appear later in the list then those
@@ -80,7 +80,7 @@ public abstract class ModelOperation extends TeamOperation {
}
return false;
}
-
+
/**
* Create a model operation that operates on the given scope.
* @param part the workbench part from which the merge was launched or <code>null</code>
@@ -90,10 +90,10 @@ public abstract class ModelOperation extends TeamOperation {
super(part);
this.manager = manager;
}
-
+
/**
* Run the operation. This method first ensures that the scope is built
- * by calling {@link #initializeScope(IProgressMonitor)} and then invokes the
+ * by calling {@link #initializeScope(IProgressMonitor)} and then invokes the
* {@link #execute(IProgressMonitor)} method.
* @param monitor a progress monitor
* @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
@@ -110,12 +110,12 @@ public abstract class ModelOperation extends TeamOperation {
monitor.done();
}
}
-
+
/**
* Method called from {@link #run(IProgressMonitor)} before
* the {@link #execute(IProgressMonitor)} method is invoked.
* This is done to give the operation a chance to initialize
- * any state required to execute. By default, the
+ * any state required to execute. By default, the
* {@link ISynchronizationScopeManager} for this operation
* is initialized if it was not previously initialized.
* @param monitor a progress monitor
@@ -169,7 +169,7 @@ public abstract class ModelOperation extends TeamOperation {
/**
* Prompt the user by calling {@link #promptForInputChange(String, IProgressMonitor)}
- * if the scope of the operation was expanded (as described in
+ * if the scope of the operation was expanded (as described in
* {@link #initializeScope(IProgressMonitor)}).
* @param monitor a progress monitor
*/
@@ -395,15 +395,15 @@ public abstract class ModelOperation extends TeamOperation {
if (requestPreviewMessage != null) {
forcePreview[0] = dialog.isForcePreview();
}
- }
+ }
});
-
+
if (canceled[0]) {
throw new OperationCanceledException();
}
return forcePreview[0];
}
-
+
/**
* Return the synchronization context for the operation or <code>null</code>
* if the operation doesn't have one or if it has not yet been created.
@@ -415,7 +415,7 @@ public abstract class ModelOperation extends TeamOperation {
}
/**
- * Execute the operation. This method is invoked after the
+ * Execute the operation. This method is invoked after the
* scope has been generated.
* @param monitor a progress monitor
* @throws InvocationTargetException
@@ -449,5 +449,5 @@ public abstract class ModelOperation extends TeamOperation {
protected ISynchronizationScopeManager getScopeManager() {
return manager;
}
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantAction.java
index 95da4712f..0faf4fef6 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantAction.java
@@ -31,7 +31,7 @@ import org.eclipse.ui.actions.BaseSelectionListenerAction;
/**
* Model provider actions for use with a {@link ModelSynchronizeParticipant}.
- *
+ *
* @since 3.2
*/
public abstract class ModelParticipantAction extends BaseSelectionListenerAction {
@@ -66,10 +66,10 @@ public abstract class ModelParticipantAction extends BaseSelectionListenerAction
protected ISynchronizePageConfiguration getConfiguration() {
return configuration;
}
-
+
/**
* Set the selection of this action to the given selection
- *
+ *
* @param selection the selection
*/
public void selectionChanged(ISelection selection) {
@@ -78,9 +78,9 @@ public abstract class ModelParticipantAction extends BaseSelectionListenerAction
} else {
super.selectionChanged(StructuredSelection.EMPTY);
}
-
+
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.actions.BaseSelectionListenerAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
*/
@@ -89,7 +89,7 @@ public abstract class ModelParticipantAction extends BaseSelectionListenerAction
super.updateSelection(selection);
return isEnabledForSelection(selection);
}
-
+
/**
* Return whether the action is enabled for the given selection
* @param selection the selection
@@ -113,7 +113,7 @@ public abstract class ModelParticipantAction extends BaseSelectionListenerAction
*/
protected boolean isVisible(IDiff node) {
ISynchronizePageConfiguration configuration = getConfiguration();
- if (configuration.getComparisonType() == ISynchronizePageConfiguration.THREE_WAY
+ if (configuration.getComparisonType() == ISynchronizePageConfiguration.THREE_WAY
&& node instanceof IThreeWayDiff) {
IThreeWayDiff twd = (IThreeWayDiff) node;
int mode = configuration.getMode();
@@ -142,19 +142,19 @@ public abstract class ModelParticipantAction extends BaseSelectionListenerAction
}
return false;
}
-
+
/**
- * Check to see if the target saveable differs from the currently
+ * Check to see if the target saveable differs from the currently
* active saveable. If it does, prompt to save changes in the
* active saveable if it is dirty.
- * @throws InterruptedException
- * @throws InvocationTargetException
+ * @throws InterruptedException
+ * @throws InvocationTargetException
*/
protected void handleTargetSaveableChange() throws InvocationTargetException, InterruptedException {
final SaveableComparison targetSaveable = getTargetSaveable();
final SaveableComparison activeSaveable = getActiveSaveable();
if (activeSaveable != null && activeSaveable.isDirty()) {
- PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
+ PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException,
InterruptedException {
@@ -212,8 +212,8 @@ public abstract class ModelParticipantAction extends BaseSelectionListenerAction
options = new String[] {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL};
}
MessageDialog dialog = new MessageDialog(
- shell,
- TeamUIMessages.ModelParticipantAction_0, null,
+ shell,
+ TeamUIMessages.ModelParticipantAction_0, null,
NLS.bind(TeamUIMessages.ModelParticipantAction_1, saveable.getName()),
MessageDialog.QUESTION,
options,
@@ -247,7 +247,7 @@ public abstract class ModelParticipantAction extends BaseSelectionListenerAction
protected void setActiveSaveable(SaveableComparison saveable) {
((ModelSynchronizeParticipant)configuration.getParticipant()).setActiveSaveable(saveable);
}
-
+
/**
* Return the saveable that is the target of this operation.
* By default, <code>null</code> is returned.
@@ -256,14 +256,14 @@ public abstract class ModelParticipantAction extends BaseSelectionListenerAction
protected SaveableComparison getTargetSaveable() {
return null;
}
-
+
/**
* Method called when the action is about to be shown in a context menu.
* This method recalculates the enablement for the current
- * selection and uses that to set the enablement.
+ * selection and uses that to set the enablement.
*/
public void updateEnablement() {
setEnabled(isEnabledForSelection(getStructuredSelection()));
}
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantMergeOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantMergeOperation.java
index 6cd339384..1cbbe68c5 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantMergeOperation.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantMergeOperation.java
@@ -29,11 +29,11 @@ import org.eclipse.ui.progress.WorkbenchJob;
/**
* A model merge operation that uses a participant to preview the changes
* in either a dialog or the Synchronize view.
- *
+ *
* @since 3.2
*/
public abstract class ModelParticipantMergeOperation extends ModelMergeOperation {
-
+
/**
* Status code that can be returned from the {@link #performMerge(IProgressMonitor)}
* method to indicate that a subclass would like to force a preview of the merge.
@@ -45,9 +45,9 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation
private boolean ownsParticipant = true;
private boolean sentToSyncView;
-
+
private static final Object PARTICIPANT_MERGE_FAMILY = new Object();
-
+
/**
* Create a merge participant operation for the scope of the given manager.
* @param part the workbench part from which the merge was launched or <code>null</code>
@@ -69,7 +69,7 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation
handlePreviewRequest();
sentToSyncView = true;
}
- participant.getContext().refresh(getScope().getTraversals(),
+ participant.getContext().refresh(getScope().getTraversals(),
RemoteResourceMappingContext.FILE_CONTENTS_REQUIRED, monitor);
// Only wait if we are not going to preview or we are previewing in a dialog
if (!sentToSyncView)
@@ -80,7 +80,7 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation
}
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.operations.ModelMergeOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -93,7 +93,7 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation
participant.dispose();
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.ModelMergeOperation#executeMerge(org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -102,7 +102,7 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation
if (!sentToSyncView)
super.executeMerge(monitor);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.operations.ModelMergeOperation#handlePreviewRequest()
*/
@@ -121,7 +121,7 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation
}
ParticipantPageCompareEditorInput input = new ParticipantPageCompareEditorInput(cc, pageConfiguration, participant);
CompareUI.openCompareDialog(input);
- } else {
+ } else {
ISynchronizeManager mgr = TeamUI.getSynchronizeManager();
ISynchronizeView view = mgr.showSynchronizeViewInActivePage();
mgr.addSynchronizeParticipants(new ISynchronizeParticipant[] {participant});
@@ -142,7 +142,7 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation
if (TeamUI.getSynchronizeManager().get(participant.getId(), participant.getSecondaryId()) == null)
participant.dispose();
}
-
+
});
ownsParticipant = false;
job.schedule();
@@ -157,7 +157,7 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation
return true;
return super.belongsTo(family);
}
-
+
/**
* Return whether previews should occur in a dialog or in the synchronize view.
* @return whether previews should occur in a dialog or in the synchronize view
@@ -175,14 +175,14 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation
return participant.getContext();
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.operations.ResourceMappingOperation#getPreviewRequestMessage()
*/
@Override
protected String getPreviewRequestMessage() {
if (!isPreviewRequested()) {
- return TeamUIMessages.ResourceMappingMergeOperation_4;
+ return TeamUIMessages.ResourceMappingMergeOperation_4;
}
return super.getPreviewRequestMessage();
}
@@ -190,12 +190,12 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation
/**
* Create the synchronize participant to be used by this operation
* to preview changes. By default, a {@link ModelSynchronizeParticipant}
- * is created using the scope manager ({@link #getScopeManager()}) context
+ * is created using the scope manager ({@link #getScopeManager()}) context
* from ({@link #createMergeContext()}) and job name ({@link #getJobName()})
* of this operation. Subclasses may override this method.
* <p>
- * Once created, it is the responsibility of the participant to dispose of the
- * synchronization context when it is no longer needed.
+ * Once created, it is the responsibility of the participant to dispose of the
+ * synchronization context when it is no longer needed.
* @return a newly created synchronize participant to be used by this operation
*/
protected ModelSynchronizeParticipant createParticipant() {
@@ -204,7 +204,7 @@ public abstract class ModelParticipantMergeOperation extends ModelMergeOperation
/**
* Create a merge context for use by this operation. This method
- * is not long running so the operation should not refresh the
+ * is not long running so the operation should not refresh the
* context or perform other long running operations in this thread.
* However the context may start initializing in another thread as long
* as the job used to perform the initialization belongs to the
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantWizard.java
index 7874cf403..fc19b0e11 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantWizard.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelParticipantWizard.java
@@ -19,19 +19,19 @@ import org.eclipse.team.ui.TeamUI;
* This is a convenience class for creating wizards for use with the
* <code>org.eclipse.team.ui.synchronizeWizard</code> extension point
* that create a {@link ModelSynchronizeParticipant}.
- *
+ *
* @since 3.2
*/
public abstract class ModelParticipantWizard extends ParticipantSynchronizeWizard {
private ModelElementSelectionPage selectionPage;
-
+
public ModelParticipantWizard() {
super();
setNeedsProgressMonitor(true);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ParticipantSynchronizeWizard#createParticipant()
*/
@@ -42,7 +42,7 @@ public abstract class ModelParticipantWizard extends ParticipantSynchronizeWizar
// We don't know in which site to show progress because a participant could actually be shown in multiple sites.
participant.run(null /* no site */);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ParticipantSynchronizeWizard#createScopeSelectionPage()
*/
@@ -55,7 +55,7 @@ public abstract class ModelParticipantWizard extends ParticipantSynchronizeWizar
/**
* Method called from {@link #createParticipant()} to create a
* {@link ModelSynchronizeParticipant} for the given resource mappings.
- *
+ *
* @param selectedMappings
* the selected mappings that define the scope
* @return a synchronize participant that will be added to the Synchronize
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java
index d650b0e0a..24c9a0a57 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java
@@ -41,12 +41,12 @@ import org.eclipse.ui.progress.IProgressConstants2;
* a {@link ISynchronizationContext}.
* <p>
* This class may be subclassed by clients.
- *
+ *
* @since 3.2
*/
public class ModelSynchronizeParticipant extends
AbstractSynchronizeParticipant {
-
+
/**
* Property constant used to store and retrieve the id of the active
* {@link ModelProvider} from an {@link ISynchronizePageConfiguration}. The
@@ -55,36 +55,36 @@ public class ModelSynchronizeParticipant extends
* returned, all model providers are considered active and are visible.
*/
public static final String P_VISIBLE_MODEL_PROVIDER = TeamUIPlugin.ID + ".activeModelProvider"; //$NON-NLS-1$
-
+
/**
* Constant used with the <code>P_ACTIVE_MODEL_PROVIDER</code> property to indicate
* that all enabled model providers are active.
*/
public static final String ALL_MODEL_PROVIDERS_VISIBLE = TeamUIPlugin.ID + ".activeModelProvider"; //$NON-NLS-1$
-
+
/**
* Property constant used during property change notification to indicate
* that the enabled model providers for this participant have changed.
*/
public static final String PROP_ENABLED_MODEL_PROVIDERS = TeamUIPlugin.ID + ".ENABLED_MODEL_PROVIDERS"; //$NON-NLS-1$
-
+
/**
* Property constant used during property change notification to indicate
* that the active model of this participant has changed.
*/
public static final String PROP_ACTIVE_SAVEABLE = TeamUIPlugin.ID + ".ACTIVE_SAVEABLE"; //$NON-NLS-1$
-
+
/**
* Property constant used during property change notification to indicate
* that the dirty state for the active saveable model of this participant has changed.
*/
public static final String PROP_DIRTY = TeamUIPlugin.ID + ".DIRTY"; //$NON-NLS-1$
-
+
/*
* Key for settings in memento
*/
private static final String CTX_PARTICIPANT_SETTINGS = TeamUIPlugin.ID + ".MODEL_PARTICIPANT_SETTINGS"; //$NON-NLS-1$
-
+
/*
* Key for schedule in memento
*/
@@ -94,7 +94,7 @@ public class ModelSynchronizeParticipant extends
* Key for description in memento
*/
private static final String CTX_DESCRIPTION = TeamUIPlugin.ID + ".MODEL_PARTICIPANT_DESCRIPTION"; //$NON-NLS-1$
-
+
/*
* Constants used to save and restore this scope
*/
@@ -102,7 +102,7 @@ public class ModelSynchronizeParticipant extends
private static final String CTX_MODEL_PROVIDER_ID = "modelProviderId"; //$NON-NLS-1$
private static final String CTX_MODEL_PROVIDER_MAPPINGS = "mappings"; //$NON-NLS-1$
private static final String CTX_STARTUP_ACTION = "startupAction"; //$NON-NLS-1$
-
+
private SynchronizationContext context;
private boolean mergingEnabled = true;
private SubscriberRefreshSchedule refreshSchedule;
@@ -135,7 +135,7 @@ public class ModelSynchronizeParticipant extends
public static ModelSynchronizeParticipant createParticipant(SynchronizationContext context, String name) {
return new ModelSynchronizeParticipant(context, name);
}
-
+
/*
* Create a participant for the given context
* @param context the synchronization context
@@ -161,7 +161,7 @@ public class ModelSynchronizeParticipant extends
initializeContext(context);
refreshSchedule = new SubscriberRefreshSchedule(createRefreshable());
}
-
+
/**
* Create a participant in order to restore it from saved state.
*/
@@ -176,11 +176,11 @@ public class ModelSynchronizeParticipant extends
String name = super.getName();
if (description == null)
description = Utils.getScopeDescription(getContext().getScope());
- return NLS.bind(TeamUIMessages.SubscriberParticipant_namePattern, new String[] { name, description });
+ return NLS.bind(TeamUIMessages.SubscriberParticipant_namePattern, new String[] { name, description });
}
/**
- * Return the name of the participant as specified in the plugin manifest file.
+ * Return the name of the participant as specified in the plugin manifest file.
* This method is provided to give access to this name since it is masked by
* the <code>getName()</code> method defined in this class.
* @return the name of the participant as specified in the plugin manifest file
@@ -189,7 +189,7 @@ public class ModelSynchronizeParticipant extends
protected final String getShortName() {
return super.getName();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#initializeConfiguration(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
*/
@@ -211,7 +211,7 @@ public class ModelSynchronizeParticipant extends
/**
* Create the merge action group for this participant.
- * Subclasses can override in order to provide a
+ * Subclasses can override in order to provide a
* merge action group that configures certain aspects
* of the merge actions.
* @return the merge action group for this participant
@@ -238,11 +238,11 @@ public class ModelSynchronizeParticipant extends
}
/**
- * Refresh a participant in the background the result of the refresh are shown in the progress view. Refreshing
+ * Refresh a participant in the background the result of the refresh are shown in the progress view. Refreshing
* can also be considered synchronizing, or refreshing the synchronization state. Basically this is a long
* running operation that will update the participant's context with new changes detected on the
* server.
- *
+ *
* @param site the workbench site the synchronize is running from. This can be used to notify the site
* that a job is running.
* @param mappings the resource mappings to be refreshed
@@ -251,7 +251,7 @@ public class ModelSynchronizeParticipant extends
IRefreshSubscriberListener listener = new RefreshUserNotificationPolicy(this);
internalRefresh(mappings, null, null, site, listener);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#dispose()
*/
@@ -261,7 +261,7 @@ public class ModelSynchronizeParticipant extends
Job.getJobManager().cancel(this);
refreshSchedule.dispose();
}
-
+
/**
* Set the context of this participant. This method must be invoked
* before a page is obtained from the participant.
@@ -298,7 +298,7 @@ public class ModelSynchronizeParticipant extends
public ISynchronizationContext getContext() {
return context;
}
-
+
/**
* Return a compare input for the given model object or <code>null</code>
* if the object is not eligible for comparison.
@@ -333,7 +333,7 @@ public class ModelSynchronizeParticipant extends
/**
* Return whether merge capabilities are enabled for this participant.
- * If merging is enabled, merge actions can be shown. If merging is disabled, no
+ * If merging is enabled, merge actions can be shown. If merging is disabled, no
* merge actions should be surfaced.
* @return whether merge capabilities should be enabled for this participant
*/
@@ -348,7 +348,7 @@ public class ModelSynchronizeParticipant extends
public void setMergingEnabled(boolean mergingEnabled) {
this.mergingEnabled = mergingEnabled;
}
-
+
private void internalRefresh(ResourceMapping[] mappings, String jobName, String taskName, IWorkbenchSite site, IRefreshSubscriberListener listener) {
if (jobName == null)
jobName = getShortTaskName();
@@ -359,30 +359,30 @@ public class ModelSynchronizeParticipant extends
job.setUser(true);
job.setProperty(IProgressConstants2.SHOW_IN_TASKBAR_ICON_PROPERTY, Boolean.TRUE);
Utils.schedule(job, site);
-
+
// Remember the last participant synchronized
TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT, getId());
TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID, getSecondaryId());
}
-
+
/**
* Returns the short task name (e.g. no more than 25 characters) to describe
* the behavior of the refresh operation to the user. This is typically
* shown in the status line when this participant is refreshed in the
* background. When refreshed in the foreground, only the long task name is
* shown.
- *
+ *
* @return the short task name to show in the status line.
*/
protected String getShortTaskName() {
return NLS.bind(TeamUIMessages.Participant_synchronizingDetails, getShortName());
}
-
+
/**
* Returns the long task name to describe the behavior of the refresh
* operation to the user. This is typically shown in the status line when
* this subscriber is refreshed in the background.
- *
+ *
* @param mappings the mappings being refreshed
* @return the long task name
* @since 3.1
@@ -399,19 +399,19 @@ public class ModelSynchronizeParticipant extends
mappingCount = mappings.length;
}
if (mappingCount == 1) {
- return NLS.bind(TeamUIMessages.Participant_synchronizingMoreDetails, new String[] { getShortName(), Utils.getLabel(mappings[0]) });
+ return NLS.bind(TeamUIMessages.Participant_synchronizingMoreDetails, new String[] { getShortName(), Utils.getLabel(mappings[0]) });
}
- return NLS.bind(TeamUIMessages.Participant_synchronizingResources, new String[] { getShortName(), Integer.toString(mappingCount) });
+ return NLS.bind(TeamUIMessages.Participant_synchronizingResources, new String[] { getShortName(), Integer.toString(mappingCount) });
}
-
+
private IRefreshable createRefreshable() {
return new IRefreshable() {
-
+
@Override
public RefreshParticipantJob createJob(String interval) {
String jobName = NLS.bind(TeamUIMessages.RefreshSchedule_15, new String[] { ModelSynchronizeParticipant.this.getName(), interval });
- return new RefreshModelParticipantJob(ModelSynchronizeParticipant.this,
- jobName,
+ return new RefreshModelParticipantJob(ModelSynchronizeParticipant.this,
+ jobName,
jobName,
context.getScope().getMappings(),
new RefreshUserNotificationPolicy(ModelSynchronizeParticipant.this));
@@ -428,10 +428,10 @@ public class ModelSynchronizeParticipant extends
public SubscriberRefreshSchedule getRefreshSchedule() {
return refreshSchedule;
}
-
+
};
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class)
*/
@@ -439,14 +439,14 @@ public class ModelSynchronizeParticipant extends
public Object getAdapter(Class adapter) {
if (adapter == IRefreshable.class && refreshSchedule != null) {
return refreshSchedule.getRefreshable();
-
+
}
if (adapter == SubscriberRefreshSchedule.class) {
return refreshSchedule;
}
return super.getAdapter(adapter);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#saveState(org.eclipse.ui.IMemento)
*/
@@ -501,7 +501,7 @@ public class ModelSynchronizeParticipant extends
}
}
}
-
+
private ResourceMapping[] loadMappings(IMemento settings) throws PartInitException {
List result = new ArrayList();
IMemento[] children = settings.getChildren(CTX_PARTICIPANT_MAPPINGS);
@@ -553,10 +553,10 @@ public class ModelSynchronizeParticipant extends
/**
* Create and return a scope manager that can be used to build the scope of this
- * participant when it is restored after a restart. By default, this method
+ * participant when it is restored after a restart. By default, this method
* returns a scope manager that uses the local content.
* This method can be overridden by subclasses.
- *
+ *
* @param mappings the restored mappings
* @return a scope manager that can be used to build the scope of this
* participant when it is restored after a restart
@@ -564,7 +564,7 @@ public class ModelSynchronizeParticipant extends
protected ISynchronizationScopeManager createScopeManager(ResourceMapping[] mappings) {
return new SynchronizationScopeManager(super.getName(), mappings, ResourceMappingContext.LOCAL_CONTEXT, true);
}
-
+
/* private */ void setRefreshSchedule(SubscriberRefreshSchedule schedule) {
if (refreshSchedule != schedule) {
if (refreshSchedule != null) {
@@ -608,7 +608,7 @@ public class ModelSynchronizeParticipant extends
if (isDirty != wasDirty)
firePropertyChange(this, PROP_DIRTY, Boolean.valueOf(wasDirty), Boolean.valueOf(isDirty));
}
-
+
/**
* Convenience method for switching the active saveable of this participant
* to the saveable of the given input.
@@ -632,7 +632,7 @@ public class ModelSynchronizeParticipant extends
setActiveSaveable(targetBuffer);
return true;
}
-
+
/**
* Return the list of model providers that are enabled for the participant.
* By default, the list is those model providers that contain mappings
@@ -642,7 +642,7 @@ public class ModelSynchronizeParticipant extends
public ModelProvider[] getEnabledModelProviders() {
return getContext().getScope().getModelProviders();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#getPreferencePages()
*/
@@ -683,9 +683,9 @@ public class ModelSynchronizeParticipant extends
}
return false;
}
-
+
private SubscriberDiffTreeEventHandler getHandler() {
return (SubscriberDiffTreeEventHandler)Utils.getAdapter(context, SubscriberDiffTreeEventHandler.class);
}
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipantActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipantActionGroup.java
index fa3425d7c..e01201c69 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipantActionGroup.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipantActionGroup.java
@@ -27,7 +27,7 @@ import org.eclipse.ui.*;
* synchronize participant. The groups adds the following:
* <ul>
* <li>A toolbar action for attempting an auto-merge
- * <li>Context menu merge actions that delegate to the
+ * <li>Context menu merge actions that delegate to the
* model's merge action handlers.
* <li>TODO a merge all and overwrite all menu item?
* </ul>
@@ -36,7 +36,7 @@ import org.eclipse.ui.*;
* by overriding {@link #configureMergeAction(String, Action)} and can
* configure where in the context menu the actions appear by overriding
* {@link #addToContextMenu(String, Action, IMenuManager)}.
- *
+ *
* @since 3.2
**/
public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActionGroup {
@@ -52,12 +52,12 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio
* actions (e.g. mark-as-merged) appear in the context menu.
*/
public static final String OTHER_ACTION_GROUP = "other"; //$NON-NLS-1$
-
+
/**
* The id used to identify the Merge All action.
*/
protected static final String MERGE_ALL_ACTION_ID = "org.eclipse.team.ui.mergeAll"; //$NON-NLS-1$
-
+
/**
* Create a merge action group.
*/
@@ -71,14 +71,14 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio
private MergeAction merge;
private MergeAction overwrite;
private MergeAction markAsMerged;
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#initialize(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
*/
@Override
public void initialize(ISynchronizePageConfiguration configuration) {
super.initialize(configuration);
-
+
ModelSynchronizeParticipant participant = ((ModelSynchronizeParticipant)configuration.getParticipant());
if (participant.isMergingEnabled()) {
updateToolbarAction = new MergeIncomingChangesAction(configuration);
@@ -107,7 +107,7 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio
});
}
}
-
+
@Override
public void fillActionBars(IActionBars actionBars) {
super.fillActionBars(actionBars);
@@ -116,7 +116,7 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio
appendToGroup(menu, ISynchronizePageConfiguration.PREFERENCES_GROUP, showPreferences);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager)
*/
@@ -140,18 +140,18 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio
}
}
if (allElementsHaveCompareInput) {
- menu.appendToGroup(fileGroup.getId(), openInCompareAction);
+ menu.appendToGroup(fileGroup.getId(), openInCompareAction);
}
}
}
}
-
+
/*
* Method to add the merge actions to the context menu. This method
* is called by the internal synchronization framework and should not
* to be invoked by other clients. Subclasses can configure the
* merge actions by overriding {@link #configureMergeAction(String, Action)}
- * and can control where in the context menu the action appears by
+ * and can control where in the context menu the action appears by
* overriding {@link #addToContextMenu(String, Action, IMenuManager)}.
* @param cmm the menu manager
*/
@@ -163,7 +163,7 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio
merge = new MergeAction(SynchronizationActionProvider.MERGE_ACTION_ID, cmm, getConfiguration());
configureMergeAction(SynchronizationActionProvider.MERGE_ACTION_ID, merge);
registerActionWithWorkbench(merge);
-
+
}
merge.update();
addToContextMenu(SynchronizationActionProvider.MERGE_ACTION_ID, merge, cmm);
@@ -186,11 +186,11 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio
}
}
}
-
+
/**
* Register this action with the workbench so that it can participate in keybindings and
* retargetable actions.
- *
+ *
* @param action the action to register
*/
private void registerActionWithWorkbench(IAction action) {
@@ -203,12 +203,12 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio
keyBindingService.registerAction(action);
}
}
-
+
/**
* Configure the merge action to have appropriate label, image, etc.
* Subclasses may override but should invoke the overridden
* method for unrecognized ids in order to support future additions.
- * @param mergeActionId the id of the merge action (one of
+ * @param mergeActionId the id of the merge action (one of
* {@link SynchronizationActionProvider#MERGE_ACTION_ID},
* {@link SynchronizationActionProvider#OVERWRITE_ACTION_ID} or
* {@link SynchronizationActionProvider#MARK_AS_MERGE_ACTION_ID})
@@ -233,7 +233,7 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio
}
}
}
-
+
private boolean isTwoWayMerge() {
ModelSynchronizeParticipant participant = ((ModelSynchronizeParticipant)getConfiguration().getParticipant());
ISynchronizationContext context = participant.getContext();
@@ -243,12 +243,12 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio
}
return false;
}
-
+
/**
- * Add the merge action to the context menu manager.
+ * Add the merge action to the context menu manager.
* Subclasses may override but should invoke the overridden
* method for unrecognized ids in order to support future additions.
- * @param mergeActionId the id of the merge action (one of
+ * @param mergeActionId the id of the merge action (one of
* {@link SynchronizationActionProvider#MERGE_ACTION_ID},
* {@link SynchronizationActionProvider#OVERWRITE_ACTION_ID} or
* {@link SynchronizationActionProvider#MARK_AS_MERGE_ACTION_ID})
@@ -270,7 +270,7 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio
manager.add(action);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#dispose()
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageCompareEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageCompareEditorInput.java
index d40dd4841..6cefefe79 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageCompareEditorInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageCompareEditorInput.java
@@ -39,26 +39,26 @@ import org.eclipse.ui.part.IPageBookViewPage;
* Displays a synchronize participant page combined with the compare/merge infrastructure. This only works if the
* synchronize page viewer provides selections that are of the following types: ITypedElement and ICompareInput
* or if the participant is a {@link ModelSynchronizeParticipant}.
- *
+ *
* @since 3.3
*/
public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
private ISynchronizeParticipant participant;
private ISynchronizePageConfiguration pageConfiguration;
-
+
private Image titleImage;
private IPageBookViewPage page;
private DialogSynchronizePageSite site;
private IPropertyChangeListener listener;
private Button rememberParticipantButton;
-
+
/**
* Creates a part for the provided participant. The page configuration is used when creating the participant page and the resulting
* compare/merge panes will be configured with the provided compare configuration.
* <p>
* For example, clients can decide if the user can edit the compare panes by calling {@link CompareConfiguration#setLeftEditable(boolean)}
- * or {@link CompareConfiguration#setRightEditable(boolean)}.
+ * or {@link CompareConfiguration#setRightEditable(boolean)}.
* </p>
* @param configuration the compare configuration that will be used to create the compare panes
* @param pageConfiguration the configuration that will be provided to the participant prior to creating the page
@@ -83,7 +83,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
setTitle(Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, participant.getName()));
return participant;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#getTitleImage()
*/
@@ -94,7 +94,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
}
return titleImage;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.PageCompareEditorInput#handleDispose()
*/
@@ -103,14 +103,14 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
if(titleImage != null) {
titleImage.dispose();
}
- if (page != null)
+ if (page != null)
page.dispose();
if (site != null)
site.dispose();
pageConfiguration.removePropertyChangeListener(listener);
super.handleDispose();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.PageCompareEditorInput#createPage(org.eclipse.compare.CompareViewerPane, org.eclipse.jface.action.IToolBarManager)
*/
@@ -138,7 +138,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
}
page.createControl(parent);
-
+
page.setActionBars(site.getActionBars());
toolBarManager.update(true);
return page;
@@ -164,7 +164,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
ICompareInput compareInput = super.asCompareInput(selection);
if (compareInput != null)
return compareInput;
-
+
if (selection != null && selection instanceof IStructuredSelection) {
IStructuredSelection ss= (IStructuredSelection) selection;
if (ss.size() == 1) {
@@ -177,7 +177,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
}
return null;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.PageCompareEditorInput#prepareInput(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -208,7 +208,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
monitor.done();
}
}
-
+
private void checkForBufferChange(Shell shell, final ICompareInput input, boolean cancelAllowed, IProgressMonitor monitor) throws CoreException {
ISynchronizeParticipant participant = pageConfiguration.getParticipant();
if (participant instanceof ModelSynchronizeParticipant) {
@@ -223,14 +223,14 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
private ISynchronizationCompareInput asModelCompareInput(ICompareInput input) {
return (ISynchronizationCompareInput)Utils.getAdapter(input, ISynchronizationCompareInput.class);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#isSaveNeeded()
*/
@Override
public boolean isSaveNeeded() {
if (participant instanceof ModelSynchronizeParticipant) {
- ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant;
+ ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant;
SaveableComparison currentBuffer = msp.getActiveSaveable();
if (currentBuffer != null) {
return currentBuffer.isDirty();
@@ -238,7 +238,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
}
return super.isSaveNeeded();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#saveChanges(org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -259,7 +259,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
}
}
}
-
+
private static void commit(IProgressMonitor pm, DiffNode node) throws CoreException {
ITypedElement left = node.getLeft();
if (left instanceof LocalResourceTypedElement)
@@ -268,13 +268,13 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
ITypedElement right = node.getRight();
if (right instanceof LocalResourceTypedElement)
((LocalResourceTypedElement) right).commit(pm);
-
+
IDiffElement[] children = node.getChildren();
for (int i = 0; i < children.length; i++) {
- commit(pm, (DiffNode)children[i]);
+ commit(pm, (DiffNode)children[i]);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.PageCompareEditorInput#contentChanged(org.eclipse.compare.IContentChangeNotifier)
*/
@@ -291,25 +291,25 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
Utils.handle(e);
}
}
-
+
/**
* Return the synchronize page configuration for this part
- *
+ *
* @return Returns the pageConfiguration.
*/
public ISynchronizePageConfiguration getPageConfiguration() {
return pageConfiguration;
}
-
+
/**
* Return the Synchronize participant for this part
- *
+ *
* @return Returns the participant.
*/
public ISynchronizeParticipant getParticipant() {
return participant;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#createContents(org.eclipse.swt.widgets.Composite)
*/
@@ -321,13 +321,13 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
Control control = super.createContents(composite);
control.setLayoutData(new GridData(GridData.FILL_BOTH));
rememberParticipantButton = new Button(composite, SWT.CHECK);
- rememberParticipantButton.setText(TeamUIMessages.ParticipantCompareDialog_1);
+ rememberParticipantButton.setText(TeamUIMessages.ParticipantCompareDialog_1);
rememberParticipantButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
return composite;
- }
+ }
return super.createContents(parent);
}
-
+
/**
* Return whether the ability to remember the participant in the synchronize
* view should be presented to the user. By default, <code>true</code> is
@@ -342,15 +342,15 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
private boolean shouldCreateRememberButton() {
return isOfferToRememberParticipant() && participant != null && ! particantRegisteredWithSynchronizeManager(participant);
}
-
+
private boolean isRememberParticipant() {
return getParticipant() != null && rememberParticipantButton != null && rememberParticipantButton.getSelection();
}
-
+
private boolean particantRegisteredWithSynchronizeManager(ISynchronizeParticipant participant) {
return TeamUI.getSynchronizeManager().get(participant.getId(), participant.getSecondaryId()) != null;
}
-
+
private void rememberParticipant() {
if(getParticipant() != null) {
ISynchronizeManager mgr = TeamUI.getSynchronizeManager();
@@ -359,7 +359,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
view.display(participant);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#okPressed()
*/
@@ -375,7 +375,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
rememberParticipant();
return super.okPressed();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#cancelPressed()
*/
@@ -386,7 +386,7 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
rememberParticipant();
super.cancelPressed();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#getOKButtonLabel()
*/
@@ -396,12 +396,12 @@ public class ParticipantPageCompareEditorInput extends PageCompareEditorInput {
return TeamUIMessages.ParticipantPageCompareEditorInput_0;
return TeamUIMessages.ResourceMappingMergeOperation_2;
}
-
+
private boolean isEditable() {
- return getCompareConfiguration().isLeftEditable()
+ return getCompareConfiguration().isLeftEditable()
|| getCompareConfiguration().isRightEditable();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#getCancelButtonLabel()
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageDialog.java
index db1ea289c..d2efb67c4 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageDialog.java
@@ -22,24 +22,24 @@ import org.eclipse.team.ui.*;
* A dialog that displays the option of adding the participant to the {@link org.eclipse.team.ui.synchronize.ISynchronizeManager}
* when the dialog is closed. This can be useful for showing changes for a participant modally and allowing the
* user to decide if the participant shown should be made available non-modally.
- *
+ *
* @see SaveablePartAdapter
* @see ISynchronizeParticipant
* @since 3.0
- * @deprecated Clients should use {@link ParticipantPageCompareEditorInput}
+ * @deprecated Clients should use {@link ParticipantPageCompareEditorInput}
* and {@link CompareUI#openCompareDialog(org.eclipse.compare.CompareEditorInput)}
*/
@Deprecated
public class ParticipantPageDialog extends SaveablePartDialog {
-
+
private ISynchronizeParticipant participant;
private Button rememberParticipantButton;
/**
* Creates a dialog with the given participant and input. The input is not created until the dialog
* is opened.
- *
- * @param shell the parent shell or <code>null</code> to create a top level shell.
+ *
+ * @param shell the parent shell or <code>null</code> to create a top level shell.
* @param input the compare input to show in the dialog
* @param participant the given participant
*/
@@ -47,21 +47,21 @@ public class ParticipantPageDialog extends SaveablePartDialog {
super(shell, input);
this.participant = participant;
}
-
+
/* (non-Javadoc)
* Method declared on Dialog.
*/
@Override
protected Control createDialogArea(Composite parent2) {
- Composite parent = (Composite) super.createDialogArea(parent2);
+ Composite parent = (Composite) super.createDialogArea(parent2);
if (isOfferToRememberParticipant() && participant != null && ! particantRegisteredWithSynchronizeManager(participant)) {
rememberParticipantButton = new Button(parent, SWT.CHECK);
- rememberParticipantButton.setText(TeamUIMessages.ParticipantCompareDialog_1);
+ rememberParticipantButton.setText(TeamUIMessages.ParticipantCompareDialog_1);
}
Dialog.applyDialogFont(parent2);
return parent;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int)
*/
@@ -72,15 +72,15 @@ public class ParticipantPageDialog extends SaveablePartDialog {
}
super.buttonPressed(buttonId);
}
-
+
private boolean isRememberParticipant() {
return getParticipant() != null && rememberParticipantButton != null && rememberParticipantButton.getSelection();
}
-
+
private boolean particantRegisteredWithSynchronizeManager(ISynchronizeParticipant participant) {
return TeamUI.getSynchronizeManager().get(participant.getId(), participant.getSecondaryId()) != null;
}
-
+
private void rememberParticipant() {
if(getParticipant() != null) {
ISynchronizeManager mgr = TeamUI.getSynchronizeManager();
@@ -89,16 +89,16 @@ public class ParticipantPageDialog extends SaveablePartDialog {
view.display(participant);
}
}
-
+
/**
* Returns the participant showing in this dialog.
- *
- * @return the participant showing in this dialog.
+ *
+ * @return the participant showing in this dialog.
*/
protected ISynchronizeParticipant getParticipant() {
return participant;
}
-
+
/**
* Return whether the ability to remember the participant in the synchronize
* view should be presented to the user. By default, <code>true</code> is
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPagePane.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPagePane.java
index 351aab225..0a1050332 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPagePane.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPagePane.java
@@ -27,7 +27,7 @@ import org.eclipse.ui.part.IPageBookViewPage;
* Stand alone presentation of a participant page within a view pane. This
* allows showing a participant page with it's toolbar in dialogs and embedded
* in views and editors.
- *
+ *
* @since 3.1
*/
public final class ParticipantPagePane {
@@ -37,18 +37,18 @@ public final class ParticipantPagePane {
private Image titleImage;
private Shell shell;
private boolean isModal;
-
+
// SWT controls
private CompareViewerPane fEditionPane;
private IPageBookViewPage fPage;
private DialogSynchronizePageSite site;
-
+
/**
* Creates a part for the provided participant. The page configuration is used when creating the participant page and the resulting
* compare/merge panes will be configured with the provided compare configuration.
* <p>
* For example, clients can decide if the user can edit the compare panes by calling {@link org.eclipse.compare.CompareConfiguration#setLeftEditable(boolean)}
- * or {@link org.eclipse.compare.CompareConfiguration#setRightEditable(boolean)}.
+ * or {@link org.eclipse.compare.CompareConfiguration#setRightEditable(boolean)}.
* </p>
* @param shell the parent shell for this part
* @param isModal to set the pane as modal or not
@@ -61,7 +61,7 @@ public final class ParticipantPagePane {
this.participant = participant;
this.pageConfiguration = pageConfiguration;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.SaveablePartAdapter#dispose()
*/
@@ -75,7 +75,7 @@ public final class ParticipantPagePane {
if (site != null)
site.dispose();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPart#getTitleImage()
*/
@@ -103,14 +103,14 @@ public final class ParticipantPagePane {
layout.marginWidth = 0;
layout.verticalSpacing = 0;
top.setLayout(layout);
-
+
shell = parent.getShell();
-
- fEditionPane = new CompareViewerPane(top, SWT.BORDER | SWT.FLAT);
- fEditionPane.setText(TeamUIMessages.ParticipantPageSaveablePart_0);
-
+
+ fEditionPane = new CompareViewerPane(top, SWT.BORDER | SWT.FLAT);
+ fEditionPane.setText(TeamUIMessages.ParticipantPageSaveablePart_0);
+
fEditionPane.setLayoutData(SWTUtils.createHVFillGridData());
-
+
fPage = participant.createPage(pageConfiguration);
site = new DialogSynchronizePageSite(shell, isModal);
((SynchronizePageConfiguration)pageConfiguration).setSite(site);
@@ -119,29 +119,29 @@ public final class ParticipantPagePane {
try {
((ISynchronizePage)fPage).init(pageConfiguration.getSite());
} catch (PartInitException e1) {
- TeamUIPlugin.log(IStatus.ERROR, TeamUIMessages.ParticipantPagePane_0, e1);
+ TeamUIPlugin.log(IStatus.ERROR, TeamUIMessages.ParticipantPagePane_0, e1);
}
fPage.createControl(fEditionPane);
fPage.setActionBars(site.getActionBars());
fEditionPane.setContent(fPage.getControl());
tbm.update(true);
-
+
return top;
}
-
+
/**
* Return the synchronize page configuration for this part
- *
+ *
* @return Returns the pageConfiguration.
*/
public ISynchronizePageConfiguration getPageConfiguration() {
return pageConfiguration;
}
-
+
/**
* Return the Synchronize participant for this part
- *
+ *
* @return Returns the participant.
*/
public ISynchronizeParticipant getParticipant() {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageSaveablePart.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageSaveablePart.java
index 43e82cb5b..f4be4324f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageSaveablePart.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageSaveablePart.java
@@ -35,7 +35,7 @@ import org.eclipse.ui.part.IPageBookViewPage;
* Displays a synchronize participant page combined with the compare/merge infrastructure. This only works if the
* synchronize page viewer provides selections that are of the following types: ITypedElement and ICompareInput
* or if the participant is a {@link ModelSynchronizeParticipant}.
- *
+ *
* @since 3.0
* @deprecated Clients should use a subclass of {@link PageCompareEditorInput}
* and {@link CompareUI#openCompareDialog(org.eclipse.compare.CompareEditorInput)}
@@ -49,7 +49,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo
private IPageBookViewPage page;
private DialogSynchronizePageSite site;
-
+
private IPropertyChangeListener listener;
private Viewer viewer;
@@ -58,7 +58,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo
* compare/merge panes will be configured with the provided compare configuration.
* <p>
* For example, clients can decide if the user can edit the compare panes by calling {@link CompareConfiguration#setLeftEditable(boolean)}
- * or {@link CompareConfiguration#setRightEditable(boolean)}.
+ * or {@link CompareConfiguration#setRightEditable(boolean)}.
* </p>
* @param shell the parent shell for this part
* @param cc the compare configuration that will be used to create the compare panes
@@ -70,7 +70,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo
this.participant = participant;
this.pageConfiguration = pageConfiguration;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.SaveablePartAdapter#dispose()
*/
@@ -79,14 +79,14 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo
if(titleImage != null) {
titleImage.dispose();
}
- if (page != null)
+ if (page != null)
page.dispose();
if (site != null)
site.dispose();
pageConfiguration.removePropertyChangeListener(listener);
super.dispose();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPart#getTitleImage()
*/
@@ -112,7 +112,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo
@Override
public boolean isDirty() {
if (participant instanceof ModelSynchronizeParticipant) {
- ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant;
+ ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant;
SaveableComparison currentBuffer = msp.getActiveSaveable();
if (currentBuffer != null) {
return currentBuffer.isDirty();
@@ -120,7 +120,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo
}
return super.isDirty();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.IContentChangeListener#contentChanged(org.eclipse.compare.IContentChangeNotifier)
*/
@@ -136,7 +136,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo
Utils.handle(e);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor)
*/
@@ -158,7 +158,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo
}
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.PageSaveablePart#createPage(org.eclipse.swt.widgets.Composite, org.eclipse.jface.action.ToolBarManager)
*/
@@ -185,13 +185,13 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo
}
page.createControl(parent);
-
+
initializeDiffViewer(((ISynchronizePage)page).getViewer());
-
+
page.setActionBars(site.getActionBars());
toolBarManager.update(true);
viewer = ((ISynchronizePage)page).getViewer();
-
+
setNavigator(pageConfiguration);
return page.getControl();
}
@@ -203,14 +203,14 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo
protected final ISelectionProvider getSelectionProvider() {
return ((ISynchronizePage)page).getViewer();
}
-
+
private void updateDescription() {
String description = (String)pageConfiguration.getProperty(ISynchronizePageConfiguration.P_PAGE_DESCRIPTION);
if (description != null) {
setPageDescription(description);
}
}
-
+
/**
* Initialize the diff viewer created for this compare input. If a subclass
* overrides the <code>createDiffViewer(Composite)</code> method, it should
@@ -237,7 +237,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo
});
}
}
-
+
/**
* {@inheritDoc}
* @since 3.2
@@ -282,7 +282,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo
private ISynchronizationCompareInput asModelCompareInput(ICompareInput input) {
return (ISynchronizationCompareInput)Utils.getAdapter(input, ISynchronizationCompareInput.class);
}
-
+
private SyncInfoModelElement getElement(ISelection selection) {
ICompareInput input = getCompareInput(selection);
if(input instanceof SyncInfoModelElement) {
@@ -290,7 +290,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo
}
return null;
}
-
+
private static void commit(IProgressMonitor pm, DiffNode node) throws CoreException {
ITypedElement left = node.getLeft();
if (left instanceof LocalResourceTypedElement)
@@ -299,25 +299,25 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo
ITypedElement right = node.getRight();
if (right instanceof LocalResourceTypedElement)
((LocalResourceTypedElement) right).commit(pm);
-
+
IDiffElement[] children = node.getChildren();
for (int i = 0; i < children.length; i++) {
- commit(pm, (DiffNode)children[i]);
+ commit(pm, (DiffNode)children[i]);
}
}
-
+
/**
* Return the synchronize page configuration for this part
- *
+ *
* @return Returns the pageConfiguration.
*/
public ISynchronizePageConfiguration getPageConfiguration() {
return pageConfiguration;
}
-
+
/**
* Return the Synchronize participant for this part
- *
+ *
* @return Returns the participant.
*/
public ISynchronizeParticipant getParticipant() {
@@ -333,7 +333,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo
ICompareInput compareInput = super.getCompareInput(selection);
if (compareInput != null)
return compareInput;
-
+
if (selection != null && selection instanceof IStructuredSelection) {
IStructuredSelection ss= (IStructuredSelection) selection;
if (ss.size() == 1) {
@@ -346,7 +346,7 @@ public class ParticipantPageSaveablePart extends PageSaveablePart implements ICo
}
return null;
}
-
-
+
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantSynchronizeWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantSynchronizeWizard.java
index 5b119fcbf..c9c1d5615 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantSynchronizeWizard.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantSynchronizeWizard.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -20,14 +20,14 @@ import org.eclipse.team.ui.TeamImages;
/**
* This is a convenience class for creating wizards for use with the
* <code>org.eclipse.team.ui.synchronizeWizard</code> extension point.
- *
+ *
* @since 3.2
*/
public abstract class ParticipantSynchronizeWizard extends Wizard {
private WizardPage selectionPage;
private IWizard importWizard;
-
+
/**
* Create the wizard.
*/
@@ -35,15 +35,15 @@ public abstract class ParticipantSynchronizeWizard extends Wizard {
setDefaultPageImageDescriptor(TeamImages.getImageDescriptor(ITeamUIImages.IMG_WIZBAN_SHARE));
setNeedsProgressMonitor(false);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#getWindowTitle()
*/
@Override
public String getWindowTitle() {
- return TeamUIMessages.GlobalRefreshSubscriberPage_0;
+ return TeamUIMessages.GlobalRefreshSubscriberPage_0;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#addPages()
*/
@@ -56,14 +56,14 @@ public abstract class ParticipantSynchronizeWizard extends Wizard {
importWizard.addPages();
IWizardPage startingPage = importWizard.getStartingPage();
if (startingPage != null) {
- startingPage.setTitle(NLS.bind(TeamUIMessages.SubscriberParticipantWizard_0, new String[] { getPageTitle() }));
- startingPage.setDescription(NLS.bind(TeamUIMessages.SubscriberParticipantWizard_1, new String[] { importWizard.getWindowTitle() }));
+ startingPage.setTitle(NLS.bind(TeamUIMessages.SubscriberParticipantWizard_0, new String[] { getPageTitle() }));
+ startingPage.setDescription(NLS.bind(TeamUIMessages.SubscriberParticipantWizard_1, new String[] { importWizard.getWindowTitle() }));
}
}
} else {
selectionPage = createScopeSelectionPage();
- selectionPage.setTitle(NLS.bind(TeamUIMessages.GlobalRefreshSubscriberPage_1, new String[] { getPageTitle() }));
- selectionPage.setMessage(TeamUIMessages.GlobalRefreshSubscriberPage_2);
+ selectionPage.setTitle(NLS.bind(TeamUIMessages.GlobalRefreshSubscriberPage_1, new String[] { getPageTitle() }));
+ selectionPage.setMessage(TeamUIMessages.GlobalRefreshSubscriberPage_2);
addPage(selectionPage);
}
}
@@ -80,7 +80,7 @@ public abstract class ParticipantSynchronizeWizard extends Wizard {
return true;
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
*/
@@ -91,7 +91,7 @@ public abstract class ParticipantSynchronizeWizard extends Wizard {
}
return super.getNextPage(page);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#performCancel()
*/
@@ -102,7 +102,7 @@ public abstract class ParticipantSynchronizeWizard extends Wizard {
}
return super.performCancel();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#canFinish()
*/
@@ -113,7 +113,7 @@ public abstract class ParticipantSynchronizeWizard extends Wizard {
}
return super.canFinish();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.wizard.Wizard#getStartingPage()
*/
@@ -130,14 +130,14 @@ public abstract class ParticipantSynchronizeWizard extends Wizard {
* @return the page title for the page used by this wizard
*/
protected abstract String getPageTitle();
-
+
/**
* Return a wizard that can be used to populate the workspace
* if there are no resources returned from {@link #getRootResources()}.
* @return a wizard that can be used to populate the workspace
*/
protected abstract IWizard getImportWizard();
-
+
/**
* Return the resources that are the roots of the resource
* trees that can be considered for inclusion.
@@ -145,7 +145,7 @@ public abstract class ParticipantSynchronizeWizard extends Wizard {
* trees that can be considered for inclusion
*/
protected abstract IResource[] getRootResources();
-
+
/**
* Create the page which allows the user to select the scope
* for the operation.
@@ -153,12 +153,12 @@ public abstract class ParticipantSynchronizeWizard extends Wizard {
* for the operation
*/
protected abstract WizardPage createScopeSelectionPage();
-
+
/**
* Method called from {@link #performFinish()} to create
* a participant. This participant will be added to the
* Synchronize view.
*/
protected abstract void createParticipant();
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ResourceScope.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ResourceScope.java
index 25d9de7c3..b08355176 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ResourceScope.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ResourceScope.java
@@ -22,51 +22,51 @@ import org.eclipse.ui.IMemento;
/**
* A synchronize scope whose roots are a set of resources.
- *
+ *
* @since 3.0
* @noextend This class is not intended to be subclassed by clients.
*/
public class ResourceScope extends AbstractSynchronizeScope {
-
+
/*
* Constants used to save and restore this scope
*/
private final static String CTX_ROOT = "resource_scope_roots"; //$NON-NLS-1$
private final static String CTX_ROOT_PATH = "resource_scope_root_resource"; //$NON-NLS-1$
-
+
/*
* The resources that define this scope
*/
private IResource[] resources;
-
+
/**
* Create the resource scope for the given resources
- *
+ *
* @param resources the resources that define this scope
*/
public ResourceScope(IResource[] resources) {
this.resources = resources;
}
-
- /**
+
+ /**
* Create this scope from it's previously saved state
- *
+ *
* @param memento persisted state that can be restored
*/
protected ResourceScope(IMemento memento) {
super(memento);
}
-
+
/**
* Set the resources that define this scope
- *
+ *
* @param resources the resources that define this scope
*/
public void setResources(IResource[] resources) {
this.resources = resources;
fireRootsChanges();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#getName()
*/
@@ -74,7 +74,7 @@ public class ResourceScope extends AbstractSynchronizeScope {
public String getName() {
return Utils.convertSelection(resources);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#getRoots()
*/
@@ -82,7 +82,7 @@ public class ResourceScope extends AbstractSynchronizeScope {
public IResource[] getRoots() {
return resources;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#dispose()
*/
@@ -90,7 +90,7 @@ public class ResourceScope extends AbstractSynchronizeScope {
public void dispose() {
// Nothing to dispose
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#saveState(org.eclipse.ui.IMemento)
*/
@@ -104,7 +104,7 @@ public class ResourceScope extends AbstractSynchronizeScope {
}
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.AbstractSynchronizeScope#init(org.eclipse.ui.IMemento)
*/
@@ -115,7 +115,7 @@ public class ResourceScope extends AbstractSynchronizeScope {
List resources = new ArrayList();
for (int i = 0; i < rootNodes.length; i++) {
IMemento rootNode = rootNodes[i];
- IPath path = new Path(rootNode.getString(CTX_ROOT_PATH));
+ IPath path = new Path(rootNode.getString(CTX_ROOT_PATH));
IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(path, true /* include phantoms */);
if(resource != null) {
resources.add(resource);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java
index e7fdca5dd..cfe334c20 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java
@@ -55,7 +55,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
private final ListenerList inputChangeListeners = new ListenerList(ListenerList.IDENTITY);
private Saveable saveable;
private IPropertyListener propertyListener;
-
+
/**
* Return a typed element that represents a local file. If the element
* returned from this method is used as the left contributor of the compare
@@ -67,7 +67,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
public static ITypedElement createFileElement(IFile file) {
return new LocalResourceTypedElement(file);
}
-
+
private static ITypedElement getFileElement(ICompareInput input,
CompareEditorInput editorInput) {
if (input.getLeft() instanceof LocalResourceTypedElement) {
@@ -78,7 +78,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
}
return null;
}
-
+
private class InternalResourceSaveableComparison extends LocalResourceSaveableComparison implements ISharedDocumentAdapterListener {
private LocalResourceTypedElement lrte;
private boolean connected = false;
@@ -114,7 +114,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
if (lrte != null)
lrte.setSharedDocumentListener(null);
}
-
+
private void registerSaveable(boolean init) {
ICompareContainer container = getContainer();
IWorkbenchPart part = container.getWorkbenchPart();
@@ -148,7 +148,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
// Ignore
}
}
-
+
/**
* Creates a <code>LocalResourceCompareEditorInput</code> which is initialized with the given
* compare configuration.
@@ -193,7 +193,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
}
};
getCompareInput().addCompareInputChangeListener(compareInputChangeListener);
-
+
if (getSaveable() instanceof SaveableComparison) {
SaveableComparison scm = (SaveableComparison) saveable;
propertyListener = new IPropertyListener() {
@@ -216,7 +216,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
listener = (ISaveablesLifecycleListener) part.getSite().getService(ISaveablesLifecycleListener.class);
return listener;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#handleDispose()
*/
@@ -254,7 +254,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
((IDisposable) getCompareResult()).dispose();
}
}
-
+
private void logStackTrace() {
new Exception("<Fake exception> in " + getClass().getName()).printStackTrace(System.out); //$NON-NLS-1$
}
@@ -283,7 +283,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
/**
* Method called from {@link #prepareInput(IProgressMonitor)} to obtain the input. Its purpose
* is to ensure that the input is an instance of {@link ICompareInput}.
- *
+ *
* @param monitor a progress monitor
* @return the compare input
* @throws InvocationTargetException
@@ -291,7 +291,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
*/
protected abstract ICompareInput prepareCompareInput(IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException;
-
+
/**
* Return the compare input of this editor input.
* @return the compare input of this editor input
@@ -299,7 +299,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
protected final ICompareInput getCompareInput() {
return (ICompareInput)getCompareResult();
}
-
+
/**
* Callback from the resource saveable that is invoked when the resource is
* saved so that this input can fire a change event for its input. Subclasses
@@ -307,7 +307,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
* an element returned from {@link #createFileElement(IFile)}.
*/
protected abstract void fireInputChange();
-
+
/**
* Close the editor if it is not dirty. If it is still dirty, let the
* content merge viewer handle the compare input change.
@@ -346,13 +346,13 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
return true;
}
}
-
+
private IWorkbenchPage getPage() {
if (page == null)
return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
return page;
}
-
+
/* package */ void propogateInputChange() {
if (!inputChangeListeners.isEmpty()) {
Object[] allListeners = inputChangeListeners.getListeners();
@@ -386,7 +386,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
}
return saveable;
}
-
+
/**
* Create the saveable that provides the save behavior for this compare editor input.
* By default, a saveable that handles local files is returned
@@ -415,7 +415,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
public Saveable[] getSaveables() {
return getActiveSaveables();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#addCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener)
*/
@@ -428,7 +428,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
super.addCompareInputChangeListener(input, listener);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#removeCompareInputChangeListener(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener)
*/
@@ -441,7 +441,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
super.removeCompareInputChangeListener(input, listener);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#getAdapter(java.lang.Class)
*/
@@ -455,7 +455,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
}
return super.getAdapter(adapter);
}
-
+
/*
* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#getTitleImage()
@@ -479,7 +479,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
public ImageDescriptor getImageDescriptor() {
return TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_SYNC_VIEW);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#findContentViewer(org.eclipse.jface.viewers.Viewer, org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.swt.widgets.Composite)
*/
@@ -512,14 +512,14 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
public boolean canRunAsJob() {
return true;
}
-
+
@Override
public boolean isDirty() {
if (saveable != null)
return saveable.isDirty();
return super.isDirty();
}
-
+
@Override
public void registerContextMenu(final MenuManager menu,
final ISelectionProvider selectionProvider) {
@@ -535,5 +535,5 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
});
}
}
-
+
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java
index bcc2b0cd7..c0e7137db 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java
@@ -34,7 +34,7 @@ import org.eclipse.ui.part.IPageBookViewPage;
import org.eclipse.ui.progress.IProgressConstants2;
/**
- * A synchronize participant that displays synchronization information for local resources that are
+ * A synchronize participant that displays synchronization information for local resources that are
* managed via a {@link Subscriber}. It maintains a dynamic collection of all out-of-sync resources
* by listening to workspace resource changes and remote changes thus creating a live view of
* changes in the workspace.
@@ -47,32 +47,32 @@ import org.eclipse.ui.progress.IProgressConstants2;
* <li>initializeConfiguration: participants can add toolbar actions, configure the context menu, decorator.
* <li>saveState and init: persist settings between sessions.
* </ul>
- * This class is intended to be subclassed.
+ * This class is intended to be subclassed.
* </p>
* @since 3.0
*/
public abstract class SubscriberParticipant extends AbstractSynchronizeParticipant implements IPropertyChangeListener {
-
+
/*
* Collects and maintains set of all out-of-sync resources of the subscriber
*/
private SubscriberSyncInfoCollector collector;
-
+
/*
* Controls the automatic synchronization of this participant
*/
private SubscriberRefreshSchedule refreshSchedule;
-
+
/*
* Provides the resource scope for this participant
*/
private ISynchronizeScope scope;
-
+
/*
* Key for settings in memento
*/
private static final String CTX_SUBSCRIBER_PARTICIPANT_SETTINGS = TeamUIPlugin.ID + ".TEAMSUBSRCIBERSETTINGS"; //$NON-NLS-1$
-
+
/*
* Key for schedule in memento
*/
@@ -89,9 +89,9 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
return new IRefreshable() {
@Override
public RefreshParticipantJob createJob(String interval) {
- return new RefreshSubscriberParticipantJob(SubscriberParticipant.this,
- TeamUIMessages.RefreshSchedule_14,
- NLS.bind(TeamUIMessages.RefreshSchedule_15, new String[] { SubscriberParticipant.this.getName(), interval }), getResources(),
+ return new RefreshSubscriberParticipantJob(SubscriberParticipant.this,
+ TeamUIMessages.RefreshSchedule_14,
+ NLS.bind(TeamUIMessages.RefreshSchedule_15, new String[] { SubscriberParticipant.this.getName(), interval }), getResources(),
new RefreshUserNotificationPolicy(SubscriberParticipant.this));
}
@Override
@@ -106,14 +106,14 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
public SubscriberRefreshSchedule getRefreshSchedule() {
return SubscriberParticipant.this.getRefreshSchedule();
}
-
+
};
}
-
+
/**
* Constructor which should be called when creating a participant whose resources
* are to be scoped.
- *
+ *
* @param scope a synchronize scope
*/
public SubscriberParticipant(ISynchronizeScope scope) {
@@ -121,7 +121,7 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
this.scope = scope;
scope.addPropertyChangeListener(this);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.sync.ISynchronizeViewPage#createPage(org.eclipse.team.ui.sync.ISynchronizeView)
*/
@@ -130,37 +130,37 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
validateConfiguration(configuration);
return new SubscriberParticipantPage(configuration, getSubscriberSyncInfoCollector());
}
-
+
/**
* Returns the resources supervised by this participant. It will
* either be the roots of the subscriber or the resource scope
* provided when the subscriber was set.
- *
+ *
* @return the resources supervised by this participant.
*/
public IResource[] getResources() {
return collector.getRoots();
}
-
+
/*
* Set the resources supervised by this participant. If <code>null</code>,
* the participant will include all roots of its subscriber
- *
+ *
* @param roots the root resources to consider or <code>null</code>
* to consider all roots of the subscriber
*/
private void setResources(IResource[] roots) {
collector.setRoots(roots);
}
-
+
/**
- * Refresh this participants synchronization state and displays the result in a model dialog.
- * @param shell
- *
+ * Refresh this participants synchronization state and displays the result in a model dialog.
+ * @param shell
+ *
* @param resources
- * @param jobName
+ * @param jobName
* @param taskName
- * @param configuration
+ * @param configuration
* @param site
*/
public final void refreshInDialog(Shell shell, IResource[] resources, String jobName, String taskName, ISynchronizePageConfiguration configuration, IWorkbenchSite site) {
@@ -169,13 +169,13 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
}
/**
- * Refresh a participant in the background the result of the refresh are shown in the progress view. Refreshing
+ * Refresh a participant in the background the result of the refresh are shown in the progress view. Refreshing
* can also be considered synchronizing, or refreshing the synchronization state. Basically this is a long
* running operation that will update the participants sync info sets with new changes detected on the
* server. Either or both of the <code>shortTaskName</code> and <code>longTaskName</code> can be <code>null</code>
* in which case, the default values for these are returned by the methods <code>getShortTaskName()</code> and
* <code>getLongTaskName(IResource[])</code> will be used.
- *
+ *
* @param resources the resources to be refreshed.
* @param shortTaskName the taskName of the background job that will run the synchronize or <code>null</code>
* if the default job name is desired.
@@ -191,9 +191,9 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
/**
* Refresh a participant. The returned status describes the result of the refresh.
- * @param resources
- * @param taskName
- * @param monitor
+ * @param resources
+ * @param taskName
+ * @param monitor
* @return a status
*/
public final IStatus refreshNow(IResource[] resources, String taskName, IProgressMonitor monitor) {
@@ -201,30 +201,30 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
RefreshParticipantJob job = new RefreshSubscriberParticipantJob(this, taskName, taskName, resources, null);
return job.run(monitor);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.sync.AbstractSynchronizeViewPage#dispose()
*/
@Override
public void dispose() {
Job.getJobManager().cancel(this);
- refreshSchedule.dispose();
+ refreshSchedule.dispose();
TeamUI.removePropertyChangeListener(this);
collector.dispose();
scope.dispose();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#getName()
*/
@Override
public String getName() {
String name = super.getName();
- return NLS.bind(TeamUIMessages.SubscriberParticipant_namePattern, new String[] { name, scope.getName() });
+ return NLS.bind(TeamUIMessages.SubscriberParticipant_namePattern, new String[] { name, scope.getName() });
}
-
+
/**
- * Return the name of the participant as specified in the plugin manifest file.
+ * Return the name of the participant as specified in the plugin manifest file.
* This method is provided to give access to this name since it is masked by
* the <code>getName()</code> method defined in this class.
* @return the name of the participant as specified in the plugin manifest file
@@ -233,33 +233,33 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
protected final String getShortName() {
return super.getName();
}
-
+
/**
* Returns the <code>SyncInfoTree</code> for this participant. This set
- * contains the out-of-sync resources supervised by this participant.
- *
+ * contains the out-of-sync resources supervised by this participant.
+ *
* @return the sync info set that contains the out-of-sync resources
* for this participant.
*/
public SyncInfoTree getSyncInfoSet() {
return getSubscriberSyncInfoCollector().getSyncInfoSet();
}
-
+
/**
* Return the <code>Subscriber</code> associated with this this participant. This
* method will only return <code>null</code> if the participant has not been initialized
- * yet.
- *
+ * yet.
+ *
* @return the <code>Subscriber</code> associated with this this participant.
*/
public Subscriber getSubscriber() {
if (collector == null) return null;
return collector.getSubscriber();
}
-
+
/**
* Returns a participant that matches the given resource scoping
- *
+ *
* @param ID the type id of participants to match
* @param resources the resources to match in the scope
* @return a participant that matches the given resource scoping
@@ -285,7 +285,7 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
}
return null;
}
-
+
/* (non-Javadoc)
* @see IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
*/
@@ -303,7 +303,7 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
firePropertyChange(this, IBasicPropertyConstants.P_TEXT, null, getName());
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#init(org.eclipse.ui.IMemento)
*/
@@ -338,12 +338,12 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
public void reset() {
getSubscriberSyncInfoCollector().reset();
}
-
+
/**
* Return the <code>SubscriberSyncInfoCollector</code> for the participant.
* This collector maintains the set of all out-of-sync resources for the
* subscriber.
- *
+ *
* @return the <code>SubscriberSyncInfoCollector</code> for this participant
* @noreference This method is not intended to be referenced by clients.
* @nooverride This method is not intended to be re-implemented or extended
@@ -352,7 +352,7 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
public SubscriberSyncInfoCollector getSubscriberSyncInfoCollector() {
return collector;
}
-
+
/**
* @noreference This method is not intended to be referenced by clients.
* @nooverride This method is not intended to be re-implemented or extended by clients.
@@ -367,7 +367,7 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
// Always fir the event since the schedule may have been changed
firePropertyChange(this, AbstractSynchronizeParticipant.P_SCHEDULED, schedule, schedule);
}
-
+
/**
* @noreference This method is not intended to be referenced by clients.
* @nooverride This method is not intended to be re-implemented or extended by clients.
@@ -375,7 +375,7 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
public SubscriberRefreshSchedule getRefreshSchedule() {
return refreshSchedule;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant#initializeConfiguration(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
*/
@@ -383,7 +383,7 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
protected void initializeConfiguration(ISynchronizePageConfiguration configuration) {
configuration.setProperty(SynchronizePageConfiguration.P_PARTICIPANT_SYNC_INFO_SET, collector.getSyncInfoSet());
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#run(org.eclipse.ui.IWorkbenchPart)
*/
@@ -391,31 +391,31 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
public void run(IWorkbenchPart part) {
refresh(getResources(), null, null, part != null ? part.getSite() : null);
}
-
+
/**
* Returns the short task name (e.g. no more than 25 characters) to describe the behavior of the
* refresh operation to the user. This is typically shown in the status line when this subscriber is refreshed
* in the background. When refreshed in the foreground, only the long task name is shown.
- *
+ *
* @return the short task name to show in the status line.
*/
protected String getShortTaskName() {
- return TeamUIMessages.Participant_synchronizing;
+ return TeamUIMessages.Participant_synchronizing;
}
-
+
/**
* Returns the long task name to describe the behavior of the
* refresh operation to the user. This is typically shown in the status line when this subscriber is refreshed
* in the background.
- *
+ *
* @return the long task name
* @deprecated use <code>getLongTaskName(IResource[]) instead</code>
*/
@Deprecated
protected String getLongTaskName() {
- return TeamUIMessages.Participant_synchronizing;
+ return TeamUIMessages.Participant_synchronizing;
}
-
+
/**
* Returns the long task name to describe the behavior of the
* refresh operation to the user. This is typically shown in the status line when this subscriber is refreshed
@@ -437,33 +437,33 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
resourceCount = resources.length;
}
if (resourceCount == 1) {
- return NLS.bind(TeamUIMessages.Participant_synchronizingMoreDetails, new String[] { getShortName(), resources[0].getFullPath().toString() });
+ return NLS.bind(TeamUIMessages.Participant_synchronizingMoreDetails, new String[] { getShortName(), resources[0].getFullPath().toString() });
} else if (resourceCount > 1) {
- return NLS.bind(TeamUIMessages.Participant_synchronizingResources, new String[] { getShortName(), Integer.toString(resourceCount) });
+ return NLS.bind(TeamUIMessages.Participant_synchronizingResources, new String[] { getShortName(), Integer.toString(resourceCount) });
}
// A resource count of zero means that it is a non-resource scope so we can print the scope name
- return NLS.bind(TeamUIMessages.Participant_synchronizingDetails, new String[] { getName() });
+ return NLS.bind(TeamUIMessages.Participant_synchronizingDetails, new String[] { getName() });
}
/**
* This method is invoked before the given configuration is used to
* create the page (see <code>createPage(ISynchronizePageConfiguration)</code>).
- * The configuration would have been initialized by
+ * The configuration would have been initialized by
* <code>initializeConfiguration(ISynchronizePageConfiguration)</code>
- * but may have also been tailored further. This method gives the participant
+ * but may have also been tailored further. This method gives the participant
* a chance to validate those changes before the page is created.
- *
+ *
* @param configuration the page configuration that is about to be used to create a page.
*/
protected void validateConfiguration(ISynchronizePageConfiguration configuration) {
// Do nothing by default
}
-
+
/**
* Subclasses must call this method to initialize the participant. Typically this
* method is called in {@link #init(String, IMemento)}. This method will initialize
* the sync info collector.
- *
+ *
* @param subscriber the subscriber to associate with this participant.
*/
protected void setSubscriber(Subscriber subscriber) {
@@ -471,20 +471,20 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
scope = new WorkspaceScope();
}
collector = new SubscriberSyncInfoCollector(subscriber, scope.getRoots());
-
+
// listen for global ignore changes
TeamUI.addPropertyChangeListener(this);
-
+
// Start collecting changes
collector.start();
-
+
// Start the refresh now that a subscriber has been added
SubscriberRefreshSchedule schedule = getRefreshSchedule();
if(schedule.isEnabled()) {
getRefreshSchedule().startJob();
}
}
-
+
/**
* Provide a filter that is used to filter the contents of the sync info set for the participant. Normally, all out-of-sync
* resources from the subscriber will be included in the participant's set. However, a filter can be used to exclude
@@ -497,10 +497,10 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
protected void setSyncInfoFilter(SyncInfoFilter filter) {
collector.setFilter(filter);
}
-
+
/*
- * Create and schedule a subscriber refresh job.
- *
+ * Create and schedule a subscriber refresh job.
+ *
* @param resources resources to be synchronized
* @param taskName the task name to be shown to the user
* @param site the site in which to run the refresh
@@ -516,21 +516,21 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
job.setUser(true);
job.setProperty(IProgressConstants2.SHOW_IN_TASKBAR_ICON_PROPERTY, Boolean.TRUE);
Utils.schedule(job, site);
-
+
// Remember the last participant synchronized
TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT, getId());
TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID, getSecondaryId());
}
-
+
/**
* Return the scope that defines the resources displayed by this participant.
- *
+ *
* @return Returns the scope.
*/
public ISynchronizeScope getScope() {
return scope;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class)
*/
@@ -538,7 +538,7 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
public Object getAdapter(Class adapter) {
if (adapter == IRefreshable.class && refreshSchedule != null) {
return refreshSchedule.getRefreshable();
-
+
}
return super.getAdapter(adapter);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipantWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipantWizard.java
index fb4a98a5b..2c41a3b5e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipantWizard.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipantWizard.java
@@ -19,13 +19,13 @@ import org.eclipse.team.ui.TeamUI;
* This is a convenience class for creating wizards for use with the
* <code>org.eclipse.team.ui.synchronizeWizard</code> extension point
* that create a {@link SubscriberParticipant}.
- *
+ *
* @since 3.2
*/
public abstract class SubscriberParticipantWizard extends ParticipantSynchronizeWizard {
private GlobalRefreshResourceSelectionPage selectionPage;
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ParticipantSynchronizeWizard#createScopeSelectionPage()
*/
@@ -34,7 +34,7 @@ public abstract class SubscriberParticipantWizard extends ParticipantSynchronize
selectionPage = new GlobalRefreshResourceSelectionPage(getRootResources());
return selectionPage;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ParticipantSynchronizeWizard#createParticipant()
*/
@@ -48,11 +48,11 @@ public abstract class SubscriberParticipantWizard extends ParticipantSynchronize
participant.run(null /* no site */);
}
}
-
+
/**
* Method called from {@link #createParticipant()} to create a
* {@link SubscriberParticipant} for the given scope.
- *
+ *
* @param scope the selected scope
* @return a synchronize participant that will be added to the Synchronize
* view
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberTeamStateProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberTeamStateProvider.java
index 3e4748f8b..e18ada731 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberTeamStateProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberTeamStateProvider.java
@@ -29,7 +29,7 @@ import org.eclipse.team.ui.mapping.*;
* provider, they must adapt their {@link RepositoryProviderType} class to an appropriate {@link ITeamStateProvider}.
* <p>
* Clients may subclass this class.
- *
+ *
* @since 3.2
*/
public class SubscriberTeamStateProvider extends TeamStateProvider implements ISubscriberChangeListener {
@@ -37,7 +37,7 @@ public class SubscriberTeamStateProvider extends TeamStateProvider implements IS
private Subscriber subscriber;
/**
- * Create a provider that determines the synchronization state
+ * Create a provider that determines the synchronization state
* from the subscriber. This method registers this provider as a listener
* on the subscriber in order to know when to fire state change events.
* @param subscriber the subscriber for this provider
@@ -75,7 +75,7 @@ public class SubscriberTeamStateProvider extends TeamStateProvider implements IS
* ISynchronizationCompareAdapter, then the adapter is used to determine the
* synchronization state. Others, the state is obtained from the subscriber
* using {@link Subscriber#getState(ResourceMapping, int, IProgressMonitor)}
- *
+ *
* @param element the element
* @param stateMask the state mask that indicates which state flags are desired
* @param monitor a progress monitor
@@ -90,7 +90,7 @@ public class SubscriberTeamStateProvider extends TeamStateProvider implements IS
}
return IDiff.NO_CHANGE;
}
-
+
private int getSynchronizationState(ResourceMapping mapping, int stateMask, IProgressMonitor monitor) throws CoreException {
ISynchronizationCompareAdapter compareAdapter = (ISynchronizationCompareAdapter)Utils.getAdapter(mapping.getModelProvider(), ISynchronizationCompareAdapter.class);
try {
@@ -133,10 +133,10 @@ public class SubscriberTeamStateProvider extends TeamStateProvider implements IS
public ResourceMappingContext getResourceMappingContext(Object element) {
return new SubscriberResourceMappingContext(subscriber, false);
}
-
+
/**
* Return the subscriber associated with this tester.
- *
+ *
* @return the subscriber associated with this tester.
*/
protected final Subscriber getSubscriber() {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java
index 70bd4276c..04a9037c1 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java
@@ -28,10 +28,10 @@ import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
import org.eclipse.ui.progress.UIJob;
/**
- * A {@link SyncInfo} editor input used as input to a two-way or three-way
- * compare viewer. It defines methods for accessing the three sides for the
+ * A {@link SyncInfo} editor input used as input to a two-way or three-way
+ * compare viewer. It defines methods for accessing the three sides for the
* compare, and a name and image which is used when displaying the three way input
- * in an editor. This input can alternately be used to show compare results in
+ * in an editor. This input can alternately be used to show compare results in
* a dialog by calling {@link CompareUI#openCompareDialog(org.eclipse.compare.CompareEditorInput)}.
* <p>
* The editor will not update when the elements in the sync info are changed.
@@ -41,7 +41,7 @@ import org.eclipse.ui.progress.UIJob;
* when the local resources is changed.
* </p>
* @see SyncInfo
- * @since 3.0
+ * @since 3.0
*/
public final class SyncInfoCompareInput extends SaveableCompareEditorInput implements IResourceChangeListener {
@@ -66,10 +66,10 @@ public final class SyncInfoCompareInput extends SaveableCompareEditorInput imple
super.fireChange();
}
}
-
+
/**
* Creates a compare editor input based on an existing <code>SyncInfo</code>.
- *
+ *
* @param description a description of the context of this sync info. This
* is displayed to the user.
* @param sync the <code>SyncInfo</code> used as the base for the compare input.
@@ -83,22 +83,22 @@ public final class SyncInfoCompareInput extends SaveableCompareEditorInput imple
this.node = new MyDiffNode(null, sync);
setTitle(NLS.bind(TeamUIMessages.SyncInfoCompareInput_title, new String[] { sync.getLocal().getName() }));
}
-
+
/**
* Creates a compare editor input based on an existing <code>SyncInfo</code>
* from the given participant.
- *
+ *
* @param participant the participant from which the sync info was obtained. The
* name of the participant is used as the description which is displayed to the user.
* @param sync the <code>SyncInfo</code> used as the base for the compare input.
- *
+ *
* @since 3.1
*/
public SyncInfoCompareInput(ISynchronizeParticipant participant, SyncInfo sync) {
this(participant.getName(), sync);
this.participant = participant;
}
-
+
public SyncInfoCompareInput(ISynchronizePageConfiguration configuration,
SyncInfo info) {
this(configuration.getParticipant(), info);
@@ -133,13 +133,13 @@ public final class SyncInfoCompareInput extends SaveableCompareEditorInput imple
}
return super.getAdapter(adapter);
}
-
+
private static CompareConfiguration getDefaultCompareConfiguration() {
CompareConfiguration cc = new CompareConfiguration();
//cc.setProperty(CompareConfiguration.USE_OUTLINE_VIEW, true);
return cc;
}
-
+
/**
* Note that until the compare editor inputs can be part of the compare editors lifecycle we
* can't register as a listener because there is no dispose() method to remove the listener.
@@ -197,7 +197,7 @@ public final class SyncInfoCompareInput extends SaveableCompareEditorInput imple
*/
@Override
public String getToolTipText() {
- return NLS.bind(TeamUIMessages.SyncInfoCompareInput_tooltip, new String[] { Utils.shortenText(30, description), node.getResource().getFullPath().toString() });
+ return NLS.bind(TeamUIMessages.SyncInfoCompareInput_tooltip, new String[] { Utils.shortenText(30, description), node.getResource().getFullPath().toString() });
}
/*
@@ -211,9 +211,9 @@ public final class SyncInfoCompareInput extends SaveableCompareEditorInput imple
if (other instanceof SyncInfoCompareInput) {
SyncInfo otherSyncInfo = ((SyncInfoCompareInput) other).getSyncInfo();
SyncInfo thisSyncInfo = getSyncInfo();
- // Consider the inputs equal if the sync info are equal and the
+ // Consider the inputs equal if the sync info are equal and the
// left nodes are equal (i.e they have the same timestamp)
- return thisSyncInfo.equals(otherSyncInfo)
+ return thisSyncInfo.equals(otherSyncInfo)
&& node.getLeft().equals(((SyncInfoCompareInput) other).node.getLeft());
}
return false;
@@ -221,7 +221,7 @@ public final class SyncInfoCompareInput extends SaveableCompareEditorInput imple
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#hashCode()
*/
@Override
@@ -232,7 +232,7 @@ public final class SyncInfoCompareInput extends SaveableCompareEditorInput imple
public SyncInfo getSyncInfo() {
return node.getSyncInfo();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#canRunInBackground()
*/
@@ -240,7 +240,7 @@ public final class SyncInfoCompareInput extends SaveableCompareEditorInput imple
public boolean canRunAsJob() {
return true;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.compare.CompareEditorInput#getNavigator()
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java
index e8ade4c6d..226ef8164 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java
@@ -30,32 +30,32 @@ import org.eclipse.ui.ide.IDE;
* instances. Subclasses can use this support to filter the selection in order
* to determine action enablement and generate the input for a
* {@link SynchronizeModelOperation}.
- *
+ *
* @see SyncInfo
* @see SyncInfoSet
* @see SynchronizeModelOperation
* @since 3.0
*/
public abstract class SynchronizeModelAction extends BaseSelectionListenerAction {
-
+
private ISynchronizePageConfiguration configuration;
/**
* Create an action with the given text and configuration. By default,
- * the action registers for selection change with the selection provider
+ * the action registers for selection change with the selection provider
* from the configuration's site.
- *
+ *
* @param text the action's text
* @param configuration the actions synchronize page configuration
*/
protected SynchronizeModelAction(String text, ISynchronizePageConfiguration configuration) {
this(text, configuration, configuration.getSite().getSelectionProvider());
}
-
+
/**
* Create an action with the given text and configuration. By default,
* the action registers for selection change with the given selection provider.
- *
+ *
* @param text the action's text
* @param configuration the actions synchronize page configuration
* @param selectionProvider a selection provider
@@ -65,12 +65,12 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction
this.configuration = configuration;
initialize(configuration, selectionProvider);
}
-
+
/**
* Method invoked from the constructor.
* The default implementation registers the action as a selection change
* listener. Subclasses may override.
- *
+ *
* @param configuration the synchronize page configuration
* @param selectionProvider a selection provider
*/
@@ -107,7 +107,7 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction
* Create and run the operation for this action. By default, the operation is created
* by calling <code>getSubscriberOperation</code> and then run. Subclasses may
* override.
- *
+ *
* @throws InvocationTargetException
* @throws InterruptedException
* @since 3.1
@@ -119,7 +119,7 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction
/**
* Return whether dirty editor should be saved before this action is run.
* Default is <code>true</code>.
- *
+ *
* @return whether dirty editor should be saved before this action is run
*/
protected boolean needsToSaveDirtyEditors() {
@@ -129,20 +129,20 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction
/**
* Returns whether the user should be prompted to save dirty editors. The
* default is <code>true</code>.
- *
+ *
* @return whether the user should be prompted to save dirty editors
*/
protected boolean confirmSaveOfDirtyEditor() {
return true;
}
-
+
/**
* Return the subscriber operation associated with this action. This
* operation will be run when the action is run. Subclass may implement this
* method and provide an operation subclass or may override the
* <code>run(IAction)</code> method directly if they choose not to
* implement a <code>SynchronizeModelOperation</code>.
- *
+ *
* @param configuration the synchronize page configuration for the page to
* which this action is associated
* @param elements the selected diff element for which this action is
@@ -150,17 +150,17 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction
* @return the subscriber operation to be run by this action.
*/
protected abstract SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements);
-
+
/**
* Generic error handling code that uses an error dialog to show the error
* to the user. Subclasses can use this method and/or override it.
- *
+ *
* @param e the exception that occurred.
*/
protected void handle(Exception e) {
Utils.handle(e);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.actions.BaseSelectionListenerAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
*/
@@ -169,7 +169,7 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction
super.updateSelection(selection);
return isEnabledForSelection(selection);
}
-
+
private boolean isEnabledForSelection(IStructuredSelection selection) {
return Utils.hasMatchingDescendant(selection, getSyncInfoFilter());
}
@@ -177,7 +177,7 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction
/**
* This method returns all instances of IDiffElement that are in the current
* selection.
- *
+ *
* @return the selected elements
*/
protected final IDiffElement[] getSelectedDiffElements() {
@@ -188,7 +188,7 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction
* Filter uses to filter the user selection to contain only those elements
* for which this action is enabled. Default filter includes all out-of-sync
* elements in the current selection. Subclasses may override.
- *
+ *
* @return a sync info filter which selects all out-of-sync resources.
*/
protected FastSyncInfoFilter getSyncInfoFilter() {
@@ -217,7 +217,7 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction
/**
* Set the selection of this action to the given selection
- *
+ *
* @param selection the selection
*/
public void selectionChanged(ISelection selection) {
@@ -226,24 +226,24 @@ public abstract class SynchronizeModelAction extends BaseSelectionListenerAction
} else {
super.selectionChanged(StructuredSelection.EMPTY);
}
-
+
}
-
+
/**
* Returns the configuration showing this action.
- *
+ *
* @return the configuration showing this action.
*/
public ISynchronizePageConfiguration getConfiguration() {
return configuration;
}
-
+
/**
* Save all dirty editors in the workbench that are open on files that may
* be affected by this operation. Opens a dialog to prompt the user if
* <code>confirm</code> is true. Return true if successful. Return false
* if the user has canceled the command. Must be called from the UI thread.
- *
+ *
* @param confirm prompt the user if true
* @return boolean false if the operation was canceled.
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelOperation.java
index 10bcc0616..60530a3c7 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelOperation.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelOperation.java
@@ -28,15 +28,15 @@ import org.eclipse.ui.IWorkbenchPart;
* the operation is run in the background the elements the operation is created
* with will be updated to show that they are busy while the operation is
* running and will be marked un-busy after the operation completes.
- *
+ *
* @see SyncInfoSet
* @see SynchronizeModelAction
* @since 3.0
*/
public abstract class SynchronizeModelOperation extends TeamOperation {
-
+
private IDiffElement[] elements;
-
+
/*
* Helper method for extracting the part safely from a configuration
*/
@@ -49,7 +49,7 @@ public abstract class SynchronizeModelOperation extends TeamOperation {
}
return null;
}
-
+
/*
* Helper method for extracting the runnable context safely from a configuration
*/
@@ -59,10 +59,10 @@ public abstract class SynchronizeModelOperation extends TeamOperation {
}
return null;
}
-
+
/**
* Create an operation that will operate on the given diff elements.
- *
+ *
* @param configuration the participant configuration in which this
* operation is run
* @param elements the model elements this operation will run with
@@ -75,7 +75,7 @@ public abstract class SynchronizeModelOperation extends TeamOperation {
/**
* Returns a sync info set that contains the {@link SyncInfo}for the
* elements of this operations.
- *
+ *
* @return the sync info set that contains the elements this operation is
* operating on.
*/
@@ -91,7 +91,7 @@ public abstract class SynchronizeModelOperation extends TeamOperation {
super.scheduled(event);
markBusy(elements, true);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.runtime.jobs.JobChangeAdapter#done(org.eclipse.core.runtime.jobs.IJobChangeEvent)
*/
@@ -100,7 +100,7 @@ public abstract class SynchronizeModelOperation extends TeamOperation {
markBusy(elements, false);
super.done(event);
}
-
+
private void markBusy(IDiffElement[] elements, boolean isBusy) {
for (int i = 0; i < elements.length; i++) {
IDiffElement element = elements[i];
@@ -109,10 +109,10 @@ public abstract class SynchronizeModelOperation extends TeamOperation {
}
}
}
-
+
/*
* Return the selected SyncInfo for which this action is enabled.
- *
+ *
* @return the selected SyncInfo for which this action is enabled.
*/
private SyncInfo[] getSyncInfos() {
@@ -125,11 +125,11 @@ public abstract class SynchronizeModelOperation extends TeamOperation {
}
return (SyncInfo[]) filtered.toArray(new SyncInfo[filtered.size()]);
}
-
+
/*
* Return a sync info set that contains the given sync info
*/
private SyncInfoSet makeSyncInfoSetFromSelection(SyncInfo[] infos) {
- return new SyncInfoSet(infos);
+ return new SyncInfoSet(infos);
}
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java
index a2d8b7f93..7f645d640 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java
@@ -23,15 +23,15 @@ import org.eclipse.ui.IKeyBindingService;
import org.eclipse.ui.actions.ActionGroup;
/**
- * Used to add one or more actions to the context menu, toolbar or view menu
+ * Used to add one or more actions to the context menu, toolbar or view menu
* of an {@link ISynchronizePage}. An action group is added to a synchronize
* page by adding the group to the {@link ISynchronizePageConfiguration} after
- * configuration has been created by the page but before the page is created.
+ * configuration has been created by the page but before the page is created.
* <p>
* The life cycle of an action group is:
* <ul>
* <li>the <code>initialize(ISynchronizePageConfiguration}</code> method is
- * invoked before the methods to populate menus. This is done to give clients
+ * invoked before the methods to populate menus. This is done to give clients
* a change to create and initialize the actions of the action group.
* <li>The <code>fillActionBars(IActionBars)</code> method is invoked
* to populate the page's action bars (view menu and toolbar). It is
@@ -39,12 +39,12 @@ import org.eclipse.ui.actions.ActionGroup;
* so clients are expected to check for <code>null</code> when accessing
* the menus from the action bars.
* <li>The <code>fillContextMenu(IMenuManager)</code> method is invoked each time
- * the context menu is shown. Before this method is called, the
+ * the context menu is shown. Before this method is called, the
* action group will be provided with an <code>ActionContext</code>
* containing the view selection. Clients can access the context using
* <code>getContext()</code>.
* <li>The <code>updateActionBars()</code> method is invoked whenever the
- * page's selection changes. Before this method is called, the
+ * page's selection changes. Before this method is called, the
* action group will be provided with an <code>ActionContext</code>
* containing the view selection. Clients can access the context using
* <code>getContext()</code>.
@@ -59,9 +59,9 @@ import org.eclipse.ui.actions.ActionGroup;
public abstract class SynchronizePageActionGroup extends ActionGroup {
private ISynchronizePageConfiguration configuration;
-
+
private Map menuContributions = new HashMap();
-
+
private VisibleRootsSelectionProvider visibleRootSelectionProvider;
/*
@@ -77,7 +77,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
protected VisibleRootsSelectionProvider(ISynchronizeModelElement element) {
modelChanged(element);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#modelChanged(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
*/
@@ -89,15 +89,15 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
setSelection(new StructuredSelection(root));
}
}
-
+
/* (non-Javadoc)
* Method declared on ISelectionProvider.
*/
@Override
public void addSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangedListeners.add(listener);
+ selectionChangedListeners.add(listener);
}
-
+
/* (non-Javadoc)
* Method declared on ISelectionProvider.
*/
@@ -105,7 +105,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
selectionChangedListeners.remove(listener);
}
-
+
/* (non-Javadoc)
* Method declared on ISelectionProvider.
*/
@@ -113,7 +113,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
public ISelection getSelection() {
return selection;
}
-
+
/* (non-Javadoc)
* Method declared on ISelectionProvider.
*/
@@ -122,7 +122,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
this.selection = selection;
selectionChanged(new SelectionChangedEvent(this, getSelection()));
}
-
+
private void selectionChanged(final SelectionChangedEvent event) {
// pass on the notification to listeners
Object[] listeners = selectionChangedListeners.getListeners();
@@ -133,11 +133,11 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
public void run() {
l.selectionChanged(event);
}
- });
+ });
}
}
}
-
+
/**
* Initialize the actions of this contribution. This method will be invoked
* once before any calls are made to <code>filleContextMenu</code> or
@@ -145,7 +145,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
* created. As a result of this, the site of the configuration can be
* accessed. Subclasses may override this method but must invoke the
* overridden method.
- *
+ *
* @param configuration the configuration for the part to which the
* contribution is associated
*/
@@ -155,20 +155,20 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
configuration.addActionContribution(visibleRootSelectionProvider);
}
}
-
+
/**
* This method is invoked whenever the model being displayed in the view
* changes. This includes when the input to the view changes and when the
* children of the input change. The default implementation of this method
* does nothing. Subclasses may override.
- *
+ *
* @param root the root of the model being viewed
*/
public void modelChanged(ISynchronizeModelElement root) {
// Do nothing by default
}
-
- /**
+
+ /**
* Dispose of the action group. Subclasses may override but must
* invoke the overridden method.
*/
@@ -185,7 +185,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
* with the configuration of this action group. The id of the returned group
* will not match that of the provided id since the group must be modified
* to ensure that groups are unique across pages.
- *
+ *
* @param menu the menu
* @param groupId the id of the group being searched for
* @return the group for the given id or <code>null</code>
@@ -199,12 +199,12 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
}
return item;
}
-
+
/**
* Helper method to add an action to a group in a menu. The action is only
* added to the menu if the group exists in the menu. Calling this method
* also has no effect if either the menu or action are <code>null</code>.
- *
+ *
* @param manager the menu manager
* @param groupId the group to append the action to
* @param action the action to add
@@ -218,7 +218,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
}
return false;
}
-
+
private boolean internalAppendToGroup(IContributionManager manager, String groupId, IAction action) {
if (manager == null || action == null) return false;
IContributionItem group = findGroup(manager, groupId);
@@ -228,13 +228,13 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
}
return false;
}
-
+
/**
* Helper method to add a contribution item to a group in a menu. The item
* is only added to the menu if the group exists in the menu. Calling this
* method also has no effect if either the menu or item are
* <code>null</code>.
- *
+ *
* @param manager the menu manager
* @param groupId the group to append the action to
* @param item the item to add
@@ -250,13 +250,13 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
}
return false;
}
-
+
/**
* Helper method that can be invoked during initialization to add an action
* to a particular menu (one of P_TOOLBAR_MENU, P_VIEW_MENU, P_CONTEXT_MENU
* from ISynchronizePageConfiguration). The action is added to the given
* group if it is present. Otherwise the action is not added to the menu.
- *
+ *
* @param menuId the menu id (one of P_TOOLBAR_MENU, P_VIEW_MENU,
* P_CONTEXT_MENU from ISynchronizePageConfiguration)
* @param groupId the group id in the menu to which the action is to be
@@ -267,11 +267,11 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
registerActionWithWorkbench(action);
internalAppendToGroup(menuId, groupId, action);
}
-
+
/**
* Register this action with the workbench so that it can participate in keybindings and
* retargetable actions.
- *
+ *
* @param action the action to register
*/
private void registerActionWithWorkbench(IAction action) {
@@ -290,7 +290,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
* a particular menu (one of P_TOOLBAR_MENU, P_VIEW_MENU, P_CONTEXT_MENU
* from ISynchronizePageConfiguration). The item is added to the given group
* if it is present. Otherwise the item is not added to the menu.
- *
+ *
* @param menuId the menu id (one of P_TOOLBAR_MENU, P_VIEW_MENU,
* P_CONTEXT_MENU from ISynchronizePageConfiguration)
* @param groupId the group id in the menu to which the item is to be added
@@ -299,12 +299,12 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
protected void appendToGroup(String menuId, String groupId, IContributionItem item) {
internalAppendToGroup(menuId, groupId, item);
}
-
+
/**
* Return a selection provider whose selection includes all roots of the
* elements visible in the page. Selection change events are fired when the
* elements visible in the view change.
- *
+ *
* @return a selection provider whose selection is the roots of all
* elements visible in the page
*/
@@ -321,7 +321,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
}
return visibleRootSelectionProvider;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.actions.ActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager)
*/
@@ -330,7 +330,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
super.fillContextMenu(menu);
fillMenu(menu, ISynchronizePageConfiguration.P_CONTEXT_MENU);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
*/
@@ -342,7 +342,7 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
fillMenu(actionBars.getToolBarManager(), ISynchronizePageConfiguration.P_TOOLBAR_MENU);
}
}
-
+
private void fillMenu(IContributionManager menu, String menuId) {
Map groups = (Map)menuContributions.get(menuId);
if (menu != null && groups != null) {
@@ -379,13 +379,13 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
}
actions.add(action);
}
-
+
/**
* Return the configuration for the page to which the action group
* is associated.
* @return the configuration for the page to which the action group
* is associated
- *
+ *
* @since 3.1
*/
public ISynchronizePageConfiguration getConfiguration() {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateChangeEvent.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateChangeEvent.java
index f7f2cbc71..712acf963 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateChangeEvent.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateChangeEvent.java
@@ -21,7 +21,7 @@ import org.eclipse.team.ui.mapping.ITeamStateChangeEvent;
* An implementation of {@link ITeamStateChangeEvent}.
* <p>
* This class is not intended to be subclassed by clients.
- *
+ *
* @since 3.2
*/
public class TeamStateChangeEvent implements ITeamStateChangeEvent {
@@ -29,11 +29,11 @@ public class TeamStateChangeEvent implements ITeamStateChangeEvent {
private Set changes = new HashSet();
private Set addedRoots = new HashSet();
private Set removedRoots = new HashSet();
-
+
public TeamStateChangeEvent() {
super();
}
-
+
/**
* Convenience constructor for creating an event from a subscriber change.
* @param deltas the set of subscriber changes
@@ -42,11 +42,11 @@ public class TeamStateChangeEvent implements ITeamStateChangeEvent {
for (int i = 0; i < deltas.length; i++) {
ISubscriberChangeEvent event = deltas[i];
IResource resource = event.getResource();
- if ((event.getFlags() & ISubscriberChangeEvent.ROOT_ADDED) != 0)
+ if ((event.getFlags() & ISubscriberChangeEvent.ROOT_ADDED) != 0)
rootAdded(resource);
- if ((event.getFlags() & ISubscriberChangeEvent.ROOT_REMOVED) != 0)
+ if ((event.getFlags() & ISubscriberChangeEvent.ROOT_REMOVED) != 0)
rootRemoved(resource);
- if ((event.getFlags() & ISubscriberChangeEvent.SYNC_CHANGED) != 0)
+ if ((event.getFlags() & ISubscriberChangeEvent.SYNC_CHANGED) != 0)
changed(resource);
// Indicate that the ancestors may have changed as well
while (resource.getType() != IResource.PROJECT) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateDescription.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateDescription.java
index ecdbaa480..6cfecf84c 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateDescription.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateDescription.java
@@ -67,7 +67,7 @@ public class TeamStateDescription implements ITeamStateDescription {
public String[] getPropertyNames() {
return (String[]) properties.keySet().toArray(new String[properties.size()]);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.ITeamStateDescription#getProperty(java.lang.String)
*/
@@ -75,7 +75,7 @@ public class TeamStateDescription implements ITeamStateDescription {
public Object getProperty(String property) {
return properties.get(property);
}
-
+
/**
* Set the given property to the given value
* @param property the property
@@ -84,7 +84,7 @@ public class TeamStateDescription implements ITeamStateDescription {
public void setProperty(String property, Object value) {
properties.put(property, value);
}
-
+
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateProvider.java
index e90c45d6e..b920c25da 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamStateProvider.java
@@ -31,7 +31,7 @@ import org.eclipse.ui.PlatformUI;
* team state provider that uses the subscriber of the type is provided.
* <p>
* Clients may subclass this class.
- *
+ *
* @see IAdapterManager
* @see RepositoryProviderType
* @since 3.2
@@ -39,13 +39,13 @@ import org.eclipse.ui.PlatformUI;
public abstract class TeamStateProvider implements ITeamStateProvider {
private ListenerList listeners = new ListenerList(ListenerList.IDENTITY);
-
+
/**
* Determine if the decorator for the element is enabled by consulting the
* <code>teamDecorator</code> extension point to determine the decorator
* id associated with the resources the element maps to. Subclasses may
* override.
- *
+ *
* @see org.eclipse.team.ui.mapping.ITeamStateProvider#isDecorationEnabled(java.lang.Object)
*/
@Override
@@ -57,13 +57,13 @@ public abstract class TeamStateProvider implements ITeamStateProvider {
}
return false;
}
-
+
/**
* Determine the decorated state for the element by consulting the
* <code>teamDecorator</code> extension point to get the decorated state
* mask associated with the resources the element maps to. Subclasses may
* override.
- *
+ *
* @see org.eclipse.team.ui.mapping.ITeamStateProvider#getDecoratedStateMask(java.lang.Object)
*/
@Override
@@ -75,7 +75,7 @@ public abstract class TeamStateProvider implements ITeamStateProvider {
}
return 0;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.ITeamStateProvider#addDecoratedStateChangeListener(org.eclipse.team.ui.mapping.ITeamStateChangeListener)
*/
@@ -83,7 +83,7 @@ public abstract class TeamStateProvider implements ITeamStateProvider {
public void addDecoratedStateChangeListener(ITeamStateChangeListener listener) {
listeners.add(listener);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.mapping.ITeamStateProvider#removeDecoratedStateChangeListener(org.eclipse.team.ui.mapping.ITeamStateChangeListener)
*/
@@ -91,7 +91,7 @@ public abstract class TeamStateProvider implements ITeamStateProvider {
public void removeDecoratedStateChangeListener(ITeamStateChangeListener listener) {
listeners.remove(listener);
}
-
+
/**
* Fire the change event to all listeners.
* @param event the change event
@@ -112,7 +112,7 @@ public abstract class TeamStateProvider implements ITeamStateProvider {
});
}
}
-
+
private int internalGetDecoratedStateMask(IProject[] projects) {
int stateMask = 0;
String[] providerIds = getProviderIds(projects);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java
index 6c09fbd72..c02384432 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java
@@ -21,59 +21,59 @@ import org.eclipse.ui.*;
/**
* A synchronize scope whose roots are defined by a working set.
- *
+ *
* @since 3.0
* @noextend This class is not intended to be subclassed by clients.
*/
public class WorkingSetScope extends AbstractSynchronizeScope implements IPropertyChangeListener {
-
+
/*
* Constants used to save and restore this scope
*/
private final static String CTX_SETS = "workingset_scope_sets"; //$NON-NLS-1$
private final static String CTX_SET_NAME = "workingset_scope_name"; //$NON-NLS-1$
-
+
/*
* The working sets associated with this scope
*/
private IWorkingSet[] sets;
-
+
/**
* Create the scope for the working sets
- *
+ *
* @param sets the working sets that defines this scope
*/
public WorkingSetScope(IWorkingSet[] sets) {
setWorkingSets(sets);
}
-
+
/**
* Create this scope from it's previously saved state
- *
+ *
* @param memento the memento containing a previous scope information
* that is used to initialize this scope.
*/
protected WorkingSetScope(IMemento memento) {
super(memento);
}
-
+
/**
* Initialize this working set scope with the provided working sets.
- *
+ *
* @since 3.1
*/
protected void setWorkingSets(IWorkingSet[] sets) {
this.sets = sets;
PlatformUI.getWorkbench().getWorkingSetManager().addPropertyChangeListener(this);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeScope#getName()
*/
@Override
public String getName() {
if (sets.length == 0) {
- return TeamUIMessages.WorkingSetScope_0;
+ return TeamUIMessages.WorkingSetScope_0;
}
StringBuffer name = new StringBuffer();
for (int i = 0; i < sets.length; i++) {
@@ -85,7 +85,7 @@ public class WorkingSetScope extends AbstractSynchronizeScope implements IProper
}
return name.toString();
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeScope#getRoots()
*/
@@ -102,7 +102,7 @@ public class WorkingSetScope extends AbstractSynchronizeScope implements IProper
}
return (IResource[]) roots.toArray(new IResource[roots.size()]);
}
-
+
private void addNonOverlapping(HashSet roots, IResource[] resources) {
for (int i = 0; i < resources.length; i++) {
IResource newResource = resources[i];
@@ -127,7 +127,7 @@ public class WorkingSetScope extends AbstractSynchronizeScope implements IProper
if (add) {
roots.add(newResource);
}
- }
+ }
}
/* (non-Javadoc)
@@ -148,7 +148,7 @@ public class WorkingSetScope extends AbstractSynchronizeScope implements IProper
firePropertyChangedEvent(new PropertyChangeEvent(this, NAME, null, event.getNewValue()));
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeScope#dispose()
*/
@@ -158,7 +158,7 @@ public class WorkingSetScope extends AbstractSynchronizeScope implements IProper
if (PlatformUI.isWorkbenchRunning())
PlatformUI.getWorkbench().getWorkingSetManager().removePropertyChangeListener(this);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.AbstractSynchronizeScope#saveState(org.eclipse.ui.IMemento)
*/
@@ -171,7 +171,7 @@ public class WorkingSetScope extends AbstractSynchronizeScope implements IProper
rootNode.putString(CTX_SET_NAME, set.getName());
}
}
-
+
/*
* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.AbstractSynchronizeScope#init(org.eclipse.ui.IMemento)
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkspaceScope.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkspaceScope.java
index 790ed3d89..7ba69ce1f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkspaceScope.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkspaceScope.java
@@ -15,26 +15,26 @@ import org.eclipse.team.internal.ui.TeamUIMessages;
/**
* A synchronize scope whose roots are the workspace.
- *
+ *
* @since 3.0
* @noextend This class is not intended to be subclassed by clients.
*/
public class WorkspaceScope extends AbstractSynchronizeScope {
-
+
/**
* Create the resource scope that indicates that the subscriber roots should be used
*/
public WorkspaceScope() {
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#getName()
*/
@Override
public String getName() {
- return TeamUIMessages.WorkspaceScope_0;
+ return TeamUIMessages.WorkspaceScope_0;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.synchronize.ScopableSubscriberParticipant.ISynchronizeScope#getRoots()
*/

Back to the top