Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcvs2svn2004-05-12 21:02:08 +0000
committercvs2svn2004-05-12 21:02:08 +0000
commit5227557ff2c17670c0cfab9e588d917c9f980c5b (patch)
tree6aa347b84727c8ed0b41963df430078f283edb05 /bundles/org.eclipse.team.ui/src/org/eclipse/team/internal
parent819d8b0e7e31c20d046fa2bf540948d1cb521665 (diff)
downloadeclipse.platform.team-5227557ff2c17670c0cfab9e588d917c9f980c5b.tar.gz
eclipse.platform.team-5227557ff2c17670c0cfab9e588d917c9f980c5b.tar.xz
eclipse.platform.team-5227557ff2c17670c0cfab9e588d917c9f980c5b.zip
This commit was manufactured by cvs2svn to create branch
'branch_20040512_CVSVariantTreeExperiments'. Sprout from master 2004-05-12 21:02:06 UTC Michael Valenta <mvalenta> 'Random change (I know your watching;-)' Delete: bundles/org.eclipse.compare/.classpath bundles/org.eclipse.compare/.cvsignore bundles/org.eclipse.compare/.project bundles/org.eclipse.compare/about.html bundles/org.eclipse.compare/build.properties bundles/org.eclipse.compare/buildnotes_compare.html bundles/org.eclipse.compare/compare/org/eclipse/compare/BufferedContent.java bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerPane.java bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java bundles/org.eclipse.compare/compare/org/eclipse/compare/HistoryItem.java bundles/org.eclipse.compare/compare/org/eclipse/compare/ICompareNavigator.java bundles/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeListener.java bundles/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeNotifier.java bundles/org.eclipse.compare/compare/org/eclipse/compare/IEditableContent.java bundles/org.eclipse.compare/compare/org/eclipse/compare/IEncodedStreamContentAccessor.java bundles/org.eclipse.compare/compare/org/eclipse/compare/IModificationDate.java bundles/org.eclipse.compare/compare/org/eclipse/compare/IPropertyChangeNotifier.java bundles/org.eclipse.compare/compare/org/eclipse/compare/IStreamContentAccessor.java bundles/org.eclipse.compare/compare/org/eclipse/compare/IStreamMerger.java bundles/org.eclipse.compare/compare/org/eclipse/compare/ITypedElement.java bundles/org.eclipse.compare/compare/org/eclipse/compare/IViewerCreator.java bundles/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java bundles/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java bundles/org.eclipse.compare/compare/org/eclipse/compare/Splitter.java bundles/org.eclipse.compare/compare/org/eclipse/compare/ZipFileStructureCreator.java bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/DelayedProgressMonitor.java bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IDocumentRange.java bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IMergeViewerContentProvider.java bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ITokenComparator.java bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewerResources.properties bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/package.html bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AbstractViewer.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.properties bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryDialog.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BaseCompareAction.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewer.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerCreator.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerResources.properties bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedCanvas.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedResourceNode.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ChangePropertyAction.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ColorEditor.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareAction.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareDialog.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareFilter.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareNavigator.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareOutlinePage.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.properties bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DiffImage.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocumentManager.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/EditionAction.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ExceptionHandler.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ICompareContextIds.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/INavigatable.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/IOpenable.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ISavable.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/IViewerDescriptor.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/IgnoreWhiteSpaceAction.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageCanvas.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewer.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerCreator.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerResources.properties bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ListContentProvider.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ListDialog.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerAction.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerContentProvider.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/NullViewer.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/OverlayPreferenceStore.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.properties bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithPreviousEditionAction.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ResourceCompareInput.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ShowPseudoConflicts.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/SimpleTextViewer.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/StreamMergerDescriptor.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/StructureCreatorDescriptor.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TabFolderLayout.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TextMergeViewerCreator.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TextViewerCreator.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TimeoutContext.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/TokenComparator.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerDescriptor.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerSwitchingCancelled.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/LineComparator.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.properties bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/TextStreamMerger.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/CompareWithPatchAction.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Diff.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Hunk.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/LineReader.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchErrorDialog.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java bundles/org.eclipse.compare/compare/org/eclipse/compare/package.html bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/DifferencesIterator.java bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/IRangeComparator.java bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/LinkedRangeDifference.java bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifference.java bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifferencer.java bundles/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/package.html bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffContainer.java bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffElement.java bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffNode.java bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewerResources.properties bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/Differencer.java bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DocumentRangeNode.java bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInput.java bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInputChangeListener.java bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffContainer.java bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffElement.java bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureComparator.java bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureCreator.java bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/package.html bundles/org.eclipse.compare/icons/full/dlcl16/ancestorpane_co.gif bundles/org.eclipse.compare/icons/full/dlcl16/copy_l_co.gif bundles/org.eclipse.compare/icons/full/dlcl16/copy_r_co.gif bundles/org.eclipse.compare/icons/full/dlcl16/copycont_l_co.gif bundles/org.eclipse.compare/icons/full/dlcl16/copycont_r_co.gif bundles/org.eclipse.compare/icons/full/dlcl16/next_nav.gif bundles/org.eclipse.compare/icons/full/dlcl16/prev_nav.gif bundles/org.eclipse.compare/icons/full/dlcl16/smartmode_co.gif bundles/org.eclipse.compare/icons/full/dlcl16/syncpane_co.gif bundles/org.eclipse.compare/icons/full/dlcl16/twowaycompare_co.gif bundles/org.eclipse.compare/icons/full/dtool16/conflict_edit.gif bundles/org.eclipse.compare/icons/full/dtool16/ignorews_edit.gif bundles/org.eclipse.compare/icons/full/elcl16/ancestorpane_co.gif bundles/org.eclipse.compare/icons/full/elcl16/copy_l_co.gif bundles/org.eclipse.compare/icons/full/elcl16/copy_r_co.gif bundles/org.eclipse.compare/icons/full/elcl16/copycont_l_co.gif bundles/org.eclipse.compare/icons/full/elcl16/copycont_r_co.gif bundles/org.eclipse.compare/icons/full/elcl16/next_nav.gif bundles/org.eclipse.compare/icons/full/elcl16/prev_nav.gif bundles/org.eclipse.compare/icons/full/elcl16/smartmode_co.gif bundles/org.eclipse.compare/icons/full/elcl16/syncpane_co.gif bundles/org.eclipse.compare/icons/full/elcl16/twowaycompare_co.gif bundles/org.eclipse.compare/icons/full/etool16/conflict_edit.gif bundles/org.eclipse.compare/icons/full/etool16/ignorews_edit.gif bundles/org.eclipse.compare/icons/full/eview16/compare_view.gif bundles/org.eclipse.compare/icons/full/obj16/day_obj.gif bundles/org.eclipse.compare/icons/full/obj16/resource_obj.gif bundles/org.eclipse.compare/icons/full/ovr16/add_ov.gif bundles/org.eclipse.compare/icons/full/ovr16/chg_ov.gif bundles/org.eclipse.compare/icons/full/ovr16/confadd_ov.gif bundles/org.eclipse.compare/icons/full/ovr16/confchg_ov.gif bundles/org.eclipse.compare/icons/full/ovr16/confdel_ov.gif bundles/org.eclipse.compare/icons/full/ovr16/del_ov.gif bundles/org.eclipse.compare/icons/full/ovr16/error_ov.gif bundles/org.eclipse.compare/icons/full/ovr16/inadd_ov.gif bundles/org.eclipse.compare/icons/full/ovr16/inchg_ov.gif bundles/org.eclipse.compare/icons/full/ovr16/indel_ov.gif bundles/org.eclipse.compare/icons/full/ovr16/outadd_ov.gif bundles/org.eclipse.compare/icons/full/ovr16/outchg_ov.gif bundles/org.eclipse.compare/icons/full/ovr16/outdel_ov.gif bundles/org.eclipse.compare/icons/full/ovr16/r_inadd_ov.gif bundles/org.eclipse.compare/icons/full/ovr16/r_inchg_ov.gif bundles/org.eclipse.compare/icons/full/ovr16/r_indel_ov.gif bundles/org.eclipse.compare/icons/full/ovr16/r_outadd_ov.gif bundles/org.eclipse.compare/icons/full/ovr16/r_outchg_ov.gif bundles/org.eclipse.compare/icons/full/ovr16/r_outdel_ov.gif bundles/org.eclipse.compare/icons/full/wizban/applypatch_wizban.gif bundles/org.eclipse.compare/plugin.properties bundles/org.eclipse.compare/plugin.xml bundles/org.eclipse.compare/plugins/org.eclipse.compare/.classpath bundles/org.eclipse.compare/plugins/org.eclipse.compare/.cvsignore bundles/org.eclipse.compare/plugins/org.eclipse.compare/.project bundles/org.eclipse.compare/plugins/org.eclipse.compare/about.html bundles/org.eclipse.compare/plugins/org.eclipse.compare/build.properties bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/BufferedContent.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareUI.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerPane.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/HistoryItem.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/ICompareNavigator.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeListener.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IContentChangeNotifier.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IEditableContent.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IEncodedStreamContentAccessor.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IModificationDate.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IPropertyChangeNotifier.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IStreamContentAccessor.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IStreamMerger.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/ITypedElement.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/IViewerCreator.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/ResourceNode.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/Splitter.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/ZipFileStructureCreator.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/DelayedProgressMonitor.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IDocumentRange.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/IMergeViewerContentProvider.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ITokenComparator.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewerResources.properties bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/package.html bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AbstractViewer.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.properties bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryDialog.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BaseCompareAction.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewer.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerCreator.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BinaryCompareViewerResources.properties bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedCanvas.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/BufferedResourceNode.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ChangePropertyAction.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ColorEditor.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareAction.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareDialog.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorContributor.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareFilter.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareNavigator.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareOutlinePage.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithEditionAction.properties bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/DiffImage.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/DocumentManager.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/EditionAction.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ExceptionHandler.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ICompareContextIds.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/INavigatable.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/IOpenable.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ISavable.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/IViewerDescriptor.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/IgnoreWhiteSpaceAction.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageCanvas.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewer.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerCreator.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ImageMergeViewerResources.properties bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ListContentProvider.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ListDialog.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeSourceViewer.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerAction.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/MergeViewerContentProvider.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/NullViewer.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/OverlayPreferenceStore.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithEditionAction.properties bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ReplaceWithPreviousEditionAction.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ResizableDialog.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ResourceCompareInput.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ShowPseudoConflicts.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/SimpleTextViewer.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/StreamMergerDescriptor.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/StructureCreatorDescriptor.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TabFolderLayout.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TextMergeViewerCreator.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TextViewerCreator.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TimeoutContext.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/TokenComparator.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerDescriptor.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ViewerSwitchingCancelled.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/LineComparator.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/MergeMessages.properties bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/TextStreamMerger.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Attic/LineReader.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/CompareWithPatchAction.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Diff.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Hunk.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/LineReader.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchErrorDialog.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/package.html bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/DifferencesIterator.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/IRangeComparator.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/LinkedRangeDifference.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifference.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/RangeDifferencer.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/rangedifferencer/package.html bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffContainer.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffElement.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffNode.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewerResources.properties bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/Differencer.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DocumentRangeNode.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInput.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/ICompareInputChangeListener.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffContainer.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IDiffElement.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureComparator.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/IStructureCreator.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/package.html bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/ancestorpane_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copy_l_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copy_r_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copycont_l_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/copycont_r_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/next_nav.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/prev_nav.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/smartmode_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/syncpane_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dlcl16/twowaycompare_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dtool16/conflict_edit.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/dtool16/ignorews_edit.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/ancestorpane_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copy_l_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copy_r_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copycont_l_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/copycont_r_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/next_nav.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/prev_nav.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/smartmode_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/syncpane_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/elcl16/twowaycompare_co.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/etool16/conflict_edit.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/etool16/ignorews_edit.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/eview16/compare_view.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/obj16/day_obj.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/obj16/resource_obj.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/add_ov.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/chg_ov.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/confadd_ov.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/confchg_ov.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/confdel_ov.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/del_ov.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/error_ov.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/inadd_ov.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/inchg_ov.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/indel_ov.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/outadd_ov.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/outchg_ov.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/outdel_ov.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_inadd_ov.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_inchg_ov.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_indel_ov.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_outadd_ov.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_outchg_ov.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/ovr16/r_outdel_ov.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/icons/full/wizban/applypatch_wizban.gif bundles/org.eclipse.compare/plugins/org.eclipse.compare/plugin.properties bundles/org.eclipse.compare/plugins/org.eclipse.compare/plugin.xml bundles/org.eclipse.compare/plugins/org.eclipse.compare/schema/contentMergeViewers.exsd bundles/org.eclipse.compare/plugins/org.eclipse.compare/schema/contentViewers.exsd bundles/org.eclipse.compare/plugins/org.eclipse.compare/schema/streamMergers.exsd bundles/org.eclipse.compare/plugins/org.eclipse.compare/schema/structureCreators.exsd bundles/org.eclipse.compare/plugins/org.eclipse.compare/schema/structureMergeViewers.exsd bundles/org.eclipse.compare/plugins/org.eclipse.compare/scripts/exportplugin.xml bundles/org.eclipse.compare/schema/contentMergeViewers.exsd bundles/org.eclipse.compare/schema/contentViewers.exsd bundles/org.eclipse.compare/schema/streamMergers.exsd bundles/org.eclipse.compare/schema/structureCreators.exsd bundles/org.eclipse.compare/schema/structureMergeViewers.exsd bundles/org.eclipse.compare/scripts/exportplugin.xml bundles/org.eclipse.team.cvs.core/.classpath bundles/org.eclipse.team.cvs.core/.cvsignore bundles/org.eclipse.team.cvs.core/.options bundles/org.eclipse.team.cvs.core/.project bundles/org.eclipse.team.cvs.core/about.html bundles/org.eclipse.team.cvs.core/asl-v20.txt bundles/org.eclipse.team.cvs.core/build.properties bundles/org.eclipse.team.cvs.core/buildnotes_cvs.html bundles/org.eclipse.team.cvs.core/doc/hglegal.htm bundles/org.eclipse.team.cvs.core/doc/ngibmcpy.gif bundles/org.eclipse.team.cvs.core/doc/org_eclipse_team_cvs_core.html bundles/org.eclipse.team.cvs.core/plugin.properties bundles/org.eclipse.team.cvs.core/plugin.xml bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSAnnotateBlock.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSCompareSubscriber.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSException.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSyncInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProjectSetCapability.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProviderPlugin.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRevisionNumberCompareCriteria.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSStatus.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncTreeSubscriber.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTag.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProviderType.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSWorkspaceSubscriber.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/DateUtil.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/EditorsInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSDecoratorEnablementListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFile.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFileModificationValidator.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFolder.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFile.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteFolder.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRemoteResource.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRepositoryLocation.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResource.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSResourceVisitor.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSRunnable.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSStorage.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IConnectionMethod.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ILogEntry.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IResourceStateChangeListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IServerConnection.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserAuthenticator.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IUserInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/Policy.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractMessageCommand.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Add.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AddStructureVisitor.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Admin.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Annotate.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ByteCountOutputStream.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CRLFDetectInputStream.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CheckedInHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Checkout.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CheckoutWithOverwrite.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CommandOutputListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Commit.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/CopyHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Diff.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/DiffStructureVisitor.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Editors.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ExpandModules.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/FileStructureVisitor.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Import.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Log.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/MTHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModTimeHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModifiedFileSender.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ModuleExpansionHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NOOPCommand.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NOOPVisitor.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NewEntryHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/NotifiedHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/PruneFolderVisitor.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RDiff.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RLog.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RTag.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoteCommand.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Remove.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemoveEntryHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/RemovedHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Request.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ResponseHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StaticHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Status.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/StickyHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/SyncUpdate.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Tag.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TagFileSender.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/TemplateHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Update.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdateMergableOnly.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdateWithOverwrite.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdatedHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequests.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ValidRequestsHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Version.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/AdminKSubstListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/AnnotateListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/CompareDiffListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/DiffListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/EditorsListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ICommandOutputListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IConsoleListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IMessagePatterns.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IStatusListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/IUpdateMessageListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogEntry.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleDefinitionsListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ModuleExpansion.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/RDiffSummaryListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/ServerMessageLineMatcher.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/StatusListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/TagListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/UpdateListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSAuthenticationException.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSCommunicationException.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSServerException.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/Connection.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnection.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnectionMethod.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnection.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnectionMethod.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/UserInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSEntryLineTag.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSWorkspaceRoot.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileContentCachingService.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileModificationManager.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderMemberFetcher.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderSandbox.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTree.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteResource.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SessionPropertySyncInfoCache.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SyncInfoCache.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SynchronizerSyncInfoCache.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/BaserevInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSBaseResourceVariantTree.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSDescendantResourceVariantByteStore.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/DeferredResourceChangeHandler.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MultiTagResourceVariantTree.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MutableFolderSyncInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/MutableResourceSyncInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/NotifyInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/Assert.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AssertionFailedException.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/BuildCleanupListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/CVSDateFormatter.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/FileNameMatcher.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/KnownRepositories.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/PrepareForReplaceVisitor.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ReplaceWithBaseVisitor.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/ResourceStateChangeListeners.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/StringMatcher.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileChangeListener.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileWriter.java bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/Util.java bundles/org.eclipse.team.cvs.ssh/.classpath bundles/org.eclipse.team.cvs.ssh/.cvsignore bundles/org.eclipse.team.cvs.ssh/.options bundles/org.eclipse.team.cvs.ssh/.project bundles/org.eclipse.team.cvs.ssh/about.html bundles/org.eclipse.team.cvs.ssh/build.properties bundles/org.eclipse.team.cvs.ssh/plugin.properties bundles/org.eclipse.team.cvs.ssh/plugin.xml bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Blowfish.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Cipher.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Client.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ClientPacket.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/KnownHosts.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Misc.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Packet.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Policy.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHMethod.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHPlugin.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHServerConnection.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ServerPacket.java bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/messages.properties bundles/org.eclipse.team.cvs.ssh2/.classpath bundles/org.eclipse.team.cvs.ssh2/.cvsignore bundles/org.eclipse.team.cvs.ssh2/.project bundles/org.eclipse.team.cvs.ssh2/about.html bundles/org.eclipse.team.cvs.ssh2/build.properties bundles/org.eclipse.team.cvs.ssh2/jsch-0.1.14.jar bundles/org.eclipse.team.cvs.ssh2/jsch-0.1.15.jar bundles/org.eclipse.team.cvs.ssh2/plugin.properties bundles/org.eclipse.team.cvs.ssh2/plugin.xml bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2Method.java bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2Plugin.java bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2PreferencePage.java bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2ServerConnection.java bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/PServerSSH2Method.java bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/PServerSSH2ServerConnection.java bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/Policy.java bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/messages.properties bundles/org.eclipse.team.cvs.ui/.classpath bundles/org.eclipse.team.cvs.ui/.cvsignore bundles/org.eclipse.team.cvs.ui/.options bundles/org.eclipse.team.cvs.ui/.project bundles/org.eclipse.team.cvs.ui/about.html bundles/org.eclipse.team.cvs.ui/build.properties bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/clear_co.gif bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/collapseall.gif bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/filter_history.gif bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/newstream_wiz.gif bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/refresh.gif bundles/org.eclipse.team.cvs.ui/icons/full/dlcl16/synced.gif bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/annotate.gif bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/checkout.gif bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/cvs_synch.gif bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/history.gif bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/ignorefiles.gif bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/newconnect_wiz.gif bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/newlocation_wiz.gif bundles/org.eclipse.team.cvs.ui/icons/full/dtool16/share_prj_wiz.gif bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/clear_co.gif bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/collapseall.gif bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/filter_history.gif bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/newstream_wiz.gif bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/refresh.gif bundles/org.eclipse.team.cvs.ui/icons/full/elcl16/synced.gif bundles/org.eclipse.team.cvs.ui/icons/full/etool16/annotate.gif bundles/org.eclipse.team.cvs.ui/icons/full/etool16/checkout.gif bundles/org.eclipse.team.cvs.ui/icons/full/etool16/cvs_synch.gif bundles/org.eclipse.team.cvs.ui/icons/full/etool16/history.gif bundles/org.eclipse.team.cvs.ui/icons/full/etool16/newconnect_wiz.gif bundles/org.eclipse.team.cvs.ui/icons/full/etool16/newlocation_wiz.gif bundles/org.eclipse.team.cvs.ui/icons/full/etool16/share_prj_wiz.gif bundles/org.eclipse.team.cvs.ui/icons/full/eview16/annotate_view.gif bundles/org.eclipse.team.cvs.ui/icons/full/eview16/compare_view.gif bundles/org.eclipse.team.cvs.ui/icons/full/eview16/console_view.gif bundles/org.eclipse.team.cvs.ui/icons/full/eview16/cvs_persp.gif bundles/org.eclipse.team.cvs.ui/icons/full/eview16/history_view.gif bundles/org.eclipse.team.cvs.ui/icons/full/eview16/rep_editors_view.gif bundles/org.eclipse.team.cvs.ui/icons/full/eview16/repo_rep.gif bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph1.gif bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph2.gif bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph3.gif bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph4.gif bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph5.gif bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph6.gif bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph7.gif bundles/org.eclipse.team.cvs.ui/icons/full/glyphs/glyph8.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/branches_rep.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/changelog_obj.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/date.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/dates.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/module_rep.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/prjversions_rep.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/repository_rep.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/tag.gif bundles/org.eclipse.team.cvs.ui/icons/full/obj16/versions_rep.gif bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/confauto_ov.gif bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/edited_ov.gif bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/merged_ov.gif bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/no_remotedir_ov.gif bundles/org.eclipse.team.cvs.ui/icons/full/ovr16/question_ov.gif bundles/org.eclipse.team.cvs.ui/icons/full/wizban/createpatch_wizban.gif bundles/org.eclipse.team.cvs.ui/icons/full/wizban/keywordsub_wizban.gif bundles/org.eclipse.team.cvs.ui/icons/full/wizban/mergestream_wizban.gif bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newconnect_wizban.gif bundles/org.eclipse.team.cvs.ui/icons/full/wizban/newlocation_wizban.gif bundles/org.eclipse.team.cvs.ui/plugin.properties bundles/org.eclipse.team.cvs.ui/plugin.xml bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AdaptableHierarchicalResourceList.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AdaptableResourceList.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AddToVersionControlDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AnnotateView.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AvoidableMessageDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/BranchPromptDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareEditorInput.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareRevisionsInput.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorConfiguration.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecoratorPreferencesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFieldEditorPreferencePage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFilePropertiesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSFolderPropertiesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPerspective.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPreferencesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectPropertiesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPropertiesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/DateTagDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/EditorsDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/EditorsView.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ExtMethodPreferencePage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/FileModificationValidator.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryDropAdapter.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilter.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilterAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryFilterDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryTableProvider.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryView.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ICVSUIConstants.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IHelpContextIds.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IRepositoryListener.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IgnoreResourcesDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/KeyboardInteractiveDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ListSelectionArea.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/OverlayIconCache.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/PasswordManagementPreferencePage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ReleaseCommentDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteAnnotationEditorInput.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteAnnotationStorage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteFileEditorInput.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteFileStorage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RemoteRevisionQuickDiffProvider.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResizableWizardDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourceEditionNode.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourcePropertiesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SimpleContentProvider.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/SynchronizeProjectsDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagAsVersionDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagConfigurationDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagSelectionDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TagetLocationSelectionDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TextViewerAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TimeoutProgressMonitorDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/UserValidationDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/VersionCollator.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WatchEditPreferencePage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkInProgressPreferencePage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkbenchUserAuthenticator.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/WorkingSetSelectionArea.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/XMLWriter.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/AddAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/BranchAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CVSAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutAsAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CheckoutWizardAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CommitAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteResourcesAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareRemoteWithTagAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRemoteAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithRevisionAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/CompareWithTagAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ConfigureTagsFromRepoViewOnFolder.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/EditAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/EditorsAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/GenerateDiffFileAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/IgnoreAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MergeAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/MoveRemoteTagAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/NewRepositoryAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenLogEntryAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/OpenRemoteFileAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRemoteAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithRevisionAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ReplaceWithTagAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SetKeywordSubstitutionAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowAnnotationAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowCVSPerspectiveAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowEditorsAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowResourceInHistoryAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/SyncAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagInRepositoryAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/TagLocalAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UneditAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UnmanageAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/UpdateAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/CVSOutputConsole.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/ConsoleDocument.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/console/ConsolePreferencesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardEndPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizardStartPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/ProjectElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/TagElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/TagRootElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/AllRootsElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/BranchCategory.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSAdapterFactory.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSFileElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSFolderElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSModelElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFilePropertySource.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFolderPropertySource.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryLocationPropertySource.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryRootElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSResourceElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRootFolderElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSTagElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/DateTagCategory.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/GroupedByVersionCategory.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/ModulesCategory.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteContentProvider.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFileElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteFolderElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteModule.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteProjectsElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteResourceElement.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RemoteVersionModule.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/RepositoryLocationSchedulingRule.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/TagCategory.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/VersionCategory.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/AddOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/BranchOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CVSOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutIntoOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutMultipleProjectsOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutSingleProjectOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutToRemoteFolderOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CommitOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DisconnectOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/FetchMembersOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/HasProjectMetaFileOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ITagOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/OverrideAndUpdateOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ReconcileProjectOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteCompareOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteLogOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RemoteOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ReplaceOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryLocationOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ShareProjectOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/SingleCommandOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagInRepositoryOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOnlyMergableOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/AddToBranchAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CVSRepoViewAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CVSRepositoryPropertiesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CVSWorkingSet.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CVSWorkingSetPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CommentHistoryContentHandler.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CopyRepositoryNameAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/EncodingFieldEditor.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/NewCVSRepositoryAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/NewDateTagAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectSelectionPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshRemoteProjectWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RefreshTagsAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoteProjectsView.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoteTagsView.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoteViewPart.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveDateTagAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RemoveRootAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesView.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoriesViewContentHandler.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryEncodingPropertyPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryManager.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryRoot.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositorySorter.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSActionDelegateWrapper.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipant.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantLabelDecorator.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSSubscriberOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSSynchronizeWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogDiffNode.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogModelManager.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogModelProvider.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogModelSorter.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareParticipant.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareRevertAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareRevertOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ConfirmMergedAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ConfirmMergedOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeSynchronizeParticipant.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndCommitAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateSubscriberOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SafeUpdateOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SyncInfoSetDetailsDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/UpdateDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/ToolTipMessageDialog.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSWizardPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsLocationSelectionPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsMainPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsProjectSelectionPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardAutoconnectPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileOperation.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ICVSWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardCommitCommentPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardDirtyFilesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSelectionPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSharedFilesPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/KSubstWizardSummaryPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ModuleSelectionPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/NewLocationWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RepositorySelectionPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryFileSelectionPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizard.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardFinishPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardPageActionGroup.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardSyncPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/TagSelectionWizardPage.java bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/UpdateWizard.java bundles/org.eclipse.team.ui/.classpath bundles/org.eclipse.team.ui/.cvsignore bundles/org.eclipse.team.ui/.project bundles/org.eclipse.team.ui/about.html bundles/org.eclipse.team.ui/api.txt bundles/org.eclipse.team.ui/build.properties bundles/org.eclipse.team.ui/icons/full/dlcl16/catchup_rls.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/catchuprelease_rls.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/checkin_action.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/checkout_action.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/clear_co.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/collapseall.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/conflict_synch.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/filter_change.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/filter_history.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/flatLayout.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/hierarchicalLayout.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/ignorefiles.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/ignorews_edit.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/incom_synch.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/newstream_wiz.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/next_nav.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/outgo_synch.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/participant_rem.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/participant_remall.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/pin.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/prev_nav.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/refresh.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/refresh_remote.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/release_rls.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/rem_co.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/site_element.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/synced.gif bundles/org.eclipse.team.ui/icons/full/dlcl16/synch_participants.gif bundles/org.eclipse.team.ui/icons/full/elcl16/catchup_rls.gif bundles/org.eclipse.team.ui/icons/full/elcl16/catchuprelease_rls.gif bundles/org.eclipse.team.ui/icons/full/elcl16/checkin_action.gif bundles/org.eclipse.team.ui/icons/full/elcl16/checkout_action.gif bundles/org.eclipse.team.ui/icons/full/elcl16/clear_co.gif bundles/org.eclipse.team.ui/icons/full/elcl16/collapseall.gif bundles/org.eclipse.team.ui/icons/full/elcl16/conflict_synch.gif bundles/org.eclipse.team.ui/icons/full/elcl16/filter_change.gif bundles/org.eclipse.team.ui/icons/full/elcl16/filter_history.gif bundles/org.eclipse.team.ui/icons/full/elcl16/flatLayout.gif bundles/org.eclipse.team.ui/icons/full/elcl16/hierarchicalLayout.gif bundles/org.eclipse.team.ui/icons/full/elcl16/ignorefiles.gif bundles/org.eclipse.team.ui/icons/full/elcl16/ignorews_edit.gif bundles/org.eclipse.team.ui/icons/full/elcl16/incom_synch.gif bundles/org.eclipse.team.ui/icons/full/elcl16/newstream_wiz.gif bundles/org.eclipse.team.ui/icons/full/elcl16/next_nav.gif bundles/org.eclipse.team.ui/icons/full/elcl16/outgo_synch.gif bundles/org.eclipse.team.ui/icons/full/elcl16/participant_rem.gif bundles/org.eclipse.team.ui/icons/full/elcl16/participant_remall.gif bundles/org.eclipse.team.ui/icons/full/elcl16/pin.gif bundles/org.eclipse.team.ui/icons/full/elcl16/prev_nav.gif bundles/org.eclipse.team.ui/icons/full/elcl16/refresh.gif bundles/org.eclipse.team.ui/icons/full/elcl16/refresh_remote.gif bundles/org.eclipse.team.ui/icons/full/elcl16/release_rls.gif bundles/org.eclipse.team.ui/icons/full/elcl16/rem_co.gif bundles/org.eclipse.team.ui/icons/full/elcl16/site_element.gif bundles/org.eclipse.team.ui/icons/full/elcl16/synced.gif bundles/org.eclipse.team.ui/icons/full/elcl16/synch_participants.gif bundles/org.eclipse.team.ui/icons/full/eview16/synch_synch.gif bundles/org.eclipse.team.ui/icons/full/obj/compressed_folder_obj.gif bundles/org.eclipse.team.ui/icons/full/obj/export_projectset.gif bundles/org.eclipse.team.ui/icons/full/obj/import_projectset.gif bundles/org.eclipse.team.ui/icons/full/obj/share_project.gif bundles/org.eclipse.team.ui/icons/full/ovr/checkedout_ov.gif bundles/org.eclipse.team.ui/icons/full/ovr/confchg_ov.gif bundles/org.eclipse.team.ui/icons/full/ovr/dirty_ov.gif bundles/org.eclipse.team.ui/icons/full/ovr/error_co.gif bundles/org.eclipse.team.ui/icons/full/ovr/version_controlled.gif bundles/org.eclipse.team.ui/icons/full/ovr/waiting_ovr.gif bundles/org.eclipse.team.ui/icons/full/ovr/warning_co.gif bundles/org.eclipse.team.ui/icons/full/wizban/export_projectset_wizban.gif bundles/org.eclipse.team.ui/icons/full/wizban/import_projectset_wizban.gif bundles/org.eclipse.team.ui/icons/full/wizban/keylock.gif bundles/org.eclipse.team.ui/icons/full/wizban/lockkey.gif bundles/org.eclipse.team.ui/icons/full/wizban/share_wizban.gif bundles/org.eclipse.team.ui/plugin.properties bundles/org.eclipse.team.ui/plugin.xml bundles/org.eclipse.team.ui/schema/configurationWizards.exsd bundles/org.eclipse.team.ui/schema/synchronizeParticipants.exsd bundles/org.eclipse.team.ui/schema/synchronizeWizards.exsd bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IHelpContextIds.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/OverlayIcon.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetContentHandler.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamAdapterFactory.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/UIProjectSetSerializationContext.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ITeamRunnableContext.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/JobRunnableContext.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ProgressDialogRunnableContext.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialogWithProjects.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DialogArea.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IPromptCondition.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PreferencePageContainerDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PromptingDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/ComboFieldEditor.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/IgnorePreferencePage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TeamPreferencePage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TextPreferencePage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantRegistry.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardDescription.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardRegistry.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActionDelegateWrapper.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangesSection.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompressedFoldersModelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureRefreshScheduleDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureSynchronizeScheduleComposite.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DecoratingColorLabelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DiffNodeWorkbenchAdapter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshResourceSelectionPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelManager.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IPageValidator.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshEvent.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshSubscriberListener.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProviderDescriptor.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/PartNavigator.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ReferenceCounter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshChangeListener.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshEvent.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberJob.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicy.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ScopableSubscriberParticipant.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantWizard.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoModelElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetSynchronizePage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementLabelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementSorter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelManager.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizePageConfiguration.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewDefaultPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewWorkbenchPart.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSynchronizingPerspective.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/UnchangedResourceModelElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DefaultSynchronizePageActions.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DirectionFilterActionGroup.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/NavigateAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenFileInSystemEditorAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenWithActionGroup.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PinParticipantAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefactorActionGroup.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ShowSynchronizeParticipantAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SubscriberActionContribution.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncViewerShowPreferencesAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardNode.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalSynchronizeWizard.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/TeamWizardPage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizard.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISaveableWorkbenchPart.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ITeamUIConstants.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartAdapter.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/SaveablePartDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamOperation.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/package.html bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeScope.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeManager.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelChangeListener.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeModelElement.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePage.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageSite.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantDescriptor.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantListener.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipantReference.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeView.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageDialog.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPageSaveablePart.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ResourceScope.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelOperation.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkspaceScope.java bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/package.html examples/org.eclipse.compare.examples.xml/.classpath examples/org.eclipse.compare.examples.xml/.cvsignore examples/org.eclipse.compare.examples.xml/.project examples/org.eclipse.compare.examples.xml/IdMaps/ant_test.xml examples/org.eclipse.compare.examples.xml/IdMaps/idmap.dtd examples/org.eclipse.compare.examples.xml/about.html examples/org.eclipse.compare.examples.xml/build.properties examples/org.eclipse.compare.examples.xml/doc-html/CreateNewIDMapButton.gif examples/org.eclipse.compare.examples.xml/doc-html/EditCopy.gif examples/org.eclipse.compare.examples.xml/doc-html/IDMapContextMenu.gif examples/org.eclipse.compare.examples.xml/doc-html/IDMap_GeneralMatching.gif examples/org.eclipse.compare.examples.xml/doc-html/IDMap_MyPlugin.gif examples/org.eclipse.compare.examples.xml/doc-html/IDMap_NewIDMapScheme.gif examples/org.eclipse.compare.examples.xml/doc-html/IDMap_NewMapping_ContextMenu.gif examples/org.eclipse.compare.examples.xml/doc-html/IDMap_NewMapping_PreferencePage.gif examples/org.eclipse.compare.examples.xml/doc-html/IDMap_SelectMyPlugin.gif examples/org.eclipse.compare.examples.xml/doc-html/Ordered_MyANT.gif examples/org.eclipse.compare.examples.xml/doc-html/Ordered_NewIDMapScheme.gif examples/org.eclipse.compare.examples.xml/doc-html/Ordered_NewOrderedEntry_ContextMenu.gif examples/org.eclipse.compare.examples.xml/doc-html/Ordered_NewOrderedEntry_PreferencePage.gif examples/org.eclipse.compare.examples.xml/doc-html/Ordered_UnorderedScheme.gif examples/org.eclipse.compare.examples.xml/doc-html/PreferencePage.gif examples/org.eclipse.compare.examples.xml/doc-html/addidmap.gif examples/org.eclipse.compare.examples.xml/doc-html/hglegal.htm examples/org.eclipse.compare.examples.xml/doc-html/idMapping.html examples/org.eclipse.compare.examples.xml/doc-html/ngibmcpy.gif examples/org.eclipse.compare.examples.xml/doc-html/smartmode_co.gif examples/org.eclipse.compare.examples.xml/doc-html/tutorial_and_examples.html examples/org.eclipse.compare.examples.xml/doc-html/ui_xmlcompare_ex.html examples/org.eclipse.compare.examples.xml/icons/full/obj16/addidmap.gif examples/org.eclipse.compare.examples.xml/icons/full/obj16/attribute_obj.gif examples/org.eclipse.compare.examples.xml/icons/full/obj16/element_obj.gif examples/org.eclipse.compare.examples.xml/icons/full/obj16/element_ordered_obj.gif examples/org.eclipse.compare.examples.xml/icons/full/obj16/smartmode_co.gif examples/org.eclipse.compare.examples.xml/icons/full/obj16/text_obj.gif examples/org.eclipse.compare.examples.xml/plugin.properties examples/org.eclipse.compare.examples.xml/plugin.xml examples/org.eclipse.compare.examples.xml/schema/idMapping.exsd examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AbstractMatching.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/AttributesImpl.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ChooseMatcherDropDownAction.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/CreateNewIdMapAction.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/IdMap.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/Mapping.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/OrderedMatching.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/SWTUtil.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/SelectMatcherAction.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLChildren.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditCopyIdMapDialog.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditMappingDialog.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareEditOrderedDialog.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareMessages.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLComparePreferencePage.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLNode.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewerCreator.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/MessageLine.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusDialog.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusInfo.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/ui/StatusUtil.java examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/xmlcompare.properties examples/org.eclipse.compare.examples.xml/tests/org/eclipse/compare/examples/xml/AllXMLCompareTests.java examples/org.eclipse.compare.examples.xml/tests/org/eclipse/compare/examples/xml/TestXMLStructureCreator.java examples/org.eclipse.compare.examples/.classpath examples/org.eclipse.compare.examples/.cvsignore examples/org.eclipse.compare.examples/.project examples/org.eclipse.compare.examples/about.html examples/org.eclipse.compare.examples/build.properties examples/org.eclipse.compare.examples/doc-html/hglegal.htm examples/org.eclipse.compare.examples/doc-html/ngibmcpy.gif examples/org.eclipse.compare.examples/doc-html/ui_structurecreator_ex.html examples/org.eclipse.compare.examples/plugin.properties examples/org.eclipse.compare.examples/plugin.xml examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/CompareExampleMessages.properties examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/KeyValuePairStructureCreator.java examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/TextMergeViewerCreator.java examples/org.eclipse.compare.examples/src/org/eclipse/compare/examples/structurecreator/Util.java examples/org.eclipse.team.examples.filesystem/.classpath examples/org.eclipse.team.examples.filesystem/.cvsignore examples/org.eclipse.team.examples.filesystem/.project examples/org.eclipse.team.examples.filesystem/about.html examples/org.eclipse.team.examples.filesystem/build.properties examples/org.eclipse.team.examples.filesystem/doc-html/hglegal.htm examples/org.eclipse.team.examples.filesystem/doc-html/ngibmcpy.gif examples/org.eclipse.team.examples.filesystem/doc-html/team_filesystem_ex.html examples/org.eclipse.team.examples.filesystem/icons/full/wizards/fsicon_wiz.gif examples/org.eclipse.team.examples.filesystem/icons/full/wizban/newconnect_wizban.gif examples/org.eclipse.team.examples.filesystem/plugin.properties examples/org.eclipse.team.examples.filesystem/plugin.xml examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileModificationValidator.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemOperations.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemPlugin.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProvider.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/Policy.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/StreamUtil.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/messages.properties examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemRemoteTree.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemResourceVariant.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemSubscriber.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ConfigurationWizard.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/DisconnectAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemMainPage.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemPropertiesPage.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutAction.java examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ReplaceAction.java tests/org.eclipse.compare.tests/.classpath tests/org.eclipse.compare.tests/.cvsignore tests/org.eclipse.compare.tests/.project tests/org.eclipse.compare.tests/JUnit Tests/org/eclipse/compare/tests/AllTests.java tests/org.eclipse.compare.tests/JUnit Tests/org/eclipse/compare/tests/DocLineComparatorTest.java tests/org.eclipse.compare.tests/JUnit Tests/org/eclipse/compare/tests/FilterTest.java tests/org.eclipse.compare.tests/JUnit Tests/org/eclipse/compare/tests/StreamMergerTest.java tests/org.eclipse.compare.tests/about.html tests/org.eclipse.compare.tests/build.properties tests/org.eclipse.compare.tests/plugin.properties tests/org.eclipse.compare.tests/plugin.xml tests/org.eclipse.compare.tests/test.xml tests/org.eclipse.team.tests.core/.classpath tests/org.eclipse.team.tests.core/.cvsignore tests/org.eclipse.team.tests.core/.project tests/org.eclipse.team.tests.core/about.html tests/org.eclipse.team.tests.core/build-tests.xml tests/org.eclipse.team.tests.core/build.properties tests/org.eclipse.team.tests.core/plugin.xml tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/AllTeamTests.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderBic.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderNaish.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderOtherSport.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTests.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderTypeBic.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/RepositoryProviderWithLinking.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/StreamTests.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/TeamTest.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/AllTeamSynchronizeTests.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/SyncInfoSetContentProviderTest.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/TestDiffNodePresentationModel.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/TestPage.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/TestParticipant.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/TestSyncInfo.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/TestTreeViewerAdvisor.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/views/ContentProviderTestView.java tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/views/TestTreeViewer.java tests/org.eclipse.team.tests.core/test.xml tests/org.eclipse.team.tests.cvs.core/.classpath tests/org.eclipse.team.tests.cvs.core/.cvsignore tests/org.eclipse.team.tests.cvs.core/.project tests/org.eclipse.team.tests.cvs.core/about.html tests/org.eclipse.team.tests.cvs.core/benchmark/cvsui_benchmark.bat tests/org.eclipse.team.tests.cvs.core/benchmark/readme.txt tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_02_26.integration.all.xml tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_03_19.integration.all.xml tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_24.milestone5.all.xml tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_04_25.integration.commandline.xml tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_07_10.release2_0.commandline.xml tests/org.eclipse.team.tests.cvs.core/benchmark/team2.0/2002_07_11.release2_0.all.xml tests/org.eclipse.team.tests.cvs.core/benchmark/team2.1/I20021127.all.xml tests/org.eclipse.team.tests.cvs.core/benchmark/team2.1/I20030129.all.xml tests/org.eclipse.team.tests.cvs.core/benchmark/team2.1/RC1.all.xml tests/org.eclipse.team.tests.cvs.core/benchmark/teamui_benchmark.bat tests/org.eclipse.team.tests.cvs.core/benchmark/vcm1.0/2002_02_26.integration.all.xml tests/org.eclipse.team.tests.cvs.core/benchmark/vcmui_benchmark.bat tests/org.eclipse.team.tests.cvs.core/book.css tests/org.eclipse.team.tests.cvs.core/build-tests.xml tests/org.eclipse.team.tests.cvs.core/build.properties tests/org.eclipse.team.tests.cvs.core/html/00000.html tests/org.eclipse.team.tests.cvs.core/html/00001.html tests/org.eclipse.team.tests.cvs.core/html/00002.html tests/org.eclipse.team.tests.cvs.core/html/00003.html tests/org.eclipse.team.tests.cvs.core/html/00004.html tests/org.eclipse.team.tests.cvs.core/html/00005.html tests/org.eclipse.team.tests.cvs.core/html/00006.html tests/org.eclipse.team.tests.cvs.core/html/00007.html tests/org.eclipse.team.tests.cvs.core/html/00008.html tests/org.eclipse.team.tests.cvs.core/html/00009.html tests/org.eclipse.team.tests.cvs.core/html/00010.html tests/org.eclipse.team.tests.cvs.core/html/00011.html tests/org.eclipse.team.tests.cvs.core/html/00012.html tests/org.eclipse.team.tests.cvs.core/html/00013.html tests/org.eclipse.team.tests.cvs.core/html/00014.html tests/org.eclipse.team.tests.cvs.core/html/00015.html tests/org.eclipse.team.tests.cvs.core/html/00016.html tests/org.eclipse.team.tests.cvs.core/html/00017.html tests/org.eclipse.team.tests.cvs.core/html/00018.html tests/org.eclipse.team.tests.cvs.core/html/00019.html tests/org.eclipse.team.tests.cvs.core/html/00020.html tests/org.eclipse.team.tests.cvs.core/html/00021.html tests/org.eclipse.team.tests.cvs.core/html/00022.html tests/org.eclipse.team.tests.cvs.core/html/00023.html tests/org.eclipse.team.tests.cvs.core/html/00024.html tests/org.eclipse.team.tests.cvs.core/html/00025.html tests/org.eclipse.team.tests.cvs.core/html/00026.html tests/org.eclipse.team.tests.cvs.core/html/00027.html tests/org.eclipse.team.tests.cvs.core/html/00028.html tests/org.eclipse.team.tests.cvs.core/html/00028a.html tests/org.eclipse.team.tests.cvs.core/html/00029.html tests/org.eclipse.team.tests.cvs.core/html/00029a.html tests/org.eclipse.team.tests.cvs.core/html/00030.html tests/org.eclipse.team.tests.cvs.core/html/00030a.html tests/org.eclipse.team.tests.cvs.core/html/00031.html tests/org.eclipse.team.tests.cvs.core/html/00032.html tests/org.eclipse.team.tests.cvs.core/html/00033.html tests/org.eclipse.team.tests.cvs.core/html/00034.html tests/org.eclipse.team.tests.cvs.core/html/00035.html tests/org.eclipse.team.tests.cvs.core/html/00036.html tests/org.eclipse.team.tests.cvs.core/html/00037.html tests/org.eclipse.team.tests.cvs.core/html/00038.html tests/org.eclipse.team.tests.cvs.core/html/00039.html tests/org.eclipse.team.tests.cvs.core/html/00040.html tests/org.eclipse.team.tests.cvs.core/html/00041.html tests/org.eclipse.team.tests.cvs.core/html/00042.html tests/org.eclipse.team.tests.cvs.core/html/00043.html tests/org.eclipse.team.tests.cvs.core/html/00044.html tests/org.eclipse.team.tests.cvs.core/html/00045.html tests/org.eclipse.team.tests.cvs.core/html/00046.html tests/org.eclipse.team.tests.cvs.core/html/00047.html tests/org.eclipse.team.tests.cvs.core/html/00048.html tests/org.eclipse.team.tests.cvs.core/html/00049.html tests/org.eclipse.team.tests.cvs.core/html/00050.html tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS Core Tests.launch tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests (Linux).launch tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests.launch tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test.launch tests/org.eclipse.team.tests.cvs.core/launchConfigurations/Test using Ant application.launch tests/org.eclipse.team.tests.cvs.core/launchConfigurations/benchmark/Benchmark Test.launch tests/org.eclipse.team.tests.cvs.core/launchConfigurations/benchmark/PrintDiffMain.launch tests/org.eclipse.team.tests.cvs.core/plugin.xml tests/org.eclipse.team.tests.cvs.core/readme.html tests/org.eclipse.team.tests.cvs.core/repository.properties tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkBig.zip tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkSmall.zip tests/org.eclipse.team.tests.cvs.core/resources/BenchmarkTest/benchmarkTiny.zip tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/CVSROOT/modules tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/docs/readme.html tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/common/macros/macro1 tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project1/f1/file-in-p1.txt tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project2/file-p2.txt tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.c tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/src/file.h tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project3/sub/file-sub.txt tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/common/common.txt tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/linux/linux.txt tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project7/pc/pc.txt tests/org.eclipse.team.tests.cvs.core/resources/CommandTest/project8/file-p8.txt tests/org.eclipse.team.tests.cvs.core/self-host.xml tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllCoreTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSClientException.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestLogListener.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestSetup.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSUITestSetup.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CommandLineCVSClient.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseCVSClient.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/ICVSClient.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/JUnitTestCase.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TestConnection.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TestConnectionMethod.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/TestsUserAuthenticator.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/AllTestsCompatibility.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/BasicTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/CompatibleTestSetup.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ConflictTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/ModuleTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/SameResultEnv.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/AllTestsCVSResources.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/BatchedTestSetup.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseFolderTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/EclipseSynchronizerTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncBytesTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncInfoTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/AllTestsProvider.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/CVSProviderTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ConcurrencyTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ImportTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/IsModifiedTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/LinkResourcesTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ModuleTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/RemoteResourceTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/ResourceDeltaTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/WatchEditTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/AllTestsTeamSubscriber.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSCompareSubscriberTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSMergeSubscriberTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSSyncSubscriberTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSWorkspaceSubscriberTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/SyncInfoSource.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/SyncSetTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestCommitOperation.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestMergeUpdateOperation.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestOverrideAndUpdateOperation.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestUpdateOperation.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/AllUITests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CVSOperationTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CheckoutOperationTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CompareOperationTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/MenuEnablementTest.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/MiscOperationsTests.java tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SynchronizeViewTestAdapter.java tests/org.eclipse.team.tests.cvs.core/test.xml tests/org.eclipse.team.tests.cvs.core/toc.xml
Diffstat (limited to 'bundles/org.eclipse.team.ui/src/org/eclipse/team/internal')
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IHelpContextIds.java48
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java46
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/OverlayIcon.java126
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java196
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetContentHandler.java102
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamAdapterFactory.java40
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java366
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/UIProjectSetSerializationContext.java108
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java574
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java70
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ITeamRunnableContext.java40
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/JobRunnableContext.java183
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ProgressDialogRunnableContext.java152
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java362
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java310
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialogWithProjects.java108
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DialogArea.java218
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IPromptCondition.java31
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PreferencePageContainerDialog.java395
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PromptingDialog.java126
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties434
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/ComboFieldEditor.java185
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/IgnorePreferencePage.java183
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java220
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TeamPreferencePage.java119
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TextPreferencePage.java375
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java144
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java117
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantRegistry.java54
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardDescription.java88
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardRegistry.java51
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActionDelegateWrapper.java91
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangesSection.java343
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompressedFoldersModelProvider.java304
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureRefreshScheduleDialog.java65
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureSynchronizeScheduleComposite.java198
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DecoratingColorLabelProvider.java107
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DiffNodeWorkbenchAdapter.java64
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshResourceSelectionPage.java413
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelManager.java69
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelProvider.java249
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IPageValidator.java23
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshEvent.java105
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshSubscriberListener.java44
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProvider.java99
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProviderDescriptor.java34
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java160
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/PartNavigator.java171
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ReferenceCounter.java140
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshChangeListener.java57
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshEvent.java79
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberJob.java533
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicy.java99
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java96
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java142
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ScopableSubscriberParticipant.java59
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java512
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantPage.java128
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantWizard.java69
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java209
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoModelElement.java263
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetSynchronizePage.java300
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java641
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElement.java196
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementLabelProvider.java229
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementSorter.java47
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelManager.java239
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java779
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizePageConfiguration.java548
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java487
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewDefaultPage.java89
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewWorkbenchPart.java125
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSynchronizingPerspective.java56
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.java401
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/UnchangedResourceModelElement.java42
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchAction.java28
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java104
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DefaultSynchronizePageActions.java60
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DirectionFilterActionGroup.java206
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java55
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshAction.java168
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/NavigateAction.java131
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenFileInSystemEditorAction.java42
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java165
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenWithActionGroup.java101
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PinParticipantAction.java62
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefactorActionGroup.java145
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java107
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java105
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ShowSynchronizeParticipantAction.java47
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java143
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java164
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SubscriberActionContribution.java103
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncViewerShowPreferencesAction.java35
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java176
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardElement.java140
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardNode.java72
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java241
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java179
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java202
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java174
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalSynchronizeWizard.java114
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java216
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.java191
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java150
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/TeamWizardPage.java107
106 files changed, 0 insertions, 18608 deletions
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
deleted file mode 100644
index 5ed5e1da6..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IHelpContextIds.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui;
-
-public interface IHelpContextIds {
- public static final String PREFIX = TeamUIPlugin.ID + "."; //$NON-NLS-1$
-
- // Preference Pages
- public static final String TEAM_PREFERENCE_PAGE = PREFIX + "team_preference_page_context"; //$NON-NLS-1$
- public static final String IGNORE_PREFERENCE_PAGE = PREFIX + "ignore_preference_page_context"; //$NON-NLS-1$
- public static final String FILE_TYPE_PREFERENCE_PAGE = PREFIX + "file_type_preference_page_context"; //$NON-NLS-1$
-
- // Wizard Pages
- public static final String SHARE_PROJECT_PAGE = PREFIX + "share_project_page_context"; //$NON-NLS-1$
- public static final String IMPORT_PROJECT_SET_PAGE = PREFIX + "import_project_set_page_context"; //$NON-NLS-1$
- public static final String EXPORT_PROJECT_SET_PAGE = PREFIX + "export_project_set_page_context"; //$NON-NLS-1$
- public static final String TARGET_NEW_SITE_PAGE = PREFIX + "target_new_site_page_context"; //$NON-NLS-1$
- public static final String TARGET_MAPPING_SELECTION_PAGE = PREFIX + "target_mapping_selection_page_context"; //$NON-NLS-1$
-
- // Catchup Release Viewers
- public static final String TARGET_CATCHUP_RELEASE_VIEWER = PREFIX + "target_catchup_release_viewer_context"; //$NON-NLS-1$
-
- // Target Actions
- public static final String SYNC_GET_ACTION = PREFIX + "sync_get_action_context"; //$NON-NLS-1$
- public static final String SYNC_PUT_ACTION = PREFIX + "sync_put_action_context"; //$NON-NLS-1$
-
- // Views
- public static final String SITE_EXPLORER_VIEW = PREFIX + "site_explorer_view_context"; //$NON-NLS-1$
- public static final String SYNC_VIEW = PREFIX + "sync_view_context"; //$NON-NLS-1$
-
- // Site Explorer View Actions
- public static final String ADD_SITE_ACTION = PREFIX + "add_site_action_context"; //$NON-NLS-1$
- public static final String NEW_FOLDER_ACTION = PREFIX + "new_folder_action_context"; //$NON-NLS-1$
-
- // Sync View Actions
- public static final String OPEN_ACTION = PREFIX + "open_action_context"; //$NON-NLS-1$
- public static final String EXPANDALL_ACTION = PREFIX + "expandall_action_context"; //$NON-NLS-1$
- public static final String REMOVE_ACTION = PREFIX + "remove_action_context"; //$NON-NLS-1$
- public static final String NAVIGATOR_SHOW_ACTION = PREFIX + "navigator_show_action_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
deleted file mode 100644
index caf8e836d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui;
-
-public interface IPreferenceIds {
- public static final String PREFIX = TeamUIPlugin.ID + "."; //$NON-NLS-1$
-
- /*
- * Default model provider layout to use with SubscriberSynchronizePage. The user can configure but this
- * is used to select the initial layout.
- */
- 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 manage the perspective used to synchronize.
- */
- 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"; //$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$
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/OverlayIcon.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/OverlayIcon.java
deleted file mode 100644
index 38011f450..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/OverlayIcon.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui;
-
-import java.util.Arrays;
-
-import org.eclipse.jface.resource.CompositeImageDescriptor;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.*;
-
-/**
- * An OverlayIcon consists of a main icon and several adornments.
- */
-public class OverlayIcon extends CompositeImageDescriptor {
- // the base image
- private Image base;
- // the base as a descriptor
- private ImageDescriptor descriptorBase;
- // the overlay images
- private ImageDescriptor[] overlays;
- // the size
- private Point size;
- // the locations
- private int[] locations;
-
- public static final int TOP_LEFT = 0;
- public static final int TOP_RIGHT = 1;
- public static final int BOTTOM_LEFT = 2;
- public static final int BOTTOM_RIGHT = 3;
-
- public static final int DEFAULT_WIDTH= 22;
- public static final int DEFAULT_HEIGHT= 16;
-
- /**
- * OverlayIcon constructor.
- *
- * @param base the base image
- * @param overlays the overlay images
- * @param locations the location of each image
- * @param size the size
- */
- public OverlayIcon(Image base, ImageDescriptor[] overlays, int[] locations, Point size) {
- this.base = base;
- this.descriptorBase = null;
- this.overlays = overlays;
- this.locations = locations;
- this.size = size;
- }
-
- /**
- * OverlayIcon constructor.
- *
- * @param base the base image
- * @param overlays the overlay images
- * @param locations the location of each image
- * @param size the size
- */
- public OverlayIcon(ImageDescriptor descriptorBase, ImageDescriptor[] overlays, int[] locations, Point size) {
- this.descriptorBase = descriptorBase;
- this.base = null;
- this.overlays = overlays;
- this.locations = locations;
- this.size = size;
- }
-
- protected void drawOverlays(ImageDescriptor[] overlays, int[] locations) {
- Point size = getSize();
- for (int i = 0; i < overlays.length; i++) {
- ImageDescriptor overlay = overlays[i];
- ImageData overlayData = overlay.getImageData();
- switch (locations[i]) {
- case TOP_LEFT:
- drawImage(overlayData, 0, 0);
- break;
- case TOP_RIGHT:
- drawImage(overlayData, size.x - overlayData.width, 0);
- break;
- case BOTTOM_LEFT:
- drawImage(overlayData, 0, size.y - overlayData.height);
- break;
- case BOTTOM_RIGHT:
- drawImage(overlayData, size.x - overlayData.width, size.y - overlayData.height);
- break;
- }
- }
- }
-
- public boolean equals(Object o) {
- if (! (o instanceof OverlayIcon)) return false;
- OverlayIcon other = (OverlayIcon) o;
- return base.equals(other.base) && Arrays.equals(overlays, other.overlays);
- }
-
- public int hashCode() {
- int code = base.hashCode();
- for (int i = 0; i < overlays.length; i++) {
- code ^= overlays[i].hashCode();
- }
- return code;
- }
-
-
- protected void drawCompositeImage(int width, int height) {
- if(descriptorBase != null) {
- ImageData bg;
- if (descriptorBase == null || (bg= descriptorBase.getImageData()) == null)
- bg= DEFAULT_IMAGE_DATA;
- drawImage(bg, 0, 0);
- } else {
- drawImage(base.getImageData(), 0, 0);
- }
- drawOverlays(overlays, locations);
- }
-
- protected Point getSize() {
- return size;
- }
-}
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
deleted file mode 100644
index 700e99613..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui;
-
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.internal.core.InfiniteSubProgressMonitor;
-import org.eclipse.team.internal.core.NullSubProgressMonitor;
-
-/**
- * Policy implements NLS convenience methods for the plugin and
- * makes progress monitor policy decisions
- */
-public class Policy {
- // The resource bundle to get strings from
- protected static ResourceBundle bundle = null;
-
- /**
- * Creates a NLS catalog for the given locale.
- *
- * @param bundleName the name of the bundle
- */
- public static void localize(String bundleName) {
- bundle = ResourceBundle.getBundle(bundleName);
- }
-
- /**
- * Lookup the message with the given ID in this catalog and bind its
- * substitution locations with the given string.
- *
- * @param id the id to look up
- * @param binding the string to bind to the result
- * @return the bound string
- */
- public static String bind(String id, String binding) {
- return bind(id, new String[] { binding });
- }
-
- /**
- * Lookup the message with the given ID in this catalog and bind its
- * substitution locations with the given strings.
- *
- * @param id the id to look up
- * @param binding1 the first string to bind to the result
- * @param binding2 the second string to bind to the result
- * @return the bound string
- */
- public static String bind(String id, String binding1, String binding2) {
- return bind(id, new String[] { binding1, binding2 });
- }
-
- /**
- * Lookup the message with the given ID in this catalog and bind its
- * substitution locations with the given strings.
- *
- * @param id the id to look up
- * @param binding1 the first string to bind to the result
- * @param binding2 the second string to bind to the result
- * @param binding3 the third string to bind to the result
- * @return the bound string
- */
- public static String bind(String id, String binding1, String binding2,String binding3) {
- return bind(id, new String[] { binding1, binding2, binding3 });
- }
-
- /**
- * Gets a string from the resource bundle. We don't want to crash because of a missing String.
- * Returns the key if not found.
- *
- * @param key the id to look up
- * @return the string with the given key
- */
- public static String bind(String key, ResourceBundle b) {
- try {
- return b.getString(key);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Gets a string from the resource bundle. We don't want to crash because of a missing String.
- * Returns the key if not found.
- *
- * @param key the id to look up
- * @return the string with the given key
- */
- public static String bind(String key) {
- try {
- return bundle.getString(key);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Gets a string from the resource bundle and binds it with the given arguments. If the key is
- * not found, return the key.
- *
- * @param key the id to look up
- * @param args the strings to bind to the result
- * @return the bound string
- */
- public static String bind(String key, Object[] args) {
- try {
- return MessageFormat.format(bind(key), args);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Checks if the progress monitor is canceled.
- *
- * @param monitor the onitor to check for cancellation
- * @throws OperationCanceledException if the monitor is canceled
- */
- public static void checkCanceled(IProgressMonitor monitor) {
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
- }
- /**
- * Returns a monitor for the given monitor
- *
- * @param monitor the monitor to return a monitor for
- * @return a monitor for the given monitor
- */
- public static IProgressMonitor monitorFor(IProgressMonitor monitor) {
- if (monitor == null) {
- return new NullProgressMonitor();
- }
- return monitor;
- }
-
- public static IProgressMonitor subMonitorFor(IProgressMonitor monitor, int ticks) {
- if (monitor == null)
- return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor)
- return monitor;
- return new SubProgressMonitor(monitor, ticks);
- }
-
- public static IProgressMonitor subInfiniteMonitorFor(IProgressMonitor monitor, int ticks) {
- if (monitor == null)
- return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor)
- return monitor;
- return new InfiniteSubProgressMonitor(monitor, ticks);
- }
-
- public static IProgressMonitor subNullMonitorFor(IProgressMonitor monitor) {
- if (monitor == null)
- return new NullProgressMonitor();
- if (monitor instanceof NullProgressMonitor)
- return monitor;
- return new NullSubProgressMonitor(monitor);
- }
-
- public static String toTruncatedPath(IPath path, int split) {
- // Search backwards until split separators are found
- int count = 0;
- String stringPath = path.toString();
- int index = stringPath.length();
- while (count++ < split && index != -1) {
- index = stringPath.lastIndexOf(IPath.SEPARATOR, index - 1);
- }
- if (index == -1) {
- return stringPath;
- } else {
- return "..." + stringPath.substring(index); //$NON-NLS-1$
- }
- }
-
- public static ResourceBundle getBundle() {
- return bundle;
- }
-}
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
deleted file mode 100644
index 1d58bdff1..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetContentHandler.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-public class ProjectSetContentHandler extends DefaultHandler {
- boolean inPsf = false;
- boolean inProvider = false;
- boolean inProject = false;
- Map map;
- String id;
- List references;
- boolean isVersionOne = false;
-
- /**
- * @see ContentHandler#startElement(String, String, String, Attributes)
- */
- 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$ //$NON-NLS-2$
- map = new HashMap();
- inPsf = true;
- String version = atts.getValue("version"); //$NON-NLS-1$
- isVersionOne = version.equals("1.0"); //$NON-NLS-1$
- return;
- }
- if (isVersionOne) return;
- if (elementName.equals("provider")) { //$NON-NLS-1$ //$NON-NLS-2$
- if (!inPsf) throw new SAXException(Policy.bind("ProjectSetContentHandler.Element_provider_must_be_contained_in_element_psf_4")); //$NON-NLS-1$
- inProvider = true;
- id = atts.getValue("id"); //$NON-NLS-1$
- references = new ArrayList();
- return;
- }
- if (elementName.equals("project")) { //$NON-NLS-1$ //$NON-NLS-2$
- if (!inProvider) throw new SAXException(Policy.bind("ProjectSetContentHandler.Element_project_must_be_contained_in_element_provider_7")); //$NON-NLS-1$
- inProject = true;
- String reference = atts.getValue("reference"); //$NON-NLS-1$
- references.add(reference);
- return;
- }
- }
-
- /**
- * @see ContentHandler#endElement(String, String, String)
- */
- public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
- String elementName = getElementName(namespaceURI, localName, qName);
- if (elementName.equals("psf")) { //$NON-NLS-1$ //$NON-NLS-2$
- inPsf = false;
- return;
- }
- if (isVersionOne) return;
- if (elementName.equals("provider")) { //$NON-NLS-1$ //$NON-NLS-2$
- map.put(id, references);
- references = null;
- inProvider = false;
- return;
- }
- if (elementName.equals("project")) { //$NON-NLS-1$ //$NON-NLS-2$
- 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
- * is fine. Therefore, use whichever one is provided.
- */
- private String getElementName(String namespaceURI, String localName, String qName) {
- if (localName != null && localName.length() > 0) {
- return localName;
- } else {
- return qName;
- }
- }
-}
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
deleted file mode 100644
index 315c9dcc1..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamAdapterFactory.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui;
-
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.team.internal.ui.synchronize.DiffNodeWorkbenchAdapter;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-
-public class TeamAdapterFactory implements IAdapterFactory {
-
- private DiffNodeWorkbenchAdapter diffNodeAdapter = new DiffNodeWorkbenchAdapter();
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if(adaptableObject instanceof DiffNode && adapterType == IWorkbenchAdapter.class) {
- return diffNodeAdapter;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList() {
- // TODO Auto-generated method stub
- return new Class[] {IWorkbenchAdapter.class};
- }
-}
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
deleted file mode 100644
index d196efba4..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
+++ /dev/null
@@ -1,366 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui;
-
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.*;
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.internal.ui.synchronize.SynchronizeManager;
-import org.eclipse.team.internal.ui.synchronize.TeamSynchronizingPerspective;
-import org.eclipse.team.internal.ui.synchronize.actions.GlobalRefreshAction;
-import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.ui.*;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-/**
- * TeamUIPlugin is the plugin for generic, non-provider specific,
- * team UI functionality in the workbench.
- */
-public class TeamUIPlugin extends AbstractUIPlugin {
-
- private static TeamUIPlugin instance;
-
- // image paths
- public static final String ICON_PATH = "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$
-
- private static List propertyChangeListeners = new ArrayList(5);
-
- private Hashtable imageDescriptors = new Hashtable(20);
-
- /**
- * Creates a new TeamUIPlugin.
- *
- * @param descriptor the plugin descriptor
- */
- public TeamUIPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
- initializeImages(this);
- initializePreferences();
- instance = this;
- }
-
- /**
- * Creates an extension. If the extension plugin has not
- * been loaded a busy cursor will be activated during the duration of
- * the load.
- *
- * @param element the config element defining the extension
- * @param classAttribute the name of the attribute carrying the class
- * @return the extension object
- */
- public static Object createExtension(final IConfigurationElement element, final String classAttribute) throws CoreException {
- // If plugin has been loaded create extension.
- // Otherwise, show busy cursor then create extension.
- IPluginDescriptor plugin = element.getDeclaringExtension().getDeclaringPluginDescriptor();
- if (plugin.isPluginActivated()) {
- return element.createExecutableExtension(classAttribute);
- } else {
- final Object [] ret = new Object[1];
- final CoreException [] exc = new CoreException[1];
- BusyIndicator.showWhile(null, new Runnable() {
- public void run() {
- try {
- ret[0] = element.createExecutableExtension(classAttribute);
- } catch (CoreException e) {
- exc[0] = e;
- }
- }
- });
- if (exc[0] != null)
- 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() {
- IWorkbenchWindow window = getPlugin().getWorkbench().getActiveWorkbenchWindow();
- 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() {
- return instance;
- }
- /**
- * Initializes the preferences for this plugin if necessary.
- */
- protected void initializePreferences() {
- IPreferenceStore store = getPreferenceStore();
- store.setDefault(IPreferenceIds.SYNCVIEW_VIEW_SYNCINFO_IN_LABEL, false);
- store.setDefault(IPreferenceIds.SYNCVIEW_COMPRESS_FOLDERS, true);
- 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_COMPLETE_PERSPECTIVE, MessageDialogWithToggle.PROMPT);
- store.setDefault(IPreferenceIds.SYNCVIEW_REMOVE_FROM_VIEW_NO_PROMPT, false);
- }
-
- /**
- * 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.
- * @param e
- */
- public static void log(CoreException e) {
- IStatus status = e.getStatus();
- log (status.getSeverity(), status.getMessage(), e);
- }
-
- /**
- * Log the given exception along with the provided message and severity indicator
- */
- public static void log(int severity, String message, Throwable e) {
- log(new Status(severity, ID, 0, message, e));
- }
-
- /**
- * @see Plugin#startup()
- */
- public void startup() throws CoreException {
- Policy.localize("org.eclipse.team.internal.ui.messages"); //$NON-NLS-1$
- initializePreferences();
- IAdapterFactory factory = new TeamAdapterFactory();
- Platform.getAdapterManager().registerAdapters(factory, DiffNode.class);
- ((SynchronizeManager)TeamUI.getSynchronizeManager()).init();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#shutdown()
- */
- public void shutdown() throws CoreException {
- super.shutdown();
- ((SynchronizeManager)TeamUI.getSynchronizeManager()).dispose();
- }
-
- /**
- * Register for changes made to Team properties.
- */
- public static void addPropertyChangeListener(IPropertyChangeListener listener) {
- propertyChangeListeners.add(listener);
- }
-
- /**
- * Deregister as a Team property changes.
- */
- public static void removePropertyChangeListener(IPropertyChangeListener listener) {
- propertyChangeListeners.remove(listener);
- }
-
- /**
- * Broadcast a Team property change.
- */
- public static void broadcastPropertyChange(PropertyChangeEvent event) {
- for (Iterator it = propertyChangeListeners.iterator(); it.hasNext();) {
- 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
- */
- protected static void createImageDescriptor(TeamUIPlugin plugin, String id, URL baseURL) {
- // Delegate to the plugin instance to avoid concurrent class loading problems
- plugin.privateCreateImageDescriptor(id, baseURL);
- }
- private void privateCreateImageDescriptor(String id, URL baseURL) {
- URL url = null;
- try {
- url = new URL(baseURL, ICON_PATH + id);
- } catch (MalformedURLException e) {
- }
- ImageDescriptor desc = ImageDescriptor.createFromURL(url);
- 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
- */
- public static ImageDescriptor getImageDescriptor(String id) {
- // Delegate to the plugin instance to avoid concurrent class loading problems
- return getPlugin().privateGetImageDescriptor(id);
- }
- private ImageDescriptor privateGetImageDescriptor(String id) {
- if(! imageDescriptors.containsKey(id)) {
- URL baseURL = TeamUIPlugin.getPlugin().getDescriptor().getInstallURL();
- createImageDescriptor(getPlugin(), id, baseURL);
- }
- 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
- */
- public static ImageDescriptor getImageDescriptorFromExtension(IExtension extension, String subdirectoryAndFilename) {
- IPluginDescriptor pluginDescriptor = extension.getDeclaringPluginDescriptor();
- URL path = pluginDescriptor.getInstallURL();
- URL fullPathString = null;
- try {
- fullPathString = new URL(path,subdirectoryAndFilename);
- return ImageDescriptor.createFromURL(fullPathString);
- } catch (MalformedURLException e) {
- }
- return null;
- }
- /*
- * 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.
- */
- private void initializeImages(TeamUIPlugin plugin) {
- URL baseURL = plugin.getDescriptor().getInstallURL();
-
- // Overlays
- createImageDescriptor(plugin, ISharedImages.IMG_DIRTY_OVR, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_CONFLICT_OVR, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_CHECKEDIN_OVR, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_CHECKEDOUT_OVR, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_ERROR_OVR, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_WARNING_OVR, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_HOURGLASS_OVR, baseURL);
-
- // Target Management Icons
- createImageDescriptor(plugin, ISharedImages.IMG_SITE_ELEMENT, baseURL);
-
- // Sync View Icons
- createImageDescriptor(plugin, ISharedImages.IMG_DLG_SYNC_INCOMING, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_DLG_SYNC_OUTGOING, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_DLG_SYNC_CONFLICTING, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_REFRESH, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_CHANGE_FILTER, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_IGNORE_WHITESPACE, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_CONTENTS, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_COLLAPSE_ALL, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_COLLAPSE_ALL_ENABLED, baseURL);
-
- createImageDescriptor(plugin, ISharedImages.IMG_DLG_SYNC_INCOMING_DISABLED, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_DLG_SYNC_OUTGOING_DISABLED, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_DLG_SYNC_CONFLICTING_DISABLED, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_REFRESH_DISABLED, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_IGNORE_WHITESPACE_DISABLED, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_CONTENTS_DISABLED, baseURL);
-
- createImageDescriptor(plugin, ISharedImages.IMG_DLG_SYNC_INCOMING_ENABLED, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_DLG_SYNC_OUTGOING_ENABLED, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_DLG_SYNC_CONFLICTING_ENABLED, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_REFRESH_ENABLED, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_IGNORE_WHITESPACE_ENABLED, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_CONTENTS_ENABLED, baseURL);
-
- createImageDescriptor(plugin, ISharedImages.IMG_SYNC_MODE_CATCHUP, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_SYNC_MODE_RELEASE, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_SYNC_MODE_FREE, baseURL);
-
- createImageDescriptor(plugin, ISharedImages.IMG_SYNC_MODE_CATCHUP_DISABLED, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_SYNC_MODE_RELEASE_DISABLED, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_SYNC_MODE_FREE_DISABLED, baseURL);
-
- createImageDescriptor(plugin, ISharedImages.IMG_SYNC_MODE_CATCHUP_ENABLED, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_SYNC_MODE_RELEASE_ENABLED, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_SYNC_MODE_FREE_ENABLED, baseURL);
-
- // Wizard banners
- createImageDescriptor(plugin, ISharedImages.IMG_PROJECTSET_IMPORT_BANNER, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_PROJECTSET_EXPORT_BANNER, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_WIZBAN_SHARE, baseURL);
-
- // Live Sync View icons
- createImageDescriptor(plugin, ISharedImages.IMG_COMPRESSED_FOLDER, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_SYNC_VIEW, baseURL);
- createImageDescriptor(plugin, ISharedImages.IMG_HIERARCHICAL, baseURL);
- }
-
- /**
- * 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 default display.
- */
- public static Display getStandardDisplay() {
- Display display= Display.getCurrent();
- if (display == null) {
- display= Display.getDefault();
- }
- return display;
- }
-
- public Image getImage(String key) {
- Image image = getImageRegistry().get(key);
- if(image == null) {
- ImageDescriptor d = getImageDescriptor(key);
- image = d.createImage();
- getImageRegistry().put(key, image);
- }
- return image;
- }
-
- public static void run(IRunnableWithProgress runnable) {
- try {
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().run(true, true, runnable);
- } catch (InvocationTargetException e) {
- Utils.handleError(getStandardDisplay().getActiveShell(), e, null, null);
- } catch (InterruptedException e2) {
- // Nothing to be done
- }
- }
-}
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
deleted file mode 100644
index d150c8688..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/UIProjectSetSerializationContext.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**********************************************************************
- Copyright (c) 2004 Dan Rubel and others.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Common Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/cpl-v10.html
-
- Contributors:
-
- Dan Rubel - initial API and implementation
-
- **********************************************************************/
-
-package org.eclipse.team.internal.ui;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.ProjectSetSerializationContext;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.dialogs.IPromptCondition;
-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.
- *
- * @since 3.0
- */
-public class UIProjectSetSerializationContext extends ProjectSetSerializationContext {
-
- /**
- * The parent shell for this UI context
- */
- private final Shell shell;
-
- /**
- * Construct a new instance
- *
- * @param shell The parent shell for this UI context
- */
- public UIProjectSetSerializationContext(Shell shell) {
- Assert.isNotNull(shell);
- this.shell = shell;
- }
-
- /**
- * Answer the shell associated with this UI context.
- *
- * @return the shell (not <code>null</code>)
- */
- 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.
- * <p>
- * This default implementation prompts the user
- * to determine which projects should be overwritten.
- * Subclasses may override this as appropriate.
- *
- * @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[])
- */
- public IProject[] confirmOverwrite(final IProject[] projects) throws TeamException {
- IPromptCondition prompt = new IPromptCondition() {
- List resources = Arrays.asList(projects);
- public boolean needsPrompt(IResource resource) {
- return resources.contains(resource);
- }
- public String promptMessage(IResource resource) {
- return "Overwrite " + resource.getName();
- }
- };
- PromptingDialog dialog =
- new PromptingDialog(
- (Shell)getShell(),
- projects,
- prompt,
- "Overwrite projects?");
- IResource[] resourcesToOverwrite;
- try {
- resourcesToOverwrite = dialog.promptForMultiple();
- } catch (InterruptedException e) {
- // Return null indicating that the user canceled the operation
- return null;
- }
- IProject[] projectsToOverwrite = new IProject[resourcesToOverwrite.length];
- System.arraycopy(resourcesToOverwrite, 0, projectsToOverwrite, 0, resourcesToOverwrite.length);
- return projectsToOverwrite;
- }
-
-}
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
deleted file mode 100644
index feb055bbd..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
+++ /dev/null
@@ -1,574 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.ResourceBundle;
-import java.util.Set;
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.*;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchPartSite;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
-
-public class Utils {
-
- /**
- * The SortOperation takes a collection of objects and returns a sorted
- * collection of these objects. Concrete instances of this class provide
- * the criteria for the sorting of the objects based on the type of the
- * objects.
- */
- static public abstract class Sorter {
-
- /**
- * Returns true is elementTwo is 'greater than' elementOne This is the
- * 'ordering' method of the sort operation. Each subclass overides this
- * method with the particular implementation of the 'greater than'
- * concept for the objects being sorted.
- */
- public abstract boolean compare(Object elementOne, Object elementTwo);
-
- /**
- * Sort the objects in sorted collection and return that collection.
- */
- private Object[] quickSort(Object[] sortedCollection, int left, int right) {
- int originalLeft = left;
- int originalRight = right;
- Object mid = sortedCollection[(left + right) / 2];
- do {
- while (compare(sortedCollection[left], mid))
- left++;
- while (compare(mid, sortedCollection[right]))
- right--;
- if (left <= right) {
- Object tmp = sortedCollection[left];
- sortedCollection[left] = sortedCollection[right];
- sortedCollection[right] = tmp;
- left++;
- right--;
- }
- } while (left <= right);
- if (originalLeft < right)
- sortedCollection = quickSort(sortedCollection, originalLeft, right);
- if (left < originalRight)
- sortedCollection = quickSort(sortedCollection, left, originalRight);
- return sortedCollection;
- }
-
- /**
- * Return a new sorted collection from this unsorted collection. Sort
- * using quick sort.
- */
- public Object[] sort(Object[] unSortedCollection) {
- int size = unSortedCollection.length;
- Object[] sortedCollection = new Object[size];
- //copy the array so can return a new sorted collection
- System.arraycopy(unSortedCollection, 0, sortedCollection, 0, size);
- if (size > 1)
- quickSort(sortedCollection, 0, size - 1);
- return sortedCollection;
- }
- }
-
- public static final Comparator resourceComparator = new Comparator() {
- public boolean equals(Object obj) {
- return false;
- }
- public int compare(Object o1, Object o2) {
- IResource resource0 = (IResource) o1;
- IResource resource1 = (IResource) o2;
- return resource0.getFullPath().toString().compareTo(resource1.getFullPath().toString());
- }
- };
-
- /**
- * Shows the given errors to the user.
- * @param Exception
- * the exception containing the error
- * @param title
- * the title of the error dialog
- * @param message
- * the message for the error dialog
- * @param shell
- * the shell to open the error dialog in
- */
- public static void handleError(Shell shell, Exception exception, String title, String message) {
- IStatus status = null;
- boolean log = false;
- boolean dialog = false;
- Throwable t = exception;
- if (exception instanceof TeamException) {
- status = ((TeamException) exception).getStatus();
- log = false;
- dialog = true;
- } else if (exception instanceof InvocationTargetException) {
- t = ((InvocationTargetException) exception).getTargetException();
- if (t instanceof TeamException) {
- status = ((TeamException) t).getStatus();
- log = false;
- dialog = true;
- } else if (t instanceof CoreException) {
- status = ((CoreException) t).getStatus();
- log = true;
- dialog = true;
- } else if (t instanceof InterruptedException) {
- return;
- } else {
- status = new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, Policy.bind("TeamAction.internal"), t); //$NON-NLS-1$
- log = true;
- dialog = true;
- }
- }
- if (status == null)
- return;
- if (!status.isOK()) {
- IStatus toShow = status;
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- if (children.length == 1) {
- toShow = children[0];
- }
- }
- if (title == null) {
- title = status.getMessage();
- }
- if (message == null) {
- message = status.getMessage();
- }
- if (dialog && shell != null) {
- ErrorDialog.openError(shell, title, message, toShow);
- }
- if (log || shell == null) {
- TeamUIPlugin.log(toShow.getSeverity(), message, t);
- }
- }
- }
-
- public static void runWithProgress(Shell parent, boolean cancelable, final IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
- boolean createdShell = false;
- try {
- if (parent == null || parent.isDisposed()) {
- Display display = Display.getCurrent();
- if (display == null) {
- // cannot provide progress (not in UI thread)
- runnable.run(new NullProgressMonitor());
- return;
- }
- // get the active shell or a suitable top-level shell
- parent = display.getActiveShell();
- if (parent == null) {
- parent = new Shell(display);
- createdShell = true;
- }
- }
- // pop up progress dialog after a short delay
- final Exception[] holder = new Exception[1];
- BusyIndicator.showWhile(parent.getDisplay(), new Runnable() {
-
- public void run() {
- try {
- runnable.run(new NullProgressMonitor());
- } catch (InvocationTargetException e) {
- holder[0] = e;
- } catch (InterruptedException e) {
- holder[0] = e;
- }
- }
- });
- if (holder[0] != null) {
- if (holder[0] instanceof InvocationTargetException) {
- throw (InvocationTargetException) holder[0];
- } else {
- throw (InterruptedException) holder[0];
- }
- }
- //new TimeoutProgressMonitorDialog(parent, TIMEOUT).run(true
- // /*fork*/, cancelable, runnable);
- } finally {
- if (createdShell)
- parent.dispose();
- }
- }
-
- /**
- * Creates a progress monitor and runs the specified runnable.
- * @param parent
- * the parent Shell for the dialog
- * @param cancelable
- * if true, the dialog will support cancelation
- * @param runnable
- * the runnable
- * @exception InvocationTargetException
- * when an exception is thrown from the runnable
- * @exception InterruptedException
- * when the progress monitor is cancelled
- */
- public static void runWithProgressDialog(Shell parent, boolean cancelable, final IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
- new ProgressMonitorDialog(parent).run(cancelable, cancelable, runnable);
- }
-
- public static Shell getShell(IWorkbenchSite site) {
- if(site != null) {
- Shell shell = site.getShell();
- if (!shell.isDisposed())
- return shell;
- }
- IWorkbench workbench = TeamUIPlugin.getPlugin().getWorkbench();
- if (workbench != null) {
- IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
- if (window != null) {
- return window.getShell();
- }
- }
- // Fallback to using the display
- Display display = Display.getDefault();
- if (display.isDisposed()) return null;
- return new Shell(display);
- }
- /*
- * This method is only for use by the Target Management feature (see bug
- * 16509). @param t
- */
- public static void handle(Throwable t) {
- IStatus error = null;
- if (t instanceof InvocationTargetException) {
- t = ((InvocationTargetException) t).getTargetException();
- }
- if (t instanceof CoreException) {
- error = ((CoreException) t).getStatus();
- } else if (t instanceof TeamException) {
- error = ((TeamException) t).getStatus();
- } else {
- error = new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, Policy.bind("simpleInternal"), t); //$NON-NLS-1$
- }
- Shell shell = new Shell(Display.getDefault());
- if (error.getSeverity() == IStatus.INFO) {
- MessageDialog.openInformation(shell, Policy.bind("information"), error.getMessage()); //$NON-NLS-1$
- } else {
- ErrorDialog.openError(shell, Policy.bind("exception"), null, error); //$NON-NLS-1$
- }
- shell.dispose();
- // Let's log non-team exceptions
- if (!(t instanceof TeamException)) {
- TeamUIPlugin.log(error.getSeverity(), error.getMessage(), t);
- }
- }
-
- public static Shell findShell() {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if(window != null) {
- return window.getShell();
- }
- Display display= Display.getCurrent();
- if (display == null) {
- display= Display.getDefault();
- return display.getActiveShell();
- }
- // worst case, just create our own.
- return new Shell(TeamUIPlugin.getStandardDisplay());
- }
-
- public static IWorkbenchPartSite findSite(Control c) {
- while (c != null && !c.isDisposed()) {
- Object data = c.getData();
- if (data instanceof IWorkbenchPart)
- return ((IWorkbenchPart) data).getSite();
- c = c.getParent();
- }
- return null;
- }
-
- public static IWorkbenchPartSite findSite() {
- IWorkbench workbench = TeamUIPlugin.getPlugin().getWorkbench();
- IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
- if (window != null) {
- IWorkbenchPage page = window.getActivePage();
- if (page != null) {
- IWorkbenchPart part = page.getActivePart();
- if (part != null)
- return part.getSite();
- }
- }
- return null;
- }
-
- public static void initAction(IAction a, String prefix) {
- Utils.initAction(a, prefix, Policy.bundle);
- }
-
- public static void updateLabels(SyncInfo sync, CompareConfiguration config) {
- final IResourceVariant remote = sync.getRemote();
- final IResourceVariant base = sync.getBase();
- String localContentId = sync.getLocalContentIdentifier();
- if (localContentId != null) {
- config.setLeftLabel(Policy.bind("SyncInfoCompareInput.localLabelExists", localContentId)); //$NON-NLS-1$
- } else {
- config.setLeftLabel(Policy.bind("SyncInfoCompareInput.localLabel")); //$NON-NLS-1$
- }
- if (remote != null) {
- config.setRightLabel(Policy.bind("SyncInfoCompareInput.remoteLabelExists", remote.getContentIdentifier())); //$NON-NLS-1$
- } else {
- config.setRightLabel(Policy.bind("SyncInfoCompareInput.remoteLabel")); //$NON-NLS-1$
- }
- if (base != null) {
- config.setAncestorLabel(Policy.bind("SyncInfoCompareInput.baseLabelExists", base.getContentIdentifier())); //$NON-NLS-1$
- } else {
- config.setAncestorLabel(Policy.bind("SyncInfoCompareInput.baseLabel")); //$NON-NLS-1$
- }
- }
-
- /**
- * Initialize the given Action from a ResourceBundle.
- */
- public static void initAction(IAction a, String prefix, ResourceBundle bundle) {
- String labelKey = "label"; //$NON-NLS-1$
- String tooltipKey = "tooltip"; //$NON-NLS-1$
- String imageKey = "image"; //$NON-NLS-1$
- String descriptionKey = "description"; //$NON-NLS-1$
- if (prefix != null && prefix.length() > 0) {
- labelKey = prefix + labelKey;
- tooltipKey = prefix + tooltipKey;
- imageKey = prefix + imageKey;
- descriptionKey = prefix + descriptionKey;
- }
- String s = Policy.bind(labelKey, bundle);
- if (s != null)
- a.setText(s);
- s = Policy.bind(tooltipKey, bundle);
- if (s != null)
- a.setToolTipText(s);
- s = Policy.bind(descriptionKey, bundle);
- if (s != null)
- a.setDescription(s);
- String relPath = Policy.bind(imageKey, bundle);
- if (relPath != null && !relPath.equals(imageKey) && relPath.trim().length() > 0) {
- String cPath;
- String dPath;
- String ePath;
- if (relPath.indexOf("/") >= 0) { //$NON-NLS-1$
- String path = relPath.substring(1);
- dPath = 'd' + path;
- ePath = 'e' + path;
- } else {
- dPath = "dlcl16/" + relPath; //$NON-NLS-1$
- ePath = "elcl16/" + relPath; //$NON-NLS-1$
- }
- ImageDescriptor id = TeamImages.getImageDescriptor(dPath);
- if (id != null)
- a.setDisabledImageDescriptor(id);
- id = TeamUIPlugin.getImageDescriptor(ePath);
- if (id != null)
- a.setImageDescriptor(id);
- }
- }
-
- public static String modeToString(int mode) {
- switch (mode) {
- case ISynchronizePageConfiguration.INCOMING_MODE :
- return Policy.bind("Utils.22"); //$NON-NLS-1$
- case ISynchronizePageConfiguration.OUTGOING_MODE :
- return Policy.bind("Utils.23"); //$NON-NLS-1$
- case ISynchronizePageConfiguration.BOTH_MODE :
- return Policy.bind("Utils.24"); //$NON-NLS-1$
- case ISynchronizePageConfiguration.CONFLICTING_MODE :
- return Policy.bind("Utils.25"); //$NON-NLS-1$
- }
- return Policy.bind("Utils.26"); //$NON-NLS-1$
- }
-
- public static String workingSetToString(IWorkingSet set, int maxLength) {
- String text = Policy.bind("StatisticsPanel.noWorkingSet"); //$NON-NLS-1$
- if (set != null) {
- text = set.getName();
- if (text.length() > maxLength) {
- text = text.substring(0, maxLength - 3) + "..."; //$NON-NLS-1$
- }
- }
- return text;
- }
-
- /**
- * Returns the list of resources contained in the given elements.
- * @param elements
- * @return the list of resources contained in the given elements.
- */
- public static IResource[] getResources(Object[] elements) {
- List resources = new ArrayList();
- for (int i = 0; i < elements.length; i++) {
- Object element = elements[i];
- IResource resource = null;
- if (element instanceof IResource) {
- resource = (IResource)element;
- } else if (element instanceof ISynchronizeModelElement){
- resource = ((ISynchronizeModelElement) element).getResource();
- } else {
- resource = (IResource)getAdapter(element, IResource.class);
- if(resource != null && resource.getType() == IResource.ROOT) continue;
- }
- if (resource != null) {
- resources.add(resource);
- }
- }
- return (IResource[]) resources.toArray(new IResource[resources.size()]);
- }
-
- public static Object getAdapter(Object element, Class adapter) {
- if (element instanceof IAdaptable) {
- return ((IAdaptable) element).getAdapter(adapter);
- }
- return null;
- }
-
- /**
- * This method returns all out-of-sync SyncInfos that are in the current
- * selection.
- *
- * @return the list of selected sync infos
- */
- public static IDiffElement[] getDiffNodes(Object[] selected) {
- Set result = new HashSet();
- for (int i = 0; i < selected.length; i++) {
- Object object = selected[i];
- if(object instanceof IDiffElement) {
- collectAllNodes((IDiffElement)object, result);
- }
- }
- 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);
- }
- if(element instanceof IDiffContainer) {
- IDiffElement[] children = ((IDiffContainer)element).getChildren();
- for (int i = 0; i < children.length; i++) {
- collectAllNodes(children[i], nodes);
- }
- }
- }
-
- public static void schedule(Job job, IWorkbenchSite site) {
- if (site != null) {
- IWorkbenchSiteProgressService siteProgress = (IWorkbenchSiteProgressService) site.getAdapter(IWorkbenchSiteProgressService.class);
- if (siteProgress != null) {
- siteProgress.schedule(job, 0, true /* use half-busy cursor */);
- return;
- }
- }
- job.schedule();
- }
-
- public static byte[] readBytes(InputStream in) {
- ByteArrayOutputStream bos= new ByteArrayOutputStream();
- try {
- while (true) {
- int c= in.read();
- if (c == -1)
- break;
- bos.write(c);
- }
-
- } catch (IOException ex) {
- return null;
-
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch (IOException x) {
- // silently ignored
- }
- }
- try {
- bos.close();
- } catch (IOException x) {
- // silently ignored
- }
- }
- 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;
- return o1.equals(o2);
- }
-
- public static String getKey(String id, String secondaryId) {
- return secondaryId == null ? id : id + '/' + secondaryId;
- }
-
- public static String stripAmpersand(String string) {
- if( string.indexOf('&') != -1) {
- StringBuffer buffer = new StringBuffer(string);
- char last = 'x';
- for (int i = string.length()-1; i > -1; i--) {
- char c = string.charAt(i);
- if(c == '&') {
- buffer.deleteCharAt(i);
- break;
- }
- }
- return buffer.toString();
- }
- return string;
- }
-
- public static String convertSelection(IResource[] resources, int numElements) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < resources.length && i < numElements; i++) {
- IResource resource = resources[i];
- if(i > 0) buffer.append(", ");
- buffer.append(resource.getFullPath());
- }
- if(numElements < resources.length) buffer.append("...");
- return buffer.toString();
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 2ec58ed3b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ConfigureProjectAction.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.actions;
-
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.wizards.ConfigureProjectWizard;
-
-/**
- * Action for configuring a project. Configuring involves associating
- * the project with a Team provider and performing any provider-specific
- * configuration that is necessary.
- */
-public class ConfigureProjectAction extends TeamAction {
- private static class ResizeWizardDialog extends WizardDialog {
- public ResizeWizardDialog(Shell parentShell, IWizard newWizard) {
- super(parentShell, newWizard);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- }
- }
-
- /*
- * Method declared on IActionDelegate.
- */
- public void run(IAction action) {
- run(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- IProject project = getSelectedProjects()[0];
- ConfigureProjectWizard wizard = new ConfigureProjectWizard();
- wizard.init(null, project);
- WizardDialog dialog = new ResizeWizardDialog(getShell(), wizard);
- //dialog.
- dialog.open();
- } catch (Exception e) {
- throw new InvocationTargetException(e);
- }
- }
- }, Policy.bind("ConfigureProjectAction.configureProject"), PROGRESS_BUSYCURSOR); //$NON-NLS-1$
- }
- /**
- * @see TeamAction#isEnabled()
- */
- protected boolean isEnabled() {
- IProject[] selectedProjects = getSelectedProjects();
- if (selectedProjects.length != 1) return false;
- if (!selectedProjects[0].isAccessible()) return false;
- if (!RepositoryProvider.isShared(selectedProjects[0])) return true;
- return false;
- }
-}
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
deleted file mode 100644
index 184b68241..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ITeamRunnableContext.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * An ITeamRunnableContext is used to provide the context for a Team operation.
- * The hierarchy of contexts is used to configure the following:
- * 1) whether the operation is run in the background as a job
- * 2) whether the operation modifies the workspace
- * 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
- * override this to provide progress in some other way (Progress Monitor or
- * job).
- */
- public abstract void run(IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException;
-
- /**
- * Get a shell that can be used to prompt the user.
- * @return a shell
- */
- public abstract Shell getShell();
-} \ No newline at end of file
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
deleted file mode 100644
index 5da78972b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/JobRunnableContext.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-import org.eclipse.core.resources.WorkspaceJob;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.progress.IProgressConstants;
-
-/**
- * This runnable context executes it's operation in the context of a background job.
- */
-public final class JobRunnableContext implements ITeamRunnableContext {
-
- private IJobChangeListener listener;
- private IWorkbenchSite site;
- private String jobName;
- private ISchedulingRule schedulingRule;
- private boolean postponeBuild;
- private boolean isUser;
- private URL icon;
- private boolean keep;
- private IAction gotoAction;
-
- public JobRunnableContext(String jobName) {
- this(jobName, null, null, false, null, null);
- }
-
- public JobRunnableContext(String jobName, URL icon, IAction action, boolean keep, IJobChangeListener listener, IWorkbenchSite site) {
- this.jobName = jobName;
- this.listener = listener;
- this.site = site;
- // By default team actions are user initiated.
- this.isUser = true;
- this.gotoAction = action;
- this.icon = icon;
- this.keep = keep;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.ITeamRunnableContext#run(java.lang.String, boolean, org.eclipse.jface.operation.IRunnableWithProgress)
- */
- public void run(IRunnableWithProgress runnable) {
- Job job;
- if (schedulingRule == null && !postponeBuild) {
- job = getBasicJob(runnable);
- } else {
- job = getWorkspaceJob(runnable);
- if (schedulingRule != null) {
- job.setRule(schedulingRule);
- }
- }
- if (listener != null) {
- job.addJobChangeListener(listener);
- }
- job.setUser(isUser());
- configureJob(job);
- Utils.schedule(job, site);
- }
-
- private void configureJob(Job job) {
- if(keep)
- job.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
- if(gotoAction != null)
- job.setProperty(IProgressConstants.ACTION_PROPERTY, gotoAction);
- if(icon != null)
- job.setProperty(IProgressConstants.ICON_PROPERTY, icon);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.ITeamRunnableContext#getShell()
- */
- public Shell getShell() {
- final Shell[] newShell = new Shell[] { null };
- Display.getDefault().syncExec(
- new Runnable() {
- public void run() {
- newShell[0] = Utils.getShell(site);
- }
- });
- return newShell[0];
- }
-
- /**
- * Returns whether the auto-build will be postponed while this
- * context is executing a runnable.
- * @return whether the auto-build will be postponed while this
- * context is executing a runnable.
- */
- public boolean isPostponeBuild() {
- return postponeBuild;
- }
-
- /**
- * Set whether the auto-build will be postponed while this
- * context is executing a runnable.
- * @param postponeBuild whether to postpone the auto-build.
- */
- public void setPostponeBuild(boolean postponeBuild) {
- this.postponeBuild = postponeBuild;
- }
-
- /**
- * Return 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.
- * @return the schedulingRule to be obtained or <code>null</code>.
- */
- public ISchedulingRule getSchedulingRule() {
- return schedulingRule;
- }
-
- /**
- * Return whether this job context is user initiated.
- * @param boolean <code>true</code> if the job is a result of a user initiated actions
- * and <code>false</code> otherwise.
- */
- public boolean isUser() {
- return isUser;
- }
-
- /**
- * Set wheter the job is user initiated. By default the job created by this runnable context
- * is a user job.
- * @param isUser <code>true</code> if the job is a result of a user initiated actions
- * and <code>false</code> otherwise.
- */
- public void setUser(boolean isUser) {
- this.isUser = isUser;
- }
-
- /**
- * 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.
- * @param schedulingRule The schedulingRule to be obtained or <code>null</code>.
- */
- public void setSchedulingRule(ISchedulingRule schedulingRule) {
- this.schedulingRule = schedulingRule;
- }
-
- /* private */ IStatus run(IRunnableWithProgress runnable, IProgressMonitor monitor) {
- try {
- runnable.run(monitor);
- } catch (InvocationTargetException e) {
- return TeamException.asTeamException(e).getStatus();
- } catch (InterruptedException e) {
- return Status.OK_STATUS;
- }
- return Status.OK_STATUS;
- }
-
- private Job getBasicJob(final IRunnableWithProgress runnable) {
- return new Job(jobName) {
- public IStatus run(IProgressMonitor monitor) {
- return JobRunnableContext.this.run(runnable, monitor);
- }
- };
- }
-
- private Job getWorkspaceJob(final IRunnableWithProgress runnable) {
- return new WorkspaceJob(jobName) {
- public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
- return JobRunnableContext.this.run(runnable, monitor);
- }
- };
- }
-}
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
deleted file mode 100644
index 0896533b1..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ProgressDialogRunnableContext.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressService;
-
-/**
- * This CVS runnable context blocks the UI and can therfore have a shell assigned to
- * it (since the shell won't be closed by the user before the runnable completes.
- */
-public class ProgressDialogRunnableContext implements ITeamRunnableContext {
-
- private Shell shell;
- private IRunnableContext runnableContext;
- private ISchedulingRule schedulingRule;
- private boolean postponeBuild;
-
- public ProgressDialogRunnableContext(Shell shell) {
- this.shell = shell;
- }
-
- /**
- * Returns whether the auto-build will be postponed while this
- * context is executing a runnable.
- * @return whether the auto-build will be postponed while this
- * context is executing a runnable.
- */
- public boolean isPostponeBuild() {
- return postponeBuild;
- }
-
- /**
- * Set whether the auto-build will be postponed while this
- * context is executing a runnable.
- * @param postponeBuild whether to postpone the auto-build.
- */
- public void setPostponeBuild(boolean postponeBuild) {
- this.postponeBuild = postponeBuild;
- }
-
- /**
- * Return 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.
- * @return the schedulingRule to be obtained or <code>null</code>.
- */
- public ISchedulingRule getSchedulingRule() {
- return schedulingRule;
- }
-
- /**
- * 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.
- * @param schedulingRule The schedulingRule to be obtained or <code>null</code>.
- */
- public void setSchedulingRule(ISchedulingRule schedulingRule) {
- this.schedulingRule = schedulingRule;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ccvs.ui.operations.CVSRunnableContext#getShell()
- */
- public Shell getShell() {
- return shell;
- }
-
- /**
- * Set the runnable context that is used to execute the runnable. By default,
- * the workbench's progress service is used by clients can provide their own.
- * @param runnableContext the runnable contentx used to execute runnables.
- */
- public void setRunnableContext(IRunnableContext runnableContext) {
- this.runnableContext = runnableContext;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.actions.ITeamRunnableContext#run(org.eclipse.jface.operation.IRunnableWithProgress)
- */
- public void run(IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
- getRunnableContext().run(true /* fork */, true /* cancelable */, wrapRunnable(runnable));
- }
-
- private IRunnableContext getRunnableContext() {
- if (runnableContext == null) {
- return new IRunnableContext() {
- public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable)
- throws InvocationTargetException, InterruptedException {
- IProgressService manager = PlatformUI.getWorkbench().getProgressService();
- manager.busyCursorWhile(runnable);
- }
- };
- }
- return runnableContext;
- }
-
- /*
- * Return an IRunnableWithProgress that sets the task name for the progress monitor
- * and runs in a workspace modify operation if requested.
- */
- private IRunnableWithProgress wrapRunnable(final IRunnableWithProgress runnable) {
- return new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- if (schedulingRule == null && !postponeBuild) {
- runnable.run(monitor);
- } else {
- final Exception[] exception = new Exception[] { null };
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor pm) throws CoreException {
- try {
- runnable.run(pm);
- } catch (InvocationTargetException e) {
- exception[0] = e;
- } catch (InterruptedException e) {
- exception[0] = e;
- }
- }
- }, schedulingRule, 0 /* allow updates */, monitor);
- if (exception[0] != null) {
- if (exception[0] instanceof InvocationTargetException) {
- throw (InvocationTargetException)exception[0];
- } else if (exception[0] instanceof InterruptedException) {
- throw (InterruptedException)exception[0];
- }
- }
- }
- } catch (CoreException e) {
- throw new InvocationTargetException(e);
- }
- }
- };
- }
-
-}
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
deleted file mode 100644
index 706fe6d96..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
+++ /dev/null
@@ -1,362 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.actions;
-
-
-import java.lang.reflect.Array;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.core.TeamPlugin;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionDelegate;
-
-/**
- * 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
- * subclasses of TeamAction provided in this package.
- */
-public abstract class TeamAction extends ActionDelegate implements IObjectActionDelegate, IViewActionDelegate {
- // The current selection
- protected IStructuredSelection selection;
-
- // The shell, required for the progress dialog
- protected Shell shell;
-
- // Constants for determining the type of progress. Subclasses may
- // pass one of these values to the run method.
- public final static int PROGRESS_DIALOG = 1;
- public final static int PROGRESS_BUSYCURSOR = 2;
- public final static int PROGRESS_WORKBENCH_WINDOW = 3;
-
- private IWorkbenchPart targetPart;
-
- /**
- * 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
- */
- public static Object[] getSelectedAdaptables(ISelection selection, Class c) {
- ArrayList result = null;
- if (!selection.isEmpty()) {
- result = new ArrayList();
- Iterator elements = ((IStructuredSelection) selection).iterator();
- while (elements.hasNext()) {
- Object adapter = getAdapter(elements.next(), c);
- if (c.isInstance(adapter)) {
- result.add(adapter);
- }
- }
- }
- if (result != null && !result.isEmpty()) {
- return (Object[])result.toArray((Object[])Array.newInstance(c, result.size()));
- }
- 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 selection
- * @param c
- * @return Object
- */
- public static Object getAdapter(Object adaptable, Class c) {
- if (c.isInstance(adaptable)) {
- return adaptable;
- }
- if (adaptable instanceof IAdaptable) {
- IAdaptable a = (IAdaptable) adaptable;
- Object adapter = a.getAdapter(c);
- if (c.isInstance(adapter)) {
- return adapter;
- }
- }
- return null;
- }
-
- /**
- * Returns the selected projects.
- *
- * @return the selected projects
- */
- protected IProject[] getSelectedProjects() {
- IResource[] selectedResources = getSelectedResources();
- if (selectedResources.length == 0) return new IProject[0];
- ArrayList projects = new ArrayList();
- for (int i = 0; i < selectedResources.length; i++) {
- IResource resource = selectedResources[i];
- if (resource.getType() == IResource.PROJECT) {
- projects.add(resource);
- }
- }
- 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
- */
- protected Object[] getSelectedResources(Class c) {
- return getSelectedAdaptables(selection, c);
- }
-
- /**
- * Returns the selected resources.
- *
- * @return the selected resources
- */
- protected IResource[] getSelectedResources() {
- return (IResource[])getSelectedResources(IResource.class);
- }
-
- /**
- * Convenience method for getting the current shell.
- *
- * @return the shell
- */
- protected Shell getShell() {
- if (shell != null) {
- return shell;
- } else {
- IWorkbench workbench = TeamUIPlugin.getPlugin().getWorkbench();
- if (workbench == null) return null;
- IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
- if (window == null) return null;
- return window.getShell();
- }
- }
- /**
- * 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
- */
- final protected void run(final IRunnableWithProgress runnable, final String problemMessage, int progressKind) {
- final Exception[] exceptions = new Exception[] {null};
- switch (progressKind) {
- case PROGRESS_WORKBENCH_WINDOW :
- try {
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().run(true, true, runnable);
- } catch (InterruptedException e1) {
- exceptions[0] = null;
- e1.printStackTrace();
- } catch (InvocationTargetException e) {
- exceptions[0] = e;
- }
- break;
- case PROGRESS_BUSYCURSOR :
- BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
- public void run() {
- try {
- runnable.run(new NullProgressMonitor());
- } catch (InvocationTargetException e) {
- exceptions[0] = e;
- } catch (InterruptedException e) {
- exceptions[0] = null;
- }
- }
- });
- break;
- default :
- case PROGRESS_DIALOG :
- try {
- new ProgressMonitorDialog(getShell()).run(true, true, runnable);
- } catch (InvocationTargetException e) {
- exceptions[0] = e;
- } catch (InterruptedException e) {
- exceptions[0] = null;
- }
- break;
- }
- if (exceptions[0] != null) {
- handle(exceptions[0], null, problemMessage);
- }
- }
-
- /*
- * Method declared on IActionDelegate.
- */
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- this.selection = (IStructuredSelection) selection;
- if (action != null) {
- setActionEnablement(action);
- }
- }
- }
-
- /**
- * 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) {
- try {
- action.setEnabled(isEnabled());
- } catch (TeamException e) {
- if (e.getStatus().getCode() == IResourceStatus.OUT_OF_SYNC_LOCAL) {
- // Enable the action to allow the user to discover the problem
- action.setEnabled(true);
- } else {
- action.setEnabled(false);
- // We should not open a dialog when determining menu enablements so log it instead
- TeamPlugin.log(e);
- }
- }
- }
-
- /*
- * Method declared on IObjectActionDelegate.
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- if(targetPart != null) {
- this.shell = targetPart.getSite().getShell();
- this.targetPart = targetPart;
- }
- }
- /**
- * Shows the given errors to the user.
- *
- * @param status the status containing the error
- * @param title the title of the error dialog
- * @param message the message for the error dialog
- * @param shell the shell to open the error dialog in
- */
- protected void handle(Exception exception, String title, String message) {
- Utils.handleError(getShell(), exception, title, message);
- }
-
- /**
- * Concrete action enablement code.
- * Subclasses must implement.
- *
- * @return whether the action is enabled
- * @throws TeamException if an error occurs during enablement detection
- */
- abstract protected boolean isEnabled() throws TeamException;
-
- /**
- * Convenience method that maps the selected 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 selected resources
- */
- protected Hashtable getProviderMapping() {
- return getProviderMapping(getSelectedResources());
- }
- /**
- * 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) {
- Hashtable result = new Hashtable();
- for (int i = 0; i < resources.length; i++) {
- RepositoryProvider provider = RepositoryProvider.getProvider(resources[i].getProject());
- List list = (List)result.get(provider);
- if (list == null) {
- list = new ArrayList();
- result.put(provider, list);
- }
- list.add(resources[i]);
- }
- return result;
- }
-
- /**
- * @return IWorkbenchPart
- */
- protected IWorkbenchPart getTargetPart() {
- return targetPart;
- }
-
- /**
- * Return the path that was active when the menu item was selected.
- * @return IWorkbenchPage
- */
- protected IWorkbenchPage getTargetPage() {
- 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
- */
- protected IViewPart showView(String viewId) {
- try {
- return getTargetPage().showView(viewId);
- } catch (PartInitException pe) {
- return null;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- targetPart = view;
- }
-}
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
deleted file mode 100644
index 3d8ac1177..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java
+++ /dev/null
@@ -1,310 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.dialogs;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * A simple superclass for detail button dialogs.
- */
-abstract public class DetailsDialog extends Dialog {
- /**
- * The Details button.
- */
- private Button detailsButton;
-
- /**
- * The Ok button.
- */
- private Button okButton;
-
- /**
- * The title of the dialog.
- */
- private String title;
-
- /**
- * The error message
- */
- private Label errorMessageLabel;
-
- /**
- * The SWT list control that displays the error details.
- */
- private Composite detailsComposite;
-
- /**
- * 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)
- * until it is told to open.
- *
- * @param parentShell the shell under which to create this dialog
- * @param dialogTitle the title to use for this dialog
- * @param message the message to show in this dialog
- * @param status the error to show to the user
- * @param displayMask the mask to use to filter the displaying of child items,
- * as per <code>IStatus.matches</code>
- * @see org.eclipse.core.runtime.IStatus#matches
- */
- public DetailsDialog(Shell parentShell, String dialogTitle) {
- super(parentShell);
- this.title = dialogTitle;
- setShellStyle(SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- * Handles the pressing of the Ok or Details button in this dialog.
- * If the Ok button was pressed then close this dialog. If the Details
- * button was pressed then toggle the displaying of the error details area.
- * Note that the Details button will only be visible if the error being
- * displayed specifies child details.
- */
- protected void buttonPressed(int id) {
- if (id == IDialogConstants.DETAILS_ID) { // was the details button pressed?
- toggleDetailsArea();
- } else {
- super.buttonPressed(id);
- }
- }
-
- /* (non-Javadoc)
- * Method declared in Window.
- */
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText(title);
- }
-
- /* (non-Javadoc)
- * Method declared on Dialog.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- // create OK and Details buttons
- if(includeOkButton()) {
- okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- }
- if (includeCancelButton()) {
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
- if(includeDetailsButton()) {
- detailsButton = createButton(parent, IDialogConstants.DETAILS_ID, getDetailsButtonLabelShow(), false);
- }
- updateEnablements();
- }
-
- 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
- * of the dialog (above the button bar).
- */
- final protected Control createDialogArea(Composite parent) {
- // create composite
- Composite composite = (Composite)super.createDialogArea(parent);
-
- // create image
- String key = getImageKey();
- Image image = null;
- if (key != null) {
- image = JFaceResources.getImageRegistry().get(key);
- }
- if (image != null) {
- // create a composite to split the dialog area in two
- Composite top = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.verticalSpacing = 0;
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- 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());
- label.setImage(image);
- 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();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- right.setLayout(layout);
- right.setLayoutData(new GridData(GridData.FILL_BOTH));
- createMainDialogArea(right);
- } else {
- createMainDialogArea(composite);
- }
-
- if(includeErrorMessage()) {
- errorMessageLabel = new Label(composite, SWT.NONE);
- errorMessageLabel.setLayoutData(new GridData(
- GridData.GRAB_HORIZONTAL |
- GridData.HORIZONTAL_ALIGN_FILL));
- errorMessageLabel.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_RED));
- }
-
- Dialog.applyDialogFont(parent);
- return composite;
- }
-
- /**
- * Creates the dialog's top composite
- *
- * @param parent the parent composite
- */
- abstract protected void createMainDialogArea(Composite parent);
-
- /**
- * Create this dialog's drop-down list component.
- *
- * @param parent the parent composite
- * @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.
- */
- private void toggleDetailsArea() {
- Point windowSize = getShell().getSize();
- Point oldSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- if (detailsCreated) {
- detailsComposite.dispose();
- detailsCreated = false;
- detailsButton.setText(getDetailsButtonLabelShow());
- } else {
- detailsComposite = createDropDownDialogArea((Composite)getContents());
- detailsCreated = true;
- detailsButton.setText(getDetailsButtonLabelHide());
- }
- 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) {
- errorMessageLabel.setText(""); //$NON-NLS-1$
- } else {
- errorMessageLabel.setText(error);
- }
- 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
- */
- protected String getImageKey() {
- return imageKey;
- }
-
-
- /**
- * Sets the imageKey.
- * @param imageKey The imageKey to set
- */
- protected void setImageKey(String imageKey) {
- this.imageKey = imageKey;
- }
-
- protected static final int LABEL_WIDTH_HINT = 400;
- protected Label createWrappingLabel(Composite parent, String text) {
- Label label = new Label(parent, SWT.LEFT | SWT.WRAP);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = 1;
- data.horizontalAlignment = GridData.FILL;
- data.horizontalIndent = 0;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = LABEL_WIDTH_HINT;
- label.setLayoutData(data);
- return label;
- }
-
- protected Composite createComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- 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
deleted file mode 100644
index 30dcc23c6..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialogWithProjects.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.dialogs;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-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;
- private org.eclipse.swt.widgets.List detailsList;
-
- private boolean includeCancelButton;
-
- /**
- * Constructor for DetailsDialogWithProjects.
- * @param parentShell
- * @param dialogTitle
- */
- public DetailsDialogWithProjects(Shell parentShell, String dialogTitle, String dialogMessage, String detailsTitle, IProject[] projects, boolean includeCancelButton, String imageKey) {
- super(parentShell, dialogTitle);
- setImageKey(imageKey);
- this.message = dialogMessage;
- this.detailsTitle = detailsTitle;
- this.projects = projects;
- this.includeCancelButton = includeCancelButton;
- }
-
- /**
- * @see DetailsDialog#createMainDialogArea(Composite)
- */
- protected void createMainDialogArea(Composite composite) {
- Label label = new Label(composite, SWT.WRAP);
- label.setText(message); //$NON-NLS-1$
- GridData data = new GridData(
- GridData.GRAB_HORIZONTAL |
- GridData.GRAB_VERTICAL |
- GridData.HORIZONTAL_ALIGN_FILL |
- GridData.VERTICAL_ALIGN_CENTER);
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
- label.setLayoutData(data);
- updateEnablements();
- }
-
- /**
- * @see DetailsDialog#createDropDownDialogArea(Composite)
- */
- protected Composite createDropDownDialogArea(Composite parent) {
- // create a composite with standard margins and spacing
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- detailsList = 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;
- detailsList.setLayoutData(data);
-
- if (detailsTitle != null) {
- detailsList.add(detailsTitle);
- }
-
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- detailsList.add(projects[i].getName()); //$NON-NLS-1$
- }
- return composite;
- }
-
- /**
- * @see DetailsDialog#updateEnablements()
- */
- protected void updateEnablements() {
- setPageComplete(true);
- }
-
- /**
- * @see DetailsDialog#includeCancelButton()
- */
- protected boolean includeCancelButton() {
- return includeCancelButton;
- }
-
-}
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
deleted file mode 100644
index df4b19af6..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DialogArea.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.dialogs;
-
-import java.util.*;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * This class provides facilities to allow common widget groupings to be shared
- * by mulitple dialogs or wizards.
- */
-public abstract class DialogArea {
-
- protected static final int LABEL_WIDTH_HINT = 400;
-
- protected Dialog parentDialog;
- protected FontMetrics fontMetrics;
- protected IDialogSettings settings;
-
- protected List listeners;
-
- /**
- * Create a dialog area
- * @param parentDialog the parent dialog or <code>null</code>
- * @param settings the dialog settings stroe or <code>null</code>
- */
- protected DialogArea(Dialog parentDialog, IDialogSettings settings) {
- this.listeners = new ArrayList();
- this.parentDialog = parentDialog;
- this.settings = settings;
- }
-
- /**
- * 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) {
- if (!listeners.contains(listener))
- listeners.add(listener);
- }
- /**
- * Remove the provided listener from the receiver.
- *
- * @param listener
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- listeners.remove(listener);
- }
-
- protected void firePropertyChangeChange(String property, Object oldValue, Object newValue) {
- PropertyChangeEvent event = new PropertyChangeEvent(this, property, oldValue, newValue);
- for (Iterator iter = listeners.iterator(); iter.hasNext();) {
- IPropertyChangeListener listener = (IPropertyChangeListener) iter.next();
- 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) {
- // Compute and store a font metric
- GC gc = new GC(control);
- gc.setFont(control.getFont());
- fontMetrics = gc.getFontMetrics();
- gc.dispose();
- }
-
- /**
- * Create the area using the given parent as the containing composite
- * @param parent
- */
- public abstract void createArea(Composite parent);
-
- /**
- * Returns a shell that can be used to show error conditions, etc.
- * This method will return <code>null</code> if there is no parent dialog.
- * @return a shell or <code>null</code>
- */
- protected Shell getShell() {
- if (parentDialog == null) {
- return null;
- }
- return parentDialog.getShell();
- }
-
- protected Button createCheckbox(Composite parent, String label, int span) {
- Button button = new Button(parent, SWT.CHECK | SWT.LEFT);
- button.setText(label);
- button.setFont(parent.getFont());
- GridData data = new GridData();
- data.horizontalSpan = span;
- button.setLayoutData(data);
- return button;
- }
-
- protected Button createButton(Composite parent, String label, int style) {
- Button button = new Button(parent, SWT.PUSH);
- button.setText(label);
- // we need to explicitly set the font to the parent's font for dialogs
- button.setFont(parent.getFont());
- GridData data = new GridData(style);
- data.heightHint = Dialog.convertVerticalDLUsToPixels(fontMetrics, IDialogConstants.BUTTON_HEIGHT);
- int widthHint = Dialog.convertHorizontalDLUsToPixels(fontMetrics, IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- button.setLayoutData(data);
- return button;
- }
-
- protected Button createRadioButton(Composite parent, String label, int span) {
- Button button = new Button(parent, SWT.RADIO);
- button.setText(label);
- GridData data = new GridData();
- data.horizontalSpan = span;
- button.setLayoutData(data);
- return button;
- }
- protected Label createWrappingLabel(Composite parent, String text, int horizontalSpan) {
- Label label = new Label(parent, SWT.LEFT | SWT.WRAP);
- label.setText(text);
- label.setFont(parent.getFont());
- GridData data = new GridData();
- data.horizontalSpan = horizontalSpan;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.widthHint = LABEL_WIDTH_HINT;
- label.setLayoutData(data);
- return label;
- }
- protected Label createLabel(Composite parent, String text, int horizontalSpan) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = horizontalSpan;
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
- return label;
- }
- /**
- * Creates composite control and sets the default layout data.
- *
- * @param parent the parent of the new composite
- * @param numColumns the number of columns for the new composite
- * @return the newly-created coposite
- */
- protected Composite createComposite(Composite parent, int numColumns) {
- Composite composite = new Composite(parent, SWT.NULL);
- Font font = parent.getFont();
- composite.setFont(font);
-
- // GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- composite.setLayout(layout);
-
- // GridData
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- composite.setLayoutData(data);
- return composite;
- }
-
- /**
- * Creates composite control and sets the default layout data.
- *
- * @param parent the parent of the new composite
- * @param numColumns the number of columns for the new composite
- * @return the newly-created coposite
- */
- protected Composite createGrabbingComposite(Composite parent, int numColumns) {
- Composite composite = new Composite(parent, SWT.NULL);
- Font font = parent.getFont();
- composite.setFont(font);
-
- // GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
-
- // GridData
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- data.grabExcessHorizontalSpace = true;
- data.grabExcessVerticalSpace = true;
- composite.setLayoutData(data);
- return composite;
- }
-}
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
deleted file mode 100644
index 79f9b6c81..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/IPromptCondition.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.dialogs;
-
-import org.eclipse.core.resources.IResource;
-
-/**
- * Input to a confirm prompt
- *
- * @see PromptingDialog
- */
-public interface IPromptCondition {
- /**
- * Answers <code>true</code> if a prompt is required for this resource and
- * false otherwise.
- */
- public boolean needsPrompt(IResource resource);
-
- /**
- * Answers the message to include in the prompt.
- */
- public String promptMessage(IResource resource);
-}
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
deleted file mode 100644
index 3bc3b6a5d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PreferencePageContainerDialog.java
+++ /dev/null
@@ -1,395 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.dialogs;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.preference.*;
-import org.eclipse.jface.resource.*;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
-
-public class PreferencePageContainerDialog extends Dialog implements IPreferencePageContainer {
-
- PreferencePage page;
-
- private class PageLayout extends Layout {
- public void layout(Composite composite, boolean force) {
- Rectangle rect = composite.getClientArea();
- Control [] children = composite.getChildren();
- for (int i= 0; i < children.length; i++) {
- children[i].setSize(rect.width, rect.height);
- }
- }
- public Point computeSize(Composite composite, int wHint, int hHint, boolean force) {
- if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT)
- return new Point(wHint, hHint);
- int x= fMinimumPageSize.x;
- int y= fMinimumPageSize.y;
-
- Control[] children= composite.getChildren();
- for (int i= 0; i < children.length; i++) {
- Point size= children[i].computeSize(SWT.DEFAULT, SWT.DEFAULT, force);
- x= Math.max(x, size.x);
- y= Math.max(y, size.y);
- }
- if (wHint != SWT.DEFAULT) x = wHint;
- if (hHint != SWT.DEFAULT) y = hHint;
- return new Point(x, y);
- }
- }
-
- private Composite fTitleArea;
- private Label fTitleImage;
- private CLabel fMessageLabel;
-
- private String fMessage;
- private Color fNormalMsgAreaBackground;
- private Image fErrorMsgImage;
-
- private Button fOkButton;
-
- /**
- * Must declare our own images as the JFaceResource images will not be created unless
- * a property/preference dialog has been shown
- */
- protected static final String PREF_DLG_TITLE_IMG = "preference_page_container_image";//$NON-NLS-1$
- protected static final String PREF_DLG_IMG_TITLE_ERROR = "preference_page_container_title_error_image";//$NON-NLS-1$
- static {
- ImageRegistry reg = TeamUIPlugin.getPlugin().getImageRegistry();
- 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$
- }
-
- /**
- * The Composite in which a page is shown.
- */
- private Composite fPageContainer;
-
- /**
- * The minimum page size; 200 by 200 by default.
- *
- * @see #setMinimumPageSize(Point)
- */
- private Point fMinimumPageSize = new Point(200,200);
-
- public PreferencePageContainerDialog(Shell shell, PreferencePage page) {
- super(shell);
- this.page = page;
- }
-
- /**
- * @see Dialog#okPressed()
- */
- protected void okPressed() {
- final List changedProperties = new ArrayList(5);
- getPreferenceStore().addPropertyChangeListener( new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- changedProperties.add(event.getProperty());
- }
- });
-
- page.performOk();
-
- handleSave();
-
- super.okPressed();
- }
-
- /**
- * Sets the title for this dialog.
- * @param title the title.
- */
- public void setTitle(String title) {
- Shell shell= getShell();
- if ((shell != null) && !shell.isDisposed()) {
- shell.setText(title);
- }
- }
-
- /**
- * @see Dialog#createDialogArea(Composite)
- */
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite)super.createDialogArea(parent);
- ((GridLayout) composite.getLayout()).numColumns = 1;
-
- // Build the title area and separator line
- Composite titleComposite = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.verticalSpacing = 0;
- layout.horizontalSpacing = 0;
- titleComposite.setLayout(layout);
- titleComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- createTitleArea(titleComposite);
-
- Label titleBarSeparator = new Label(titleComposite, SWT.HORIZONTAL | SWT.SEPARATOR);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- titleBarSeparator.setLayoutData(gd);
-
- // Build the Page container
- fPageContainer = createPageContainer(composite);
- fPageContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- page.setContainer(this);
- page.createControl(fPageContainer);
- setTitle(page.getTitle());
-
- // Build the separator line
- Label separator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- separator.setLayoutData(gd);
-
- applyDialogFont(parent);
- return composite;
- }
-
- /**
- * Creates the dialog's title area.
- *
- * @param parent the SWT parent for the title area composite
- * @return the created title area composite
- */
- private Composite createTitleArea(Composite parent) {
- Font font = parent.getFont();
-
- // Create the title area which will contain
- // a title, message, and image.
- fTitleArea = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- 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() {
- public void propertyChange(PropertyChangeEvent event) {
- if(JFaceResources.BANNER_FONT.equals(event.getProperty()) ||
- JFaceResources.DIALOG_FONT.equals(event.getProperty())) {
- updateMessage();
- }
- }
- };
-
- fMessageLabel.addDisposeListener(new DisposeListener() {
- 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.horizontalAlignment = GridData.END;
- fTitleImage.setLayoutData(gd);
- updateMessage();
- return fTitleArea;
- }
-
- /**
- * Creates the inner page container.
- */
- private Composite createPageContainer(Composite parent) {
- Composite result = new Composite(parent, SWT.NULL);
- result.setLayout(new PageLayout());
- return result;
- }
-
- /**
- * Sets the minimum page size.
- *
- * @param size the page size encoded as
- * <code>new Point(width,height)</code>
- * @see #setMinimumPageSize(int,int)
- */
- public void setMinimumPageSize(Point size) {
- 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
- * to <code>null</code>.
- *
- * @param errorMessage the errorMessage to display or <code>null</code>
- */
- public void setErrorMessage(String errorMessage) {
- if (errorMessage == null) {
- if (fMessageLabel.getImage() != null) {
- // we were previously showing an error
- fMessageLabel.setBackground(fNormalMsgAreaBackground);
- fMessageLabel.setImage(null);
- 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
- fNormalMsgAreaBackground = fMessageLabel.getBackground();
- fMessageLabel.setBackground(JFaceColors.getErrorBackground(fMessageLabel.getDisplay()));
- fMessageLabel.setImage(fErrorMsgImage);
- fTitleImage.setImage(null);
- fTitleArea.layout(true);
- }
- }
- }
- /**
- * 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
- */
- public void setMessage(String newMessage) {
- fMessage = newMessage;
- if (fMessage == null) {
- fMessage = "";//$NON-NLS-1$
- }
- if (fMessageLabel.getImage() == null) {
- // we are not showing an error
- fMessageLabel.setText(fMessage);
- }
- }
-
- /**
- * @see IPreferencePageContainer#updateMessage()
- */
- public void updateMessage() {
- String pageMessage = page.getMessage();
- String pageErrorMessage = page.getErrorMessage();
-
- // Adjust the font
- if (pageMessage == null && pageErrorMessage == null)
- fMessageLabel.setFont(JFaceResources.getBannerFont());
- else
- fMessageLabel.setFont(JFaceResources.getDialogFont());
-
- // Set the message and error message
- if (pageMessage == null) {
- setMessage(page.getTitle());
- } else {
- setMessage(pageMessage);
- }
- setErrorMessage(pageErrorMessage);
- }
-
- /**
- * @see IPreferencePageContainer#getPreferenceStore()
- */
- public IPreferenceStore getPreferenceStore() {
- return page.getPreferenceStore();
- }
-
- /**
- * @see IPreferencePageContainer#updateButtons()
- */
- public void updateButtons() {
- if (fOkButton != null) {
- fOkButton.setEnabled(page.isValid());
- }
- }
-
- /**
- * @see IPreferencePageContainer#updateTitle()
- */
- public void updateTitle() {
- setTitle(page.getTitle());
- }
-
- /**
- * @see Dialog#createButtonsForButtonBar(Composite)
- */
- protected void createButtonsForButtonBar(Composite parent) {
- 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>
- * The default implementation of this framework method saves all
- * pages of type <code>PreferencePage</code> (if their store needs saving
- * and is a <code>PreferenceStore</code>).
- * </p>
- * <p>
- * Subclasses may override.
- * </p>
- */
- protected void handleSave() {
- if (page instanceof PreferencePage) {
- // Save now in case tbe workbench does not shutdown cleanly
- IPreferenceStore store =
- ((PreferencePage) page).getPreferenceStore();
- if (store != null
- && store.needsSaving()
- && store instanceof IPersistentPreferenceStore) {
- try {
- ((IPersistentPreferenceStore) store).save();
- } catch (IOException e) {
- Utils.handle(e);
- }
- }
- }
- }
-}
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
deleted file mode 100644
index 1f40ecd2b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/PromptingDialog.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.dialogs;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * A confirmation dialog helper that will either show a 'yes/no/yes to all/cancel'
- * dialog to confirm an action performed on several resources or if only one
- * resource is specified 'ok/cancel' will be shown.
- */
-public class PromptingDialog {
- private IResource[] resources;
- private Shell shell;
- private String[] buttons;
- private boolean confirmOverwrite = true;
- private IPromptCondition condition;
- private String title;
- private boolean hasMultipleResources;
- private boolean allOrNothing;
-
- /**
- * Prompt for the given resources using the specific condition. The prompt dialog will
- * have the title specified.
- */
- public PromptingDialog(Shell shell, IResource[] resources, IPromptCondition condition, String title) {
- this(shell, resources, condition, title, false /* all or nothing */);
- }
-
- public PromptingDialog(Shell shell, IResource[] resources, IPromptCondition condition, String title, boolean allOrNothing) {
- this.condition = condition;
- this.resources = resources;
- this.title = title;
- this.shell = shell;
- this.hasMultipleResources = resources.length > 1;
- this.allOrNothing = allOrNothing;
- if (hasMultipleResources) {
- if (allOrNothing) {
- buttons = new String[] {
- 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.CANCEL_LABEL};
- }
- } else {
- buttons = new String[] {IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL};
- }
- }
- /**
- * Call to calculate and show prompt. If no resources satisfy the prompt condition
- * a dialog won't be shown. The resources for which the user confirmed the action
- * are returned.
- */
- public IResource[] promptForMultiple() throws InterruptedException {
- List targetResources = new ArrayList();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (condition.needsPrompt(resource) && confirmOverwrite) {
- if (confirmOverwrite(condition.promptMessage(resource))) {
- targetResources.add(resource);
- }
- } else {
- targetResources.add(resource);
- }
- }
- return (IResource[]) targetResources.toArray(new IResource[targetResources.size()]);
- }
-
- /**
- * Opens the confirmation dialog based on the prompt condition settings.
- */
- private boolean confirmOverwrite(String msg) throws InterruptedException {
- if (!confirmOverwrite) {
- return true;
- }
- 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(
- new Runnable() {
- public void run() {
- dialog.open();
- }
- });
- if (hasMultipleResources) {
- switch (dialog.getReturnCode()) {
- case 0://Yes
- return true;
- case 1://Yes to all
- confirmOverwrite = false;
- return true;
- case 2://No (or CANCEL for all-or-nothing)
- if (allOrNothing) {
- throw new InterruptedException();
- }
- return false;
- case 3://Cancel
- default:
- throw new InterruptedException();
- }
- } else {
- return dialog.getReturnCode() == 0;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
deleted file mode 100644
index b915512b8..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
+++ /dev/null
@@ -1,434 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-###############################################
-# Message catalog for org.eclipse.team.ui
-###############################################
-
-CatchupReleaseViewer.open=&Show Content Comparison
-CatchupReleaseViewer.expand=&Expand All
-CatchupReleaseViewer.ignoreWhiteSpace=&Ignore White Space
-CatchupReleaseViewer.refreshAction=&Refresh With Remote
-CatchupReleaseViewer.showIncomingAction=Toggle showing of incoming Changes
-CatchupReleaseViewer.showInNavigator=Show in &Navigator
-CatchupReleaseViewer.showOnlyConflictsAction=Toggle showing of conflicting
-CatchupReleaseViewer.showOutgoingAction=Toggle showing of outgoing Changes
-CatchupReleaseViewer.removeFromView=Remove &From View
-CatchupReleaseViewer.copyAllRightToLeft=Copy &All Changes From Right To Left
-CatchupReleaseViewer.Compare_File_Contents_1=Compare File Contents
-CatchupReleaseViewer.Copying_right_contents_into_workspace_2=Copying right contents into workspace
-CatchupReleaseViewer.MakingLocalLikeRemote=Processing {0}
-
-ConfigureProjectAction.configureProject=Configure Project
-ConfigureProjectWizard.configureProject=Share Project
-ConfigureProjectWizard.description=Select the repository plug-in that will be used to share the selected project.
-ConfigureProjectWizard.title=Share Project
-ConfigureProjectWizardMainPage.selectRepository=Select a repository type:
-
-ConfigurationWizard.exceptionCreatingWizard=Exception creating wizard.
-
-IgnorePreferencePage.description=Use this page to specify a list of resource name patterns to exclude from version control.
-IgnorePreferencePage.add=&Add...
-IgnorePreferencePage.enterPatternLong=Please enter a pattern:
-IgnorePreferencePage.enterPatternShort=Enter Ignore Pattern
-IgnorePreferencePage.ignorePatterns=&Ignore Patterns:
-IgnorePreferencePage.patternExistsLong=The entered pattern already exists.
-IgnorePreferencePage.patternExistsShort=Pattern Already Exists
-IgnorePreferencePage.remove=&Remove
-
-MergeResource.commonFile=Common file: {0}
-MergeResource.noCommonFile=No common file
-MergeResource.noRepositoryFile=No remote file
-MergeResource.repositoryFile=Remote file: {0}
-MergeResource.workspaceFile=Workspace file: {0}
-
-nothingToSynchronize=Nothing to Synchronize
-simpleInternal=Internal error
-exception=An exception occurred
-
-SyncCompareInput.nothingText=Workspace resources are the same as remote.
-SyncCompareInput.refresh=Error During Refresh with Remote
-SyncCompareInput.synchronize=Synchronize
-SyncCompareInput.taskTitle=Synchronizing with Remote...
-
-SyncSet.conflicts={0} conflicts,
-SyncSet.incomings={0} incoming change(s),
-SyncSet.noConflicts=No conflicts,
-SyncSet.noIncomings=no incoming changes,
-SyncSet.noOutgoings=no outgoing changes.
-SyncSet.outgoings={0} outgoing change(s).
-
-SyncView.freeModeAction=Incoming/Outgoing Mode
-SyncView.freeModeTitle=Synchronize - Incoming/Outgoing Mode
-SyncView.freeModeToolTip=Incoming/Outgoing Mode
-SyncView.incomingModeAction=Incoming Mode
-SyncView.incomingModeTitle=Synchronize - Incoming Mode
-SyncView.incomingModeToolTip=Incoming Mode
-SyncView.outgoingModeAction=Outgoing Mode
-SyncView.outgoingModeTitle=Synchronize - Outgoing Mode
-SyncView.outgoingModeToolTip=Outgoing Mode
-SyncView.same=Workspace resources are the same as remote.
-SyncView.text=Synchronize resources with their remote to display them here.
-SyncView.unableSynchronize=Unable to Synchronize
-SyncView.saveTitle=Save Resource
-SyncView.saveMessage=Resource has been modified. Save changes?
-SyncView.errorSaving=Error while saving modified resources
-SyncView.cantSaveError=Can't save changes: {0}
-SyncView.dirtyIndicatorInTitle=*{0}
-
-LiveSyncView.titleTooltip=Working Set: {0}
-LiveSyncView.title=Synchronize
-LiveSyncView.titleSubscriber=Synchronize - {0}
-
-SyncInfoCompareInput.localLabel=Local File
-SyncInfoCompareInput.localLabelExists=Local File ({0})
-SyncInfoCompareInput.remoteLabel=Remote File
-SyncInfoCompareInput.baseLabel=Common Ancestor
-SyncInfoCompareInput.remoteLabelExists=Remote File ({0})
-SyncInfoCompareInput.baseLabelExists=Common Ancestor ({0})
-SyncInfoCompareInput.title={0}
-SyncInfoCompareInput.tooltip={0}: {1}
-
-TeamAction.internal=Internal error occurred.
-TeamFile.saveChanges=Unable to save changes to file: {0}
-TeamFile.modified={0}*
-
-TextPreferencePage.add=&Add...
-TextPreferencePage.binary=Binary
-TextPreferencePage.change=&Change
-TextPreferencePage.contents=Contents
-TextPreferencePage.description=&File extensions with known content:
-TextPreferencePage.enterExtensionLong=Please enter a file extension:
-TextPreferencePage.enterExtensionShort=Enter File Extension
-TextPreferencePage.extension=Extension
-TextPreferencePage.extensionExistsLong=The entered extension already exists.
-TextPreferencePage.extensionExistsShort=Extension Already Exists
-TextPreferencePage.remove=&Remove
-TextPreferencePage.text=ASCII
-
-TextPreferencePage.columnExtension=extension
-TextPreferencePage.columnContents=contents
-
-SynchronizationViewPreference.defaultPerspectiveNone=None
-SynchronizationViewPreference.defaultPerspectiveDescription=This setting controls which perspective to activate when resources are synchronized.\nTo indicate that a perspective switch should not occur select ''None''.
-SynchronizationViewPreference.defaultPerspectiveLabel=Perspective:
-
-ScheduledSyncViewRefresh.taskName=Refreshing synchronize view partners with remote
-SyncViewRefresh.taskName=Refreshing ''{0}''
-
-ExportProjectSetMainPage.Select_the_projects_to_include_in_the_project_set__2=&Select the projects to include in the Team Project Set:
-ExportProjectSetMainPage.Project_Set_File_Name__3=Select the export destination:
-ExportProjectSetMainPage.Browse_4=B&rowse...
-ExportProjectSetMainPage.You_have_specified_a_folder_5=You have specified a folder
-
-ImportProjectSetMainPage.Project_Set_File_Name__2=F&ile name:
-ImportProjectSetMainPage.Browse_3=B&rowse...
-ImportProjectSetMainPage.The_specified_file_does_not_exist_4=The specified file does not exist
-ImportProjectSetMainPage.You_have_specified_a_folder_5=You have specified a folder
-ImportProjectSetMainPage.workingSetNameEmpty=The working set name must not be empty
-ImportProjectSetMainPage.workingSetNameExists=The specified working set already exists
-ImportProjectSetMainPage.createWorkingSetLabel=&Create a working set containing the imported projects
-ImportProjectSetMainPage.workingSetLabel=&Working Set Name:
-
-ProjectSetContentHandler.Element_provider_must_be_contained_in_element_psf_4=Element provider must be contained in element psf
-ProjectSetContentHandler.Element_project_must_be_contained_in_element_provider_7=Element project must be contained in element provider
-
-ProjectSetExportWizard.Project_Set_1=Team Project Set
-ProjectSetExportWizard.Export_a_Project_Set_3=Export a Team Project Set
-ProjectSetExportWizard.Question_4=Question
-ProjectSetExportWizard.Target_directory_does_not_exist._Would_you_like_to_create_it__5=Target directory does not exist. Would you like to create it?
-ProjectSetExportWizard.Export_Problems_6=Export Problems
-ProjectSetExportWizard.An_error_occurred_creating_the_target_directory_7=An error occurred creating the target directory
-ProjectSetExportWizard.Question_8=Question
-ProjectSetExportWizard.Target_already_exists._Would_you_like_to_overwrite_it__9=Target already exists. Would you like to overwrite it?
-ProjectSetImportWizard.Project_Set_1=Team Project Set
-ProjectSetImportWizard.Import_a_Project_Set_3=Import a Team Project Set
-ProjectSetImportWizard.workingSetExistsTitle=Working Set Exists
-ProjectSetImportWizard.workingSetExistsMessage=Working set ''{0}'' already exists. Overwrite?
-
-ExportProjectSetMainPage.Project_Set_Files_3=Team Project Set Files (*.psf)
-ExportProjectSetMainPage.default=projectSet.psf
-ImportProjectSetMainPage.allFiles=All Files (*.*)
-ImportProjectSetMainPage.Project_Set_Files_2=Team Project Set Files (*.psf)
-ExportProjectSetMainPage.&File_name__1=&File name:
-TeamPreferencePage.General_settings_for_Team_support_1=General settings for Team support
-TeamPreferencePage.&Use_Incoming/Outgoing_mode_when_synchronizing_2=&Use Incoming/Outgoing mode when synchronizing
-
-SynchronizeView.noSubscribersMessage=Synchronize resources with their remote to display them here. Some Team plugins may also show resources here automatically when their plugin is activated.
-
-SyncViewerDirectionFilters.incomingTitle=Incoming
-SyncViewerDirectionFilters.incomingToolTip=Toggle showing of incoming changes
-SyncViewerDirectionFilters.outgoingTitle=Outgoing
-SyncViewerDirectionFilters.outgoingToolTip=Toggle showing of outgoing changes
-SyncViewerDirectionFilters.conflictingTitle=Conflicting
-SyncViewerDirectionFilters.conflictingToolTip=Toggle showing of conflicting changes
-
-SyncViewPreferencePage.lastRefreshRun=The last background synchronize was run at: {0}
-SyncViewPreferencePage.lastRefreshRunNever=Never
-
-###############################################
-# Sync view actions
-###############################################
-
-action.collapseAll.label=Collapse All
-action.collapseAll.tooltip=Collapse All
-action.collapseAll.description=Collapse All
-action.collapseAll.image=collapseall.gif
-
-action.configureSchedulel.label=Schedule...
-action.configureSchedulel.tooltip=Configure the Synchronize Schedule...
-
-action.refreshWithRemote.label=&Synchronize...
-action.refreshWithRemote.tooltip=Synchronize...
-action.refreshWithRemote.description=Synchronize...
-action.refreshWithRemote.image=refresh_remote.gif
-
-action.directionFilterIncoming.label=Incoming
-action.directionFilterIncoming.tooltip=Incoming Mode
-action.directionFilterIncoming.description=Incoming Mode (shows incoming changes and conflicts)
-action.directionFilterIncoming.image=catchup_rls.gif
-
-action.directionFilterOutgoing.label=Outgoing
-action.directionFilterOutgoing.tooltip=Outgoing Mode
-action.directionFilterOutgoing.description=Outgoing Mode (shows outgoing changes and conflicts)
-action.directionFilterOutgoing.image=release_rls.gif
-
-action.directionFilterConflicts.label=Conflicts
-action.directionFilterConflicts.tooltip=Conflicts Mode
-action.directionFilterConflicts.description=Conflicts Mode (shows conflicts)
-action.directionFilterConflicts.image=conflict_synch.gif
-
-action.directionFilterBoth.label=Both
-action.directionFilterBoth.tooltip=Incoming/Outgoing mode
-action.directionFilterBoth.description=Incoming/Outgoing mode (shows outgoing changes, incoming changes, and conflicts)
-action.directionFilterBoth.image=catchuprelease_rls.gif
-
-action.refreshSubscriber.label=Synchronizations
-action.refreshSubscriber.tooltip=Synchronizations
-action.refreshSubscriber.description=Synchronizations
-action.refreshSubscriber.image=synch_participants.gif
-
-action.comparisonCriteria.label=Comparison Criteria
-action.comparisonCriteria.tooltip=Select the comparison method
-action.comparisonCriteria.description=Select the comparison method
-action.comparisonCriteria.image=showsync_rn.gif
-
-action.navigateNext.label=Go to Next Difference
-action.navigateNext.tooltip=Go to Next Difference
-action.navigateNext.description=Go to Next Difference
-action.navigateNext.image=next_nav.gif
-
-action.navigatePrevious.label=Go to Previous Difference
-action.navigatePrevious.tooltip=Go to Previous Difference
-action.navigatePrevious.description=Go to Next Difference
-action.navigatePrevious.image=prev_nav.gif
-
-action.removePage.label=Remove Current Synchronization
-action.removePage.tooltip=Remove Current Synchronization
-action.removePage.description=Remove Current Synchronization
-action.removePage.image=participant_rem.gif
-
-action.removeAllPage.label=Remove Un-Pinned Synchronizations
-action.removeAllPage.tooltip=Remove Un-Pinned Synchronizations
-action.removeAllPage.description=Remove Un-Pinned Synchronizations
-action.removeAllPage.image=participant_remall.gif
-
-action.pinParticipant.label=Pin Current Synchronization
-action.pinParticipant.tooltip=Pin Current Synchronization
-action.pinParticipant.description=Pin Current Synchronization
-action.pinParticipant.image=pin.gif
-
-action.expandAll.label=E&xpand All
-action.open.label=&Open
-action.openInCompareEditor.label=Open In Compare Editor
-action.cancelSubscriber.label=Cancel
-
-action.syncViewPreferences.label=Preferences...
-action.refreshViewContents.label=Refresh View Contents
-action.changeFilterShowAdditions.label=Show Additions
-action.changeFilterShowDeletions.label=Show Deletions
-action.changeFilterShowChanges.label=Show Changes
-action.layout.label=Layout
-action.modes.label=Modes
-
-action.removeFromView.label=&Remove from View
-
-###############################################
-# Misc
-###############################################
-
-SynchronizeView.12=One item selected
-SynchronizeView.13=\ items selected
-SynchronizeView.14=Error opening perspective
-SynchronizeView.16=Error opening view
-
-StatisticsPanel.outgoing=Outgoing:
-StatisticsPanel.incoming=Incoming:
-StatisticsPanel.conflicting=Conflicting:
-StatisticsPanel.changeNumbers={0}/{1}
-StatisticsPanel.outgoing=Outgoing
-StatisticsPanel.conflicting=Conflicting
-StatisticsPanel.incoming=Incoming
-StatisticsPanel.noWorkingSet=<No Working Set>
-StatisticsPanel.workingSetTooltip=Double-click to change the working set applied to the Synchronize View.
-StatisticsPanel.numbersTooltip=The number of ''{0}'' changes in the entire workspace.
-StatisticsPanel.numbersWorkingSetTooltip=The number of ''{0}'' changes in working set ''{1}'' versus those in the entire workspace.
-StatisticsPanel.numberTotal={0} changes
-
-SyncViewerPreferencePage.6=General Synchronize Settings
-SyncViewerPreferencePage.7=General Team Settings:
-SyncViewerPreferencePage.8=Display
-SyncViewerPreferencePage.9=Compress in-sync folder paths when using the tree view
-SyncViewerPreferencePage.10=Use incoming/outgoing mode when synchronizing
-SyncViewerPreferencePage.11=Refreshing with Remote
-SyncViewerPreferencePage.15=Perspective Switching
-
-RefreshSubscriberInputJob.1=Synchronizing ''{0}'' with remote: {1} resources
-RefreshSubscriberJob.1=Team synchronize {0} folders for {1}
-RefreshSubscriberJob.0=An error occured while synchronizing with remote contents.
-RefreshSubscriberJob.2=Synchronizing {1}
-
-CopyAction.title=&Copy
-CopyAction.toolTip=Copy
-CopyAction.errorTitle=Problem Copying to Clipboard
-CopyAction.errorMessage=There was a problem when accessing the system clipboard. Retry?
-PasteAction.title=&Paste
-PasteAction.toolTip=Paste
-RefactorActionGroup.0=Edi&t
-SynchronizeManager.7=Error notifying of added/removal of synchronization
-SynchronizeManager.8=Error initializing Synchronization
-SynchronizeManager.9=Synchronization with id {0} is not in the registry
-SynchronizeManager.10=Error saving synchronization
-SynchronizeView.1=Synchronize
-SynchronizeView.2={1}
-SyncViewerPreferencePage.19=Show all synchronization information in a resource\'s text label
-TeamSubscriberParticipantPage.7=Resource
-TeamSubscriberParticipantPage.8=In Folder
-TeamSubscriberSyncPage.labelWithSyncKind={0} {1}
-AbstractSynchronizeParticipant.4=Cannot initialize synchronization. Wrong descriptor type
-
-SynchronizeManager.11=Error creating Synchronization {0}:
-AbstractSynchronizeParticipant.5=Exception notifying participant listeners of changes.
-SynchronizeManager.13=Error initializing synchronize participant
-
-ChangesSection.filterHides=The current ''{0}'' mode is empty.
-ChangesSection.filterHidesSingular=However there is {0} change in the ''{1}'' mode.
-ChangesSection.filterHidesPlural=However there are {0} changes in the ''{1}'' mode.
-ChangesSection.filterChange=Change to ''{0}'' mode.
-ChangesSection.workingSetHiding=The current working set ''{0}'' is hiding changes in your workspace.
-ChangesSection.workingSetRemove=Remove working set.
-ChangesSection.noChanges=No changes in ''{0}''.
-Utils.22=Incoming
-Utils.23=Outgoing
-Utils.24=Incoming/Outgoing
-Utils.25=Conflicting
-Utils.26=unknown mode
-RefreshCompleteDialog.4=Synchronize Complete - {0}
-RefreshCompleteDialog.4a=Scheduled Synchronize Complete - {0}
-RefreshCompleteDialog.5={0}: {1} changes found.
-RefreshCompleteDialog.5a={0}: {1} new changes found.
-RefreshCompleteDialog.6={0}: No changes found.
-RefreshCompleteDialog.17=Details >>
-RefreshCompleteDialog.18=<< Details
-RefreshUserNotificationPolicy.0=Synchronize of ''{0}'' Complete.
-ConfigureRefreshScheduleDialog.0=Configure Synchronize Schedule - {0}
-ConfigureRefreshScheduleDialog.1=You can allow ''{0}'' to periodically synchronize in the background.
-ConfigureRefreshScheduleDialog.1a=The last synchronize occured at: {0}
-ConfigureRefreshScheduleDialog.2=Don't schedule the synchronize operation to run periodically.
-ConfigureRefreshScheduleDialog.3=Using the following schedule:
-ConfigureRefreshScheduleDialog.4=Every:
-ConfigureRefreshScheduleDialog.5=hour(s)
-ConfigureRefreshScheduleDialog.6=minutes(s)
-ConfigureRefreshScheduleDialog.7=Number must be a positive number greater than 0
-ConfigureRefreshScheduleDialog.8=Number must be a positive number greater than 0
-RefreshSchedule.6=\ ({0} changes found)
-RefreshSchedule.7=\ (No changes found)
-RefreshSchedule.8=Not Scheduled
-RefreshSchedule.9=hours
-RefreshSchedule.10=minutes
-RefreshSchedule.11=hour
-RefreshSchedule.12=minute
-RefreshSchedule.13=Every {0} {1}
-RefreshSchedule.14=Scheduled Synchronize
-RefreshSchedule.15={0} {1}
-DiffNodeControllerHierarchical.0=Updating labels
-ChangesSection.8=Show Errors
-ChangesSection.9=Reset View
-ChangesSection.10=Errors have occurred calculating the synchronization state for {0}
-ChangesSection.11=Errors Populating View
-ChangesSection.12=Multiple errors occurred while attempting to populate the view.
-
-OpenComparedDialog.diffViewTitleMany=Changes
-OpenComparedDialog.diffViewTitleOne=Changes
-OpenComparedDialog.noChangeTitle=Operation Complete
-OpenComparedDialog.noChangesMessage=No Changes Found.
-GlobalRefreshAction.4=Synchronize...
-GlobalRefreshAction.5=Synchronize {0}
-SubscriberRefreshWizard.0=Synchronize
-ParticipantCompareDialog.1=Remember this result by placing it in the Synchronize View.
-ParticipantCompareDialog.2=Confirm Save
-ParticipantCompareDialog.3=Do you want to save changes?
-RefreshCompleteDialog.21=Show only the latest new incoming changes
-RefreshCompleteDialog.22=Don't show this dialog again.
-SynchronizeManager.27=Confirm Perspective Switch
-SynchronizeManager.31=&Remember my decision
-SynchronizeManager.30=Synchronization is associated with the {0} perspective. Do you want to switch to that perspective now?
-RefreshCompleteDialog.9=Changes
-RefreshSubscriberJob.2=Synchronizing {0}
-Participant.comparing=Comparing
-Participant.merging=Merging
-Participant.synchronizing=Synchronizing
-Participant.comparingDetail=Comparing {0}
-Participant.mergingDetail=Merging {0}
-Participant.synchronizingDetails=Synchronizing {0}
-GlobalRefreshResourceSelectionPage.1=Synchronize
-GlobalRefreshResourceSelectionPage.2=Select the resources to synchronize or select a scope to automatically select a group of resources.
-GlobalRefreshResourceSelectionPage.3=Synchronize
-GlobalRefreshResourceSelectionPage.4=There are no resources to synchronize.
-GlobalRefreshResourceSelectionPage.5=Available resources to Synchronize:
-GlobalRefreshResourceSelectionPage.6=Scope
-GlobalRefreshResourceSelectionPage.7=W&orkspace
-GlobalRefreshResourceSelectionPage.8=&Selected Resources
-GlobalRefreshResourceSelectionPage.9=&Enclosing Projects
-GlobalRefreshResourceSelectionPage.10=&Working Set:
-GlobalRefreshResourceSelectionPage.11=&Choose...
-GlobalRefreshResourceSelectionPage.12=Select &All
-GlobalRefreshResourceSelectionPage.13=&Deselect All
-GlobalRefreshParticipantSelectionPage.0=Synchronize
-GlobalRefreshParticipantSelectionPage.1=Select the type of synchronization
-GlobalRefreshParticipantSelectionPage.2=Synchronize
-GlobalRefreshParticipantSelectionPage.3=Available synchronization types:
-
-GlobalRefreshSubscriberPage.0=Synchronize
-GlobalRefreshSubscriberPage.1=Synchronize {0}
-GlobalRefreshSubscriberPage.2=Select the resources or working sets to be synchronized.
-
-
-SyncViewerPreferencePage.31=Prompt at the end of a synchronize operation.
-SyncViewerPreferencePage.12=Prompt at the end of a scheduled synchronize operation.
-SyncViewerPreferencePage.13=Switch to the associated perspective when a synchronize operation completes
-SyncViewerPreferencePage.14=Always
-SyncViewerPreferencePage.42=Never
-SyncViewerPreferencePage.16=Prompt
-GlobalRefreshSchedulePage.0=Configure a scheduled synchronization
-GlobalRefreshSchedulePage.1=Synchronize Schedule
-GlobalRefreshSchedulePage.2=Set the interval at which the resources associated with {0} will be synchronized in the background.
-SynchronizeManager.18=Could not cast {0} as ISynchronizeView
-GlobalSynchronizeWizard.11=Synchronize
-SynchronizeManager.19=Could not create synchronization: {0}
-SynchronizeManager.20=Not allowed to create multiple synchronize instances of this type: {0}
-WorkspaceScope.0=Workspace
-WorkingSetScope.0=Workspace
-SubscriberParticipant.namePattern={0} ({1})
-
-RemoveFromView.warningTitle=Confirm Remove
-RemoveFromView.warningMessage=The selected resources will be removed from the view. A resource will reappear if it is modified or if its synchronization state changes.
-RemoveFromView.warningDontShow=Don't show me this again
-
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/ComboFieldEditor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/ComboFieldEditor.java
deleted file mode 100644
index a64177bcc..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/ComboFieldEditor.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.preferences;
-
-import org.eclipse.jface.preference.FieldEditor;
-import org.eclipse.jface.util.Assert;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * A field editor for a combo box that allows the drop-down selection of one of a list of items.
- *
- * XXX: Note this is a copy from org.eclipse.debug.internal.ui.preferences
- * This class can be removed once bug 24928 is fixed.
- *
- * @since 2.1
- */
-public class ComboFieldEditor extends FieldEditor {
-
- /**
- * The <code>Combo</code> widget.
- */
- private Combo fCombo;
-
- /**
- * The value (not the name) of the currently selected item in the Combo widget.
- */
- private String fValue;
-
- /**
- * The names (labels) and underlying values to populate the combo widget. These should be
- * arranged as: { {name1, value1}, {name2, value2}, ...}
- */
- private String[][] fEntryNamesAndValues;
-
- public ComboFieldEditor(String name, String labelText, String[][] entryNamesAndValues, Composite parent) {
- init(name, labelText);
- Assert.isTrue(checkArray(entryNamesAndValues));
- fEntryNamesAndValues= entryNamesAndValues;
- createControl(parent);
- }
-
- /**
- * Checks whether given <code>String[][]</code> is of "type"
- * <code>String[][2]</code>.
- *
- * @return <code>true</code> if it is ok, and <code>false</code> otherwise
- */
- private boolean checkArray(String[][] table) {
- if (table == null) {
- return false;
- }
- for (int i= 0; i < table.length; i++) {
- String[] array= table[i];
- if (array == null || array.length != 2) {
- return false;
- }
- }
- return true;
- }
-
- /*
- * @see FieldEditor#adjustForNumColumns(int)
- */
- protected void adjustForNumColumns(int numColumns) {
- Control control= getLabelControl();
- if (control != null) {
- ((GridData)control.getLayoutData()).horizontalSpan= numColumns;
- }
- ((GridData)fCombo.getLayoutData()).horizontalSpan= numColumns;
- }
-
- /*
- * @see FieldEditor#doFillIntoGrid(Composite, int)
- */
- protected void doFillIntoGrid(Composite parent, int numColumns) {
- Control control= getLabelControl(parent);
- GridData gd= new GridData();
- gd.horizontalSpan= numColumns;
- control.setLayoutData(gd);
- control= getComboBoxControl(parent);
- gd= new GridData();
- gd.horizontalSpan= numColumns;
- control.setLayoutData(gd);
- }
-
- /*
- * @see FieldEditor#doLoad()
- */
- protected void doLoad() {
- updateComboForValue(getPreferenceStore().getString(getPreferenceName()));
- }
-
- /*
- * @see FieldEditor#doLoadDefault()
- */
- protected void doLoadDefault() {
- updateComboForValue(getPreferenceStore().getDefaultString(getPreferenceName()));
- }
-
- /*
- * @see FieldEditor#doStore()
- */
- protected void doStore() {
- if (fValue == null) {
- getPreferenceStore().setToDefault(getPreferenceName());
- return;
- }
-
- getPreferenceStore().setValue(getPreferenceName(), fValue);
- }
-
- /*
- * @see FieldEditor#getNumberOfControls()
- */
- public int getNumberOfControls() {
- return 1;
- }
-
- /**
- * Lazily create and return the Combo control.
- */
- public Combo getComboBoxControl(Composite parent) {
- if (fCombo == null) {
- fCombo= new Combo(parent, SWT.READ_ONLY);
- for (int i= 0; i < fEntryNamesAndValues.length; i++) {
- fCombo.add(fEntryNamesAndValues[i][0], i);
- }
- fCombo.setFont(parent.getFont());
- fCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent evt) {
- String oldValue= fValue;
- String name= fCombo.getText();
- fValue= getValueForName(name);
- setPresentsDefaultValue(false);
- fireValueChanged(VALUE, oldValue, fValue);
- }
- });
- }
- return fCombo;
- }
-
- /**
- * Given the name (label) of an entry, return the corresponding value.
- */
- protected String getValueForName(String name) {
- for (int i= 0; i < fEntryNamesAndValues.length; i++) {
- String[] entry= fEntryNamesAndValues[i];
- if (name.equals(entry[0])) {
- return entry[1];
- }
- }
- return fEntryNamesAndValues[0][0];
- }
-
- /**
- * Set the name in the combo widget to match the specified value.
- */
- protected void updateComboForValue(String value) {
- fValue= value;
- for (int i= 0; i < fEntryNamesAndValues.length; i++) {
- if (value.equals(fEntryNamesAndValues[i][1])) {
- fCombo.setText(fEntryNamesAndValues[i][0]);
- return;
- }
- }
- if (fEntryNamesAndValues.length > 0) {
- fValue= fEntryNamesAndValues[0][1];
- fCombo.setText(fEntryNamesAndValues[0][0]);
- }
- }
-}
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
deleted file mode 100644
index 4374a8fa0..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/IgnorePreferencePage.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.preferences;
-
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.IIgnoreInfo;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.help.WorkbenchHelp;
-public class IgnorePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
- private Table ignoreTable;
- private Button addButton;
- private Button removeButton;
- public void init(IWorkbench workbench) {
- setDescription(Policy.bind("IgnorePreferencePage.description")); //$NON-NLS-1$
- }
-
- /**
- * Creates preference page controls on demand.
- *
- * @param parent the parent for the preference page
- */
- protected Control createContents(Composite ancestor) {
-
- Composite parent = new Composite(ancestor, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.numColumns = 2;
- parent.setLayout(layout);
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- parent.setLayoutData(data);
-
- // set F1 help
- WorkbenchHelp.setHelp(parent, IHelpContextIds.IGNORE_PREFERENCE_PAGE);
-
- Label l1 = new Label(parent, SWT.NULL);
- l1.setText(Policy.bind("IgnorePreferencePage.ignorePatterns")); //$NON-NLS-1$
- data = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
- data.horizontalSpan = 2;
- l1.setLayoutData(data);
-
- ignoreTable = new Table(parent, SWT.CHECK | SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_BOTH);
- //gd.widthHint = convertWidthInCharsToPixels(30);
- gd.heightHint = 300;
- ignoreTable.setLayoutData(gd);
- ignoreTable.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- 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(Policy.bind("IgnorePreferencePage.add")); //$NON-NLS-1$
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, addButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- addButton.setLayoutData(data);
- addButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- addIgnore();
- }
- });
-
-
- removeButton = new Button(buttons, SWT.PUSH);
- removeButton.setText(Policy.bind("IgnorePreferencePage.remove")); //$NON-NLS-1$
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
- widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, removeButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- removeButton.setLayoutData(data);
- removeButton.setEnabled(false);
- removeButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- removeIgnore();
- }
- });
- fillTable(Team.getAllIgnores());
- Dialog.applyDialogFont(ancestor);
- return parent;
- }
- /**
- * Do anything necessary because the OK button has been pressed.
- *
- * @return whether it is okay to close the preference page
- */
- public boolean performOk() {
- int count = ignoreTable.getItemCount();
- String[] patterns = new String[count];
- boolean[] enabled = new boolean[count];
- TableItem[] items = ignoreTable.getItems();
- for (int i = 0; i < count; i++) {
- patterns[i] = items[i].getText();
- enabled[i] = items[i].getChecked();
- }
- Team.setAllIgnores(patterns, enabled);
- TeamUIPlugin.broadcastPropertyChange(new PropertyChangeEvent(this, TeamUI.GLOBAL_IGNORES_CHANGED, null, null));
- return true;
- }
-
- protected void performDefaults() {
- super.performDefaults();
- ignoreTable.removeAll();
- IIgnoreInfo[] ignore = Team.getDefaultIgnores();
- fillTable(ignore);
- }
-
- /**
- * @param ignore
- */
- private void fillTable(IIgnoreInfo[] ignore) {
- for (int i = 0; i < ignore.length; i++) {
- IIgnoreInfo info = ignore[i];
- TableItem item = new TableItem(ignoreTable, SWT.NONE);
- item.setText(info.getPattern());
- item.setChecked(info.getEnabled());
- }
- }
-
- private void addIgnore() {
- InputDialog dialog = new InputDialog(getShell(), Policy.bind("IgnorePreferencePage.enterPatternShort"), Policy.bind("IgnorePreferencePage.enterPatternLong"), null, null); //$NON-NLS-1$ //$NON-NLS-2$
- dialog.open();
- if (dialog.getReturnCode() != InputDialog.OK) return;
- String pattern = dialog.getValue();
- if (pattern.equals("")) return; //$NON-NLS-1$
- // Check if the item already exists
- TableItem[] items = ignoreTable.getItems();
- for (int i = 0; i < items.length; i++) {
- if (items[i].getText().equals(pattern)) {
- MessageDialog.openWarning(getShell(), Policy.bind("IgnorePreferencePage.patternExistsShort"), Policy.bind("IgnorePreferencePage.patternExistsLong")); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- }
- TableItem item = new TableItem(ignoreTable, SWT.NONE);
- item.setText(pattern);
- item.setChecked(true);
- }
-
- private void removeIgnore() {
- int[] selection = ignoreTable.getSelectionIndices();
- ignoreTable.remove(selection);
- }
- private void handleSelection() {
- if (ignoreTable.getSelectionCount() > 0) {
- removeButton.setEnabled(true);
- } else {
- removeButton.setEnabled(false);
- }
- }
-}
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
deleted file mode 100644
index 747029423..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.preferences;
-
-import java.text.Collator;
-import java.text.DateFormat;
-import java.util.*;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.*;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.ui.*;
-
-/**
- * This area provides the widgets for providing the CVS commit comment
- */
-public class SyncViewerPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage, IPreferenceIds {
-
- private BooleanFieldEditor compressFolders = null;
- private BooleanFieldEditor showSyncInLabels = null;
- private BooleanFieldEditor useDefaultPerspective = null;
- private RadioGroupFieldEditor synchronizePerspectiveSwitch = null;
-
- private static class PerspectiveDescriptorComparator implements Comparator {
- /*
- * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
- */
- public int compare(Object o1, Object o2) {
- if (o1 instanceof IPerspectiveDescriptor && o2 instanceof IPerspectiveDescriptor) {
- String id1= ((IPerspectiveDescriptor)o1).getLabel();
- String id2= ((IPerspectiveDescriptor)o2).getLabel();
- return Collator.getInstance().compare(id1, id2);
- }
- return 0;
- }
- }
-
- public SyncViewerPreferencePage() {
- super(GRID);
- setTitle(Policy.bind("SyncViewerPreferencePage.6")); //$NON-NLS-1$
- setDescription(Policy.bind("SyncViewerPreferencePage.7")); //$NON-NLS-1$
- setPreferenceStore(TeamUIPlugin.getPlugin().getPreferenceStore());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- super.createControl(parent);
- //WorkbenchHelp.setHelp(getControl(), IDebugHelpContextIds.CONSOLE_PREFERENCE_PAGE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
- */
- public void createFieldEditors() {
- compressFolders = new BooleanFieldEditor(SYNCVIEW_COMPRESS_FOLDERS, Policy.bind("SyncViewerPreferencePage.9"), SWT.NONE, getFieldEditorParent()); //$NON-NLS-1$
- addField(compressFolders);
- showSyncInLabels = new BooleanFieldEditor(SYNCVIEW_VIEW_SYNCINFO_IN_LABEL, Policy.bind("SyncViewerPreferencePage.19"), SWT.NONE, getFieldEditorParent()); //$NON-NLS-1$
- addField(showSyncInLabels);
-
- synchronizePerspectiveSwitch= new RadioGroupFieldEditor(SYNCHRONIZING_COMPLETE_PERSPECTIVE, Policy.bind("SyncViewerPreferencePage.13"), 3, //$NON-NLS-1$
- new String[][] {
- {Policy.bind("SyncViewerPreferencePage.14"), MessageDialogWithToggle.ALWAYS}, //$NON-NLS-1$
- {Policy.bind("SyncViewerPreferencePage.42"), MessageDialogWithToggle.NEVER}, //$NON-NLS-1$
- {Policy.bind("SyncViewerPreferencePage.16"), MessageDialogWithToggle.PROMPT} //$NON-NLS-1$
- },
- getFieldEditorParent(), true);
- addField(synchronizePerspectiveSwitch);
-
- Group perspectiveGroup = createGroup(getFieldEditorParent(), Policy.bind("SyncViewerPreferencePage.15")); //$NON-NLS-1$
-
- createLabel(perspectiveGroup, Policy.bind("SynchronizationViewPreference.defaultPerspectiveDescription"), 1); //$NON-NLS-1$
-
- handleDeletedPerspectives();
- String[][] perspectiveNamesAndIds = getPerspectiveNamesAndIds();
- ComboFieldEditor comboEditor= new ComboFieldEditor(
- SYNCVIEW_DEFAULT_PERSPECTIVE,
- Policy.bind("SynchronizationViewPreference.defaultPerspectiveLabel"), //$NON-NLS-1$
- perspectiveNamesAndIds,
- perspectiveGroup);
- addField(comboEditor);
-
- Dialog.applyDialogFont(getFieldEditorParent());
- updateLayout(perspectiveGroup);
- getFieldEditorParent().layout(true);
- }
-
- private Label createLabel(Composite parent, String title, int spacer) {
- GridData data;
- Label l = new Label(parent, SWT.WRAP);
- l.setFont(parent.getFont());
- data = new GridData();
- data.horizontalSpan = 2;
- if(spacer != 0) {
- data.verticalSpan = spacer;
- }
- data.horizontalAlignment = GridData.FILL;
- l.setLayoutData(data);
- if(title != null) {
- l.setText(title); //$NON-NLS-1$
- }
- return l;
- }
-
- private Group createGroup(Composite parent, String title) {
- Group display = new Group(parent, SWT.NONE);
- updateLayout(display);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- data.horizontalAlignment = GridData.FILL;
- display.setLayoutData(data);
- display.setText(title);
- return display;
- }
-
- private void updateLayout(Composite composite) {
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = 5;
- layout.marginHeight =5;
- layout.horizontalSpacing = 5;
- layout.verticalSpacing = 5;
- composite.setLayout(layout);
- }
-
- private void updateLastRunTime(Label label) {
- String text;
- long mills = 0;
- if(mills == 0) {
- String never = Policy.bind("SyncViewPreferencePage.lastRefreshRunNever"); //$NON-NLS-1$
- text = Policy.bind("SyncViewPreferencePage.lastRefreshRun", never); //$NON-NLS-1$
- } else {
- Date lastTimeRun = new Date(mills);
- String sLastTimeRun = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT).format(lastTimeRun);
- text = Policy.bind("SyncViewPreferencePage.lastRefreshRun", sLastTimeRun); //$NON-NLS-1$
- }
- label.setText(text);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
- public void init(IWorkbench workbench) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- //if(event.getSource() == bkgScheduledRefresh || event.getSource() == scheduledDelay) {
- // updateEnablements();
- // }
- super.propertyChange(event);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- public boolean performOk() {
- TeamUIPlugin.getPlugin().savePluginPreferences();
- return super.performOk();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditorPreferencePage#checkState()
- */
- protected void initialize() {
- super.initialize();
- updateEnablements();
- }
-
- protected void updateEnablements() {
- //boolean enabled = bkgScheduledRefresh.getBooleanValue();
- //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] = Policy.bind("SynchronizationViewPreference.defaultPerspectiveNone"); //$NON-NLS-1$;
- table[0][1] = SYNCVIEW_DEFAULT_PERSPECTIVE_NONE;
- for (int i = 0; i < perspectiveDescriptors.length; i++) {
- table[i + 1][0] = perspectiveDescriptors[i].getLabel();
- table[i + 1][1] = perspectiveDescriptors[i].getId();
- }
- return table;
- }
-
- private static void handleDeletedPerspectives() {
- IPreferenceStore store= TeamUIPlugin.getPlugin().getPreferenceStore();
- String id= store.getString(SYNCVIEW_DEFAULT_PERSPECTIVE);
- if (PlatformUI.getWorkbench().getPerspectiveRegistry().findPerspectiveWithId(id) == null) {
- store.putValue(SYNCVIEW_DEFAULT_PERSPECTIVE, SYNCVIEW_DEFAULT_PERSPECTIVE_NONE);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TeamPreferencePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TeamPreferencePage.java
deleted file mode 100644
index c65178491..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TeamPreferencePage.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.preferences;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class TeamPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
- Button syncModeButton;
-
- public TeamPreferencePage() {
- setDescription(Policy.bind("TeamPreferencePage.General_settings_for_Team_support_1")); //$NON-NLS-1$
- }
-
- /**
- * @see PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
-
- // set F1 help
- WorkbenchHelp.setHelp(composite, IHelpContextIds.TEAM_PREFERENCE_PAGE);
-
- // GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- composite.setLayout(layout);
-
- // GridData
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- composite.setLayoutData(data);
-
- // Create the checkbox for sync mode
- syncModeButton = createCheckBox(composite, Policy.bind("TeamPreferencePage.&Use_Incoming/Outgoing_mode_when_synchronizing_2")); //$NON-NLS-1$
-
- initializeValues();
- Dialog.applyDialogFont(parent);
- return composite;
- }
- /**
- * Creates an new checkbox instance and sets the default
- * layout data.
- *
- * @param group the composite in which to create the checkbox
- * @param label the string to set into the checkbox
- * @return the new checkbox
- */
- private Button createCheckBox(Composite group, String label) {
- Button button = new Button(group, SWT.CHECK | SWT.LEFT);
- button.setText(label);
- GridData data = new GridData();
- data.horizontalSpan = 1;
- button.setLayoutData(data);
- return button;
- }
- /**
- * Returns preference store that belongs to the our plugin.
- * This is important because we want to store
- * our preferences separately from the desktop.
- *
- * @return the preference store for this plugin
- */
- protected IPreferenceStore doGetPreferenceStore() {
- return TeamUIPlugin.getPlugin().getPreferenceStore();
- }
- /**
- * Defaults was clicked. Restore the CVS preferences to
- * their default values
- */
- protected void performDefaults() {
- super.performDefaults();
- IPreferenceStore store = getPreferenceStore();
- //syncModeButton.setSelection(store.getDefaultBoolean(ISharedImages.PREF_ALWAYS_IN_INCOMING_OUTGOING));
- }
- /**
- * OK was clicked. Store the CVS preferences.
- *
- * @return whether it is okay to close the preference page
- */
- public boolean performOk() {
- IPreferenceStore store = getPreferenceStore();
- //store.setValue(ISharedImages.PREF_ALWAYS_IN_INCOMING_OUTGOING, syncModeButton.getSelection());
- TeamUIPlugin.getPlugin().savePluginPreferences();
- return true;
- }
- /**
- * Initializes states of the controls from the preference store.
- */
- private void initializeValues() {
- IPreferenceStore store = getPreferenceStore();
- //syncModeButton.setSelection(store.getBoolean(ISharedImages.PREF_ALWAYS_IN_INCOMING_OUTGOING));
- }
- /**
- * @see IWorkbenchPreferencePage#init(IWorkbench)
- */
- public void init(IWorkbench workbench) {
- }
-}
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
deleted file mode 100644
index 7aca276af..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/TextPreferencePage.java
+++ /dev/null
@@ -1,375 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.preferences;
-
-
-import java.util.*;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.TableEditor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.IFileTypeInfo;
-import org.eclipse.team.core.Team;
-import org.eclipse.team.internal.ui.IHelpContextIds;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.help.WorkbenchHelp;
-/**
- * This preference page displays all patterns which determine whether a resource
- * is to be treated as a text file or not. The page allows the user to add or
- * remove entries from this table, and change their values from Text to Binary.
- */
-public class TextPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
- // Some string constants for display purposes
- private static final String TEXT = Policy.bind("TextPreferencePage.text"); //$NON-NLS-1$
- private static final String BINARY = Policy.bind("TextPreferencePage.binary"); //$NON-NLS-1$
-
- // The input for the table viewer
- private List input;
-
- // Widgets
- private TableViewer viewer;
- private Button removeButton;
- private Button changeButton;
-
- /**
- * TableEntry is a pair of strings representing an entry in the table
- */
- class TableEntry {
- String ext;
- String value;
- public TableEntry(String ext, String value) {
- this.ext = ext;
- this.value = value;
- }
- public String getExtension() {
- return ext;
- }
- public String getValue() {
- return value;
- }
- public void setValue(String value) {
- this.value = value;
- }
- }
- /**
- * TableLabelProvider provides labels for TableEntrys.
- */
- class TableLabelProvider extends LabelProvider implements ITableLabelProvider {
- public String getColumnText(Object element, int columnIndex) {
- TableEntry entry = (TableEntry)element;
- switch (columnIndex) {
- case 0:
- return entry.getExtension();
- case 1:
- return entry.getValue();
- default:
- return null;
- }
- }
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
- };
-
- /*
- * Method declared on IWorkbenchPreferencePage
- */
- public void init(IWorkbench workbench) {
- }
- /*
- * @see PreferencePage#createControl
- */
- protected Control createContents(Composite ancestor) {
-
- Composite parent = new Composite(ancestor, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.numColumns = 2;
- parent.setLayout(layout);
-
- // set F1 help
- WorkbenchHelp.setHelp(parent, IHelpContextIds.FILE_TYPE_PREFERENCE_PAGE);
-
- Label l1 = new Label(parent, SWT.NULL);
- l1.setText(Policy.bind("TextPreferencePage.description")); //$NON-NLS-1$
- GridData data = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
- data.horizontalSpan = 2;
- l1.setLayoutData(data);
-
- viewer = new TableViewer(parent, SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- Table table = viewer.getTable();
- new TableEditor(table);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.widthHint = convertWidthInCharsToPixels(30);
- /*
- * The hardcoded hint does not look elegant, but in reality
- * it does not make anything bound to this 100-pixel value,
- * because in any case the tree on the left is taller and
- * that's what really determines the height.
- */
- gd.heightHint = 100;
- table.setLayoutData(gd);
- table.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- handleSelection();
- }
- });
- // Create the table columns
- new TableColumn(table, SWT.NULL);
- new TableColumn(table, SWT.NULL);
- TableColumn[] columns = table.getColumns();
- columns[0].setText(Policy.bind("TextPreferencePage.extension")); //$NON-NLS-1$
- columns[1].setText(Policy.bind("TextPreferencePage.contents")); //$NON-NLS-1$
-
- CellEditor editor = new ComboBoxCellEditor(table, new String[] {TEXT, BINARY});
- viewer.setCellEditors(new CellEditor[] {null, editor});
- viewer.setColumnProperties(new String[] {"extension", "contents"}); //$NON-NLS-1$ //$NON-NLS-2$
- viewer.setCellModifier(new ICellModifier() {
- public Object getValue(Object element, String property) {
- String value = ((TableEntry)element).getValue();
- if (value.equals(TEXT)) {
- return new Integer(0);
- } else {
- return new Integer(1);
- }
- }
- public boolean canModify(Object element, String property) {
- return true;
- }
- public void modify(Object element, String property, Object value) {
- IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
- TableEntry entry = (TableEntry)selection.getFirstElement();
- if (((Integer)value).intValue() == 0) {
- entry.setValue(TEXT);
- } else {
- entry.setValue(BINARY);
- }
- viewer.refresh(entry);
- }
- });
- viewer.setLabelProvider(new TableLabelProvider());
- viewer.setContentProvider(new IStructuredContentProvider() {
- public void dispose() {
- }
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
- public Object[] getElements(Object inputElement) {
- if (inputElement == null) return null;
- return ((List)inputElement).toArray();
- }
- });
- viewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- ISelection selection = event.getSelection();
- if (selection == null || !(selection instanceof IStructuredSelection)) {
- return;
- }
- viewer.editElement(((IStructuredSelection)selection).getFirstElement(), 1);
- }
- });
- viewer.setSorter(new ViewerSorter() {
- public int compare(Viewer viewer, Object e1, Object e2) {
- TableEntry entry1 = (TableEntry)e1;
- TableEntry entry2 = (TableEntry)e2;
- return super.compare(viewer, entry1.getExtension(), entry2.getExtension());
- }
- });
- TableLayout tl = new TableLayout();
- tl.addColumnData(new ColumnWeightData(50));
- tl.addColumnData(new ColumnWeightData(50));
- table.setLayout(tl);
-
- 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);
-
- Button addButton = new Button(buttons, SWT.PUSH);
- addButton.setText(Policy.bind("TextPreferencePage.add")); //$NON-NLS-1$
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, addButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- addButton.setLayoutData(data);
- addButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- addPattern();
- }
- });
-
- removeButton= new Button(buttons, SWT.PUSH);
- removeButton.setText(Policy.bind("TextPreferencePage.remove")); //$NON-NLS-1$
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
- widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, removeButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- removeButton.setLayoutData(data);
- removeButton.setEnabled(false);
- removeButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- removePattern();
- }
- });
-
- changeButton = new Button(buttons, SWT.PUSH);
- changeButton.setText(Policy.bind("TextPreferencePage.change")); //$NON-NLS-1$
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
- widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, changeButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- changeButton.setLayoutData(data);
- changeButton.setEnabled(false);
- changeButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- changePattern();
- }
- });
- fillTable(Team.getAllTypes());
- Dialog.applyDialogFont(parent);
- return parent;
- }
-
- protected void performDefaults() {
- super.performDefaults();
- IFileTypeInfo[] infos = Team.getDefaultTypes();
- fillTable(infos);
- }
-
- /**
- * Do anything necessary because the OK button has been pressed.
- *
- * @return whether it is okay to close the preference page
- */
- public boolean performOk() {
- int size = input.size();
- String[] extensions = new String[size];
- int[] types = new int[size];
- int i = 0;
-
- Iterator it = input.iterator();
- while (it.hasNext()) {
- TableEntry entry = (TableEntry)it.next();
- String value = entry.getValue();
- if (value.equals(TEXT)) {
- types[i] = Team.TEXT;
- } else {
- types[i] = Team.BINARY;
- }
- extensions[i] = entry.getExtension();
- i++;
- }
- Team.setAllTypes(extensions, types);
- return true;
- }
- /**
- * Fill the table with the values from the file type registry
- */
- private void fillTable(IFileTypeInfo[] infos) {
- this.input = new ArrayList();
- for (int i = 0; i < infos.length; i++) {
- IFileTypeInfo info = infos[i];
- int type = info.getType();
- switch (type) {
- case Team.TEXT:
- input.add(new TableEntry(info.getExtension(), TEXT));
- break;
- case Team.BINARY:
- input.add(new TableEntry(info.getExtension(), BINARY));
- break;
- }
- }
- viewer.setInput(input);
- }
- /**
- * Add a new item to the table with the default type of Text.
- */
- private void addPattern() {
- InputDialog dialog = new InputDialog(getShell(), Policy.bind("TextPreferencePage.enterExtensionShort"), Policy.bind("TextPreferencePage.enterExtensionLong"), null, null); //$NON-NLS-1$ //$NON-NLS-2$
- dialog.open();
- if (dialog.getReturnCode() != InputDialog.OK) return;
- String pattern = dialog.getValue();
- if (pattern.equals("")) return; //$NON-NLS-1$
- // Check if the item already exists
- Iterator it = input.iterator();
- while (it.hasNext()) {
- TableEntry entry = (TableEntry)it.next();
- if (entry.getExtension().equals(pattern)) {
- MessageDialog.openWarning(getShell(), Policy.bind("TextPreferencePage.extensionExistsShort"), Policy.bind("TextPreferencePage.extensionExistsLong")); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- }
- input.add(new TableEntry(pattern, TEXT));
- viewer.refresh();
- }
- /**
- * Remove the selected items from the table
- */
- private void removePattern() {
- ISelection selection = viewer.getSelection();
- if (selection == null || !(selection instanceof IStructuredSelection)) {
- return;
- }
- IStructuredSelection ss = (IStructuredSelection)selection;
- Iterator it = ss.iterator();
- while (it.hasNext()) {
- TableEntry entry = (TableEntry)it.next();
- input.remove(entry);
- }
- viewer.refresh();
- }
- /**
- * Toggle the selected items' content types
- */
- private void changePattern() {
- ISelection selection = viewer.getSelection();
- if (selection == null || !(selection instanceof IStructuredSelection)) {
- return;
- }
- IStructuredSelection ss = (IStructuredSelection)selection;
- Iterator it = ss.iterator();
- while (it.hasNext()) {
- TableEntry entry = (TableEntry)it.next();
- String string = entry.getValue();
- if (string.equals(TEXT)) {
- entry.setValue(BINARY);
- } else {
- entry.setValue(TEXT);
- }
- viewer.refresh(entry);
- }
- }
- /**
- * The table viewer selection has changed. Update the remove and change button enablement.
- */
- private void handleSelection() {
- boolean empty = viewer.getSelection().isEmpty();
- removeButton.setEnabled(!empty);
- changeButton.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
deleted file mode 100644
index 5768755f7..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/RegistryReader.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.registry;
-
-import java.util.Hashtable;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.team.internal.ui.Utils.Sorter;
-import org.eclipse.ui.internal.WorkbenchPlugin;
-
-public abstract class RegistryReader {
- protected static final String TAG_DESCRIPTION = "description"; //$NON-NLS-1$
- protected static Hashtable extensionPoints = new Hashtable();
- /**
- * The constructor.
- */
- protected RegistryReader() {
- }
- /**
- * This method extracts description as a subelement of the given element.
- *
- * @return description string if defined, or empty string if not.
- */
- protected String getDescription(IConfigurationElement config) {
- IConfigurationElement[] children = config.getChildren(TAG_DESCRIPTION);
- if (children.length >= 1) {
- return children[0].getValue();
- }
- return ""; //$NON-NLS-1$
- }
- /**
- * Logs the error in the workbench log using the provided text and the
- * information in the configuration element.
- */
- protected void logError(IConfigurationElement element, String text) {
- IExtension extension = element.getDeclaringExtension();
- IPluginDescriptor descriptor = extension.getDeclaringPluginDescriptor();
- StringBuffer buf = new StringBuffer();
- buf.append("Plugin " + descriptor.getUniqueIdentifier() + ", extension " + extension.getExtensionPointUniqueIdentifier()); //$NON-NLS-2$//$NON-NLS-1$
- buf.append("\n" + text); //$NON-NLS-1$
- WorkbenchPlugin.log(buf.toString());
- }
- /**
- * Logs a very common registry error when a required attribute is missing.
- */
- protected void logMissingAttribute(IConfigurationElement element, String attributeName) {
- logError(element, "Required attribute '" + attributeName + "' not defined"); //$NON-NLS-2$//$NON-NLS-1$
- }
-
- /**
- * Logs a very common registry error when a required child is missing.
- */
- protected void logMissingElement(IConfigurationElement element, String elementName) {
- logError(element, "Required sub element '" + elementName + "' not defined"); //$NON-NLS-2$//$NON-NLS-1$
- }
-
- /**
- * Logs a registry error when the configuration element is unknown.
- */
- protected void logUnknownElement(IConfigurationElement element) {
- logError(element, "Unknown extension tag found: " + element.getName()); //$NON-NLS-1$
- }
- /**
- * Apply a reproducable order to the list of extensions provided, such that
- * the order will not change as extensions are added or removed.
- */
- protected IExtension[] orderExtensions(IExtension[] extensions) {
- // By default, the order is based on plugin id sorted
- // in ascending order. The order for a plugin providing
- // more than one extension for an extension point is
- // dependent in the order listed in the XML file.
- Sorter sorter = new Sorter() {
- public boolean compare(Object extension1, Object extension2) {
- String s1 = ((IExtension) extension1).getDeclaringPluginDescriptor().getUniqueIdentifier();
- String s2 = ((IExtension) extension2).getDeclaringPluginDescriptor().getUniqueIdentifier();
- //Return true if elementTwo is 'greater than' elementOne
- return s2.compareToIgnoreCase(s1) > 0;
- }
- };
-
- Object[] sorted = sorter.sort(extensions);
- IExtension[] sortedExtension = new IExtension[sorted.length];
- System.arraycopy(sorted, 0, sortedExtension, 0, sorted.length);
- return sortedExtension;
- }
- /**
- * 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);
- /**
- * Read the element's children. This is called by the subclass' readElement
- * method when it wants to read the children of the element.
- */
- protected void readElementChildren(IConfigurationElement element) {
- readElements(element.getChildren());
- }
- /**
- * 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) {
- for (int i = 0; i < elements.length; i++) {
- if (!readElement(elements[i]))
- logUnknownElement(elements[i]);
- }
- }
- /**
- * Read one extension by looping through its configuration elements.
- */
- protected void readExtension(IExtension extension) {
- readElements(extension.getConfigurationElements());
- }
- /**
- * Start the registry reading process using the supplied plugin ID and
- * extension point.
- */
- public void readRegistry(IPluginRegistry registry, String pluginId, String extensionPoint) {
- String pointId = pluginId + "-" + extensionPoint; //$NON-NLS-1$
- IExtension[] extensions = (IExtension[]) extensionPoints.get(pointId);
- if (extensions == null) {
- IExtensionPoint point = registry.getExtensionPoint(pluginId, extensionPoint);
- if (point == null)
- return;
- extensions = point.getExtensions();
- extensionPoints.put(pointId, extensions);
- }
- for (int i = 0; i < extensions.length; i++)
- readExtension(extensions[i]);
- }
-} \ No newline at end of file
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
deleted file mode 100644
index d8b96a3dc..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.registry;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipantDescriptor;
-
-public class SynchronizeParticipantDescriptor implements ISynchronizeParticipantDescriptor {
- 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$
- private static final String ATT_TYPE = "type"; //$NON-NLS-1$
- private static final String ATT_PERSISTENT = "persistent"; //$NON-NLS-1$
-
- private String label;
- private String className;
- private String type;
- private String id;
- private boolean persistent;
- private ImageDescriptor imageDescriptor;
- private String description;
-
- private IConfigurationElement configElement;
-
- /**
- * Create a new ViewDescriptor for an extension.
- */
- public SynchronizeParticipantDescriptor(IConfigurationElement e, String desc) throws CoreException {
- configElement = e;
- description = desc;
- loadFromExtension();
- }
-
- public IConfigurationElement getConfigurationElement() {
- return configElement;
- }
-
- /**
- * Returns this view's description. This is the value of its <code>"description"</code>
- * attribute.
- *
- * @return the description
- */
- public String getDescription() {
- return description;
- }
-
- public String getId() {
- return id;
- }
-
- public String getType() {
- return type;
- }
-
- public ImageDescriptor getImageDescriptor() {
- if (imageDescriptor != null)
- return imageDescriptor;
- String iconName = configElement.getAttribute(ATT_ICON);
- if (iconName == null)
- return null;
- imageDescriptor = TeamUIPlugin.getImageDescriptorFromExtension(configElement.getDeclaringExtension(), iconName);
- return imageDescriptor;
- }
-
- public String getName() {
- return label;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipantDescriptor#isPersistent()
- */
- public boolean isPersistent() {
- return persistent;
- }
-
- /**
- * load a view descriptor from the registry.
- */
- private void loadFromExtension() throws CoreException {
- String identifier = configElement.getAttribute(ATT_ID);
- label = configElement.getAttribute(ATT_NAME);
- className = configElement.getAttribute(ATT_CLASS);
- type = configElement.getAttribute(ATT_TYPE);
- String persistentString = configElement.getAttribute(ATT_PERSISTENT);
- if(persistentString == null) {
- persistent = true;
- } else {
- persistent = Boolean.valueOf(persistentString).booleanValue();
- }
- // Sanity check.
- if ((label == null) || (className == null) || (identifier == null)) {
- throw new CoreException(new Status(IStatus.ERROR, configElement.getDeclaringExtension().getDeclaringPluginDescriptor().getUniqueIdentifier(), 0, "Invalid extension (missing label or class name): " + identifier, //$NON-NLS-1$
- null));
- }
- id = identifier;
- }
-
- /**
- * Returns a string representation of this descriptor. For debugging
- * purposes only.
- */
- public String toString() {
- return "Synchronize Participant(" + getId() + ")"; //$NON-NLS-2$//$NON-NLS-1$
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 73ab80fe3..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantRegistry.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.registry;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-
-public class SynchronizeParticipantRegistry extends RegistryReader {
-
- private static final String TAG_SYNCPARTICIPANT = "participant"; //$NON-NLS-1$
- private Map participants = new HashMap();
-
- public SynchronizeParticipantRegistry() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.registry.RegistryReader#readElement(org.eclipse.core.runtime.IConfigurationElement)
- */
- protected boolean readElement(IConfigurationElement element) {
- if (element.getName().equals(TAG_SYNCPARTICIPANT)) {
- String descText = getDescription(element);
- SynchronizeParticipantDescriptor desc;
- try {
- desc = new SynchronizeParticipantDescriptor(element, descText);
- participants.put(desc.getId(), desc);
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- return true;
- }
- return false;
- }
-
- public SynchronizeParticipantDescriptor[] getSynchronizeParticipants() {
- return (SynchronizeParticipantDescriptor[])participants.values().toArray(new SynchronizeParticipantDescriptor[participants.size()]);
- }
-
- 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
deleted file mode 100644
index ef53295c0..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardDescription.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.registry;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.internal.WorkbenchPlugin;
-
-/**
- * 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 = WorkbenchPlugin.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.getDeclaringExtension().getDeclaringPluginDescriptor().getUniqueIdentifier(), 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;
- String iconName = configElement.getAttribute(ATT_ICON);
- if (iconName == null)
- return null;
- imageDescriptor = TeamUIPlugin.getImageDescriptorFromExtension(configElement.getDeclaringExtension(), iconName);
- return imageDescriptor;
- }
-
- public String getName() {
- return label;
- }
-
- 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
deleted file mode 100644
index 1caf7c75d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeWizardRegistry.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.registry;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-
-public class SynchronizeWizardRegistry extends RegistryReader {
-
- 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)
- */
- protected boolean readElement(IConfigurationElement element) {
- if (element.getName().equals(TAG_SYNCHRONIZE_WIZARD)) {
- String descText = getDescription(element);
- SynchronizeWizardDescription desc;
- try {
- desc = new SynchronizeWizardDescription(element, descText);
- wizards.put(desc.getId(), desc);
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- return true;
- }
- return false;
- }
-
- public SynchronizeWizardDescription[] getSynchronizeWizards() {
- return (SynchronizeWizardDescription[])wizards.values().toArray(new SynchronizeWizardDescription[wizards.size()]);
- }
-
- public SynchronizeWizardDescription find(String id) {
- return (SynchronizeWizardDescription)wizards.get(id);
- }
-
-}
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
deleted file mode 100644
index d85b8878d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActionDelegateWrapper.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.ui.IEditorActionDelegate;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * An Action that wraps IActionDelegates so they can be used programatically
- * in toolbars, etc.
- */
-public class ActionDelegateWrapper extends Action implements ISelectionChangedListener {
-
- private IActionDelegate delegate;
-
- public ActionDelegateWrapper(IActionDelegate delegate, ISynchronizePageConfiguration configuration) {
- this.delegate = delegate;
- IWorkbenchPart part = configuration.getSite().getPart();
- if(part != null) {
- if (delegate instanceof IObjectActionDelegate) {
- ((IObjectActionDelegate)delegate).setActivePart(this, part);
- }
- if (part instanceof IViewPart
- && delegate instanceof IViewActionDelegate) {
- ((IViewActionDelegate)delegate).init((IViewPart)part);
- }
- if (part instanceof IEditorPart
- && delegate instanceof IViewActionDelegate) {
- ((IEditorActionDelegate)delegate).setActiveEditor(this, (IEditorPart)part);
- }
- }
- initialize(configuration);
- }
-
- /**
- * Method invoked from the constructor when a configuration is provided.
- * The default implementation registers the action as a selection change
- * listener. Subclass may override.
- * @param configuration the synchronize page configuration
- */
- protected void initialize(final ISynchronizePageConfiguration configuration) {
- configuration.getSite().getSelectionProvider().addSelectionChangedListener(this);
- configuration.getPage().getViewer().getControl().addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- configuration.getSite().getSelectionProvider().removeSelectionChangedListener(ActionDelegateWrapper.this);
- }
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
- public void selectionChanged(SelectionChangedEvent event) {
- getDelegate().selectionChanged(this, event.getSelection());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- getDelegate().run(this);
- }
-
- /**
- * Return the delegate associated with this action.
- * @return the delegate associated with this action
- */
- public IActionDelegate getDelegate() {
- return delegate;
- }
-
-}
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
deleted file mode 100644
index 3d3c5c919..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ChangesSection.java
+++ /dev/null
@@ -1,343 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.ITeamStatus;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.forms.HyperlinkGroup;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Hyperlink;
-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.0
- */
-public class ChangesSection extends Composite {
-
- private ISynchronizeParticipant participant;
- private SyncInfoSetSynchronizePage page;
- 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;
-
- /**
- * Shows message to user is no changes are to be shown in the diff
- * tree viewer.
- */
- private Composite filteredContainer;
-
- /**
- * Diff tree viewer that shows synchronization changes. This is created
- * by the participant.
- */
- private Viewer changesViewer;
-
- /**
- * Boolean that indicates whether the error page is being shown.
- * This is used to avoid redrawing the error page when new events come in
- */
- private boolean showingError;
-
- /**
- * Register an action contribution in order to receive model
- * change notification so that we can update message to user and totals.
- */
- private SynchronizePageActionGroup changedListener = new SynchronizePageActionGroup() {
- public void modelChanged(ISynchronizeModelElement root) {
- calculateDescription();
- }
- };
-
- /**
- * Listener registered with the subscriber sync info set which contains
- * all out-of-sync resources for the subscriber.
- */
- private ISyncInfoSetChangeListener subscriberListener = new ISyncInfoSetChangeListener() {
- public void syncInfoSetReset(SyncInfoSet set, IProgressMonitor monitor) {
- // Handled by output set listener
- }
- public void syncInfoChanged(ISyncInfoSetChangeEvent event, IProgressMonitor monitor) {
- calculateDescription();
- }
- public void syncInfoSetErrors(SyncInfoSet set, ITeamStatus[] errors, IProgressMonitor monitor) {
- // Handled by output set listener
- }
- };
-
- /**
- * Listener registered with the output sync info set which contains
- * only the visible sync info.
- */
- private ISyncInfoSetChangeListener outputSetListener = new ISyncInfoSetChangeListener() {
- public void syncInfoSetReset(SyncInfoSet set, IProgressMonitor monitor) {
- calculateDescription();
- }
- public void syncInfoChanged(ISyncInfoSetChangeEvent event, IProgressMonitor monitor) {
- // Input changed listener will call calculateDescription()
- // The input will then react to output set changes
- }
- public void syncInfoSetErrors(SyncInfoSet set, ITeamStatus[] errors, IProgressMonitor monitor) {
- calculateDescription();
- }
- };
- private ISynchronizePageConfiguration configuration;
-
- /**
- * Create a changes section on the following page.
- *
- * @param parent the parent control
- * @param page the page showing this section
- */
- public ChangesSection(Composite parent, SyncInfoSetSynchronizePage page, ISynchronizePageConfiguration configuration) {
- super(parent, SWT.NONE);
- this.page = page;
- this.configuration = configuration;
- this.participant = configuration.getParticipant();
-
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.grabExcessVerticalSpace = true;
- setLayoutData(data);
-
- forms = new FormToolkit(parent.getDisplay());
- forms.setBackground(getBackgroundColor());
- HyperlinkGroup group = forms.getHyperlinkGroup();
- group.setBackground(getBackgroundColor());
-
- changesSectionContainer = new PageBook(this, SWT.NONE);
- data = new GridData(GridData.FILL_BOTH);
- data.grabExcessHorizontalSpace = true;
- data.grabExcessVerticalSpace = true;
- changesSectionContainer.setLayoutData(data);
- }
-
- public Composite getComposite() {
- return changesSectionContainer;
- }
-
- public void setViewer(Viewer viewer) {
- this.changesViewer = viewer;
- calculateDescription();
- configuration.addActionContribution(changedListener);
- getWorkingSetSyncInfoSet().addSyncSetChangedListener(subscriberListener);
- getSyncInfoTree().addSyncSetChangedListener(outputSetListener);
- }
-
- private void calculateDescription() {
- SyncInfoTree syncInfoTree = getSyncInfoTree();
- if (syncInfoTree.getErrors().length > 0) {
- if (!showingError) {
- TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- if (changesSectionContainer.isDisposed()) return;
- if(filteredContainer != null) {
- filteredContainer.dispose();
- filteredContainer = null;
- }
- filteredContainer = getErrorComposite(changesSectionContainer);
- changesSectionContainer.showPage(filteredContainer);
- showingError = true;
- }
- });
- }
- return;
- }
-
- showingError = false;
- if(syncInfoTree.size() == 0) {
- TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- if (changesSectionContainer.isDisposed()) return;
- if(filteredContainer != null) {
- filteredContainer.dispose();
- filteredContainer = null;
- }
- filteredContainer = getEmptyChangesComposite(changesSectionContainer);
- changesSectionContainer.showPage(filteredContainer);
- }
- });
- } else {
- TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- if(filteredContainer != null) {
- filteredContainer.dispose();
- filteredContainer = null;
- }
- Control control = changesViewer.getControl();
- if (!changesSectionContainer.isDisposed() && !control.isDisposed()) {
- changesSectionContainer.showPage(control);
- }
- }
- });
- }
- }
-
- private boolean isThreeWay() {
- return ISynchronizePageConfiguration.THREE_WAY.equals(configuration.getComparisonType());
- }
-
- private Composite getEmptyChangesComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setBackground(getBackgroundColor());
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.grabExcessVerticalSpace = true;
- composite.setLayoutData(data);
-
- if(! isThreeWay()) {
- createDescriptionLabel(composite,Policy.bind("ChangesSection.noChanges", participant.getName())); //$NON-NLS-1$
- return composite;
- }
-
- SyncInfoSet workingSet = getWorkingSetSyncInfoSet();
- SyncInfoSet filteredSet = getSyncInfoTree();
-
- int changesInWorkingSet = workingSet.size();
- int changesInFilter = filteredSet.size();
-
- long outgoingChanges = workingSet.countFor(SyncInfo.OUTGOING, SyncInfo.DIRECTION_MASK);
- long incomingChanges = workingSet.countFor(SyncInfo.INCOMING, SyncInfo.DIRECTION_MASK);
-
- if(changesInFilter == 0 && changesInWorkingSet != 0) {
- final int newMode = outgoingChanges != 0 ? ISynchronizePageConfiguration.OUTGOING_MODE : ISynchronizePageConfiguration.INCOMING_MODE;
- long numChanges = outgoingChanges != 0 ? outgoingChanges : incomingChanges;
- StringBuffer text = new StringBuffer();
- text.append(Policy.bind("ChangesSection.filterHides", Utils.modeToString(configuration.getMode()))); //$NON-NLS-1$
- if(numChanges > 1) {
- text.append(Policy.bind("ChangesSection.filterHidesPlural", Long.toString(numChanges), Utils.modeToString(newMode))); //$NON-NLS-1$
- } else {
- text.append(Policy.bind("ChangesSection.filterHidesSingular", Long.toString(numChanges), Utils.modeToString(newMode))); //$NON-NLS-1$
- }
-
- Label warning = new Label(composite, SWT.NONE);
- warning.setImage(Dialog.getImage(Dialog.DLG_IMG_MESSAGE_WARNING));
-
- Hyperlink link = forms.createHyperlink(composite, Policy.bind("ChangesSection.filterChange", Utils.modeToString(newMode)), SWT.WRAP); //$NON-NLS-1$
- link.addHyperlinkListener(new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
- configuration.setMode(newMode);
- }
- });
- forms.getHyperlinkGroup().add(link);
- createDescriptionLabel(composite, text.toString());
- } else {
- createDescriptionLabel(composite,Policy.bind("ChangesSection.noChanges", participant.getName())); //$NON-NLS-1$
- }
- return composite;
- }
-
- private Label createDescriptionLabel(Composite parent, String text) {
- Label description = new Label(parent, SWT.WRAP);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- data.widthHint = 100;
- description.setLayoutData(data);
- description.setText(text);
- description.setBackground(getBackgroundColor());
- return description;
- }
-
- public void dispose() {
- super.dispose();
- forms.dispose();
- configuration.removeActionContribution(changedListener);
- getWorkingSetSyncInfoSet().removeSyncSetChangedListener(subscriberListener);
- }
-
- private Composite getErrorComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setBackground(getBackgroundColor());
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.grabExcessVerticalSpace = true;
- composite.setLayoutData(data);
-
- Hyperlink link = new Hyperlink(composite, SWT.WRAP);
- link.setText(Policy.bind("ChangesSection.8")); //$NON-NLS-1$
- link.addHyperlinkListener(new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
- showErrors();
- }
- });
- link.setBackground(getBackgroundColor());
- link.setUnderlined(true);
-
- link = new Hyperlink(composite, SWT.WRAP);
- link.setText(Policy.bind("ChangesSection.9")); //$NON-NLS-1$
- link.addHyperlinkListener(new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
- page.reset();
- }
- });
- link.setBackground(getBackgroundColor());
- link.setUnderlined(true);
-
- createDescriptionLabel(composite, Policy.bind("ChangesSection.10", participant.getName())); //$NON-NLS-1$
-
- return composite;
- }
-
- /* private */ void showErrors() {
- ITeamStatus[] status = getSyncInfoTree().getErrors();
- String title = Policy.bind("ChangesSection.11"); //$NON-NLS-1$
- if (status.length == 1) {
- ErrorDialog.openError(getShell(), title, status[0].getMessage(), status[0]);
- } else {
- MultiStatus multi = new MultiStatus(TeamUIPlugin.ID, 0, status, Policy.bind("ChangesSection.12"), null); //$NON-NLS-1$
- ErrorDialog.openError(getShell(), title, null, multi);
- }
- }
-
- protected Color getBackgroundColor() {
- return getShell().getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
- }
-
- private SyncInfoTree getSyncInfoTree() {
- return (SyncInfoTree)configuration.getProperty(ISynchronizePageConfiguration.P_SYNC_INFO_SET);
- }
-
- private SyncInfoSet getWorkingSetSyncInfoSet() {
- return (SyncInfoSet)configuration.getProperty(SynchronizePageConfiguration.P_WORKING_SET_SYNC_INFO_SET);
- }
-
- private SyncInfoSet getParticpantSyncInfoSet() {
- return (SyncInfoSet)configuration.getProperty(SynchronizePageConfiguration.P_PARTICIPANT_SYNC_INFO_SET);
- }
-} \ No newline at end of file
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
deleted file mode 100644
index e986c0e2c..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompressedFoldersModelProvider.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import java.util.*;
-
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-public class CompressedFoldersModelProvider extends HierarchicalModelProvider {
-
- protected class UnchangedCompressedDiffNode extends UnchangedResourceModelElement {
- public UnchangedCompressedDiffNode(IDiffContainer parent, IResource resource) {
- super(parent, resource);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.DiffNode#getName()
- */
- public String getName() {
- IResource resource = getResource();
- return resource.getProjectRelativePath().toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SyncInfoModelElement#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_COMPRESSED_FOLDER);
- }
- }
-
- /**
- * A compressed folder appears under a project and contains out-of-sync resources
- */
- public class CompressedFolderDiffNode extends SyncInfoModelElement {
-
- public CompressedFolderDiffNode(IDiffContainer parent, SyncInfo info) {
- super(parent, info);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.DiffNode#getName()
- */
- public String getName() {
- IResource resource = getResource();
- return resource.getProjectRelativePath().toString();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SyncInfoModelElement#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- return TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_COMPRESSED_FOLDER);
- }
- }
-
- public static class CompressedFolderModelProviderDescriptor implements ISynchronizeModelProviderDescriptor {
- public static final String ID = TeamUIPlugin.ID + ".modelprovider_compressedfolders";
- public String getId() {
- return ID;
- }
- public String getName() {
- return "Compressed Folders";
- }
- public ImageDescriptor getImageDescriptor() {
- return TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_COMPRESSED_FOLDER);
- }
- };
- private static final CompressedFolderModelProviderDescriptor compressedDescriptor = new CompressedFolderModelProviderDescriptor();
-
- public CompressedFoldersModelProvider(ISynchronizePageConfiguration configuration, SyncInfoTree set) {
- super(configuration, set);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.HierarchicalModelProvider#getDescriptor()
- */
- public ISynchronizeModelProviderDescriptor getDescriptor() {
- return compressedDescriptor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SyncInfoDiffNodeRoot#getSorter()
- */
- public ViewerSorter getViewerSorter() {
- return new SynchronizeModelElementSorter() {
- protected int compareNames(IResource resource1, IResource resource2) {
- if (resource1.getType() == IResource.FOLDER && resource2.getType() == IResource.FOLDER) {
- return collator.compare(resource1.getProjectRelativePath().toString(), resource2.getProjectRelativePath().toString());
- }
- return super.compareNames(resource1, resource2);
- }
- };
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.viewers.HierarchicalModelProvider#createModelObjects(org.eclipse.compare.structuremergeviewer.DiffNode)
- */
- protected IDiffElement[] createModelObjects(ISynchronizeModelElement container) {
- IResource resource = null;
- if (container == getModelRoot()) {
- resource = ResourcesPlugin.getWorkspace().getRoot();
- } else {
- resource = container.getResource();
- }
- if(resource != null) {
- if (resource.getType() == IResource.PROJECT) {
- return getProjectChildren(container, (IProject)resource);
- }
- if (resource.getType() == IResource.FOLDER) {
- return getFolderChildren(container, resource);
- }
- }
- return super.createModelObjects(container);
- }
-
- private IDiffElement[] getFolderChildren(ISynchronizeModelElement parent, IResource resource) {
- // Folders will only contain out-of-sync children
- IResource[] children = getSyncInfoTree().members(resource);
- List result = new ArrayList();
- for (int i = 0; i < children.length; i++) {
- IResource child = children[i];
- if (child.getType() == IResource.FILE) {
- result.add(createModelObject(parent, child));
- }
- }
- return (IDiffElement[])result.toArray(new IDiffElement[result.size()]);
- }
-
- private IDiffElement[] getProjectChildren(ISynchronizeModelElement parent, IProject project) {
- // 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();
- Set resourcesToShow = new HashSet();
- for (int i = 0; i < outOfSync.length; i++) {
- SyncInfo info = outOfSync[i];
- IResource local = info.getLocal();
- if (local.getProjectRelativePath().segmentCount() == 1 && local.getType() == IResource.FILE) {
- resourcesToShow.add(local);
- } else {
- if (local.getType() == IResource.FILE) {
- resourcesToShow.add(local.getParent());
- } else if (local.getType() == IResource.FOLDER){
- resourcesToShow.add(local);
- }
- }
- }
- for (Iterator iter = resourcesToShow.iterator(); iter.hasNext();) {
- 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)
- */
- protected ISynchronizeModelElement createModelObject(ISynchronizeModelElement parent, IResource resource) {
- if (resource.getType() == IResource.FOLDER) {
- SyncInfo info = getSyncInfoTree().getSyncInfo(resource);
- ISynchronizeModelElement newNode;
- if(info != null) {
- newNode = new CompressedFolderDiffNode(parent, info);
- } else {
- newNode = new UnchangedCompressedDiffNode(parent, resource);
- }
- addToViewer(newNode);
- return newNode;
- }
- 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>.
- * Subclasses may override.
- * @param event
- */
- protected void handleResourceAdditions(ISyncInfoTreeChangeEvent event) {
- SyncInfo[] infos = event.getAddedResources();
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- addResource(info);
- }
- }
-
- private void addResource(SyncInfo info) {
- IResource local = info.getLocal();
- ISynchronizeModelElement existingNode = getModelObject(local);
- if (existingNode == null) {
- if (local.getType() == IResource.FILE) {
- ISynchronizeModelElement parentNode = getModelObject(local.getParent());
- if (parentNode == null) {
- ISynchronizeModelElement projectNode = getModelObject(local.getProject());
- if (projectNode == null) {
- projectNode = createModelObject(getModelRoot(), local.getProject());
- }
- if (local.getParent().getType() == IResource.PROJECT) {
- parentNode = projectNode;
- } else {
- parentNode = createModelObject(projectNode, local.getParent());
- }
- }
- createModelObject(parentNode, local);
- } else {
- ISynchronizeModelElement projectNode = getModelObject(local.getProject());
- if (projectNode == null) {
- projectNode = createModelObject(getModelRoot(), local.getProject());
- }
- createModelObject(projectNode, local);
- }
- } else {
- // Either The folder node was added as the parent of a newly added out-of-sync file
- // or the file was somehow already there so just refresh
- handleChange(existingNode, info);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.sync.views.SyncSetContentProvider#handleResourceRemovals(org.eclipse.team.internal.ui.sync.views.SyncSetChangedEvent)
- */
- 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++) {
- IResource resource = roots[i];
- if (resource.getType() == IResource.PROJECT) {
- removeFromViewer(resource);
- removedProjects.add(resource);
- }
- }
-
- IResource[] resources = event.getRemovedResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (!removedProjects.contains(resource.getProject())) {
- if (resource.getType() == IResource.FILE) {
- if (isCompressedParentEmpty(resource)) {
- // The parent compressed folder is also empty so remove it
- removeFromViewer(resource.getParent());
- } else {
- removeFromViewer(resource);
- }
- } else {
- // A folder has been removed (i.e. is in-sync)
- // but may still contain children
- removeFromViewer(resource);
- if (hasFileMembers((IContainer)resource)) {
- createModelObject(getModelObject(resource.getProject()), resource);
- buildModelObjects(getModelObject(resource));
- }
- }
- }
- }
- }
-
- private boolean isCompressedParentEmpty(IResource resource) {
- IContainer parent = resource.getParent();
- if (parent == null
- || parent.getType() == IResource.ROOT
- || parent.getType() == IResource.PROJECT) {
- return false;
- }
- return !hasFileMembers(parent);
- }
-
- private boolean hasFileMembers(IContainer parent) {
- // Check if the sync set has any file children of the parent
- IResource[] members = getSyncInfoTree().members(parent);
- for (int i = 0; i < members.length; i++) {
- IResource member = members[i];
- if (member.getType() == IResource.FILE) {
- return true;
- }
- }
- // The parent does not contain any files
- return false;
- }
-}
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
deleted file mode 100644
index 8e8d2fdd6..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureRefreshScheduleDialog.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.dialogs.DetailsDialog;
-
-/**
- * Dialog that allows configuring a subscriber refresh schedule.
- *
- * @since 3.0
- */
-public class ConfigureRefreshScheduleDialog extends DetailsDialog {
-
- private ConfigureSynchronizeScheduleComposite scheduleComposite;
- private SubscriberRefreshSchedule schedule;
-
- public ConfigureRefreshScheduleDialog(Shell parentShell, SubscriberRefreshSchedule schedule) {
- super(parentShell, Policy.bind("ConfigureRefreshScheduleDialog.0", schedule.getParticipant().getName())); //$NON-NLS-1$
- this.schedule = schedule;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected void createMainDialogArea(Composite parent) {
- IPageValidator validator = new IPageValidator() {
- public void setComplete(String errorMessage) {
- setPageComplete(errorMessage == null);
- setErrorMessage(errorMessage);
- }
- };
- scheduleComposite = new ConfigureSynchronizeScheduleComposite(parent, schedule, validator);
- Dialog.applyDialogFont(parent);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
- protected void okPressed() {
- scheduleComposite.saveValues();
- super.okPressed();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeDetailsButton()
- */
- protected boolean includeDetailsButton() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createDropDownDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createDropDownDialogArea(Composite parent) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#updateEnablements()
- */
- protected void updateEnablements() {
- }
-}
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
deleted file mode 100644
index 0fe5a4e1d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ConfigureSynchronizeScheduleComposite.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.Policy;
-
-/**
- * A composite that allows editing a subscriber refresh schedule. A validator can be used to allow
- * containers to show page completiong.
- *
- * @since 3.0
- */
-public class ConfigureSynchronizeScheduleComposite extends Composite {
-
- private SubscriberRefreshSchedule schedule;
- private Button userRefreshOnly;
- private Button enableBackgroundRefresh;
- private Text time;
- private Combo hoursOrSeconds;
- private String errorMessage;
- private IPageValidator validator;
-
- public ConfigureSynchronizeScheduleComposite(Composite parent, SubscriberRefreshSchedule schedule, IPageValidator validator) {
- super(parent, SWT.NONE);
- this.schedule = schedule;
- this.validator = validator;
- createMainDialogArea(parent);
- }
-
- private void initializeValues() {
- boolean enableBackground = schedule.isEnabled();
- boolean hours = false;
-
- userRefreshOnly.setSelection(! enableBackground);
- enableBackgroundRefresh.setSelection(enableBackground);
-
- long seconds = schedule.getRefreshInterval();
- if(seconds <= 60) {
- seconds = 60;
- }
-
- long minutes = seconds / 60;
-
- if(minutes >= 60) {
- minutes = minutes / 60;
- hours = true;
- }
- hoursOrSeconds.select(hours ? 0 : 1);
- time.setText(Long.toString(minutes));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
- protected void createMainDialogArea(Composite parent) {
- final GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 2;
- setLayout(gridLayout);
- setLayoutData(new GridData());
- Composite area = this;
-
- {
- final Label label = new Label(area, SWT.WRAP);
- final GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.horizontalSpan = 2;
- label.setLayoutData(gridData);
- label.setText(Policy.bind("ConfigureRefreshScheduleDialog.1", schedule.getParticipant().getName())); //$NON-NLS-1$
- }
- {
- final Label label = new Label(area, SWT.WRAP);
- final GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.horizontalSpan = 2;
- label.setLayoutData(gridData);
- label.setText(Policy.bind("ConfigureRefreshScheduleDialog.1a", SubscriberRefreshSchedule.refreshEventAsString(schedule.getLastRefreshEvent()))); //$NON-NLS-1$
- }
- {
- userRefreshOnly = new Button(area, SWT.RADIO);
- final GridData gridData = new GridData();
- gridData.horizontalSpan = 2;
- userRefreshOnly.setLayoutData(gridData);
- userRefreshOnly.setText(Policy.bind("ConfigureRefreshScheduleDialog.2")); //$NON-NLS-1$
- userRefreshOnly.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- updateEnablements();
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- });
- }
- {
- enableBackgroundRefresh = new Button(area, SWT.RADIO);
- final GridData gridData = new GridData();
- gridData.horizontalSpan = 2;
- enableBackgroundRefresh.setLayoutData(gridData);
- enableBackgroundRefresh.setText(Policy.bind("ConfigureRefreshScheduleDialog.3")); //$NON-NLS-1$
- enableBackgroundRefresh.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- updateEnablements();
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- });
- }
- {
- final Composite composite = new Composite(area, SWT.NONE);
- final GridData gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.VERTICAL_ALIGN_BEGINNING);
- gridData.horizontalSpan = 2;
- composite.setLayoutData(gridData);
- final GridLayout gridLayout_1 = new GridLayout();
- gridLayout_1.numColumns = 3;
- composite.setLayout(gridLayout_1);
- {
- final Label label = new Label(composite, SWT.NONE);
- label.setText(Policy.bind("ConfigureRefreshScheduleDialog.4")); //$NON-NLS-1$
- }
- {
- time = new Text(composite, SWT.BORDER | SWT.RIGHT);
- final GridData gridData_1 = new GridData();
- gridData_1.widthHint = 35;
- time.setLayoutData(gridData_1);
- time.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- updateEnablements();
- }
- });
- }
- {
- hoursOrSeconds = new Combo(composite, SWT.READ_ONLY);
- hoursOrSeconds.setItems(new String[] { Policy.bind("ConfigureRefreshScheduleDialog.5"), Policy.bind("ConfigureRefreshScheduleDialog.6") }); //$NON-NLS-1$ //$NON-NLS-2$
- final GridData gridData_1 = new GridData();
- gridData_1.widthHint = 75;
- hoursOrSeconds.setLayoutData(gridData_1);
- }
- }
- initializeValues();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
- public void saveValues() {
- int hours = hoursOrSeconds.getSelectionIndex();
- long seconds = Long.parseLong(time.getText());
- if(hours == 0) {
- seconds = seconds * 3600;
- } else {
- seconds = seconds * 60;
- }
- schedule.setRefreshInterval(seconds);
- if(schedule.isEnabled() != enableBackgroundRefresh.getSelection()) {
- schedule.setEnabled(enableBackgroundRefresh.getSelection(), true /* allow to start */);
- }
-
- // update schedule
- schedule.getParticipant().setRefreshSchedule(schedule);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#updateEnablements()
- */
- public void updateEnablements() {
- boolean complete = false;
- try {
- long number = Long.parseLong(time.getText());
- if(number <= 0) {
- validator.setComplete(Policy.bind("ConfigureRefreshScheduleDialog.7")); //$NON-NLS-1$
- } else {
- validator.setComplete(null);
- complete = true;
- }
- } catch (NumberFormatException e) {
- validator.setComplete(Policy.bind("ConfigureRefreshScheduleDialog.8")); //$NON-NLS-1$
- }
- time.setEnabled(enableBackgroundRefresh.getSelection());
- hoursOrSeconds.setEnabled(enableBackgroundRefresh.getSelection());
- }
-
- protected void setErrorMessage(String error) {
- this.errorMessage = error;
- }
-
- public String getErrorMessage() {
- return errorMessage;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DecoratingColorLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DecoratingColorLabelProvider.java
deleted file mode 100644
index 1b8960775..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DecoratingColorLabelProvider.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-
-/**
- * Decorating label provider that supports multiple decorators and color providers.
- *
- * @since 3.0
- */
-public class DecoratingColorLabelProvider extends DecoratingLabelProvider implements IColorProvider, IFontProvider {
-
- static class MultiLabelDecorator extends LabelProvider implements ILabelDecorator {
- private ILabelDecorator[] decorators;
-
- public MultiLabelDecorator(ILabelDecorator[] decorators) {
- this.decorators = decorators;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelDecorator#decorateImage(org.eclipse.swt.graphics.Image, java.lang.Object)
- */
- public Image decorateImage(Image image, Object element) {
- for (int i = 0; i < decorators.length; i++) {
- ILabelDecorator decorator = decorators[i];
- Image newImage = decorator.decorateImage(image, element);
- if (newImage != null) {
- image = newImage;
- }
- }
- return image;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelDecorator#decorateText(java.lang.String, java.lang.Object)
- */
- public String decorateText(String text, Object element) {
- for (int i = 0; i < decorators.length; i++) {
- ILabelDecorator decorator = decorators[i];
- String newText = decorator.decorateText(text, element);
- if (newText != null) {
- text = newText;
- }
- }
- return text;
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- */
- public void dispose() {
- for (int i = 0; i < decorators.length; i++) {
- ILabelDecorator d = decorators[i];
- d.dispose();
- }
- }
- }
- public DecoratingColorLabelProvider(ILabelProvider provider, ILabelDecorator[] decorators) {
- super(provider, new MultiLabelDecorator(decorators));
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
- */
- public Color getForeground(Object element) {
- ILabelProvider p = getLabelProvider();
- if (p instanceof IColorProvider) {
- return ((IColorProvider) p).getForeground(element);
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
- */
- public Color getBackground(Object element) {
- ILabelProvider p = getLabelProvider();
- if (p instanceof IColorProvider) {
- return ((IColorProvider) p).getBackground(element);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
- */
- public Font getFont(Object element) {
- ILabelProvider p = getLabelProvider();
- if (p instanceof IFontProvider) {
- return ((IFontProvider) p).getFont(element);
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DiffNodeWorkbenchAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DiffNodeWorkbenchAdapter.java
deleted file mode 100644
index 6ebb34afd..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DiffNodeWorkbenchAdapter.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public class DiffNodeWorkbenchAdapter implements IWorkbenchAdapter {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object o) {
- DiffNode node = getDiffNode(o);
- return node != null ? node.getChildren() : new Object[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object o) {
- DiffNode node = getDiffNode(o);
- if(node instanceof ISynchronizeModelElement) {
- return ((ISynchronizeModelElement)node).getImageDescriptor(o);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
- public String getLabel(Object o) {
- DiffNode node = getDiffNode(o);
- return node != null ? node.getName() : ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
- */
- public Object getParent(Object o) {
- DiffNode node = getDiffNode(o);
- return node != null ? node.getParent() : null;
- }
-
- /*
- * Return a diff node if the input object is a diff node or null otherwise.
- */
- private DiffNode getDiffNode(Object element) {
- if(element instanceof DiffNode) {
- return (DiffNode)element;
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshResourceSelectionPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshResourceSelectionPage.java
deleted file mode 100644
index 7febaad28..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshResourceSelectionPage.java
+++ /dev/null
@@ -1,413 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import java.util.*;
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.dialogs.IWorkingSetSelectionDialog;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.internal.dialogs.ContainerCheckedTreeViewer;
-import org.eclipse.ui.model.BaseWorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.navigator.ResourceSorter;
-
-/**
- * Page that allows the user to select a set of resources that are managed by a subscriber
- * participant. Callers can provide a scope hint to determine the initial selection for the
- * resource list. By default, the resources in the current selection are checked, otherwise
- * all resources are checked.
- *
- * @see SubscriberRefreshWizard
- * @since 3.0
- */
-public class GlobalRefreshResourceSelectionPage extends WizardPage {
-
- private boolean scopeCheckingElement = false;
-
- // Set of scope hint to determine the initial selection
- private Button participantScope;
- private Button selectedResourcesScope;
- private Button workingSetScope;
- private Button selectWorkingSetButton;
-
- // The checked tree viewer
- private ContainerCheckedTreeViewer fViewer;
-
- // Working set label and holder
- private Text workingSetLabel;
- private IWorkingSet[] workingSets;
- private List resources;
-
- /**
- * Content provider that accepts a <code>SubscriberParticipant</code> as input and
- * returns the participants root resources.
- */
- class MyContentProvider extends BaseWorkbenchContentProvider {
- public Object[] getChildren(Object element) {
- if(element instanceof List) {
- return (IResource[]) ((List)element).toArray(new IResource[((List)element).size()]);
- }
- return super.getChildren(element);
- }
- }
-
- /**
- * Label decorator that will display the full path for participant roots that are folders. This
- * is useful for participants that have non-project roots.
- */
- class MyLabelProvider extends LabelProvider {
- private LabelProvider workbenchProvider = new WorkbenchLabelProvider();
- public String getText(Object element) {
- if(element instanceof IContainer) {
- IContainer c = (IContainer)element;
- if(c.getType() != IResource.PROJECT && resources.contains(c)) {
- return c.getFullPath().toString();
- }
- }
- return workbenchProvider.getText(element);
- }
- public Image getImage(Object element) {
- return workbenchProvider.getImage(element);
- }
- }
-
- /**
- * Create a new page for the given participant. The scope hint will determine the initial selection.
- *
- * @param participant the participant to synchronize
- */
- public GlobalRefreshResourceSelectionPage(IResource[] resources) {
- super(Policy.bind("GlobalRefreshResourceSelectionPage.1")); //$NON-NLS-1$
- // Caching the roots so that the decorator doesn't have to recompute all the time.
- this.resources = Arrays.asList(resources);
- setDescription(Policy.bind("GlobalRefreshResourceSelectionPage.2")); //$NON-NLS-1$
- setTitle(Policy.bind("GlobalRefreshResourceSelectionPage.3")); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent2) {
- Composite top = new Composite(parent2, SWT.NULL);
- top.setLayout(new GridLayout());
-
- GridData data = new GridData(GridData.FILL_BOTH);
- data.widthHint = 50;
- top.setLayoutData(data);
- setControl(top);
-
- if (resources.isEmpty()) {
- Label l = new Label(top, SWT.NULL);
- l.setText(Policy.bind("GlobalRefreshResourceSelectionPage.4")); //$NON-NLS-1$
- setPageComplete(false);
- } else {
- Label l = new Label(top, SWT.NULL);
- l.setText(Policy.bind("GlobalRefreshResourceSelectionPage.5")); //$NON-NLS-1$
-
- // The viewer
- fViewer = new ContainerCheckedTreeViewer(top, SWT.BORDER);
- data = new GridData(GridData.FILL_BOTH);
- //data.widthHint = 200;
- data.heightHint = 100;
- fViewer.getControl().setLayoutData(data);
- fViewer.setContentProvider(new MyContentProvider());
- fViewer.setLabelProvider( new DecoratingLabelProvider(
- new MyLabelProvider(),
- PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
- fViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- updateOKStatus();
- }
- });
- fViewer.setSorter(new ResourceSorter(ResourceSorter.NAME));
- fViewer.setInput(resources);
-
- // Scopes
- Group scopeGroup = new Group(top, SWT.NULL);
- scopeGroup.setText(Policy.bind("GlobalRefreshResourceSelectionPage.6")); //$NON-NLS-1$
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- layout.makeColumnsEqualWidth = false;
- scopeGroup.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 50;
- scopeGroup.setLayoutData(data);
-
- participantScope = new Button(scopeGroup, SWT.RADIO);
- participantScope.setText(Policy.bind("GlobalRefreshResourceSelectionPage.7")); //$NON-NLS-1$
- participantScope.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- updateParticipantScope();
- }
- });
-
- selectedResourcesScope = new Button(scopeGroup, SWT.RADIO);
- selectedResourcesScope.setText(Policy.bind("GlobalRefreshResourceSelectionPage.8")); //$NON-NLS-1$
- selectedResourcesScope.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- updateSelectedResourcesScope();
- }
- });
- data = new GridData();
- data.horizontalSpan = 2;
- selectedResourcesScope.setLayoutData(data);
-
-
- workingSetScope = new Button(scopeGroup, SWT.RADIO);
- workingSetScope.setText(Policy.bind("GlobalRefreshResourceSelectionPage.10")); //$NON-NLS-1$
- workingSetScope.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if(workingSetScope.getSelection()) {
- updateWorkingSetScope();
- }
- }
- });
-
- workingSetLabel = new Text(scopeGroup, SWT.BORDER);
- workingSetLabel.setEditable(false);
- data = new GridData(GridData.FILL_HORIZONTAL);
- workingSetLabel.setLayoutData(data);
-
- Button selectWorkingSetButton = new Button(scopeGroup, SWT.NULL);
- selectWorkingSetButton.setText(Policy.bind("GlobalRefreshResourceSelectionPage.11")); //$NON-NLS-1$
- selectWorkingSetButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- selectWorkingSetAction();
- }
- });
- data = new GridData(GridData.HORIZONTAL_ALIGN_END);
- selectWorkingSetButton.setLayoutData(data);
- Dialog.applyDialogFont(selectWorkingSetButton);
-
- Composite selectGroup = new Composite(top, SWT.SHADOW_NONE);
- layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.makeColumnsEqualWidth = false;
- selectGroup.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- selectGroup.setLayoutData(data);
-
- Button selectAll = new Button(selectGroup, SWT.NULL);
- selectAll.setText(Policy.bind("GlobalRefreshResourceSelectionPage.12")); //$NON-NLS-1$
- selectAll.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- participantScope.setSelection(true);
- selectedResourcesScope.setSelection(false);
- workingSetScope.setSelection(false);
- updateParticipantScope();
- scopeCheckingElement = true;
- updateOKStatus();
- scopeCheckingElement = false;
- }
- });
- selectAll.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- Button deSelectAll = new Button(selectGroup, SWT.NULL);
- deSelectAll.setText(Policy.bind("GlobalRefreshResourceSelectionPage.13")); //$NON-NLS-1$
- deSelectAll.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- fViewer.setCheckedElements(new Object[0]);
- updateOKStatus();
- }
- });
- deSelectAll.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- //workingSet = participant.getWorkingSet();
- //updateWorkingSetLabel();
- initializeScopingHint();
- }
- Dialog.applyDialogFont(top);
- }
-
- /**
- * Allow the finish button to be pressed if there are checked resources.
- *
- */
- protected void updateOKStatus() {
- if(fViewer != null) {
- if(! scopeCheckingElement) {
- if(! selectedResourcesScope.getSelection()) {
- selectedResourcesScope.setSelection(true);
- participantScope.setSelection(false);
- workingSetScope.setSelection(false);
- updateSelectedResourcesScope();
- }
- }
- setPageComplete(areAnyElementsChecked() != null);
- } else {
- setPageComplete(false);
- }
- }
-
- /**
- * Returns <code>true</code> if any of the root resources are grayed.
- */
- private IResource areAnyElementsChecked() {
- TreeItem[] item = fViewer.getTree().getItems();
- List checked = new ArrayList();
- for (int i = 0; i < item.length; i++) {
- TreeItem child = item[i];
- if(child.getChecked() || child.getGrayed()) {
- return (IResource)child.getData();
- }
- }
- return null;
- }
-
- /**
- * Return the list of top-most resources that have been checked.
- *
- * @return the list of top-most resources that have been checked or an
- * empty list if nothing is selected.
- */
- public IResource[] getRootResources() {
- TreeItem[] item = fViewer.getTree().getItems();
- List checked = new ArrayList();
- for (int i = 0; i < item.length; i++) {
- TreeItem child = item[i];
- collectCheckedItems(child, checked);
- }
- return (IResource[]) checked.toArray(new IResource[checked.size()]);
- }
-
- public ISynchronizeScope getSynchronizeScope() {
- if (workingSetScope.getSelection()) {
- return new WorkingSetScope(workingSets);
- }
- if (participantScope.getSelection()) {
- return new WorkspaceScope();
- }
- return new ResourceScope(getRootResources());
- }
-
- private void initializeScopingHint() {
- participantScope.setSelection(true);
- updateParticipantScope();
- }
-
- private void intializeSelectionInViewer(IResource[] resources) {
- }
-
- private void updateParticipantScope() {
- if(participantScope.getSelection()) {
- scopeCheckingElement = true;
- fViewer.setCheckedElements(resources.toArray());
- scopeCheckingElement = false;
- }
- }
-
- private void updateSelectedResourcesScope() {
- setPageComplete(getRootResources().length > 0);
- }
-
- private void selectWorkingSetAction() {
- IWorkingSetManager manager = PlatformUI.getWorkbench().getWorkingSetManager();
- IWorkingSetSelectionDialog dialog = manager.createWorkingSetSelectionDialog(getShell(), true);
- dialog.open();
- IWorkingSet[] sets = dialog.getSelection();
- if(sets != null) {
- workingSets = sets;
- } else {
- // dialog cancelled
- return;
- }
- updateWorkingSetScope();
- updateWorkingSetLabel();
-
- participantScope.setSelection(false);
- selectedResourcesScope.setSelection(false);
- workingSetScope.setSelection(true);
- }
-
- private void updateWorkingSetScope() {
- if(workingSets != null) {
- for (int i = 0; i < workingSets.length; i++) {
- IWorkingSet set = workingSets[i];
- List resources = IDE.computeSelectedResources(new StructuredSelection(set.getElements()));
- if(! resources.isEmpty()) {
- IResource[] resources2 = (IResource[])resources.toArray(new IResource[resources.size()]);
- scopeCheckingElement = true;
- fViewer.setCheckedElements(resources2);
- scopeCheckingElement = false;
- intializeSelectionInViewer(resources2);
- }
- }
- setPageComplete(true);
- } else {
- scopeCheckingElement = true;
- fViewer.setCheckedElements(new Object[0]);
- scopeCheckingElement = false;
- setPageComplete(false);
- }
- }
-
- private IResource[] getResourcesFromSelection() {
- IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (activeWorkbenchWindow != null) {
- IWorkbenchPart activePart = activeWorkbenchWindow.getPartService().getActivePart();
- if (activePart != null) {
- ISelectionProvider selectionProvider = activePart.getSite().getSelectionProvider();
- if (selectionProvider != null) {
- ISelection selection = selectionProvider.getSelection();
- if(selection instanceof IStructuredSelection) {
- return Utils.getResources(((IStructuredSelection)selection).toArray());
- }
- }
- }
- }
- return new IResource[0];
- }
-
- private void collectCheckedItems(TreeItem item, List checked) {
- if(item.getChecked() && !item.getGrayed()) {
- checked.add(item.getData());
- } else if(item.getGrayed()) {
- TreeItem[] children = item.getItems();
- for (int i = 0; i < children.length; i++) {
- TreeItem child = children[i];
- collectCheckedItems(child, checked);
- }
- }
- }
-
- private void updateWorkingSetLabel() {
- if (workingSets == null) {
- workingSetLabel.setText(Policy.bind("StatisticsPanel.noWorkingSet")); //$NON-NLS-1$
- } else {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < workingSets.length; i++) {
- IWorkingSet set = workingSets[i];
- if(i != 0) buffer.append(" ,"); //$NON-NLS-1$
- buffer.append(set.getName());
- }
- workingSetLabel.setText(buffer.toString());
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelManager.java
deleted file mode 100644
index 4a252226f..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelManager.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.team.core.synchronize.SyncInfoTree;
-import org.eclipse.team.internal.ui.IPreferenceIds;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-/**
- * Manager for hierarchical models
- */
-public class HierarchicalModelManager extends SynchronizeModelManager {
-
- /**
- * @param configuration
- */
- public HierarchicalModelManager(ISynchronizePageConfiguration configuration) {
- super(configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelManager#getSupportedModelProviders()
- */
- protected ISynchronizeModelProviderDescriptor[] getSupportedModelProviders() {
- return new ISynchronizeModelProviderDescriptor[] {
- new HierarchicalModelProvider.HierarchicalModelProviderDescriptor(),
- new CompressedFoldersModelProvider.CompressedFolderModelProviderDescriptor() };
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.SynchronizeModelManager#createModelProvider(java.lang.String)
- */
- protected ISynchronizeModelProvider createModelProvider(String id) {
- if(id == null) {
- if (getShowCompressedFolders()) {
- id = CompressedFoldersModelProvider.CompressedFolderModelProviderDescriptor.ID;
- } else {
- id = HierarchicalModelProvider.HierarchicalModelProviderDescriptor.ID;
- }
- }
- if(id.endsWith(CompressedFoldersModelProvider.CompressedFolderModelProviderDescriptor.ID)) {
- return new CompressedFoldersModelProvider(getConfiguration(), getSyncInfoSet());
- } else {
- return new HierarchicalModelProvider(getConfiguration(), getSyncInfoSet());
- }
- }
-
- private SyncInfoTree getSyncInfoSet() {
- return (SyncInfoTree)getConfiguration().getProperty(ISynchronizePageConfiguration.P_SYNC_INFO_SET);
- }
-
- /**
- * Return the state of the compressed folder setting.
- *
- * @return the state of the compressed folder setting.
- */
- private boolean getShowCompressedFolders() {
- return TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.SYNCVIEW_COMPRESS_FOLDERS);
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelProvider.java
deleted file mode 100644
index e4a5e6c35..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/HierarchicalModelProvider.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-
-/**
- * An input that can be used with both {@link } and
- * {@link }. The
- * job of this input is to create the logical model of the contents of the
- * sync set for displaying to the user. The created logical model must diff
- * nodes.
- * <p>
- * 1. First, prepareInput is called to initialize the model with the given sync
- * set. Building the model occurs in the ui thread.
- * 2. The input must react to changes in the sync set and adjust its diff node
- * model then update the viewer. In effect mediating between the sync set
- * changes and the model shown to the user. This happens in the ui thread.
- * </p>
- * NOT ON DEMAND - model is created then maintained!
- * @since 3.0
- */
-public class HierarchicalModelProvider extends SynchronizeModelProvider {
-
- public static class HierarchicalModelProviderDescriptor implements ISynchronizeModelProviderDescriptor {
- public static final String ID = TeamUIPlugin.ID + ".modelprovider_hierarchical";
- public String getId() {
- return ID;
- }
- public String getName() {
- return "Tree";
- }
- public ImageDescriptor getImageDescriptor() {
- return TeamImages.getImageDescriptor(ISharedImages.IMG_HIERARCHICAL);
- }
- };
- private static final HierarchicalModelProviderDescriptor hierarchicalDescriptor = new HierarchicalModelProviderDescriptor();
-
- /**
- * Create an input based on the provide sync set. The input is not initialized
- * until <code>prepareInput</code> is called.
- *
- * @param set the sync set used as the basis for the model created by this input.
- */
- public HierarchicalModelProvider(ISynchronizePageConfiguration configuration, SyncInfoTree set) {
- super(configuration, set);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.ISynchronizeModelProvider#getDescriptor()
- */
- public ISynchronizeModelProviderDescriptor getDescriptor() {
- return hierarchicalDescriptor;
- }
-
- public ViewerSorter getViewerSorter() {
- return new SynchronizeModelElementSorter();
- }
-
- protected SyncInfoTree getSyncInfoTree() {
- return (SyncInfoTree)getSyncInfoSet();
- }
-
- /**
- * Invoked by the <code>buildModelObject</code> method to create
- * the childen of the given node. This method can be overriden
- * by subclasses but subclasses should inv
- * @param container
- * @return
- */
- protected IDiffElement[] createModelObjects(ISynchronizeModelElement container) {
- IResource resource = null;
- if (container == getModelRoot()) {
- resource = ResourcesPlugin.getWorkspace().getRoot();
- } else {
- resource = container.getResource();
- }
- if(resource != null) {
- SyncInfoTree infoTree = getSyncInfoTree();
- IResource[] children = infoTree.members(resource);
- ISynchronizeModelElement[] nodes = new ISynchronizeModelElement[children.length];
- for (int i = 0; i < children.length; i++) {
- nodes[i] = createModelObject(container, children[i]);
- }
- return nodes;
- }
- return new IDiffElement[0];
- }
-
- protected ISynchronizeModelElement createModelObject(ISynchronizeModelElement parent, IResource resource) {
- SyncInfo info = getSyncInfoTree().getSyncInfo(resource);
- SynchronizeModelElement newNode;
- if(info != null) {
- newNode = new SyncInfoModelElement(parent, info);
- } else {
- newNode = new UnchangedResourceModelElement(parent, resource);
- }
- addToViewer(newNode);
- return newNode;
- }
-
- /**
- * Invokes <code>getModelObject(Object)</code> on an array of resources.
- * @param resources
- * the resources
- * @return the model objects for the resources
- */
- protected Object[] getModelObjects(IResource[] resources) {
- Object[] result = new Object[resources.length];
- for (int i = 0; i < resources.length; i++) {
- result[i] = getModelObject(resources[i]);
- }
- return result;
- }
-
- /**
- * Handle the change for the existing diff node. The diff node
- * should be changed to have the given sync info
- * @param diffNode the diff node to be changed
- * @param info the new sync info for the diff node
- */
- protected void handleChange(ISynchronizeModelElement diffNode, SyncInfo info) {
- IResource local = info.getLocal();
-
- if(diffNode instanceof SyncInfoModelElement) {
- ((SyncInfoModelElement)diffNode).update(info);
- calculateProperties(diffNode, false);
- } else {
- removeFromViewer(local);
- addResources(new IResource[] {local});
- }
- }
-
- protected void addResources(IResource[] added) {
- for (int i = 0; i < added.length; i++) {
- IResource resource = added[i];
- ISynchronizeModelElement node = getModelObject(resource);
- if (node != null) {
- // Somehow the node exists. Remove it and read it to ensure
- // what is shown matches the contents of the sync set
- removeFromViewer(resource);
- }
- // Build the sub-tree rooted at this node
- ISynchronizeModelElement parent = getModelObject(resource.getParent());
- if (parent != null) {
- node = createModelObject(parent, resource);
- buildModelObjects(node);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.viewers.SynchronizeModelProvider#buildModelObjects(org.eclipse.team.ui.synchronize.viewers.SynchronizeModelElement)
- */
- protected IDiffElement[] buildModelObjects(ISynchronizeModelElement node) {
- IDiffElement[] children = createModelObjects(node);
- for (int i = 0; i < children.length; i++) {
- IDiffElement element = children[i];
- if (element instanceof ISynchronizeModelElement) {
- buildModelObjects((ISynchronizeModelElement) element);
- }
- }
- return children;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.viewers.SynchronizeModelProvider#doAdd(org.eclipse.team.ui.synchronize.viewers.SynchronizeModelElement, org.eclipse.team.ui.synchronize.viewers.SynchronizeModelElement)
- */
- protected void doAdd(ISynchronizeModelElement parent, ISynchronizeModelElement element) {
- AbstractTreeViewer viewer = (AbstractTreeViewer)getViewer();
- viewer.add(parent, element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.viewers.SynchronizeModelProvider#doRemove(org.eclipse.team.ui.synchronize.viewers.SynchronizeModelElement)
- */
- protected void doRemove(ISynchronizeModelElement element) {
- AbstractTreeViewer viewer = (AbstractTreeViewer)getViewer();
- viewer.remove(element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.viewers.SynchronizeModelProvider#handleResourceAdditions(org.eclipse.team.core.synchronize.ISyncInfoTreeChangeEvent)
- */
- protected void handleResourceAdditions(ISyncInfoTreeChangeEvent event) {
- IResource[] added = event.getAddedSubtreeRoots();
- addResources(added);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.viewers.SynchronizeModelProvider#handleResourceChanges(org.eclipse.team.core.synchronize.ISyncInfoTreeChangeEvent)
- */
- protected void handleResourceChanges(ISyncInfoTreeChangeEvent event) {
- // Refresh the viewer for each changed resource
- SyncInfo[] infos = event.getChangedResources();
- for (int i = 0; i < infos.length; i++) {
- SyncInfo info = infos[i];
- IResource local = info.getLocal();
- ISynchronizeModelElement diffNode = getModelObject(local);
- if (diffNode != null) {
- handleChange(diffNode, info);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.viewers.SynchronizeModelProvider#handleResourceRemovals(org.eclipse.team.core.synchronize.ISyncInfoTreeChangeEvent)
- */
- protected void handleResourceRemovals(ISyncInfoTreeChangeEvent event) {
- // Remove the removed subtrees
- IResource[] removedRoots = event.getRemovedSubtreeRoots();
- for (int i = 0; i < removedRoots.length; i++) {
- removeFromViewer(removedRoots[i]);
- }
- // We have to look for folders that may no longer be in the set
- // (i.e. are in-sync) but still have descendants in the set
- IResource[] removedResources = event.getRemovedResources();
- for (int i = 0; i < removedResources.length; i++) {
- IResource resource = removedResources[i];
- if (resource.getType() != IResource.FILE) {
- ISynchronizeModelElement node = getModelObject(resource);
- if (node != null) {
- removeFromViewer(resource);
- addResources(new IResource[] {resource});
- }
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IPageValidator.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IPageValidator.java
deleted file mode 100644
index f5d10431d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IPageValidator.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-/**
- * Allows clients to perform custom page completion.
- * @since 3.0
- */
-public interface IPageValidator {
- /**
- * If errorMessage in <code>null</code> then the page is complete otherwise
- * the error message indicates that the reason why the page is not complete.
- */
- public void setComplete(String errorMessage);
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshEvent.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshEvent.java
deleted file mode 100644
index a56aacaa8..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshEvent.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.SyncInfo;
-
-/**
- * An event describing the lifecycle of a {@link Subscriber#refresh(IResource[], int, IProgressMonitor)} operation.
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- * @see Subscriber
- * @see IRefreshSubscriberListener
- * @since 3.0
- */
-public interface IRefreshEvent {
- /**
- * Status code indicating that the refresh has changes to the selected
- * resources that were refreshed.
- */
- public static final int STATUS_CHANGES = 1;
-
- /**
- * Status code indicating that the refresh didn't find changes on the selected
- * resources that were refreshed.
- */
- public static final int STATUS_NO_CHANGES = 2;
-
- /**
- * Constant which identifies this event as generated by a scheduled refresh.
- * @see #getRefreshType()
- */
- public static final int SCHEDULED_REFRESH = 1;
-
- /**
- * Constant which identifies the event as a refresh initiated by a user.
- * @see #getRefreshType()
- */
- public static final int USER_REFRESH = 2;
-
- /**
- * Returns the type of this event. The returned value will be one of <code>SCHEDULED_REFRESH</code>,
- * <code>USER_REFRESH</code>.
- *
- * @return the type of this event
- * @see #SCHEDULED_REFRESH
- * @see #USER_REFRESH
- */
- public int getRefreshType();
-
- /**
- * The subscriber that was refreshed.
- *
- * @return the subscriber that was refreshed.
- */
- public Subscriber getSubscriber();
-
- /**
- * The changes found during the refresh or an empty list if no changes were found.
- *
- * @return the changes found during the refresh or an empty list if no changes were found.
- */
- public SyncInfo[] getChanges();
-
- /**
- * The time, in milliseconds, at which the refresh was started.
- *
- * @return the time, in milliseconds, at which the refresh was started.
- */
- public long getStartTime();
-
- /**
- * The time, in milliseconds, at which the refresh was completed.
- *
- * @return the time, in milliseconds, at which the refresh was completed.
- */
- public long getStopTime();
-
- /**
- * Returns the status of the refresh operation. This can be used to determine if the
- * refresh completed successfuly, with an error, or was cancelled.
- *
- * @return the status of the refresh operation.
- */
- public IStatus getStatus();
-
- /**
- * Returns the list of resources that were refreshed.
- *
- * @return the list of resources that were refreshed.
- */
- public IResource[] getResources();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshSubscriberListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshSubscriberListener.java
deleted file mode 100644
index a8fbe4ff9..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/IRefreshSubscriberListener.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.ui.actions.ActionFactory;
-
-/**
- * Callback interface for clients interested in being notified about the lifecycle of
- * a {@link Subscriber#refresh(IResource[], int, IProgressMonitor)} operation.
- * <p>
- * Clients may implement this interface.
- * </p>
- * @see IRefreshEvent
- * @see Subscriber
- * @since 3.0
- */
-public interface IRefreshSubscriberListener {
- /**
- * Notification that a refresh is about to start. The event contains the resources
- * that will be refreshed.
- *
- * @param event an event describing the state of the refresh.
- */
- public void refreshStarted(IRefreshEvent event);
-
- /**
- * Notification that a refresh has completed. The event contains the changes
- * found during the refresh as well as the status of the refresh.
- *
- * @param event the event describing the result of the refresh.
- */
- public ActionFactory.IWorkbenchAction refreshDone(IRefreshEvent event);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProvider.java
deleted file mode 100644
index ad9754ee1..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProvider.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-
-/**
- * This class represents provisional API. A provider is not required to
- * implement this API. Implementers, and those who reference it, do so with the
- * awareness that this class may be removed or substantially changed at future
- * times without warning.
- */
-public interface ISynchronizeModelProvider {
- /**
- * 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$
-
- /**
- * Returns the sync set this model provider is showing.
- * @return the sync set this model provider is showing.
- */
- public abstract SyncInfoSet getSyncInfoSet();
-
- /**
- * Returns the description for this model provider.
- * @return the description for this model provider.
- */
- public ISynchronizeModelProviderDescriptor getDescriptor();
-
- /**
- * Return the <code>AbstractTreeViewer</code> asociated with this content
- * provider or <code>null</code> if the viewer is not of the proper type.
- * @return
- */
- public abstract StructuredViewer getViewer();
-
- /**
- * Installed the viewer to be used to display the model.
- * @param viewer the viewer in which to diplay the model.
- */
- public abstract void setViewer(StructuredViewer viewer);
-
- /**
- * Builds the viewer model based on the contents of the sync set.
- * @return the root element of the generated model.
- */
- public abstract ISynchronizeModelElement prepareInput(IProgressMonitor monitor);
-
- /**
- * The provider can try and return a mapping for the provided object. Providers often use mappings
- * to store the source of a logical element they have created. For example, when displaying resource
- * based logical elements, a provider will cache the resource -> element mapping for quick retrieval
- * of the element when resource based changes are made.
- *
- * @param object the object to query for a mapping
- * @return an object created by this provider that would be shown in a viewer, or <code>null</code>
- * if the provided object is not mapped by this provider.
- */
- public abstract Object getMapping(Object object);
-
- /**
- * Dispose of the builder
- */
- public abstract void dispose();
-
- /**
- * Returns the input created by this controller or <code>null</code> if
- * {@link #prepareInput(IProgressMonitor)} hasn't been called on this object yet.
- * @return
- */
- public abstract ISynchronizeModelElement getModelRoot();
-
- /**
- * Returns the sorter for this model.
- * @return the sorter for this model.
- */
- public abstract ViewerSorter getViewerSorter();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProviderDescriptor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProviderDescriptor.java
deleted file mode 100644
index 9b6e4b83e..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProviderDescriptor.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-
-public interface ISynchronizeModelProviderDescriptor {
- /**
- * Returns the name of this model provider. This can be shown to the user.
- * @return the name of this model provider.
- */
- public String getName();
-
- /**
- * Returns the unique identifier for this model provider.
- * @return the unique identifier for this model provider.
- */
- public String getId();
-
- /**
- * Returns the image that represents this model provider. This image
- * will be shown to the user.
- * @return the image that represents this model provider.
- */
- public ImageDescriptor getImageDescriptor();
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java
deleted file mode 100644
index 114278588..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import java.io.*;
-
-import org.eclipse.compare.*;
-import org.eclipse.compare.internal.BufferedResourceNode;
-import org.eclipse.compare.structuremergeviewer.IStructureComparator;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * A resource node that is not buffered. Changes made to it are applied directly
- * to the underlying resource.
- *
- * @since 3.0
- */
-public class LocalResourceTypedElement extends ResourceNode {
-
- private boolean fDirty= false;
- private IFile fDeleteFile;
-
- /**
- * Creates a <code>ResourceNode</code> for the given resource.
- *
- * @param resource the resource
- */
- public LocalResourceTypedElement(IResource resource) {
- super(resource);
- }
-
- protected IStructureComparator createChild(IResource child) {
- return new LocalResourceTypedElement(child);
- }
-
- public void setContent(byte[] contents) {
- fDirty= true;
- super.setContent(contents);
- }
-
- /**
- * Commits buffered contents to resource.
- */
- public void commit(IProgressMonitor pm) throws CoreException {
- if (fDirty) {
-
- if (fDeleteFile != null) {
- fDeleteFile.delete(true, true, pm);
- return;
- }
-
- IResource resource= getResource();
- if (resource instanceof IFile) {
- ByteArrayInputStream is= new ByteArrayInputStream(getContent());
- try {
- IFile file= (IFile) resource;
- if (file.exists())
- file.setContents(is, false, true, pm);
- else
- file.create(is, false, pm);
- fDirty= false;
- } finally {
- fireContentChanged();
- if (is != null)
- try {
- is.close();
- } catch(IOException ex) {
- }
- }
- }
- }
- }
-
- public ITypedElement replace(ITypedElement child, ITypedElement other) {
-
- if (child == null) { // add resource
- // create a node without a resource behind it!
- IResource resource= getResource();
- if (resource instanceof IFolder) {
- IFolder folder= (IFolder) resource;
- IFile file= folder.getFile(other.getName());
- child= new BufferedResourceNode(file);
- }
- }
-
- if (other == null) { // delete resource
- IResource resource= getResource();
- if (resource instanceof IFolder) {
- IFolder folder= (IFolder) resource;
- IFile file= folder.getFile(child.getName());
- if (file != null && file.exists()) {
- fDeleteFile= file;
- fDirty= true;
- }
- }
- return null;
- }
-
- if (other instanceof IStreamContentAccessor && child instanceof IEditableContent) {
- IEditableContent dst= (IEditableContent) child;
-
- try {
- InputStream is= ((IStreamContentAccessor)other).getContents();
- byte[] bytes= readBytes(is);
- if (bytes != null)
- dst.setContent(bytes);
- } catch (CoreException ex) {
- }
- }
- fireContentChanged();
- return child;
- }
-
- public static byte[] readBytes(InputStream in) {
- ByteArrayOutputStream bos= new ByteArrayOutputStream();
- try {
- while (true) {
- int c= in.read();
- if (c == -1)
- break;
- bos.write(c);
- }
-
- } catch (IOException ex) {
- return null;
-
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch (IOException x) {
- }
- }
- try {
- bos.close();
- } catch (IOException x) {
- }
- }
- return bos.toByteArray();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.ResourceNode#getContents()
- */
- public InputStream getContents() throws CoreException {
- if(getResource().exists())
- return super.getContents();
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/PartNavigator.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/PartNavigator.java
deleted file mode 100644
index 3c34350f8..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/PartNavigator.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.CompareViewerSwitchingPane;
-import org.eclipse.compare.internal.*;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.team.internal.ui.synchronize.actions.NavigateAction;
-
-/**
- * A navigator that coordinates navigation between several navigable
- * objects. This is copied from the compare plugin and enhanced to
- * support navigating adaptables.
- * <p>
- * This navigator can be used as input to the {@link NavigateAction}
- * actions and should be passed to the actions via the
- * {@link SynchronizePageConfiguration.P_NAVIGATOR}.
- * </p>
- * @since 3.0
- */
-public class PartNavigator implements INavigatable {
-
- private boolean fLastDirection= true;
- private Object[] fPanes;
- // Fix for http://dev.eclipse.org/bugs/show_bug.cgi?id=20106
- private boolean fNextFirstTime= true;
-
- public PartNavigator(Object[] panes) {
- fPanes= panes;
- }
-
- public Object[] getPanes() {
- return fPanes;
- }
-
- public boolean gotoDifference(boolean next) {
-
- fLastDirection= next;
-
- // Fix for http://dev.eclipse.org/bugs/show_bug.cgi?id=20106
- if (next && fNextFirstTime && mustOpen()) {
- fNextFirstTime= false;
- openElement();
- }
-
- // find most down stream CompareViewerPane
- int n= 0;
- INavigatable[] navigators= new INavigatable[4];
- for (int i= 0; i < fPanes.length; i++) {
- navigators[n]= getNavigator(fPanes[i]);
- if (navigators[n] != null)
- n++;
- }
-
- while (n > 0) {
- n--;
- if (navigators[n].gotoDifference(next)) {
- // at end of this navigator
- continue;
- } else // not at end
- return false;
- }
- return true;
- }
-
- private static INavigatable getNavigator(Object p) {
- if (p == null)
- return null;
- Control control = null;
- if (p instanceof CompareViewerSwitchingPane) {
- CompareViewerSwitchingPane pane = (CompareViewerSwitchingPane) p;
- if (pane.isEmpty())
- return null;
- Viewer viewer = pane.getViewer();
- if (viewer == null)
- return null;
- control = viewer.getControl();
- if (control == null)
- return null;
- Object data = control.getData(INavigatable.NAVIGATOR_PROPERTY);
- if (data instanceof INavigatable)
- return (INavigatable) data;
- } else if(p instanceof IAdaptable) {
- return (INavigatable)((IAdaptable)p).getAdapter(INavigatable.class);
- }
- return null;
- }
-
- private static CompareNavigator findNavigator(Control c) {
- while (c != null && !c.isDisposed()) { // PR 1GEUVV2
- Object data= c.getData();
- if (data instanceof CompareEditorInput) {
- CompareEditorInput cei= (CompareEditorInput) data;
- Object adapter= cei.getAdapter(CompareNavigator.class);
- if (adapter instanceof CompareNavigator)
- return (CompareNavigator)adapter;
- }
- c= c.getParent();
- }
- return null;
- }
-
- private boolean resetDirection() {
- boolean last= fLastDirection;
- fLastDirection= true;
- return last;
- }
-
- /*
- * Fix for http://dev.eclipse.org/bugs/show_bug.cgi?id=20106
- */
- private boolean mustOpen() {
- if (fPanes == null || fPanes.length == 0)
- return false;
- for (int i= 1; i < fPanes.length; i++) {
- Object p= fPanes[i];
- if (p instanceof CompareViewerSwitchingPane) {
- CompareViewerSwitchingPane pane = (CompareViewerSwitchingPane) p;
- if (pane != null && pane.getInput() != null)
- return false;
- }
- }
- return true;
- }
-
- /*
- * Fix for http://dev.eclipse.org/bugs/show_bug.cgi?id=20106
- */
- private void openElement() {
- if (fPanes == null || fPanes.length == 0)
- return;
- IOpenable openable= getOpenable(fPanes[0]);
- if (openable != null) {
- openable.openSelected();
- }
- }
-
- /*
- * Fix for http://dev.eclipse.org/bugs/show_bug.cgi?id=20106
- */
- private static IOpenable getOpenable(Object p) {
- if (p instanceof CompareViewerSwitchingPane) {
- CompareViewerSwitchingPane pane = (CompareViewerSwitchingPane) p;
- if (pane == null)
- return null;
- if (pane.isEmpty())
- return null;
- Viewer viewer = pane.getViewer();
- if (viewer == null)
- return null;
- Control control = viewer.getControl();
- if (control == null)
- return null;
- Object data = control.getData(IOpenable.OPENABLE_PROPERTY);
- if (data instanceof IOpenable)
- return (IOpenable) data;
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ReferenceCounter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ReferenceCounter.java
deleted file mode 100644
index 645e60a2b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ReferenceCounter.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import java.util.*;
-
-/**
- * A ReferenceCounter is used to reference counting objects.
- * Each object is identified by a unique ID. Together they form
- * an ID - value pair. An object is added to the counter by calling
- * #put(id, object). From this point on additional refs can be made
- * by calling #addRef(id) or #removeRef(id).
- */
-public class ReferenceCounter
-{
- private Map mapIdToRec = new HashMap(11);
-
- /**
- * Capture the information about an object.
- */
- public class RefRec {
- public RefRec(Object id, Object value) {
- this.id = id;
- this.value = value;
- addRef();
- }
- public Object getId() {
- return id;
- }
- public Object getValue() {
- return value;
- }
- public int addRef() {
- ++ refCount;
- return refCount;
- }
- public int removeRef() {
- -- refCount;
- return refCount;
- }
- public int getRef() {
- return refCount;
- }
- public boolean isNotReferenced() {
- return (refCount <= 0);
- }
- public Object id;
- public Object value;
- private int refCount;
- }
-/**
- * Creates a new counter.
- */
-public ReferenceCounter() {
- super();
-}
-/**
- * Adds one reference to an object in the counter.
- *
- * @param id is a unique ID for the object.
- * @return the new ref count
- */
-public int addRef(Object id) {
- RefRec rec = (RefRec)mapIdToRec.get(id);
- if (rec == null)
- return 0;
- return rec.addRef();
-}
-/**
- * Returns the object defined by an ID. If the ID is not
- * found <code>null</code> is returned.
- *
- * @return the object or <code>null</code>
- */
-public Object get(Object id) {
- RefRec rec = (RefRec)mapIdToRec.get(id);
- if (rec == null)
- return null;
- return rec.getValue();
-}
-/**
- * Returns a complete list of the keys in the counter.
- *
- * @return a Set containing the ID for each.
- */
-public Set keySet() {
- return mapIdToRec.keySet();
-}
-/**
- * Adds an object to the counter for counting and gives
- * it an initial ref count of 1.
- *
- * @param id is a unique ID for the object.
- * @param value is the object itself.
- */
-public void put(Object id, Object value) {
- RefRec rec = new RefRec(id, value);
- mapIdToRec.put(id, rec);
-}
-/**
- * Removes one reference from an object in the counter.
- * If the ref count drops to 0 the object is removed from
- * the counter completely.
- *
- * @param id is a unique ID for the object.
- * @return the new ref count
- */
-public int removeRef(Object id) {
- RefRec rec = (RefRec)mapIdToRec.get(id);
- if (rec == null)
- return 0;
- int newCount = rec.removeRef();
- if (newCount <= 0)
- mapIdToRec.remove(id);
- return newCount;
-}
-/**
- * Returns a complete list of the values in the counter.
- *
- * @return a Collection containing the values.
- */
-public List values() {
- int size = mapIdToRec.size();
- ArrayList list = new ArrayList(size);
- Iterator iter = mapIdToRec.values().iterator();
- while (iter.hasNext()) {
- RefRec rec = (RefRec)iter.next();
- list.add(rec.getValue());
- }
- return list;
-}
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshChangeListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshChangeListener.java
deleted file mode 100644
index c576182d8..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshChangeListener.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.eclipse.team.internal.ui.synchronize;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.team.core.subscribers.*;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.core.subscribers.SubscriberSyncInfoCollector;
-
-public class RefreshChangeListener implements ISubscriberChangeListener {
- private List changes = new ArrayList();
- private SubscriberSyncInfoCollector collector;
-
- public RefreshChangeListener(SubscriberSyncInfoCollector collector) {
- this.collector = collector;
- }
- public void subscriberResourceChanged(ISubscriberChangeEvent[] deltas) {
- for (int i = 0; i < deltas.length; i++) {
- ISubscriberChangeEvent delta = deltas[i];
- if (delta.getFlags() == ISubscriberChangeEvent.SYNC_CHANGED) {
- changes.add(delta);
- }
- }
- }
- public SyncInfo[] getChanges() {
- collector.waitForCollector(new NullProgressMonitor());
- List changedSyncInfos = new ArrayList();
- SyncInfoSet set = collector.getSyncInfoSet();
- for (Iterator it = changes.iterator(); it.hasNext();) {
- ISubscriberChangeEvent delta = (ISubscriberChangeEvent) it.next();
- SyncInfo info = set.getSyncInfo(delta.getResource());
- if (info != null && interestingChange(info)) {
- changedSyncInfos.add(info);
- }
- }
- return (SyncInfo[]) changedSyncInfos.toArray(new SyncInfo[changedSyncInfos.size()]);
- }
-
- private boolean interestingChange(SyncInfo info) {
- int kind = info.getKind();
- if(isThreeWay()) {
- int direction = SyncInfo.getDirection(kind);
- return (direction == SyncInfo.INCOMING || direction == SyncInfo.CONFLICTING);
- } else {
- return SyncInfo.getChange(kind) != SyncInfo.IN_SYNC;
- }
- }
-
- private boolean isThreeWay() {
- return collector.getSubscriber().getResourceComparator().isThreeWay();
- }
-
- public void clear() {
- changes.clear();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshEvent.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshEvent.java
deleted file mode 100644
index 6ba5bee62..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshEvent.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.SyncInfo;
-
-/**
- * A refresh event generated to notify clients of the refresh lifecycle.
- */
-public class RefreshEvent implements IRefreshEvent {
- int type;
- Subscriber subscriber;
- SyncInfo[] changes;
- long startTime = 0;
- long stopTime = 0;
- IStatus status;
- IResource[] resources;
-
- public RefreshEvent(int type, IResource[] resources, Subscriber subscriber) {
- this.type = type;
- this.subscriber = subscriber;
- this.resources = resources;
- }
-
- public int getRefreshType() {
- return type;
- }
-
- public Subscriber getSubscriber() {
- return subscriber;
- }
-
- public SyncInfo[] getChanges() {
- return changes != null ? changes : new SyncInfo[0];
- }
-
- public void setChanges(SyncInfo[] changes) {
- this.changes = changes;
- }
-
- public long getStartTime() {
- return startTime;
- }
-
- public void setStartTime(long startTime) {
- this.startTime = startTime;
- }
-
- public long getStopTime() {
- return stopTime;
- }
-
- public void setStopTime(long stopTime) {
- this.stopTime = stopTime;
- }
-
- public IStatus getStatus() {
- return status;
- }
-
- public void setStatus(IStatus status) {
- this.status = status;
- }
-
- public IResource[] getResources() {
- return resources;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberJob.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberJob.java
deleted file mode 100644
index 25e4c6901..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberJob.java
+++ /dev/null
@@ -1,533 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.core.Assert;
-import org.eclipse.team.internal.core.subscribers.SubscriberSyncInfoCollector;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.synchronize.ISynchronizeManager;
-import org.eclipse.team.ui.synchronize.SubscriberParticipant;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.internal.progress.ProgressManager;
-import org.eclipse.ui.progress.IProgressConstants;
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * Job to refresh a {@link Subscriber} in the background. The job can be configured
- * to be re-scheduled and run at a specified interval.
- * <p>
- * The job supports a basic workflow for modal/non-modal usage. If the job is
- * run in the foreground (e.g. in a modal progress dialog) the refresh listeners
- * action is invoked immediately after the refresh is completed. Otherwise the refresh
- * listeners action is associated to the job as a <i>goto</i> action. This will
- * allow the user to select the action in the progress view and run it when they
- * choose.
- * </p>
- * @since 3.0
- */
-public final class RefreshSubscriberJob extends WorkspaceJob {
-
- /**
- * Uniquely identifies this type of job. This is used for cancellation.
- */
- private final static Object FAMILY_ID = new Object();
-
- /**
- * If true this job will be restarted when it completes
- */
- private boolean reschedule = false;
-
- /**
- * If true a rescheduled refresh job should be retarted when cancelled
- */
- private boolean restartOnCancel = true;
-
- /**
- * The schedule delay used when rescheduling a completed job
- */
- private static long scheduleDelay;
-
- /**
- * The subscribers and resources to refresh.
- */
- private IResource[] resources;
-
- /**
- * The participant that is being refreshed.
- */
- private SubscriberParticipant participant;
-
- /**
- * The task name for this refresh. This is usually more descriptive than the
- * job name.
- */
- private String taskName;
-
- /**
- * Refresh started/completed listener for every refresh
- */
- private static List listeners = new ArrayList(1);
- private static final int STARTED = 1;
- private static final int DONE = 2;
-
- /*
- * Constant used for postponement
- */
- private static final IStatus POSTPONED = new Status(IStatus.CANCEL, TeamUIPlugin.ID, 0, "Scheduled refresh postponed due to conflicting operation", null); //$NON-NLS-1$
-
- /**
- * Notification for safely notifying listeners of refresh lifecycle.
- */
- private abstract class Notification implements ISafeRunnable {
- private IRefreshSubscriberListener listener;
- public void handleException(Throwable exception) {
- // don't log the exception....it is already being logged in Platform#run
- }
- public void run(IRefreshSubscriberListener listener) {
- this.listener = listener;
- Platform.run(this);
- }
- public void run() throws Exception {
- notify(listener);
- }
- /**
- * Subsclasses overide this method to send an event safely to a lsistener
- * @param listener
- */
- protected abstract void notify(IRefreshSubscriberListener listener);
- }
-
- /**
- * Monitor wrapper that will indicate that the job is cancelled
- * if the job is blocking another.
- */
- private class NonblockingProgressMonitor extends ProgressMonitorWrapper {
- private final RefreshSubscriberJob job;
- private long blockTime;
- private static final int THRESHOLD = 250;
- protected NonblockingProgressMonitor(IProgressMonitor monitor, RefreshSubscriberJob job) {
- super(monitor);
- this.job = job;
- }
- public boolean isCanceled() {
- if (super.isCanceled()) {
- return true;
- }
- if (job.shouldReschedule() && job.isBlocking()) {
- if (blockTime == 0) {
- blockTime = System.currentTimeMillis();
- } else if (System.currentTimeMillis() - blockTime > THRESHOLD) {
- // We've been blocking for too long
- return true;
- }
- } else {
- blockTime = 0;
- }
- return false;
- }
- }
-
- /**
- * Create a job to refresh the specified resources with the subscriber.
- *
- * @param participant the subscriber participant
- * @param name
- * @param resources
- * @param subscriber
- */
- public RefreshSubscriberJob(SubscriberParticipant participant, String jobName, String taskName, IResource[] resources, IRefreshSubscriberListener listener) {
- super(taskName);
- Assert.isNotNull(resources);
- Assert.isNotNull(participant);
- Assert.isNotNull(resources);
- this.resources = resources;
- this.participant = participant;
- this.taskName = jobName;
- setPriority(Job.DECORATE);
- setRefreshInterval(3600 /* 1 hour */);
-
- // Handle restarting of job if it is configured as a scheduled refresh job.
- addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- if(shouldReschedule()) {
- IStatus result = event.getResult();
- if(result.getSeverity() == IStatus.CANCEL && ! restartOnCancel) {
- return;
- }
- long delay = scheduleDelay;
- if (result == POSTPONED) {
- // Restart in 5 seconds
- delay = 5000;
- }
- RefreshSubscriberJob.this.schedule(delay);
- restartOnCancel = true;
- }
- }
- });
-
- initialize(listener);
- }
-
- /**
- * If a collector is available then run the refresh and the background event processing
- * within the same progess group.
- */
- public boolean shouldRun() {
- // Ensure that any progress shown as a result of this refresh occurs hidden in a progress group.
- return getSubscriber() != null;
- }
-
- public boolean belongsTo(Object family) {
- if(family instanceof RefreshSubscriberJob) {
- return ((RefreshSubscriberJob)family).getSubscriber() == getSubscriber();
- } else if (family instanceof SubscriberParticipant) {
- return family == participant;
- } else {
- return (family == getFamily() || family == ISynchronizeManager.FAMILY_SYNCHRONIZE_OPERATION);
- }
- }
-
- public static Object getFamily() {
- return FAMILY_ID;
- }
-
- /**
- * This is run by the job scheduler. A list of subscribers will be refreshed, errors will not stop the job
- * and it will continue to refresh the other subscribers.
- */
- public IStatus runInWorkspace(IProgressMonitor monitor) {
- // Perform a pre-check for auto-build or manual build jobs
- // when auto-refreshing
- if (shouldReschedule() &&
- (isJobInFamilyRunning(ResourcesPlugin.FAMILY_AUTO_BUILD)
- || isJobInFamilyRunning(ResourcesPlugin.FAMILY_MANUAL_BUILD))) {
- return POSTPONED;
- }
- // Only allow one refresh job at a time
- // NOTE: It would be cleaner if this was done by a scheduling
- // rule but at the time of writting, it is not possible due to
- // the scheduling rule containment rules.
- // Synchronized to ensure only one refresh job is running at a particular time
- synchronized (getFamily()) {
- Subscriber subscriber = getSubscriber();
- IResource[] roots = getResources();
-
- // if there are no resources to refresh, just return
- if(subscriber == null || roots == null) {
- return Status.OK_STATUS;
- }
- SubscriberSyncInfoCollector collector = getCollector();
- RefreshEvent event = new RefreshEvent(reschedule ? IRefreshEvent.SCHEDULED_REFRESH : IRefreshEvent.USER_REFRESH, roots, collector.getSubscriber());
- RefreshChangeListener changeListener = new RefreshChangeListener(collector);
- try {
- event.setStartTime(System.currentTimeMillis());
- if(monitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
- // Set-up change listener so that we can determine the changes found
- // during this refresh.
- subscriber.addListener(changeListener);
- // Pre-Notify
- notifyListeners(STARTED, event);
- // Perform the refresh
- monitor.setTaskName(getName());
- NonblockingProgressMonitor wrappedMonitor = new NonblockingProgressMonitor(monitor, this);
- subscriber.refresh(roots, IResource.DEPTH_INFINITE, wrappedMonitor);
- // Prepare the results
- setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.valueOf(! isJobModal()));
- event.setStatus(calculateStatus(event));
- } catch(OperationCanceledException e2) {
- if (monitor.isCanceled()) {
- // The refresh was cancelled by the user
- event.setStatus(Status.CANCEL_STATUS);
- } else {
- // The refresh was cancelled due to a blockage
- event.setStatus(POSTPONED);
- }
- } catch(TeamException e) {
- event.setStatus(e.getStatus());
- } finally {
- event.setStopTime(System.currentTimeMillis());
- subscriber.removeListener(changeListener);
- monitor.done();
- }
-
- // Post-Notify
- event.setChanges(changeListener.getChanges());
- notifyListeners(DONE, event);
- return event.getStatus();
- }
- }
-
- private boolean isJobInFamilyRunning(Object family) {
- Job[] jobs = Platform.getJobManager().find(family);
- if (jobs != null && jobs.length > 0) {
- for (int i = 0; i < jobs.length; i++) {
- Job job = jobs[i];
- if (job.getState() != Job.NONE) {
- return true;
- }
- }
- }
- return false;
- }
-
- private IStatus calculateStatus(IRefreshEvent event) {
- StringBuffer text = new StringBuffer();
- int code = IStatus.OK;
- SyncInfo[] changes = event.getChanges();
- IResource[] resources = event.getResources();
- SubscriberSyncInfoCollector collector = getCollector();
- if (collector != null) {
- SyncInfoSet set = collector.getSyncInfoSet();
- int numChanges = refreshedResourcesContainChanges(event);
- if (numChanges > 0) {
- code = IRefreshEvent.STATUS_CHANGES;
- String outgoing = Long.toString(set.countFor(SyncInfo.OUTGOING, SyncInfo.DIRECTION_MASK));
- String incoming = Long.toString(set.countFor(SyncInfo.INCOMING, SyncInfo.DIRECTION_MASK));
- String conflicting = Long.toString(set.countFor(SyncInfo.CONFLICTING, SyncInfo.DIRECTION_MASK));
- if (changes.length > 0) {
- // New changes found
- String numNewChanges = Integer.toString(event.getChanges().length);
- text.append(Policy.bind("RefreshCompleteDialog.5a", new Object[]{getName(), numNewChanges})); //$NON-NLS-1$
- } else {
- // Refreshed resources contain changes
- text.append(Policy.bind("RefreshCompleteDialog.5", new Object[]{getName(), new Integer(numChanges)})); //$NON-NLS-1$
- }
- } else {
- // No changes found
- code = IRefreshEvent.STATUS_NO_CHANGES;
- text.append(Policy.bind("RefreshCompleteDialog.6", getName())); //$NON-NLS-1$
- }
- return new Status(IStatus.OK, TeamUIPlugin.ID, code, text.toString(), null);
- }
- return Status.OK_STATUS;
- }
-
- private int refreshedResourcesContainChanges(IRefreshEvent event) {
- int numChanges = 0;
- SubscriberSyncInfoCollector collector = getCollector();
- if (collector != null) {
- SyncInfoTree set = collector.getSyncInfoSet();
- IResource[] resources = event.getResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- SyncInfo[] infos = set.getSyncInfos(resource, IResource.DEPTH_INFINITE);
- if(infos != null && infos.length > 0) {
- numChanges += infos.length;
- }
- }
- }
- return numChanges;
- }
-
- private void initialize(final IRefreshSubscriberListener listener) {
- final IWorkbenchAction[] gotoAction = new IWorkbenchAction[] {null};
- final IWorkbenchAction actionWrapper = new WorkbenchAction() {
- public void run() {
- if(gotoAction[0] != null) {
- gotoAction[0].run();
- }
- }
- public boolean isEnabled() {
- if(gotoAction[0] != null) {
- return gotoAction[0].isEnabled();
- }
- return true;
- }
-
- public void dispose() {
- super.dispose();
- if(gotoAction[0] != null) {
- gotoAction[0].dispose();
- }
- }
- };
-
- IProgressMonitor group = Platform.getJobManager().createProgressGroup();
- group.beginTask(taskName, 100);
- setProgressGroup(group, 80);
- getCollector().setProgressGroup(group, 20);
- setProperty(IProgressConstants.ICON_PROPERTY, participant.getImageDescriptor());
- setProperty(IProgressConstants.ACTION_PROPERTY, actionWrapper);
- setProperty(IProgressConstants.KEEPONE_PROPERTY, Boolean.valueOf(! isJobModal()));
- // Listener delagate
- IRefreshSubscriberListener autoListener = new IRefreshSubscriberListener() {
- public void refreshStarted(IRefreshEvent event) {
- if(listener != null) {
- listener.refreshStarted(event);
- }
- }
- public ActionFactory.IWorkbenchAction refreshDone(IRefreshEvent event) {
- if(listener != null) {
- boolean isModal = isJobModal();
- ActionFactory.IWorkbenchAction runnable = listener.refreshDone(event);
- if(runnable != null) {
- // If the job is being run modally then simply prompt the user immediatly
- if(isModal) {
- if(runnable != null) {
- final IAction[] r = new IAction[] {runnable};
- Job update = new UIJob("") { //$NON-NLS-1$
- public IStatus runInUIThread(IProgressMonitor monitor) {
- r[0].run();
- return Status.OK_STATUS;
- }
- };
- update.setSystem(true);
- update.schedule();
- }
- // If the job is being run in the background, don't interrupt the user and simply update the goto action
- // to perform the results.
- } else {
- gotoAction[0] = runnable;
- actionWrapper.setEnabled(runnable.isEnabled());
- runnable.addPropertyChangeListener(new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if(event.getProperty().equals(IAction.ENABLED)) {
- Boolean bool = (Boolean) event.getNewValue();
- actionWrapper.setEnabled(bool.booleanValue());
- }
- }
- });
- }
- }
- RefreshSubscriberJob.removeRefreshListener(this);
- }
- return null;
- }
- };
-
- if (listener != null) {
- RefreshSubscriberJob.addRefreshListener(autoListener);
- }
- }
-
- protected IResource[] getResources() {
- return resources;
- }
-
- protected Subscriber getSubscriber() {
- return participant.getSubscriber();
- }
-
- protected SubscriberSyncInfoCollector getCollector() {
- return participant.getSubscriberSyncInfoCollector();
- }
-
- public long getScheduleDelay() {
- return scheduleDelay;
- }
-
- protected void start() {
- if(getState() == Job.NONE) {
- if(shouldReschedule()) {
- schedule(getScheduleDelay());
- }
- }
- }
-
- /**
- * Specify the interval in seconds at which this job is scheduled.
- * @param seconds delay specified in seconds
- */
- public void setRefreshInterval(long seconds) {
- boolean restart = false;
- if(getState() == Job.SLEEPING) {
- restart = true;
- cancel();
- }
- scheduleDelay = seconds * 1000;
- if(restart) {
- start();
- }
- }
-
- /**
- * Returns the interval of this job in seconds.
- * @return
- */
- public long getRefreshInterval() {
- return scheduleDelay / 1000;
- }
-
- public void setRestartOnCancel(boolean restartOnCancel) {
- this.restartOnCancel = restartOnCancel;
- }
-
- public void setReschedule(boolean reschedule) {
- this.reschedule = reschedule;
- }
-
- public boolean shouldReschedule() {
- return reschedule;
- }
-
- public static void addRefreshListener(IRefreshSubscriberListener listener) {
- synchronized(listeners) {
- if(! listeners.contains(listener)) {
- listeners.add(listener);
- }
- }
- }
-
- public static void removeRefreshListener(IRefreshSubscriberListener listener) {
- synchronized(listeners) {
- listeners.remove(listener);
- }
- }
-
- protected void notifyListeners(final int state, final IRefreshEvent event) {
- // Get a snapshot of the listeners so the list doesn't change while we're firing
- IRefreshSubscriberListener[] listenerArray;
- synchronized (listeners) {
- listenerArray = (IRefreshSubscriberListener[]) listeners.toArray(new IRefreshSubscriberListener[listeners.size()]);
- }
- // Notify each listener in a safe manner (i.e. so their exceptions don't kill us)
- for (int i = 0; i < listenerArray.length; i++) {
- IRefreshSubscriberListener listener = listenerArray[i];
- Notification notification = new Notification() {
- protected void notify(IRefreshSubscriberListener listener) {
- switch (state) {
- case STARTED:
- listener.refreshStarted(event);
- break;
- case DONE:
- listener.refreshDone(event);
- break;
- default:
- break;
- }
- }
- };
- notification.run(listener);
- }
- }
-
- private boolean isJobModal() {
- Boolean isModal = (Boolean)getProperty(ProgressManager.PROPERTY_IN_DIALOG);
- if(isModal == null) return false;
- return isModal.booleanValue();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicy.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicy.java
deleted file mode 100644
index f1107cf34..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicy.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package org.eclipse.team.internal.ui.synchronize;
-
-import java.util.*;
-import org.eclipse.compare.CompareUI;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.actions.ActionFactory;
-
-/**
- * This class manages the notification and setup that occurs after a refresh is completed.
- */
-public class RefreshUserNotificationPolicy implements IRefreshSubscriberListener {
-
- private SubscriberParticipant participant;
-
- public RefreshUserNotificationPolicy(SubscriberParticipant participant) {
- this.participant = participant;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.team.internal.ui.jobs.IRefreshSubscriberListener#refreshStarted(org.eclipse.team.internal.ui.jobs.IRefreshEvent)
- */
- public void refreshStarted(IRefreshEvent event) {
- TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- ISynchronizeView view = TeamUI.getSynchronizeManager().showSynchronizeViewInActivePage();
- if(view != null) {
- view.display(participant);
- }
- }
- });
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.team.internal.ui.jobs.IRefreshSubscriberListener#refreshDone(org.eclipse.team.internal.ui.jobs.IRefreshEvent)
- */
- public ActionFactory.IWorkbenchAction refreshDone(final IRefreshEvent event) {
- // Ensure that this event was generated for this participant
- if (event.getSubscriber() != participant.getSubscriberSyncInfoCollector().getSubscriber()) return null;
- // If the event is for a cancelled operation, there's nothing to do
- int severity = event.getStatus().getSeverity();
- if(severity == Status.CANCEL || severity == Status.ERROR) return null;
- // Decide on what action to take after the refresh is completed
- return new WorkbenchAction() {
- public void run() {
- boolean prompt = (event.getStatus().getCode() == IRefreshEvent.STATUS_NO_CHANGES);
-
- SyncInfo[] infos = event.getChanges();
- List selectedResources = new ArrayList();
- selectedResources.addAll(Arrays.asList(event.getResources()));
- for (int i = 0; i < infos.length; i++) {
- selectedResources.add(infos[i].getLocal());
- }
- IResource[] resources = (IResource[]) selectedResources.toArray(new IResource[selectedResources.size()]);
-
- // If it's a file, simply show the compare editor
- if (resources.length == 1 && resources[0].getType() == IResource.FILE) {
- IResource file = resources[0];
- SyncInfo info = participant.getSubscriberSyncInfoCollector().getSyncInfoSet().getSyncInfo(file);
- if(info != null) {
- SyncInfoCompareInput input = new SyncInfoCompareInput(participant.getName(), info);
- CompareUI.openCompareEditor(input);
- prompt = false;
- }
- }
-
- // Prompt user if preferences are set for this type of refresh.
- if (prompt) {
- notifyIfNeededModal(event);
- } else {
- // Else simply show the synchronize view
- ISynchronizeView view = TeamUI.getSynchronizeManager().showSynchronizeViewInActivePage();
- if(view != null) {
- view.display(participant);
- }
- }
- }
- };
- }
-
- private void notifyIfNeededModal(final IRefreshEvent event) {
- TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- String title = (event.getRefreshType() == IRefreshEvent.SCHEDULED_REFRESH ?
- Policy.bind("RefreshCompleteDialog.4a", participant.getName()) : //$NON-NLS-1$
- Policy.bind("RefreshCompleteDialog.4", participant.getName()) //$NON-NLS-1$
- );
- MessageDialog.openInformation(Utils.getShell(null), title, event.getStatus().getMessage());
- }
- });
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java
deleted file mode 100644
index e8fc36fc4..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.CompareUI;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.actions.ActionFactory;
-
-public class RefreshUserNotificationPolicyInModalDialog implements IRefreshSubscriberListener {
-
- private SubscriberParticipant participant;
- private ISynchronizePageConfiguration configuration;
- private Shell shell;
- private String title;
-
- public RefreshUserNotificationPolicyInModalDialog(Shell shell, String title, ISynchronizePageConfiguration configuration, SubscriberParticipant participant) {
- this.title = title;
- this.configuration = configuration;
- this.participant = participant;
- this.shell = shell;
- }
-
- public void refreshStarted(IRefreshEvent event) {
- }
-
- public ActionFactory.IWorkbenchAction refreshDone(final IRefreshEvent event) {
- // Ensure that this event was generated for this participant
- if (event.getSubscriber() != participant.getSubscriber())
- return null;
- // If the event is for a cancelled operation, there's nothing to do
- int severity = event.getStatus().getSeverity();
- if(severity == Status.CANCEL || severity == Status.ERROR)
- return null;
-
- return new WorkbenchAction() {
- public void run() {
- // If there are no changes
- if (event.getStatus().getCode() == IRefreshEvent.STATUS_NO_CHANGES) {
- MessageDialog.openInformation(shell, Policy.bind("OpenComparedDialog.noChangeTitle"), Policy.bind("OpenComparedDialog.noChangesMessage")); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- compareAndOpenDialog(event, participant);
- setEnabled(false);
- }
- public void dispose() {
- if (TeamUI.getSynchronizeManager().get(participant.getId(), participant.getSecondaryId()) == null) {
- participant.dispose();
- }
- }
- };
- }
-
- protected boolean isSingleFileCompare(IResource[] resources) {
- return resources.length == 1 && resources[0].getType() == IResource.FILE;
- }
-
- protected void compareAndOpenEditors(IRefreshEvent event, SubscriberParticipant participant) {
- IResource[] resources = event.getResources();
- for (int i = 0; i < resources.length; i++) {
- SyncInfo info = participant.getSyncInfoSet().getSyncInfo(resources[i]);
- if (info != null) {
- SyncInfoCompareInput input = new SyncInfoCompareInput(event.getSubscriber().getName(), info);
- CompareUI.openCompareEditor(input);
- }
- }
- }
-
- protected void compareAndOpenDialog(final IRefreshEvent event, final SubscriberParticipant participant) {
- CompareConfiguration cc = new CompareConfiguration();
- ParticipantPageSaveablePart input = new ParticipantPageSaveablePart(Utils.getShell(null), cc, configuration, participant) {
- public String getTitle() {
- return RefreshUserNotificationPolicyInModalDialog.this.title;
- }
- };
- ParticipantPageDialog dialog = new ParticipantPageDialog(shell, input, participant);
- dialog.setBlockOnOpen(true);
- dialog.open();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java
deleted file mode 100644
index 73a16661a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RemoteResourceTypedElement.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import java.io.InputStream;
-
-import org.eclipse.compare.*;
-import org.eclipse.core.resources.IEncodedStorage;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.*;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.core.Assert;
-
-/**
- * RemoteResourceTypedElement
- */
-public class RemoteResourceTypedElement extends BufferedContent implements ITypedElement, IEditableContent, IEncodedStreamContentAccessor {
-
- private IResourceVariant remote;
- private IStorage bufferedContents;
-
- /**
- * Creates a new content buffer for the given team node.
- */
- public RemoteResourceTypedElement(IResourceVariant remote) {
- Assert.isNotNull(remote);
- this.remote = remote;
- }
-
- public Image getImage() {
- return CompareUI.getImage(getType());
- }
-
- public String getName() {
- return remote.getName();
- }
-
- public String getContentIdentifier() {
- return remote.getContentIdentifier();
- }
-
- public String getType() {
- if (remote.isContainer()) {
- return ITypedElement.FOLDER_TYPE;
- }
- String name = getName();
- if (name != null) {
- int index = name.lastIndexOf('.');
- if (index == -1)
- return ""; //$NON-NLS-1$
- if (index == (name.length() - 1))
- return ""; //$NON-NLS-1$
- return name.substring(index + 1);
- }
- return ITypedElement.FOLDER_TYPE;
- }
-
- /**
- * Returns true if this object can be modified.
- * If it returns <code>false</code> the other methods must not be called.
- *
- * @return <code>true</code> if this object can be modified.
- */
- public boolean isEditable() {
- return false;
- }
-
- /**
- * This is not the definitive API!
- * This method is called on a parent to
- * - add a child,
- * - remove a child,
- * - copy the contents of a child
- *
- * What to do is encoded in the two arguments as follows:
- * add: child == null other != null
- * remove: child != null other == null
- * copy: child != null other != null
- */
- public ITypedElement replace(ITypedElement child, ITypedElement other) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see BufferedContent#createStream()
- */
- protected InputStream createStream() throws CoreException {
- if(bufferedContents == null) {
- cacheContents(new NullProgressMonitor());
- }
- if (bufferedContents != null) {
- return bufferedContents.getContents();
- }
- return null;
- }
-
- public IResourceVariant getRemote() {
- return remote;
- }
-
- /**
- * Cache the contents for the remote resource in a local buffer
- * @param monitor
- */
- public void cacheContents(IProgressMonitor monitor) throws TeamException {
- bufferedContents = remote.getStorage(monitor);
- }
-
- /**
- * Update the remote handle in this typed element.
- * @param variant the new remote handle
- */
- public void update(IResourceVariant variant) {
- Assert.isNotNull(variant);
- discardBuffer();
- remote = variant;
- fireContentChanged();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.IEncodedStreamContentAccessor#getCharset()
- */
- public String getCharset() throws CoreException {
- if(bufferedContents == null) {
- cacheContents(new NullProgressMonitor());
- }
- if (bufferedContents instanceof IEncodedStorage) {
- return ((IEncodedStorage)bufferedContents).getCharset();
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ScopableSubscriberParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ScopableSubscriberParticipant.java
deleted file mode 100644
index ddb607ae7..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ScopableSubscriberParticipant.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipantDescriptor;
-import org.eclipse.team.ui.synchronize.ISynchronizeScope;
-import org.eclipse.team.ui.synchronize.SubscriberParticipant;
-
-/**
- * subscriber particpant that supports filtering using scopes.
- */
-public abstract class ScopableSubscriberParticipant extends SubscriberParticipant {
-
- /**
- * No arg contructor used to create workspace scope and for
- * creation of persisted participant after startup
- */
- public ScopableSubscriberParticipant() {
- }
-
- public ScopableSubscriberParticipant(ISynchronizeScope scope) {
- super(scope);
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant#setSubscriber(org.eclipse.team.core.subscribers.Subscriber)
- */
- protected void setSubscriber(Subscriber subscriber) {
- super.setSubscriber(subscriber);
- try {
- ISynchronizeParticipantDescriptor descriptor = getDescriptor();
- setInitializationData(descriptor);
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- }
- if (getSecondaryId() == null) {
- setSecondaryId(Long.toString(System.currentTimeMillis()));
- }
- }
-
- /**
- * Return the descriptor for this participant
- * @return the descriptor for this participant
- */
- protected abstract ISynchronizeParticipantDescriptor getDescriptor();
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java
deleted file mode 100644
index e2c55e998..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java
+++ /dev/null
@@ -1,512 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.compare.internal.INavigatable;
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.compare.structuremergeviewer.ICompareInputChangeListener;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.IOpenListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.OpenEvent;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.MenuEvent;
-import org.eclipse.swt.events.MenuListener;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.core.Assert;
-import org.eclipse.team.internal.ui.IPreferenceIds;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.synchronize.actions.StatusLineContributionGroup;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizeModelAction;
-import org.eclipse.team.ui.synchronize.SynchronizePageActionGroup;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.actions.ActionContext;
-import org.eclipse.ui.actions.ActionGroup;
-import org.eclipse.ui.model.BaseWorkbenchContentProvider;
-
-/**
- * A <code>StructuredViewerAdvisor</code> controls various UI
- * aspects of viewers that show {@link SyncInfoSet} like the context menu, toolbar,
- * content provider, label provider, navigation, and model provider. The
- * advisor allows decoupling viewer behavior from the viewers presentation. This
- * allows viewers that aren't in the same class hierarchy to re-use basic
- * behavior.
- * <p>
- * This advisor allows viewer contributions made in a plug-in manifest to
- * be scoped to a particular unique id. As a result the context menu for the
- * viewer can be configured to show object contributions for random id schemes.
- * To enable declarative action contributions for a configuration there are two
- * steps required:
- * <ul>
- * <li>Create a viewer contribution with a <code>targetID</code> that groups
- * sets of actions that are related. A common pratice for synchronize view
- * configurations is to use the participant id as the targetID.
- *
- * <pre>
- * &lt;viewerContribution
- * id=&quot;org.eclipse.team.ccvs.ui.CVSCompareSubscriberContributions&quot;
- * targetID=&quot;org.eclipse.team.cvs.ui.compare-participant&quot;&gt;
- * ...
- * </pre>
- *
- * <li>Create a configuration instance with a <code>menuID</code> that
- * matches the targetID in the viewer contribution.
- * </ul>
- * </p><p>
- * Clients may subclass to add behavior for concrete structured viewers.
- * </p>
- *
- * @see TreeViewerAdvisor
- * @since 3.0
- */
-public abstract class StructuredViewerAdvisor implements IAdaptable {
-
- // The physical model shown to the user in the provided viewer. The information in
- // this set is transformed by the model provider into the actual logical model displayed
- // in the viewer.
- private StructuredViewer viewer;
-
- // The page configuration
- private ISynchronizePageConfiguration configuration;
-
- // Special actions that could not be contributed using an ActionGroup
- private StatusLineContributionGroup statusLine;
- private SynchronizeModelManager modelManager;
-
- private INavigatable nav;
-
- // Property change listener which reponds to:
- // - working set selection by the user
- // - decorator format change selected by the user
- private IPropertyChangeListener propertyListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- // Change to showing of sync state in text labels preference
- if(event.getProperty().equals(IPreferenceIds.SYNCVIEW_VIEW_SYNCINFO_IN_LABEL)) {
- if(viewer != null && !viewer.getControl().isDisposed()) {
- viewer.refresh(true /* update labels */);
- }
- }
- }
- };
-
- /**
- * Create an advisor that will allow viewer contributions with the given <code>targetID</code>. This
- * advisor will provide a presentation model based on the given sync info set. The model is disposed
- * when the viewer is disposed.
- *
- * @param targetID the targetID defined in the viewer contributions in a plugin.xml file.
- * @param site the workbench site with which to register the menuId. Can be <code>null</code> in which
- * case a site will be found using the default workbench page.
- * @param set the set of <code>SyncInfo</code> objects that are to be shown to the user.
- */
- public StructuredViewerAdvisor(ISynchronizePageConfiguration configuration) {
- this.configuration = configuration;
- configuration.setProperty(SynchronizePageConfiguration.P_ADVISOR, this);
-
- // Allow the configuration to provide it's own model manager but if one isn't initialized, then
- // simply use the default provided by the advisor.
- modelManager = (SynchronizeModelManager)configuration.getProperty(SynchronizePageConfiguration.P_MODEL_MANAGER);
- if(modelManager == null) {
- modelManager = createModelManager(configuration);
- }
- Assert.isNotNull(modelManager, "model manager must be set"); //$NON-NLS-1$
- modelManager.setViewerAdvisor(this);
- }
-
- /**
- * Create the model manager to be used by this advisor
- * @param configuration
- */
- protected abstract SynchronizeModelManager createModelManager(ISynchronizePageConfiguration configuration);
-
- /**
- * Install a viewer to be configured with this advisor. An advisor can only be installed with
- * one viewer at a time. When this method completes the viewer is considered initialized and
- * can be shown to the user.
-
- * @param viewer the viewer being installed
- */
- public final void initializeViewer(final StructuredViewer viewer) {
- Assert.isTrue(this.viewer == null, "Can only be initialized once."); //$NON-NLS-1$
- Assert.isTrue(validateViewer(viewer));
- this.viewer = viewer;
-
- initializeListeners(viewer);
- viewer.setLabelProvider(getLabelProvider());
- viewer.setContentProvider(getContentProvider());
- hookContextMenu(viewer);
- }
-
- /* (non-Javadoc)
- * Allow adding an advisor to the PartNavigator and support coordinated
- * navigation between several objects.
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if(adapter == INavigatable.class) {
- if(nav == null) {
- nav = new INavigatable() {
- public boolean gotoDifference(boolean next) {
- return StructuredViewerAdvisor.this.navigate(next);
- }
- };
- }
- return nav;
- }
- return null;
- }
-
- private void initializeStatusLine() {
- statusLine = new StatusLineContributionGroup(
- configuration.getSite().getShell(),
- configuration);
- }
-
- /**
- * Must be called when an advisor is no longer needed.
- */
- public void dispose() {
- if (statusLine != null) {
- statusLine.dispose();
- }
- if (getActionGroup() != null) {
- getActionGroup().dispose();
- }
- TeamUIPlugin.getPlugin().getPreferenceStore().removePropertyChangeListener(propertyListener);
- }
-
- /**
- * Subclasses must implement to allow navigation of their 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.
- */
- public abstract boolean navigate(boolean next);
-
- /**
- * Sets a new selection for this viewer and optionally makes it visible.
- * This is required because the model
- * provider controls the actual model elements in the viewer and must be consulted in order to
- * understand what objects can be selected in the viewer.
- *
- * @param object the objects to select
- * @param reveal <code>true</code> if the selection is to be made visible, and
- * <code>false</code> otherwise
- */
- public void setSelection(ISelection selection, boolean reveal) {
- if (!selection.isEmpty()) {
- viewer.setSelection(selection, reveal);
- }
- }
-
- /**
- * Method invoked from <code>initializeViewer(Composite, StructuredViewer)</code>
- * in order to initialize any listeners for the viewer.
- *
- * @param viewer the viewer being initialize
- */
- protected void initializeListeners(final StructuredViewer viewer) {
- viewer.getControl().addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- StructuredViewerAdvisor.this.dispose();
- }
- });
- viewer.addOpenListener(new IOpenListener() {
- public void open(OpenEvent event) {
- handleOpen();
- }
- });
- viewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- handleDoubleClick(viewer, event);
- }
- });
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- // Update the action bars enablement for any contributed action groups
- updateActionBars((IStructuredSelection)viewer.getSelection());
- }
- });
- TeamUIPlugin.getPlugin().getPreferenceStore().addPropertyChangeListener(propertyListener);
- }
-
- protected boolean handleDoubleClick(StructuredViewer viewer, DoubleClickEvent event) {
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- DiffNode node = (DiffNode) selection.getFirstElement();
- if (node != null && node instanceof SyncInfoModelElement) {
- SyncInfoModelElement syncNode = (SyncInfoModelElement) node;
- IResource resource = syncNode.getResource();
- if (syncNode != null && resource != null && resource.getType() == IResource.FILE) {
- handleOpen();
- return true;
- }
- }
- return false;
- }
-
- private void handleOpen() {
- Object o = getConfiguration().getProperty(SynchronizePageConfiguration.P_OPEN_ACTION);
- if (o instanceof IAction) {
- IAction action = (IAction)o;
- action.run();
- }
- }
-
- /**
- * 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.
- */
- protected abstract boolean validateViewer(StructuredViewer viewer);
-
- /**
- * Returns the content provider for the viewer.
- *
- * @return the content provider for the viewer.
- */
- protected IStructuredContentProvider getContentProvider() {
- return new BaseWorkbenchContentProvider();
- }
-
- /**
- * Get the label provider that will be assigned to the viewer initialized
- * by this configuration. Subclass may override but should either wrap the
- * default one provided by this method or subclass <code>TeamSubscriberParticipantLabelProvider</code>.
- * In the later case, the logical label provider should still be assigned
- * to the subclass of <code>TeamSubscriberParticipantLabelProvider</code>.
- * @param logicalProvider
- * the label provider for the selected logical view
- * @return a label provider
- * @see SynchronizeModelElementLabelProvider
- */
- protected ILabelProvider getLabelProvider() {
- ILabelProvider provider = new SynchronizeModelElementLabelProvider();
- ILabelDecorator[] decorators = (ILabelDecorator[])getConfiguration().getProperty(ISynchronizePageConfiguration.P_LABEL_DECORATORS);
- if (decorators == null) {
- return provider;
- }
- return new DecoratingColorLabelProvider(provider, decorators);
- }
-
- /**
- * Returns the viewer configured by this advisor.
- *
- * @return the viewer configured by this advisor.
- */
- public final StructuredViewer getViewer() {
- return viewer;
- }
-
- /**
- * Called to set the input to a viewer. The input to a viewer is always the model created
- * by the model provider.
- *
- * @param viewer the viewer to set the input.
- */
- public final void setInput(ISynchronizeModelProvider modelProvider) {
- final ISynchronizeModelElement modelRoot = modelProvider.getModelRoot();
- getActionGroup().modelChanged(modelRoot);
- modelRoot.addCompareInputChangeListener(new ICompareInputChangeListener() {
- public void compareInputChanged(ICompareInput source) {
- getActionGroup().modelChanged(modelRoot);
- }
- });
- if (viewer != null) {
- modelProvider.setViewer(viewer);
- viewer.setSorter(modelProvider.getViewerSorter());
- viewer.setInput(modelRoot);
- }
- }
-
- /**
- * @return Returns the configuration.
- */
- public ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-
- /**
- * Method invoked from the synchronize page when the action
- * bars are set. The advisor uses the configuration to determine
- * which groups appear in the action bar menus and allows all
- * action groups registered with the configuration to fill the action bars.
- * @param actionBars the Action bars for the page
- */
- public final void setActionBars(IActionBars actionBars) {
- if(actionBars != null) {
- IToolBarManager manager = actionBars.getToolBarManager();
-
- // Populate the toobar menu with the configured groups
- Object o = configuration.getProperty(ISynchronizePageConfiguration.P_TOOLBAR_MENU);
- if (!(o instanceof String[])) {
- o = ISynchronizePageConfiguration.DEFAULT_TOOLBAR_MENU;
- }
- String[] groups = (String[])o;
- for (int i = 0; i < groups.length; i++) {
- String group = groups[i];
- // The groupIds must be converted to be unique since the toolbar is shared
- manager.add(new Separator(getGroupId(group)));
- }
-
- // view menu
- IMenuManager menu = actionBars.getMenuManager();
- if (menu != null) {
- // Populate the view dropdown menu with the configured groups
- o = configuration.getProperty(ISynchronizePageConfiguration.P_VIEW_MENU);
- if (!(o instanceof String[])) {
- o = ISynchronizePageConfiguration.DEFAULT_VIEW_MENU;
- }
- groups = (String[]) o;
- initializeStatusLine();
- for (int i = 0; i < groups.length; i++) {
- String group = groups[i];
- // The groupIds must be converted to be unique since the
- // view menu is shared
- menu.add(new Separator(getGroupId(group)));
- }
- }
- // status line
- IStatusLineManager statusLineMgr = actionBars.getStatusLineManager();
- if (statusLineMgr != null && statusLine != null) {
- statusLine.fillActionBars(actionBars);
- }
-
- getActionGroup().fillActionBars(actionBars);
- updateActionBars((IStructuredSelection) getViewer().getSelection());
- Object input = viewer.getInput();
- if (input instanceof ISynchronizeModelElement) {
- getActionGroup().modelChanged((ISynchronizeModelElement) input);
- }
- }
- }
-
- /*
- * Method invoked from <code>initializeViewer(StructuredViewer)</code>
- * in order to configure the viewer to call <code>fillContextMenu(StructuredViewer, IMenuManager)</code>
- * when a context menu is being displayed in viewer.
- *
- * @param viewer the viewer being initialized
- * @see fillContextMenu(StructuredViewer, IMenuManager)
- */
- private void hookContextMenu(final StructuredViewer viewer) {
- final MenuManager menuMgr = new MenuManager(null); //$NON-NLS-1$
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(new IMenuListener() {
-
- public void menuAboutToShow(IMenuManager manager) {
- fillContextMenu(viewer, manager);
- }
- });
- Menu menu = menuMgr.createContextMenu(viewer.getControl());
- menu.addMenuListener(new MenuListener() {
-
- public void menuHidden(MenuEvent e) {
- }
-
- // Hack to allow action contributions to update their
- // state before the menu is shown. This is required when
- // the state of the selection changes and the contributions
- // need to update enablement based on this.
- // TODO: Is this hack still needed
- public void menuShown(MenuEvent e) {
- IContributionItem[] items = menuMgr.getItems();
- for (int i = 0; i < items.length; i++) {
- IContributionItem item = items[i];
- if (item instanceof ActionContributionItem) {
- IAction actionItem = ((ActionContributionItem) item).getAction();
- if (actionItem instanceof SynchronizeModelAction) {
- ((SynchronizeModelAction) actionItem).selectionChanged(viewer.getSelection());
- }
- }
- }
- }
- });
- viewer.getControl().setMenu(menu);
- }
-
- /*
- * Callback that is invoked when a context menu is about to be shown in the
- * viewer. Subsclasses must implement to contribute menus. Also, menus can
- * contributed by creating a viewer contribution with a <code>targetID</code>
- * that groups sets of actions that are related.
- *
- * @param viewer the viewer in which the context menu is being shown.
- * @param manager the menu manager to which actions can be added.
- */
- private void fillContextMenu(StructuredViewer viewer, final IMenuManager manager) {
- // Populate the menu with the configured groups
- Object o = configuration.getProperty(ISynchronizePageConfiguration.P_CONTEXT_MENU);
- if (!(o instanceof String[])) {
- o = ISynchronizePageConfiguration.DEFAULT_CONTEXT_MENU;
- }
- String[] groups = (String[])o;
- for (int i = 0; i < groups.length; i++) {
- String group = groups[i];
- // There is no need to adjust the group ids in a contetx menu (see setActionBars)
- manager.add(new Separator(group));
- }
- getActionGroup().setContext(new ActionContext(viewer.getSelection()));
- getActionGroup().fillContextMenu(manager);
- }
-
- private void updateActionBars(IStructuredSelection selection) {
- ActionGroup group = getActionGroup();
- if (group != null) {
- group.setContext(new ActionContext(selection));
- group.updateActionBars();
- }
- }
-
- private SynchronizePageActionGroup getActionGroup() {
- return (SynchronizePageActionGroup)configuration;
- }
-
- private String getGroupId(String group) {
- return ((SynchronizePageConfiguration)configuration).getGroupId(group);
- }
-
- /*
- * For use by test cases only
- * @return Returns the modelManager.
- */
- public SynchronizeModelManager getModelManager() {
- return modelManager;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantPage.java
deleted file mode 100644
index 15f241aa5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantPage.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.core.subscribers.SubscriberSyncInfoCollector;
-import org.eclipse.team.internal.core.subscribers.WorkingSetFilteredSyncInfoCollector;
-import org.eclipse.team.internal.ui.synchronize.actions.SubscriberActionContribution;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SubscriberParticipant;
-
-/**
- * A synchronize view page that works with participants that are subclasses of
- * {@link SubscriberParticipant}. It shows changes in the tree or table view
- * and supports navigation, opening, and filtering changes.
- * <p>
- * Clients can subclass to extend the label decoration or add action bar
- * contributions. For more extensive modifications, clients should create
- * their own custom page.
- * </p>
- * @since 3.0
- */
-public final class SubscriberParticipantPage extends SyncInfoSetSynchronizePage implements IAdaptable {
-
- private SubscriberParticipant participant;
-
- private final static int[] INCOMING_MODE_FILTER = new int[] {SyncInfo.CONFLICTING, SyncInfo.INCOMING};
- private final static int[] OUTGOING_MODE_FILTER = new int[] {SyncInfo.CONFLICTING, SyncInfo.OUTGOING};
- private final static int[] BOTH_MODE_FILTER = new int[] {SyncInfo.CONFLICTING, SyncInfo.INCOMING, SyncInfo.OUTGOING};
- private final static int[] CONFLICTING_MODE_FILTER = new int[] {SyncInfo.CONFLICTING};
-
- /**
- * Filters out-of-sync resources by working set and mode
- */
- private WorkingSetFilteredSyncInfoCollector collector;
-
- /**
- * Constructs a new SynchronizeView.
- */
- public SubscriberParticipantPage(ISynchronizePageConfiguration configuration, SubscriberSyncInfoCollector subscriberCollector) {
- super(configuration);
- this.participant = (SubscriberParticipant)configuration.getParticipant();
- configuration.setComparisonType(isThreeWay()
- ? ISynchronizePageConfiguration.THREE_WAY
- : ISynchronizePageConfiguration.TWO_WAY);
- configuration.addActionContribution(new SubscriberActionContribution());
- initializeCollector(configuration, subscriberCollector);
- }
-
- /**
- * @return Returns the participant.
- */
- public SubscriberParticipant getParticipant() {
- return participant;
- }
-
- /*
- * This method is invoked from <code>setMode</code> when the mode has changed.
- * It sets the filter on the collector to show the <code>SyncInfo</code>
- * appropriate for the mode.
- * @param mode the new mode (one of <code>INCOMING_MODE_FILTER</code>,
- * <code>OUTGOING_MODE_FILTER</code>, <code>CONFLICTING_MODE_FILTER</code>
- * or <code>BOTH_MODE_FILTER</code>)
- */
- protected void updateMode(int mode) {
- if(collector != null && isThreeWay()) {
-
- int[] modeFilter = BOTH_MODE_FILTER;
- switch(mode) {
- case ISynchronizePageConfiguration.INCOMING_MODE:
- modeFilter = INCOMING_MODE_FILTER; break;
- case ISynchronizePageConfiguration.OUTGOING_MODE:
- modeFilter = OUTGOING_MODE_FILTER; break;
- case ISynchronizePageConfiguration.BOTH_MODE:
- modeFilter = BOTH_MODE_FILTER; break;
- case ISynchronizePageConfiguration.CONFLICTING_MODE:
- modeFilter = CONFLICTING_MODE_FILTER; break;
- }
-
- collector.setFilter(
- new FastSyncInfoFilter.AndSyncInfoFilter(
- new FastSyncInfoFilter[] {
- new FastSyncInfoFilter.SyncInfoDirectionFilter(modeFilter)
- }));
- }
- }
-
- private void initializeCollector(ISynchronizePageConfiguration configuration, SubscriberSyncInfoCollector subscriberCollector) {
- SubscriberParticipant participant = getParticipant();
- collector = new WorkingSetFilteredSyncInfoCollector(subscriberCollector, participant.getSubscriber().roots());
- updateMode(configuration.getMode());
- collector.reset();
- configuration.setProperty(ISynchronizePageConfiguration.P_SYNC_INFO_SET, collector.getSyncInfoTree());
- configuration.setProperty(SynchronizePageConfiguration.P_WORKING_SET_SYNC_INFO_SET, collector.getWorkingSetSyncInfoSet());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SyncInfoSetSynchronizePage#isThreeWay()
- */
- protected boolean isThreeWay() {
- return getParticipant().getSubscriber().getResourceComparator().isThreeWay();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.SyncInfoSetSynchronizePage#reset()
- */
- public void reset() {
- getParticipant().reset();
- }
-
- /*
- * Provide internal access to the collector
- * @return Returns the collector.
- */
- public WorkingSetFilteredSyncInfoCollector getCollector() {
- return collector;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantWizard.java
deleted file mode 100644
index 871f03548..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberParticipantWizard.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.ui.*;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-import org.eclipse.team.ui.synchronize.ISynchronizeScope;
-import org.eclipse.team.ui.synchronize.SubscriberParticipant;
-
-/**
- * This is the class registered with the org.eclipse.team.ui.synchronizeWizard
- */
-public abstract class SubscriberParticipantWizard extends Wizard {
-
- private GlobalRefreshResourceSelectionPage selectionPage;
-
- public SubscriberParticipantWizard() {
- setDefaultPageImageDescriptor(TeamImages.getImageDescriptor(ISharedImages.IMG_WIZBAN_SHARE));
- setNeedsProgressMonitor(false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#getWindowTitle()
- */
- public String getWindowTitle() {
- return Policy.bind("GlobalRefreshSubscriberPage.0"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
- public void addPages() {
- selectionPage = new GlobalRefreshResourceSelectionPage(getRootResources());
- selectionPage.setTitle(Policy.bind("GlobalRefreshSubscriberPage.1", getName())); //$NON-NLS-1$
- selectionPage.setMessage(Policy.bind("GlobalRefreshSubscriberPage.2")); //$NON-NLS-1$
- addPage(selectionPage);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.IWizard#performFinish()
- */
- public boolean performFinish() {
- IResource[] resources = selectionPage.getRootResources();
- if(resources != null && resources.length > 0) {
- SubscriberParticipant participant = createParticipant(selectionPage.getSynchronizeScope());
- TeamUI.getSynchronizeManager().addSynchronizeParticipants(new ISynchronizeParticipant[] {participant});
- // We don't know in which site to show progress because a participant could actually be shown in multiple sites.
- participant.run(null /* no site */);
- }
- return true;
- }
-
- protected abstract IResource[] getRootResources();
-
- protected abstract SubscriberParticipant createParticipant(ISynchronizeScope scope);
-
- protected abstract String getName();
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java
deleted file mode 100644
index 74e93867d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SubscriberRefreshSchedule.java
+++ /dev/null
@@ -1,209 +0,0 @@
-package org.eclipse.team.internal.ui.synchronize;
-
-import java.text.DateFormat;
-import java.util.Date;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.synchronize.SubscriberParticipant;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.actions.ActionFactory;
-
-/**
- * Schedule to refresh a subscriber at a specified interval. The schedule can be disabled or enabled
- * and will create the refresh job.
- *
- * @since 3.0
- */
-public class SubscriberRefreshSchedule {
- private long refreshInterval = 3600; // 1 hour default
-
- private boolean enabled = false;
-
- private RefreshSubscriberJob job;
-
- private SubscriberParticipant participant;
-
- private IRefreshEvent lastRefreshEvent;
-
- /**
- * Key for settings in memento
- */
- private static final String CTX_REFRESHSCHEDULE_INTERVAL = TeamUIPlugin.ID + ".CTX_REFRESHSCHEDULE_INTERVAL"; //$NON-NLS-1$
-
- /**
- * Key for schedule in memento
- */
- private static final String CTX_REFRESHSCHEDULE_ENABLED = TeamUIPlugin.ID + ".CTX_REFRESHSCHEDULE_ENABLED"; //$NON-NLS-1$
-
- private IRefreshSubscriberListener refreshSubscriberListener = new IRefreshSubscriberListener() {
- public void refreshStarted(IRefreshEvent event) {
- }
- public ActionFactory.IWorkbenchAction refreshDone(final IRefreshEvent event) {
- if (event.getSubscriber() == participant.getSubscriber()) {
- lastRefreshEvent = event;
- if(enabled && event.getRefreshType() == IRefreshEvent.SCHEDULED_REFRESH) {
- RefreshUserNotificationPolicy policy = new RefreshUserNotificationPolicy(participant);
- policy.refreshDone(event);
- }
- }
- return null;
- }
- };
-
-
- public SubscriberRefreshSchedule(SubscriberParticipant participant) {
- this.participant = participant;
- RefreshSubscriberJob.addRefreshListener(refreshSubscriberListener);
- }
-
- /**
- * @return Returns the enabled.
- */
- public boolean isEnabled() {
- return enabled;
- }
-
- /**
- * @param enabled The enabled to set.
- */
- public void setEnabled(boolean enabled, boolean allowedToStart) {
- boolean wasEnabled = isEnabled();
- this.enabled = enabled;
- if(enabled && ! wasEnabled) {
- if(allowedToStart) {
- startJob();
- }
- } else {
- stopJob();
- }
- }
-
- /**
- * @return Returns the refreshInterval.
- */
- public long getRefreshInterval() {
- return refreshInterval;
- }
-
- public SubscriberParticipant getParticipant() {
- return participant;
- }
-
- /**
- * @param refreshInterval The refreshInterval to set.
- */
- public void setRefreshInterval(long refreshInterval) {
- if(refreshInterval != getRefreshInterval()) {
- stopJob();
- this.refreshInterval = refreshInterval;
- if(isEnabled()) {
- startJob();
- }
- }
- }
-
- public void startJob() {
- SyncInfoSet set = participant.getSubscriberSyncInfoCollector().getSyncInfoSet();
- if(set == null) {
- return;
- }
- if(job == null) {
- SubscriberParticipant participant = getParticipant();
- job = new RefreshSubscriberJob(participant, Policy.bind("RefreshSchedule.14"), Policy.bind("RefreshSchedule.15", participant.getName(), getRefreshIntervalAsString()), participant.getResources(), new RefreshUserNotificationPolicy(getParticipant())); //$NON-NLS-1$
- job.setUser(false);
- } else if(job.getState() != Job.NONE){
- stopJob();
- }
- job.setRefreshInterval(getRefreshInterval());
- job.setRestartOnCancel(true);
- job.setReschedule(true);
- job.schedule(getRefreshInterval());
- }
-
- protected void stopJob() {
- if(job != null) {
- job.setRestartOnCancel(false /* don't restart the job */);
- job.setReschedule(false);
- job.cancel();
- job = null;
- }
- }
-
- public void dispose() {
- stopJob();
- RefreshSubscriberJob.removeRefreshListener(refreshSubscriberListener);
- }
-
- public void saveState(IMemento memento) {
- memento.putString(CTX_REFRESHSCHEDULE_ENABLED, Boolean.toString(enabled));
- memento.putInteger(CTX_REFRESHSCHEDULE_INTERVAL, (int)refreshInterval);
- }
-
- public static SubscriberRefreshSchedule init(IMemento memento, SubscriberParticipant participant) {
- SubscriberRefreshSchedule schedule = new SubscriberRefreshSchedule(participant);
- if(memento != null) {
- String enabled = memento.getString(CTX_REFRESHSCHEDULE_ENABLED);
- int interval = memento.getInteger(CTX_REFRESHSCHEDULE_INTERVAL).intValue();
- schedule.setRefreshInterval(interval);
- schedule.setEnabled("true".equals(enabled) ? true : false, false /* don't start job */); //$NON-NLS-1$
- }
- // Use the defaults if a schedule hasn't been saved or can't be found.
- return schedule;
- }
-
- public static String refreshEventAsString(IRefreshEvent event) {
- if(event == null) {
- return Policy.bind("SyncViewPreferencePage.lastRefreshRunNever"); //$NON-NLS-1$
- }
- long stopMills = event.getStopTime();
- long startMills = event.getStartTime();
- StringBuffer text = new StringBuffer();
- if(stopMills <= 0) {
- text.append(Policy.bind("SyncViewPreferencePage.lastRefreshRunNever")); //$NON-NLS-1$
- } else {
- Date lastTimeRun = new Date(stopMills);
- text.append(DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT).format(lastTimeRun));
- }
- SyncInfo[] changes = event.getChanges();
- if (changes.length != 0) {
- text.append(Policy.bind("RefreshSchedule.6", Integer.toString(changes.length))); //$NON-NLS-1$
- } else {
- text.append(Policy.bind("RefreshSchedule.7")); //$NON-NLS-1$
- }
- return text.toString();
- }
-
- public String getScheduleAsString() {
- if(! isEnabled()) {
- return Policy.bind("RefreshSchedule.8"); //$NON-NLS-1$
- }
- return getRefreshIntervalAsString();
- }
-
- public IRefreshEvent getLastRefreshEvent() {
- return lastRefreshEvent;
- }
-
- private String getRefreshIntervalAsString() {
- boolean hours = false;
- long seconds = getRefreshInterval();
- if(seconds <= 60) {
- seconds = 60;
- }
- long minutes = seconds / 60;
- if(minutes >= 60) {
- minutes = minutes / 60;
- hours = true;
- }
- String unit;
- if(minutes >= 1) {
- unit = (hours ? Policy.bind("RefreshSchedule.9") : Policy.bind("RefreshSchedule.10")); //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- unit = (hours ? Policy.bind("RefreshSchedule.11") : Policy.bind("RefreshSchedule.12")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return Policy.bind("RefreshSchedule.13", Long.toString(minutes), unit); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoModelElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoModelElement.java
deleted file mode 100644
index f6cc756c0..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoModelElement.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.compare.ResourceNode;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ui.Policy;
-
-/**
- * A diff node used to display the synchronization state for resources described by
- * existing {@link SyncInfo} objects. The synchronization state for a node can
- * change after it has been created. Since it implements the <code>ITypedElement</code>
- * and <code>ICompareInput</code> interfaces it can be used directly to
- * display the compare result in a <code>DiffTreeViewer</code> and as the
- * input to any other compare/merge viewer.
- * <p>
- * Clients typically use this class as is, but may subclass if required.
- * </p>
- * @see DiffTreeViewer
- * @see Differencer
- */
-public class SyncInfoModelElement extends SynchronizeModelElement {
-
- private ITypedElement ancestor;
- private SyncInfo info;
-
- /**
- * Construct a <code>SyncInfoModelElement</code> for the given resource.
- *
- * @param set The set associated with the diff tree veiwer
- * @param resource The resource for the node
- */
- public SyncInfoModelElement(IDiffContainer parent, SyncInfo info) {
- super(parent);
- this.info = info;
- // update state
- setKind(info.getKind());
- // local
- setLeft(createLocalTypeElement(info));
- // remote
- setRight(createRemoteTypeElement(info));
- // base
- setAncestor(createBaseTypeElement(info));
-
- fireChange();
- }
-
- /**
- * Update this element with a changed sync info. The remote and base handles have to be updated
- * with the new handles in the sync info.
- *
- * @param info the new sync info
- */
- public void update(SyncInfo info) {
- this.info = info;
- // update state
- setKind(info.getKind());
- // never have to update the local, it's always the workspace resource
- // Remote
- RemoteResourceTypedElement rightEl = (RemoteResourceTypedElement)getRight();
- IResourceVariant remote = info.getRemote();
- if(rightEl == null && remote != null) {
- setRight(createRemoteTypeElement(info));
- } else if(rightEl != null) {
- if(remote == null) {
- setRight(null);
- } else {
- rightEl.update(remote);
- }
- }
- // Base
- RemoteResourceTypedElement ancestorEl = (RemoteResourceTypedElement)getRight();
- IResourceVariant base = info.getBase();
- if(ancestorEl == null && base != null) {
- setAncestor(createBaseTypeElement(info));
- } else if(ancestorEl != null) {
- if(base == null) {
- setAncestor(null);
- } else {
- ancestorEl.update(base);
- }
- }
-
- fireChange();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.DiffElement#getKind()
- */
- public int getKind() {
- SyncInfo info = getSyncInfo();
- if (info != null) {
- return info.getKind();
- } else {
- return SyncInfo.IN_SYNC;
- }
- }
-
- /**
- * We have to track the base because <code>DiffNode</code> doesn't provide a
- * setter. See:
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=52261
- */
- public void setAncestor(ITypedElement ancestor) {
- this.ancestor = ancestor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.DiffNode#getAncestor()
- */
- public ITypedElement getAncestor() {
- return this.ancestor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.DiffNode#getName()
- */
- public String getName() {
- IResource resource = getResource();
- if(resource != null) {
- return resource.getName();
- } else {
- return super.getName();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if(adapter == SyncInfo.class) {
- return getSyncInfo();
- }
- return super.getAdapter(adapter);
- }
-
- /**
- * Helper method that returns the resource associated with this node. A node is not
- * required to have an associated local resource.
- * @return the resource associated with this node or <code>null</code> if the local
- * contributor is not a resource.
- */
- public IResource getResource() {
- ITypedElement element = getLeft();
- if(element instanceof ResourceNode) {
- return ((ResourceNode)element).getResource();
- }
- return null;
- }
-
- /**
- * Return true if the receiver's Subscriber and Resource are equal to that of object.
- * @param object The object to test
- * @return true has the same subsriber and resource
- */
- public boolean equals(Object object) {
- return this==object;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- IResource resource = getResource();
- if (resource == null) {
- return super.hashCode();
- }
- return resource.hashCode();
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return getResource() != null ? getResource().getFullPath().toString() : getName();
- }
-
- /**
- * Cache the contents for the base and remote.
- * @param monitor
- */
- public void cacheContents(IProgressMonitor monitor) throws TeamException {
- ITypedElement base = getAncestor();
- ITypedElement remote = getRight();
- int work = Math.min((remote== null ? 0 : 50) + (base == null ? 0 : 50), 10);
- monitor.beginTask(null, work);
- try {
- if (base != null && base instanceof RemoteResourceTypedElement) {
- ((RemoteResourceTypedElement)base).cacheContents(Policy.subMonitorFor(monitor, 50));
- }
- if (remote != null && remote instanceof RemoteResourceTypedElement) {
- ((RemoteResourceTypedElement)remote).cacheContents(Policy.subMonitorFor(monitor, 50));
- }
- } finally {
- monitor.done();
- }
- }
-
- public SyncInfo getSyncInfo() {
- return info;
- }
-
- /**
- * Create an ITypedElement for the given local resource. The returned ITypedElement
- * will prevent editing of outgoing deletions.
- */
- private static ITypedElement createTypeElement(final IResource resource, final int kind) {
- if(resource != null) {
- return new LocalResourceTypedElement(resource) {
- public boolean isEditable() {
- if(! resource.exists() && SyncInfo.getDirection(kind) == SyncInfo.OUTGOING && SyncInfo.getChange(kind) == SyncInfo.DELETION) {
- return false;
- }
- return super.isEditable();
- }
- };
- }
- return null;
- }
-
- /**
- * Create an ITypedElement for the given remote resource. The contents for the remote resource
- * will be retrieved from the given IStorage which is a local cache used to buffer the remote contents
- */
- protected static ITypedElement createTypeElement(IResourceVariant remoteResource) {
- return new RemoteResourceTypedElement(remoteResource);
- }
-
- protected static ITypedElement createRemoteTypeElement(SyncInfo info) {
- if(info != null && info.getRemote() != null) {
- return createTypeElement(info.getRemote());
- }
- return null;
- }
-
- protected static ITypedElement createLocalTypeElement(SyncInfo info) {
- if(info != null && info.getLocal() != null) {
- return createTypeElement(info.getLocal(), info.getKind());
- }
- return null;
- }
-
- protected static ITypedElement createBaseTypeElement(SyncInfo info) {
- if(info != null && info.getBase() != null) {
- return createTypeElement(info.getBase());
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetSynchronizePage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetSynchronizePage.java
deleted file mode 100644
index e82186f34..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetSynchronizePage.java
+++ /dev/null
@@ -1,300 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.actions.DirectionFilterActionGroup;
-import org.eclipse.team.ui.synchronize.ISynchronizePage;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ISynchronizePageSite;
-import org.eclipse.team.ui.synchronize.SynchronizePageActionGroup;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.part.IShowInSource;
-import org.eclipse.ui.part.IShowInTargetList;
-import org.eclipse.ui.part.Page;
-import org.eclipse.ui.part.ShowInContext;
-
-/**
- * Abstract synchronize page that populates the view using a sync info set
- * that is possibly filtered by a working set and a mode incoming, outgoing,
- * both or conflicting).
- * <p>
- * The particpant creating this page must set the particpant set property
- * of the page configuration before the page is created. Subclasses
- * should set the working set sync info set and output sync info set
- * in the configuration. These sets are used by the page to display
- * appropriate messages when the view is empty.
- */
-public abstract class SyncInfoSetSynchronizePage 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
- // the viewer type is switched.
- private Composite composite;
- private ChangesSection changesSection;
- private Viewer changesViewer;
- private StructuredViewerAdvisor viewerAdvisor;
-
- /*
- * Contribute actions for changing modes to the page.
- */
- class SyncInfoSetActions extends SynchronizePageActionGroup {
- private DirectionFilterActionGroup modes;
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- if (isThreeWay()) {
- modes = new DirectionFilterActionGroup(configuration);
- }
- }
- public void fillActionBars(IActionBars actionBars) {
- super.fillActionBars(actionBars);
- if (modes == null) return;
- IToolBarManager manager = actionBars.getToolBarManager();
- IContributionItem group = findGroup(manager, ISynchronizePageConfiguration.MODE_GROUP);
- if (manager != null && group != null) {
- modes.fillToolBar(group.getId(), manager);
- }
- IMenuManager viewMenu = actionBars.getMenuManager();
- group = findGroup(manager, ISynchronizePageConfiguration.MODE_GROUP);
- if (viewMenu != null && group != null) {
- IContributionItem layoutGroup = findGroup(manager, ISynchronizePageConfiguration.LAYOUT_GROUP);
- if (layoutGroup != null) {
- // Put the modes in the layout group to save space
- group = layoutGroup;
- }
- MenuManager modesItem = new MenuManager(Policy.bind("action.modes.label")); //$NON-NLS-1$
- viewMenu.appendToGroup(group.getId(), modesItem);
- modes.fillMenu(modesItem);
- }
- }
- private boolean isThreeWay() {
- return ISynchronizePageConfiguration.THREE_WAY.equals(configuration.getComparisonType());
- }
- }
-
- /**
- * Create a new instance of the page
- * @param configuration a synchronize page configuration
- */
- protected SyncInfoSetSynchronizePage(ISynchronizePageConfiguration configuration) {
- this.configuration = configuration;
- configuration.setPage(this);
- configuration.addActionContribution(new SyncInfoSetActions());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- composite = new Composite(parent, SWT.NONE);
- //sc.setContent(composite);
- GridLayout gridLayout= new GridLayout();
- gridLayout.makeColumnsEqualWidth= false;
- gridLayout.marginWidth= 0;
- gridLayout.marginHeight = 0;
- gridLayout.verticalSpacing = 0;
- composite.setLayout(gridLayout);
- 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 = new ChangesSection(composite, this, configuration);
- this.changesViewer = createChangesViewer(changesSection.getComposite());
- changesSection.setViewer(changesViewer);
- }
-
- protected Viewer createChangesViewer(Composite parent) {
- viewerAdvisor = new TreeViewerAdvisor(parent, configuration);
- return viewerAdvisor.getViewer();
- }
-
- public StructuredViewerAdvisor getViewerAdvisor() {
- return viewerAdvisor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#getControl()
- */
- public Control getControl() {
- return composite;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#setFocus()
- */
- public void setFocus() {
- changesSection.setFocus();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePage#init(org.eclipse.team.ui.synchronize.ISynchronizePageSite)
- */
- public void init(ISynchronizePageSite site) {
- this.site = site;
- IDialogSettings settings = getSettings();
- if (settings != null) {
- try {
- int mode = settings.getInt(ISynchronizePageConfiguration.P_MODE);
- if (mode != 0) {
- configuration.setMode(mode);
- }
- } catch (NumberFormatException e) {
- // The mode settings does not exist.
- // Leave the mode as is (assuming the
- // participant initialized it to an
- // appropriate value
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#setActionBars(org.eclipse.ui.IActionBars)
- */
- public void setActionBars(IActionBars actionBars) {
- // Delegate menu creation to the advisor
- viewerAdvisor.setActionBars(actionBars);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.Page#dispose()
- */
- public void dispose() {
- changesSection.dispose();
- composite.dispose();
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePage#getViewer()
- */
- 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)
- */
- public boolean aboutToChangeProperty(
- ISynchronizePageConfiguration configuration, String key,
- Object newValue) {
- if (key.equals(ISynchronizePageConfiguration.P_MODE)) {
- return (internalSetMode(configuration.getMode(), ((Integer)newValue).intValue()));
- }
- return true;
- }
-
- private boolean internalSetMode(int oldMode, int mode) {
- if(oldMode == mode) return false;
- updateMode(mode);
- IDialogSettings settings = getSettings();
- if (settings != null) {
- settings.put(ISynchronizePageConfiguration.P_MODE, mode);
- }
- return true;
- }
-
- /*
- * This method enables "Show In" support for this view
- *
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class key) {
- if (key.equals(ISelectionProvider.class))
- return changesViewer;
- if (key == IShowInSource.class) {
- return new IShowInSource() {
- public ShowInContext getShowInContext() {
- StructuredViewer v = (StructuredViewer)changesViewer;
- if (v == null) return null;
- ISelection s = v.getSelection();
- if (s instanceof IStructuredSelection) {
- Object[] resources = Utils.getResources(((IStructuredSelection)s).toArray());
- return new ShowInContext(null, new StructuredSelection(resources));
- }
- return null;
- }
- };
- }
- if (key == IShowInTargetList.class) {
- return new IShowInTargetList() {
- public String[] getShowInTargetIds() {
- return new String[] { IPageLayout.ID_RES_NAV };
- }
-
- };
- }
- return null;
- }
-
- /**
- * Return the page site that was assigned to this page.
- * @return the page site that was assigned to this page
- */
- public ISynchronizePageSite getSynchronizePageSite() {
- return site;
- }
-
- /**
- * Return the synchronize page configuration that was used to create
- * this page.
- * @return Returns the configuration.
- */
- public ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-
- /**
- * Return the settings for the page from the configuration
- * os <code>null</code> if settings can not be persisted
- * for the page
- * @return the persisted page settings
- */
- protected IDialogSettings getSettings() {
- return configuration.getSite().getPageSettings();
- }
-
- /**
- * 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.
- * @param mode the mode to be used
- */
- protected abstract void updateMode(int mode);
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
deleted file mode 100644
index cd0f467a2..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
+++ /dev/null
@@ -1,641 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import java.io.*;
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.ListenerList;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.registry.*;
-import org.eclipse.team.ui.ITeamUIConstants;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.*;
-
-/**
- * Manages the registered synchronize participants. It handles notification of
- * participant lifecycles, creation of <code>static</code> participants, management
- * of dynamic participants, and the re-creation of persisted participants.
- * <p>
- * A participant is defined in a plugin manifest and can have several properties:
- * - static: means that they always exist and don't have to be added to the manager
- * - dynamic: will be added to the manager at some later time
- *
- * Part (title, id, icon, composite) - described in plugin.xml (IPartInstance)
- * Can have multiple parts of the same type at runtime -> (IPart)
- * - must acquire a part (IPartInstance.createPart())
- * - must released to part when done (IPartInstance.releasePart())
- * Some parts can added dynamically to the registry and events are fired to listeners. Listeners can create the newly added part via
- * the #createPart() method.
- * Parts can be persisted/restored with some state
- *
- *
- *
- * Lifecycle:
- * startup -> registry read and stored in a participant instance
- * createParticipant(id) ->
- * releaseParticipant(IParticipantDescriptor) ->
- * getParticipantRegistry -> return IParticipantDescriptors that describe the participants
- * shutdown -> persist all settings
- *
- * @see ISynchronizeView
- * @see ISynchronizeParticipant
- * @since 3.0
- */
-public class SynchronizeManager implements ISynchronizeManager {
- /**
- * Synchronize participants listeners
- */
- private ListenerList fListeners = null;
-
- /**
- * Contains the participant descriptions
- */
- private SynchronizeParticipantRegistry participantRegistry = new SynchronizeParticipantRegistry();
-
- /**
- * Contains the synchronize wizard descriptions
- */
- private SynchronizeWizardRegistry wizardRegistry = new SynchronizeWizardRegistry();
-
- /**
- * Contains a table of the state saved between sessions for a participant. The set is keyed
- * as such {String key -> ISynchronizeParticipantReference}.
- */
- private Map participantReferences = Collections.synchronizedMap(new HashMap(10));
-
- // change notification constants
- private final static int ADDED = 1;
- private final static int REMOVED = 2;
-
- // save context constants
- private final static String CTX_PARTICIPANTS = "syncparticipants"; //$NON-NLS-1$
- private final static String CTX_PARTICIPANT = "participant"; //$NON-NLS-1$
- private final static String CTX_ID = "id"; //$NON-NLS-1$
- private final static String CTX_SECONDARY_ID = "secondary_id"; //$NON-NLS-1$
- private final static String CTX_PARTICIPANT_DISPLAY_NAME = "displayName"; //$NON-NLS-1$
- private final static String CTX_PARTICIPANT_DATA = "data"; //$NON-NLS-1$
- private final static String FILENAME = "syncParticipants.xml"; //$NON-NLS-1$
-
- /**
- * Notifies a participant listeners of additions or removals of participant references.
- */
- class SynchronizeViewPageNotifier implements ISafeRunnable {
-
- private ISynchronizeParticipantListener fListener;
- private int fType;
- private ISynchronizeParticipant[] fChanged;
-
- public void handleException(Throwable exception) {
- TeamUIPlugin.log(IStatus.ERROR, Policy.bind("SynchronizeManager.7"), exception); //$NON-NLS-1$
- }
-
- public void run() throws Exception {
- switch (fType) {
- case ADDED :
- fListener.participantsAdded(fChanged);
- break;
- case REMOVED :
- fListener.participantsRemoved(fChanged);
- break;
- }
- }
-
- /**
- * Notifies the given listener of the adds/removes
- * @param participants the participants that changed
- * @param update the type of change
- */
- public void notify(ISynchronizeParticipant[] participants, int update) {
- if (fListeners == null) {
- return;
- }
- fChanged = participants;
- fType = update;
- Object[] copiedListeners = fListeners.getListeners();
- for (int i = 0; i < copiedListeners.length; i++) {
- fListener = (ISynchronizeParticipantListener) copiedListeners[i];
- Platform.run(this);
- }
- fChanged = null;
- fListener = null;
- }
- }
-
- /**
- * Represents a paticipant instance and allows lazy initialization of the instance
- * only when the participant is required.
- */
- private class ParticipantInstance implements ISynchronizeParticipantReference {
- private ReferenceCounter counter;
- private IMemento savedState;
- private SynchronizeParticipantDescriptor descriptor;
- private String secondaryId;
- private String displayName;
-
- public ParticipantInstance(SynchronizeParticipantDescriptor descriptor, String secondaryId, String displayName, IMemento savedState) {
- this.counter = new ReferenceCounter();
- this.secondaryId = secondaryId;
- this.savedState = savedState;
- this.descriptor = descriptor;
- this.displayName = displayName;
- }
-
- public void save(IMemento memento) {
- String key = Utils.getKey(descriptor.getId(), getSecondaryId());
- ISynchronizeParticipant ref = (ISynchronizeParticipant) counter.get(key);
- if(ref != null) {
- ref.saveState(memento);
- } else if(savedState != null) {
- memento.putMemento(savedState);
- }
- }
-
- public boolean equals(Object other) {
- if(other == this) return true;
- if (! (other instanceof ISynchronizeParticipantReference)) return false;
- ISynchronizeParticipantReference otherRef = (ISynchronizeParticipantReference) other;
- String otherSecondaryId = otherRef.getSecondaryId();
- return otherRef.getId().equals(getId()) && Utils.equalObject(getSecondaryId(), otherSecondaryId);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipantReference#getId()
- */
- public String getId() {
- return descriptor.getId();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipantReference#getSecondaryId()
- */
- public String getSecondaryId() {
- return secondaryId;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipantReference#getDisplayName()
- */
- public String getDisplayName() {
- return displayName != null ? displayName : descriptor.getName();
- }
-
- public boolean isInstantiated() {
- String key = Utils.getKey(descriptor.getId(), getSecondaryId());
- return (ISynchronizeParticipant) counter.get(key) != null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipantReference#createParticipant()
- */
- public ISynchronizeParticipant getParticipant() throws TeamException {
- String key = Utils.getKey(descriptor.getId(), getSecondaryId());
- try {
- ISynchronizeParticipant participant = (ISynchronizeParticipant) counter.get(key);
- int refCount = 1;
- if (participant == null) {
- participant = instantiate();
- if(participant != null)
- counter.put(key, participant);
- } else {
- refCount = counter.addRef(key);
- }
- return participant;
- } catch (TeamException e) {
- TeamUIPlugin.log(e);
- // TODO: Temporary handling of bad participant
- participantReferences.remove(key);
- throw new TeamException(Policy.bind("SynchronizeManager.8"), e); //$NON-NLS-1$
- }
- }
-
- public void setParticipant(ISynchronizeParticipant participant) {
- String key = Utils.getKey(descriptor.getId(), getSecondaryId());
- counter.put(key, participant);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipantReference#getDescriptor()
- */
- public ISynchronizeParticipantDescriptor getDescriptor() {
- return descriptor;
- }
-
- private ISynchronizeParticipant instantiate() throws TeamException {
- try {
- ISynchronizeParticipant participant = (ISynchronizeParticipant) TeamUIPlugin.createExtension(descriptor.getConfigurationElement(), SynchronizeParticipantDescriptor.ATT_CLASS);
- participant.setInitializationData(descriptor.getConfigurationElement(), null, null);
- participant.init(getSecondaryId(), savedState);
- savedState = null;
- return participant;
- } catch (PartInitException e) {
- throw new TeamException(Policy.bind("SynchronizeManager.11", descriptor.getName()), e); //$NON-NLS-1$
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- } catch(Exception e) {
- throw new TeamException(Policy.bind("SynchronizeManager.11", descriptor.getName()), e); //$NON-NLS-1$
- }
- }
- }
-
- public SynchronizeManager() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.ui.sync.ISynchronizeManager#addSynchronizeParticipantListener(org.eclipse.team.ui.sync.ISynchronizeParticipantListener)
- */
- public void addSynchronizeParticipantListener(ISynchronizeParticipantListener listener) {
- if (fListeners == null) {
- fListeners = new ListenerList(5);
- }
- fListeners.add(listener);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.ui.sync.ISynchronizeManager#removeSynchronizeParticipantListener(org.eclipse.team.ui.sync.ISynchronizeParticipantListener)
- */
- public void removeSynchronizeParticipantListener(ISynchronizeParticipantListener listener) {
- if (fListeners != null) {
- fListeners.remove(listener);
- }
- }
-
- /**
- * Creates a new participant reference with of the provided type. If the secondayId is specified it
- * is used as the qualifier for multiple instances of the same type.
- * <p>
- * The returned participant reference is a light weight handle describing the participant. The plug-in
- * defining the participant is not loaded. To instantiate a participant a client must call
- * {@link ISynchronizeParticipantReference#createParticipant()} and must call
- * {@link ISynchronizeParticipantReference#releaseParticipant()} when finished with the participant.
- * </p>
- * @param type the type of the participant
- * @param secondaryId a unique id for multiple instance support
- * @return a reference to a participant
- */
- private ParticipantInstance createParticipantReference(String type, String secondaryId, String displayName) throws PartInitException {
- SynchronizeParticipantDescriptor desc = participantRegistry.find(type);
- // ensure that the view id is valid
- if (desc == null)
- throw new PartInitException(Policy.bind("SynchronizeManager.19", type)); //$NON-NLS-1$
- // ensure that multiple instances are allowed if a secondary id is given
- if (secondaryId != null) {
-// if (!desc.isMultipleInstances()) {
-// throw new PartInitException(Policy.bind("SynchronizeManager.20", type)); //$NON-NLS-1$
-// }
- }
- String key = Utils.getKey(type, secondaryId);
- ParticipantInstance ref = (ParticipantInstance) participantReferences.get(key);
- if (ref == null) {
- ref = new ParticipantInstance(desc, secondaryId, displayName, null);
- }
- return ref;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.ui.sync.ISynchronizeManager#addSynchronizeParticipants(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
- */
- public synchronized void addSynchronizeParticipants(ISynchronizeParticipant[] participants) {
- // renamed to createSynchronizeParticipant(id)
- List added = new ArrayList(participants.length);
- for (int i = 0; i < participants.length; i++) {
- ISynchronizeParticipant participant = participants[i];
- String key = Utils.getKey(participant.getId(), participant.getSecondaryId());
- if(! participantReferences.containsKey(key)) {
- try {
- ParticipantInstance ref = createParticipantReference(participant.getId(), participant.getSecondaryId(), participant.getName());
- ref.setParticipant(participant);
- removeMatchingPinnedParticipant(participant.getId());
- participantReferences.put(key, ref);
- added.add(participant);
- } catch (PartInitException e) {
- TeamUIPlugin.log(e);
- continue;
- }
- }
- }
- if (!added.isEmpty()) {
- saveState();
- fireUpdate((ISynchronizeParticipant[]) added.toArray(new ISynchronizeParticipant[added.size()]), ADDED);
- }
- }
-
- private void removeMatchingPinnedParticipant(String id) {
- ISynchronizeParticipantReference[] refs = get(id);
- if (refs.length > 0) {
- // Find an un-pinned participant and replace it
- for (int i = 0; i < refs.length; i++) {
- ISynchronizeParticipantReference reference = refs[i];
- ISynchronizeParticipant p;
- try {
- p = reference.getParticipant();
- if (!p.isPinned()) {
- removeSynchronizeParticipants(new ISynchronizeParticipant[]{p});
- break;
- }
- } catch (TeamException e) {
- continue;
- }
- }
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.ui.sync.ISynchronizeManager#removeSynchronizeParticipants(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
- */
- public synchronized void removeSynchronizeParticipants(ISynchronizeParticipant[] participants) {
- List removed = new ArrayList(participants.length);
- for (int i = 0; i < participants.length; i++) {
- ISynchronizeParticipant participant = participants[i];
- String key = Utils.getKey(participant.getId(), participant.getSecondaryId());
- if(participantReferences.containsKey(key)) {
- ParticipantInstance ref = (ParticipantInstance)participantReferences.remove(key);
- if(ref.isInstantiated()) {
- try {
- ref.getParticipant().dispose();
- } catch (TeamException e) {
- continue;
- }
- }
- removed.add(participant);
- }
- }
- if (!removed.isEmpty()) {
- saveState();
- fireUpdate((ISynchronizeParticipant[]) removed.toArray(new ISynchronizeParticipant[removed.size()]), REMOVED);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeManager#get(java.lang.String)
- */
- public ISynchronizeParticipantReference get(String id, String secondaryId) {
- String key = Utils.getKey(id, secondaryId);
- return (ISynchronizeParticipantReference) participantReferences.get(key);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeManager#get(java.lang.String)
- */
- public ISynchronizeParticipantReference[] get(String id) {
- ISynchronizeParticipantReference[] refs = getSynchronizeParticipants();
- ArrayList refsForId = new ArrayList();
- for (int i = 0; i < refs.length; i++) {
- ISynchronizeParticipantReference reference = refs[i];
- if(reference.getId().equals(id)) {
- refsForId.add(reference);
- }
- }
- return (ISynchronizeParticipantReference[]) refsForId.toArray(new ISynchronizeParticipantReference[refsForId.size()]);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.ui.sync.ISynchronizeManager#getSynchronizeParticipants()
- */
- public synchronized ISynchronizeParticipantReference[] getSynchronizeParticipants() {
- return (ISynchronizeParticipantReference[]) participantReferences.values().toArray(new ISynchronizeParticipantReference[participantReferences.values().size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeManager#showSynchronizeViewInActivePage()
- */
- public ISynchronizeView showSynchronizeViewInActivePage() {
- IWorkbench workbench = TeamUIPlugin.getPlugin().getWorkbench();
- IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
-
- boolean switchPerspectives = promptForPerspectiveSwitch();
- IWorkbenchPage activePage = null;
- if(switchPerspectives) {
- try {
- String pId = TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE);
- activePage = workbench.showPerspective(pId, window);
- } catch (WorkbenchException e) {
- Utils.handleError(window.getShell(), e, Policy.bind("SynchronizeView.14"), e.getMessage()); //$NON-NLS-1$
- }
- }
- try {
- if (activePage == null) {
- activePage = TeamUIPlugin.getActivePage();
- if (activePage == null)
- return null;
- }
- //IViewPart part = activePage.showView(ISynchronizeView.VIEW_ID, Long.toString(System.currentTimeMillis()), IWorkbenchPage.VIEW_ACTIVATE);
- IViewPart part = activePage.showView(ISynchronizeView.VIEW_ID);
- try {
- return (ISynchronizeView) part;
- } catch (ClassCastException e) {
- // Strange that we cannot cast the part (see bug 53671)
- TeamUIPlugin.log(IStatus.ERROR, Policy.bind("SynchronizeManager.18", part.getClass().getName()), e); //$NON-NLS-1$
- return null;
- }
- } catch (PartInitException pe) {
- Utils.handleError(window.getShell(), pe, Policy.bind("SynchronizeView.16"), pe.getMessage()); //$NON-NLS-1$
- return null;
- }
- }
-
- /**
- * Decides what action to take when switching perspectives and showing the synchronize view. Basically there are a
- * set of user preferences that control how perspective switching.
- */
- private boolean promptForPerspectiveSwitch() {
- // Decide if a prompt is even required
- IPreferenceStore store = TeamUIPlugin.getPlugin().getPreferenceStore();
- String option = store.getString(IPreferenceIds.SYNCHRONIZING_COMPLETE_PERSPECTIVE);
- if(option.equals(MessageDialogWithToggle.ALWAYS)) {
- return true;
- } else if(option.equals(MessageDialogWithToggle.NEVER)) {
- return false;
- }
-
- // Otherwise determine if a prompt is required
- IPerspectiveRegistry registry= PlatformUI.getWorkbench().getPerspectiveRegistry();
- String defaultSyncPerspectiveId = store.getString(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE);
- IPerspectiveDescriptor perspectiveDescriptor = registry.findPerspectiveWithId(defaultSyncPerspectiveId);
- IWorkbenchPage page = TeamUIPlugin.getActivePage();
- if(page != null) {
- IPerspectiveDescriptor p = page.getPerspective();
- if(p != null && p.getId().equals(defaultSyncPerspectiveId)) {
- // currently in default perspective
- return false;
- }
- }
-
- if(perspectiveDescriptor != null) {
- String perspectiveName = perspectiveDescriptor.getLabel();
-
- MessageDialogWithToggle m = MessageDialogWithToggle.openYesNoQuestion(Display.getDefault().getActiveShell(),
- Policy.bind("SynchronizeManager.27"), //$NON-NLS-1$
- Policy.bind("SynchronizeManager.30", perspectiveDescriptor.getLabel()), //$NON-NLS-1$
- Policy.bind("SynchronizeManager.31"), //$NON-NLS-1$
- false /* toggle state */,
- store,
- IPreferenceIds.SYNCHRONIZING_COMPLETE_PERSPECTIVE);
-
- int result = m.getReturnCode();
- switch (result) {
- // yes, ok
- case IDialogConstants.YES_ID:
- case IDialogConstants.OK_ID :
- return true;
- // no
- case IDialogConstants.NO_ID :
- return false;
- }
- }
- return false;
- }
-
- /**
- * Creates the participant registry and restore any saved participants.
- * Will also instantiate any static participants.
- */
- public void init() {
- try {
- // Initialize the participant registry - reads all participant extension descriptions.
- participantRegistry.readRegistry(Platform.getPluginRegistry(), TeamUIPlugin.ID, ITeamUIConstants.PT_SYNCPARTICIPANTS);
- // Initialize the wizard registry
- wizardRegistry.readRegistry(Platform.getPluginRegistry(), TeamUIPlugin.ID, ITeamUIConstants.PT_SYNCHRONIZE_WIZARDS);
-
- // Instantiate and register any dynamic participants saved from a
- // previous session.
- restoreSavedParticipants();
- } catch (CoreException e) {
- TeamUIPlugin.log(new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, Policy.bind("SynchronizeManager.8"), e)); //$NON-NLS-1$
- }
- }
-
- /**
- * Allow participant instances to clean-up.
- */
- public void dispose() {
- // save state and settings for existing participants.
- saveState();
- for (Iterator it = participantReferences.values().iterator(); it.hasNext();) {
- ParticipantInstance ref = (ParticipantInstance) it.next();
- if((ref).isInstantiated()) {
- try {
- ref.getParticipant().dispose();
- } catch (TeamException e) {
- continue;
- }
- }
- }
- participantReferences = null;
- }
-
- /**
- * Restores participants that have been saved between sessions.
- */
- private void restoreSavedParticipants() throws CoreException {
- File file = getStateFile();
- Reader reader;
- try {
- reader = new BufferedReader(new FileReader(file));
- } catch (FileNotFoundException e) {
- return;
- }
- IMemento memento = XMLMemento.createReadRoot(reader);
- IMemento[] participantNodes = memento.getChildren(CTX_PARTICIPANT);
- for (int i = 0; i < participantNodes.length; i++) {
- IMemento memento2 = participantNodes[i];
- String id = memento2.getString(CTX_ID);
- String secondayId = memento2.getString(CTX_SECONDARY_ID);
- if (secondayId != null) {
- String displayName = memento2.getString(CTX_PARTICIPANT_DISPLAY_NAME);
- SynchronizeParticipantDescriptor desc = participantRegistry.find(id);
- if (desc != null) {
- String key = Utils.getKey(id, secondayId);
- participantReferences.put(key, new ParticipantInstance(desc, secondayId, displayName, memento2.getChild(CTX_PARTICIPANT_DATA)));
- } else {
- TeamUIPlugin.log(new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, Policy.bind("SynchronizeManager.9", id), null)); //$NON-NLS-1$
- }
- }
- }
- }
-
- /**
- * Saves a file containing the list of participant ids that are registered
- * with this manager. Each initialized participant is also given the chance to save
- * it's state.
- */
- private void saveState() {
- XMLMemento xmlMemento = XMLMemento.createWriteRoot(CTX_PARTICIPANTS);
- List children = new ArrayList();
- for (Iterator it = participantReferences.values().iterator(); it.hasNext(); ) {
- ParticipantInstance ref = (ParticipantInstance) it.next();
- // Participants can opt out of being saved between sessions
- if(! ref.getDescriptor().isPersistent()) continue;
- // Create the state placeholder for a participant
- IMemento participantNode = xmlMemento.createChild(CTX_PARTICIPANT);
- participantNode.putString(CTX_ID, ref.getId());
- String secondaryId = ref.getSecondaryId();
- if(secondaryId != null) {
- participantNode.putString(CTX_SECONDARY_ID,secondaryId);
- }
- participantNode.putString(CTX_PARTICIPANT_DISPLAY_NAME, ref.getDisplayName());
- IMemento participantData = participantNode.createChild(CTX_PARTICIPANT_DATA);
- ref.save(participantData);
- }
- try {
- Writer writer = new BufferedWriter(new FileWriter(getStateFile()));
- try {
- xmlMemento.save(writer);
- } finally {
- writer.close();
- }
- } catch (IOException e) {
- TeamUIPlugin.log(new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, Policy.bind("SynchronizeManager.10"), e)); //$NON-NLS-1$
- }
- }
-
- private File getStateFile() {
- IPath pluginStateLocation = TeamUIPlugin.getPlugin().getStateLocation();
- return pluginStateLocation.append(FILENAME).toFile(); //$NON-NLS-1$
- }
-
- /**
- * Fires notification.
- * @param participants participants added/removed
- * @param type ADD or REMOVE
- */
- private void fireUpdate(ISynchronizeParticipant[] participants, int type) {
- new SynchronizeViewPageNotifier().notify(participants, type);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeManager#getDescriptor()
- */
- public ISynchronizeParticipantDescriptor getParticipantDescriptor(String id) {
- return participantRegistry.find(id);
- }
-
- public SynchronizeWizardDescription[] getWizardDescriptors() {
- return wizardRegistry.getSynchronizeWizards();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElement.java
deleted file mode 100644
index fcda55e62..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElement.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.*;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * A model element that can be shown in viewers.
- *
- * @since 3.0
- */
-public abstract class SynchronizeModelElement extends DiffNode implements IAdaptable, ISynchronizeModelElement {
-
- /*
- * Internal flags bits for stroing properties in the flags variable
- */
- private static final int BUSY_FLAG = 0x01;
- private static final int PROPAGATED_CONFLICT_FLAG = 0x02;
- private static final int PROPAGATED_ERROR_FLAG = 0x04;
- private static final int PROPAGATED_WARNING_FLAG =0x08;
-
- // Instance variable containing the flags for this node
- private int flags;
- private ListenerList listeners;
-
- public SynchronizeModelElement(IDiffContainer parent) {
- super(parent, SyncInfo.IN_SYNC);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
-
- public synchronized void addPropertyChangeListener(IPropertyChangeListener listener) {
- if (listeners == null) {
- listeners = new ListenerList();
- }
- listeners.add(listener);
- }
-
- public synchronized void removePropertyChangeListener(IPropertyChangeListener listener) {
- if (listeners != null) {
- listeners.remove(listener);
- if (listeners.isEmpty()) {
- listeners = null;
- }
- }
- }
-
- /**
- * Return whether this node has the given property set.
- * @param propertyName the flag to test
- * @return <code>true</code> if the property is set
- */
- public boolean getProperty(String propertyName) {
- return (getFlags() & getFlag(propertyName)) > 0;
- }
-
- /**
- * Add the flag to the flags for this node
- * @param propertyName the flag to add
- */
- public void setProperty(String propertyName, boolean value) {
- if (value) {
- if (!getProperty(propertyName)) {
- int flag = getFlag(propertyName);
- flags |= flag;
- firePropertyChange(propertyName);
- }
- } else {
- if (getProperty(propertyName)) {
- int flag = getFlag(propertyName);
- flags ^= flag;
- firePropertyChange(propertyName);
- }
- }
- }
-
- public void setPropertyToRoot(String propertyName, boolean value) {
- if (value) {
- addToRoot(propertyName);
- } else {
- removeToRoot(propertyName);
- }
- }
-
- public void fireChanges() {
- fireChange();
- }
-
- public ImageDescriptor getImageDescriptor(Object object) {
- IResource resource = getResource();
- if(resource != null) {
- IWorkbenchAdapter adapter = (IWorkbenchAdapter)((IAdaptable) resource).getAdapter(IWorkbenchAdapter.class);
- return adapter.getImageDescriptor(resource);
- }
- return null;
- }
-
- public abstract IResource getResource();
-
- private void addToRoot(String flag) {
- setProperty(flag, true);
- SynchronizeModelElement parent = (SynchronizeModelElement)getParent();
- if (parent != null) {
- if (parent.getProperty(flag)) return;
- parent.addToRoot(flag);
- }
- }
-
- private void firePropertyChange(String propertyName) {
- Object[] allListeners;
- synchronized(this) {
- if (listeners == null) return;
- allListeners = listeners.getListeners();
- }
- boolean set = getProperty(propertyName);
- final PropertyChangeEvent event = new PropertyChangeEvent(this, propertyName, Boolean.valueOf(!set), Boolean.valueOf(set));
- for (int i = 0; i < allListeners.length; i++) {
- Object object = allListeners[i];
- if (object instanceof IPropertyChangeListener) {
- final IPropertyChangeListener listener = (IPropertyChangeListener)object;
- Platform.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Exceptions logged by the platform
- }
- public void run() throws Exception {
- listener.propertyChange(event);
- }
- });
- }
- }
- }
-
- private int getFlag(String propertyName) {
- if (propertyName == BUSY_PROPERTY) {
- return BUSY_FLAG;
- } else if (propertyName == PROPAGATED_CONFLICT_PROPERTY) {
- return PROPAGATED_CONFLICT_FLAG;
- } else if(propertyName == PROPAGATED_ERROR_MARKER_PROPERTY) {
- return PROPAGATED_ERROR_FLAG;
- } else if(propertyName == PROPAGATED_WARNING_MARKER_PROPERTY) {
- return PROPAGATED_WARNING_FLAG;
- }
- return 0;
- }
-
- private int getFlags() {
- return flags;
- }
-
- private boolean hasChildWithFlag(String flag) {
- IDiffElement[] childen = getChildren();
- for (int i = 0; i < childen.length; i++) {
- IDiffElement element = childen[i];
- if (((SynchronizeModelElement)element).getProperty(flag)) {
- return true;
- }
- }
- return false;
- }
-
- private void removeToRoot(String flag) {
- boolean hasProperty = getProperty(flag);
- if(hasProperty) {
- setProperty(flag, false);
- SynchronizeModelElement parent = (SynchronizeModelElement)getParent();
- if (parent != null) {
- // If the parent doesn't have the tag, no recalculation is required
- // Also, if the parent still has a child with the tag, no recalculation is needed
- if (parent.getProperty(flag) && !parent.hasChildWithFlag(flag)) {
- // The parent no longer has the flag so propogate the reclaculation
- parent.removeToRoot(flag);
- }
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementLabelProvider.java
deleted file mode 100644
index f201c60ee..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementLabelProvider.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import java.util.*;
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.structuremergeviewer.DiffNode;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * A label provider that decorates viewers showing
- * {@link ISynchronizeModelElement}.
- *
- * @since 3.0
- */
-public class SynchronizeModelElementLabelProvider extends LabelProvider implements IColorProvider, IFontProvider {
-
- // Cache for folder images that have been overlayed with conflict icon
- private Map fgImageCache;
-
- // Contains direction images
- CompareConfiguration compareConfig = new CompareConfiguration();
-
- // Used as the base label provider for retreiving image and text from
- // the workbench adapter.
- private WorkbenchLabelProvider workbenchLabelProvider = new WorkbenchLabelProvider();
-
- // Font used to display busy elements
- private Font busyFont;
-
- public SynchronizeModelElementLabelProvider() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
- */
- public Color getForeground(Object element) {
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
- */
- public Color getBackground(Object element) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
- */
- public Font getFont(Object element) {
- if (element instanceof ISynchronizeModelElement) {
- ISynchronizeModelElement node = (ISynchronizeModelElement)element;
- if(node.getProperty(ISynchronizeModelElement.BUSY_PROPERTY)) {
- if (busyFont == null) {
- Font defaultFont = JFaceResources.getDefaultFont();
- FontData[] data = defaultFont.getFontData();
- for (int i = 0; i < data.length; i++) {
- data[i].setStyle(SWT.ITALIC);
- }
- busyFont = new Font(TeamUIPlugin.getStandardDisplay(), data);
- }
- return busyFont;
- }
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
- */
- public Image getImage(Object element) {
- Image base = workbenchLabelProvider.getImage(element);
- if (base != null) {
- if (element instanceof ISynchronizeModelElement) {
- ISynchronizeModelElement syncNode = (ISynchronizeModelElement) element;
- int kind = syncNode.getKind();
- Image decoratedImage;
- decoratedImage = getCompareImage(base, kind);
- // The reason we still overlay the compare image is to
- // ensure that the image width for all images shown in the viewer
- // are consistent.
- return propagateConflicts(decoratedImage, syncNode);
- }
- }
- return base;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
- */
- public String getText(Object element) {
- String base = workbenchLabelProvider.getText(element);
- if (element instanceof DiffNode) {
- if (TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.SYNCVIEW_VIEW_SYNCINFO_IN_LABEL)) {
- // if the folder is already conflicting then don't bother
- // propagating the conflict
- int kind = ((DiffNode) element).getKind();
- if (kind != SyncInfo.IN_SYNC) {
- String syncKindString = SyncInfo.kindToString(kind);
- return Policy.bind("TeamSubscriberSyncPage.labelWithSyncKind", base, syncKindString); //$NON-NLS-1$
- }
- }
- }
- return base;
- }
-
- protected Image getCompareImage(Image base, int kind) {
- switch (kind & SyncInfo.DIRECTION_MASK) {
- case SyncInfo.OUTGOING :
- kind = (kind & ~SyncInfo.OUTGOING) | SyncInfo.INCOMING;
- break;
- case SyncInfo.INCOMING :
- kind = (kind & ~SyncInfo.INCOMING) | SyncInfo.OUTGOING;
- break;
- }
- return compareConfig.getImage(base, kind);
- }
-
- private Image propagateConflicts(Image base, ISynchronizeModelElement element) {
- // if the folder is already conflicting then don't bother propagating
- // the conflict
- List overlays = new ArrayList();
- List locations = new ArrayList();
-
- // Decorate with the busy indicator
- if (element.getProperty(ISynchronizeModelElement.BUSY_PROPERTY)) {
- overlays.add(TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_HOURGLASS_OVR));
- locations.add(new Integer(OverlayIcon.TOP_LEFT));
- }
- // Decorate with propagated conflicts and problem markers
- int kind = element.getKind();
- if ((kind & SyncInfo.DIRECTION_MASK) != SyncInfo.CONFLICTING) {
- if (hasDecendantConflicts(element)) {
- overlays.add(TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_CONFLICT_OVR));
- locations.add(new Integer(OverlayIcon.BOTTOM_RIGHT));
- }
- }
- if (hasErrorMarker(element)) {
- overlays.add(TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_ERROR_OVR));
- locations.add(new Integer(OverlayIcon.BOTTOM_LEFT));
- } else if (hasWarningMarker(element)) {
- overlays.add(TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_WARNING_OVR));
- locations.add(new Integer(OverlayIcon.BOTTOM_LEFT));
- }
- if (!overlays.isEmpty()) {
- ImageDescriptor[] overlayImages = (ImageDescriptor[]) overlays.toArray(new ImageDescriptor[overlays.size()]);
- int[] locationInts = new int[locations.size()];
- for (int i = 0; i < locations.size(); i++) {
- locationInts[i] = ((Integer) locations.get(i)).intValue();
- }
- ImageDescriptor overlay = new OverlayIcon(base, overlayImages, locationInts, new Point(base.getBounds().width, base.getBounds().height));
- if (fgImageCache == null) {
- fgImageCache = new HashMap(10);
- }
- Image conflictDecoratedImage = (Image) fgImageCache.get(overlay);
- if (conflictDecoratedImage == null) {
- conflictDecoratedImage = overlay.createImage();
- fgImageCache.put(overlay, conflictDecoratedImage);
- }
- return conflictDecoratedImage;
- }
- return base;
- }
-
- /**
- * Return whether this diff node has descendant conflicts in the view in
- * which it appears.
- * @return whether the node has descendant conflicts
- */
- private boolean hasDecendantConflicts(ISynchronizeModelElement node) {
- return ((ISynchronizeModelElement)node).getProperty(ISynchronizeModelElement.PROPAGATED_CONFLICT_PROPERTY);
- }
-
- /**
- * Return whether this diff node has descendant conflicts in the view in which it appears.
- * @return whether the node has descendant conflicts
- */
- private boolean hasErrorMarker(ISynchronizeModelElement node) {
- return node.getProperty(ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY);
- }
-
- /**
- * Return whether this diff node has descendant conflicts in the view in which it appears.
- * @return whether the node has descendant conflicts
- */
- private boolean hasWarningMarker(ISynchronizeModelElement node) {
- return node.getProperty(ISynchronizeModelElement.PROPAGATED_WARNING_MARKER_PROPERTY);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- */
- public void dispose() {
- if(busyFont != null) {
- busyFont.dispose();
- }
- compareConfig.dispose();
- if (fgImageCache != null) {
- Iterator it = fgImageCache.values().iterator();
- while (it.hasNext()) {
- Image element = (Image) it.next();
- element.dispose();
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementSorter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementSorter.java
deleted file mode 100644
index 43ce736f5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelElementSorter.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.ui.views.navigator.ResourceSorter;
-
-/**
- * This class sorts <code>SyncInfoModelElement</code> instances.
- * It is not thread safe so it should not be reused between views.
- */
-public class SynchronizeModelElementSorter extends ResourceSorter {
-
- public SynchronizeModelElementSorter() {
- super(ResourceSorter.NAME);
- }
-
- /* (non-Javadoc)
- * Method declared on ViewerSorter.
- */
- public int compare(Viewer viewer, Object o1, Object o2) {
- IResource resource1 = getResource(o1);
- IResource resource2 = getResource(o2);
- int result;
- if (resource1 != null && resource2 != null) {
- result = super.compare(viewer, resource1, resource2);
- } else {
- result = super.compare(viewer, o1, o2);
- }
- return result;
- }
-
- protected IResource getResource(Object obj) {
- IResource[] resources = Utils.getResources(new Object[] {obj});
- return resources.length == 1 ? resources[0] : null;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelManager.java
deleted file mode 100644
index 936ea2efc..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelManager.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.team.internal.core.Assert;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.IActionBars;
-
-/**
- * Manages the models that can be displayed by a synchronize page
- */
-public abstract class SynchronizeModelManager extends SynchronizePageActionGroup {
-
- private ISynchronizeModelProvider modelProvider;
- private List toggleModelProviderActions;
- private ISynchronizePageConfiguration configuration;
- private StructuredViewerAdvisor advisor;
-
- /**
- * Action that allows changing the model providers supported by this advisor.
- */
- private class ToggleModelProviderAction extends Action implements IPropertyChangeListener {
- private ISynchronizeModelProviderDescriptor descriptor;
- protected ToggleModelProviderAction(ISynchronizeModelProviderDescriptor descriptor) {
- super(descriptor.getName(), Action.AS_RADIO_BUTTON);
- setImageDescriptor(descriptor.getImageDescriptor());
- setToolTipText(descriptor.getName());
- this.descriptor = descriptor;
- update();
- configuration.addPropertyChangeListener(this);
- }
-
- public void run() {
- ISynchronizeModelProvider mp = getActiveModelProvider();
- IStructuredSelection selection = null;
- if(mp != null) {
- if(mp.getDescriptor().getId().equals(descriptor.getId())) return;
- selection = (IStructuredSelection)configuration.getSite().getSelectionProvider().getSelection();
- }
- internalPrepareInput(descriptor.getId(), null);
- setInput();
- if(selection != null) {
- setSelection(selection.toArray(), true);
- }
- }
-
- public void update() {
- ISynchronizeModelProvider mp = getActiveModelProvider();
- if(mp != null) {
- setChecked(mp.getDescriptor().getId().equals(descriptor.getId()));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(SynchronizePageConfiguration.P_MODEL)) {
- update();
- }
- }
- }
-
- public SynchronizeModelManager(ISynchronizePageConfiguration configuration) {
- Assert.isNotNull(configuration, "configuration cannot be null"); //$NON-NLS-1$
- this.configuration = configuration;
- configuration.addActionContribution(this);
- }
-
- /**
- * Initialize the model manager to be used with the provided advisor.
- */
- public void setViewerAdvisor(StructuredViewerAdvisor advisor) {
- this.advisor = advisor;
- }
-
- /**
- * Return the list of supported model providers for this advisor.
- * @param viewer
- * @return
- */
- protected abstract ISynchronizeModelProviderDescriptor[] getSupportedModelProviders();
-
- /**
- * Get the model provider that will be used to create the input
- * for the adviser's viewer.
- * @return the model provider
- */
- protected abstract ISynchronizeModelProvider createModelProvider(String id);
-
- protected ISynchronizeModelProvider getActiveModelProvider() {
- return modelProvider;
- }
-
- protected Object internalPrepareInput(String id, IProgressMonitor monitor) {
- if(modelProvider != null) {
- modelProvider.dispose();
- }
- modelProvider = createModelProvider(id);
- return modelProvider.prepareInput(monitor);
- }
-
- /**
- * Gets a new selection that contains the view model objects that
- * correspond to the given objects. The advisor will try and
- * convert the objects into the appropriate viewer objects.
- * This is required because the model provider controls the actual
- * model elements in the viewer and must be consulted in order to
- * understand what objects can be selected in the viewer.
- * <p>
- * This method does not affect the selection of the viewer itself.
- * It's main purpose is for testing and should not be used by other
- * clients.
- * </p>
- * @param object the objects to select
- * @return a selection corresponding to the given objects
- */
- public ISelection getSelection(Object[] objects) {
- if (modelProvider != null) {
- Object[] viewerObjects = new Object[objects.length];
- for (int i = 0; i < objects.length; i++) {
- viewerObjects[i] = modelProvider.getMapping(objects[i]);
- }
- return new StructuredSelection(viewerObjects);
- } else {
- return StructuredSelection.EMPTY;
- }
- }
-
- /**
- * Sets a new selection for this viewer and optionally makes it visible. The advisor will try and
- * convert the objects into the appropriate viewer objects. This is required because the model
- * provider controls the actual model elements in the viewer and must be consulted in order to
- * understand what objects can be selected in the viewer.
- *
- * @param object the objects to select
- * @param reveal <code>true</code> if the selection is to be made visible, and
- * <code>false</code> otherwise
- */
- protected void setSelection(Object[] objects, boolean reveal) {
- ISelection selection = getSelection(objects);
- if (!selection.isEmpty()) {
- advisor.setSelection(selection, reveal);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#initialize(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- ISynchronizeModelProviderDescriptor[] providers = getSupportedModelProviders();
- // We only need switching of layouts if there is more than one model provider
- if (providers.length > 1) {
- toggleModelProviderActions = new ArrayList();
- for (int i = 0; i < providers.length; i++) {
- final ISynchronizeModelProviderDescriptor provider = providers[i];
- toggleModelProviderActions.add(new ToggleModelProviderAction(provider));
- }
- }
- // The input may of been set already. In that case, don't change it and
- // simply assign it to the view.
- if(modelProvider == null) {
- internalPrepareInput(null, null);
- }
- setInput();
- }
-
- /**
- * Set the input of the viewer
- */
- protected void setInput() {
- configuration.setProperty(SynchronizePageConfiguration.P_MODEL, modelProvider.getModelRoot());
- if(advisor != null)
- advisor.setInput(modelProvider);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#setActionBars(org.eclipse.ui.IActionBars)
- */
- public void fillActionBars(IActionBars actionBars) {
- if (toggleModelProviderActions == null) return;
- IToolBarManager toolbar = actionBars.getToolBarManager();
- IMenuManager menu = actionBars.getMenuManager();
- IContributionItem group = findGroup(menu, ISynchronizePageConfiguration.LAYOUT_GROUP);
- if(menu != null && group != null) {
- MenuManager layout = new MenuManager(Policy.bind("action.layout.label")); //$NON-NLS-1$
- menu.appendToGroup(group.getId(), layout);
- appendToMenu(null, layout);
- } else if(toolbar != null) {
- group = findGroup(toolbar, ISynchronizePageConfiguration.LAYOUT_GROUP);
- if (group != null) {
- appendToMenu(group.getId(), toolbar);
- }
- }
- }
-
- private void appendToMenu(String groupId, IContributionManager menu) {
- for (Iterator iter = toggleModelProviderActions.iterator(); iter.hasNext();) {
- if (groupId == null) {
- menu.add((Action) iter.next());
- } else {
- menu.appendToGroup(groupId, (Action) iter.next());
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#dispose()
- */
- public void dispose() {
- if(modelProvider != null) {
- modelProvider.dispose();
- }
- super.dispose();
- }
-
- /**
- * @return Returns the configuration.
- */
- public ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java
deleted file mode 100644
index 1a85a4612..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelProvider.java
+++ /dev/null
@@ -1,779 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.*;
-
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.team.core.ITeamStatus;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.internal.core.Assert;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.ui.progress.WorkbenchJob;
-
-/**
- * This class is reponsible for creating and maintaining a presentation model of
- * {@link SynchronizeModelElement} elements that can be shown in a viewer. The model
- * is based on the synchronization information contained in the provided {@link SyncInfoSet}.
- * <p>
- * label updates (property propagation to parent nodes)
- * sync change listener (changes, additions, removals, reset)
- * batching busy updates
- * </p>
- *
- * @see HierarchicalModelProvider
- * @see CompressedFoldersModelProvider
- * @since 3.0
- */
-public abstract class SynchronizeModelProvider implements ISyncInfoSetChangeListener, ISynchronizeModelProvider, IResourceChangeListener {
-
- private static boolean DEBUG = false;
-
- // Flags to indicate if tree control should be updated while building the model.
- private boolean refreshViewer;
-
- protected Map resourceMap = Collections.synchronizedMap(new HashMap());
-
- protected SynchronizeModelElement root;
-
- // The viewer this input is being displayed in
- private StructuredViewer viewer;
-
- private Set pendingLabelUpdates = new HashSet();
-
- private LabelUpdateJob labelUpdater = new LabelUpdateJob();
-
- private ISynchronizePageConfiguration configuration;
-
- private IPropertyChangeListener listener = new IPropertyChangeListener() {
- public void propertyChange(final PropertyChangeEvent event) {
- if (event.getProperty() == SynchronizeModelElement.BUSY_PROPERTY) {
- labelUpdater.add(event.getSource(), ((Boolean)event.getNewValue()).booleanValue());
- }
- }
- };
-
- class LabelUpdateJob extends WorkbenchJob {
- public static final int BATCH_WAIT_INCREMENT = 100;
- Set nodes = new HashSet();
- public LabelUpdateJob() {
- super(Policy.bind("HierarchicalModelProvider.0")); //$NON-NLS-1$
- setSystem(true);
- }
- public IStatus runInUIThread(IProgressMonitor monitor) {
- Object[] updates;
- synchronized(nodes) {
- updates = nodes.toArray(new Object[nodes.size()]);
- nodes.clear();
- }
- if (canUpdateViewer()) {
- StructuredViewer tree = getViewer();
- tree.update(updates, null);
- }
- schedule(BATCH_WAIT_INCREMENT);
- return Status.OK_STATUS;
- }
- public void add(Object node, boolean isBusy) {
- synchronized(nodes) {
- nodes.add(node);
- }
- if (isBusy) {
- schedule(BATCH_WAIT_INCREMENT);
- } else {
- // Wait when unbusying to give the events a chance to propogate through
- // the collector
- schedule(BATCH_WAIT_INCREMENT * 10);
- }
- }
- public boolean shouldRun() {
- return !nodes.isEmpty();
- }
- }
-
- private SyncInfoSet set;
-
- /**
- * Create an input based on the provide sync set. The input is not
- * initialized until <code>prepareInput</code> is called.
- * @param set
- * the sync set used as the basis for the model created by this
- * input.
- */
- public SynchronizeModelProvider(ISynchronizePageConfiguration configuration, SyncInfoSet set) {
- this(new UnchangedResourceModelElement(null, ResourcesPlugin.getWorkspace().getRoot()) {
- /*
- * Override to ensure that the diff viewer will appear in CompareEditorInputs
- */
- public boolean hasChildren() {
- return true;
- }
- }, configuration, set);
- }
-
- public SynchronizeModelProvider(SynchronizeModelElement parent, ISynchronizePageConfiguration configuration, SyncInfoSet set) {
- Assert.isNotNull(set);
- Assert.isNotNull(parent);
- this.root = parent;
- this.set = set;
- this.configuration = configuration;
- }
-
- /**
- * 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.
- */
- public SyncInfoSet getSyncInfoSet() {
- return set;
- }
-
- /**
- * Return the page configuration for this provider.
- *
- * @return the page configuration for this provider.
- */
- public ISynchronizePageConfiguration getConfiguration() {
- return configuration;
- }
-
- /**
- * Return the <code>AbstractTreeViewer</code> asociated with this content
- * provider or <code>null</code> if the viewer is not of the proper type.
- * @return
- */
- public StructuredViewer getViewer() {
- return viewer;
- }
-
- public void setViewer(StructuredViewer viewer) {
- Assert.isTrue(viewer instanceof AbstractTreeViewer);
- this.viewer = (AbstractTreeViewer) viewer;
- }
-
- /**
- * Builds the viewer model based on the contents of the sync set.
- */
- public ISynchronizeModelElement prepareInput(IProgressMonitor monitor) {
- // Connect to the sync set which will register us as a listener and give us a reset event
- // in a background thread
- getSyncInfoSet().connect(this, monitor);
- ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
- return getModelRoot();
- }
-
- /**
- * The provider can try and return a mapping for the provided object. Providers often use mappings
- * to store the source of a logical element they have created. For example, when displaying resource
- * based logical elements, a provider will cache the resource -> element mapping for quick retrieval
- * of the element when resource based changes are made.
- *
- * @param object the object to query for a mapping
- * @return an object created by this provider that would be shown in a viewer, or <code>null</code>
- * if the provided object is not mapped by this provider.
- */
- public Object getMapping(Object object) {
- return resourceMap.get(object);
- }
-
- /**
- * Dispose of the builder
- */
- public void dispose() {
- resourceMap.clear();
- getSyncInfoSet().removeSyncSetChangedListener(this);
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
- }
-
- /**
- * 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.
- */
- public ISynchronizeModelElement getModelRoot() {
- return root;
- }
-
- /**
- * Returns the sorter for this model provider.
- *
- * @return the sorter for this model provider.
- */
- public abstract ViewerSorter getViewerSorter();
-
- /**
- * Return the model object (i.e. an instance of <code>SyncInfoModelElement</code>
- * or one of its subclasses) for the given IResource.
- * @param resource
- * the resource
- * @return the <code>SyncInfoModelElement</code> for the given resource
- */
- protected ISynchronizeModelElement getModelObject(IResource resource) {
- return (ISynchronizeModelElement) resourceMap.get(resource);
- }
-
- public void syncInfoChanged(final ISyncInfoSetChangeEvent event, IProgressMonitor monitor) {
- synchronized(this) {
- if (! (event instanceof ISyncInfoTreeChangeEvent)) {
- reset();
- } else {
- final Control ctrl = getViewer().getControl();
- if (ctrl != null && !ctrl.isDisposed()) {
- ctrl.getDisplay().syncExec(new Runnable() {
- public void run() {
- if (!ctrl.isDisposed()) {
- BusyIndicator.showWhile(ctrl.getDisplay(), new Runnable() {
- public void run() {
- handleChanges((ISyncInfoTreeChangeEvent)event);
- ISynchronizeModelElement root = getModelRoot();
- if(root instanceof SynchronizeModelElement)
- ((SynchronizeModelElement)root).fireChanges();
- }
- });
- }
- }
- });
- }
- }
- }
- }
-
- /**
- * For each node create children based on the contents of
- * @param node
- * @return
- */
- protected abstract IDiffElement[] buildModelObjects(ISynchronizeModelElement node);
-
- protected abstract void doAdd(ISynchronizeModelElement parent, ISynchronizeModelElement element);
-
- protected abstract void doRemove(ISynchronizeModelElement element);
-
- protected void associateDiffNode(ISynchronizeModelElement node) {
- IResource resource = node.getResource();
- if(resource != null) {
- resourceMap.put(resource, node);
- }
- }
-
- protected void unassociateDiffNode(IResource resource) {
- resourceMap.remove(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>,
- * <code>handleResourceRemovals(ISyncInfoSetChangeEvent)</code> and
- * <code>handleResourceAdditions(ISyncInfoSetChangeEvent)</code>.
- * @param event
- * the event containing the changed resourcses.
- */
- protected void handleChanges(ISyncInfoTreeChangeEvent event) {
- StructuredViewer viewer = getViewer();
- try {
- viewer.getControl().setRedraw(false);
- handleResourceChanges(event);
- handleResourceRemovals(event);
- handleResourceAdditions(event);
- firePendingLabelUpdates();
- } finally {
- viewer.getControl().setRedraw(true);
- }
- }
-
- /**
- * Update the viewer for the sync set additions in the provided event. This
- * method is invoked by <code>handleChanges(ISyncInfoSetChangeEvent)</code>.
- * Subclasses may override.
- * @param event
- */
- protected abstract void handleResourceAdditions(ISyncInfoTreeChangeEvent event);
-
- /**
- * Update the viewer for the sync set changes in the provided event. This
- * method is invoked by <code>handleChanges(ISyncInfoSetChangeEvent)</code>.
- * Subclasses may override.
- * @param event
- */
- protected abstract void handleResourceChanges(ISyncInfoTreeChangeEvent event);
-
- protected boolean isConflicting(ISynchronizeModelElement diffNode) {
- return (diffNode.getKind() & SyncInfo.DIRECTION_MASK) == SyncInfo.CONFLICTING;
- }
-
- /**
- * Update the viewer for the sync set removals in the provided event. This
- * method is invoked by <code>handleChanges(ISyncInfoSetChangeEvent)</code>.
- * Subclasses may override.
- * @param event
- */
- protected abstract void handleResourceRemovals(ISyncInfoTreeChangeEvent event);
-
- protected void reset() {
- try {
- setAllowRefreshViewer(false);
- // save expansion state
- if(! resourceMap.isEmpty()) {
- saveViewerState();
- }
-
- // Clear existing model, but keep the root node
- resourceMap.clear();
- clearModelObjects(getModelRoot());
- // remove all from tree viewer
- IDiffElement[] elements = getModelRoot().getChildren();
- for (int i = 0; i < elements.length; i++) {
- doRemove((ISynchronizeModelElement)elements[i]);
- }
-
- // Rebuild the model
- associateDiffNode(getModelRoot());
- buildModelObjects(getModelRoot());
-
- // Notify listeners that model has changed
- ISynchronizeModelElement root = getModelRoot();
- if(root instanceof SynchronizeModelElement) {
- ((SynchronizeModelElement)root).fireChanges();
- }
- } finally {
- setAllowRefreshViewer(true);
- }
- TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- StructuredViewer viewer = getViewer();
- if (viewer != null && !viewer.getControl().isDisposed()) {
- viewer.refresh();
- // restore expansion state
- restoreViewerState();
- }
- }
- });
- }
-
- /**
- * Remove any traces of the resource and any of it's descendants in the
- * hiearchy defined by the content provider from the content provider and
- * the viewer it is associated with.
- * @param resource
- */
- protected void removeFromViewer(IResource resource) {
- ISynchronizeModelElement node = getModelObject(resource);
- if (node == null) return;
- calculateProperties(node, true);
- clearModelObjects(node);
- if (canUpdateViewer()) {
- doRemove(node);
- }
- }
-
- /**
- * 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
- * the tree to allow the cleanup of any cached state for the children as
- * well.
- * @param node
- * the root node
- */
- protected void clearModelObjects(ISynchronizeModelElement node) {
- IDiffElement[] children = node.getChildren();
- for (int i = 0; i < children.length; i++) {
- IDiffElement element = children[i];
- if (element instanceof ISynchronizeModelElement) {
- clearModelObjects((ISynchronizeModelElement) element);
- }
- }
- IResource resource = node.getResource();
- if (resource != null) {
- unassociateDiffNode(resource);
- }
- IDiffContainer parent = node.getParent();
- if (parent != null) {
- parent.removeToRoot(node);
- }
- }
-
- protected void addToViewer(ISynchronizeModelElement node) {
- associateDiffNode(node);
- node.addPropertyChangeListener(listener);
- calculateProperties(node, false);
- if (canUpdateViewer()) {
- doAdd((SynchronizeModelElement)node.getParent(), node);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener#syncInfoSetReset(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void syncInfoSetReset(SyncInfoSet set, IProgressMonitor monitor) {
- reset();
- }
-
- /* (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)
- */
- public void syncInfoSetErrors(SyncInfoSet set, ITeamStatus[] errors, IProgressMonitor monitor) {
- // When errors occur we currently don't process them. It may be possible to decorate
- // elements in the model with errors, but currently we prefer to let ignore and except
- // another listener to display them.
- }
-
- protected void saveViewerState() {
- // save visible expanded elements and selection
- if (viewer != null && !viewer.getControl().isDisposed() && viewer instanceof AbstractTreeViewer) {
- final Object[][] expandedElements = new Object[1][1];
- final Object[][] selectedElements = new Object[1][1];
- viewer.getControl().getDisplay().syncExec(new Runnable() {
- public void run() {
- if (viewer != null && !viewer.getControl().isDisposed()) {
- expandedElements[0] = ((AbstractTreeViewer) viewer).getVisibleExpandedElements();
- selectedElements[0] = ((IStructuredSelection) viewer.getSelection()).toArray();
- }
- }
- });
- //
- // Save expansion
- //
- if (expandedElements[0].length > 0) {
- ISynchronizePageConfiguration config = getConfiguration();
- ArrayList savedExpansionState = new ArrayList();
- for (int i = 0; i < expandedElements[0].length; i++) {
- if (expandedElements[0][i] instanceof ISynchronizeModelElement) {
- IResource resource = ((ISynchronizeModelElement) expandedElements[0][i]).getResource();
- if(resource != null)
- savedExpansionState.add(resource.getFullPath().toString());
- }
- }
- config.setProperty(P_VIEWER_EXPANSION_STATE, savedExpansionState);
- }
- //
- // Save selection
- //
- if (selectedElements[0].length > 0) {
- ISynchronizePageConfiguration config = getConfiguration();
- ArrayList savedSelectedState = new ArrayList();
- for (int i = 0; i < selectedElements[0].length; i++) {
- if (selectedElements[0][i] instanceof ISynchronizeModelElement) {
- IResource resource = ((ISynchronizeModelElement) selectedElements[0][i]).getResource();
- if(resource != null)
- savedSelectedState.add(resource.getFullPath().toString());
- }
- }
- config.setProperty(P_VIEWER_SELECTION_STATE, savedSelectedState);
- }
- }
- }
-
- protected void restoreViewerState() {
- // restore expansion state and selection state
- if (viewer != null && !viewer.getControl().isDisposed() && viewer instanceof AbstractTreeViewer) {
- List savedExpansionState = (List)configuration.getProperty(P_VIEWER_EXPANSION_STATE);
- List savedSelectionState = (List)configuration.getProperty(P_VIEWER_SELECTION_STATE);
- IContainer container = ResourcesPlugin.getWorkspace().getRoot();
- final ArrayList expandedElements = new ArrayList();
- if (savedExpansionState != null) {
- for (Iterator it = savedExpansionState.iterator(); it.hasNext();) {
- String path = (String) it.next();
- IResource resource = container.findMember(path, true /* include phantoms */);
- ISynchronizeModelElement element = getModelObject(resource);
- if (element != null) {
- expandedElements.add(element);
- }
- }
- }
- final ArrayList selectedElements = new ArrayList();
- if (savedSelectionState != null) {
- for (Iterator it = savedSelectionState.iterator(); it.hasNext();) {
- String path = (String) it.next();
- IResource resource = container.findMember(path, true /* include phantoms */);
- ISynchronizeModelElement element = getModelObject(resource);
- if (element != null) {
- selectedElements.add(element);
- }
- }
- }
- asyncExec(new Runnable() {
- public void run() {
- ((AbstractTreeViewer) viewer).setExpandedElements(expandedElements.toArray());
- viewer.setSelection(new StructuredSelection(selectedElements));
- }
- });
- }
- }
-
- /**
- * Update the label of the given diff node. Diff nodes
- * are accumulated and updated in a single call.
- * @param diffNode the diff node to be updated
- */
- protected void updateLabel(ISynchronizeModelElement diffNode) {
- pendingLabelUpdates.add(diffNode);
- }
-
- /**
- * @param tree
- * @return
- */
- private boolean canUpdateViewer() {
- StructuredViewer viewer = getViewer();
- return getAllowRefreshViewer() && viewer != null && ! viewer.getControl().isDisposed();
- }
-
- protected void setAllowRefreshViewer(boolean allowRefresh) {
- this.refreshViewer = allowRefresh;
- }
-
- protected boolean getAllowRefreshViewer() {
- return this.refreshViewer;
- }
-
- /**
- * Forces the viewer to update the labels for parents whose children have
- * changed during this round of sync set changes.
- */
- protected void firePendingLabelUpdates() {
- try {
- if (canUpdateViewer()) {
- StructuredViewer tree = getViewer();
- tree.update(pendingLabelUpdates.toArray(new Object[pendingLabelUpdates.size()]), null);
- }
- } finally {
- pendingLabelUpdates.clear();
- }
- }
-
- protected void calculateProperties(ISynchronizeModelElement element, boolean clear) {
- element.setPropertyToRoot(ISynchronizeModelElement.PROPAGATED_CONFLICT_PROPERTY, clear ? false : isConflicting(element));
- propagateProblemMarkers(element, clear);
- updateParentLabels(element);
- }
-
- /**
- * Calculate and propagate problem markers in the element model
- * @param element
- * @param clear
- */
- private void propagateProblemMarkers(ISynchronizeModelElement element, boolean clear) {
- IResource resource = element.getResource();
- if(resource != null && resource.exists()) {
- try {
- String property = null;
- if(! clear) {
- IMarker[] markers = resource.findMarkers(IMarker.PROBLEM, true, getLogicalModelDepth());
- for (int i = 0; i < markers.length; i++) {
- IMarker marker = markers[i];
- try {
- Integer severity = (Integer)marker.getAttribute(IMarker.SEVERITY);
- if(severity != null) {
- if(severity.intValue() == IMarker.SEVERITY_ERROR) {
- property = ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY;
- break;
- } else if(severity.intValue() == IMarker.SEVERITY_WARNING) {
- property = ISynchronizeModelElement.PROPAGATED_WARNING_MARKER_PROPERTY;
- // Keep going because there may be errors on other resources
- }
- }
- } catch(CoreException e) {
- // the marker has been deleted skip this marker and keep going
- if(! (e.getStatus().getCode() == IResourceStatus.MARKER_NOT_FOUND)) {
- return;
- }
- continue;
- }
- }
- }
- // If it doesn't have a direct change, a parent might
- boolean recalculateParentDecorations = hadProblemProperty(element, property);
- if(recalculateParentDecorations) {
- ISynchronizeModelElement parent = (ISynchronizeModelElement)element.getParent();
- if(parent != null) {
- propagateProblemMarkers(parent, false);
- }
- }
- } catch (CoreException e) {
- // ignore problems on this item and keep going
- return;
- }
- }
- }
-
- // none -> error
- // error -> none
- // none -> warning
- // warning -> none
- // warning -> error
- // error -> warning
- private boolean hadProblemProperty(ISynchronizeModelElement element, String property) {
- boolean hadError = element.getProperty(ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY);
- boolean hadWarning = element.getProperty(ISynchronizeModelElement.PROPAGATED_WARNING_MARKER_PROPERTY);
-
- if(hadError) {
- if(! (property == ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY)) {
- element.setPropertyToRoot(ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY, false);
- if(property != null) {
- // error -> warning
- element.setPropertyToRoot(property, true);
- }
- // error -> none
- // recalculate parents
- return true;
- }
- return false;
- } else if(hadWarning) {
- if(! (property == ISynchronizeModelElement.PROPAGATED_WARNING_MARKER_PROPERTY)) {
- element.setPropertyToRoot(ISynchronizeModelElement.PROPAGATED_WARNING_MARKER_PROPERTY, false);
- if(property != null) {
- // warning -> error
- element.setPropertyToRoot(property, true);
- return false;
- }
- // warning -> none
- return true;
- }
- return false;
- } else {
- if(property == ISynchronizeModelElement.PROPAGATED_ERROR_MARKER_PROPERTY) {
- // none -> error
- element.setPropertyToRoot(property, true);
- return false;
- } else if(property == ISynchronizeModelElement.PROPAGATED_WARNING_MARKER_PROPERTY) {
- // none -> warning
- element.setPropertyToRoot(property, true);
- return true;
- }
- return false;
- }
- }
-
- private void updateParentLabels(ISynchronizeModelElement diffNode) {
- updateLabel(diffNode);
- while (diffNode.getParent() != null) {
- diffNode = (ISynchronizeModelElement)diffNode.getParent();
- updateLabel(diffNode);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
- */
- public void resourceChanged(final IResourceChangeEvent event) {
- String[] markerTypes = getMarkerTypes();
- boolean refreshNeeded = false;
- Map changes = new HashMap();
-
- // Accumulate all distinct resources that have had problem marker
- // changes
- for (int idx = 0; idx < markerTypes.length; idx++) {
- IMarkerDelta[] markerDeltas = event.findMarkerDeltas(markerTypes[idx], true);
- for (int i = 0; i < markerDeltas.length; i++) {
- IMarkerDelta delta = markerDeltas[i];
- int kind = delta.getKind();
- IResource resource = delta.getResource();
- if(! changes.containsKey(resource)) {
- ISynchronizeModelElement element = getClosestExistingParent(delta.getResource());
- if(element != null) {
- changes.put(resource, element);
- }
- }
- }
- }
-
- if (!changes.isEmpty()) {
- processMarkerChanges(changes);
- }
- }
-
- /**
- * Calculate the properties for affected resources in our model and fire
- * label changes for changed elements.
- *
- * @param changes the model elements that have changed.
- */
- private void processMarkerChanges(final Map changes) {
- Job job = new Job("Synchronize View: Processing marker changes") {
- protected IStatus run(IProgressMonitor monitor) {
- long start = System.currentTimeMillis();
- synchronized (this) {
- // Changes contains all resources with marker changes
- for (Iterator it = changes.values().iterator(); it.hasNext();) {
- ISynchronizeModelElement element = (ISynchronizeModelElement) it.next();
- calculateProperties(element, false);
- }
- }
- if (DEBUG) {
- long time = System.currentTimeMillis() - start;
- DateFormat TIME_FORMAT = new SimpleDateFormat("m:ss.SSS"); //$NON-NLS-1$
- String took = TIME_FORMAT.format(new Date(time));
- System.out.println(took + " for " + changes.size() + " files"); //$NON-NLS-1$//$NON-NLS-2$
- }
- // Fire label changed
- asyncExec(new Runnable() {
- public void run() {
- firePendingLabelUpdates();
- }
- });
- return Status.OK_STATUS;
- }
- };
- job.setSystem(true);
- job.schedule();
- }
-
- protected ISynchronizeModelElement getClosestExistingParent(IResource resource) {
- ISynchronizeModelElement element = getModelObject(resource);
- if(element == null) {
- do {
- resource = resource.getParent();
- element = getModelObject(resource);
- } while(element == null && resource != null);
- }
- return element;
- }
-
- protected int getLogicalModelDepth() {
- return IResource.DEPTH_INFINITE;
- }
-
- protected String[] getMarkerTypes() {
- return new String[] {IMarker.PROBLEM};
- }
-
- private void asyncExec(final Runnable r) {
- if (canUpdateViewer()) {
- final Control ctrl = getViewer().getControl();
- if (ctrl != null && !ctrl.isDisposed()) {
- ctrl.getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (!ctrl.isDisposed()) {
- BusyIndicator.showWhile(ctrl.getDisplay(), r);
- }
- }
- });
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizePageConfiguration.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizePageConfiguration.java
deleted file mode 100644
index 9fe90fdce..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizePageConfiguration.java
+++ /dev/null
@@ -1,548 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.ListenerList;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.synchronize.actions.DefaultSynchronizePageActions;
-import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
-import org.eclipse.team.ui.synchronize.ISynchronizePage;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ISynchronizePageSite;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-import org.eclipse.team.ui.synchronize.SynchronizePageActionGroup;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.actions.ActionContext;
-
-/**
- * Concrete implementation of the ISynchronizePageConfiguration. It
- * extends SynchronizePageActionGroup in order to delegate action group
- * operations.
- *
- * @since 3.0
- */
-public class SynchronizePageConfiguration extends SynchronizePageActionGroup implements ISynchronizePageConfiguration {
-
- /**
- * Property constant for the page's viewer input which is
- * an instance of <code>ISynchronizeModelElement</code>.
- * This property can be queried by clients but should not be
- * set.
- */
- public static final String P_MODEL = TeamUIPlugin.ID + ".P_MODEL"; //$NON-NLS-1$
-
- /**
- * Property constant for the page's viewer advisor which is
- * an instance of <code>StructuredViewerAdvisor</code>.
- * The page's viewer can be obtained from the advisor.
- * This property can be queried by clients but should not be
- * set.
- */
- public static final String P_ADVISOR = TeamUIPlugin.ID + ".P_ADVISOR"; //$NON-NLS-1$
-
- /**
- * Property constant for the page's navigator
- * an instance of <code>INavigable</code>.
- * This property can be queried by clients and can be set. By default
- * the advisors navigator will be used.
- */
- public static final String P_NAVIGATOR = TeamUIPlugin.ID + ".P_NAVIGATOR"; //$NON-NLS-1$
-
- /**
- * Property constant for the page's model manager which is
- * an instance of <code>SynchronizeModelManager</code>.
- * This property can be queried by clients but should not be
- * set.
- */
- public static final String P_MODEL_MANAGER = TeamUIPlugin.ID + ".P_MODEL_MANAGER"; //$NON-NLS-1$
-
- /**
- * Property that gives access to a set the
- * contains all out-of-sync resources for the particpant
- * in the selected working set.
- */
- public static final String P_WORKING_SET_SYNC_INFO_SET = TeamUIPlugin.ID + ".P_WORKING_SET_SYNC_INFO_SET"; //$NON-NLS-1$
-
- /**
- * Property that gives access to a set the
- * contains all out-of-sync resources for the particpant
- * before any filtering (working set or modes) is applied.
- */
- public static final String P_PARTICIPANT_SYNC_INFO_SET = TeamUIPlugin.ID + ".P_PARTICIPANT_SYNC_INFO_SET"; //$NON-NLS-1$
-
- /**
- * The hidden configuration property that opens the current selection in the
- * page. The registered <code>IAction</code> is invoked on a single or
- * double click depending on the open strategy chosen by the user.
- */
- public static final String P_OPEN_ACTION = TeamUIPlugin.ID + ".P_OPEN_ACTION"; //$NON-NLS-1$
-
- /**
- * Property constant for the style of the view to be used by the page.
- */
- public static final String P_VIEWER_STYLE = TeamUIPlugin.ID + ".P_VIEWER_STYLE"; //$NON-NLS-1$
-
- public static final int CHECKBOX = TreeViewerAdvisor.CHECKBOX;
-
- private ISynchronizeParticipant participant;
- private ISynchronizePageSite site;
- private ListenerList propertyChangeListeners = new ListenerList();
- private ListenerList actionContributions = new ListenerList();
- private Map properties = new HashMap();
- private boolean actionsInitialized = false;
- private ISynchronizePage page;
- private IRunnableContext context;
-
- /**
- * Create a configuration for creating a page from the given particpant.
- * @param participant the particpant whose page is being configured
- */
- public SynchronizePageConfiguration(ISynchronizeParticipant participant) {
- this.participant = participant;
- setProperty(P_CONTEXT_MENU, DEFAULT_CONTEXT_MENU);
- setProperty(P_TOOLBAR_MENU, DEFAULT_TOOLBAR_MENU);
- setProperty(P_VIEW_MENU, DEFAULT_VIEW_MENU);
- setProperty(P_COMPARISON_TYPE, THREE_WAY);
- addActionContribution(new DefaultSynchronizePageActions());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#getParticipant()
- */
- public ISynchronizeParticipant getParticipant() {
- return participant;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#getSite()
- */
- public ISynchronizePageSite getSite() {
- return site;
- }
-
- /**
- * Set the site that is associated with the page that was
- * configured using this configuration.
- * @param site a synchronize page site
- */
- public void setSite(ISynchronizePageSite site) {
- this.site = site;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
- */
- public void addPropertyChangeListener(IPropertyChangeListener listener) {
- synchronized(propertyChangeListeners) {
- propertyChangeListeners.add(listener);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
- */
- public void removePropertyChangeListener(IPropertyChangeListener listener) {
- synchronized(propertyChangeListeners) {
- propertyChangeListeners.remove(listener);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#setProperty(java.lang.String, java.lang.Object)
- */
- public void setProperty(String key, Object newValue) {
- Object oldValue = properties.get(key);
- if (page == null || page.aboutToChangeProperty(this, key, newValue)) {
- properties.put(key, newValue);
- if (oldValue == null || !oldValue.equals(newValue))
- firePropertyChange(key, oldValue, newValue);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#getProperty(java.lang.String)
- */
- public Object getProperty(String key) {
- return properties.get(key);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#addActionContribution(org.eclipse.team.ui.synchronize.IActionContribution)
- */
- public void addActionContribution(SynchronizePageActionGroup contribution) {
- synchronized(actionContributions) {
- actionContributions.add(contribution);
- }
- if (actionsInitialized) {
- contribution.initialize(this);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#removeActionContribution(org.eclipse.team.ui.synchronize.IActionContribution)
- */
- public void removeActionContribution(SynchronizePageActionGroup contribution) {
- synchronized(actionContributions) {
- actionContributions.remove(contribution);
- }
- }
-
- private void firePropertyChange(String key, Object oldValue, Object newValue) {
- Object[] listeners;
- synchronized(propertyChangeListeners) {
- listeners = propertyChangeListeners.getListeners();
- }
- final PropertyChangeEvent event = new PropertyChangeEvent(this, key, oldValue, newValue);
- for (int i = 0; i < listeners.length; i++) {
- final IPropertyChangeListener listener = (IPropertyChangeListener)listeners[i];
- Platform.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Error is logged by platform
- }
- public void run() throws Exception {
- listener.propertyChange(event);
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#initialize(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- public void initialize(final ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- final Object[] listeners = actionContributions.getListeners();
- for (int i= 0; i < listeners.length; i++) {
- final SynchronizePageActionGroup contribution = (SynchronizePageActionGroup)listeners[i];
- Platform.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Logged by Platform
- }
- public void run() throws Exception {
- contribution.initialize(configuration);
- }
- });
- }
- actionsInitialized = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#setContext(org.eclipse.ui.actions.ActionContext)
- */
- public void setContext(final ActionContext context) {
- super.setContext(context);
- final Object[] listeners = actionContributions.getListeners();
- for (int i= 0; i < listeners.length; i++) {
- final SynchronizePageActionGroup contribution = (SynchronizePageActionGroup)listeners[i];
- Platform.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Logged by Platform
- }
- public void run() throws Exception {
- contribution.setContext(context);
- }
- });
- }
- }
-
- /**
- * Callback invoked from the advisor each time the context menu is
- * about to be shown.
- * @param manager the context menu manager
- */
- public void fillContextMenu(final IMenuManager manager) {
- final Object[] listeners = actionContributions.getListeners();
- for (int i= 0; i < listeners.length; i++) {
- final SynchronizePageActionGroup contribution = (SynchronizePageActionGroup)listeners[i];
- Platform.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Logged by Platform
- }
- public void run() throws Exception {
- contribution.fillContextMenu(manager);
- }
- });
- }
- }
-
- /**
- * Callback invoked from the page to fil the action bars.
- * @param actionBars the action bars of the view
- */
- public void fillActionBars(final IActionBars actionBars) {
- if (!actionsInitialized) {
- initialize(this);
- }
- final Object[] listeners = actionContributions.getListeners();
- for (int i= 0; i < listeners.length; i++) {
- final SynchronizePageActionGroup contribution = (SynchronizePageActionGroup)listeners[i];
- Platform.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Logged by Platform
- }
- public void run() throws Exception {
- contribution.fillActionBars(actionBars);
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#updateActionBars()
- */
- public void updateActionBars() {
- final Object[] listeners = actionContributions.getListeners();
- for (int i= 0; i < listeners.length; i++) {
- final SynchronizePageActionGroup contribution = (SynchronizePageActionGroup)listeners[i];
- Platform.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Logged by Platform
- }
- public void run() throws Exception {
- contribution.updateActionBars();
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizePageActionGroup#modelChanged(org.eclipse.team.ui.synchronize.ISynchronizeModelElement)
- */
- public void modelChanged(final ISynchronizeModelElement root) {
- final Object[] listeners = actionContributions.getListeners();
- for (int i= 0; i < listeners.length; i++) {
- final SynchronizePageActionGroup contribution = (SynchronizePageActionGroup)listeners[i];
- Platform.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Logged by Platform
- }
- public void run() throws Exception {
- contribution.modelChanged(root);
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#dispose()
- */
- public void dispose() {
- super.dispose();
- final Object[] listeners = actionContributions.getListeners();
- for (int i= 0; i < listeners.length; i++) {
- final SynchronizePageActionGroup contribution = (SynchronizePageActionGroup)listeners[i];
- Platform.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Logged by Platform
- }
- public void run() throws Exception {
- contribution.dispose();
- }
- });
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#setMenu(java.lang.String, java.lang.String[])
- */
- public void setMenuGroups(String menuPropertyId, String[] groups) {
- setProperty(menuPropertyId, groups);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#appendMenu(java.lang.String, java.lang.String)
- */
- public void addMenuGroup(String menuPropertyId, String groupId) {
- String[] menuGroups = (String[])getProperty(menuPropertyId);
- if (menuGroups == null) {
- menuGroups = getDefault(menuPropertyId);
- }
- String[] newGroups = new String[menuGroups.length + 1];
- System.arraycopy(menuGroups, 0, newGroups, 0, menuGroups.length);
- newGroups[menuGroups.length] = groupId;
- setProperty(menuPropertyId, newGroups);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#hasMenuGroup(java.lang.String, java.lang.String)
- */
- public boolean hasMenuGroup(String menuPropertyId, String groupId) {
- String[] groups = (String[])getProperty(menuPropertyId);
- if (groups == null) {
- groups = getDefault(menuPropertyId);
- }
- for (int i = 0; i < groups.length; i++) {
- String string = groups[i];
- if (string.equals(groupId)) return true;
- }
- return false;
- }
-
- protected String[] getDefault(String menuPropertyId) {
- if (menuPropertyId.equals(P_CONTEXT_MENU)) {
- return DEFAULT_CONTEXT_MENU;
- } else if (menuPropertyId.equals(P_VIEW_MENU)) {
- return DEFAULT_VIEW_MENU;
- } else if (menuPropertyId.equals(P_TOOLBAR_MENU)) {
- return DEFAULT_TOOLBAR_MENU;
- } else {
- return new String[0];
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#addLabelDecorator(org.eclipse.jface.viewers.ILabelDecorator)
- */
- public void addLabelDecorator(ILabelDecorator decorator) {
- ILabelDecorator[] decorators = (ILabelDecorator[])getProperty(P_LABEL_DECORATORS);
- if (decorators == null) {
- decorators = new ILabelDecorator[0];
- }
- // Ensure we don't have it registered already
- for (int i = 0; i < decorators.length; i++) {
- ILabelDecorator d = decorators[i];
- if (d == decorator) {
- return;
- }
- }
- ILabelDecorator[] newDecorators = new ILabelDecorator[decorators.length + 1];
- System.arraycopy(decorators, 0, newDecorators, 0, decorators.length);
- newDecorators[decorators.length] = decorator;
- setProperty(P_LABEL_DECORATORS, newDecorators);
- }
-
- /**
- * @param group
- * @return
- */
- public String getGroupId(String group) {
- String id = getParticipant().getId();
- if (getParticipant().getSecondaryId() != null) {
- id += "."; //$NON-NLS-1$
- id += getParticipant().getSecondaryId();
- }
- return id + "." + group; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.subscribers.ISubscriberPageConfiguration#getMode()
- */
- public int getMode() {
- Object o = getProperty(P_MODE);
- if (o instanceof Integer) {
- return ((Integer)o).intValue();
- }
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.subscribers.ISubscriberPageConfiguration#setMode(int)
- */
- public void setMode(int mode) {
- setProperty(P_MODE, new Integer(mode));
- }
-
- public int getSupportedModes() {
- Object o = getProperty(P_SUPPORTED_MODES);
- if (o instanceof Integer) {
- return ((Integer)o).intValue();
- }
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.subscribers.ISubscriberPageConfiguration#setSupportedModes(int)
- */
- public void setSupportedModes(int modes) {
- setProperty(P_SUPPORTED_MODES, new Integer(modes));
- }
-
- /**
- * @return Returns the page.
- */
- public ISynchronizePage getPage() {
- return page;
- }
- /**
- * @param page The page to set.
- */
- public void setPage(ISynchronizePage page) {
- this.page = page;
- }
-
- /**
- * @return
- */
- public int getViewerStyle() {
- Object o = getProperty(P_VIEWER_STYLE);
- if (o instanceof Integer) {
- return ((Integer)o).intValue();
- }
- return 0;
- }
-
- /**
- * @param style
- */
- public void setViewerStyle(int style) {
- setProperty(P_VIEWER_STYLE, new Integer(style));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#getSyncInfoSet()
- */
- public SyncInfoSet getSyncInfoSet() {
- Object o = getProperty(P_SYNC_INFO_SET);
- if (o instanceof SyncInfoSet) {
- return (SyncInfoSet)o;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#getComparisonType()
- */
- public String getComparisonType() {
- return (String)getProperty(P_COMPARISON_TYPE);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#setComparisonType(java.lang.String)
- */
- public void setComparisonType(String type) {
- setProperty(P_COMPARISON_TYPE,type);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#setRunnableContext(org.eclipse.jface.operation.IRunnableContext)
- */
- public void setRunnableContext(IRunnableContext context) {
- this.context = context;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration#getRunnableContext()
- */
- public IRunnableContext getRunnableContext() {
- return context;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java
deleted file mode 100644
index 76da2ad01..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java
+++ /dev/null
@@ -1,487 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.dialogs.DialogSettings;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.IBasicPropertyConstants;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.actions.*;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.part.*;
-import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
-
-/**
- * Implements a Synchronize View that contains multiple synchronize participants.
- */
-public class SynchronizeView extends PageBookView implements ISynchronizeView, ISynchronizeParticipantListener, IPropertyChangeListener {
-
- /**
- * The participant being displayed, or <code>null</code> if none
- */
- private ISynchronizeParticipant activeParticipantRef = null;
-
- /**
- * Map of participants to dummy participant parts (used to close pages)
- */
- private Map fParticipantToPart;
-
- /**
- * Map of parts to participants
- */
- private Map fPartToParticipant;
-
- /**
- * Drop down action to switch between participants
- */
- private SynchronizePageDropDownAction fPageDropDown;
-
- /**
- * Action to remove the selected participant
- */
- private PinParticipantAction fPinAction;
-
- /**
- * Action to remove the currently shown partipant
- */
- private RemoveSynchronizeParticipantAction fRemoveCurrentAction;
-
- /**
- * Action to remove all non-pinned participants
- */
- private RemoveSynchronizeParticipantAction fRemoveAllAction;
-
- /**
- * Preference key to save
- */
- private static final String KEY_LAST_ACTIVE_PARTICIPANT = "lastactiveparticipant"; //$NON-NLS-1$
- private static final String KEY_SETTINGS_SECTION= "SynchronizeViewSettings"; //$NON-NLS-1$
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- Object source = event.getSource();
- if (source instanceof ISynchronizeParticipant && event.getProperty().equals(IBasicPropertyConstants.P_TEXT)) {
- if (source.equals(getParticipant())) {
- updateTitle();
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPartListener#partClosed(org.eclipse.ui.IWorkbenchPart)
- */
- public void partClosed(IWorkbenchPart part) {
- super.partClosed(part);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.ISynchronizeView#getParticipant()
- */
- public ISynchronizeParticipant getParticipant() {
- return activeParticipantRef;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.PageBookView#showPageRec(org.eclipse.ui.part.PageBookView.PageRec)
- */
- protected void showPageRec(PageRec pageRec) {
- super.showPageRec(pageRec);
- activeParticipantRef = (ISynchronizeParticipant)fPartToParticipant.get(pageRec.part);
- updateActionEnablements();
- updateTitle();
- }
-
- /*
- * Updates the view title based on the active participant
- */
- protected void updateTitle() {
- ISynchronizeParticipant participant = getParticipant();
- if (participant == null) {
- setTitle(getViewName()); //$NON-NLS-1$
- } else {
- SynchronizeViewWorkbenchPart part = (SynchronizeViewWorkbenchPart)fParticipantToPart.get(participant);
- setTitle(Policy.bind("SynchronizeView.2", getViewName(), part.getParticipant().getName())); //$NON-NLS-1$
- }
- }
-
- protected String getViewName() {
- return Policy.bind("SynchronizeView.1"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.PageBookView#doDestroyPage(org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.part.PageBookView.PageRec)
- */
- protected void doDestroyPage(IWorkbenchPart part, PageRec pageRecord) {
- IPage page = pageRecord.page;
- page.dispose();
- pageRecord.dispose();
- SynchronizeViewWorkbenchPart syncPart = (SynchronizeViewWorkbenchPart) part;
- ISynchronizeParticipant participant = syncPart.getParticipant();
- participant.removePropertyChangeListener(this);
-
- // empty cross-reference cache
- fPartToParticipant.remove(part);
- fParticipantToPart.remove(participant);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.PageBookView#doCreatePage(org.eclipse.ui.IWorkbenchPart)
- */
- protected PageRec doCreatePage(IWorkbenchPart dummyPart) {
- SynchronizeViewWorkbenchPart part = (SynchronizeViewWorkbenchPart)dummyPart;
- ISynchronizeParticipant participant = part.getParticipant();
- participant.addPropertyChangeListener(this);
- ISynchronizePageConfiguration configuration = participant.createPageConfiguration();
- IPageBookViewPage page = participant.createPage(configuration);
- if(page != null) {
- initPage(page);
- initPage(configuration, page);
- page.createControl(getPageBook());
- PageRec rec = new PageRec(dummyPart, page);
- return rec;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.PageBookView#initPage(org.eclipse.ui.part.IPageBookViewPage)
- */
- protected void initPage(ISynchronizePageConfiguration configuration, IPageBookViewPage page) {
- // A page site does not provide everything the page may need
- // Also provide the synchronize page site if the page is a synchronize view page
- ((SynchronizePageConfiguration)configuration).setSite(new WorkbenchPartSynchronizePageSite(this, page.getSite(), getDialogSettings(configuration.getParticipant())));
- if (page instanceof ISynchronizePage) {
- try {
- ((ISynchronizePage)page).init(configuration.getSite());
- } catch (PartInitException e) {
- TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.PageBookView#isImportant(org.eclipse.ui.IWorkbenchPart)
- */
- protected boolean isImportant(IWorkbenchPart part) {
- return part instanceof SynchronizeViewWorkbenchPart;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#dispose()
- */
- public void dispose() {
- super.dispose();
- TeamUI.getSynchronizeManager().removeSynchronizeParticipantListener(this);
- if(activeParticipantRef != null) {
- IDialogSettings section = getDialogSettings();
- section.put(KEY_LAST_ACTIVE_PARTICIPANT, activeParticipantRef.getId());
- }
- fParticipantToPart = null;
- fPartToParticipant = null;
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.PageBookView#createDefaultPage(org.eclipse.ui.part.PageBook)
- */
- protected IPage createDefaultPage(PageBook book) {
- Page page = new MessagePage();
- page.createControl(getPageBook());
- initPage(page);
- return page;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.ISynchronizeParticipantListener#participantsAdded(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
- */
- public void participantsAdded(final ISynchronizeParticipant[] participants) {
- for (int i = 0; i < participants.length; i++) {
- ISynchronizeParticipant participant = participants[i];
- if (isAvailable() && select(TeamUI.getSynchronizeManager().get(participant.getId(), participant.getSecondaryId()))) {
- SynchronizeViewWorkbenchPart part = new SynchronizeViewWorkbenchPart(participant, getSite());
- fParticipantToPart.put(participant, part);
- fPartToParticipant.put(part, participant);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.ISynchronizeParticipantListener#participantsRemoved(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
- */
- public void participantsRemoved(final ISynchronizeParticipant[] participants) {
- if (isAvailable()) {
- Runnable r = new Runnable() {
- public void run() {
- for (int i = 0; i < participants.length; i++) {
- ISynchronizeParticipant participant = participants[i];
- if (isAvailable()) {
- SynchronizeViewWorkbenchPart part = (SynchronizeViewWorkbenchPart)fParticipantToPart.get(participant);
- if (part != null) {
- partClosed(part);
- }
- // Remove any settings created for the participant
- removeDialogSettings(participant);
- if (getParticipant() == null) {
- ISynchronizeParticipantReference[] available = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
- if (available.length > 0) {
- ISynchronizeParticipant p;
- try {
- p = available[available.length - 1].getParticipant();
- } catch (TeamException e) {
- return;
- }
- display(p);
- }
- }
- }
- }
- }
- };
- asyncExec(r);
- }
- }
-
- /**
- * Constructs a synchronize view
- */
- public SynchronizeView() {
- super();
- fParticipantToPart = new HashMap();
- fPartToParticipant = new HashMap();
- updateTitle();
- }
-
- /**
- * Create the default actions for the view. These will be shown regardless of the
- * participant being displayed.
- */
- protected void createActions() {
- fPageDropDown = new SynchronizePageDropDownAction(this);
- fPinAction = new PinParticipantAction();
- fRemoveCurrentAction = new RemoveSynchronizeParticipantAction(this, false);
- fRemoveAllAction = new RemoveSynchronizeParticipantAction(this, true);
- updateActionEnablements();
- }
-
- private void updateActionEnablements() {
- if (fPinAction != null) {
- fPinAction.setParticipant(activeParticipantRef);
- }
- if (fRemoveAllAction != null) {
- fRemoveAllAction.setEnabled(getParticipant() != null);
- }
- if (fRemoveCurrentAction != null) {
- fRemoveCurrentAction.setEnabled(getParticipant() != null);
- }
- }
-
- /**
- * Add the actions to the toolbar
- *
- * @param mgr toolbar manager
- */
- protected void configureToolBar(IActionBars bars) {
- IToolBarManager mgr = bars.getToolBarManager();
- mgr.add(fPageDropDown);
- mgr.add(fPinAction);
- IMenuManager menu = bars.getMenuManager();
- menu.add(fRemoveCurrentAction);
- menu.add(fRemoveAllAction);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizeView#display(org.eclipse.team.ui.synchronize.ISynchronizeParticipant)
- */
- public void display(ISynchronizeParticipant participant) {
- SynchronizeViewWorkbenchPart part = (SynchronizeViewWorkbenchPart)fParticipantToPart.get(participant);
- if (part != null) {
- partActivated(part);
- fPageDropDown.update();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.PageBookView#getBootstrapPart()
- */
- protected IWorkbenchPart getBootstrapPart() {
- return null;
- }
-
- /**
- * Registers the given runnable with the display
- * associated with this view's control, if any.
- */
- public void asyncExec(Runnable r) {
- if (isAvailable()) {
- getPageBook().getDisplay().asyncExec(r);
- }
- }
-
- /**
- * Creates this view's underlying viewer and actions.
- * Hooks a pop-up menu to the underlying viewer's control,
- * as well as a key listener. When the delete key is pressed,
- * the <code>REMOVE_ACTION</code> is invoked. Hooks help to
- * this view. Subclasses must implement the following methods
- * which are called in the following order when a view is
- * created:<ul>
- * <li><code>createViewer(Composite)</code> - the context
- * menu is hooked to the viewer's control.</li>
- * <li><code>createActions()</code></li>
- * <li><code>configureToolBar(IToolBarManager)</code></li>
- * <li><code>getHelpContextId()</code></li>
- * </ul>
- * @see IWorkbenchPart#createPartControl(Composite)
- */
- public void createPartControl(Composite parent) {
- super.createPartControl(parent);
- createActions();
- configureToolBar(getViewSite().getActionBars());
- updateForExistingParticipants();
- getViewSite().getActionBars().updateActionBars();
- updateTitle();
-
- IWorkbenchSiteProgressService progress = (IWorkbenchSiteProgressService)getSite().getAdapter(IWorkbenchSiteProgressService.class);
- if(progress != null) {
- progress.showBusyForFamily(ISynchronizeManager.FAMILY_SYNCHRONIZE_OPERATION);
- }
- }
-
- /**
- * Initialize for existing participants
- */
- private void updateForExistingParticipants() {
- ISynchronizeManager manager = TeamUI.getSynchronizeManager();
- List participants = Arrays.asList(getParticipants());
- boolean errorOccurred = false;
- for (int i = 0; i < participants.size(); i++) {
- try {
- ISynchronizeParticipantReference ref = (ISynchronizeParticipantReference)participants.get(i);
- participantsAdded(new ISynchronizeParticipant[] {ref.getParticipant()});
- } catch (TeamException e) {
- errorOccurred = true;
- continue;
- }
-
- }
- if (errorOccurred) {
- participants = Arrays.asList(getParticipants());
- }
- try {
- // decide which participant to show on startup
- if (participants.size() > 0) {
- ISynchronizeParticipantReference participantToSelect = (ISynchronizeParticipantReference)participants.get(0);
- IDialogSettings section = getDialogSettings();
- String selectedParticipantId = section.get(KEY_LAST_ACTIVE_PARTICIPANT);
- if(selectedParticipantId != null) {
- ISynchronizeParticipantReference selectedParticipant = manager.get(selectedParticipantId, null);
- if(selectedParticipant != null) {
- participantToSelect = selectedParticipant;
- }
- }
- display(participantToSelect.getParticipant());
- }
-
- // add as a listener to update when new participants are added
- manager.addSynchronizeParticipantListener(this);
- } catch (TeamException e) {
- Utils.handle(e);
- }
- }
-
- private ISynchronizeParticipantReference[] getParticipants() {
- ISynchronizeManager manager = TeamUI.getSynchronizeManager();
- // create pages
- List participants = new ArrayList();
- ISynchronizeParticipantReference[] refs = manager.getSynchronizeParticipants();
- for (int i = 0; i < refs.length; i++) {
- ISynchronizeParticipantReference ref =refs[i];
- if(select(ref)) {
- participants.add(ref);
- }
- }
- return (ISynchronizeParticipantReference[]) participants.toArray(new ISynchronizeParticipantReference[participants.size()]);
- }
-
- private boolean isAvailable() {
- return getPageBook() != null && !getPageBook().isDisposed();
- }
-
- /*
- * Method used by test cases to access the page for a participant
- */
- public IPage getPage(ISynchronizeParticipant participant) {
- IWorkbenchPart part = (IWorkbenchPart)fParticipantToPart.get(participant);
- if (part == null) return null;
- try {
- return getPageRec(part).page;
- } catch (NullPointerException e) {
- // The PageRec class is not visible so we can't do a null check
- // before accessing the page.
- return null;
- }
- }
-
- protected boolean select(ISynchronizeParticipantReference ref) {
- return true;
- }
-
- /*
- * Return the dialog settings for the view
- */
- private IDialogSettings getDialogSettings() {
- IDialogSettings workbenchSettings = TeamUIPlugin.getPlugin().getDialogSettings();
- IDialogSettings syncViewSettings = workbenchSettings.getSection(KEY_SETTINGS_SECTION); //$NON-NLS-1$
- if (syncViewSettings == null) {
- syncViewSettings = workbenchSettings.addNewSection(KEY_SETTINGS_SECTION);
- }
- return syncViewSettings;
- }
-
- private String getSettingsKey(ISynchronizeParticipant participant) {
- String id = participant.getId();
- String secondaryId = participant.getSecondaryId();
- return secondaryId == null ? id : id + '.' + secondaryId;
- }
-
- private IDialogSettings getDialogSettings(ISynchronizeParticipant participant) {
- String key = getSettingsKey(participant);
- IDialogSettings viewsSettings = getDialogSettings();
- IDialogSettings settings = viewsSettings.getSection(key);
- if (settings == null) {
- settings = viewsSettings.addNewSection(key);
- }
- return settings;
- }
-
- private void removeDialogSettings(ISynchronizeParticipant participant) {
- String key = getSettingsKey(participant);
- IDialogSettings settings = getDialogSettings();
- if (settings.getSection(key) != null) {
- // There isn't an explicit remove so just make sure
- // That the old settings are forgotten
- getDialogSettings().addSection(new DialogSettings(key));
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewDefaultPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewDefaultPage.java
deleted file mode 100644
index 0ecda0faf..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewDefaultPage.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.team.internal.ui.wizards.GlobalSynchronizeWizard;
-import org.eclipse.ui.forms.HyperlinkGroup;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.widgets.FormText;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.part.Page;
-
-public class SynchronizeViewDefaultPage extends Page {
-
- private FormToolkit forms;
- private FormText text;
- private Composite composite;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- composite = new Composite(parent, SWT.NONE);
- composite.setBackground(parent.getShell().getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.grabExcessVerticalSpace = true;
- composite.setLayoutData(data);
-
- forms = new FormToolkit(parent.getDisplay());
- forms.setBackground(parent.getShell().getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
- HyperlinkGroup group = forms.getHyperlinkGroup();
- group.setBackground(parent.getShell().getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
-
- text = forms.createFormText(composite, true);
- String introText = new String("<form><p>" +
- "The Synchronize View allows you to view and manipulate differences between sets of resources. To start using this view you first " +
- "have to <a href='create'>create a synchronize participant</a> that you will configure to determine the resources to synchronize.</p></form>");
- text.setText(introText, true, false);
- text.addHyperlinkListener(new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
- IWizard wizard = new GlobalSynchronizeWizard();
- WizardDialog dialog = new WizardDialog(composite.getShell(), wizard);
- dialog.open();
- }
- });
- text.setLayoutData(new GridData(GridData.FILL_BOTH));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.MessagePage#setFocus()
- */
- public void setFocus() {
- if(composite != null && ! composite.isDisposed())
- composite.setFocus();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.Page#dispose()
- */
- public void dispose() {
- forms.dispose();
- super.dispose();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.Page#getControl()
- */
- public Control getControl() {
- return composite;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewWorkbenchPart.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewWorkbenchPart.java
deleted file mode 100644
index adecc65a6..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeViewWorkbenchPart.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-import org.eclipse.ui.IPropertyListener;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchPartSite;
-
-/**
- * Fake part to use as keys in page book for synchronize participants
- */
-public class SynchronizeViewWorkbenchPart implements IWorkbenchPart {
-
- private ISynchronizeParticipant participant;
- private IWorkbenchPartSite site;
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- return (obj instanceof SynchronizeViewWorkbenchPart) &&
- participant.equals(((SynchronizeViewWorkbenchPart)participant).getParticipant());
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return participant.hashCode();
- }
-
- /**
- * Constructs a part for the given participant that binds to the given
- * site
- */
- public SynchronizeViewWorkbenchPart(ISynchronizeParticipant participant, IWorkbenchPartSite site) {
- this.participant = participant;
- this.site = site;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#addPropertyListener(org.eclipse.ui.IPropertyListener)
- */
- public void addPropertyListener(IPropertyListener listener) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
- */
- public void createPartControl(Composite parent) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#dispose()
- */
- public void dispose() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getSite()
- */
- public IWorkbenchPartSite getSite() {
- return site;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getTitle()
- */
- public String getTitle() {
- return ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getTitleImage()
- */
- public Image getTitleImage() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getTitleToolTip()
- */
- public String getTitleToolTip() {
- return ""; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#removePropertyListener(org.eclipse.ui.IPropertyListener)
- */
- public void removePropertyListener(IPropertyListener listener) {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#setFocus()
- */
- public void setFocus() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- /**
- * Returns the participant associated with this part.
- *
- * @return participant associated with this part
- */
- public ISynchronizeParticipant getParticipant() {
- return participant;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSynchronizingPerspective.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSynchronizingPerspective.java
deleted file mode 100644
index 3387a7b4c..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSynchronizingPerspective.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.ui.*;
-
-public class TeamSynchronizingPerspective implements IPerspectiveFactory {
-
- public final static String ID = "org.eclipse.team.ui.TeamSynchronizingPerspective"; //$NON-NLS-1$
-
- /* (Non-javadoc)
- * Method declared on IPerpsectiveFactory
- */
- public void createInitialLayout(IPageLayout layout) {
- defineActions(layout);
- defineLayout(layout);
- }
-
- /**
- * Defines the initial actions for a page.
- */
- public void defineActions(IPageLayout layout) {
-
- // Add "new wizards".
- layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.project"); //$NON-NLS-1$
- layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder"); //$NON-NLS-1$
- layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file"); //$NON-NLS-1$
-
- // Add "show views".
- layout.addShowViewShortcut(SynchronizeView.VIEW_ID);
- layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
- layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
- layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
- layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
-
- layout.addActionSet("org.eclipse.team.ui.actionSet"); //$NON-NLS-1$
- }
-
- /**
- * Defines the initial layout for a page.
- */
- public void defineLayout(IPageLayout layout) {
- String editorArea = layout.getEditorArea();
- IFolderLayout top = layout.createFolder("top", IPageLayout.LEFT, 0.25f, editorArea); //$NON-NLS-1$
- top.addView(SynchronizeView.VIEW_ID);
- layout.setEditorAreaVisible(true);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.java
deleted file mode 100644
index 11261403d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.java
+++ /dev/null
@@ -1,401 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.compare.internal.INavigatable;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.OpenEvent;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.actions.ExpandAllAction;
-import org.eclipse.team.internal.ui.synchronize.actions.NavigateAction;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ISynchronizePageSite;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-import org.eclipse.team.ui.synchronize.SynchronizePageActionGroup;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.internal.dialogs.ContainerCheckedTreeViewer;
-
-/**
- * A <code>TreeViewerAdvisor</code> that works with TreeViewers. Two default
- * tree viewers are provided that support navigation: <code>NavigableTreeViewer</code>
- * and <code>NavigableCheckboxTreeViewer</code>.
- * <p>
- * Note that this advisor can be used with any tree viewer. By default it provides an
- * expand all action, double click behavior on containers, and navigation support for
- * tree viewers.
- * </p><p>
- * By default this advisor supports hierarchical models and honour the compressed
- * folder Team preference for showing the sync set as compressed folders. Subclasses
- * can provide their own presentation models.
- * <p>
- * @since 3.0
- */
-public class TreeViewerAdvisor extends StructuredViewerAdvisor {
-
- /**
- * Style bit that indicates that a checkbox viewer is desired.
- */
- public static final int CHECKBOX = 1;
-
- private ExpandAllAction expandAllAction;
- private Action collapseAll;
- private NavigateAction gotoNext;
- private NavigateAction gotoPrevious;
-
- class NavigationActionGroup extends SynchronizePageActionGroup {
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- final StructuredViewer viewer = getViewer();
- if (viewer instanceof AbstractTreeViewer) {
-
- expandAllAction = new ExpandAllAction((AbstractTreeViewer) viewer);
- Utils.initAction(expandAllAction, "action.expandAll."); //$NON-NLS-1$
-
- collapseAll = new Action() {
- public void run() {
- if (viewer == null || viewer.getControl().isDisposed() || !(viewer instanceof AbstractTreeViewer)) return;
- viewer.getControl().setRedraw(false);
- ((AbstractTreeViewer)viewer).collapseToLevel(viewer.getInput(), TreeViewer.ALL_LEVELS);
- viewer.getControl().setRedraw(true);
- }
- };
- Utils.initAction(collapseAll, "action.collapseAll."); //$NON-NLS-1$
-
- ISynchronizeParticipant participant = configuration.getParticipant();
- ISynchronizePageSite site = configuration.getSite();
-
- gotoNext = new NavigateAction(site, participant.getName(), configuration, true /*next*/);
- gotoPrevious = new NavigateAction(site, participant.getName(), configuration, false /*previous*/);
- }
- }
- public void fillContextMenu(IMenuManager manager) {
- appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, expandAllAction);
- }
- public void fillActionBars(IActionBars actionBars) {
- IToolBarManager manager = actionBars.getToolBarManager();
- appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, gotoNext);
- appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, gotoPrevious);
- appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, collapseAll);
- }
- }
-
- /**
- * Interface used to implement navigation for tree viewers. This interface is used by
- * {@link TreeViewerAdvisor#navigate(TreeViewer, boolean, boolean, boolean) to open
- * selections and navigate.
- */
- public interface ITreeViewerAccessor {
- public void createChildren(TreeItem item);
- public void openSelection();
- }
-
- /**
- * A navigable checkboxec tree viewer that will work with the <code>navigate</code> method of
- * this advisor.
- */
- public static class NavigableCheckboxTreeViewer extends ContainerCheckedTreeViewer implements ITreeViewerAccessor {
- public NavigableCheckboxTreeViewer(Composite parent, int style) {
- super(parent, style);
- }
-
- public void createChildren(TreeItem item) {
- super.createChildren(item);
- }
-
- public void openSelection() {
- fireOpen(new OpenEvent(this, getSelection()));
- }
- }
-
- /**
- * A navigable tree viewer that will work with the <code>navigate</code> method of
- * this advisor.
- */
- public static class NavigableTreeViewer extends TreeViewer implements ITreeViewerAccessor {
- public NavigableTreeViewer(Composite parent, int style) {
- super(parent, style);
- }
-
- public void createChildren(TreeItem item) {
- super.createChildren(item);
- }
-
- public void openSelection() {
- fireOpen(new OpenEvent(this, getSelection()));
- }
- }
-
- public static StructuredViewer createViewer(Composite parent, ISynchronizePageConfiguration configuration) {
- int style = ((SynchronizePageConfiguration)configuration).getViewerStyle();
- if ((style & CHECKBOX) > 0) {
- NavigableCheckboxTreeViewer v = new TreeViewerAdvisor.NavigableCheckboxTreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- configuration.getSite().setSelectionProvider(v);
- return v;
- } else {
- NavigableTreeViewer v = new TreeViewerAdvisor.NavigableTreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- configuration.getSite().setSelectionProvider(v);
- return v;
- }
- }
-
- /**
- * Create an advisor that will allow viewer contributions with the given <code>targetID</code>. This
- * advisor will provide a presentation model based on the given sync info set. Note that it's important
- * to call {@link #dispose()} when finished with an advisor.
- *
- * @param targetID the targetID defined in the viewer contributions in a plugin.xml file.
- * @param site the workbench site with which to register the menuId. Can be <code>null</code> in which
- * case a site will be found using the default workbench page.
- * @param set the set of <code>SyncInfo</code> objects that are to be shown to the user.
- */
- public TreeViewerAdvisor(Composite parent, ISynchronizePageConfiguration configuration) {
- super(configuration);
- INavigatable nav = (INavigatable)configuration.getProperty(SynchronizePageConfiguration.P_NAVIGATOR);
- if (nav == null) {
- configuration.setProperty(SynchronizePageConfiguration.P_NAVIGATOR, getAdapter(INavigatable.class));
- }
- configuration.addActionContribution(new NavigationActionGroup());
- StructuredViewer viewer = TreeViewerAdvisor.createViewer(parent, configuration);
- GridData data = new GridData(GridData.FILL_BOTH);
- viewer.getControl().setLayoutData(data);
- initializeViewer(viewer);
- }
-
- /**
- * Create the model manager to be used by this advisor
- * @param configuration
- */
- protected SynchronizeModelManager createModelManager(ISynchronizePageConfiguration configuration) {
- return new HierarchicalModelManager(configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.viewers.StructuredViewerAdvisor#navigate(boolean)
- */
- public boolean navigate(boolean next) {
- return TreeViewerAdvisor.navigate((TreeViewer)getViewer(), next, false, false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.viewers.StructuredViewerAdvisor#initializeViewer(org.eclipse.jface.viewers.StructuredViewer)
- */
- public boolean validateViewer(StructuredViewer viewer) {
- return viewer instanceof AbstractTreeViewer;
- }
-
- /**
- * 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
- */
- protected boolean handleDoubleClick(StructuredViewer viewer, DoubleClickEvent event) {
- if (super.handleDoubleClick(viewer, event)) return true;
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- Object element = selection.getFirstElement();
- AbstractTreeViewer treeViewer = (AbstractTreeViewer) getViewer();
- if(element != null) {
- if (treeViewer.getExpandedState(element)) {
- treeViewer.collapseToLevel(element, AbstractTreeViewer.ALL_LEVELS);
- } else {
- TreeViewerAdvisor.navigate((TreeViewer)getViewer(), true /* next */, false /* no-open */, true /* only-expand */);
- }
- }
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.viewers.StructuredViewerAdvisor#initializeListeners(org.eclipse.jface.viewers.StructuredViewer)
- */
- protected void initializeListeners(final StructuredViewer viewer) {
- super.initializeListeners(viewer);
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateStatusLine((IStructuredSelection) event.getSelection());
- }
- });
- }
-
- private void updateStatusLine(IStructuredSelection selection) {
- IWorkbenchSite ws = getConfiguration().getSite().getWorkbenchSite();
- if (ws != null && ws instanceof IViewSite) {
- String msg = getStatusLineMessage(selection);
- ((IViewSite)ws).getActionBars().getStatusLineManager().setMessage(msg);
- }
- }
-
- private String getStatusLineMessage(IStructuredSelection selection) {
- if (selection.size() == 1) {
- Object first = selection.getFirstElement();
- if (first instanceof SyncInfoModelElement) {
- SyncInfoModelElement node = (SyncInfoModelElement) first;
- IResource resource = node.getResource();
- if (resource == null) {
- return node.getName();
- } else {
- return resource.getFullPath().makeRelative().toString();
- }
- }
- }
- if (selection.size() > 1) {
- return selection.size() + Policy.bind("SynchronizeView.13"); //$NON-NLS-1$
- }
- return ""; //$NON-NLS-1$
- }
-
- private static TreeItem findNextPrev(TreeViewer viewer, TreeItem item, boolean next) {
- if (item == null || !(viewer instanceof ITreeViewerAccessor))
- return null;
- TreeItem children[] = null;
- ITreeViewerAccessor treeAccessor = (ITreeViewerAccessor) viewer;
- if (!next) {
- TreeItem parent = item.getParentItem();
- if (parent != null)
- children = parent.getItems();
- else
- children = item.getParent().getItems();
- if (children != null && children.length > 0) {
- // goto previous child
- int index = 0;
- for (; index < children.length; index++)
- if (children[index] == item)
- break;
- if (index > 0) {
- item = children[index - 1];
- while (true) {
- treeAccessor.createChildren(item);
- int n = item.getItemCount();
- if (n <= 0)
- break;
- item.setExpanded(true);
- item = item.getItems()[n - 1];
- }
- // previous
- return item;
- }
- }
- // go up
- return parent;
- } else {
- item.setExpanded(true);
- treeAccessor.createChildren(item);
- if (item.getItemCount() > 0) {
- // has children: go down
- children = item.getItems();
- return children[0];
- }
- while (item != null) {
- children = null;
- TreeItem parent = item.getParentItem();
- if (parent != null)
- children = parent.getItems();
- else
- children = item.getParent().getItems();
- if (children != null && children.length > 0) {
- // goto next child
- int index = 0;
- for (; index < children.length; index++)
- if (children[index] == item)
- break;
- if (index < children.length - 1) {
- // next
- return children[index + 1];
- }
- }
- // go up
- item = parent;
- }
- }
- return item;
- }
-
- private static void setSelection(TreeViewer viewer, TreeItem ti, boolean fireOpen, boolean expandOnly) {
- if (ti != null) {
- Object data= ti.getData();
- if (data != null) {
- // Fix for http://dev.eclipse.org/bugs/show_bug.cgi?id=20106
- ISelection selection = new StructuredSelection(data);
- if (expandOnly) {
- viewer.expandToLevel(data, 0);
- } else {
- viewer.setSelection(selection, true);
- ISelection currentSelection = viewer.getSelection();
- if (fireOpen && currentSelection != null && selection.equals(currentSelection)) {
- if (viewer instanceof ITreeViewerAccessor) {
- ((ITreeViewerAccessor) viewer).openSelection();
- }
- }
- }
- }
- }
- }
-
- /**
- * 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 next if <code>true</code> the next node is selected, otherwise the previous node
- * @return <code>true</code> if at end (or beginning)
- */
- public static boolean navigate(TreeViewer viewer, boolean next, boolean fireOpen, boolean expandOnly) {
- Tree tree = viewer.getTree();
- if (tree == null)
- return false;
- TreeItem item = null;
- TreeItem children[] = tree.getSelection();
- if (children != null && children.length > 0)
- item = children[0];
- if (item == null) {
- children = tree.getItems();
- if (children != null && children.length > 0) {
- item = children[0];
- if (item != null && item.getItemCount() <= 0) {
- setSelection(viewer, item, fireOpen, expandOnly); // Fix for http://dev.eclipse.org/bugs/show_bug.cgi?id=20106
- return false;
- }
- }
- }
- while (true) {
- item = findNextPrev(viewer, item, next);
- if (item == null)
- break;
- if (item.getItemCount() <= 0)
- break;
- }
- if (item != null) {
- setSelection(viewer, item, fireOpen, expandOnly); // Fix for http://dev.eclipse.org/bugs/show_bug.cgi?id=20106
- return false;
- }
- return true;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/UnchangedResourceModelElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/UnchangedResourceModelElement.java
deleted file mode 100644
index a9f0459aa..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/UnchangedResourceModelElement.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.compare.structuremergeviewer.IDiffContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-
-/**
- * DiffNode that represents a resource that is in sync.
- */
-public class UnchangedResourceModelElement extends SynchronizeModelElement implements IAdaptable {
-
- private IResource resource;
-
- public UnchangedResourceModelElement(IDiffContainer parent, IResource resource) {
- super(parent);
- this.resource = resource;
- }
-
- /**
- * @return Returns the resource.
- */
- public IResource getResource() {
- return resource;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.compare.structuremergeviewer.DiffNode#getName()
- */
- public String getName() {
- return resource.getName();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchAction.java
deleted file mode 100644
index fc1f5f500..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchAction.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-
-/**
- * Class used as <i>goto</i> actions for synchronize jobs.
- *
- * @since 3.0
- */
-public class WorkbenchAction extends Action implements IWorkbenchAction {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction#dispose()
- */
- public void dispose() {
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java
deleted file mode 100644
index 6334c0410..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize;
-
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.ui.synchronize.ISynchronizePageSite;
-import org.eclipse.ui.*;
-import org.eclipse.ui.part.IPageSite;
-
-/**
- * Maps a workbench part to a synchronize page site.
- */
-public class WorkbenchPartSynchronizePageSite implements ISynchronizePageSite {
- private IWorkbenchPart part;
- private IDialogSettings settings;
- private IPageSite site;
- private IActionBars actionBars;
-
- public WorkbenchPartSynchronizePageSite(IWorkbenchPart part, IPageSite site, IDialogSettings settings) {
- this.part = part;
- this.site = site;
- this.settings = settings;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getPart()
- */
- public IWorkbenchPart getPart() {
- return part;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getShell()
- */
- public Shell getShell() {
- return part.getSite().getShell();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getSelectionProvider()
- */
- public ISelectionProvider getSelectionProvider() {
- return site.getSelectionProvider();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#setSelectionProvider(org.eclipse.jface.viewers.ISelectionProvider)
- */
- public void setSelectionProvider(ISelectionProvider provider) {
- site.setSelectionProvider(provider);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getWorkbenchSite()
- */
- public IWorkbenchSite getWorkbenchSite() {
- return part.getSite();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getKeyBindingService()
- */
- public IKeyBindingService getKeyBindingService() {
- return part.getSite().getKeyBindingService();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#setFocus()
- */
- public void setFocus() {
- part.getSite().getPage().activate(part);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getPageSettings()
- */
- public IDialogSettings getPageSettings() {
- return settings;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getActionBars()
- */
- public IActionBars getActionBars() {
- return site.getActionBars();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#isModal()
- */
- public boolean isModal() {
- return false;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DefaultSynchronizePageActions.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DefaultSynchronizePageActions.java
deleted file mode 100644
index 4d5b3ca0c..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DefaultSynchronizePageActions.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.*;
-
-/**
- * General synchronize page actions
- */
-public class DefaultSynchronizePageActions extends SynchronizePageActionGroup {
-
- // Actions
- private OpenWithActionGroup openWithActions;
- private RefactorActionGroup refactorActions;
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#initialize(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- public void initialize(ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- ISynchronizePageSite site = configuration.getSite();
- IWorkbenchSite ws = site.getWorkbenchSite();
- if (ws instanceof IViewSite) {
- openWithActions = new OpenWithActionGroup(site, configuration.getParticipant().getName());
- refactorActions = new RefactorActionGroup(site);
- configuration.setProperty(SynchronizePageConfiguration.P_OPEN_ACTION, new Action() {
- public void run() {
- openWithActions.openInCompareEditor();
- }
- });
- } else {
- // TODO: Add open menu action which opens in compare editor input
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#fillContextMenu(org.eclipse.jface.action.IMenuManager)
- */
- public void fillContextMenu(IMenuManager manager) {
- IContributionItem group = findGroup(manager, ISynchronizePageConfiguration.FILE_GROUP);
- if (openWithActions != null && group != null) {
- openWithActions.fillContextMenu(manager, group.getId());
- }
- group = findGroup(manager, ISynchronizePageConfiguration.EDIT_GROUP);
- if (refactorActions != null && group != null) {
- refactorActions.fillContextMenu(manager, group.getId());
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DirectionFilterActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DirectionFilterActionGroup.java
deleted file mode 100644
index 3af7efa9b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/DirectionFilterActionGroup.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IContributionManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SubscriberParticipant;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.actions.ActionGroup;
-
-/**
- * This action group provides radio buttons for each possible direction of synchronization information. The
- * modes created by this action group can be configured. The actions directly set the mode of a
- * {@link SubscriberParticipant}.
- *
- * @see SubscriberParticipant
- * @since 3.0
- */
-public class DirectionFilterActionGroup extends ActionGroup implements IPropertyChangeListener {
-
- // The list of created actions
- private List actions = new ArrayList(3);
-
- // The modes
- private DirectionFilterAction incomingMode;
- private DirectionFilterAction outgoingMode;
- private DirectionFilterAction bothMode;
- private DirectionFilterAction conflictsMode;
-
- private ISynchronizePageConfiguration configuration;
-
- /**
- * An action filter for a specific mode.
- */
- class DirectionFilterAction extends Action {
- private int modeId;
-
- public DirectionFilterAction(String prefix,String commandId, int modeId) {
- super("", AS_RADIO_BUTTON); //$NON-NLS-1$
- this.modeId = modeId;
- Utils.initAction(this, prefix, Policy.getBundle());
- }
- public void run() {
- if(isChecked()) {
- configuration.setMode(modeId);
- }
- }
- public int getModeId() {
- return modeId;
- }
- }
-
- /**
- * Creates a direction filter group with the given supported modes. The
- * possible values for modes are defined by the {@link SubscriberParticipant}
- * class.
- *
- * @see SubscriberParticipant#BOTH_MODE
- * @see SubscriberParticipant#OUTGOING_MODE
- * @see SubscriberParticipant#INCOMING_MODE
- * @see SubscriberParticipant#CONFLICTING_MODE
- * @see SubscriberParticipant#ALL_MODES
- *
- * @param participant the participant showing this group
- * @param supportedModes the modes to be shown
- */
- public DirectionFilterActionGroup(ISynchronizePageConfiguration configuration) {
- this.configuration = configuration;
- createActions();
- configuration.addPropertyChangeListener(this);
- checkMode(configuration.getMode());
- }
-
- /**
- * Sets up the sync modes and the actions for switching between them.
- */
- private void createActions() {
- // Create the actions
- int supportedModes = configuration.getSupportedModes();
- if (supportedModes == 0) return;
- int currentMode = configuration.getMode();
- if ((supportedModes & currentMode) == 0) {
- currentMode = getSupportedMode(supportedModes);
- if (currentMode == 0) return;
- configuration.setMode(currentMode);
- }
- if((supportedModes & ISynchronizePageConfiguration.INCOMING_MODE) != 0) {
- incomingMode = new DirectionFilterAction("action.directionFilterIncoming.", "org.eclipse.team.ui.syncview.incomingFilter", ISynchronizePageConfiguration.INCOMING_MODE); //$NON-NLS-1$ //$NON-NLS-2$
- actions.add(incomingMode);
- incomingMode.setChecked(currentMode == ISynchronizePageConfiguration.INCOMING_MODE);
- }
-
- if((supportedModes & ISynchronizePageConfiguration.OUTGOING_MODE) != 0) {
- outgoingMode = new DirectionFilterAction("action.directionFilterOutgoing.", "org.eclipse.team.ui.syncview.outgoingFilter", ISynchronizePageConfiguration.OUTGOING_MODE); //$NON-NLS-1$ //$NON-NLS-2$
- actions.add(outgoingMode);
- outgoingMode.setChecked(currentMode == ISynchronizePageConfiguration.OUTGOING_MODE);
- }
-
- if((supportedModes & ISynchronizePageConfiguration.BOTH_MODE) != 0) {
- bothMode = new DirectionFilterAction("action.directionFilterBoth.", "org.eclipse.team.ui.syncview.bothFilter", ISynchronizePageConfiguration.BOTH_MODE); //$NON-NLS-1$ //$NON-NLS-2$
- actions.add(bothMode);
- bothMode.setChecked(currentMode == ISynchronizePageConfiguration.BOTH_MODE);
- }
-
- if((supportedModes & ISynchronizePageConfiguration.CONFLICTING_MODE) != 0) {
- conflictsMode = new DirectionFilterAction("action.directionFilterConflicts.", "org.eclipse.team.ui.syncview.conflictsFilter", ISynchronizePageConfiguration.CONFLICTING_MODE); //$NON-NLS-1$ //$NON-NLS-2$
- actions.add(conflictsMode);
- conflictsMode.setChecked(currentMode == ISynchronizePageConfiguration.CONFLICTING_MODE);
- }
- }
-
- /**
- * @param supportedModes
- * @return
- */
- private int getSupportedMode(int supportedModes) {
- if((supportedModes & ISynchronizePageConfiguration.INCOMING_MODE) != 0) {
- return ISynchronizePageConfiguration.INCOMING_MODE;
- }
- if((supportedModes & ISynchronizePageConfiguration.OUTGOING_MODE) != 0) {
- return ISynchronizePageConfiguration.OUTGOING_MODE;
- }
- if((supportedModes & ISynchronizePageConfiguration.BOTH_MODE) != 0) {
- return ISynchronizePageConfiguration.BOTH_MODE;
- }
- if((supportedModes & ISynchronizePageConfiguration.CONFLICTING_MODE) != 0) {
- return ISynchronizePageConfiguration.CONFLICTING_MODE;
- }
- return 0;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
- */
- public void fillActionBars(IActionBars actionBars, String group) {
- super.fillActionBars(actionBars);
- IToolBarManager toolBar = actionBars.getToolBarManager();
- for (Iterator it = actions.iterator(); it.hasNext();) {
- DirectionFilterAction action = (DirectionFilterAction) it.next();
- if(group != null) {
- toolBar.appendToGroup(group, action);
- } else {
- toolBar.add(action);
- }
- }
- }
-
- public void fillToolBar(String groupId, IToolBarManager toolBar) {
- for (Iterator it = actions.iterator(); it.hasNext();) {
- DirectionFilterAction action = (DirectionFilterAction) it.next();
- toolBar.appendToGroup(groupId, action);
- }
- }
-
- public void fillMenu(IContributionManager manager) {
- for (Iterator it = actions.iterator(); it.hasNext();) {
- DirectionFilterAction action = (DirectionFilterAction) it.next();
- manager.add(action);
- }
- }
-
- private void checkMode(int mode) {
- for (Iterator it = actions.iterator(); it.hasNext();) {
- DirectionFilterAction action = (DirectionFilterAction)it.next();
- if(action.getModeId() == mode) {
- action.setChecked(true);
- } else {
- action.setChecked(false);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- if(event.getProperty().equals(ISynchronizePageConfiguration.P_MODE)) {
- Integer mode = (Integer)event.getNewValue();
- checkMode(mode.intValue());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.ActionGroup#dispose()
- */
- public void dispose() {
- super.dispose();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java
deleted file mode 100644
index 0d305b152..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.*;
-
-
-public class ExpandAllAction extends Action implements ISelectionChangedListener {
-
- private final AbstractTreeViewer viewer;
-
- public ExpandAllAction(AbstractTreeViewer viewer) {
- this.viewer = viewer;
- viewer.addSelectionChangedListener(this);
- }
- public void run() {
- expandAllFromSelection();
- }
-
- protected void expandAllFromSelection() {
- AbstractTreeViewer tree = viewer;
- if (tree == null) return;
- ISelection selection = tree.getSelection();
- if(! selection.isEmpty()) {
- Iterator elements = ((IStructuredSelection)selection).iterator();
- while (elements.hasNext()) {
- Object next = elements.next();
- tree.expandToLevel(next, AbstractTreeViewer.ALL_LEVELS);
- }
- }
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection ss = (IStructuredSelection)selection;
- setEnabled(!ss.isEmpty());
- return;
- }
- setEnabled(false);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshAction.java
deleted file mode 100644
index 9c55f5b86..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/GlobalRefreshAction.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.wizards.GlobalSynchronizeWizard;
-import org.eclipse.team.ui.*;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipantReference;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowPulldownDelegate;
-
-/**
- * A global refresh action that allows the user to select the participant to refresh
- * or the default action is to refresh the last selected participant. Participants are
- * only listed if they support
- * <p>
- * This action is normally associated with the Team action set and is enabled by default
- * in the Team Synchronizing perspective.
- * </p>
- * @since 3.0
- */
-public class GlobalRefreshAction extends Action implements IMenuCreator, IWorkbenchWindowPulldownDelegate {
-
- public final static String NO_DEFAULT_PARTICPANT = "none"; //$NON-NLS-1$
- private Menu fMenu;
- private Action synchronizeAction;
- private IWorkbenchWindow window;
-
- class RefreshParticipantAction extends Action {
- private ISynchronizeParticipantReference participant;
-
- public void run() {
- TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT, participant.getId());
- TeamUIPlugin.getPlugin().getPreferenceStore().setValue(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID, participant.getSecondaryId());
- GlobalRefreshAction.this.run(participant);
- }
-
- public RefreshParticipantAction(int prefix, ISynchronizeParticipantReference participant) {
- super("&" + prefix + " " + participant.getDisplayName()); //$NON-NLS-1$ //$NON-NLS-2$
- this.participant = participant;
- setImageDescriptor(participant.getDescriptor().getImageDescriptor());
- }
- }
-
- public GlobalRefreshAction() {
- synchronizeAction = new Action(Policy.bind("GlobalRefreshAction.4")) { //$NON-NLS-1$
- public void run() {
- IWizard wizard = new GlobalSynchronizeWizard();
- WizardDialog dialog = new WizardDialog(window.getShell(), wizard);
- dialog.open();
- }
- };
- synchronizeAction.setImageDescriptor(TeamImages.getImageDescriptor(ISharedImages.IMG_SYNC_VIEW));
- setMenuCreator(this);
- updateTooltipMessage();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#dispose()
- */
- public void dispose() {
- if (fMenu != null) {
- fMenu.dispose();
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu)
- */
- public Menu getMenu(Menu parent) {
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control)
- */
- public Menu getMenu(Control parent) {
- if (fMenu != null) {
- fMenu.dispose();
- }
- fMenu = new Menu(parent);
- ISynchronizeParticipantReference[] participants = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
- for (int i = 0; i < participants.length; i++) {
- ISynchronizeParticipantReference description = participants[i];
- Action action = new RefreshParticipantAction(i + 1, description);
- addActionToMenu(fMenu, action);
- }
- if(participants.length > 0) addMenuSeparator();
- addActionToMenu(fMenu, synchronizeAction);
- return fMenu;
- }
-
- protected void addActionToMenu(Menu parent, Action action) {
- ActionContributionItem item = new ActionContributionItem(action);
- item.fill(parent, -1);
- }
-
- protected void addMenuSeparator() {
- new MenuItem(fMenu, SWT.SEPARATOR);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
- */
- public void init(IWorkbenchWindow window) {
- this.window = window;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- String id = TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT);
- String secondaryId = TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID);
- IWizard wizard = new GlobalSynchronizeWizard();
- if (! id.equals(NO_DEFAULT_PARTICPANT)) {
- ISynchronizeParticipantReference participant = TeamUI.getSynchronizeManager().get(id, secondaryId);
- if (participant != null) {
- run(participant);
- }
- }
- synchronizeAction.run();
- }
-
- private void run(ISynchronizeParticipantReference participant) {
- ISynchronizeParticipant p;
- try {
- p = participant.getParticipant();
- p.run(null /* no workbench part */);
- updateTooltipMessage();
- } catch (TeamException e) {
- Utils.handle(e);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
- * org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
- protected void updateTooltipMessage() {
- setToolTipText(Policy.bind("GlobalRefreshAction.4")); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/NavigateAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/NavigateAction.java
deleted file mode 100644
index fd1c983e3..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/NavigateAction.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import org.eclipse.compare.CompareEditorInput;
-import org.eclipse.compare.ICompareNavigator;
-import org.eclipse.compare.internal.INavigatable;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.SyncInfoModelElement;
-import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ISynchronizePageSite;
-import org.eclipse.ui.*;
-import org.eclipse.ui.actions.ActionFactory;
-
-/**
- * Action to navigate the changes shown in the Synchronize View. This
- * will coordinate change browsing between the view and the compare
- * editors.
- *
- * @since 3.0
- */
-public class NavigateAction extends Action {
- private final boolean next;
- private ISynchronizePageSite site;
- private String title;
- private ISynchronizePageConfiguration configuration;
-
- public NavigateAction(ISynchronizePageSite site, String title, ISynchronizePageConfiguration configuration, boolean next) {
- this.site = site;
- this.title = title;
- this.configuration = configuration;
- this.next = next;
- IActionBars bars = site.getActionBars();
- if (next) {
- Utils.initAction(this, "action.navigateNext."); //$NON-NLS-1$
- if (bars != null)
- bars.setGlobalActionHandler(ActionFactory.NEXT.getId(), this);
- } else {
- Utils.initAction(this, "action.navigatePrevious."); //$NON-NLS-1$
- if (bars != null)
- bars.setGlobalActionHandler(ActionFactory.PREVIOUS.getId(), this);
- }
- }
-
- /**
- * Two types of navigation is supported: navigation that is specific to coordinating between a view
- * and a compare editor and navigation simply using the configured navigator.
- */
- public void run() {
- IWorkbenchSite ws = site.getWorkbenchSite();
- INavigatable nav = (INavigatable)configuration.getProperty(SynchronizePageConfiguration.P_NAVIGATOR);
- if (nav != null && ws != null && ws instanceof IViewSite) {
- navigate(nav);
- } else {
- nav.gotoDifference(next);
- }
- }
-
- private void navigate(INavigatable nav) {
- SyncInfo info = getSyncInfoFromSelection();
- if(info == null) {
- if(nav.gotoDifference(next)) {
- return;
- } else {
- info = getSyncInfoFromSelection();
- if(info == null) return;
- }
- }
-
- if(info.getLocal().getType() != IResource.FILE) {
- if(! nav.gotoDifference(next)) {
- info = getSyncInfoFromSelection();
- OpenInCompareAction.openCompareEditor(site, getTitle(), info, true /* keep focus */);
- }
- return;
- }
-
- IWorkbenchSite ws = site.getWorkbenchSite();
- if (ws instanceof IWorkbenchPartSite) {
- IEditorPart editor = OpenInCompareAction.findOpenCompareEditor((IWorkbenchPartSite)ws, info.getLocal());
- CompareEditorInput input;
- ICompareNavigator navigator;
-
- if(editor != null) {
- // if an existing editor is open on the current selection, use it
- input = (CompareEditorInput)editor.getEditorInput();
- navigator = (ICompareNavigator)input.getAdapter(ICompareNavigator.class);
- if(navigator != null) {
- if(navigator.selectChange(next)) {
- if(! nav.gotoDifference(next)) {
- info = getSyncInfoFromSelection();
- OpenInCompareAction.openCompareEditor(site, getTitle(), info, true /* keep focus */);
- }
- }
- }
- } else {
- // otherwise, select the next change and open a compare editor which will automatically
- // show the first change.
- OpenInCompareAction.openCompareEditor(site, getTitle(), info, true /* keep focus */);
- }
- }
- }
-
- private SyncInfo getSyncInfoFromSelection() {
- IStructuredSelection selection = (IStructuredSelection)site.getSelectionProvider().getSelection();
- if(selection == null) return null;
- Object obj = selection.getFirstElement();
- if (obj instanceof SyncInfoModelElement) {
- return ((SyncInfoModelElement) obj).getSyncInfo();
- } else {
- return null;
- }
- }
-
- private String getTitle() {
- return title;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenFileInSystemEditorAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenFileInSystemEditorAction.java
deleted file mode 100644
index 8564d3d8e..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenFileInSystemEditorAction.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import java.util.*;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.actions.OpenFileAction;
-
-public class OpenFileInSystemEditorAction extends OpenFileAction {
-
- public OpenFileInSystemEditorAction(IWorkbenchPage page) {
- super(page);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.SelectionListenerAction#getSelectedResources()
- */
- protected List getSelectedResources() {
- IStructuredSelection selection = getStructuredSelection();
- IResource[] resources = Utils.getResources(selection.toArray());
- return Arrays.asList(resources);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.actions.SelectionListenerAction#getSelectedNonResources()
- */
- protected List getSelectedNonResources() {
- return Collections.EMPTY_LIST;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java
deleted file mode 100644
index 641a4f56a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.SyncInfoModelElement;
-import org.eclipse.team.ui.synchronize.ISynchronizePageSite;
-import org.eclipse.team.ui.synchronize.SyncInfoCompareInput;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IReusableEditor;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPartSite;
-import org.eclipse.ui.IWorkbenchSite;
-
-/**
- * Action to open a compare editor from a SyncInfo object.
- *
- * @see SyncInfoCompareInput
- * @since 3.0
- */
-public class OpenInCompareAction extends Action {
-
- private String name;
- private ISynchronizePageSite site;
-
- public OpenInCompareAction(ISynchronizePageSite site, String name) {
- this.name = name;
- this.site = site;
- Utils.initAction(this, "action.openInCompareEditor."); //$NON-NLS-1$
- }
-
- public void run() {
- ISelection selection = site.getSelectionProvider().getSelection();
- if(selection instanceof IStructuredSelection) {
- Object obj = ((IStructuredSelection) selection).getFirstElement();
- if (obj instanceof SyncInfoModelElement) {
- SyncInfo info = ((SyncInfoModelElement) obj).getSyncInfo();
- if (info != null) {
- openCompareEditor(site, name, info, true);
- }
- }
- }
- }
-
- public static SyncInfoCompareInput openCompareEditor(ISynchronizePageSite site, String name, SyncInfo info, boolean keepFocus) {
- SyncInfoCompareInput input = getCompareInput(name, info);
- if(input != null) {
- IWorkbenchSite ws = site.getWorkbenchSite();
- if (ws == null) return null;
- IWorkbenchPage wpage = ws.getPage();
- IEditorPart editor = findReusableCompareEditor(wpage);
-
- if(editor != null) {
- IEditorInput otherInput = editor.getEditorInput();
- if(otherInput instanceof SyncInfoCompareInput && otherInput.equals(input)) {
- // simply provide focus to editor
- wpage.activate(editor);
- } else {
- // if editor is currently not open on that input either re-use existing
- if(editor != null && editor instanceof IReusableEditor) {
- CompareUI.reuseCompareEditor(input, (IReusableEditor)editor);
- wpage.activate(editor);
- }
- }
- } else {
- CompareUI.openCompareEditor(input);
- editor = wpage.getActiveEditor();
- }
-
- if(keepFocus) {
- site.setFocus();
- }
- return input;
- }
- return null;
- }
-
- /**
- * Returns a SyncInfoCompareInput instance for the current selection.
- */
- private static SyncInfoCompareInput getCompareInput(String name, SyncInfo info) {
- if (info != null && info.getLocal() instanceof IFile) {
- return new SyncInfoCompareInput(name, info);
- }
- return null;
- }
-
- /**
- * Returns an editor that can be re-used. An open compare editor that
- * has un-saved changes cannot be re-used.
- */
- public static IEditorPart findReusableCompareEditor(IWorkbenchPage page) {
- IEditorReference[] editorRefs = page.getEditorReferences();
-
- for (int i = 0; i < editorRefs.length; i++) {
- IEditorPart part = editorRefs[i].getEditor(true);
- if(part != null && part.getEditorInput() instanceof SyncInfoCompareInput) {
- if(! part.isDirty()) {
- return part;
- }
- }
- }
- return null;
- }
-
- /**
- * Close a compare editor that is opened on the given IResource.
- *
- * @param site the view site in which to close the editors
- * @param resource the resource to use to find the compare editor
- */
- public static void closeCompareEditorFor(final IWorkbenchPartSite site, final IResource resource) {
- site.getShell().getDisplay().asyncExec(new Runnable() {
- public void run() {
- IEditorPart editor = findOpenCompareEditor(site, resource);
- if(editor != null) {
- site.getPage().closeEditor(editor, true /*save changes if required */);
- }
- }
- });
- }
-
- /**
- * Returns an editor handle if a SyncInfoCompareInput compare editor is opened on
- * the given IResource.
- *
- * @param site the view site in which to search for editors
- * @param resource the resource to use to find the compare editor
- * @return an editor handle if found and <code>null</code> otherwise
- */
- public static IEditorPart findOpenCompareEditor(IWorkbenchPartSite site, IResource resource) {
- IWorkbenchPage page = site.getPage();
- IEditorReference[] editorRefs = page.getEditorReferences();
- for (int i = 0; i < editorRefs.length; i++) {
- final IEditorPart part = editorRefs[i].getEditor(false /* don't restore editor */);
- if(part != null) {
- IEditorInput input = part.getEditorInput();
- if(part != null && input instanceof SyncInfoCompareInput) {
- SyncInfo inputInfo = ((SyncInfoCompareInput)input).getSyncInfo();
- if(inputInfo.getLocal().equals(resource)) {
- return part;
- }
- }
- }
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenWithActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenWithActionGroup.java
deleted file mode 100644
index 3639d929b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenWithActionGroup.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.ISynchronizePageSite;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.actions.ActionGroup;
-import org.eclipse.ui.actions.OpenWithMenu;
-import org.eclipse.ui.views.navigator.ResourceNavigatorMessages;
-
-/**
- * This is the action group for the open actions. It contains open
- * actions for
- */
-public class OpenWithActionGroup extends ActionGroup {
-
- private OpenFileInSystemEditorAction openFileAction;
- private OpenInCompareAction openInCompareAction;
- private String name;
- private ISynchronizePageSite site;
-
- public OpenWithActionGroup(ISynchronizePageSite site, String name) {
- this.name = name;
- this.site = site;
- makeActions();
- }
-
- protected void makeActions() {
- IWorkbenchSite ws = site.getWorkbenchSite();
- if (ws != null) {
- openFileAction = new OpenFileInSystemEditorAction(ws.getPage());
- openInCompareAction = new OpenInCompareAction(site, name);
- }
- }
-
- public void fillContextMenu(IMenuManager menu, String groupId) {
- ISelection selection = site.getSelectionProvider().getSelection();
- if (selection instanceof IStructuredSelection) {
- fillOpenWithMenu(menu, groupId, (IStructuredSelection)selection);
- }
- }
-
- /**
- * Adds the OpenWith submenu to the context menu.
- *
- * @param menu the context menu
- * @param selection the current selection
- */
- private void fillOpenWithMenu(IMenuManager menu, String groupId, IStructuredSelection selection) {
-
- // Only supported if exactly one file is selected.
- if (selection == null || selection.size() != 1)
- return;
- Object element = selection.getFirstElement();
- IResource resources[] = Utils.getResources(new Object[] {element});
- IResource resource = null;
- if(resources.length == 0) {
- return;
- }
- resource = resources[0];
-
- if(resource.getType() != IResource.FILE) return;
-
- menu.appendToGroup(groupId, openInCompareAction);
-
- if(!((resource.exists()))) {
- return;
- }
-
- if (openFileAction != null) {
- openFileAction.selectionChanged(selection);
- menu.appendToGroup(groupId, openFileAction);
- }
-
- IWorkbenchSite ws = site.getWorkbenchSite();
- if (ws != null) {
- MenuManager submenu =
- new MenuManager(ResourceNavigatorMessages.getString("ResourceNavigator.openWith")); //$NON-NLS-1$
- submenu.add(new OpenWithMenu(ws.getPage(), resource));
- menu.appendToGroup(groupId, submenu);
- }
- }
-
- public void openInCompareEditor() {
- openInCompareAction.run();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PinParticipantAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PinParticipantAction.java
deleted file mode 100644
index bfd1d5afd..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PinParticipantAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Action that toggles pinned state of a participant
- */
-public class PinParticipantAction extends Action {
-
- private ISynchronizeParticipant participant;
-
- public PinParticipantAction() {
- super();
- Utils.initAction(this, "action.pinParticipant.", Policy.getBundle()); //$NON-NLS-1$
- }
-
- public void setParticipant(ISynchronizeParticipant participant) {
- this.participant = participant;
- setEnabled(participant != null);
- updateState();
- }
-
- private void updateState() {
- setChecked(participant != null && participant.isPinned());
- }
-
- public void run() {
- if (participant != null) {
- try {
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- participant.setPinned(!participant.isPinned());
- updateState();
- }
- });
- } catch (InvocationTargetException e) {
- Utils.handle(e);
- } catch (InterruptedException e) {
- // Cancelled. Just ignore
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefactorActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefactorActionGroup.java
deleted file mode 100644
index 19d49452f..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefactorActionGroup.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.ISynchronizePageSite;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IKeyBindingService;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionGroup;
-import org.eclipse.ui.actions.DeleteResourceAction;
-import org.eclipse.ui.actions.MoveResourceAction;
-import org.eclipse.ui.actions.RenameResourceAction;
-import org.eclipse.ui.actions.TextActionHandler;
-
-/**
- * This action group is modeled after the class of the same name in
- * the org.eclipse.ui.workbench plugin. We couldn't reuse that class
- * because of a hard dependency on the navigator.
- */
-public class RefactorActionGroup extends ActionGroup {
-
- private MoveResourceAction moveAction;
- private RenameResourceAction renameAction;
- private TextActionHandler textActionHandler;
- private ISynchronizePageSite site;
- private DeleteResourceAction deleteAction;
-
- public RefactorActionGroup(ISynchronizePageSite site) {
- this.site = site;
- makeActions();
- }
-
- public void fillContextMenu(IMenuManager parentMenu, String groupId) {
- IStructuredSelection selection = getSelection();
- if (selection == null) return;
- boolean anyResourceSelected =
- !selection.isEmpty()
- && allResourcesAreOfType(
- selection,
- IResource.PROJECT | IResource.FOLDER | IResource.FILE);
-
- MenuManager menu = new MenuManager(Policy.bind("RefactorActionGroup.0")); //$NON-NLS-1$
- IStructuredSelection convertedSelection = convertSelection(selection);
-
- if (anyResourceSelected) {
- deleteAction.selectionChanged(convertedSelection);
- menu.add(deleteAction);
- moveAction.selectionChanged(convertedSelection);
- menu.add(moveAction);
- renameAction.selectionChanged(convertedSelection);
- menu.add(renameAction);
- }
- parentMenu.appendToGroup(groupId, menu);
- }
-
- private IStructuredSelection convertSelection(IStructuredSelection selection) {
- return new StructuredSelection(Utils.getResources(selection.toArray()));
- }
-
- public void fillActionBars(IActionBars actionBars) {
- textActionHandler = new TextActionHandler(actionBars); // hooks handlers
- textActionHandler.setDeleteAction(deleteAction);
- renameAction.setTextActionHandler(textActionHandler);
- deleteAction.selectionChanged(getSelection());
- }
-
- protected void makeActions() {
-
- Shell shell = site.getShell();
- ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
-
- moveAction = new MoveResourceAction(shell);
- renameAction = new RenameResourceAction(shell);
-
- deleteAction = new DeleteResourceAction(shell) {
- protected List getSelectedResources() {
- return Arrays.asList(Utils.getResources(getSelection().toArray()));
- }
- };
- deleteAction.setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
- deleteAction.setActionDefinitionId("org.eclipse.ui.edit.delete"); //$NON-NLS-1$
-
- // Get the key binding service for registering actions with commands.
- IKeyBindingService keyBindingService = site.getKeyBindingService();
- if (keyBindingService != null) {
- keyBindingService.registerAction(deleteAction);
- }
- }
-
- public void updateActionBars() {
- IStructuredSelection selection = getSelection();
- deleteAction.selectionChanged(selection);
- moveAction.selectionChanged(selection);
- renameAction.selectionChanged(selection);
- }
-
- private IStructuredSelection getSelection() {
- return (IStructuredSelection)site.getSelectionProvider().getSelection();
- }
-
- private boolean allResourcesAreOfType(IStructuredSelection selection, int resourceMask) {
- Iterator resources = selection.iterator();
- while (resources.hasNext()) {
- Object next = resources.next();
- IResource resource = null;
- if (next instanceof IResource) {
- resource = (IResource)next;
- } else if (next instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable)next;
- resource = (IResource)adaptable.getAdapter(IResource.class);
- }
- if(resource == null) {
- IResource[] r = Utils.getResources(new Object[] {next});
- if(r.length == 1) {
- resource = r[0];
- }
- }
- if (resource == null || (resource.getType() & resourceMask) == 0) {
- return false;
- }
- }
- return true;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java
deleted file mode 100644
index 6abdfc091..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveFromViewAction.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.core.subscribers.WorkingSetFilteredSyncInfoCollector;
-import org.eclipse.team.internal.ui.IPreferenceIds;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.SubscriberParticipantPage;
-import org.eclipse.team.ui.synchronize.ISynchronizePage;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SynchronizeModelAction;
-import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
-
-/**
- * Remove the selected elemements from the page
- */
-public class RemoveFromViewAction extends SynchronizeModelAction {
-
- protected RemoveFromViewAction(ISynchronizePageConfiguration configuration) {
- super(null, configuration);
- Utils.initAction(this, "action.removeFromView.", Policy.getBundle()); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#run()
- */
- public void run() {
- if (confirmRemove()) {
- super.run();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#getSubscriberOperation(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration, org.eclipse.compare.structuremergeviewer.IDiffElement[])
- */
- protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
- return new SynchronizeModelOperation(configuration, elements) {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- SyncInfoSet set = getSyncInfoSet();
- removeFromView(set);
- }
- protected boolean canRunAsJob() {
- return false;
- }
- /**
- * Remove the sync info contained in the given set from the view.
- * @param set the sync info set
- */
- private void removeFromView(final SyncInfoSet set) {
- ISynchronizePage page = getConfiguration().getPage();
- if (page instanceof SubscriberParticipantPage) {
- final WorkingSetFilteredSyncInfoCollector collector = ((SubscriberParticipantPage)page).getCollector();
- collector.run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- collector.getWorkingSetSyncInfoSet().removeAll(set.getResources());
- }
- });
- }
- }
- };
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.SynchronizeModelAction#needsToSaveDirtyEditors()
- */
- protected boolean needsToSaveDirtyEditors() {
- return false;
- }
-
- private boolean confirmRemove() {
- IPreferenceStore store = TeamUIPlugin.getPlugin().getPreferenceStore();
- if (store.getBoolean(IPreferenceIds.SYNCVIEW_REMOVE_FROM_VIEW_NO_PROMPT)) {
- return true;
- } else {
- MessageDialogWithToggle dialog = MessageDialogWithToggle.openOkCancelConfirm(
- getConfiguration().getSite().getShell(),
- Policy.bind("RemoveFromView.warningTitle"), //$NON-NLS-1$
- Policy.bind("RemoveFromView.warningMessage"), //$NON-NLS-1$
- Policy.bind("RemoveFromView.warningDontShow"), //$NON-NLS-1$
- false,
- null,
- null);
- store.setValue(IPreferenceIds.SYNCVIEW_REMOVE_FROM_VIEW_NO_PROMPT, dialog.getToggleState());
- return dialog.getReturnCode() == Dialog.OK;
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java
deleted file mode 100644
index cbd664810..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Action to remove the given participant from the synchronize manager.
- * @since 3.0
- */
-public class RemoveSynchronizeParticipantAction extends Action {
-
- private ISynchronizeParticipant participant;
- private final ISynchronizeView view;
- private boolean removeAll;
-
- public RemoveSynchronizeParticipantAction(ISynchronizeView view, boolean removeAll) {
- this.view = view;
- this.removeAll = removeAll;
- if (removeAll) {
- Utils.initAction(this, "action.removeAllPage.", Policy.getBundle()); //$NON-NLS-1$
- } else {
- Utils.initAction(this, "action.removePage.", Policy.getBundle()); //$NON-NLS-1$
- }
- }
-
- public void run() {
- try {
- PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- if (removeAll) {
- removeAll();
- } else {
- removeCurrent();
- }
- }
- });
- } catch (InvocationTargetException e) {
- Utils.handle(e);
- } catch (InterruptedException e) {
- // Cancelled. Just ignore
- }
- }
-
- private void removeCurrent() {
- final ISynchronizeParticipant participant = view.getParticipant();
- if (participant != null) {
- if (participant.isPinned()) {
- final boolean[] bail = new boolean[] { false };
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- bail[0] = !MessageDialog.openQuestion(
- view.getSite().getShell(),
- "Remove Pinned Synchronization?",
- "The current synchronization is pinned. Are you sure you want to remove it?");
-
- }
- });
- if (bail[0]) {
- return;
- }
- }
- TeamUI.getSynchronizeManager().removeSynchronizeParticipants(new ISynchronizeParticipant[]{participant});
- }
- }
-
- private void removeAll() {
- ISynchronizeManager manager = TeamUI.getSynchronizeManager();
- ISynchronizeParticipantReference[] refs = manager.getSynchronizeParticipants();
- ArrayList removals = new ArrayList();
- for (int i = 0; i < refs.length; i++) {
- ISynchronizeParticipantReference reference = refs[i];
- ISynchronizeParticipant p;
- try {
- p = reference.getParticipant();
- if (! p.isPinned())
- removals.add(p);
- } catch (TeamException e) {
- // keep going
- }
- }
- manager.removeSynchronizeParticipants((ISynchronizeParticipant[]) removals.toArray(new ISynchronizeParticipant[removals.size()]));
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ShowSynchronizeParticipantAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ShowSynchronizeParticipantAction.java
deleted file mode 100644
index 059de2a9f..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ShowSynchronizeParticipantAction.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipantReference;
-import org.eclipse.team.ui.synchronize.ISynchronizeView;
-
-public class ShowSynchronizeParticipantAction extends Action {
-
- private ISynchronizeParticipantReference fPage;
- private ISynchronizeView fView;
-
- public void run() {
- try {
- if (!fPage.equals(fView.getParticipant())) {
- fView.display(fPage.getParticipant());
- }
- } catch (TeamException e) {
- Utils.handle(e);
- }
- }
-
- /**
- * Constructs an action to display the given synchronize participant in the
- * synchronize view.
- *
- * @param view the synchronize view in which the given page is contained
- * @param participant the participant to show
- */
- public ShowSynchronizeParticipantAction(ISynchronizeView view, ISynchronizeParticipantReference ref) {
- super(ref.getDisplayName(), Action.AS_RADIO_BUTTON);
- fPage = ref;
- fView = view;
- setImageDescriptor(ref.getDescriptor().getImageDescriptor());
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java
deleted file mode 100644
index da68d4cf6..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineCLabelContribution.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.graphics.FontMetrics;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-
-public class StatusLineCLabelContribution extends ContributionItem {
-
- public final static int DEFAULT_CHAR_WIDTH = 40;
-
- private int charWidth;
- private CLabel label;
- private Image image;
- private String text = ""; //$NON-NLS-1$
- private int widthHint = -1;
- private int heightHint = -1;
-
- private Listener listener;
- private int eventType;
- private String tooltip;
-
- public StatusLineCLabelContribution(String id) {
- this(id, DEFAULT_CHAR_WIDTH);
- }
-
- public StatusLineCLabelContribution(String id, int charWidth) {
- super(id);
- this.charWidth = charWidth;
- setVisible(false); // no text to start with
- }
-
- public void fill(Composite parent) {
- Label sep = new Label(parent, SWT.SEPARATOR);
- label = new CLabel(parent, SWT.SHADOW_NONE);
- StatusLineLayoutData statusLineLayoutData = new StatusLineLayoutData();
-
- if (widthHint < 0) {
- GC gc = new GC(parent);
- gc.setFont(parent.getFont());
- FontMetrics fm = gc.getFontMetrics();
- widthHint = fm.getAverageCharWidth() * charWidth;
- heightHint = fm.getHeight();
- gc.dispose();
- }
-
- statusLineLayoutData.widthHint = widthHint;
- label.setLayoutData(statusLineLayoutData);
- label.setText(text);
- label.setImage(image);
- if(listener != null) {
- label.addListener(eventType, listener);
- }
- if(tooltip != null) {
- label.setToolTipText(tooltip);
- }
-
- statusLineLayoutData = new StatusLineLayoutData();
- statusLineLayoutData.heightHint = heightHint;
- sep.setLayoutData(statusLineLayoutData);
- }
-
- public void addListener(int eventType, Listener listener) {
- this.eventType = eventType;
- this.listener = listener;
- }
-
- public String getText() {
- return text;
- }
-
- public void setText(String text) {
- if (text == null)
- throw new NullPointerException();
-
- this.text = text;
-
- if (label != null && !label.isDisposed())
- label.setText(this.text);
-
- if (this.text.length() == 0) {
- if (isVisible()) {
- setVisible(false);
- IContributionManager contributionManager = getParent();
-
- if (contributionManager != null)
- contributionManager.update(true);
- }
- } else {
- if (!isVisible()) {
- setVisible(true);
- IContributionManager contributionManager = getParent();
-
- if (contributionManager != null)
- contributionManager.update(true);
- }
- }
- }
-
- public void setTooltip(String tooltip) {
- if (tooltip == null)
- throw new NullPointerException();
-
- this.tooltip = tooltip;
-
- if (label != null && !label.isDisposed()) {
- label.setToolTipText(this.tooltip);
- }
- }
-
- public void setImage(Image image) {
- if (image == null)
- throw new NullPointerException();
-
- this.image = image;
-
- if (label != null && !label.isDisposed())
- label.setImage(this.image);
-
- if (!isVisible()) {
- setVisible(true);
- IContributionManager contributionManager = getParent();
-
- if (contributionManager != null)
- contributionManager.update(true);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java
deleted file mode 100644
index cff38c9bc..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.ITeamStatus;
-import org.eclipse.team.core.synchronize.ISyncInfoSetChangeEvent;
-import org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
-import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.SubscriberParticipant;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.actions.ActionGroup;
-
-public class StatusLineContributionGroup extends ActionGroup implements ISyncInfoSetChangeListener {
-
- private static final String INCOMING_ID = TeamUIPlugin.ID + "org.eclipse.team.iu.statusline.incoming"; //$NON-NLS-1$
- private static final String OUTGOING_ID = TeamUIPlugin.ID + "org.eclipse.team.iu.statusline.outgoing"; //$NON-NLS-1$
- private static final String CONFLICTING_ID = TeamUIPlugin.ID + "org.eclipse.team.iu.statusline.conflicting"; //$NON-NLS-1$
- private static final String WORKINGSET_ID = TeamUIPlugin.ID + "org.eclipse.team.iu.statusline.workingset"; //$NON-NLS-1$
- private static final String TOTALS_ID = TeamUIPlugin.ID + "org.eclipse.team.iu.statusline.totals"; //$NON-NLS-1$
- private final static int TEXT_FIELD_MAX_SIZE = 25;
-
- private StatusLineCLabelContribution incoming;
- private StatusLineCLabelContribution outgoing;
- private StatusLineCLabelContribution conflicting;
- private StatusLineCLabelContribution totalChanges;
-
- private Image incomingImage = TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_DLG_SYNC_INCOMING).createImage();
- private Image outgoingImage = TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_DLG_SYNC_OUTGOING).createImage();
- private Image conflictingImage = TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_DLG_SYNC_CONFLICTING).createImage();
-
- private ISynchronizePageConfiguration configuration;
-
- public StatusLineContributionGroup(final Shell shell, ISynchronizePageConfiguration configuration) {
- this.configuration = configuration;
- this.incoming = createStatusLineContribution(INCOMING_ID, ISynchronizePageConfiguration.INCOMING_MODE, "0", incomingImage); //$NON-NLS-1$
- this.outgoing = createStatusLineContribution(OUTGOING_ID, ISynchronizePageConfiguration.OUTGOING_MODE, "0", outgoingImage); //$NON-NLS-1$
- this.conflicting = createStatusLineContribution(CONFLICTING_ID, ISynchronizePageConfiguration.CONFLICTING_MODE, "0", conflictingImage); //$NON-NLS-1$
- this.totalChanges = new StatusLineCLabelContribution(TOTALS_ID, TEXT_FIELD_MAX_SIZE);
-
- // Listen to changes to update the counts
- SyncInfoSet set = getSyncInfoSet();
- set.addSyncSetChangedListener(this);
- updateCounts();
- }
-
- private boolean isThreeWay() {
- return getParticipant().getSubscriber().getResourceComparator().isThreeWay();
- }
-
- private SubscriberParticipant getParticipant() {
- return (SubscriberParticipant)configuration.getParticipant();
- }
-
- private StatusLineCLabelContribution createStatusLineContribution(String id, final int mode, String label, Image image) {
- StatusLineCLabelContribution item = new StatusLineCLabelContribution(id, 15);
- item.addListener(SWT.MouseDown, new Listener() {
- public void handleEvent(Event event) {
- configuration.setMode(mode);
- }
- });
- item.setText(label); //$NON-NLS-1$
- item.setImage(image);
- return item;
- }
-
- public void dispose() {
- getSyncInfoSet().removeSyncSetChangedListener(this);
- incomingImage.dispose();
- outgoingImage.dispose();
- conflictingImage.dispose();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.team.internal.ui.sync.sets.ISyncSetChangedListener#syncSetChanged(org.eclipse.team.internal.ui.sync.sets.SyncSetChangedEvent)
- */
- public void syncInfoChanged(ISyncInfoSetChangeEvent event, IProgressMonitor monitor) {
- updateCounts();
- }
-
- private void updateCounts() {
- if (getParticipant().getSubscriber() != null) {
- SyncInfoSet workspaceSetStats = getWorkingSetSyncInfoSet();
-
- final int total = workspaceSetStats.size();
- final int workspaceConflicting = (int) workspaceSetStats.countFor(SyncInfo.CONFLICTING, SyncInfo.DIRECTION_MASK);
- final int workspaceOutgoing = (int) workspaceSetStats.countFor(SyncInfo.OUTGOING, SyncInfo.DIRECTION_MASK);
- final int workspaceIncoming = (int) workspaceSetStats.countFor(SyncInfo.INCOMING, SyncInfo.DIRECTION_MASK);
-
- TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- conflicting.setText(new Integer(workspaceConflicting).toString()); //$NON-NLS-1$
- incoming.setText(new Integer(workspaceIncoming).toString()); //$NON-NLS-1$
- outgoing.setText(new Integer(workspaceOutgoing).toString()); //$NON-NLS-1$
-
- conflicting.setTooltip(Policy.bind("StatisticsPanel.numbersTooltip", Policy.bind("StatisticsPanel.conflicting"))); //$NON-NLS-1$ //$NON-NLS-2$
- outgoing.setTooltip(Policy.bind("StatisticsPanel.numbersTooltip", Policy.bind("StatisticsPanel.outgoing"))); //$NON-NLS-1$ //$NON-NLS-2$
- incoming.setTooltip(Policy.bind("StatisticsPanel.numbersTooltip", Policy.bind("StatisticsPanel.incoming"))); //$NON-NLS-1$ //$NON-NLS-2$
- totalChanges.setText(Policy.bind("StatisticsPanel.numberTotal", Integer.toString(total))); //$NON-NLS-1$
- }
- });
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
- */
- public void fillActionBars(IActionBars actionBars) {
- IStatusLineManager mgr = actionBars.getStatusLineManager();
- if (isThreeWay()) {
- mgr.add(incoming);
- mgr.add(outgoing);
- mgr.add(conflicting);
- } else {
- mgr.add(totalChanges);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.ISyncInfoSetChangeListener#syncInfoSetReset(org.eclipse.team.core.subscribers.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void syncInfoSetReset(SyncInfoSet set, IProgressMonitor monitor) {
- updateCounts();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.core.subscribers.ISyncInfoSetChangeListener#syncInfoSetError(org.eclipse.team.core.subscribers.SyncInfoSet, org.eclipse.team.core.ITeamStatus[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public void syncInfoSetErrors(SyncInfoSet set, ITeamStatus[] errors, IProgressMonitor monitor) {
- // Nothing to do for errors
- }
-
- private SyncInfoSet getSyncInfoSet() {
- return (SyncInfoSet)configuration.getProperty(ISynchronizePageConfiguration.P_SYNC_INFO_SET);
- }
-
- private SyncInfoSet getWorkingSetSyncInfoSet() {
- return (SyncInfoSet)configuration.getProperty(SynchronizePageConfiguration.P_WORKING_SET_SYNC_INFO_SET);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SubscriberActionContribution.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SubscriberActionContribution.java
deleted file mode 100644
index a2effa3d5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SubscriberActionContribution.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.ConfigureRefreshScheduleDialog;
-import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
-import org.eclipse.team.ui.synchronize.ISynchronizePageSite;
-import org.eclipse.team.ui.synchronize.SubscriberParticipant;
-import org.eclipse.team.ui.synchronize.SynchronizePageActionGroup;
-import org.eclipse.ui.IActionBars;
-
-/**
- * Provides the actions to be associated with a synchronize page
- */
-public final class SubscriberActionContribution extends SynchronizePageActionGroup {
-
- // the changes viewer are contributed via the viewer and not the page.
- private Action configureSchedule;
- private SyncViewerShowPreferencesAction showPreferences;
- private Action refreshSelectionAction;
- private RemoveFromViewAction removeFromViewAction;
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#initialize(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
- */
- public void initialize(final ISynchronizePageConfiguration configuration) {
- super.initialize(configuration);
- final SubscriberParticipant participant = (SubscriberParticipant)configuration.getParticipant();
- final ISynchronizePageSite site = configuration.getSite();
- // toolbar
- if(participant.doesSupportSynchronize()) {
-
- refreshSelectionAction = new Action() {
- public void run() {
- IStructuredSelection selection = (IStructuredSelection)site.getSelectionProvider().getSelection();
- IResource[] resources = Utils.getResources(selection.toArray());
- participant.refresh(resources, Policy.bind("Participant.synchronizing"), Policy.bind("Participant.synchronizingDetails", participant.getName()), site.getWorkbenchSite()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- };
- Utils.initAction(refreshSelectionAction, "action.refreshWithRemote."); //$NON-NLS-1$
-
- configureSchedule = new Action() {
- public void run() {
- ConfigureRefreshScheduleDialog d = new ConfigureRefreshScheduleDialog(
- site.getShell(), participant.getRefreshSchedule());
- d.setBlockOnOpen(false);
- d.open();
- }
- };
- Utils.initAction(configureSchedule, "action.configureSchedulel."); //$NON-NLS-1$
- }
-
- showPreferences = new SyncViewerShowPreferencesAction(site.getShell());
- removeFromViewAction = new RemoveFromViewAction(configuration);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#fillContextMenu(org.eclipse.jface.action.IMenuManager)
- */
- public void fillContextMenu(IMenuManager manager) {
- if (findGroup(manager, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP) != null
- && findGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP) != null) {
- // Place synchronize with navigato to save space
- appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, refreshSelectionAction);
- appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, removeFromViewAction);
- } else {
- appendToGroup(manager, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP, refreshSelectionAction);
- appendToGroup(manager, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP, removeFromViewAction);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.IActionContribution#setActionBars(org.eclipse.ui.IActionBars)
- */
- public void fillActionBars(IActionBars actionBars) {
- if(actionBars != null) {
-
- // view menu
- IMenuManager menu = actionBars.getMenuManager();
- if (findGroup(menu, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP) != null
- && findGroup(menu, ISynchronizePageConfiguration.PREFERENCES_GROUP) != null) {
- appendToGroup(menu, ISynchronizePageConfiguration.PREFERENCES_GROUP, configureSchedule);
- } else {
- appendToGroup(menu, ISynchronizePageConfiguration.SYNCHRONIZE_GROUP, configureSchedule);
- }
- appendToGroup(menu, ISynchronizePageConfiguration.PREFERENCES_GROUP, showPreferences);
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncViewerShowPreferencesAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncViewerShowPreferencesAction.java
deleted file mode 100644
index ca6abf4a0..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SyncViewerShowPreferencesAction.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.dialogs.PreferencePageContainerDialog;
-import org.eclipse.team.internal.ui.preferences.SyncViewerPreferencePage;
-
-public class SyncViewerShowPreferencesAction extends Action {
- private final Shell shell;
-
- public SyncViewerShowPreferencesAction(Shell shell) {
- this.shell = shell;
- Utils.initAction(this, "action.syncViewPreferences."); //$NON-NLS-1$
- }
-
- public void run() {
- PreferencePage page = new SyncViewerPreferencePage();
- Dialog dialog = new PreferencePageContainerDialog(shell, page);
- dialog.setBlockOnOpen(true);
- dialog.open();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java
deleted file mode 100644
index 95b9e67ad..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/SynchronizePageDropDownAction.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.synchronize.actions;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.wizards.GlobalSynchronizeWizard;
-import org.eclipse.team.ui.*;
-import org.eclipse.team.ui.synchronize.*;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.texteditor.IUpdate;
-
-public class SynchronizePageDropDownAction extends Action implements IMenuCreator, ISynchronizeParticipantListener, IUpdate {
-
- private ISynchronizeView fView;
- private Menu fMenu;
- private Action synchronizeAction;
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.texteditor.IUpdate#update()
- */
- public void update() {
- ISynchronizeParticipantReference[] refs = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
- updateTooltipText();
- IActionBars bars = fView.getViewSite().getActionBars();
- }
-
- protected ISynchronizeParticipantReference[] getParticipants() {
- return TeamUI.getSynchronizeManager().getSynchronizeParticipants();
- }
-
- protected boolean select(ISynchronizeParticipantReference ref) {
- return true;
- }
-
- public SynchronizePageDropDownAction(ISynchronizeView view) {
- fView= view;
- Utils.initAction(this, "action.refreshSubscriber."); //$NON-NLS-1$
-
- synchronizeAction = new Action(Policy.bind("GlobalRefreshAction.4")) { //$NON-NLS-1$
- public void run() {
- IWizard wizard = new GlobalSynchronizeWizard();
- WizardDialog dialog = new WizardDialog(fView.getViewSite().getShell(), wizard);
- dialog.open();
- }
- };
- synchronizeAction.setImageDescriptor(TeamImages.getImageDescriptor(ISharedImages.IMG_SYNC_VIEW));
- setMenuCreator(this);
- update();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#dispose()
- */
- public void dispose() {
- if (fMenu != null) {
- fMenu.dispose();
- fMenu = null;
- }
- TeamUI.getSynchronizeManager().removeSynchronizeParticipantListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu)
- */
- public Menu getMenu(Menu parent) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control)
- */
- public Menu getMenu(Control parent) {
- if (fMenu != null) {
- fMenu.dispose();
- }
- fMenu= new Menu(parent);
- final ISynchronizeParticipantReference[] participants = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
- addParticipantsToMenu(fMenu, participants);
- if(participants.length > 0) addMenuSeparator();
- addActionToMenu(fMenu, synchronizeAction);
- TeamUI.getSynchronizeManager().addSynchronizeParticipantListener(this);
- return fMenu;
- }
-
- protected void addParticipantsToMenu(Menu parent, ISynchronizeParticipantReference[] refs) {
- ISynchronizeParticipant current = fView.getParticipant();
- for (int i = 0; i < refs.length; i++) {
- ISynchronizeParticipantReference page = refs[i];
- Action action = new ShowSynchronizeParticipantAction(fView, page);
- try {
- boolean isCurrent = page.getParticipant().equals(current);
- action.setChecked(isCurrent);
- } catch (TeamException e) {
- continue;
- }
- addActionToMenu(fMenu, action);
- }
- }
-
- protected void addActionToMenu(Menu parent, Action action) {
- ActionContributionItem item= new ActionContributionItem(action);
- item.fill(parent, -1);
- }
-
- protected void addMenuSeparator() {
- new MenuItem(fMenu, SWT.SEPARATOR);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- ISynchronizeParticipant current = fView.getParticipant();
- if(current != null) {
- current.run(fView);
- } else {
- synchronizeAction.run();
- }
- update();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.ISynchronizeParticipantListener#participantsAdded(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
- */
- public void participantsAdded(ISynchronizeParticipant[] consoles) {
- Display display = TeamUIPlugin.getStandardDisplay();
- display.asyncExec(new Runnable() {
- public void run() {
- update();
- }
- });
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.sync.ISynchronizeParticipantListener#participantsRemoved(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
- */
- public void participantsRemoved(ISynchronizeParticipant[] consoles) {
- Display display = TeamUIPlugin.getStandardDisplay();
- display.asyncExec(new Runnable() {
- public void run() {
- if (fMenu != null) {
- fMenu.dispose();
- }
- update();
- }
- });
- }
-
- private void updateTooltipText() {
- ISynchronizeParticipant current = fView.getParticipant();
- String text = null;
- if(current != null) {
- text = Policy.bind("GlobalRefreshAction.5", current.getName()); //$NON-NLS-1$
- setToolTipText(text);
- setText(text);
- } else {
- text = Policy.bind("GlobalRefreshAction.4"); //$NON-NLS-1$
- setToolTipText(text);
- setText(text);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardElement.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardElement.java
deleted file mode 100644
index ba17383a1..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardElement.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.wizards;
-
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.model.WorkbenchAdapter;
-
-/**
- * ConfigurationWizardElement represents an item in the configuration wizard table,
- * declared by an extension to the configurationWizards extension point.
- */
-public class ConfigurationWizardElement extends WorkbenchAdapter implements IAdaptable {
- private String id;
- private String name;
- private ImageDescriptor imageDescriptor;
- private String description;
- private IConfigurationElement configurationElement;
-
- /**
- * Creates a new instance of this class
- *
- * @param name the name of the element
- */
- public ConfigurationWizardElement(String name) {
- this.name = name;
- }
- /**
- * Create an the instance of the object described by the configuration
- * element. That is, create the instance of the class the isv supplied in
- * the extension point.
- *
- * @throws CoreException if an error occurs creating the extension
- */
- public Object createExecutableExtension() throws CoreException {
- return TeamUIPlugin.createExtension(configurationElement, ConfigureProjectWizard.ATT_CLASS);
- }
- /*
- * Method declared on IAdaptable.
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class) {
- return this;
- }
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
- /**
- * Returns the configuration element
- *
- * @return the configuration element
- */
- public IConfigurationElement getConfigurationElement() {
- return configurationElement;
- }
- /**
- * Returns the description parameter of this element
- *
- * @return the description of this elemnet
- */
- public String getDescription() {
- return description;
- }
- /**
- * Returns the image for the given element
- *
- * @param element the element to get the image for
- * @return the image for the given element
- */
- public ImageDescriptor getImageDescriptor(Object element) {
- return imageDescriptor;
- }
- /**
- * Returns the label for the given element
- *
- * @param element the element to get the label for
- * @return the label for the given element
- */
- public String getLabel(Object element) {
- return name;
- }
- /**
- * Returns the id as specified in the extension.
- *
- * @return java.lang.String
- */
- public String getID() {
- return id;
- }
- /**
- * Returns the image for this element.
- *
- * @return the image for this element
- */
- public ImageDescriptor getImageDescriptor() {
- return imageDescriptor;
- }
- /**
- * Set the configuration element
- *
- * @param newConfigurationElement the new configuration element
- */
- public void setConfigurationElement(IConfigurationElement newConfigurationElement) {
- configurationElement = newConfigurationElement;
- }
- /**
- * Set the description parameter of this element
- *
- * @param value the new desrciption
- */
- public void setDescription(String value) {
- description = value;
- }
- /**
- * Sets the id parameter of this element
- *
- * @param value the new ID
- */
- public void setID(String value) {
- id = value;
- }
- /**
- * Sets the image for this element.
- *
- * @param value the new image
- */
- public void setImageDescriptor(ImageDescriptor value) {
- imageDescriptor = value;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardNode.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardNode.java
deleted file mode 100644
index 05a8a6eef..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigurationWizardNode.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.wizards;
-
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardNode;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.team.internal.ui.Policy;
-
-/**
- * ConfigurationWizardNode represents the objects in the
- * table in the Configuration wizard.
- */
-public class ConfigurationWizardNode implements IWizardNode {
- // The element this node represents
- ConfigurationWizardElement element;
- // The wizard this node is in
- IWizard wizard;
-
- /**
- * Create a new ConfigurationWizardNode
- *
- * @param element the configuration wizard element for this node
- */
- public ConfigurationWizardNode(ConfigurationWizardElement element) {
- this.element = element;
- }
- /*
- * Method declared on IWizardNode.
- */
- public void dispose() {
- if (wizard != null) {
- wizard.dispose();
- wizard = null;
- }
- }
- /*
- * Method declared on IWizardNode.
- */
- public Point getExtent() {
- return new Point(-1, -1);
- }
- /*
- * Method declared on IWizardNode.
- */
- public IWizard getWizard() {
- if (wizard == null) {
- try {
- wizard = (IWizard)element.createExecutableExtension();
- } catch (CoreException e) {
- System.out.println(Policy.bind("ConfigurationWizard.exceptionCreatingWizard")); //$NON-NLS-1$
- }
- }
- return wizard;
- }
- /*
- * Method declared on IWizardNode.
- */
- public boolean isContentCreated() {
- return wizard != null;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java
deleted file mode 100644
index 165bab491..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.wizards;
-
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.*;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.model.AdaptableList;
-
-/**
- * The wizard for associating projects with team providers
- */
-public class ConfigureProjectWizard extends Wizard implements IConfigurationWizard {
- protected IWorkbench workbench;
- protected IProject project;
- protected IConfigurationWizard wizard;
-
- protected ConfigureProjectWizardMainPage mainPage;
- private String pluginId = TeamUIPlugin.PLUGIN_ID;
-
- protected final static String TAG_WIZARD = "wizard"; //$NON-NLS-1$
- protected final static String TAG_DESCRIPTION = "description"; //$NON-NLS-1$
- protected final static String ATT_NAME = "name"; //$NON-NLS-1$
- protected final static String ATT_CLASS = "class"; //$NON-NLS-1$
- protected final static String ATT_ICON = "icon"; //$NON-NLS-1$
- protected final static String ATT_ID = "id"; //$NON-NLS-1$
-
- public ConfigureProjectWizard() {
- setNeedsProgressMonitor(true);
- setWindowTitle(getWizardWindowTitle()); //$NON-NLS-1$
- }
-
- protected String getExtensionPoint() {
- return ITeamUIConstants.PT_CONFIGURATION;
- }
-
- protected String getWizardWindowTitle() {
- return Policy.bind("ConfigureProjectWizard.title"); //$NON-NLS-1$
- }
-
- protected String getWizardLabel() {
- return Policy.bind("ConfigureProjectWizard.configureProject"); //$NON-NLS-1$
- }
-
- protected String getWizardDescription() {
- return Policy.bind("ConfigureProjectWizard.description"); //$NON-NLS-1$
- }
-
- /*
- * @see Wizard#addPages
- */
- public void addPages() {
- AdaptableList wizards = getAvailableWizards();
- if (wizards.size() == 1) {
- // If there is only one wizard, skip the first page.
- // Only skip the first page if the one wizard has at least one page.
- ConfigurationWizardElement element = (ConfigurationWizardElement)wizards.getChildren()[0];
- try {
- this.wizard = (IConfigurationWizard)element.createExecutableExtension();
- wizard.init(workbench, project);
- wizard.addPages();
- if (wizard.getPageCount() > 0) {
- wizard.setContainer(getContainer());
- IWizardPage[] pages = wizard.getPages();
- for (int i = 0; i < pages.length; i++) {
- addPage(pages[i]);
- }
- return;
- }
- } catch (CoreException e) {
- TeamUIPlugin.log(e);
- return;
- }
- }
- mainPage = new ConfigureProjectWizardMainPage("configurePage1", getWizardLabel(), TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_WIZBAN_SHARE), wizards); //$NON-NLS-1$
- mainPage.setDescription(getWizardDescription());
- mainPage.setProject(project);
- mainPage.setWorkbench(workbench);
- addPage(mainPage);
- }
- public IWizardPage getNextPage(IWizardPage page) {
- if (wizard != null) {
- return wizard.getNextPage(page);
- }
- return super.getNextPage(page);
- }
- public boolean canFinish() {
- // If we are on the first page, never allow finish unless the selected wizard has no pages.
- if (getContainer().getCurrentPage() == mainPage) {
- if (mainPage.getSelectedWizard() != null && mainPage.getNextPage() == null) {
- return true;
- }
- return false;
- }
- if (wizard != null) {
- return wizard.canFinish();
- }
- return super.canFinish();
- }
- /*
- * @see Wizard#performFinish
- */
- public boolean performFinish() {
- // There is only one wizard with at least one page
- if (wizard != null) {
- return wizard.performFinish();
- }
- // If we are on the first page and the selected wizard has no pages then
- // allow it to finish.
- if (getContainer().getCurrentPage() == mainPage) {
- IConfigurationWizard noPageWizard = mainPage.getSelectedWizard();
- if (noPageWizard != null) {
- if (noPageWizard.canFinish())
- {
- return noPageWizard.performFinish();
- }
- }
- }
- // If the wizard has pages and there are several
- // wizards registered then the registered wizard
- // will call it's own performFinish().
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.IWizard#performCancel()
- */
- public boolean performCancel() {
- if (wizard != null) {
- return wizard.performCancel();
- }
- return super.performCancel();
- }
-
- /**
- * Returns the configuration wizards that are available for invocation.
- *
- * @return the available wizards
- */
- protected AdaptableList getAvailableWizards() {
- AdaptableList result = new AdaptableList();
- IPluginRegistry registry = Platform.getPluginRegistry();
- IExtensionPoint point = registry.getExtensionPoint(pluginId, getExtensionPoint());
- if (point != null) {
- IExtension[] extensions = point.getExtensions();
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement[] elements = extensions[i].getConfigurationElements();
- for (int j = 0; j < elements.length; j++) {
- IConfigurationElement element = elements[j];
- if (element.getName().equals(TAG_WIZARD)) {
- ConfigurationWizardElement wizard = createWizardElement(element);
- if (wizard != null) {
- result.add(wizard);
- }
- }
- }
- }
- }
-
- return result;
- }
- /**
- * Returns a new ConfigurationWizardElement configured according to the parameters
- * contained in the passed Registry.
- *
- * May answer null if there was not enough information in the Extension to create
- * an adequate wizard
- *
- * @param element the element for which to create a wizard element
- * @return the wizard element for the given element
- */
- protected ConfigurationWizardElement createWizardElement(IConfigurationElement element) {
- // WizardElements must have a name attribute
- String nameString = element.getAttribute(ATT_NAME);
- if (nameString == null) {
- // Missing attribute
- return null;
- }
- ConfigurationWizardElement result = new ConfigurationWizardElement(nameString);
- if (initializeWizard(result, element)) {
- // initialization was successful
- return result;
- }
- return null;
- }
- /**
- * Initialize the passed element's properties based on the contents of
- * the passed registry. Answer a boolean indicating whether the element
- * was able to be adequately initialized.
- *
- * @param element the element to initialize the properties for
- * @param extension the registry to get properties from
- * @return whether initialization was successful
- */
- protected boolean initializeWizard(ConfigurationWizardElement element, IConfigurationElement config) {
- element.setID(config.getAttribute(ATT_ID));
- String description = ""; //$NON-NLS-1$
- IConfigurationElement [] children = config.getChildren(TAG_DESCRIPTION);
- if (children.length >= 1) {
- description = children[0].getValue();
- }
-
- element.setDescription(description);
-
- // apply CLASS and ICON properties
- element.setConfigurationElement(config);
- String iconName = config.getAttribute(ATT_ICON);
- if (iconName != null) {
- IExtension extension = config.getDeclaringExtension();
- element.setImageDescriptor(TeamUIPlugin.getImageDescriptorFromExtension(extension, iconName));
- }
- // ensure that a class was specified
- if (element.getConfigurationElement() == null) {
- // Missing attribute
- return false;
- }
- setForcePreviousAndNextButtons(true);
- return true;
- }
- /*
- * Method declared on IConfigurationWizard
- */
- public void init(IWorkbench workbench, IProject project) {
- this.workbench = workbench;
- this.project = project;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java
deleted file mode 100644
index b0849aa9a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.wizards;
-
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.IHelpContextIds;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.ui.IConfigurationWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.model.*;
-
-/**
- * The main page of the configure project wizard. It contains a table
- * which lists possible team providers with which to configure the project.
- * The user may select one and press "Next", which will display a provider-
- * specific wizard page.
- */
-public class ConfigureProjectWizardMainPage extends WizardPage {
- private Table table;
- private TableViewer viewer;
- private AdaptableList wizards;
- private IWorkbench workbench;
- private IProject project;
- private String description;
-
- private IConfigurationWizard selectedWizard;
-
- /**
- * Create a new ConfigureProjectWizardMainPage
- *
- * @param pageName the name of the page
- * @param title the title of the page
- * @param titleImage the image for the page title
- * @param wizards the wizards to populate the table with
- */
- public ConfigureProjectWizardMainPage(String pageName, String title, ImageDescriptor titleImage, AdaptableList wizards) {
- this(pageName,title,titleImage,wizards,Policy.bind("ConfigureProjectWizardMainPage.selectRepository")); //$NON-NLS-1$
- }
-
- /**
- * Create a new ConfigureProjectWizardMainPage
- *
- * @param pageName the name of the page
- * @param title the title of the page
- * @param titleImage the image for the page title
- * @param wizards the wizards to populate the table with
- * @param description The string to use as a description label
- */
- public ConfigureProjectWizardMainPage(String pageName, String title, ImageDescriptor titleImage, AdaptableList wizards, String description) {
- super(pageName, title, titleImage);
- this.wizards = wizards;
- this.description = description;
- }
-
- public IConfigurationWizard getSelectedWizard() {
- return selectedWizard;
- }
- /*
- * @see WizardPage#canFlipToNextPage
- */
- public boolean canFlipToNextPage() {
- return selectedWizard != null && selectedWizard.getPageCount() > 0;
- }
- /*
- * @see WizardPage#createControl
- */
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- setControl(composite);
-
- // set F1 help
- WorkbenchHelp.setHelp(composite, IHelpContextIds.SHARE_PROJECT_PAGE);
-
- Label label = new Label(composite, SWT.LEFT);
- label.setText(description);
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- label.setLayoutData(data);
-
- table = new Table(composite, SWT.SINGLE | SWT.BORDER);
- data = new GridData(GridData.FILL_BOTH);
- data.heightHint = table.getItemHeight() * 7;
- table.setLayoutData(data);
- viewer = new TableViewer(table);
- viewer.setContentProvider(new WorkbenchContentProvider());
- viewer.setLabelProvider(new WorkbenchLabelProvider());
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- // Initialize the wizard so we can tell whether to enable the Next button
- ISelection selection = event.getSelection();
- if (selection == null || !(selection instanceof IStructuredSelection)) {
- selectedWizard = null;
- setPageComplete(false);
- return;
- }
- IStructuredSelection ss = (IStructuredSelection)selection;
- if (ss.size() != 1) {
- selectedWizard = null;
- setPageComplete(false);
- return;
- }
- ConfigurationWizardElement selectedElement = (ConfigurationWizardElement)ss.getFirstElement();
- try {
- selectedWizard = (IConfigurationWizard)selectedElement.createExecutableExtension();
- selectedWizard.init(workbench, project);
- } catch (CoreException e) {
- return;
- }
- selectedWizard.addPages();
-
- // Ask the container to update button enablement
- setPageComplete(true);
- }
- });
- viewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- getWizard().getContainer().showPage(getNextPage());
- }
- });
- viewer.setInput(wizards);
- Dialog.applyDialogFont(parent);
- }
- /**
- * The <code>WizardSelectionPage</code> implementation of
- * this <code>IWizardPage</code> method returns the first page
- * of the currently selected wizard if there is one.
- *
- * @see WizardPage#getNextPage
- */
- public IWizardPage getNextPage() {
- if (selectedWizard == null) return null;
- return selectedWizard.getStartingPage();
- }
- /**
- * Set the workbench to the argument
- *
- * @param workbench the workbench to set
- */
- public void setWorkbench(IWorkbench workbench) {
- this.workbench = workbench;
- }
- /**
- * Set the project to the argument
- *
- * @param project the project to set
- */
- public void setProject(IProject project) {
- this.project = project;
- }
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- table.setFocus();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java
deleted file mode 100644
index 693f6fd3a..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.wizards;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.team.core.RepositoryProvider;
-import org.eclipse.team.internal.ui.IHelpContextIds;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-public class ExportProjectSetMainPage extends TeamWizardPage {
- Text fileText;
- String file = ""; //$NON-NLS-1$
- Button browseButton;
- List selectedProjects = new ArrayList();
-
- CheckboxTableViewer tableViewer;
- Table table;
-
- class ProjectContentProvider extends WorkbenchContentProvider {
- public Object[] getElements(Object element) {
- if (element instanceof IProject[]) return (IProject[]) element;
- return null;
- }
- };
-
- public ExportProjectSetMainPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
-
- /*
- * @see IDialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite composite = createComposite(parent, 1);
- initializeDialogUnits(composite);
-
- // set F1 help
- WorkbenchHelp.setHelp(composite, IHelpContextIds.EXPORT_PROJECT_SET_PAGE);
-
- createLabel(composite, Policy.bind("ExportProjectSetMainPage.Select_the_projects_to_include_in_the_project_set__2")); //$NON-NLS-1$
-
- table = new Table(composite, SWT.CHECK | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- tableViewer = new CheckboxTableViewer(table);
- table.setLayout(new TableLayout());
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = 300;
- table.setLayoutData(data);
- tableViewer.setContentProvider(new ProjectContentProvider());
- tableViewer.setLabelProvider(new WorkbenchLabelProvider());
- tableViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- IProject project = (IProject)event.getElement();
- if (event.getChecked()) {
- selectedProjects.add(project);
- } else {
- selectedProjects.remove(project);
- }
- updateEnablement();
- }
- });
- createLabel(composite, Policy.bind("ExportProjectSetMainPage.Project_Set_File_Name__3")); //$NON-NLS-1$
-
- Composite inner = new Composite(composite, SWT.NULL);
- inner.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- inner.setLayout(layout);
-
- createLabel(inner, Policy.bind("ExportProjectSetMainPage.&File_name__1")); //$NON-NLS-1$
- fileText = createTextField(inner);
- if (file != null) fileText.setText(file);
- fileText.addListener(SWT.Modify, new Listener() {
- public void handleEvent(Event event) {
- file = fileText.getText();
- updateEnablement();
- }
- });
-
- browseButton = new Button(inner, SWT.PUSH);
- browseButton.setText(Policy.bind("ExportProjectSetMainPage.Browse_4")); //$NON-NLS-1$
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, browseButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- browseButton.setLayoutData(data);
- browseButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- FileDialog d = new FileDialog(getShell(), SWT.SAVE);
- d.setFilterExtensions(new String[] {"*.psf"}); //$NON-NLS-1$
- d.setFilterNames(new String[] {Policy.bind("ExportProjectSetMainPage.Project_Set_Files_3")}); //$NON-NLS-1$
- d.setFileName(Policy.bind("ExportProjectSetMainPage.default")); //$NON-NLS-1$
- d.setFilterPath(new File(".").getAbsolutePath()); //$NON-NLS-1$
- String f = d.open();
- if (f != null) {
- fileText.setText(f);
- file = f;
- }
- }
- });
-
- initializeProjects();
- setControl(composite);
- updateEnablement();
- Dialog.applyDialogFont(parent);
- }
-
- private void initializeProjects() {
- List projectList = new ArrayList();
- IProject[] workspaceProjects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int i = 0; i < workspaceProjects.length; i++) {
- if (RepositoryProvider.getProvider(workspaceProjects[i]) != null) {
- projectList.add(workspaceProjects[i]);
- }
- }
- tableViewer.setInput((IProject[]) projectList.toArray(new IProject[projectList.size()]));
- // Check any necessary projects
- if (selectedProjects != null) {
- tableViewer.setCheckedElements((IProject[])selectedProjects.toArray(new IProject[selectedProjects.size()]));
- }
- }
- private void updateEnablement() {
- boolean complete;
- if (selectedProjects.size() == 0) {
- setMessage(null);
- complete = false;
- } else if (file.length() == 0) {
- setMessage(null);
- complete = false;
- } else {
- File f = new File(file);
- if (f.isDirectory()) {
- setMessage(Policy.bind("ExportProjectSetMainPage.You_have_specified_a_folder_5"), ERROR); //$NON-NLS-1$
- complete = false;
- } else {
- complete = true;
- }
- }
- if (complete) {
- setMessage(null);
- }
- setPageComplete(complete);
- }
-
- public String getFileName() {
- return file;
- }
- public void setFileName(String file) {
- if (file != null) {
- this.file = file;
- }
- }
-
- public IProject[] getSelectedProjects() {
- return (IProject[])selectedProjects.toArray(new IProject[selectedProjects.size()]);
- }
- public void setSelectedProjects(IProject[] selectedProjects) {
- this.selectedProjects.addAll(Arrays.asList(selectedProjects));
- }
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- fileText.setFocus();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java
deleted file mode 100644
index 44702cada..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.wizards;
-
-import java.util.*;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.registry.SynchronizeWizardDescription;
-import org.eclipse.team.internal.ui.synchronize.SynchronizeManager;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.ui.model.BaseWorkbenchContentProvider;
-import org.eclipse.ui.views.navigator.ResourceSorter;
-
-/**
- * Page that allows the user to select a set of resources that are managed
- * by a synchronize participant.
- *
- * Remembers last participant
- *
- * @since 3.0
- */
-public class GlobalRefreshWizardSelectionPage extends WizardPage implements IDoubleClickListener, ISelectionChangedListener {
-
- private TableViewer fViewer;
- private IWizard wizard;
- private List createdImages;
-
- class MyContentProvider extends BaseWorkbenchContentProvider {
- public Object[] getChildren(Object element) {
- if(element instanceof SynchronizeManager) {
- SynchronizeManager manager = (SynchronizeManager)element;
- return manager.getWizardDescriptors();
- }
- return super.getChildren(element);
- }
- }
-
- class MyLabelProvider extends LabelProvider {
- public String getText(Object element) {
- if(element instanceof SynchronizeWizardDescription) {
- SynchronizeWizardDescription descriptor = (SynchronizeWizardDescription)element;
- return descriptor.getName();
- }
- return null;
- }
-
- public Image getImage(Object element) {
- if(element instanceof SynchronizeWizardDescription) {
- SynchronizeWizardDescription descriptor = (SynchronizeWizardDescription)element;
- ImageDescriptor d = descriptor.getImageDescriptor();
- if(createdImages == null) {
- createdImages = new ArrayList(3);
- }
- Image image = d.createImage();
- createdImages.add(image);
- return image;
- }
- return null;
- }
- }
-
- public GlobalRefreshWizardSelectionPage() {
- super(Policy.bind("GlobalRefreshParticipantSelectionPage.0")); //$NON-NLS-1$
- setDescription(Policy.bind("GlobalRefreshParticipantSelectionPage.1")); //$NON-NLS-1$
- setTitle(Policy.bind("GlobalRefreshParticipantSelectionPage.2")); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#dispose()
- */
- public void dispose() {
- if (createdImages != null) {
- for (Iterator it = createdImages.iterator(); it.hasNext();) {
- Image image = (Image) it.next();
- image.dispose();
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent2) {
- Composite top = new Composite(parent2, SWT.NULL);
- top.setLayout(new GridLayout());
- setControl(top);
-
- Label l = new Label(top, SWT.NULL);
- l.setText(Policy.bind("GlobalRefreshParticipantSelectionPage.3")); //$NON-NLS-1$
- fViewer = new TableViewer(top, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_BOTH);
- fViewer.getControl().setLayoutData(data);
- fViewer.setContentProvider(new MyContentProvider());
- fViewer.addDoubleClickListener(this);
- fViewer.setLabelProvider(new MyLabelProvider());
- fViewer.setSorter(new ResourceSorter(ResourceSorter.NAME));
- fViewer.setInput(TeamUI.getSynchronizeManager());
- fViewer.addSelectionChangedListener(this);
- fViewer.getTable().setFocus();
- Dialog.applyDialogFont(parent2);
- }
-
- public void doubleClick(DoubleClickEvent event) {
- selectionChanged(
- new SelectionChangedEvent(
- event.getViewer(),
- event.getViewer().getSelection()));
- getContainer().showPage(getNextPage());
- }
-
- public void selectionChanged(SelectionChangedEvent event) {
- // Initialize the wizard so we can tell whether to enable the
- // Next button
- ISelection selection = event.getSelection();
- if (selection == null || !(selection instanceof IStructuredSelection)) {
- wizard = null;
- setPageComplete(false);
- return;
- }
- IStructuredSelection ss = (IStructuredSelection) selection;
- if (ss.size() != 1) {
- wizard = null;
- setPageComplete(false);
- return;
- }
- SynchronizeWizardDescription selectedDescriptor = (SynchronizeWizardDescription)ss.getFirstElement();
- try {
- wizard = selectedDescriptor.createWizard();
- wizard.addPages();
- // Ask the container to update button enablement
- setPageComplete(true);
- setDescription(selectedDescriptor.getDescription());
- } catch (CoreException e) {
- Utils.handle(e);
- setPageComplete(false);
- }
- }
-
- public IWizard getSelectedWizard() {
- return this.wizard;
- }
-
- public IWizardPage getNextPage() {
- if (wizard == null) return null;
- return wizard.getStartingPage();
- }
-
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- fViewer.getTable().setFocus();
- }
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalSynchronizeWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalSynchronizeWizard.java
deleted file mode 100644
index 5b269fb42..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalSynchronizeWizard.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.wizards;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.registry.SynchronizeWizardDescription;
-import org.eclipse.team.internal.ui.synchronize.SynchronizeManager;
-import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.team.ui.TeamImages;
-import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipantReference;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * The wizard for synchronizing a synchronize participant.
- *
- * @since 3.0
- */
-public class GlobalSynchronizeWizard extends Wizard {
-
- protected IWorkbench workbench;
- protected IWizard wizard;
- protected GlobalRefreshWizardSelectionPage mainPage;
- protected ISynchronizeParticipantReference participant;
-
- public GlobalSynchronizeWizard() {
- setWindowTitle(Policy.bind("GlobalSynchronizeWizard.11")); //$NON-NLS-1$
- setDefaultPageImageDescriptor(TeamImages.getImageDescriptor(ISharedImages.IMG_WIZBAN_SHARE));
- setForcePreviousAndNextButtons(true);
- setNeedsProgressMonitor(false);
- }
-
- /*
- * @see Wizard#addPages
- */
- public void addPages() {
- SynchronizeWizardDescription[] wizards = getWizards();
- if (wizards.length == 1) {
- // If there is only one wizard, skip the first page.
- // Only skip the first page if the one wizard has at least one
- // page.
- try {
- wizard = wizards[0].createWizard();
- wizard.addPages();
- if (wizard.getPageCount() > 0) {
- wizard.setContainer(getContainer());
- IWizardPage[] pages = wizard.getPages();
- for (int i = 0; i < pages.length; i++) {
- addPage(pages[i]);
- }
- return;
- }
- } catch (CoreException e) {
- Utils.handle(e);
- return;
- }
- }
- mainPage = new GlobalRefreshWizardSelectionPage();
- addPage(mainPage);
- }
-
- public boolean canFinish() {
- // If we are on the first page, never allow finish unless the selected
- // wizard has no pages.
- if (getContainer().getCurrentPage() == mainPage) {
- if (mainPage.getSelectedWizard() != null && mainPage.getNextPage() == null) {
- return true;
- }
- return false;
- }
- if (wizard != null) {
- return wizard.canFinish();
- }
- return super.canFinish();
- }
-
- /*
- * @see Wizard#performFinish
- */
- public boolean performFinish() {
- // There is only one wizard with at least one page
- if (wizard != null) {
- return wizard.performFinish();
- }
- // If we are on the first page and the selected wizard has no pages then allow it to finish.
- if (getContainer().getCurrentPage() == mainPage) {
- IWizard noPageWizard = mainPage.getSelectedWizard();
- if (noPageWizard != null) {
- if (noPageWizard.canFinish()) {
- return noPageWizard.performFinish();
- }
- }
- }
- return true;
- }
-
- protected SynchronizeWizardDescription[] getWizards() {
- SynchronizeManager manager = (SynchronizeManager) TeamUI.getSynchronizeManager();
- return manager.getWizardDescriptors();
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java
deleted file mode 100644
index e1a5b9133..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetMainPage.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.wizards;
-
-import java.io.File;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.team.internal.ui.IHelpContextIds;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class ImportProjectSetMainPage extends TeamWizardPage {
- Text fileText;
- String file = ""; //$NON-NLS-1$
- Button browseButton;
- Button createWorkingSetButton;
- Text workingSetNameField;
-
- private boolean createWorkingSet = false;
- private String workingSetName = ""; //$NON-NLS-1$
-
- // constants
- private static final int SIZING_TEXT_FIELD_WIDTH = 80;
-
- public ImportProjectSetMainPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
-
- /*
- * @see IDialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite composite = createComposite(parent, 1);
- initializeDialogUnits(composite);
-
- // set F1 help
- WorkbenchHelp.setHelp(composite, IHelpContextIds.IMPORT_PROJECT_SET_PAGE);
-
- Composite inner = new Composite(composite, SWT.NULL);
- inner.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- inner.setLayout(layout);
-
- createLabel(inner, Policy.bind("ImportProjectSetMainPage.Project_Set_File_Name__2")); //$NON-NLS-1$
- fileText = createTextField(inner);
- if (file != null) fileText.setText(file);
- fileText.addListener(SWT.Modify, new Listener() {
- public void handleEvent(Event event) {
- file = fileText.getText();
- updateEnablement();
- }
- });
-
- browseButton = new Button(inner, SWT.PUSH);
- browseButton.setText(Policy.bind("ImportProjectSetMainPage.Browse_3")); //$NON-NLS-1$
- GridData data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- data.widthHint = Math.max(widthHint, browseButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
- browseButton.setLayoutData(data);
- browseButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- FileDialog d = new FileDialog(getShell());
- d.setFilterExtensions(new String[] {"*.psf", "*"}); //$NON-NLS-1$ //$NON-NLS-2$
- d.setFilterNames(new String[] {Policy.bind("ImportProjectSetMainPage.Project_Set_Files_2"), Policy.bind("ImportProjectSetMainPage.allFiles")}); //$NON-NLS-1$ //$NON-NLS-2$
- d.setFilterPath(new File(".").getAbsolutePath()); //$NON-NLS-1$
- String f = d.open();
- if (f != null) {
- fileText.setText(f);
- file = f;
- }
- }
- });
-
- createWorkinSetCreationArea(inner, 3);
- setControl(composite);
- updateEnablement();
- Dialog.applyDialogFont(parent);
- }
-
- /**
- * Method createWorkinSetCreationArea.
- * @param inner
- */
- private void createWorkinSetCreationArea(Composite composite, int numColumns) {
-
- createWorkingSetButton = new Button(composite, SWT.CHECK | SWT.RIGHT);
- createWorkingSetButton.setText(Policy.bind("ImportProjectSetMainPage.createWorkingSetLabel")); //$NON-NLS-1$
- createWorkingSetButton.setSelection(createWorkingSet);
- GridData data = new GridData();
- data.horizontalSpan = numColumns;
- createWorkingSetButton.setLayoutData(data);
-
- final Label label = new Label(composite, SWT.NONE);
- label.setText(Policy.bind("ImportProjectSetMainPage.workingSetLabel")); //$NON-NLS-1$
- data = new GridData();
- data.horizontalSpan = 1;
- label.setLayoutData(data);
- label.setEnabled(createWorkingSet);
-
- workingSetNameField = new Text(composite, SWT.BORDER);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- data.horizontalSpan = 1;
- workingSetNameField.setLayoutData(data);
- workingSetNameField.setEnabled(createWorkingSet);
-
- createWorkingSetButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- createWorkingSet = createWorkingSetButton.getSelection();
- label.setEnabled(createWorkingSet);
- workingSetNameField.setEnabled(createWorkingSet);
- updateEnablement();
- }
- });
- workingSetNameField.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- updateEnablement();
- }
- });
- }
-
- private boolean validateWorkingSetName() {
- if (createWorkingSet) {
- workingSetName = workingSetNameField.getText();
- if (workingSetName.length() == 0) {
- setMessage(Policy.bind("ImportProjectSetMainPage.workingSetNameEmpty"), ERROR); //$NON-NLS-1$
- return false;
- } else {
- // todo: verify name doesn't already exist
- IWorkingSet existingSet = TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager().getWorkingSet(workingSetName);
- if (existingSet != null) {
- setMessage(Policy.bind("ImportProjectSetMainPage.workingSetNameExists"), WARNING); //$NON-NLS-1$
- return true;
- }
- }
- }
- setMessage(null);
- return true;
- }
-
- private void updateEnablement() {
- boolean complete;
- setMessage(null);
- if (file.length() == 0) {
- complete = false;
- } else {
- // See if the file exists
- File f = new File(file);
- if (!f.exists()) {
- setMessage(Policy.bind("ImportProjectSetMainPage.The_specified_file_does_not_exist_4"), ERROR); //$NON-NLS-1$
- complete = false;
- } else if (f.isDirectory()) {
- setMessage(Policy.bind("ImportProjectSetMainPage.You_have_specified_a_folder_5"), ERROR); //$NON-NLS-1$
- complete = false;
- } else {
- complete = validateWorkingSetName();
- }
- }
- setPageComplete(complete);
- }
-
- public String getFileName() {
- return file;
- }
- public void setFileName(String file) {
- if (file != null) {
- this.file = file;
- }
- }
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- fileText.setFocus();
- }
- }
-
- /**
- * @return String
- */
- public String getWorkingSetName() {
- if (!createWorkingSet) return null;
- return workingSetName;
- }
-
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.java
deleted file mode 100644
index 64bb068d5..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.wizards;
-
-import java.io.*;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.core.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.ui.IExportWizard;
-import org.eclipse.ui.IWorkbench;
-
-public class ProjectSetExportWizard extends Wizard implements IExportWizard {
- ExportProjectSetMainPage mainPage;
- IStructuredSelection selection;
-
- public ProjectSetExportWizard() {
- setNeedsProgressMonitor(true);
- setWindowTitle(Policy.bind("ProjectSetExportWizard.Project_Set_1")); //$NON-NLS-1$
- }
-
- public void addPages() {
- mainPage = new ExportProjectSetMainPage("projectSetMainPage", Policy.bind("ProjectSetExportWizard.Export_a_Project_Set_3"), TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_PROJECTSET_EXPORT_BANNER)); //$NON-NLS-1$ //$NON-NLS-2$
- IProject[] projects = (IProject[])selection.toList().toArray(new IProject[0]);
- mainPage.setSelectedProjects(projects);
- mainPage.setFileName(ProjectSetImportWizard.lastFile);
- addPage(mainPage);
- }
- public boolean performFinish() {
- final boolean[] result = new boolean[] {false};
- try {
- getContainer().run(false, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InvocationTargetException {
- String filename = mainPage.getFileName();
- Path path = new Path(filename);
- if (path.getFileExtension() == null) {
- filename = filename + ".psf"; //$NON-NLS-1$
- }
- ProjectSetImportWizard.lastFile = filename;
- File file = new File(filename);
- File parentFile = file.getParentFile();
- if (parentFile != null && !parentFile.exists()) {
- boolean r = MessageDialog.openQuestion(getShell(), Policy.bind("ProjectSetExportWizard.Question_4"), Policy.bind("ProjectSetExportWizard.Target_directory_does_not_exist._Would_you_like_to_create_it__5")); //$NON-NLS-1$ //$NON-NLS-2$
- if (!r) {
- result[0] = false;
- return;
- }
- r = parentFile.mkdirs();
- if (!r) {
- MessageDialog.openError(getShell(), Policy.bind("ProjectSetExportWizard.Export_Problems_6"), Policy.bind("ProjectSetExportWizard.An_error_occurred_creating_the_target_directory_7")); //$NON-NLS-1$ //$NON-NLS-2$
- result[0] = false;
- return;
- }
- }
- if (file.exists() && file.isFile()) {
- boolean r = MessageDialog.openQuestion(getShell(), Policy.bind("ProjectSetExportWizard.Question_8"), Policy.bind("ProjectSetExportWizard.Target_already_exists._Would_you_like_to_overwrite_it__9")); //$NON-NLS-1$ //$NON-NLS-2$
- if (!r) {
- result[0] = false;
- return;
- }
- }
-
- // Hash the projects by provider
- IProject[] projects = mainPage.getSelectedProjects();
- Map map = new HashMap();
- for (int i = 0; i < projects.length; i++) {
- IProject project = projects[i];
- RepositoryProvider provider = RepositoryProvider.getProvider(project);
- if (provider != null) {
- String id = provider.getID();
- List list = (List)map.get(id);
- if (list == null) {
- list = new ArrayList();
- map.put(id, list);
- }
- list.add(project);
- }
- }
-
- Shell shell = getShell();
- UIProjectSetSerializationContext context = new UIProjectSetSerializationContext(getShell());
-
- BufferedWriter writer = null;
- try {
- writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF-8")); //$NON-NLS-1$
-
- writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$
- writer.newLine();
- writer.write("<psf version=\"2.0\">"); //$NON-NLS-1$
- writer.newLine();
-
- // For each provider id, do the writing
-
- Iterator it = map.keySet().iterator();
- monitor.beginTask(null, 1000 * map.keySet().size());
- while (it.hasNext()) {
- String id = (String)it.next();
- writer.write("\t<provider id=\""); //$NON-NLS-1$
- writer.write(id);
- writer.write("\">"); //$NON-NLS-1$
- writer.newLine();
- List list = (List)map.get(id);
- IProject[] projectArray = (IProject[])list.toArray(new IProject[list.size()]);
- RepositoryProviderType providerType = RepositoryProviderType.getProviderType(id);
- ProjectSetCapability serializer = providerType.getProjectSetCapability();
- ProjectSetCapability.ensureBackwardsCompatible(providerType, serializer);
- if (serializer != null) {
- String[] references = serializer.asReference(projectArray, context, new SubProgressMonitor(monitor, 990));
- for (int i = 0; i < references.length; i++) {
- writer.write("\t\t<project reference=\""); //$NON-NLS-1$
- writer.write(references[i]);
- writer.write("\"/>"); //$NON-NLS-1$
- writer.newLine();
- }
- }
- writer.write("\t</provider>"); //$NON-NLS-1$
- writer.newLine();
- }
- writer.write("</psf>"); //$NON-NLS-1$
- writer.newLine();
- result[0] = true;
- } catch (IOException e) {
- throw new InvocationTargetException(e);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } finally {
- if (writer != null) {
- try {
- writer.close();
- } catch (IOException e) {
- throw new InvocationTargetException(e);
- }
- }
- }
-
- // notify provider types of the project set write
- for (Iterator iter = map.keySet().iterator();iter.hasNext();) {
- String id = (String) iter.next();
- RepositoryProviderType type = RepositoryProviderType.getProviderType(id);
- if (type != null) {
- ProjectSetCapability capability = type.getProjectSetCapability();
- if (capability != null) {
- capability.projectSetCreated(file, context, new SubProgressMonitor(monitor, 10));
- }
- }
- }
-
- monitor.done();
- }
- });
- } catch (InterruptedException e) {
- return true;
- } catch (InvocationTargetException e) {
- Throwable target = e.getTargetException();
- if (target instanceof TeamException) {
- ErrorDialog.openError(getShell(), null, null, ((TeamException)target).getStatus());
- return false;
- }
- if (target instanceof RuntimeException) {
- throw (RuntimeException)target;
- }
- if (target instanceof Error) {
- throw (Error)target;
- }
- }
- return result[0];
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- this.selection = selection;
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java
deleted file mode 100644
index 40e2fcaae..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetImportWizard.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.wizards;
-
-import java.io.*;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-import javax.xml.parsers.*;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.team.core.*;
-import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.ISharedImages;
-import org.eclipse.ui.*;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-public class ProjectSetImportWizard extends Wizard implements IImportWizard {
- ImportProjectSetMainPage mainPage;
- public static String lastFile;
-
- public ProjectSetImportWizard() {
- setNeedsProgressMonitor(true);
- setWindowTitle(Policy.bind("ProjectSetImportWizard.Project_Set_1")); //$NON-NLS-1$
- }
-
- public void addPages() {
- mainPage = new ImportProjectSetMainPage("projectSetMainPage", Policy.bind("ProjectSetImportWizard.Import_a_Project_Set_3"), TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_PROJECTSET_IMPORT_BANNER)); //$NON-NLS-1$ //$NON-NLS-2$
- mainPage.setFileName(lastFile);
- addPage(mainPage);
- }
- public boolean performFinish() {
-
- // check if the desired working set exists
- final String workingSetName = mainPage.getWorkingSetName();
- if (workingSetName != null) {
- IWorkingSet existingSet = TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager().getWorkingSet(workingSetName);
- if (existingSet != null &&
- !MessageDialog.openConfirm(getShell(), Policy.bind("ProjectSetImportWizard.workingSetExistsTitle"), Policy.bind("ProjectSetImportWizard.workingSetExistsMessage", workingSetName))) //$NON-NLS-1$ //$NON-NLS-2$
- return false;
- }
-
- final boolean[] result = new boolean[] {false};
- try {
- getContainer().run(true, true, new WorkspaceModifyOperation(null) {
- public void execute(IProgressMonitor monitor) throws InvocationTargetException {
- InputStreamReader reader = null;
- try {
- String filename = mainPage.getFileName();
- lastFile = filename;
- reader = new InputStreamReader(new FileInputStream(filename), "UTF-8"); //$NON-NLS-1$
-
- SAXParserFactory factory = SAXParserFactory.newInstance();
- SAXParser parser = factory.newSAXParser();
- ProjectSetContentHandler handler = new ProjectSetContentHandler();
- InputSource source = new InputSource(reader);
- parser.parse(source, handler);
-
- Map map = handler.getReferences();
- List newProjects = new ArrayList();
- if (map.size() == 0 && handler.isVersionOne()) {
- IProjectSetSerializer serializer = Team.getProjectSetSerializer("versionOneSerializer"); //$NON-NLS-1$
- if (serializer != null) {
- IProject[] projects = serializer.addToWorkspace(new String[0], filename, getShell(), monitor);
- if (projects != null)
- newProjects.addAll(Arrays.asList(projects));
- }
- } else {
- UIProjectSetSerializationContext context = new UIProjectSetSerializationContext(getShell());
- Iterator it = map.keySet().iterator();
- while (it.hasNext()) {
- String id = (String)it.next();
- List references = (List)map.get(id);
- RepositoryProviderType providerType = RepositoryProviderType.getProviderType(id);
- ProjectSetCapability serializer = providerType.getProjectSetCapability();
- ProjectSetCapability.ensureBackwardsCompatible(providerType, serializer);
- if (serializer != null) {
- IProject[] projects = serializer.addToWorkspace((String[])references.toArray(new String[references.size()]), context, monitor);
- if (projects != null)
- newProjects.addAll(Arrays.asList(projects));
- }
- }
- }
- if (workingSetName != null)
- createWorkingSet(workingSetName, (IProject[]) newProjects.toArray(new IProject[newProjects.size()]));
- result[0] = true;
- } catch (IOException e) {
- throw new InvocationTargetException(e);
- } catch (SAXException e) {
- throw new InvocationTargetException(e);
- } catch (TeamException e) {
- throw new InvocationTargetException(e);
- } catch (ParserConfigurationException e) {
- throw new InvocationTargetException(e);
- } finally {
- if (reader != null) {
- try {
- reader.close();
- } catch (IOException e) {
- throw new InvocationTargetException(e);
- }
- }
- }
- }
- });
- } catch (InterruptedException e) {
- return true;
- } catch (InvocationTargetException e) {
- Throwable target = e.getTargetException();
- if (target instanceof TeamException) {
- ErrorDialog.openError(getShell(), null, null, ((TeamException)target).getStatus());
- return false;
- }
- if (target instanceof RuntimeException) {
- throw (RuntimeException)target;
- }
- if (target instanceof Error) {
- throw (Error)target;
- }
- }
- return result[0];
- }
-
- /* private */ void createWorkingSet(String workingSetName, IProject[] projects) {
- IWorkingSetManager manager = TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager();
- IWorkingSet oldSet = manager.getWorkingSet(workingSetName);
- if (oldSet == null) {
- IWorkingSet newSet = manager.createWorkingSet(workingSetName, projects);
- manager.addWorkingSet(newSet);
- }else {
- oldSet.setElements(projects);
- }
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/TeamWizardPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/TeamWizardPage.java
deleted file mode 100644
index a38c5c28d..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/TeamWizardPage.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.wizards;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public abstract class TeamWizardPage extends WizardPage {
- /**
- * CVSWizardPage constructor comment.
- * @param pageName the name of the page
- */
- public TeamWizardPage(String pageName) {
- super(pageName);
- }
- /**
- * CVSWizardPage constructor comment.
- * @param pageName the name of the page
- * @param title the title of the page
- * @param titleImage the image for the page
- */
- public TeamWizardPage(String pageName, String title, ImageDescriptor titleImage) {
- super(pageName, title, titleImage);
- }
- /**
- * Creates composite control and sets the default layout data.
- *
- * @param parent the parent of the new composite
- * @param numColumns the number of columns for the new composite
- * @return the newly-created coposite
- */
- protected Composite createComposite(Composite parent, int numColumns) {
- Composite composite = new Composite(parent, SWT.NULL);
-
- // GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- composite.setLayout(layout);
-
- // GridData
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- composite.setLayoutData(data);
- return composite;
- }
- /**
- * Utility method that creates a label instance
- * and sets the default layout data.
- *
- * @param parent the parent for the new label
- * @param text the text for the new label
- * @return the new label
- */
- protected Label createLabel(Composite parent, String text) {
- return createIndentedLabel(parent, text, 0);
- }
- /**
- * Utility method that creates a label instance indented by the specified
- * number of pixels and sets the default layout data.
- *
- * @param parent the parent for the new label
- * @param text the text for the new label
- * @param indent the indent in pixels, or 0 for none
- * @return the new label
- */
- protected Label createIndentedLabel(Composite parent, String text, int indent) {
- Label label = new Label(parent, SWT.LEFT);
- label.setText(text);
- GridData data = new GridData();
- data.horizontalSpan = 1;
- data.horizontalAlignment = GridData.FILL;
- data.horizontalIndent = indent;
- label.setLayoutData(data);
- return label;
- }
- /**
- * Create a text field specific for this application
- *
- * @param parent the parent of the new text field
- * @return the new text field
- */
- protected Text createTextField(Composite parent) {
- Text text = new Text(parent, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.verticalAlignment = GridData.CENTER;
- data.grabExcessVerticalSpace = false;
- data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
- text.setLayoutData(data);
- return text;
- }
-}

Back to the top