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);</